U-Boot on the BBB

From Crashcourse Wiki

Jump to: navigation, search

Contents

Overview

Discussion of the downloading, patching, configuration and building of the U-Boot image when building a core-image-minimal image for the BBB using the meta-beagleboard layer. The name of the generated artifact is u-boot-beaglebone-2013.04-r0.img, so we know we're looking at a U-Boot version of "2013.04".

Then describe how to build a compatible U-Boot image from scratch.

The build environment

The layers used

BBLAYERS ?= " \
  /home/rpjday/oe/dist/layers/oe-core/meta \
  /home/rpjday/oe/dist/layers/meta-openembedded/meta-oe \
  /home/rpjday/oe/dist/layers/meta-beagleboard/common-bsp \
  /home/rpjday/oe/dist/layers/meta-beagleboard/meta-beagleboard-extras \
  "
Build Configuration:
BB_VERSION        = "1.19.1"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Ubuntu-12.04"
TARGET_SYS        = "arm-oe-linux-gnueabi"
MACHINE           = "beaglebone"
DISTRO_VERSION    = "oe-core.0"
TUNE_FEATURES     = "armv7a vfp neon"
TARGET_FPU        = "vfp-neon"
meta              = "master:f192c444c2d88c49738bea4ff4c3af0cc72916de"
meta-oe           = "master:246bedc1c6b3e2830ca0a8fae8c30b8624f46ab2"
common-bsp        = "master:593a05ee427a8adf83efdf5de5f2758428cb52e2"

The recipe used

From bitbake -s:

u-boot-denx                                       :2013.04-r0 

From bitbake-layers show-recipes:

u-boot-denx:
  common-bsp           2013.04

so it's clear we're getting the U-Boot recipe from the meta-beagleboard layer, with the correct version.

Contents of the meta-beagleboard/common-bsp layer

conf/machine/beaglebone.conf

#@TYPE: Machine
#@NAME: BeagleBone machine
#@DESCRIPTION: Machine configuration for the http://beagleboard.org/bone board 

PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg"
XSERVER = "xserver-xorg \
           xf86-input-evdev \
           xf86-video-modesetting"

# Only has DVI connector for external screen
GUI_MACHINE_CLASS = "bigscreen"

require conf/machine/include/ti33x.inc

PREFERRED_PROVIDER_virtual/kernel = "linux-mainline"

IMAGE_FSTYPES_append = " tar.xz "

# Guesswork
SERIAL_CONSOLE = "115200 ttyO0"

UBOOT_MACHINE = "am335x_evm_config"

# and sdio
MACHINE_FEATURES = "kernel26 screen apm usbgadget usbhost vfat alsa"

MACHINE_ESSENTIAL_EXTRA_RDEPENDS = "kernel-devicetree-overlays"

conf/machine/include/ti33x.inc

SOC_FAMILY = "ti33x"
require conf/machine/include/soc-family.inc

require conf/machine/include/tune-cortexa8.inc
# Increase this everytime you change something in the kernel
MACHINE_KERNEL_PR = "r23"

KERNEL_IMAGETYPE = "uImage"

UBOOT_ENTRYPOINT = "0x80008000"
UBOOT_LOADADDRESS = "0x80008000"

EXTRA_IMAGEDEPENDS += "u-boot-denx"

u-boot-denx_2013.04.bb

require u-boot.inc

# SPL build
UBOOT_BINARY = "u-boot.img"
UBOOT_IMAGE = "u-boot-${MACHINE}-${PV}-${PR}.img"
UBOOT_SYMLINK = "u-boot-${MACHINE}.img"

PV = "2013.04"

# No patches for other machines yet
COMPATIBLE_MACHINE = "(beaglebone)"

# File is board-specific, only copy when it will be correct.
FWENV = ""

SRC_URI = "git://git.denx.de/u-boot.git \
           file://0001-beaglebone-default-to-beaglebone-black-for-unknown-E.patch \
           file://0002-am335x-mux-don-t-hang-on-unknown-EEPROMs-assume-Beag.patch \
           file://0003-beaglebone-HACK-always-return-1-for-is_bone_lt.patch \
           file://0004-beaglebone-HACK-raise-USB-current-limit.patch \
           file://0005-beaglebone-use-kloadaddr-to-avoid-copying-the-kernel.patch \
           file://0006-beaglebone-try-to-load-uEnv-uImage-from-eMMC-first.patch \
           file://0007-beaglebone-Don-t-trigger-uboot-variable-lenght-limit.patch \
           file://0008-beaglebone-HACK-change-mmc-order-to-avoid-u-boot-cra.patch \
           file://0009-beaglebone-update-bootpart-variable-after-mmc-scan.patch \
           file://0010-am335x_evm-enable-gpio-command.patch \
           file://0011-am335x_evm-HACK-to-turn-on-BeagleBone-LEDs.patch \
           file://0012-Fix-for-screen-rolling-when-video-played-back-in-bro.patch \
           file://0013-beaglebone-enable-CONFIG_SUPPORT_RAW_INITRD-option.patch \
           file://0014-mmc-Add-RSTN-enable-for-emmc.patch \
           file://0015-workaround-EEPROMs-filled-with-zeroes.patch \
           ${FWENV} \
          "

# v2013.04 tag
SRCREV = "d10f68ae47b67acab8b110b5c605dde4197a1820"

LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb"

S = "${WORKDIR}/git"

u-boot.inc

DESCRIPTION = "U-Boot - the Universal Boot Loader"
HOMEPAGE = "http://www.denx.de/wiki/U-Boot/WebHome"
SECTION = "bootloaders"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=4c6cde5df68eff615d36789dc18edd3b"

PROVIDES = "virtual/bootloader"

DEPENDS = "mtd-utils"

PACKAGE_ARCH = "${MACHINE_ARCH}"
PARALLEL_MAKE=""

EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX}"

UBOOT_MACHINE ?= "${MACHINE}_config"
UBOOT_BINARY ?= "u-boot.bin"
UBOOT_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.bin"
UBOOT_SYMLINK ?= "u-boot-${MACHINE}.bin"
UBOOT_MAKE_TARGET ?= "all"

do_configure () {
        oe_runmake ${UBOOT_MACHINE}
}

do_compile () {
        unset LDFLAGS
        unset CFLAGS
        unset CPPFLAGS
        oe_runmake ${UBOOT_MAKE_TARGET}
}

do_install () {
        install -d ${D}/boot
        install ${S}/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE}
        ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY}

        if [ -e ${WORKDIR}/fw_env.config ] ; then
                install -d ${D}${sysconfdir}
                install -m 644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config
        fi

}

FILES_${PN} = "/boot ${sysconfdir}"
# no gnu_hash in uboot.bin, by design, so skip QA
INSANE_SKIP_${PN} = "1"

inherit deploy

addtask deploy before do_package after do_compile

do_deploy () {
        install -d ${DEPLOY_DIR_IMAGE}
        install ${S}/${UBOOT_BINARY} ${DEPLOY_DIR_IMAGE}/${UBOOT_IMAGE}

        cd ${DEPLOY_DIR_IMAGE}
        rm -f ${UBOOT_BINARY} ${UBOOT_SYMLINK}
        ln -sf ${UBOOT_IMAGE} ${UBOOT_SYMLINK}
        ln -sf ${UBOOT_IMAGE} ${UBOOT_BINARY}

        if [ -e ${S}/MLO ] ; then
                install ${S}/MLO ${DEPLOY_DIR_IMAGE}/MLO-${MACHINE}-${PV}
                rm -f ${DEPLOY_DIR_IMAGE}/MLO-${MACHINE} ${DEPLOY_DIR_IMAGE}/MLO
                ln -sf MLO-${MACHINE}-${PV} ${DEPLOY_DIR_IMAGE}/MLO-${MACHINE}
                ln -sf MLO-${MACHINE}-${PV} ${DEPLOY_DIR_IMAGE}/MLO
        fi
}

The generated U-Boot content

After all the fetching and patching, you should find the following useful(?) snippets under the appropriate /tmp-eglibc/work/beaglebone-oe-linux-gnueabi/u-boot-denx/2013.04-r0/git directory:

include/configs/am335x_evm.h

CONFIG_EXTRA_ENV_SETTINGS

#define CONFIG_EXTRA_ENV_SETTINGS \
        "loadaddr=0x80200000\0" \
        "kloadaddr=0x80007fc0\0" \
        "fdtaddr=0x80F80000\0" \
        "fdt_high=0xffffffff\0" \
        "rdaddr=0x81000000\0" \
        "bootdir=/boot\0" \
        "bootfile=uImage\0" \
        "board_name=unknown\0" \
        "fdtfile=am335x-boneblack.dtb\0" \
        "console=ttyO0,115200n8\0" \
        "optargs=\0" \
        "mtdids=" MTDIDS_DEFAULT "\0" \
        "mtdparts=" MTDPARTS_DEFAULT "\0" \
        "dfu_alt_info_mmc=" DFU_ALT_INFO_MMC "\0" \
        "dfu_alt_info_emmc=rawemmc mmc 0 3751936\0" \
        "dfu_alt_info_nand=" DFU_ALT_INFO_NAND "\0" \
        "mmcdev=0\0" \
        "mmcroot=/dev/mmcblk0p2 ro\0" \
        "mmcrootfstype=ext4 rootwait\0" \
        "bootpart=0:2\0" \
        "nandroot=ubi0:rootfs rw ubi.mtd=7,2048\0" \
        "nandrootfstype=ubifs rootwait=1\0" \
        "nandsrcaddr=0x280000\0" \
        "nandimgsize=0x500000\0" \
        "rootpath=/export/rootfs\0" \
        "nfsopts=nolock\0" \
        "static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}" \
                "::off\0" \
        "ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=${rdaddr},64M\0" \
        "ramrootfstype=ext2\0" \
        "mmcargs=setenv bootargs console=${console} " \
                "${optargs} " \
                "root=${mmcroot} " \
                "rootfstype=${mmcrootfstype}\0" \
        "nandargs=setenv bootargs console=${console} " \
                "${optargs} " \
                "root=${nandroot} " \
                "rootfstype=${nandrootfstype}\0" \
        "spiroot=/dev/mtdblock4 rw\0" \
        "spirootfstype=jffs2\0" \
        "spisrcaddr=0xe0000\0" \
        "spiimgsize=0x362000\0" \
        "spibusno=0\0" \
        "spiargs=setenv bootargs console=${console} " \
                "${optargs} " \
                "root=${spiroot} " \
                "rootfstype=${spirootfstype}\0" \
        "netargs=setenv bootargs console=${console} " \
                "${optargs} " \
                "root=/dev/nfs " \
                "nfsroot=${serverip}:${rootpath},${nfsopts} rw " \
                "ip=dhcp\0" \
        "bootenv=uEnv.txt\0" \
        "loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \
        "importbootenv=echo Importing environment from mmc ...; " \
                "env import -t $loadaddr $filesize\0" \
        "ramargs=setenv bootargs console=${console} " \
                "${optargs} " \
                "root=${ramroot} " \
                "rootfstype=${ramrootfstype}\0" \
        "loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \
        "loaduimage=load mmc ${bootpart} ${kloadaddr} ${bootdir}/${bootfile}\0" \
        "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
        "mmcboot=echo Booting from mmc ...; " \
                "run mmcargs; " \
                "bootm ${kloadaddr} - ${fdtaddr}\0" \
        "nandboot=echo Booting from nand ...; " \
                "run nandargs; " \
                "nand read ${loadaddr} ${nandsrcaddr} ${nandimgsize}; " \
                "bootm ${loadaddr}\0" \
        "spiboot=echo Booting from spi ...; " \
                "run spiargs; " \
                "sf probe ${spibusno}:0; " \
                "sf read ${loadaddr} ${spisrcaddr} ${spiimgsize}; " \
                "bootm ${loadaddr}\0" \
        "netboot=echo Booting from network ...; " \
                "setenv autoload no; " \
                "dhcp; " \
                "tftp ${loadaddr} ${bootfile}; " \
                "tftp ${fdtaddr} ${fdtfile}; " \
                "run netargs; " \
                "bootm ${loadaddr} - ${fdtaddr}\0" \
        "ramboot=echo Booting from ramdisk ...; " \
                "run ramargs; " \
                "bootm ${loadaddr} ${rdaddr} ${fdtaddr}\0" \
        "findfdt="\
                "if test $board_name = A33515BB; then " \
                        "setenv fdtfile am335x-evm.dtb; fi; " \
                "if test $board_name = A335X_SK; then " \
                        "setenv fdtfile am335x-evmsk.dtb; fi;" \
                "if test $board_name = A335BONE; then " \
                        "setenv fdtfile am335x-bone.dtb; fi; " \
                "if test $board_name = A335BNLT; then " \
                        "setenv fdtfile am335x-boneblack.dtb; fi\0" \

