Beagleboard:U-boot partitioning layout 2.0

Goal: to create a more distro friendly default bootloader installed on the BeagleBone Black eMMC.

Based on: https://wiki.linaro.org/Platform/DeviceTreeConsolidation

Starting with u-boot: v2014.07/v2014.10 this will be default:

BeagleBone/BeagleBone Black:

https://github.com/RobertCNelson/Bootloader-Builder/blob/master/patches/v2014.10/0001-am335x_evm-uEnv.txt-bootz-n-fixes.patch

BeagleBoard:

https://github.com/RobertCNelson/Bootloader-Builder/blob/master/patches/v2014.10/0001-omap3_beagle-uEnv.txt-bootz-n-fixes.patch

PandaBoard:

https://github.com/RobertCNelson/Bootloader-Builder/blob/master/patches/v2014.10/0001-omap4_common-uEnv.txt-bootz-n-fixes.patch

omap5_uevm:

https://github.com/RobertCNelson/Bootloader-Builder/blob/master/patches/v2014.10/0001-omap5_common-uEnv.txt-bootz-n-fixes.patch

= Partition layout =

Boot Partition (omap3)
Usually Partition 1, for bootrom's that can only read fat partitions. xMb fat16 (unmounted usually shared as a usb gadget) /MLO (MLO might be hidden) /u-boot.img (u-boot.img might be thrown into ext4) /uEnv.txt (priority 1) (Optional) /boot.scr (priority 2) (Optional, For: debian-installer: flash-kernel) /boot/boot.scr (priority 3) (Optional, For: debian-installer: flash-kernel)

Boot Partition (omap4+ (am335x))
MLO/u-boot: dd'ed to drive: dd if=MLO of=/dev/sdX count=1 seek=1 conv=notrunc bs=128k dd if=u-boot.img of=/dev/sdX count=2 seek=1 conv=notrunc bs=384k

Boot: xMb fat16/ext2 (unmounted usually shared as a usb gadget) /uEnv.txt (priority 1) (Optional) /boot.scr (priority 2) (Optional, For: debian-installer: flash-kernel) /boot/boot.scr (priority 3) (Optional, For: debian-installer: flash-kernel)

Rootfs Partition
This can be partition 1 -> 7 rootfs: / (ext2/ext3/ext4) (btrfs not supported, as we need u-boot support first) /boot/uEnv.txt (priority 4) /boot/vmlinuz-$(uname -r) /boot/initrd.img-$(uname -r) (optional, but needed for uuid cases) /boot/dtbs/$(uname -r)/*.dtb (or one of the 7 locations below)

= u-boot dtb search order = (1) Mainline: /boot/dtbs/$(uname -r)/*.dtb (2) Debian: /usr/lib/linux-image-$(uname -r)/*.dtb (3) Ubuntu: /lib/firmware/$(uname -r)/device-tree/*.dtb (4) Fedora: /boot/dtb-$(uname -r)/*.dtb (5) archlinux: /boot/dtbs/*.dtb (6) openSUSE: /boot/dtb/*.dtb (7) OpenEmbedded: /boot/*.dtb

= uEnv.txt Boot Partition /uEnv.txt = set "uenvcmd" and you have full control

nfs support
https://www.kernel.org/doc/Documentation/filesystems/nfs/nfsroot.txt set "client_ip" and nfsboot will be ran

Other Defaults: server_ip=192.168.1.100 gw_ip=192.168.1.1 netmask=255.255.255.0 hostname= device=eth0 autoconf=off root_dir=/home/userid/targetNFS nfs_options=,vers=3 nfsrootfstype=ext4 rootwait fixrtc

= uEnv.txt Rootfs Partition /boot/uEnv.txt =

Simple: uname_r = $(uname -r)

Optional: dtb = force "other" *.dtb file (Just the file name "device.dtb" no path...) cmdline = stuff passed to command line "quiet" uuid = (needs initrd.img-$(uname -r) in most cases) rootfstype = default(ext4) optargs = default(blank)

= Kernel Updates =

When installing kernel updates, /etc/kernel/postinst.d/zz-uenv_txt will update /boot/uEnv.txt https://github.com/RobertCNelson/omap-image-builder/blob/master/target/other/zz-uenv_txt

Example: sudo apt-get install linux-image-3.8.13-bone60 <...> Setting up linux-image-3.8.13-bone60 (1wheezy) ... update-initramfs: Generating /boot/initrd.img-3.8.13-bone60 zz-uenv_txt: Updating /boot/uEnv.txt [uname_r=3.8.13-bone60]

= Example Image = wget https://rcn-ee.net/deb/testing/2014-09-04/console/bone-debian-7.6-console-armhf-2014-09-04-2gb.img.xz md5sum: e034330fc40de0ceee46c0c986eb9755