blob: 59108cf077b95fa251b7bd119afc235829679b39 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
# imagebuilder
## `Dockerfile.image`
```
$ 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.
|