runqemu 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507
  1. #!/bin/bash
  2. #
  3. # Handle running OE images standalone with QEMU
  4. #
  5. # Copyright (C) 2006-2011 Linux Foundation
  6. #
  7. # This program is free software; you can redistribute it and/or modify
  8. # it under the terms of the GNU General Public License version 2 as
  9. # published by the Free Software Foundation.
  10. #
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU General Public License along
  17. # with this program; if not, write to the Free Software Foundation, Inc.,
  18. # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  19. usage() {
  20. MYNAME=`basename $0`
  21. echo ""
  22. echo "Usage: you can run this script with any valid combination"
  23. echo "of the following options (in any order):"
  24. echo " QEMUARCH - the qemu machine architecture to use"
  25. echo " KERNEL - the kernel image file to use"
  26. echo " ROOTFS - the rootfs image file or nfsroot directory to use"
  27. echo " MACHINE - the machine name (optional, autodetected from KERNEL filename if unspecified)"
  28. echo " RAMFS - boot a ramfs-based image"
  29. echo " ISO - boot an ISO image"
  30. echo " VM - boot a vmdk image"
  31. echo " Simplified QEMU command-line options can be passed with:"
  32. echo " nographic - disables video console"
  33. echo " serial - enables a serial console on /dev/ttyS0"
  34. echo " kvm - enables KVM when running qemux86/qemux86-64 (VT-capable CPU required)"
  35. echo " publicvnc - enable a VNC server open to all hosts"
  36. echo " qemuparams=\"xyz\" - specify custom parameters to QEMU"
  37. echo " bootparams=\"xyz\" - specify custom kernel parameters during boot"
  38. echo ""
  39. echo "Examples:"
  40. echo " $MYNAME qemuarm"
  41. echo " $MYNAME qemux86-64 core-image-sato ext3"
  42. echo " $MYNAME path/to/bzImage-qemux86.bin path/to/nfsrootdir/ serial"
  43. echo " $MYNAME qemux86 ramfs"
  44. echo " $MYNAME qemux86 iso"
  45. echo " $MYNAME qemux86 qemuparams=\"-m 256\""
  46. echo " $MYNAME qemux86 bootparams=\"psplash=false\""
  47. echo " $MYNAME path/to/<image>-<machine>.vmdk"
  48. exit 1
  49. }
  50. if [ "x$1" = "x" ]; then
  51. usage
  52. fi
  53. error() {
  54. echo "Error: "$*
  55. usage
  56. }
  57. MACHINE=${MACHINE:=""}
  58. KERNEL=${KERNEL:=""}
  59. ROOTFS=${ROOTFS:=""}
  60. VM=${VM:=""}
  61. FSTYPE=""
  62. LAZY_ROOTFS=""
  63. SCRIPT_QEMU_OPT=""
  64. SCRIPT_QEMU_EXTRA_OPT=""
  65. SCRIPT_KERNEL_OPT=""
  66. SERIALSTDIO=""
  67. KVM_ENABLED="no"
  68. KVM_ACTIVE="no"
  69. # Determine whether the file is a kernel or QEMU image, and set the
  70. # appropriate variables
  71. process_filename() {
  72. filename=$1
  73. # Extract the filename extension
  74. EXT=`echo $filename | awk -F . '{ print \$NF }'`
  75. case /$EXT/ in
  76. /bin/)
  77. # A file ending in .bin is a kernel
  78. [ -z "$KERNEL" ] && KERNEL=$filename || \
  79. error "conflicting KERNEL args [$KERNEL] and [$filename]"
  80. ;;
  81. /ext[234]/|/jffs2/|/btrfs/)
  82. # A file ending in a supportted fs type is a rootfs image
  83. if [ -z "$FSTYPE" -o "$FSTYPE" = "$EXT" ]; then
  84. FSTYPE=$EXT
  85. ROOTFS=$filename
  86. else
  87. error "conflicting FSTYPE types [$FSTYPE] and [$EXT]"
  88. fi
  89. ;;
  90. /vmdk/)
  91. FSTYPE=$EXT
  92. VM=$filename
  93. ;;
  94. *)
  95. error "unknown file arg [$filename]"
  96. ;;
  97. esac
  98. }
  99. # Parse command line args without requiring specific ordering. It's a
  100. # bit more complex, but offers a great user experience.
  101. while true; do
  102. arg=${1}
  103. case "$arg" in
  104. "qemux86" | "qemux86-64" | "qemuarm" | "qemumips" | "qemumipsel" | \
  105. "qemumips64" | "qemush4" | "qemuppc" | "qemumicroblaze" | "qemuzynq")
  106. [ -z "$MACHINE" ] && MACHINE=$arg || \
  107. error "conflicting MACHINE types [$MACHINE] and [$arg]"
  108. ;;
  109. "ext2" | "ext3" | "ext4" | "jffs2" | "nfs" | "btrfs")
  110. [ -z "$FSTYPE" -o "$FSTYPE" = "$arg" ] && FSTYPE=$arg || \
  111. error "conflicting FSTYPE types [$FSTYPE] and [$arg]"
  112. ;;
  113. *-image*)
  114. [ -z "$ROOTFS" ] || \
  115. error "conflicting ROOTFS args [$ROOTFS] and [$arg]"
  116. if [ -f "$arg" ]; then
  117. process_filename $arg
  118. elif [ -d "$arg" ]; then
  119. # Handle the case where the nfsroot dir has -image-
  120. # in the pathname
  121. echo "Assuming $arg is an nfs rootfs"
  122. FSTYPE=nfs
  123. ROOTFS=$arg
  124. else
  125. ROOTFS=$arg
  126. LAZY_ROOTFS="true"
  127. fi
  128. ;;
  129. "ramfs")
  130. FSTYPE=cpio.gz
  131. RAMFS=true
  132. ;;
  133. "iso")
  134. FSTYPE=iso
  135. ISOFS=true
  136. ;;
  137. "nographic")
  138. SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -nographic"
  139. SCRIPT_KERNEL_OPT="$SCRIPT_KERNEL_OPT console=ttyS0"
  140. ;;
  141. "serial")
  142. SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -serial stdio"
  143. SCRIPT_KERNEL_OPT="$SCRIPT_KERNEL_OPT console=ttyS0"
  144. SERIALSTDIO="1"
  145. ;;
  146. "biosdir="*)
  147. CUSTOMBIOSDIR="${arg##biosdir=}"
  148. ;;
  149. "qemuparams="*)
  150. SCRIPT_QEMU_EXTRA_OPT="${arg##qemuparams=}"
  151. # Warn user if they try to specify serial or kvm options
  152. # to use simplified options instead
  153. serial_option=`expr "$SCRIPT_QEMU_EXTRA_OPT" : '.*\(-serial\)'`
  154. kvm_option=`expr "$SCRIPT_QEMU_EXTRA_OPT" : '.*\(-enable-kvm\)'`
  155. vga_option=`expr "$SCRIPT_QEMU_EXTRA_OPT" : '.*\(-vga\)'`
  156. [ ! -z "$serial_option" -o ! -z "$kvm_option" ] && \
  157. echo "Please use simplified serial or kvm options instead"
  158. ;;
  159. "bootparams="*)
  160. SCRIPT_KERNEL_OPT="$SCRIPT_KERNEL_OPT ${arg##bootparams=}"
  161. ;;
  162. "audio")
  163. if [ "x$MACHINE" = "xqemux86" -o "x$MACHINE" = "xqemux86-64" ]; then
  164. echo "Enabling audio in qemu."
  165. echo "Please install snd_intel8x0 or snd_ens1370 driver in linux guest."
  166. QEMU_AUDIO_DRV="alsa"
  167. SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -soundhw ac97,es1370"
  168. fi
  169. ;;
  170. "kvm")
  171. KVM_ENABLED="yes"
  172. KVM_CAPABLE=`grep -q 'vmx\|svm' /proc/cpuinfo && echo 1`
  173. ;;
  174. "slirp")
  175. SLIRP_ENABLED="yes"
  176. ;;
  177. "publicvnc")
  178. SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -vnc 0.0.0.0:0"
  179. ;;
  180. "") break ;;
  181. *)
  182. # A directory name is an nfs rootfs
  183. if [ -d "$arg" ]; then
  184. echo "Assuming $arg is an nfs rootfs"
  185. if [ -z "$FSTYPE" -o "$FSTYPE" = "nfs" ]; then
  186. FSTYPE=nfs
  187. else
  188. error "conflicting FSTYPE types [$arg] and nfs"
  189. fi
  190. if [ -z "$ROOTFS" ]; then
  191. ROOTFS=$arg
  192. else
  193. error "conflicting ROOTFS args [$ROOTFS] and [$arg]"
  194. fi
  195. elif [ -f "$arg" ]; then
  196. process_filename $arg
  197. else
  198. error "unable to classify arg [$arg]"
  199. fi
  200. ;;
  201. esac
  202. shift
  203. done
  204. if [ ! -c /dev/net/tun ] ; then
  205. echo "TUN control device /dev/net/tun is unavailable; you may need to enable TUN (e.g. sudo modprobe tun)"
  206. exit 1
  207. elif [ ! -w /dev/net/tun ] ; then
  208. echo "TUN control device /dev/net/tun is not writable, please fix (e.g. sudo chmod 666 /dev/net/tun)"
  209. exit 1
  210. fi
  211. # Report errors for missing combinations of options
  212. if [ -z "$MACHINE" -a -z "$KERNEL" -a -z "$VM" ]; then
  213. error "you must specify at least a MACHINE, VM, or KERNEL argument"
  214. fi
  215. if [ "$FSTYPE" = "nfs" -a -z "$ROOTFS" ]; then
  216. error "NFS booting without an explicit ROOTFS path is not yet supported"
  217. fi
  218. if [ -z "$MACHINE" ]; then
  219. if [ "x$FSTYPE" = "xvmdk" ]; then
  220. MACHINE=`basename $VM | sed -n 's/.*\(qemux86-64\|qemux86\|qemuarm\|qemumips64\|qemumips\|qemuppc\|qemush4\).*/\1/p'`
  221. if [ -z "$MACHINE" ]; then
  222. error "Unable to set MACHINE from vmdk filename [$VM]"
  223. fi
  224. echo "Set MACHINE to [$MACHINE] based on vmdk [$VM]"
  225. else
  226. MACHINE=`basename $KERNEL | sed -n 's/.*\(qemux86-64\|qemux86\|qemuarm\|qemumips64\|qemumips\|qemuppc\|qemush4\).*/\1/p'`
  227. if [ -z "$MACHINE" ]; then
  228. error "Unable to set MACHINE from kernel filename [$KERNEL]"
  229. fi
  230. echo "Set MACHINE to [$MACHINE] based on kernel [$KERNEL]"
  231. fi
  232. fi
  233. YOCTO_KVM_WIKI="https://wiki.yoctoproject.org/wiki/How_to_enable_KVM_for_Poky_qemu"
  234. YOCTO_PARAVIRT_KVM_WIKI="https://wiki.yoctoproject.org/wiki/Running_an_x86_Yocto_Linux_image_under_QEMU_KVM"
  235. # Detect KVM configuration
  236. if [ "x$KVM_ENABLED" = "xyes" ]; then
  237. if [ -z "$KVM_CAPABLE" ]; then
  238. echo "You are trying to enable KVM on a cpu without VT support."
  239. echo "Remove kvm from the command-line, or refer"
  240. echo "$YOCTO_KVM_WIKI";
  241. exit 1;
  242. fi
  243. if [ "x$MACHINE" != "xqemux86" -a "x$MACHINE" != "xqemux86-64" ]; then
  244. echo "KVM only support x86 & x86-64. Remove kvm from the command-line";
  245. exit 1;
  246. fi
  247. if [ ! -e /dev/kvm ]; then
  248. echo "Missing KVM device. Have you inserted kvm modules?"
  249. echo "For further help see:"
  250. echo "$YOCTO_KVM_WIKI";
  251. exit 1;
  252. fi
  253. if [ ! -e /dev/vhost-net ]; then
  254. echo "Missing virtio net device. Have you inserted vhost-net module?"
  255. echo "For further help see:"
  256. echo "$YOCTO_PARAVIRT_KVM_WIKI";
  257. exit 1;
  258. fi
  259. if [ -w /dev/kvm -a -r /dev/kvm ]; then
  260. SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -enable-kvm"
  261. KVM_ACTIVE="yes"
  262. else
  263. echo "You have no rights on /dev/kvm."
  264. echo "Please change the ownership of this file as described at:"
  265. echo "$YOCTO_KVM_WIKI";
  266. exit 1;
  267. fi
  268. if [ ! -w /dev/vhost-net -o ! -r /dev/vhost-net ]; then
  269. if [ "$SLIRP_ENABLED" != "yes" ] ; then
  270. echo "You have no rights on /dev/vhost-net."
  271. echo "Please change the ownership of this file as described at:"
  272. echo "$YOCTO_PARAVIRT_KVM_WIKI";
  273. exit 1;
  274. fi
  275. fi
  276. fi
  277. machine2=`echo $MACHINE | tr 'a-z' 'A-Z' | sed 's/-/_/'`
  278. # MACHINE is now set for all cases
  279. # Defaults used when these vars need to be inferred
  280. QEMUX86_DEFAULT_KERNEL=bzImage-qemux86.bin
  281. QEMUX86_DEFAULT_FSTYPE=ext3
  282. QEMUX86_64_DEFAULT_KERNEL=bzImage-qemux86-64.bin
  283. QEMUX86_64_DEFAULT_FSTYPE=ext3
  284. QEMUARM_DEFAULT_KERNEL=zImage-qemuarm.bin
  285. QEMUARM_DEFAULT_FSTYPE=ext3
  286. QEMUMIPS_DEFAULT_KERNEL=vmlinux-qemumips.bin
  287. QEMUMIPS_DEFAULT_FSTYPE=ext3
  288. QEMUMIPSEL_DEFAULT_KERNEL=vmlinux-qemumipsel.bin
  289. QEMUMIPSEL_DEFAULT_FSTYPE=ext3
  290. QEMUMIPS64_DEFAULT_KERNEL=vmlinux-qemumips64.bin
  291. QEMUMIPS64_DEFAULT_FSTYPE=ext3
  292. QEMUSH4_DEFAULT_KERNEL=vmlinux-qemumips.bin
  293. QEMUSH4_DEFAULT_FSTYPE=ext3
  294. QEMUPPC_DEFAULT_KERNEL=vmlinux-qemuppc.bin
  295. QEMUPPC_DEFAULT_FSTYPE=ext3
  296. QEMUMICROBLAZE_DEFAULT_KERNEL=linux.bin.ub
  297. QEMUMICROBLAZE_DEFAULT_FSTYPE=cpio
  298. QEMUZYNQ_DEFAULT_KERNEL=uImage
  299. QEMUZYNQ_DEFAULT_FSTYPE=cpio
  300. AKITA_DEFAULT_KERNEL=zImage-akita.bin
  301. AKITA_DEFAULT_FSTYPE=jffs2
  302. SPITZ_DEFAULT_KERNEL=zImage-spitz.bin
  303. SPITZ_DEFAULT_FSTYPE=ext3
  304. setup_path_vars() {
  305. if [ -z "$OE_TMPDIR" ] ; then
  306. PATHS_REQUIRED=true
  307. elif [ "$1" = "1" -a -z "$DEPLOY_DIR_IMAGE" ] ; then
  308. PATHS_REQUIRED=true
  309. else
  310. PATHS_REQUIRED=false
  311. fi
  312. if [ "$PATHS_REQUIRED" = "true" ]; then
  313. # Try to get the variable values from bitbake
  314. type -P bitbake &>/dev/null || {
  315. echo "In order for this script to dynamically infer paths";
  316. echo "to kernels or filesystem images, you either need";
  317. echo "bitbake in your PATH or to source oe-init-build-env";
  318. echo "before running this script" >&2;
  319. exit 1; }
  320. # We have bitbake in PATH, get the variable values from bitbake
  321. BITBAKE_ENV_TMPFILE=`mktemp --tmpdir runqemu.XXXXXXXXXX`
  322. if [ "$?" != "0" ] ; then
  323. echo "Error: mktemp failed for bitbake environment output"
  324. exit 1
  325. fi
  326. MACHINE=$MACHINE bitbake -e > $BITBAKE_ENV_TMPFILE
  327. if [ -z "$OE_TMPDIR" ] ; then
  328. OE_TMPDIR=`cat $BITBAKE_ENV_TMPFILE | sed -n 's/^TMPDIR=\"\(.*\)\"/\1/p'`
  329. fi
  330. if [ -z "$DEPLOY_DIR_IMAGE" ] ; then
  331. DEPLOY_DIR_IMAGE=`cat $BITBAKE_ENV_TMPFILE | sed -n 's/^DEPLOY_DIR_IMAGE=\"\(.*\)\"/\1/p'`
  332. fi
  333. if [ -z "$OE_TMPDIR" ]; then
  334. # Check for errors from bitbake that the user needs to know about
  335. BITBAKE_OUTPUT=`cat $BITBAKE_ENV_TMPFILE | wc -l`
  336. if [ "$BITBAKE_OUTPUT" -eq "0" ]; then
  337. echo "Error: this script needs to be run from your build directory, or you need"
  338. echo "to explicitly set OE_TMPDIR and DEPLOY_DIR_IMAGE in your environment"
  339. else
  340. echo "There was an error running bitbake to determine TMPDIR"
  341. echo "Here is the output from 'bitbake -e':"
  342. cat $BITBAKE_ENV_TMPFILE
  343. fi
  344. rm $BITBAKE_ENV_TMPFILE
  345. exit 1
  346. fi
  347. rm $BITBAKE_ENV_TMPFILE
  348. fi
  349. }
  350. setup_sysroot() {
  351. # Toolchain installs set up $OECORE_NATIVE_SYSROOT in their
  352. # environment script. If that variable isn't set, we're
  353. # either in an in-tree build scenario or the environment
  354. # script wasn't source'd.
  355. if [ -z "$OECORE_NATIVE_SYSROOT" ]; then
  356. setup_path_vars
  357. BUILD_ARCH=`uname -m`
  358. BUILD_OS=`uname | tr '[A-Z]' '[a-z]'`
  359. BUILD_SYS="$BUILD_ARCH-$BUILD_OS"
  360. OECORE_NATIVE_SYSROOT=$OE_TMPDIR/sysroots/$BUILD_SYS
  361. fi
  362. }
  363. # Locate a rootfs image to boot which matches our expected
  364. # machine and fstype.
  365. findimage() {
  366. where=$1
  367. machine=$2
  368. extension=$3
  369. # Sort rootfs candidates by modification time - the most
  370. # recently created one is the one we most likely want to boot.
  371. filename=`ls -t1 $where/*-image*$machine.$extension 2>/dev/null | head -n1`
  372. if [ "x$filename" != "x" ]; then
  373. ROOTFS=$filename
  374. return
  375. fi
  376. echo "Couldn't find a $machine rootfs image in $where."
  377. exit 1
  378. }
  379. if [ -e "$ROOTFS" -a -z "$FSTYPE" ]; then
  380. # Extract the filename extension
  381. EXT=`echo $ROOTFS | awk -F . '{ print \$NF }'`
  382. if [ "x$EXT" = "xext2" -o "x$EXT" = "xext3" -o \
  383. "x$EXT" = "xjffs2" -o "x$EXT" = "xbtrfs" -o \
  384. "x$EXT" = "xext4" ]; then
  385. FSTYPE=$EXT
  386. else
  387. echo "Note: Unable to determine filesystem extension for $ROOTFS"
  388. echo "We will use the default FSTYPE for $MACHINE"
  389. # ...which is done further below...
  390. fi
  391. fi
  392. if [ -z "$KERNEL" -a "x$FSTYPE" != "xvmdk" ]; then
  393. setup_path_vars 1
  394. eval kernel_file=\$${machine2}_DEFAULT_KERNEL
  395. KERNEL=$DEPLOY_DIR_IMAGE/$kernel_file
  396. if [ -z "$KERNEL" ]; then
  397. error "Unable to determine default kernel for MACHINE [$MACHINE]"
  398. fi
  399. fi
  400. # KERNEL is now set for all cases
  401. if [ -z "$FSTYPE" ]; then
  402. eval FSTYPE=\$${machine2}_DEFAULT_FSTYPE
  403. if [ -z "$FSTYPE" ]; then
  404. error "Unable to determine default fstype for MACHINE [$MACHINE]"
  405. fi
  406. fi
  407. # FSTYPE is now set for all cases
  408. # Handle cases where a ROOTFS type is given instead of a filename, e.g.
  409. # core-image-sato
  410. if [ "$LAZY_ROOTFS" = "true" ]; then
  411. setup_path_vars 1
  412. echo "Assuming $ROOTFS really means $DEPLOY_DIR_IMAGE/$ROOTFS-$MACHINE.$FSTYPE"
  413. ROOTFS=$DEPLOY_DIR_IMAGE/$ROOTFS-$MACHINE.$FSTYPE
  414. fi
  415. if [ -z "$ROOTFS" -a "x$FSTYPE" != "xvmdk" ]; then
  416. setup_path_vars 1
  417. T=$DEPLOY_DIR_IMAGE
  418. eval rootfs_list=\$${machine2}_DEFAULT_ROOTFS
  419. findimage $T $MACHINE $FSTYPE
  420. if [ -z "$ROOTFS" ]; then
  421. error "Unable to determine default rootfs for MACHINE [$MACHINE]"
  422. fi
  423. fi
  424. # ROOTFS is now set for all cases, now expand it to be an absolute path, it should exist at this point
  425. ROOTFS=`readlink -f $ROOTFS`
  426. echo ""
  427. echo "Continuing with the following parameters:"
  428. if [ "x$FSTYPE" != "xvmdk" ]; then
  429. echo "KERNEL: [$KERNEL]"
  430. echo "ROOTFS: [$ROOTFS]"
  431. else
  432. echo "VMDK: [$VM]"
  433. fi
  434. echo "FSTYPE: [$FSTYPE]"
  435. setup_sysroot
  436. # OECORE_NATIVE_SYSROOT is now set for all cases
  437. INTERNAL_SCRIPT="$0-internal"
  438. if [ ! -f "$INTERNAL_SCRIPT" -o ! -r "$INTERNAL_SCRIPT" ]; then
  439. INTERNAL_SCRIPT=`which runqemu-internal`
  440. fi
  441. # Specify directory for BIOS, VGA BIOS and keymaps
  442. if [ ! -z "$CUSTOMBIOSDIR" ]; then
  443. if [ -d "$OECORE_NATIVE_SYSROOT/$CUSTOMBIOSDIR" ]; then
  444. echo "Assuming biosdir is $OECORE_NATIVE_SYSROOT/$CUSTOMBIOSDIR"
  445. SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -L $OECORE_NATIVE_SYSROOT/$CUSTOMBIOSDIR"
  446. else
  447. if [ ! -d "$CUSTOMBIOSDIR" ]; then
  448. echo "Custom BIOS directory not found. Tried: $CUSTOMBIOSDIR"
  449. echo "and $OECORE_NATIVE_SYSROOT/$CUSTOMBIOSDIR"
  450. exit 1;
  451. fi
  452. echo "Assuming biosdir is $CUSTOMBIOSDIR"
  453. SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -L $CUSTOMBIOSDIR"
  454. fi
  455. fi
  456. . $INTERNAL_SCRIPT
  457. exit $?