Skip to content

Commit c2ac65a

Browse files
committed
docker: split minimum setup to separate script
1 parent 0bd53a4 commit c2ac65a

File tree

5 files changed

+18
-9
lines changed

5 files changed

+18
-9
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
# with a volume.
33
*
44
.*
5+
!setup

Dockerfile

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
# https://github.com/cirosantilli/linux-kernel-module-cheat#docker
22
FROM ubuntu:18.04
3-
RUN apt update
4-
# Minimum requirements to run ./build --download-dependencies
5-
RUN apt-get install -y \
6-
git \
7-
python3 \
8-
python3-distutils \
9-
;
3+
COPY setup /
4+
RUN /setup -y
105
CMD bash

build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ name_to_component_map = {
125125
# TODO test it out on Docker and answer that question properly:
126126
# https://askubuntu.com/questions/350475/how-can-i-install-gem5
127127
apt_get_pkgs={
128+
'device-tree-compiler',
128129
'diod',
129130
'libgoogle-perftools-dev',
130131
'protobuf-compiler',

run

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ def main(args, extra_args=None):
333333
])
334334
virtio_gpu_pci = []
335335
else:
336-
virtio_gpu_pci = ['-device', 'virtio-gpu-pci']
336+
virtio_gpu_pci = ['-device', 'virtio-gpu-pci', common.Newline]
337337
if args.arch == 'x86_64':
338338
append = ['-append', '{} nopat {}'.format(root, kernel_cli), common.Newline]
339339
cmd.extend([
@@ -346,7 +346,7 @@ def main(args, extra_args=None):
346346
cpu = 'cortex-a15'
347347
else:
348348
cpu = 'cortex-a57'
349-
append = ['-append', '{} {}'.format(root, kernel_cli)]
349+
append = ['-append', '{} {}'.format(root, kernel_cli), common.Newline]
350350
cmd.extend(
351351
[
352352
# highmem=off needed since v3.0.0 due to:

setup

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env bash
2+
# Minimum requirements to run ./build --download-dependencies
3+
y=
4+
if [ $# -eq 1 ]; then
5+
y=-y
6+
fi
7+
apt-get update
8+
apt-get install $y \
9+
git \
10+
python3 \
11+
python3-distutils \
12+
;

0 commit comments

Comments
 (0)