#endif

CONFIG_BOOT_COMMAND

#define CONFIG_BOOTCOMMAND \
        "gpio set 53; " \
        "i2c mw 0x24 1 0x3e; " \
        "run findfdt; " \
        "mmc dev 0; if mmc rescan ; then " \
                "echo micro SD card found;" \
                "setenv mmcdev 0;"\
        "else " \
                "echo No micro SD card found, setting mmcdev to 1;" \
                "setenv mmcdev 1;"\
        "fi;" \
        "setenv bootpart ${mmcdev}:2;" \
        "mmc dev ${mmcdev}; if mmc rescan; then " \
                "gpio set 54; " \
                "echo SD/MMC found on device ${mmcdev};" \
                "if run loadbootenv; then " \
                        "echo Loaded environment from ${bootenv};" \
                        "run importbootenv;" \
                "fi;" \
                "if test -n $uenvcmd; then " \
                        "echo Running uenvcmd ...;" \
                        "run uenvcmd;" \
                "fi;" \
                "gpio set 55; " \
                "if run loaduimage; then " \
                        "gpio set 56; " \
                        "run loadfdt;" \
                        "run mmcboot;" \
                "fi;" \
        "fi;" \

board/ti/am335x/

board.h

/*
 * TI AM335x parts define a system EEPROM that defines certain sub-fields.
 * We use these fields to in turn see what board we are on, and what
 * that might require us to set or not set.
 */
#define HDR_NO_OF_MAC_ADDR      3
#define HDR_ETH_ALEN            6
#define HDR_NAME_LEN            8

struct am335x_baseboard_id {
        unsigned int  magic;
        char name[HDR_NAME_LEN];
        char version[4];
        char serial[12];
        char config[32];
        char mac_addr[HDR_NO_OF_MAC_ADDR][HDR_ETH_ALEN];
};

/*
 * We have three pin mux functions that must exist.  We must be able to enable
 * uart0, for initial output and i2c0 to read the main EEPROM.  We then have a
 * main pinmux function that can be overridden to enable all other pinmux that
 * is required on the board.
 */
void enable_uart0_pin_mux(void);
void enable_uart1_pin_mux(void);
void enable_uart2_pin_mux(void);
void enable_uart3_pin_mux(void);
void enable_uart4_pin_mux(void);
void enable_uart5_pin_mux(void);
void enable_i2c0_pin_mux(void);
void enable_board_pin_mux(struct am335x_baseboard_id *header);

and more.

The built environment

(Formatted for aesthetics.)

help

?       - alias for 'help'
askenv  - get environment variables from stdin
base    - print or set address offset
bdinfo  - print Board Info structure
boot    - boot default, i.e., run 'bootcmd'
bootd   - boot default, i.e., run 'bootcmd'
bootm   - boot application image from memory
bootp   - boot image via network using BOOTP/TFTP protocol
bootz   - boot Linux zImage image from memory
chpart  - change active partition
cmp     - memory compare
coninfo - print console devices and information
cp      - memory copy
crc32   - checksum calculation
dfu     - Device Firmware Upgrade
dhcp    - boot image via network using DHCP/TFTP protocol
echo    - echo args to console
editenv - edit environment variable
eeprom  - EEPROM sub-system
env     - environment handling commands
exit    - exit script
ext2load- load binary file from a Ext2 filesystem
ext2ls  - list files in a directory (default /)
ext4load- load binary file from a Ext4 filesystem
ext4ls  - list files in a directory (default /)
false   - do nothing, unsuccessfully
fatinfo - print information about filesystem
fatload - load binary file from a dos filesystem
fatls   - list files in a directory (default /)
fatwrite- write file into a dos filesystem
fdt     - flattened device tree utility commands
go      - start application at address 'addr'
gpio    - input/set/clear/toggle gpio pins
help    - print command description/usage
i2c     - I2C sub-system
iminfo  - print header information for application image
imxtract- extract a part of a multi-image
itest   - return true/false on integer compare
load    - load binary file from a filesystem
loadb   - load binary file over serial line (kermit mode)
loads   - load S-Record file over serial line
loady   - load binary file over serial line (ymodem mode)
loop    - infinite loop on address range
ls      - list files in a directory (default /)
md      - memory display
mm      - memory modify (auto-incrementing address)
mmc     - MMC sub system
mmcinfo - display MMC info
mtdparts- define flash/nand partitions
mtest   - simple RAM read/write test
mw      - memory write (fill)
nand    - NAND sub-system
nboot   - boot from NAND device
nfs     - boot image via network using NFS protocol
nm      - memory modify (constant address)
ping    - send ICMP ECHO_REQUEST to network host
printenv- print environment variables
reset   - Perform RESET of the CPU
run     - run commands in an environment variable
saveenv - save environment variables to persistent storage
setenv  - set environment variables
sf      - SPI flash sub-system
showvar - print local hushshell variables
sleep   - delay execution for some time
source  - run script from memory
test    - minimal test like /bin/sh
tftpboot- boot image via network using TFTP protocol
true    - do nothing, successfully
usb     - USB sub-system
usbboot - boot from USB device
version - print monitor, compiler and linker version

