aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Stabellini2020-09-14 17:41:08 -0700
committerStefano Stabellini2020-09-22 11:42:58 -0700
commit3956b70f583490df9ed0d3d16cc89eb5c1af1001 (patch)
tree31a9dce6a3b2f7ccd79e7ecd2f5cc302f0a2fdf0
parent6bfed7743ac709a64e22e3832d353eed7c39ff78 (diff)
Removed unused container-based usage
Initially ImageBuilder was meant to be mainly invoked from a container but in practice ImageBuilder's scripts have been called directly. Remove the old documentation and Dockerfile. Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com> Reviewed-by: Brian Woods <brian.woods@xilinx.com>
-rw-r--r--Dockerfile.image57
-rw-r--r--PACKAGE.md24
-rw-r--r--README.md80
-rw-r--r--scripts/imagebuilder_sd9
-rw-r--r--scripts/imagebuilder_tftp8
5 files changed, 3 insertions, 175 deletions
diff --git a/Dockerfile.image b/Dockerfile.image
deleted file mode 100644
index 43318ae..0000000
--- a/Dockerfile.image
+++ /dev/null
@@ -1,57 +0,0 @@
-FROM zynqmp-dt-config-package AS zynqmp-dt-config-package
-FROM zynqmp-xen-package AS zynqmp-xen-package
-FROM zynqmp-dom0-kernel-package AS zynqmp-dom0-kernel-package
-FROM zynqmp-dom0-ramdisk-package AS zynqmp-dom0-ramdisk-package
-FROM zynqmp-dom1-package AS zynqmp-dom1-package
-FROM zynqmp-dom2-package AS zynqmp-dom2-package
-
-FROM alpine:3.9
-
-COPY [ \
- "./scripts/*", \
- "/tmp/docker-build/" \
-]
-COPY config /tmp/docker-build/
-
-RUN \
- # apk
- apk update && \
- \
- apk add \
- bash \
- coreutils \
- device-mapper \
- dtc \
- e2fsprogs \
- file \
- multipath-tools \
- sgdisk \
- util-linux \
- vim && \
- \
- # add uboot-tools from community/edge repo
- apk add --repository http://dl-cdn.alpinelinux.org/alpine/edge/community \
- 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 && \
- cp /tmp/docker-build/disk_image /disk_image && \
- chmod 755 /imagebuilder_tftp && \
- chmod 755 /imagebuilder_sd && \
- chmod 755 /uboot-script-gen && \
- chmod 755 /disk_image && \
- \
- # cleanup
- cd /root && \
- rm -rf /tmp/* && \
- rm -f /var/cache/apk/*
-
-COPY --from=zynqmp-dom0-kernel-package /home/builder/output-zynqmp-dom0-kernel/ /home/builder/output
-COPY --from=zynqmp-dom0-ramdisk-package /home/builder/output-zynqmp-dom0-ramdisk/ /home/builder/output
-COPY --from=zynqmp-dt-config-package /home/builder/output-zynqmp-dt-config/ /home/builder/output/
-COPY --from=zynqmp-xen-package /home/builder/output-zynqmp-xen/ /home/builder/output
-COPY --from=zynqmp-dom1-package /home/builder/output-zynqmp-dom1/ /home/builder/output/zynqmp-dom1/
-COPY --from=zynqmp-dom2-package /home/builder/output-zynqmp-dom2/ /home/builder/output/zynqmp-dom2/
diff --git a/PACKAGE.md b/PACKAGE.md
deleted file mode 100644
index 9d37e1c..0000000
--- a/PACKAGE.md
+++ /dev/null
@@ -1,24 +0,0 @@
-# A container package
-
-Imagebuilder takes multiple `package` containers as input and produces a
-runnable u-boot script or a runnable disk image as output. This document
-describes the package format.
-
-A package is a container containing all the relevant binaries for a
-given component under the following path:
-
-```
-/home/builder/output-<name>/
-```
-
-For instance, for DomUs a package containes the kernel, rootfs,
-additional configuration. As an example, zynqmp-dom1-package contains
-the following files:
-
-```
-/home/builder/output-zynqmp-dom1/Image-domU
-/home/builder/output-zynqmp-dom1/domU-ramdisk.cpio
-/home/builder/output-zynqmp-dom1/passthrough-example-part.dtb
-```
-
-Which are the kernel, ramdisk, passthrough configuration respectively.
diff --git a/README.md b/README.md
index dacd131..f688f28 100644
--- a/README.md
+++ b/README.md
@@ -11,15 +11,14 @@ the binaries automatically and boot the full system fast. Given a
collection of binaries such as Xen, Dom0 and a number of Dom0-less
DomUs, ImageBuilder takes care of calculating all loading addresses,
editing device tree with the necessary information, and even
-pre-configuring a disk image with kernels and rootfses. ImageBuilder
-scripts can be used stand-alone, or from an ImageBuilder Container.
+pre-configuring a disk image with kernels and rootfses.
ImageBuilder has been tested on Xilinx ZynqMP MPSoC boards. An
up-to-date wikipage is also available at
[wiki.xenproject.org](https://wiki.xenproject.org/index.php?title=ImageBuilder).
-## Stand-alone Usage: scripts/uboot-script-gen
+## scripts/uboot-script-gen
The ImageBuilder script that generates a u-boot script to load all your
binaries for a Xen Dom0-less setup is `scripts/uboot-script-gen`.
@@ -89,7 +88,7 @@ Where:\
-o specifies the output filename for the uboot script and its source.\
-## Stand-alone Usage: scripts/disk\_image
+## scripts/disk\_image
The ImageBuilder script that generates a disk image file to load on a
SD or SATA drive. This creates 2 partitions: boot partition where the
@@ -112,76 +111,3 @@ Where:\
-w specifies the temporary working directory that the script uses for
building the disk image, and if not set, one is created in /tmp\
-o specifies the output disk image file name\
-
-
-## Container Usage
-
-ImageBuilder comes with a Dockerfile to build a container with all the
-required scripts. The following chapters explain how to build it and use
-it.
-
-
-### `Dockerfile.image`
-
-Build the container.
-
-```
-$ cd imagebuilder
-
-$ docker build --force-rm --file Dockerfile.image -t imagebuilder .
-```
-
-### `/imagebuilder_sd` or `/imagebuilder_tftp`
-
-#### TFTP
-
-Run the following command to generate a uboot script to tftp all the
-necessary binaries automatically:
-
-```
-$ docker run --rm --privileged=true -ti -v /tmp:/tmp -v /dev:/dev imagebuilder /imagebuilder_tftp
-```
-
-The generated files are in `/tmp/output`. At the u-boot prompt run:
-
-```
-tftpb 0xc00000 boot.scr; source 0xc00000
-```
-
-If you are using QEMU, you also need to manually setup the ip address.
-Run this command instead:
-
-```
-setenv serverip 192.168.76.2; tftpb 0xc00000 boot.scr; source 0xc00000
-```
-
-#### SATA
-
-Run the following command to generate an image to be written on disk:
-
-```
-$ docker run --rm --privileged=true -ti -v /tmp:/tmp -v /dev:/dev imagebuilder /imagebuilder_sd
-```
-
-The generated image is `/tmp/img/zynqmp.img`. Proceed to dd it to a
-disk, or pass the file as an argument to QEMU (describing how to use
-QEMU to emulate a SATA disk is out of scope for this document).
-
-At the u-boot prompt you can boot automatically with the following
-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/scripts/imagebuilder_sd b/scripts/imagebuilder_sd
deleted file mode 100644
index 13a28e4..0000000
--- a/scripts/imagebuilder_sd
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash
-
-rm -rf /tmp/output
-mkdir /tmp/output
-cp config /tmp/output
-cp -r /home/builder/output/* /tmp/output
-cd /tmp/output
-bash /uboot-script-gen -c ./config -d ./ -t sd
-bash /disk_image -c ./config -d ./ -o /tmp/disk.img
diff --git a/scripts/imagebuilder_tftp b/scripts/imagebuilder_tftp
deleted file mode 100644
index 70b5379..0000000
--- a/scripts/imagebuilder_tftp
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/bash
-
-rm -rf /tmp/output
-mkdir /tmp/output
-cp config /tmp/output
-cp -r /home/builder/output/* /tmp/output
-cd /tmp/output
-bash /uboot-script-gen -c ./config -d ./ -t tftp