简体   繁体   中英

How to use U-Boot to load application onto board

I've installed, compiled and built U-Boot on my host machine in order to load an application (a hello world program in C) onto my board. The board is a FOX G20 V with an ATMEL AT91SAM9G20 processor. The U-Boot compiles fine, and I've compiled my application with arm-none-eabi-gcc which is an ARM embedded gcc toolchain by Linaro ( http://www.linaro.org/ ) to cross compile my application onto my board. But now I'm awfully confused.

I've configured U-Boot to run on my board with the make options. But now, my question is, once U-Boot is compiled and built on my host machine, do I need to install it on my board as well? If so, how do I do that? If not, how do I load my application (the executable file) onto my board once U-Boot is built?

I have read the tutorials online but it still confuses me even more when I read them so I would really appreciate any help.

You definitely have to install u-boot on your board. It looks like your board boots from a micro SD card so that will be easy.

For now let's say we don't care about the SD card partitioning. All you have to do is copy the u-boot image at the beginning of the SD card with dd :

dd if=u-boot.bin of=/dev/<xxx>

where /dev/ is the sdcard device on your PC, generaly /dev/sdb or /dev/mmc0

This will overwrite the partition table of the SD card so all data on this sd card will be lost . It is possible to preserve the partition table and content with other options too.

Then put you SD card on the board and boot from it. You should see u-boot logs on the uart console.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM