Last active
October 13, 2021 10:27
-
-
Save xueliu/356077a1352cd55d929f757f1dab8120 to your computer and use it in GitHub Desktop.
BuildRoot vexpress-a9 boot from NFS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -x | |
if [ $EUID -ne 0 ]; then | |
echo "Error: This script ( ${0} ) must be run with root privileges" | |
exit 1 | |
fi | |
PATH=$PATH:/sbin:/usr/sbin | |
ip=$(which ip) | |
export SWITCH=br0 | |
export ETHERNET_PORT=ens33 | |
export HOST_IP=192.168.1.4 | |
export DEVICE_IP=192.168.1.119 | |
export NET_NUMBER=192.168.1.0 | |
export NET_MASK=255.255.255.0 | |
export PATH="/home/sae/devel/QemuArmVexpress/host/bin:${PATH}" | |
exec qemu-system-arm \ | |
-M vexpress-a9 \ | |
-smp 4 \ | |
-m 256 \ | |
-nographic \ | |
-nic tap,ifname=tap0,script=$(pwd)/qemu-ifup,downscript=$(pwd)/qemu-ifdown\ | |
-kernel zImage \ | |
-dtb vexpress-v2p-ca9.dtb \ | |
-append "console=ttyAMA0,115200 root=/dev/nfs rootwait nfsroot=${HOST_IP}:/rootfs,nolock rw ip=${DEVICE_IP}:${HOST_IP}::${NET_MASK}::eth0:none::" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment