# HG changeset patch # User Rob Landley # Date 1258600519 21600 # Node ID 9ae3c9520bec461fe3e51ef399a00d9693b05dcd # Parent a3ab17ecff3fedff11ea4332bb70e56dbb091ddd Split out kernel_cmdline from qemu-defaults. diff -r a3ab17ecff3f -r 9ae3c9520bec sources/targets/x86_64/settings --- a/sources/targets/x86_64/settings Wed Nov 18 19:21:03 2009 -0600 +++ b/sources/targets/x86_64/settings Wed Nov 18 21:15:19 2009 -0600 @@ -18,5 +18,5 @@ emulator_command() { - echo qemu-system-x86_64 -m 256 $(qemu_defaults "$@") + echo qemu-system-x86_64 $(qemu_defaults "$@") } diff -r a3ab17ecff3f -r 9ae3c9520bec system-image.sh --- a/system-image.sh Wed Nov 18 19:21:03 2009 -0600 +++ b/system-image.sh Wed Nov 18 21:15:19 2009 -0600 @@ -173,20 +173,22 @@ cleanup -# Provide qemu's common command line options between architectures. The lack -# of ending quotes on -append is intentional, callers append more kernel -# command line arguments and provide their own ending quote. +# Provide qemu's common command line options between architectures. + +function kernel_cmdline() +{ + [ "$SYSIMAGE_TYPE" != "initramfs" ] && + echo -n "root=/dev/$ROOT rw init=$USRDIR/sbin/init.sh " + + echo -n "panic=1 PATH=\$DISTCC_PATH_PREFIX${USRDIR}/bin console=$CONSOLE" + echo -n " HOST=$ARCH ${KERNEL_EXTRA}\$KERNEL_EXTRA" +} + function qemu_defaults() { - if [ "$SYSIMAGE_TYPE" != "initramfs" ] - then - HDA="-hda \"$1\" " - APPEND="root=/dev/$ROOT rw init=$USRDIR/sbin/init.sh " - fi - - echo "-nographic -no-reboot -kernel \"$2\" \$WITH_HDC \$WITH_HDB ${HDA}" \ - "-append \"${APPEND}panic=1 PATH=\$DISTCC_PATH_PREFIX${USRDIR}/bin" \ - "console=$CONSOLE \$KERNEL_EXTRA\" \$QEMU_EXTRA" + echo -n "-nographic -no-reboot -kernel \"$2\" \$WITH_HDC \$WITH_HDB" + [ "$SYSIMAGE_TYPE" != "initramfs" ] && echo -n " -hda \"$1\"" + echo -n " -append \"$(kernel_cmdline)\" \$QEMU_EXTRA" } # Write out a script to call the appropriate emulator. We split out the