BeagleBone --- How do you build ONLY u-boot?

How do you ONLY build u-boot for the BeagleBone?

I was able to build everything using this:

       git clone git://github.com/Angstrom-distribution/setup-scripts.git
       cd setup-scripts
       ./oebb.sh config beaglebone
       MACHINE=beaglebone ./oebb.sh bitbake systemd-image
 
This successfully built:
    u-boot-beaglebone-2013.04-r0.img
at this location:
    .../deploy/images/beaglebone

I seem to be able to build just the kernel using this:
    bitbake -c clean virtual/kernel
    bitbake -c compile virtual/kernel
    bitbake -c deploy virtual/kernel

These are some of the recipes that I have tried for u-boot, but they don't
seem to rebuild the u-boot image:
    bitbake virtual/bootloader
    bitbake u-boot

Help!

It seems like maybe the u-boot is something like:
bitbake u-boot-denx

However, I was never able to get the u-boot.img to show up at:
setup-scripts/build/tmp-angstrom_v2012_12-eglibc/deploy/images/beaglebone

I commented out “rm_work” in setup-scripts/conf/local.conf and was able to find the u-boot.img after the bitbake at:
setup-scripts/build/tmp-angstrom_v2012_12-eglibc/work/beaglebone-angstrom-linux-gnueabi/u-boot-denx-2013.04-r0/image/boot

For building u-boot that will boot Debian/Ubuntu (not Angstrom), there are some good instructions here:
https://eewiki.net/display/linuxonarm/BeagleBone#BeagleBone-uEnv.txtbasedbootscript

I have been able to build u-boot on angstrom with the following commands

  1. download the latest bits

  2. wget ftp://ftp.denx.de/pub/u-boot/u-boot-latest.tar.bz2

  3. Extract it

  4. tar -xjf u-boot-latest.tar.bz2

  5. Make it

  6. cd into u-boot directory

  7. CROSS_COMPILE=arm-angstrom-linux-gnueabi- make am335x_evm

Please note, I only saw the binaries come out, I HAVE NOT tested them, but the compile process on angstrom completed after about 10-15 minutes and I seemed to have all the various binaries it producted. I will playing around with this a bit myself today, so if I come up with something I will post my results back here. BTW, thanks for your help on the serial access to my other threads Re: u-boot and getting serial access.

Hope this helps.

Cheers,

Gregg

  1. The u-boot that is built by “bitbake systemd-image” includes these patches:
    0001-beaglebone-default-to-beaglebone-black-for-unknown-E.patch
    0002-am335x-mux-don-t-hang-on-unknown-EEPROMs-assume-Beag.patch
    0003-beaglebone-HACK-always-return-1-for-is_bone_lt.patch
    0004-beaglebone-HACK-raise-USB-current-limit.patch
    0005-beaglebone-use-kloadaddr-to-avoid-copying-the-kernel.patch
    0006-beaglebone-try-to-load-uEnv-uImage-from-eMMC-first.patch
    0007-beaglebone-Don-t-trigger-uboot-variable-lenght-limit.patch
    0008-beaglebone-HACK-change-mmc-order-to-avoid-u-boot-cra.patch
    0009-beaglebone-update-bootpart-variable-after-mmc-scan.patch
    0010-am335x_evm-enable-gpio-command.patch
    0011-am335x_evm-HACK-to-turn-on-BeagleBone-LEDs.patch
    0012-Fix-for-screen-rolling-when-video-played-back-in-bro.patch
    0013-beaglebone-enable-CONFIG_SUPPORT_RAW_INITRD-option.patch
    0014-mmc-Add-RSTN-enable-for-emmc.patch
    0015-workaround-EEPROMs-filled-with-zeroes.patch

I am unclear about how many of these patches are specific to the BeagleBone Black.

  1. I receive some help from Robert Nelson who created this webpage:
    https://eewiki.net/display/linuxonarm/BeagleBone#BeagleBone-uEnv.txtbasedbootscript

You can use his instructions to successfully build u-boot (make sure to include his patch):

You place MLO, u-boot.img, and uEnv.txt in the first “FAT” partition.

If you use this for the contents of uEnv.txt, it will boot Angstrom in the second Unix partition:
loadfdt=load mmc ${mmcdev}:2 ${fdtaddr} /boot/${fdtfile}
loaduimage=load mmc ${mmcdev}:2 ${loadaddr} /boot/uImage
uenvcmd=run loaduimage; run loadfdt; run mmcargs; bootm ${loadaddr} - ${fdtaddr}

just check out the mainline u-boot tree and configure it
specifically for the BBB:

http://www.crashcourse.ca/wiki/index.php/U-Boot_on_the_BBB#BBB-specific_U-Boot_from_current_Git_tree

rday