Mercurial > hg > aboriginal
changeset 1000:6a6a9e8de6ef
Finish previous commit: fix HDB and HDC and make run_emulator() a function. (And finally, if you say DEBUG=1 you get the emulator command output! Yay!)
author | Rob Landley <rob@landley.net> |
---|---|
date | Tue, 16 Mar 2010 03:58:43 -0500 |
parents | 4bd1bc15a744 |
children | c381381fa460 |
files | sources/toys/dev-environment.sh system-image.sh |
diffstat | 2 files changed, 15 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/sources/toys/dev-environment.sh Mon Mar 15 06:01:36 2010 -0500 +++ b/sources/toys/dev-environment.sh Tue Mar 16 03:58:43 2010 -0500 @@ -113,7 +113,7 @@ # The actual emulator invocation command gets appended here by system-image.sh -[ ! -z "$HDC" ] && QEMU_EXTRA="-hdc $HDC $KERNEL_EXTRA" -[ ! -z "$HDB" ] && QEMU_EXTRA="-hdb $HDB $KERNEL_EXTRA" +[ ! -z "$HDC" ] && QEMU_EXTRA="-hdc $HDC $QEMU_EXTRA" +[ ! -z "$HDB" ] && QEMU_EXTRA="-hdb $HDB $QEMU_EXTRA" run_emulator
--- a/system-image.sh Mon Mar 15 06:01:36 2010 -0500 +++ b/system-image.sh Tue Mar 16 03:58:43 2010 -0500 @@ -173,9 +173,19 @@ # filesystem, kernel, and base kernel command line arguments in case you want # to use an emulator other than qemu, but put the default case in qemu_defaults -(echo -e "ARCH=$ARCH\nrun_emulator()\n{" && - emulator_command "$IMAGE" zImage-$ARCH && - echo "}" || dienow) > "$STAGE_DIR/run-emulator.sh" +cat > "$STAGE_DIR/run-emulator.sh" << EOF || dienow +ARCH=$ARCH +run_emulator() +{ + [ ! -z "\$DEBUG" ] && set -x + $(emulator_command "$IMAGE" zImage-$ARCH) +} + +if [ "\$1" != "--norun" ] +then + run_emulator +fi +EOF cat "$SOURCES"/toys/{unique-port,dev-environment}.sh >> "$STAGE_DIR/dev-environment.sh" && chmod +x "$STAGE_DIR/dev-environment.sh" || dienow