File tree Expand file tree Collapse file tree 7 files changed +26
-10
lines changed
Expand file tree Collapse file tree 7 files changed +26
-10
lines changed Original file line number Diff line number Diff line change @@ -30,9 +30,9 @@ if [ "${QEMU_GDB_WAIT}" = "1" ]; then
3030 set -- " ${@ } " " -S"
3131fi
3232
33- set -- " ${@ } " -smp 2 -m 4096
33+ set -- " ${@ } " -nodefaults - smp 2 -m 4096
3434
35- if [ " ${NO_GRAPHICAL_BOOT } " = " 1" ]; then
35+ if [ " ${NO_GRAPHICAL } " = " 1" ]; then
3636 set -- " ${@ } " -nographic
3737else
3838 if [ " ${GRAPHICAL_ONLY} " != " 1" ]; then
4141 else
4242 set -- " ${@ } " \
4343 -device virtio-serial-pci,id=vs0 \
44- -chardev stdio,id=stdio0 \
44+ -chardev stdio,id=stdio0,signal=off \
4545 -device virtconsole,chardev=stdio0,id=console0
4646 fi
4747 fi
@@ -62,6 +62,12 @@ if [ "${NO_INPUT}" != "1" ]; then
6262 -device usb-mouse
6363fi
6464
65+ if [ " ${NO_NETWORK} " != " 1" ]; then
66+ set -- " ${@ } " \
67+ -netdev user,id=network0 \
68+ -device virtio-net-pci,netdev=network0
69+ fi
70+
6571rm -f " ${FINAL_DIR} /ovmf-boot.fd"
6672cp " ${FINAL_DIR} /ovmf.fd" " ${FINAL_DIR} /ovmf-boot.fd"
6773if [ " ${TARGET_ARCH} " = " aarch64" ]; then
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ copy_from_image_polyfill() {
4848 SOURCE=" ${2} "
4949 TARGET=" ${3} "
5050
51- docker build -t " ${IMAGE} -copy-polyfill:${DOCKER_TAG} " --build-arg " TARGET_IMAGE=${IMAGE} :${DOCKER_TAG} " \
51+ docker build --platform= " ${DOCKER_TARGET} " - t " ${IMAGE} -copy-polyfill:${DOCKER_TAG} " --build-arg " TARGET_IMAGE=${IMAGE} :${DOCKER_TAG} " \
5252 -f hack/dev/utils/Dockerfile.copy-polyfill hack
5353 # note: the -w '//' is a workaround for Git Bash where / is magically rewritten.
5454 docker run --rm -i -w ' //' " ${IMAGE} -copy-polyfill:${DOCKER_TAG} " cat " image/${SOURCE} " > " ${TARGET} "
@@ -81,7 +81,7 @@ if [ "${SKIP_VM_BUILD}" != "1" ]; then
8181 copy_from_image " ${DOCKER_PREFIX} /sprout-ovmf-${TARGET_ARCH} " " ovmf.fd" " ${FINAL_DIR} /ovmf.fd"
8282 copy_from_image " ${DOCKER_PREFIX} /sprout-ovmf-${TARGET_ARCH} " " shell.efi" " ${FINAL_DIR} /shell.efi"
8383 docker build --platform=" ${DOCKER_TARGET} " -t " ${DOCKER_PREFIX} /sprout-initramfs-${TARGET_ARCH} :${DOCKER_TAG} " \
84- -f hack/dev/vm/Dockerfile.initramfs " ${FINAL_DIR} "
84+ -f hack/dev/vm/Dockerfile.initramfs " hack/dev/vm "
8585 copy_from_image " ${DOCKER_PREFIX} /sprout-initramfs-${TARGET_ARCH} " " initramfs" " ${FINAL_DIR} /initramfs"
8686
8787 if [ -n " ${SPROUT_XEN_EFI_OVERRIDE} " ]; then
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ has-item = "\\vmlinuz"
88
99[actions .chainload-kernel ]
1010chainload.path = " $boot\\ vmlinuz"
11- chainload.options = [" console=hvc0" ]
11+ chainload.options = [" console=hvc0" , " overlaytmpfs=yes " ]
1212chainload.linux-initrd = " $boot\\ initramfs"
1313
1414[entries .kernel ]
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ has-item = "\\vmlinuz"
99
1010[actions .chainload-kernel ]
1111chainload.path = " $boot\\ vmlinuz"
12- chainload.options = [" console=hvc0" ]
12+ chainload.options = [" console=hvc0" , " overlaytmpfs=yes " ]
1313chainload.linux-initrd = " $boot\\ initramfs"
1414
1515[entries .kernel ]
Original file line number Diff line number Diff line change @@ -36,9 +36,14 @@ if [ "${TARGET_KARCH}" = "x86_64" ]; then
3636fi
3737make CROSS_COMPILE=" ${MAYBE_CROSS_COMPILE} " ARCH=" ${TARGET_KARCH} " mod2yesconfig
3838
39+ ./scripts/config -e UEVENT_HELPER
40+ ./scripts/config --set-str UEVENT_HELPER_PATH " /sbin/hotplug"
41+
3942./scripts/config -e DRM_VIRTIO_GPU
4043./scripts/config -e FRAMEBUFFER_CONSOLE
4144./scripts/config -e FRAMEBUFFER_CONSOLE_DETECT_PRIMARY
45+ ./scripts/config -e LOGO
46+
4247./scripts/config -e XEN_DOM0
4348
4449make " -j$( nproc) " CROSS_COMPILE=" ${MAYBE_CROSS_COMPILE} " ARCH=" ${TARGET_KARCH} "
Original file line number Diff line number Diff line change 11FROM alpine:3.22@sha256:4b7ce07002c69e8f3d704a9c5d6fd3053be500b7f1c69fc0d80990c2ad8dd412 AS rootfs
2- RUN apk --no-cache add alpine-base tzdata
2+ RUN apk --no-cache add alpine-base tzdata ifupdown-ng agetty
33RUN rc-update add devfs sysinit && \
44 rc-update add dmesg sysinit && \
55 rc-update add mdev sysinit && \
66 rc-update add cgroups sysinit && \
77 rc-update add sysctl boot && \
88 rc-update add hostname boot && \
99 rc-update add bootmisc boot && \
10+ rc-update add networking boot && \
1011 rc-update add syslog boot && \
1112 rc-update add mount-ro shutdown && \
1213 rc-update add killprocs shutdown && \
1314 rc-update add savecache shutdown && \
1415 ln -s /sbin/init /init && \
1516 echo 'root:root' | chpasswd && \
1617 echo 'sprout' > /etc/hostname && \
17- echo '' > /etc/motd && \
18+ rm /etc/motd && \
1819 ln -s /usr/share/zoneinfo/UTC /etc/localtime && \
19- echo 'hvc0::respawn:/sbin/getty -L hvc0 115200 vt100' >> /etc/inittab
20+ echo 'hvc0::respawn:/sbin/agetty --autologin root -L hvc0 115200 vt100' >> /etc/inittab
21+ COPY files/interfaces /etc/network/interfaces
2022
2123FROM alpine:3.22@sha256:4b7ce07002c69e8f3d704a9c5d6fd3053be500b7f1c69fc0d80990c2ad8dd412 AS build
2224COPY --from=rootfs / /rootfs
Original file line number Diff line number Diff line change 1+ auto eth0
2+ iface eth0
3+ use dhcp
You can’t perform that action at this time.
0 commit comments