hoist kernel command line out of qemu docker image

we want to fiddle with this for selinux, and probably for other things too.

Signed-off-by: Tycho Andersen <tycho@docker.com>
This commit is contained in:
Tycho Andersen 2017-03-07 14:39:22 -08:00
parent 5aa5852eb0
commit 8a3ae66f64
2 changed files with 10 additions and 4 deletions

View File

@ -1,6 +1,6 @@
#!/bin/sh
QEMU_IMAGE=mobylinux/qemu:156d2160c2ccf4d5118221bc2708f6c0981d54cc@sha256:e1345ba0400d6c45bf3bdf4f4ed425c3d7596d11e6553b83f17f5893dfc49f7b
QEMU_IMAGE=mobylinux/qemu:2e63db70759e37de6f9cc5cdf67c15f3aa8373c8@sha256:958c6bb1fca426cadf7a3664b8c019eba9f9e2ad4f6b4f3ed02d766fe5e709e4
# if not interactive
if [ ! -t 0 -a -z "$1" ]
@ -32,4 +32,4 @@ BASE=$(basename "$FILE")
MOUNTS="-v $FILE:/tmp/$BASE"
BASE2=$(basename "$FILE2")
[ ! -z "$FILE2" ] && MOUNTS="$MOUNTS -v $FILE2:/tmp/$BASE2"
docker run -it --rm $MOUNTS "$QEMU_IMAGE"
docker run -it --rm $MOUNTS "$QEMU_IMAGE" console=ttyS0

View File

@ -30,7 +30,7 @@ then
then
ARGS="$ARGS -initrd $INITRD"
fi
ARGS="$ARGS -append console=ttyS0 -drive file=systemdisk.img,format=raw"
ARGS="$ARGS -drive file=systemdisk.img,format=raw"
else
echo "no recognised boot media" >2
exit 1
@ -38,4 +38,10 @@ fi
echo "$ARGS" | grep -q systemdisk && qemu-img create -f raw systemdisk.img 256M
qemu-system-x86_64 -device virtio-rng-pci -serial stdio -vnc none -m 1024 $ARGS $*
CMDLINE="$*"
if [ -z "${CMDLINE}" ]
then
CMDLINE="console=ttyS0"
fi
qemu-system-x86_64 -device virtio-rng-pci -serial stdio -vnc none -m 1024 -append "${CMDLINE}" $ARGS