Repository navigation
Commit 56ff891
Build images for the other architecture (#48)
* feat: run a machine of another architecture on TCG
KVM runs only machines of the host's architecture, so the check of an
image built for another one boots on TCG and says why.
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: karo <karolin.kostial@gmail.com>
* feat: run a machine that names no architecture as amd64
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: karo <karolin.kostial@gmail.com>
* feat: key layers by the architecture they are built for
A scratch stage has no base digest, so without the architecture in the
key an amd64 and an arm64 build would share its layers.
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: karo <karolin.kostial@gmail.com>
* refactor: take the architecture of a build from its command
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: karo <karolin.kostial@gmail.com>
* feat: ask for a disk of the architecture of the plan
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: karo <karolin.kostial@gmail.com>
* feat: make a disk with the loader and stub of its architecture
The image may be of another architecture than the builder VM the agent
runs on, so the request names it.
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: karo <karolin.kostial@gmail.com>
* feat: tell a run the architecture it builds for
TARGETARCH lets one Imagefile install the kernel of either architecture.
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: karo <karolin.kostial@gmail.com>
* feat: tell a shell the architecture its build is for
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: karo <karolin.kostial@gmail.com>
* feat: load binfmt_misc in the builder VM
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: karo <karolin.kostial@gmail.com>
* feat: take the emulator of an image's architecture out of a pinned qemu-user package
The builder VM runs the programs of an image of another architecture
through it.
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: karo <karolin.kostial@gmail.com>
* feat: refuse an emulator miso has no QEMU for, naming the architecture
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: karo <karolin.kostial@gmail.com>
* feat: carry the emulator of another architecture in the builder's initramfs
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: karo <karolin.kostial@gmail.com>
* feat: give every builder initramfs a directory of emulators
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: karo <karolin.kostial@gmail.com>
* feat: register the builder VM's emulators on binfmt_misc
They are registered as Debian registers its qemu-user, through a name
that keeps a program's argv[0], and opened right away, so a run in its
own root has them too.
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: karo <karolin.kostial@gmail.com>
* feat: refuse an emulator of an architecture without a binfmt_misc entry
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: karo <karolin.kostial@gmail.com>
* feat: write the builder's boot files with the emulators of a build
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: karo <karolin.kostial@gmail.com>
* feat: boot the builder with the emulator of the architecture it builds for
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: karo <karolin.kostial@gmail.com>
* feat: build an image for the other architecture
The builder VM keeps running on the host's architecture, on KVM. The
steps of the image run through QEMU in user mode and its checks boot on
TCG.
Closes #31
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: karo <karolin.kostial@gmail.com>
* feat: plan a build for the architecture --arch names
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: karo <karolin.kostial@gmail.com>
* feat: open a shell on the layers of the architecture --arch names
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: karo <karolin.kostial@gmail.com>
* feat: name the architecture in the shell a failed step hints at
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: karo <karolin.kostial@gmail.com>
* refactor: take the architecture only from --arch
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: karo <karolin.kostial@gmail.com>
* build: recommend the qemu-system of the other architecture
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: karo <karolin.kostial@gmail.com>
* fix: set TARGETARCH once when the build file sets it
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: karo <karolin.kostial@gmail.com>
* refactor: build the arch list in error messages from arches
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: karo <karolin.kostial@gmail.com>
* refactor: read --arch once in withBuilder
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: karo <karolin.kostial@gmail.com>
* refactor: return the program from the loop in emulator.ready
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: karo <karolin.kostial@gmail.com>
---------
Signed-off-by: karo <karolin.kostial@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>1 parent 0f52bd5 commit 56ff891
61 files changed
Lines changed: 925 additions & 91 deletions
File tree
- cmd/miso
- hack
- internal
- agent
- boot
- builderkernel
- builder
- build
- emulator
- initramfs
- plan
- protocol
- qemu
- site/src
- test
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
| 54 | + | |
| 55 | + | |
52 | 56 | | |
53 | 57 | | |
54 | 58 | | |
| |||
66 | 70 | | |
67 | 71 | | |
68 | 72 | | |
| 73 | + | |
| 74 | + | |
69 | 75 | | |
70 | 76 | | |
71 | 77 | | |
| 78 | + | |
| 79 | + | |
72 | 80 | | |
73 | 81 | | |
74 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
452 | 452 | | |
453 | 453 | | |
454 | 454 | | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
455 | 469 | | |
456 | 470 | | |
457 | 471 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
4 | 7 | | |
5 | 8 | | |
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
9 | 12 | | |
| 13 | + | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
| |||
18 | 22 | | |
19 | 23 | | |
20 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| |||
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
25 | | - | |
| 24 | + | |
26 | 25 | | |
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
31 | | - | |
32 | | - | |
| 30 | + | |
| 31 | + | |
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
| |||
49 | 48 | | |
50 | 49 | | |
51 | 50 | | |
52 | | - | |
| 51 | + | |
53 | 52 | | |
54 | 53 | | |
55 | 54 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
55 | | - | |
| 56 | + | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| |||
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
81 | | - | |
| 82 | + | |
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
| 8 | + | |
| 9 | + | |
7 | 10 | | |
8 | 11 | | |
9 | 12 | | |
| |||
19 | 22 | | |
20 | 23 | | |
21 | 24 | | |
| 25 | + | |
22 | 26 | | |
23 | 27 | | |
24 | 28 | | |
25 | 29 | | |
26 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
27 | 35 | | |
28 | 36 | | |
29 | 37 | | |
30 | 38 | | |
31 | 39 | | |
32 | | - | |
| 40 | + | |
33 | 41 | | |
34 | 42 | | |
35 | 43 | | |
| |||
65 | 73 | | |
66 | 74 | | |
67 | 75 | | |
68 | | - | |
| 76 | + | |
69 | 77 | | |
70 | 78 | | |
71 | 79 | | |
72 | 80 | | |
73 | 81 | | |
74 | 82 | | |
75 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
76 | 105 | | |
77 | 106 | | |
78 | 107 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
31 | 36 | | |
32 | 37 | | |
33 | 38 | | |
| |||
0 commit comments