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

806 views
Skip to first unread message

Clark

unread,
Sep 20, 2013, 2:00:23 PM9/20/13
to beagl...@googlegroups.com
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!

Clark

unread,
Sep 24, 2013, 9:56:30 AM9/24/13
to beagl...@googlegroups.com
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

Gregg Harrington

unread,
Sep 24, 2013, 12:58:49 PM9/24/13
to beagl...@googlegroups.com
I have been able to build u-boot on angstrom with the following commands

  1. download the latest bits

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

  2. Extract it

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

  3. Make it

    1. cd into u-boot directory

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

Clark

unread,
Sep 24, 2013, 3:57:17 PM9/24/13
to beagl...@googlegroups.com
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.

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

Message has been deleted

Robert P. J. Day

unread,
Sep 25, 2013, 4:20:32 AM9/25/13
to beagl...@googlegroups.com
On Tue, 24 Sep 2013, rh_ wrote:

> On Tue, 24 Sep 2013 12:57:17 -0700 (PDT)
> Clark <cak0...@gmail.com> wrote:
>
> > 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 found a uboot-ti git repo and built that for my BBB and it's running
> fine. I found it on the Das U-boot site.

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

--

========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca

Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
Reply all
Reply to author
Forward
0 new messages