Once you get the source tree unbundled, the trick is figuring out how to build for the BBB. To cut to the chase, the vital thing to know is that you want to use the configuration named "am335x_boneblack_config". However, I intend to monkey with this configuration a bit, so I do the following:
cd u-boot-2015.10 cd configs cp am335x_boneblack_defconfig bbb_defconfig cd ..This gives me less to type in subsequent steps and provides a place for me to do some customization, in particular inserting the line:
CONFIG_SYS_DCACHE_OFF=yBut we are getting ahead of ourselves. I want to build and test the off the shelf version before doing any customization. After this, do:
make bbb_defconfig make V=1Adding the "V=1" switch is optional, but gives more information about the build process.
It would seem simpler and safer to just use the BBB itself.
scp u-boot-2015.10.tar root@bbb:The first problem is no C compiler (we have tar).
apt-get install make apt-get install bcThe need for "bc" was not apparent until make was run without the V=1 flag, which is very much the reason for the presence of this switch and the default selection to not use it.
For some reason the time is wrong on the BBB and I don't want to troubleshoot NTP right now, so I set the date by hand (important for make).
date 0928132716 cd u-boot-2015.10 make distclean make bbb_defconfig make V=1The make process takes a while (at least 15 minutes, maybe longer). Here is the console output from the build:
switch to partitions #0, OK mmc1(part 0) is current device SD/MMC found on device 1 ** File not found boot.scr ** ** File not found uEnv.txt ** ** Invalid partition 2 ** ## Error: "nandboot" not definedA console SD card is required to recover the system.
U-boot requires a patch as per this excellent discussion:
wget ftp://ftp.denx.de/pub/u-boot/u-boot-latest.tar.bz2 tar -xjf u-boot-latest.tar.bz2 cd u-boot-2015.10 wget https://rcn-ee.com/repos/git/u-boot-patches/v2015.10/0001-am335x_evm-uEnv.txt-bootz-n-fixes.patch patch -p1 < 0001-am335x_evm-uEnv.txt-bootz-n-fixes.patch patching file arch/arm/cpu/armv7/am33xx/board.c patching file arch/arm/include/asm/omap_gpio.h patching file board/ti/am335x/board.c patching file board/ti/am335x/mux.c patching file common/image.c patching file configs/am335x_evm_defconfig patching file drivers/gpio/omap_gpio.c patching file include/configs/am335x_evm.h patching file include/configs/ti_armv7_common.h
Tom's Computer Info / firstname.lastname@example.org