printenv

Formatted slightly for readability:

arch=arm
baudrate=115200
board=am335x
board_name=A335BNLT
board_rev=0A5C
bootcmd=
  gpio set 53;
  i2c mw 0x24 1 0x3e;
  run findfdt;
  mmc dev 0;
  if mmc rescan ; then
    echo micro SD card found;
    setenv mmcdev 0;
  else
    echo No micro SD card found, setting mmcdev to 1;
    setenv mmcdev 1;
  fi;
  setenv bootpart ${mmcdev}:2;
  mmc dev ${mmcdev};
  if mmc rescan; then
    gpio set 54;
    echo SD/MMC found on device ${mmcdev};
    if run loadbootenv; then
      echo Loaded environment from ${bootenv};
      run importbootenv;
    fi;
    if test -n $uenvcmd; then
      echo Running uenvcmd ...;run uenvcmd;
    fi;
    gpio set 55;
    if run loaduimage; then
      gpio set 56; run loadfdt;run mmcboot;
    fi;
  fi;
bootdelay=1
bootdir=/boot
bootenv=uEnv.txt
bootfile=uImage
bootpart=0:2
console=ttyO0,115200n8
cpu=armv7
dfu_alt_info_emmc=rawemmc mmc 0 3751936
dfu_alt_info_mmc=boot part 0 1;rootfs part 0 2;MLO fat 0 1;MLO.raw mmc 100 100;u-boot.img.raw mmc 300 3C0;u-boot.img fat 0 1;uEnv.txt fat 0 1
dfu_alt_info_nand=SPL part 0 1;SPL.backup1 part 0 2;SPL.backup2 part 0 3;SPL.backup3 part 0 4;u-boot part 0 5;kernel part 0 7;rootfs part 0 8
ethact=cpsw
ethaddr=90:59:af:4b:50:55
fdt_high=0xffffffff
fdtaddr=0x80F80000
fdtfile=am335x-boneblack.dtb
findfdt=if test $board_name = A33515BB; then setenv fdtfile am335x-evm.dtb; fi; if test $board_name = A335X_SK; then setenv fdtfile am335x-evmsk.dtb; fi;if test $board_name = A335BONE; then setenv fdtfile am335x-bone.dtb; fi; if test $board_name = A335BNLT; then setenv fdtfile am335x-boneblack.dtb; fi
importbootenv=echo Importing environment from mmc ...; env import -t $loadaddr $filesize
kloadaddr=0x80007fc0
loadaddr=0x80200000
loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}
loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}
loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz
loaduimage=load mmc ${bootpart} ${kloadaddr} ${bootdir}/${bootfile}
mmcargs=setenv bootargs console=${console} ${optargs} root=${mmcroot} rootfstype=${mmcrootfstype}
mmcboot=echo Booting from mmc ...; run mmcargs; bootm ${kloadaddr} - ${fdtaddr}
mmcdev=0
mmcroot=/dev/mmcblk0p2 ro
mmcrootfstype=ext4 rootwait
mtdids=nand0=omap2-nand.0
mtdparts=mtdparts=omap2-nand.0:128k(SPL),128k(SPL.backup1),128k(SPL.backup2),128k(SPL.backup3),1920k(u-boot),128k(u-boot-env),5m(kernel),-(rootfs)
nandargs=setenv bootargs console=${console} ${optargs} root=${nandroot} rootfstype=${nandrootfstype}
nandboot=echo Booting from nand ...; run nandargs; nand read ${loadaddr} ${nandsrcaddr} ${nandimgsize}; bootm ${loadaddr}
nandimgsize=0x500000
nandroot=ubi0:rootfs rw ubi.mtd=7,2048
nandrootfstype=ubifs rootwait=1
nandsrcaddr=0x280000
netargs=setenv bootargs console=${console} ${optargs} root=/dev/nfs nfsroot=${serverip}:${rootpath},${nfsopts} rw ip=dhcp
netboot=echo Booting from network ...; setenv autoload no; dhcp; tftp ${loadaddr} ${bootfile}; tftp ${fdtaddr} ${fdtfile}; run netargs; bootm ${loadaddr} - ${fdtaddr}
nfsopts=nolock
ramargs=setenv bootargs console=${console} ${optargs} root=${ramroot} rootfstype=${ramrootfstype}
ramboot=echo Booting from ramdisk ...; run ramargs; bootm ${loadaddr} ${rdaddr} ${fdtaddr}
ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=${rdaddr},64M
ramrootfstype=ext2
rdaddr=0x81000000
rootpath=/export/rootfs
soc=am33xx
spiargs=setenv bootargs console=${console} ${optargs} root=${spiroot} rootfstype=${spirootfstype}
spiboot=echo Booting from spi ...; run spiargs; sf probe ${spibusno}:0; sf read ${loadaddr} ${spisrcaddr} ${spiimgsize}; bootm ${loadaddr}
spibusno=0
spiimgsize=0x362000
spiroot=/dev/mtdblock4 rw
spirootfstype=jffs2
spisrcaddr=0xe0000
static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off
stderr=serial
stdin=serial
stdout=serial
usbnet_devaddr=90:59:af:4b:50:55
vendor=ti
ver=U-Boot 2013.04-dirty (Aug 12 2013 - 11:00:00)

The patches

While this might be overkill, I'm going to post the BBB-specific patches applied to U-Boot since I think some of them are educational. I've stripped the headers for brevity -- you can find them all in the U-Boot recipe directory in the meta-beagleboard layer. A number of these can clearly be ignored for a basic classroom build.

Note also that some of them no longer apply to the current Git U-Boot, or need to be applied in different files due to a reorganization of the source and header files.

0001-beaglebone-default-to-beaglebone-black-for-unknown-E.patch

