Prework
Download compiler
ARM linux gcc for mini2440
Set the enviroment
export PATH=/tmp/opt/FriendlyARM/toolschain/4.4.3/bin:$PATH
export LD_LIBRARY_PATH=/tmp/opt/FriendlyARM/toolschain/4.4.3/arm-none-linux-gnueabi/sys-root/lib:/tmp/opt/FriendlyARM/toolschain/4.4.3/arm-none-linux-gnueabi/lib:/tmp/opt/FriendlyARM/toolschain/4.4.3/arm-none-linux-gnueabi/sys-root/lib:/tmp/opt/FriendlyARM/toolschain/4.4.3/arm-none-linux-gnueabi/sys-root/usr/lib/tmp/opt/FriendlyARM/toolschain/4.4.3/arm-none-linux-gnueabi/debug-root/usr/lib
CROSS_COMPILE=arm-none-linux-gnueabi-
Download uboot source code
wget http://repo.or.cz/w/u-boot-openmoko/mini2440.git/snapshot/HEAD.tar.gz
tar xvf HEAD.tar.gzcd mini2440-HEAD-530af20
Start to compile u-boot
make mini2440_config
make
Solve:
undefine image_print_contents_noindent
vim mkimage.c
add // before image_print_contents_noindent, compile will pass.
Execute u-boot.bin
./qemu-system-arm -M mini2440 -serial stdio -mtdblock u-boot.bin
0 意見:
張貼留言