summaryrefslogtreecommitdiffstats
path: root/configs/i586-qemu/run
diff options
context:
space:
mode:
Diffstat (limited to 'configs/i586-qemu/run')
-rwxr-xr-xconfigs/i586-qemu/run30
1 files changed, 24 insertions, 6 deletions
diff --git a/configs/i586-qemu/run b/configs/i586-qemu/run
index 5036d77..1c57e41 100755
--- a/configs/i586-qemu/run
+++ b/configs/i586-qemu/run
@@ -19,6 +19,9 @@ else
PTXDIST_PLATFORMDIR="."
fi
+# sorce it again, to really get valuable variables
+source selected_platformconfig
+
if [ ! -e "${PTXDIST_PLATFORMDIR}/images/linuximage" ]; then
echo "error: run 'ptxdist go' first"
exit 1
@@ -30,20 +33,35 @@ if [ ! -e "${PTXDIST_PLATFORMDIR}/images/hd.img" ]; then
fi
# the emulator to run
-QEMU_EXEC=${PTXDIST_PLATFORMDIR}/sysroot-host/bin/emu-system-${PTXCONF_ARCH_STRING}
+if test "${PTXCONF_ARCH_STRING}" = "i386"; then
+ ARCH_STRING="x86_64"
+ # Machine to emulate
+ QEMU_MACHINE=pc
+else
+ ARCH_STRING="${PTXCONF_ARCH_STRING}"
+ # Machine to emulate
+ QEMU_MACHINE=${PTXCONF_PLATFORM}
+fi
+
+# we should prefer the QEMU which comes with this BSP
+QEMU_EXEC_PATH="${PTXCONF_SYSROOT_HOST}/bin"
+
+# the QEMU to be used
+QEMU_EXEC=qemu-system-${ARCH_STRING}
+
+if [ -x "${QEMU_EXEC_PATH}/${QEMU_EXEC}" ]; then
+ QEMU_EXEC="${QEMU_EXEC_PATH}/${QEMU_EXEC}"
+fi
# disable this, if you want to have some graphics output
QEMU_NOGRAPHIC=--nographic
-# Machine to emulate: The default kernel is prepared to run on "versatile pb"
-QEMU_MACHINE=pc
-
#
# 'user mode' network related settings
#
PLATFORM_IP="10.0.2.7"
-# the port a 'telned' would connect to (in the emulated sysem)
+# the port a 'telned' would connect to (in the emulated system)
TELNET_INTERNAL_PORT=23
# port QEMU opens at the host side to give access to the ${TELNET_INTERNAL_PORT}
TELNET_EXTERNAL_PORT=4444
@@ -57,4 +75,4 @@ ${QEMU_EXEC} ${QEMU_NOGRAPHIC} \
-redir tcp:${TELNET_EXTERNAL_PORT}:${PLATFORM_IP}:${TELNET_INTERNAL_PORT} \
-kernel ${PTXDIST_PLATFORMDIR}/images/linuximage \
-hda ${PTXDIST_PLATFORMDIR}/images/hd.img \
- -append "root=/dev/sda1 rw console=ttyS0,115200"
+ -append "root=/dev/sda1 rw console=ttyS0,115200 debug"