hoist kernel cmdline into moby.yaml

Signed-off-by: Tycho Andersen <tycho@docker.com>
This commit is contained in:
Tycho Andersen
2017-03-08 11:09:31 -08:00
parent 8a3ae66f64
commit a383e6bb46
12 changed files with 60 additions and 41 deletions

View File

@@ -10,4 +10,4 @@ RUN \
COPY . .
CMD [ "/make-iso" ]
ENTRYPOINT [ "/make-iso" ]

View File

@@ -14,6 +14,7 @@ cd /tmp/iso
INITRD="$(find . -name '*.img')"
KERNEL="$(find . -name vmlinuz64 -or -name bzImage)"
CMDLINE="$*"
[ "$KERNEL" = "vmlinuz64" ] || mv "$KERNEL" vmlinuz64
[ "$INITRD" = "initrd.img" ] || mv "$INITRD" initrd.img
@@ -29,7 +30,7 @@ CFG="DEFAULT linux
LABEL linux
KERNEL /vmlinuz64
INITRD /initrd.img
APPEND earlyprintk=serial console=ttyS0 console=tty1 $*
APPEND ${CMDLINE}
"
printf "$CFG" > isolinux/isolinux.cfg

View File

@@ -12,4 +12,4 @@ RUN \
COPY . .
CMD [ "/make-efi" ]
ENTRYPOINT [ "/make-efi" ]

View File

@@ -14,6 +14,7 @@ cd /tmp/efi
INITRD="$(find . -name '*.img')"
KERNEL="$(find . -name vmlinuz64 -or -name bzImage)"
CMDLINE="$*"
[ "$KERNEL" = "vmlinuz64" ] || mv "$KERNEL" vmlinuz64
[ "$INITRD" = "initrd.img" ] || mv "$INITRD" initrd.img
@@ -21,13 +22,10 @@ KERNEL="$(find . -name vmlinuz64 -or -name bzImage)"
# clean up subdirectories
find . -mindepth 1 -maxdepth 1 -type d | xargs rm -rf
# Docker for Windows specific options, should be moved
WINDOWS_OPTIONS="mobyplatform=windows vsyscall=emulate page_poison=1 panic=1 rootdelay=300 noautodetect"
# Create a EFI boot file with kernel and initrd. From:
# https://github.com/haraldh/mkrescue-uefi/blob/master/mkrescue-uefi.sh
cp /usr/lib/gummiboot/linuxx64.efi.stub .
echo "earlyprintk=ttyS0,115200 console=ttyS0,115200 $WINDOWS_OPTIONS" > cmdline.txt
echo "${CMDLINE} rootdelay=300 noautodetect" > cmdline.txt
objcopy \
--add-section .osrel=/etc/os-release --change-section-vma .osrel=0x20000 \