Revision as of 13:00, 25 July 2015 by Craig Peacock (Talk | contribs)

Compiling U-Boot for the BeagleBone Black

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

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
  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.

  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
setenv serverip
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