(First version)
 
(Compiling U-Boot for the BeagleBone Black)
Line 46: Line 46:
 
tftp 0x80800000 u-boot.bin
 
tftp 0x80800000 u-boot.bin
 
go 0x80800000
 
go 0x80800000
 +
</PRE>
 +
 +
=== Saving the Bootloader Images to Flash/Card ===
 +
 +
Copy the files to the start of the uSD Card (/dev/sdb) or MMC Flash (/dev/mmcblk0):
 +
 +
<PRE>
 +
dd if=MLO of=/dev/sdb count=1 seek=1 conv=notrunc bs=128k
 +
dd if=u-boot.img of=/dev/sdb count=2 seek=1 conv=notrunc bs=384k
 
</PRE>
 
</PRE>

Revision as of 13:00, 25 July 2015

Compiling U-Boot for the BeagleBone Black

Download the latest version of U-Boot and extract the files to a working folder:

wget ftp://ftp.denx.de/pub/u-boot/u-boot-latest.tar.bz2
tar -xjf u-boot-latest.tar.bz2
cd u-boot-2015.07

Now cross compile U-Boot using the am335x BeagleBone Black configuration:

make CROSS_COMPILE=arm-linux-gnueabi- distclean
make CROSS_COMPILE=arm-linux-gnueabi- am335x_boneblack_config
make CROSS_COMPILE=arm-linux-gnueabi-

Compiling should conclude with output similar to below showing that an image of MLO - the first stage uBoot Bootloader is generated.

  LD      spl/u-boot-spl
  OBJCOPY spl/u-boot-spl.bin
  MKIMAGE MLO
  CFG     spl/u-boot-spl.cfg

Scrolling up the output messages, you should find where the second stage U-Boot bootloader (u-boot.img) is generated.

  LDS     u-boot.lds
  LD      u-boot
  OBJCOPY u-boot.bin
  MKIMAGE u-boot.img
  OBJCOPY u-boot.srec
  CFG     u-boot.cfg

Testing the fully featured second stage U-Boot Bootloader

If desired, you can test the second stage bootloader by loading it to RAM:

setenv ipaddr 192.168.0.250
setenv serverip 192.168.0.251
tftp 0x80800000 u-boot.bin
go 0x80800000

Saving the Bootloader Images to Flash/Card

Copy the files to the start of the uSD Card (/dev/sdb) or MMC Flash (/dev/mmcblk0):

dd if=MLO of=/dev/sdb count=1 seek=1 conv=notrunc bs=128k
dd if=u-boot.img of=/dev/sdb count=2 seek=1 conv=notrunc bs=384k