aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Stabellini2019-08-01 15:19:03 -0700
committerStefano Stabellini2019-08-01 15:23:13 -0700
commitfda10db5497de7616cabf757183ed5a5b616b1b7 (patch)
tree60c83ef8d8cf357f095f09faf3592397a2885fb6
parente1561665e1231ce513facea6ca9865ac838a14bc (diff)
Move multi-domain configuration to imagebuilder
Previously it was expected to come with zynqmp-dt-config-package. Add documentation on how to add addition VMs to the automatic boot. Signed-off-by: Stefano Stabellini <stefanos@xilinx.com>
-rw-r--r--Dockerfile.image2
-rw-r--r--README.md12
-rw-r--r--config17
-rw-r--r--docker-extras/imagebuilder_sd3
-rw-r--r--docker-extras/imagebuilder_tftp3
5 files changed, 35 insertions, 2 deletions
diff --git a/Dockerfile.image b/Dockerfile.image
index 32b7f61..4b57f7b 100644
--- a/Dockerfile.image
+++ b/Dockerfile.image
@@ -11,6 +11,7 @@ COPY [ \
"./docker-extras/*", \
"/tmp/docker-build/" \
]
+COPY config /tmp/docker-build/
RUN \
# apk
@@ -33,6 +34,7 @@ RUN \
uboot-tools && \
\
# Copy run file
+ cp /tmp/docker-build/config /config && \
cp /tmp/docker-build/imagebuilder_tftp /imagebuilder_tftp && \
cp /tmp/docker-build/imagebuilder_sd /imagebuilder_sd && \
cp /tmp/docker-build/uboot-script-gen /uboot-script-gen && \
diff --git a/README.md b/README.md
index 141e768..59108cf 100644
--- a/README.md
+++ b/README.md
@@ -50,3 +50,15 @@ command:
```
scsi scan; load scsi 0:1 0xc00000 boot.scr; source 0xc00000
```
+
+## Add additional DomUs
+
+Assuming that you have the kernel and ramdisk of another DomU already in
+`PACKAGE.md` format, you can configure Imagebuilder to start it
+automatically at boot by making the following changes:
+
+- edit `Dockerfile.image`, add the domU package to the FROM lines
+- edit `Dockerfile.image`, add the domU package to the COPY lines
+- edit `config`, adding another DomU (NUM_DOMUS, DOMU_KERNEL and DOMU_RAMDISK)
+
+Rebuild Imagebuilder and rerun imagebuilder_sd/tftp.
diff --git a/config b/config
new file mode 100644
index 0000000..274e636
--- /dev/null
+++ b/config
@@ -0,0 +1,17 @@
+MEMORY_START="0x0"
+MEMORY_END="0x80000000"
+
+DEVICE_TREE="mpsoc.dtb"
+XEN="xen"
+DOM0_KERNEL="Image-dom0"
+DOM0_RAMDISK="dom0-ramdisk.cpio"
+
+NUM_DOMUS=2
+DOMU_KERNEL[0]="zynqmp-dom1/Image-domU"
+DOMU_RAMDISK[0]="zynqmp-dom1/domU-ramdisk.cpio"
+DOMU_PASSTHROUGH_DTB[0]="zynqmp-dom1/passthrough-example-part.dtb"
+DOMU_KERNEL[1]="zynqmp-dom2/Image-domU"
+DOMU_RAMDISK[1]="zynqmp-dom2/domU-ramdisk.cpio"
+
+UBOOT_SOURCE="boot.source"
+UBOOT_SCRIPT="boot.scr"
diff --git a/docker-extras/imagebuilder_sd b/docker-extras/imagebuilder_sd
index d3c98fb..0afa75f 100644
--- a/docker-extras/imagebuilder_sd
+++ b/docker-extras/imagebuilder_sd
@@ -2,8 +2,9 @@
rm -rf /tmp/output
mkdir /tmp/output
+cp config /tmp/output
+cp -r /home/builder/output/* /tmp/output
cd /tmp/output
-cp -r /home/builder/output/* .
export LOAD_CMD="load scsi 0:1"
bash /uboot-script-gen
bash /disk_image
diff --git a/docker-extras/imagebuilder_tftp b/docker-extras/imagebuilder_tftp
index 2bc12f2..c03633d 100644
--- a/docker-extras/imagebuilder_tftp
+++ b/docker-extras/imagebuilder_tftp
@@ -2,7 +2,8 @@
rm -rf /tmp/output
mkdir /tmp/output
+cp config /tmp/output
+cp -r /home/builder/output/* /tmp/output
cd /tmp/output
-cp -r /home/builder/output/* .
export LOAD_CMD="tftpb"
bash /uboot-script-gen