prosseek
prosseek

Reputation: 191159

Booting u-boot in Mac OS X's qemu

I'm trying to build u-boot, and run it in qemu on Mac OS X. I found this site, and followed the instructions: http://imvoid.wordpress.com/2013/05/17/booting-uboot-in-qemu/

For cross compilation on Mac OS X, I could build the tools - How to make ARM cross compilation on Mac OS X (error: invalid listing option `r' - cross compiling error)

For u-boot, I tried the newest edition (2014) that causes core dump, and some earlier version (2010) that doesn't compile, so I used the 2013/10 version (https://dl.dropboxusercontent.com/u/1234/2014/u-boot-2013.10.tar.bz2) to get the uboot.bin.

However, when I run the binary with qemu-system-arm -M versatilepb -m 128M -nographic -kernel u-boot.bin;, there is no crash, but I see nothing from the screen.

What might be wrong? I uploaded the binary.

https://dl.dropboxusercontent.com/u/1234/2014/u-boot.bin

And the 2014 version that crashes.

https://dl.dropboxusercontent.com/u/1234/2014/u-boot_2014.bin

Upvotes: 1

Views: 2018

Answers (1)

sigjuice
sigjuice

Reputation: 29787

Try using the ELF format file u-boot, instead of u-boot.bin.

$ qemu-system-arm -M versatilepb -m 128M -nographic -kernel u-boot


U-Boot 2014.10-rc2-00312-g9169305 (Oct 06 2014 - 20:43:26)

DRAM:  128 MiB
WARNING: Caches not enabled
Flash: Flash protect error at address 37ec0000
Flash protect error at address 37fc0000
64 MiB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   SMC91111-0
Warning: SMC91111-0 using MAC address from net device

Warning: Your board does not use generic board. Please read
doc/README.generic-board and take action. Boards not
upgraded by the late 2014 may break or be removed.
VersatilePB #

I built u-boot commit 91693055995733e268874ae75568ae316233e116 on my OS X 10.9.5 system. I used the ARM toolchain binaries available here. Untar gcc-arm-none-eabi-4_8-2014q3-20140805-mac.tar.bz2 anywhere (e.g. $HOME)

$ git clone http://git.denx.de/u-boot.git
$ cd u-boot
$ make versatilepb_config
$ make CROSS_COMPILE=~/gcc-arm-none-eabi-4_8-2014q3/bin/arm-none-eabi-

I used Qemu from Homebrew.

$ qemu-system-arm --version
QEMU emulator version 2.1.2, Copyright (c) 2003-2008 Fabrice Bellard

Upvotes: 1

Related Questions