This has changed as the value set now in U-Boot is "undefined\0", not just "\0".

diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index ef00306..2ac89af 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -59,7 +59,7 @@
        "rdaddr=0x81000000\0" \ 
        "bootdir=/boot\0" \
        "bootfile=uImage\0" \
-       "fdtfile=\0" \
+       "fdtfile=am335x-boneblack.dtb\0" \
        "console=ttyO0,115200n8\0" \
        "optargs=\0" \
        "mtdids=" MTDIDS_DEFAULT "\0" \

Clearly BBB-specific and optional given (from that same file):

... snip ...
        "findfdt="\
                "if test $board_name = A335BONE; then " \
                        "setenv fdtfile am335x-bone.dtb; fi; " \
                "if test $board_name = A335BNLT; then " \
                        "setenv fdtfile am335x-boneblack.dtb; fi; " \
                "if test $board_name = A33515BB; then " \
                        "setenv fdtfile am335x-evm.dtb; fi; " \
                "if test $board_name = A335X_SK; then " \
                        "setenv fdtfile am335x-evmsk.dtb; fi; " \
                "if test $fdtfile = undefined; then " \
                        "echo WARNING: Could not determine device tree to use; fi; \0" \
... snip ...

0002-am335x-mux-don-t-hang-on-unknown-EEPROMs-assume-Beag.patch

Again, BBB-specific (and still applicable):

diff --git a/board/ti/am335x/mux.c b/board/ti/am335x/mux.c
index 0283708..ab42011 100644
--- a/board/ti/am335x/mux.c
+++ b/board/ti/am335x/mux.c
@@ -305,7 +305,11 @@ void enable_board_pin_mux(struct am335x_baseboard_id *header)
                configure_module_pin_mux(mmc0_pin_mux);
                configure_module_pin_mux(mmc1_pin_mux);
        } else {
-               puts("Unknown board, cannot configure pinmux.");
-               hang();
+               puts("Unknown board, assuming Beaglebone LT/Black.");
+               /* Beaglebone LT pinmux */
+               configure_module_pin_mux(i2c1_pin_mux);
+               configure_module_pin_mux(mii1_pin_mux);
+               configure_module_pin_mux(mmc0_pin_mux);
+               configure_module_pin_mux(mmc1_pin_mux);
        }
 }

0003-beaglebone-HACK-always-return-1-for-is_bone_lt.patch

This doesn't apply anymore as board_is_bone_lt() has been moved to board.h.

diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
index b371376..c92e1e9 100644
--- a/board/ti/am335x/board.c
+++ b/board/ti/am335x/board.c
@@ -60,7 +60,8 @@ static inline int board_is_bone(void)
                
 static inline int board_is_bone_lt(void)
 {              
-       return !strncmp(header.name, "A335BNLT", HDR_NAME_LEN);
+       //return !strncmp(header.name, "A335BNLT", HDR_NAME_LEN);
+       return 1;
 }              
                
 static inline int board_is_evm_sk(void)
@@ -378,7 +379,7 @@ void s_init(void)
        if (board_is_evm_sk())
                config_ddr(303, MT41J128MJT125_IOCTRL_VALUE, &ddr3_data,
                           &ddr3_cmd_ctrl_data, &ddr3_emif_reg_data, 0);
