Make QEMU & kernel parameters handling easier to understand
This commit is contained in:
parent
844a3e6e6a
commit
d3ee6402f6
|
|
@ -138,10 +138,15 @@ if [[ $QEMU_MAJOR < 2 ]] ; then sed -i '/^[^#].*libarmm
|
||||||
umount -l tmpmnt
|
umount -l tmpmnt
|
||||||
rmdir tmpmnt &>/dev/null
|
rmdir tmpmnt &>/dev/null
|
||||||
|
|
||||||
|
PARAMS_KERNEL="root=/dev/sda2 panic=1"
|
||||||
|
if [[ "$NO_GRAPHIC" == "1" ]]; then
|
||||||
|
PARAMS_QEMU="-nographic"
|
||||||
|
PARAMS_KERNEL="$PARAMS_KERNEL vga=normal console=ttyAMA0"
|
||||||
|
fi
|
||||||
|
|
||||||
# do it
|
# do it
|
||||||
qemu-system-arm -kernel $KERNEL -cpu arm1176 -m 256 -M versatilepb $NET_ARGS \
|
qemu-system-arm -kernel $KERNEL -cpu arm1176 -m 256 -M versatilepb $NET_ARGS \
|
||||||
$( [[ "$NO_GRAPHIC" != "1" ]] || printf %s '-nographic' ) \
|
$PARAMS_QEMU -no-reboot -drive format=raw,file=$IMG -append "$PARAMS_KERNEL"
|
||||||
-no-reboot -append "root=/dev/sda2 panic=1 $( [[ "$NO_GRAPHIC" != "1" ]] || printf %s 'vga=normal console=ttyAMA0' )" -drive format=raw,file=$IMG \
|
|
||||||
|
|
||||||
# restore network to what it was
|
# restore network to what it was
|
||||||
[[ "$NO_NETWORK" != "1" ]] && {
|
[[ "$NO_NETWORK" != "1" ]] && {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue