diff options
Diffstat (limited to 'configs/platform-v7a/run')
-rwxr-xr-x | configs/platform-v7a/run | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/configs/platform-v7a/run b/configs/platform-v7a/run index 8af190f..257dc1a 100755 --- a/configs/platform-v7a/run +++ b/configs/platform-v7a/run @@ -1,17 +1,12 @@ #!/bin/bash -platformconfig=selected_platformconfig -# fallback to platformconfig in the same dir as this script -if [ ! -e "$platformconfig" ]; then - platformconfig=$(dirname $0)/platformconfig -fi +platformconfig=$(dirname $0)/platformconfig # # we need information about the platform # if [ ! -e "$platformconfig" ]; then - echo "error: selected_platformconfig does not exist" - echo " please use 'ptxdist platform ...' or 'ptxdist --platformconfig=...'" + echo "error: ${platformconfig} does not exist" exit 1 fi @@ -36,10 +31,10 @@ if [ ! -e "${QEMU_EXEC}" ]; then exit 1 fi -# the port to which an sshd would connect (in the emulated sysem) +# the port to which an sshd would connect (in the emulated system) SSH_INTERNAL_PORT=22 # the port which QEMU opens at the host side to give access to the ${SSH_INTERNAL_PORT} -SSH_EXTERNAL_PORT=${QEMU_SSH_PORT:-${PPID%64000+1025}} +SSH_EXTERNAL_PORT=${QEMU_SSH_PORT:-$((PPID%64000+1025))} # check if vde is available for networking if [ -z "${VDE_SOCKET}" ]; then @@ -58,11 +53,11 @@ fi # fall back to user network if necessary if [ -z "${QEMU_NET}" ]; then - QEMU_NET=(-netdev user,id=net1,hostfwd=tcp:127.0.0.1:${SSH_EXTERNAL_PORT}-:${SSH_INTERNAL_PORT} ) + QEMU_NET=(-netdev user,id=net1,hostfwd=tcp:127.0.0.1:${SSH_EXTERNAL_PORT}-:${SSH_INTERNAL_PORT},hostfwd=tcp:127.0.0.1:12345-:12345) echo "Forwarding SSH port 127.0.0.1:${SSH_EXTERNAL_PORT} -> qemu:${SSH_INTERNAL_PORT}" fi -BASE_CMDLINE="console=ttyAMA0,115200 loglevel=5 systemd.log_level=warning systemd.show_status=auto" +BASE_CMDLINE="console=ttyAMA0,115200 loglevel=5 systemd.show_status=auto" if [ -d "${PTXDIST_PLATFORMDIR}/root/.virtfs_metadata" ]; then security_model="mapped-file" @@ -177,7 +172,7 @@ run_qemu_barebox() { "${QEMU_BAREBOX_ARGS[@]}" } -target="${1:-9p}" +target="${1:-barebox}" #set -x run_qemu_${target} |