-       else if (board_is_bone_lt())
+       else if (board_is_bone_lt() && !board_is_bone())
                config_ddr(400, MT41K256M16HA125E_IOCTRL_VALUE,
                           &ddr3_beagleblack_data,
                           &ddr3_beagleblack_cmd_ctrl_data,

0004-beaglebone-HACK-raise-USB-current-limit.patch

This doesn't apply anymore as CONFIG_BOOTCOMMAND has a different definition, but the patch apparently still makes sense.

diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 2ac89af..8de4cc9 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -149,6 +149,7 @@
 #endif
 
 #define CONFIG_BOOTCOMMAND \
+       "i2c mw 0x24 1 0x3e; " \
        "run findfdt; " \
        "mmc dev ${mmcdev}; if mmc rescan; then " \
                "echo SD/MMC found on device ${mmcdev};" \

0005-beaglebone-use-kloadaddr-to-avoid-copying-the-kernel.patch

This patch is explained here.

diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 8de4cc9..14b0a08 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -54,6 +54,7 @@
 #ifndef CONFIG_SPL_BUILD
 #define CONFIG_EXTRA_ENV_SETTINGS \
        "loadaddr=0x80200000\0" \
+       "kloadaddr=0x80007fc0\0" \
        "fdtaddr=0x80F80000\0" \
        "fdt_high=0xffffffff\0" \
        "rdaddr=0x81000000\0" \
@@ -112,11 +113,11 @@
                "root=${ramroot} " \
                "rootfstype=${ramrootfstype}\0" \
        "loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \
-       "loaduimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
+       "loaduimage=load mmc ${bootpart} ${kloadaddr} ${bootdir}/${bootfile}\0" \
        "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
        "mmcboot=echo Booting from mmc ...; " \
                "run mmcargs; " \
-               "bootm ${loadaddr} - ${fdtaddr}\0" \
+               "bootm ${kloadaddr} - ${fdtaddr}\0" \
        "nandboot=echo Booting from nand ...; " \
                "run nandargs; " \
                "nand read ${loadaddr} ${nandsrcaddr} ${nandimgsize}; " \

0006-beaglebone-try-to-load-uEnv-uImage-from-eMMC-first.patch

diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 14b0a08..a21fe8e 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -152,6 +152,24 @@
 #define CONFIG_BOOTCOMMAND \
        "i2c mw 0x24 1 0x3e; " \ 
        "run findfdt; " \
+       "mmc dev 1; if mmc rescan; then " \
+               "echo SD/MMC found on device ${mmcdev};" \
+               "setenv mmcdev 1;"\
+               "if run loadbootenv; then " \
+                       "echo Loaded environment from ${bootenv};" \
+                       "run importbootenv;" \
+               "fi;" \
+               "if test -n $uenvcmd; then " \
+                       "echo Running uenvcmd ...;" \
+                       "run uenvcmd;" \
+               "fi;" \
+               "if run loaduimage; then " \
+                       "run loadfdt;" \
+                       "run mmcboot;" \ 
+               "fi;" \
+       "else " \
+               "echo No SD/MMC found on device ${mmcdev};" \
+       "fi;" \
        "mmc dev ${mmcdev}; if mmc rescan; then " \
                "echo SD/MMC found on device ${mmcdev};" \
                "if run loadbootenv; then " \

0007-beaglebone-Don-t-trigger-uboot-variable-lenght-limit.patch

diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index a21fe8e..9051249 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -152,23 +152,11 @@
 #define CONFIG_BOOTCOMMAND \
        "i2c mw 0x24 1 0x3e; " \
        "run findfdt; " \
-       "mmc dev 1; if mmc rescan; then " \
-               "echo SD/MMC found on device ${mmcdev};" \
+       "if mmc dev 1; then " \
+               "echo eMMC found;" \
                "setenv mmcdev 1;"\
-               "if run loadbootenv; then " \
-                       "echo Loaded environment from ${bootenv};" \
-                       "run importbootenv;" \
-               "fi;" \ 
-               "if test -n $uenvcmd; then " \
-                       "echo Running uenvcmd ...;" \
-                       "run uenvcmd;" \
-               "fi;" \ 
-               "if run loaduimage; then " \
-                       "run loadfdt;" \ 
-                       "run mmcboot;" \
-               "fi;" \ 
        "else " \
-               "echo No SD/MMC found on device ${mmcdev};" \
+               "echo No eMMC found;" \
        "fi;" \
        "mmc dev ${mmcdev}; if mmc rescan; then " \
                "echo SD/MMC found on device ${mmcdev};" \
@@ -184,8 +172,6 @@ 
                        "run loadfdt;" \
                        "run mmcboot;" \
                "fi;" \
-       "else " \
-               "run nandboot;" \
        "fi;" \

0008-beaglebone-HACK-change-mmc-order-to-avoid-u-boot-cra.patch

diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 9051249..8dc3a8a 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -152,11 +152,12 @@
 #define CONFIG_BOOTCOMMAND \
        "i2c mw 0x24 1 0x3e; " \
        "run findfdt; " \
-       "if mmc dev 1; then " \
-               "echo eMMC found;" \
-               "setenv mmcdev 1;"\
+       "mmc dev 0; if mmc rescan ; then " \
+               "echo micro SD card found;" \
+               "setenv mmcdev 0;"\
        "else " \       
-               "echo No eMMC found;" \
+               "echo No micro SD card found, setting mmcdev to 1;" \
+               "setenv mmcdev 1;"\
        "fi;" \         
        "mmc dev ${mmcdev}; if mmc rescan; then " \
                "echo SD/MMC found on device ${mmcdev};" \

0009-beaglebone-update-bootpart-variable-after-mmc-scan.patch

diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 8dc3a8a..489f882 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -159,6 +159,7 @@
                "echo No micro SD card found, setting mmcdev to 1;" \
                "setenv mmcdev 1;"\
        "fi;" \ 
+       "setenv bootpart ${mmcdev}:2;" \
        "mmc dev ${mmcdev}; if mmc rescan; then " \
                "echo SD/MMC found on device ${mmcdev};" \
                "if run loadbootenv; then " \

0010-am335x_evm-enable-gpio-command.patch

This patch is no longer necessary since the GPIO command is defined in ti_armv7_common.h.

diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 489f882..f2838ac 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -43,7 +43,7 @@
 
 /* commands to include */
 #include <config_cmd_default.h>
-       
+#define CONFIG_CMD_GPIO 
 #define CONFIG_CMD_ASKENV
 #define CONFIG_VERSION_VARIABLE
 

0011-am335x_evm-HACK-to-turn-on-BeagleBone-LEDs.patch

The concept behind this patch can be applied, but the command itself is now noticeably different.

diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index f2838ac..9e39d00 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -150,6 +150,7 @@
 #endif
 
 #define CONFIG_BOOTCOMMAND \
+       "gpio set 53; " \
        "i2c mw 0x24 1 0x3e; " \
        "run findfdt; " \
        "mmc dev 0; if mmc rescan ; then " \
@@ -161,6 +162,7 @@
        "fi;" \ 
        "setenv bootpart ${mmcdev}:2;" \
        "mmc dev ${mmcdev}; if mmc rescan; then " \
+               "gpio set 54; " \
                "echo SD/MMC found on device ${mmcdev};" \
                "if run loadbootenv; then " \
                        "echo Loaded environment from ${bootenv};" \
@@ -170,7 +172,9 @@
                        "echo Running uenvcmd ...;" \
                        "run uenvcmd;" \
                "fi;" \
+               "gpio set 55; " \
                "if run loaduimage; then " \
+                       "gpio set 56; " \
                        "run loadfdt;" \
                        "run mmcboot;" \
                "fi;" \

0012-Fix-for-screen-rolling-when-video-played-back-in-bro.patch

diff --git a/arch/arm/cpu/armv7/am33xx/ddr.c b/arch/arm/cpu/armv7/am33xx/ddr.c
index d1e2fd3..3a93db1 100644
--- a/arch/arm/cpu/armv7/am33xx/ddr.c
+++ b/arch/arm/cpu/armv7/am33xx/ddr.c
@@ -21,6 +21,12 @@ http://www.ti.com/
 #include <asm/io.h>
 #include <asm/emif.h> 
        
+/* This value might need some tweaking, but it effectively allows the LCDC */
+/* and the ARM to play fairer in memory, so the LCDC does not get starved causing */
+/* the screen to roll */
+/* See Page 439 in spruh73g (AM33xx TRM) for details */
+#define AM33XX_INT_CONFIG_COUNT 0x00303030
+               
 /**            
  * Base address for EMIF instances
  */                    
@@ -79,6 +85,10 @@ void set_sdram_timings(const struct emif_regs *regs, int nr)
        writel(regs->sdram_tim2, &emif_reg[nr]->emif_sdram_tim_2_shdw);
        writel(regs->sdram_tim3, &emif_reg[nr]->emif_sdram_tim_3);
        writel(regs->sdram_tim3, &emif_reg[nr]->emif_sdram_tim_3_shdw);
+               
+       /* Configure INT_CONFIG value so that LCDC does not get stalled */
+       /* for a long time if ARM is accessing memory */
+       writel(AM33XX_INT_CONFIG_COUNT, &emif_reg[nr]->emif_l3_config);
 }                      
                
 /**

0013-beaglebone-enable-CONFIG_SUPPORT_RAW_INITRD-option.patch

Looks like this patch would go into ti_armv7_common.h instead.

diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 9e39d00..04eaa8b 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -35,6 +35,7 @@
 
 #define CONFIG_OF_LIBFDT
 #define CONFIG_CMD_BOOTZ
+#define CONFIG_SUPPORT_RAW_INITRD
 #define CONFIG_CMDLINE_TAG             /* enable passing of ATAGs */
 #define CONFIG_SETUP_MEMORY_TAGS
 #define CONFIG_INITRD_TAG

0014-mmc-Add-RSTN-enable-for-emmc.patch

diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c
index 7d82469..dcfbf19 100644
--- a/common/cmd_mmc.c
+++ b/common/cmd_mmc.c
@@ -208,6 +208,29 @@ static int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
                        return CMD_RET_USAGE;
                print_mmc_devices('\n');
                return 0;
+       } else if (strncmp(argv[1], "rstn", 4) == 0) {
+               struct mmc *mmc;
+               u8 val;
+               int err;
+
+               if (argc != 3)
+                       return CMD_RET_USAGE;
+
+               val = simple_strtol(argv[2], NULL, 10);
+
+               mmc = find_mmc_device(curr_device);
+               if (!mmc) {
+                       printf("no mmc device at slot %x\n", curr_device);
+                       return 1;
+               }
+               err = mmc_set_rst_n(mmc, val);
+               if (err != 0) {
+                       printf("failed to set RST_N to 0x%02x\n",
+                                       (unsigned int)val & 0xff);
+                       return 1;
+               }
+
+               return 0;
        } else if (strcmp(argv[1], "dev") == 0) {
                int dev, part = -1;
                struct mmc *mmc;
@@ -334,5 +357,6 @@ U_BOOT_CMD(
        "mmc rescan\n"
        "mmc part - lists available partition on current mmc device\n"
        "mmc dev [dev] [part] - show or set current mmc device [partition]\n"
-       "mmc list - lists available devices");
+       "mmc list - lists available devices\n"
+       "mmc rstn - enable hardware reset of emmc");
 #endif
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index f65a7b0..4fffc87 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -1360,6 +1360,38 @@ int get_mmc_num(void)
        return cur_dev_num;
 }

+/* enable hardware reset signal */
+int mmc_set_rst_n(struct mmc *mmc, u8 val)
+{
+       ALLOC_CACHE_ALIGN_BUFFER(u8, ext_csd, 512);
+       int err;
+
+       memset(ext_csd, 0, 512);
+       err = mmc_send_ext_csd(mmc, ext_csd);
+       if (err)
+               return err;
+
+       printf("before: RST_N=0x%02x\n",
+                       (unsigned int)ext_csd[EXT_CSD_RST_N_FUNCTION] & 0xff);
+
+       printf("setting rstn to 0x%02x\n", (unsigned int)val & 0xff);
+
+       err = mmc_switch(mmc, EXT_CSD_CMD_SET_NORMAL,
+                       EXT_CSD_RST_N_FUNCTION, val);
+       if (err)
+               return err;
+
+       memset(ext_csd, 0, 512);
+       err = mmc_send_ext_csd(mmc, ext_csd);
+       if (err)
+               return err;
+
+       printf("after: RST_N=0x%02x\n",
+                       (unsigned int)ext_csd[EXT_CSD_RST_N_FUNCTION] & 0xff);
+
+       return 0;
+}
+
 int mmc_initialize(bd_t *bis)
 {
        INIT_LIST_HEAD (&mmc_devices);
diff --git a/include/mmc.h b/include/mmc.h
index f0d4820..a1fc8c0 100644
--- a/include/mmc.h
+++ b/include/mmc.h
@@ -158,6 +158,7 @@
  * EXT_CSD fields
  */
 #define EXT_CSD_PARTITIONING_SUPPORT   160     /* RO */
+#define EXT_CSD_RST_N_FUNCTION          162     /* R/W */
 #define EXT_CSD_ERASE_GROUP_DEF                175     /* R/W */
 #define EXT_CSD_PART_CONF              179     /* R/W */
 #define EXT_CSD_BUS_WIDTH              183     /* R/W */
@@ -168,6 +169,7 @@
 #define EXT_CSD_HC_ERASE_GRP_SIZE      224     /* RO */
 #define EXT_CSD_BOOT_MULT              226     /* RO */

+
 /*
  * EXT_CSD field definitions
  */
@@ -291,4 +293,6 @@ struct mmc *mmc_spi_init(uint bus, uint cs, uint speed, uint mode);
 int mmc_legacy_init(int verbose);
 #endif

+int mmc_set_rst_n(struct mmc *mmc, u8 val);
+
 #endif /* _MMC_H_ */

0015-workaround-EEPROMs-filled-with-zeroes.patch

diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 04eaa8b..d0ba18e 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -61,6 +61,7 @@
        "rdaddr=0x81000000\0" \
        "bootdir=/boot\0" \
        "bootfile=uImage\0" \
+       "board_name=unknown\0" \
        "fdtfile=am335x-boneblack.dtb\0" \
        "console=ttyO0,115200n8\0" \
        "optargs=\0" \
@@ -139,14 +140,14 @@
                "run ramargs; " \
                "bootm ${loadaddr} ${rdaddr} ${fdtaddr}\0" \
        "findfdt="\
-               "if test $board_name = A335BONE; then " \
-                       "setenv fdtfile am335x-bone.dtb; fi; " \
-               "if test $board_name = A335BNLT; then " \
-                       "setenv fdtfile am335x-boneblack.dtb; fi; " \
                "if test $board_name = A33515BB; then " \
                        "setenv fdtfile am335x-evm.dtb; fi; " \
                "if test $board_name = A335X_SK; then " \
-                       "setenv fdtfile am335x-evmsk.dtb; fi\0" \
+                       "setenv fdtfile am335x-evmsk.dtb; fi;" \
+               "if test $board_name = A335BONE; then " \
+                       "setenv fdtfile am335x-bone.dtb; fi; " \
+               "if test $board_name = A335BNLT; then " \
+                       "setenv fdtfile am335x-boneblack.dtb; fi\0" \
                
 #endif                 
    

Tom Rini's comments on the patches from BB mailing list

In general, looks good.  My main complaint would be given what's upstream (and the Timesys folks just posted some patches to add a 'am335x_boneblack' target that uses eMMC for env), I don't like emphasizing using the vendor tree (but yes, you're within the constraint of the OE layers).

A discussion (especially for explaining how / why) on the factory side of "how do I program the EEPROM, when U-Boot relies on the EEPROM" would be very good.

Looking over the patches, 1, 2 and 3 are "factory programming", along with 15 (the latter half of which doesn't do anything).

4 shouldn't be needed once the series to bump the MPU clock (and voltages) goes in.

5 just won't go upstream

6/9 shouldn't be needed with the Timesys patches.

I don't get 7/8.

I'd like to see 10/13 get posted (it reminds me that I just found CONFIG_CMD_SPI and I'll be turning that on)

11 is useful for diagnostic / classes.

And 12/14 I'd also like to see someone pick up, explain/comment a bit more and post.

Building a stock u-boot for the BBB

Assuming you have a pristine checkout of DENX U-Boot, set up your environment to pull in an appropriate toolchain and:

$ export CROSS_COMPILE=arm-poky-linux-gnueabi-

NOTE that I do not source the environment script that comes with the Yocto toolchain -- there appears to be no need and it appears it screws up the environment by setting LDFLAGS. I do nothing more than make sure the toolchain is part of my PATH and setting CROSS_COMPILE appropriately.

At this point, clean, configure and build:

$ make distclean
$ make am335x_evm_config
Configuring for am335x_evm - Board: am335x_evm, Options: SERIAL1,CONS_INDEX=1
$ make

The results:

$ ls -l MLO
-rw-rw-r-- 1 rpjday rpjday 102364 Aug 13 11:04 MLO
$ ls -l u-boot.img
-rw-rw-r-- 1 rpjday rpjday 356620 Aug 13 11:04 u-boot.img
$

Copy those to bootable SD card and test -- seems to work, with none of the OE-supplied patches. As a lab exercise, get students to add GPIO functionality so LEDs work.

NOTE: It appears that if you want to download the kernel via TFTP, you have to apply the "kloadaddr" patch from above -- I'll verify that when I get the chance.

BBB-specific U-Boot from current Git tree

Overview

It appears that the current Git tree for U-Boot now has a BBB-specific configuration, as you can see in boards.cfg:

... snip ...
am335x_evm                   arm         armv7       am335x              ti             am33xx      am335x_evm:SERIAL1,CONS_INDEX=1,NAND
am335x_evm_nor               arm         armv7       am335x              ti             am33xx      am335x_evm:SERIAL1,CONS_INDEX=1,NAND,NOR
am335x_evm_norboot           arm         armv7       am335x              ti             am33xx      am335x_evm:SERIAL1,CONS_INDEX=1,NOR,NOR_BOOT
am335x_evm_spiboot           arm         armv7       am335x              ti             am33xx      am335x_evm:SERIAL1,CONS_INDEX=1,SPI_BOOT
am335x_evm_uart1             arm         armv7       am335x              ti             am33xx      am335x_evm:SERIAL2,CONS_INDEX=1,NAND
am335x_evm_uart2             arm         armv7       am335x              ti             am33xx      am335x_evm:SERIAL3,CONS_INDEX=1,NAND
am335x_evm_uart3             arm         armv7       am335x              ti             am33xx      am335x_evm:SERIAL4,CONS_INDEX=1,NAND
am335x_evm_uart4             arm         armv7       am335x              ti             am33xx      am335x_evm:SERIAL5,CONS_INDEX=1,NAND
am335x_evm_uart5             arm         armv7       am335x              ti             am33xx      am335x_evm:SERIAL6,CONS_INDEX=1,NAND
am335x_evm_usbspl            arm         armv7       am335x              ti             am33xx      am335x_evm:SERIAL1,CONS_INDEX=1,NAND,SPL_USBETH_SUPPORT
am335x_boneblack             arm         armv7       am335x              ti             am33xx      am335x_evm:SERIAL1,CONS_INDEX=1,EMMC_BOOT
... snip ...

which means that, rather than once upon a time running:

$ make am335x_evm_config

one can now run:

$ make am335x_boneblack_config

Note the important config differences:

  • There is no NAND config, so none of the useless NAND functionality is built in.
  • There is an additional EMMC_BOOT setting which supports writing U-Boot environment info to a "boot" partition on the eMMC, even if you're running off of SD card.

The refactored header files

The header files have now been refactored, so what you have now is:

  • am335x_evm.h, which includes
  • ti_am335x_common.h, which includes
  • ti_armv7_common.h

which is a much more reasonable layout for TI content. It also means you have to locate the appropriate header file depending on what CONFIG settings you want to tweak before building.

I've built a number of images using this setup and all of them have worked.

Saving U-Boot environment to eMMC

Explained at EMMC on the BBB.


(Back to BeagleBone Black page.)

Personal tools