Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
72b6d21
meta-rauc-beaglebone: Increase layer priority
leon-anavi Mar 6, 2026
96c2c77
meta-rauc-beaglebone: Move beaglebone-yocto files
leon-anavi Mar 7, 2026
326a610
rauc-conf.bbappend: Use MACHINE
leon-anavi Mar 7, 2026
47bbf71
rauc_%.bbappend: Support pocketbeagle2
leon-anavi Mar 7, 2026
df99f06
pocketbeagle2: Add sdimage-2part-efi-dual.wks.in
leon-anavi Mar 7, 2026
483d995
images: Use rauc-image.inc
leon-anavi Mar 7, 2026
c478e31
update-bundle: Support different machines
leon-anavi Mar 7, 2026
ca92847
linux-bb.org_%.bbappend: RAUC configuration
leon-anavi Mar 7, 2026
5247bd5
base-files: Support PocketBeagle 2
leon-anavi Mar 7, 2026
a480296
u-boot-bb.org_%.bbappend: Support RAUC
leon-anavi Mar 7, 2026
bdbe429
README.rst: Add PocketBeagle 2
leon-anavi Mar 16, 2026
a160d1b
README.rst: Add meta-rauc-beaglebone
leon-anavi Mar 16, 2026
7bcc978
rauc-image.inc: Support machine beaglebone
leon-anavi Mar 17, 2026
868fbf3
base-files: fstab for beaglebone
leon-anavi Mar 17, 2026
f8cc266
rauc: Support machine beaglebone
leon-anavi Mar 17, 2026
01ad95a
u-boot-bb.org: Support machine beaglebone
leon-anavi Mar 17, 2026
090d15e
meta-rauc-beaglebone/README.rst: PocketBeagle
leon-anavi Mar 17, 2026
6a214d8
base-files: Support BeagleBone AI-64
leon-anavi Mar 19, 2026
1c24be7
rauc-image.inc: Support BeagleBone AI-64
leon-anavi Mar 19, 2026
a751e49
rauc: Support machine beaglebone-ai64
leon-anavi Mar 19, 2026
cc192e0
u-boot-bb.org_%.bbappend: Support BeagleBone AI-64
leon-anavi Mar 19, 2026
6744be1
meta-rauc-beaglebone/README.rst: BeagleBone AI-64
leon-anavi Mar 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ differ in some aspects.

Currently available meta layers are:

* `meta-rauc-beaglebone <https://github.com/rauc/meta-rauc-community/tree/master/meta-rauc-beaglebone>`_:
RAUC demo layer for BeagleBoard devices such BeagleBone Black and PocketBeagle 2 (meta-ti)
* `meta-rauc-nxp <https://github.com/rauc/meta-rauc-community/tree/master/meta-rauc-nxp>`_:
RAUC demo layer for NXP hardware (meta-freescale)
* `meta-rauc-qemuarm <https://github.com/rauc/meta-rauc-community/tree/master/meta-rauc-qemuarm>`_:
Expand Down
13 changes: 10 additions & 3 deletions meta-rauc-beaglebone/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ a much different RAUC/bootloader/system configuration.
Also note that this layer is for demo purpose only and does not care about
migratability between different layer revision.

Currently layer meta-rauc-beaglebone supports:

- BeagleBone Black (machine beaglebone-yocto from meta-yocto-bsp)
- BeagleBone AI-64 (machine beaglebone-ai64 from meta-ti/meta-beagle)
- PocketBeagle (machine beaglebone from meta-ti/meta-beagle)
- PocketBeagle 2 (machine pocketbeagle2 from meta-ti/meta-beagle)

I. Adding the meta-rauc-beaglebone layer to your build
=======================================================

Expand Down Expand Up @@ -63,18 +70,18 @@ It is also recommended, but not strictly necessary, to enable 'systemd'::

Build the minimal system image::

$ bitbake core-image-minimal
$ bitbake core-image-base

III. Flash & Run The Demo System
================================

You can either flash using bmaptool (recommended)::

$ bmaptool copy /path/to/core-image-minimal-beaglebone-yocto.wic.xz /dev/sdX
$ bmaptool copy /path/to/core-image-base-beaglebone-yocto.wic.xz /dev/sdX

or bzcat::

$ bzcat /path/to/core-image-minimal-beaglebone-yocto.wic.xz | dd of=/dev/sdb
$ bzcat /path/to/core-image-base-beaglebone-yocto.wic.xz | dd of=/dev/sdb

Then power-on the board and log in.
To see that RAUC is configured correctly and can interact with the bootloader,
Expand Down
2 changes: 1 addition & 1 deletion meta-rauc-beaglebone/conf/layer.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \

BBFILE_COLLECTIONS += "meta-rauc-beaglebone"
BBFILE_PATTERN_meta-rauc-beaglebone = "^${LAYERDIR}/"
BBFILE_PRIORITY_meta-rauc-beaglebone = "6"
BBFILE_PRIORITY_meta-rauc-beaglebone = "7"

LAYERDEPENDS_meta-rauc-beaglebone = "core rauc yoctobsp"
LAYERSERIES_COMPAT_meta-rauc-beaglebone = "whinlatter"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
test -n "${BOOT_ORDER}" || env set BOOT_ORDER "A B"
test -n "${BOOT_A_LEFT}" || env set BOOT_A_LEFT 3
test -n "${BOOT_B_LEFT}" || env set BOOT_B_LEFT 3

env set bootpart
env set bootdev
env set raucslot

for BOOT_SLOT in "${BOOT_ORDER}"; do
if test "x${bootpart}" != "x"; then
# stop checking after selecting a slot

elif test "x${BOOT_SLOT}" = "xA"; then
if itest ${BOOT_A_LEFT} -gt 0; then
setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1
echo "Booting RAUC slot A"

setenv bootpart "/dev/mmcblk1p2"
setenv raucslot "A"
setenv bootdev "mmc 1:2"
fi

elif test "x${BOOT_SLOT}" = "xB"; then
if itest ${BOOT_B_LEFT} -gt 0; then
setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1
echo "Booting RAUC slot B"

setenv bootpart "/dev/mmcblk1p3"
setenv raucslot "B"
setenv bootdev "mmc 1:3"
fi
fi
done


if test -n "${bootpart}"; then
setenv bootargs "console=${console} ${optargs} root=${bootpart} rw rootfstype=ext4 rootwait fixrtc rauc.slot=${raucslot}"
saveenv
else
echo "No valid RAUC slot found. Resetting attempts to 3"
setenv BOOT_A_LEFT 3
setenv BOOT_B_LEFT 3
saveenv
reset
fi


if mmc dev 1; then

if test ! -e mmc 1:1 /uboot.env; then saveenv; fi;

part uuid ${bootdev} uuid
load ${bootdev} ${loadaddr} /boot/Image
load ${bootdev} ${fdtaddr} /boot/dtb/${fdtfile}
booti ${loadaddr} - ${fdtaddr}
else
echo "Could not find mmc 1"
reset
fi
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
CONFIG_CMD_SETEXPR=y
CONFIG_LEGACY_IMAGE_FORMAT=y
CONFIG_CMD_SETEXPR=y
# CONFIG_ENV_REDUNDANT is not set
CONFIG_ENV_EXT4_INTERFACE="mmc"
CONFIG_ENV_EXT4_DEVICE_AND_PART="1:1"
CONFIG_ENV_EXT4_FILE="/boot/uboot.env"
CONFIG_ENV_OFFSET=0x0000
# CONFIG_ENV_IS_NOWHERE is not set
CONFIG_ENV_IS_IN_FAT=y
CONFIG_ENV_FAT_INTERFACE="mmc"
CONFIG_ENV_FAT_DEVICE_AND_PART="1:1"
CONFIG_ENV_FAT_FILE="uboot.env"
CONFIG_BOOTCOMMAND="load mmc 1:1 $loadaddr boot.scr; source $loadaddr"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/boot/uboot.env 0x0000 0x20000
61 changes: 61 additions & 0 deletions meta-rauc-beaglebone/recipes-bsp/u-boot/files/beaglebone/boot.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
run findfdt;

test -n "${BOOT_ORDER}" || env set BOOT_ORDER "A B"
test -n "${BOOT_A_LEFT}" || env set BOOT_A_LEFT 3
test -n "${BOOT_B_LEFT}" || env set BOOT_B_LEFT 3

env set bootpart
env set bootdev
env set raucslot

for BOOT_SLOT in "${BOOT_ORDER}"; do
if test "x${bootpart}" != "x"; then
# stop checking after selecting a slot

elif test "x${BOOT_SLOT}" = "xA"; then
if itest ${BOOT_A_LEFT} -gt 0; then
setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1
echo "Booting RAUC slot A"

setenv bootpart "/dev/mmcblk0p2"
setenv raucslot "A"
setenv bootdev "mmc 0:2"
fi

elif test "x${BOOT_SLOT}" = "xB"; then
if itest ${BOOT_B_LEFT} -gt 0; then
setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1
echo "Booting RAUC slot B"

setenv bootpart "/dev/mmcblk0p3"
setenv raucslot "B"
setenv bootdev "mmc 0:3"
fi
fi
done


if test -n "${bootpart}"; then
setenv bootargs "console=${console} ${optargs} root=${bootpart} rw rootfstype=ext4 rootwait fixrtc rauc.slot=${raucslot}"
saveenv
else
echo "No valid RAUC slot found. Resetting attempts to 3"
setenv BOOT_A_LEFT 3
setenv BOOT_B_LEFT 3
saveenv
reset
fi


if mmc dev 0; then

if test ! -e mmc 0:1 ${bootdir}/uboot.env; then saveenv; fi;

part uuid ${bootdev} uuid
load mmc 0:1 ${loadaddr} ${bootdir}/zImage
load mmc 0:1 ${fdtaddr} ${bootdir}/${fdtfile}
bootz ${loadaddr} - ${fdtaddr}
else
echo "Could not find mmc 0"
reset
fi
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
CONFIG_CMD_SETEXPR=y
CONFIG_LEGACY_IMAGE_FORMAT=y
CONFIG_BOOTCOMMAND="load mmc 0:1 $loadaddr boot.scr; source $loadaddr"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/boot/uboot.env 0x0000 0x20000
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
run findfdt;

test -n "${BOOT_ORDER}" || env set BOOT_ORDER "A B"
test -n "${BOOT_A_LEFT}" || env set BOOT_A_LEFT 3
test -n "${BOOT_B_LEFT}" || env set BOOT_B_LEFT 3

env set rootpart
env set bootdev
env set raucslot

for BOOT_SLOT in "${BOOT_ORDER}"; do
if test "x${rootpart}" != "x"; then
# stop checking after selecting a slot

elif test "x${BOOT_SLOT}" = "xA"; then
if itest ${BOOT_A_LEFT} -gt 0; then
setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1
echo "Booting RAUC slot A"

setenv rootpart "/dev/mmcblk1p2"
setenv raucslot "A"
setenv bootdev "mmc 1:2"
fi

elif test "x${BOOT_SLOT}" = "xB"; then
if itest ${BOOT_B_LEFT} -gt 0; then
setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1
echo "Booting RAUC slot B"

setenv rootpart "/dev/mmcblk1p3"
setenv raucslot "B"
setenv bootdev "mmc 1:3"
fi
fi
done


if test -n "${rootpart}"; then
setenv args_mmc "run finduuid;setenv bootargs console=${console} ${optargs} root=${rootpart} rauc.slot=${raucslot} rw rootfstype=${mmcrootfstype}"
saveenv
else
echo "No valid RAUC slot found. Resetting attempts to 3"
setenv BOOT_A_LEFT 3
setenv BOOT_B_LEFT 3
saveenv
reset
fi


if mmc dev 1; then
if test ! -e mmc 1:1 ${bootdir}/uboot.env; then saveenv; fi;
run bootcmd_ti_mmc
else
echo "Could not find mmc 1"
reset
fi
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
CONFIG_BOOTDELAY=3
CONFIG_CMD_SETEXPR=y
CONFIG_ENV_EXT4_INTERFACE="mmc"
CONFIG_ENV_EXT4_DEVICE_AND_PART="1:1"
CONFIG_ENV_EXT4_FILE="/boot/uboot.env"
CONFIG_LEGACY_IMAGE_FORMAT=y
CONFIG_ENV_OFFSET=0x0000
# CONFIG_ENV_IS_NOWHERE is not set
CONFIG_ENV_IS_IN_FAT=y
CONFIG_ENV_FAT_INTERFACE="mmc"
CONFIG_ENV_FAT_DEVICE_AND_PART="1:1"
CONFIG_ENV_FAT_FILE="uboot.env"
CONFIG_BOOTCOMMAND="load mmc 1:1 $loadaddr boot.scr; source $loadaddr"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/boot/uboot.env 0x0000 0x1f000
48 changes: 48 additions & 0 deletions meta-rauc-beaglebone/recipes-bsp/u-boot/u-boot-bb.org_%.bbappend
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"

# Explicitly set SRC_URI and UBOOT_ENV variables for supported machines
# to avoid issues caused by meta-ti and MACHINE:append = "-k3r5" that
# result in "No such file or directory" and similar errors.

SRC_URI:append:pocketbeagle2 = " \
file://fw_env.config \
file://boot.cmd \
"

SRC_URI:append:beaglebone-ai64 = " \
file://fw_env.config \
file://boot.cmd \
file://bootcmd-ti-mmc.cfg \
"

SRC_URI:append:beaglebone = " \
file://fw_env.config \
file://boot.cmd \
file://bootcmd-ti-mmc.cfg \
"

# The UBOOT_ENV_SUFFIX and UBOOT_ENV are mandatory in order to run the
# uboot-mkimage command from poky/meta/recipes-bsp/u-boot/u-boot.inc
UBOOT_ENV_SUFFIX:beaglebone = "scr"
UBOOT_ENV:beaglebone = "boot"
UBOOT_ENV_SUFFIX:pocketbeagle2 = "scr"
UBOOT_ENV:pocketbeagle2 = "boot"
UBOOT_ENV_SUFFIX:beaglebone-ai64 = "scr"
UBOOT_ENV:beaglebone-ai64 = "boot"

do_install_fw_env_config() {
install -d ${D}${sysconfdir}
install -m 0644 ${UNPACKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config
}

do_install:append:beaglebone() {
do_install_fw_env_config
}

do_install:append:pocketbeagle2() {
do_install_fw_env_config
}

do_install:append:beaglebone-ai64() {
do_install_fw_env_config
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# stock fstab - you probably want to override this with a machine specific one

/dev/root / auto defaults 1 1
proc /proc proc defaults 0 0
devpts /dev/pts devpts mode=0620,ptmxmode=0666,gid=5 0 0
tmpfs /run tmpfs mode=0755,nodev,nosuid,strictatime 0 0
tmpfs /var/volatile tmpfs defaults 0 0

# uncomment this if your device has a SD/MMC/Transflash slot
#/dev/mmcblk0p1 /media/card auto defaults,sync,noauto 0 0

/dev/mmcblk1p1 /boot vfat defaults 0 0
/dev/mmcblk1p4 /data ext4 defaults 0 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# stock fstab - you probably want to override this with a machine specific one

/dev/root / auto defaults 1 1
proc /proc proc defaults 0 0
devpts /dev/pts devpts mode=0620,ptmxmode=0666,gid=5 0 0
tmpfs /run tmpfs mode=0755,nodev,nosuid,strictatime 0 0
tmpfs /var/volatile tmpfs defaults 0 0

# uncomment this if your device has a SD/MMC/Transflash slot
#/dev/mmcblk0p1 /media/card auto defaults,sync,noauto 0 0

/dev/mmcblk0p1 /boot vfat defaults 0 0
/dev/mmcblk0p4 /data ext4 defaults 0 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# stock fstab - you probably want to override this with a machine specific one

/dev/root / auto defaults 1 1
proc /proc proc defaults 0 0
devpts /dev/pts devpts mode=0620,ptmxmode=0666,gid=5 0 0
tmpfs /run tmpfs mode=0755,nodev,nosuid,strictatime 0 0
tmpfs /var/volatile tmpfs defaults 0 0

# uncomment this if your device has a SD/MMC/Transflash slot
#/dev/mmcblk0p1 /media/card auto defaults,sync,noauto 0 0

/dev/mmcblk1p1 /boot vfat defaults 0 0
/dev/mmcblk1p4 /data ext4 defaults 0 0
6 changes: 3 additions & 3 deletions meta-rauc-beaglebone/recipes-core/bundles/update-bundle.bb
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda

RAUC_BUNDLE_FORMAT = "verity"

RAUC_BUNDLE_COMPATIBLE = "BeagleBoneBlack"
RAUC_BUNDLE_VERSION = "v20240123"
RAUC_BUNDLE_COMPATIBLE = "${MACHINE}"
RAUC_BUNDLE_VERSION = "v20260306"
RAUC_BUNDLE_DESCRIPTION = "RAUC demonstration bundle"
RAUC_BUNDLE_SLOTS = "rootfs"
RAUC_SLOT_rootfs = "core-image-minimal"
RAUC_SLOT_rootfs = "core-image-base"
RAUC_SLOT_rootfs[fstype] = "ext4"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require rauc-image.inc
Original file line number Diff line number Diff line change
@@ -1,9 +1 @@
IMAGE_FSTYPES += "wic wic.xz wic.bmap ext4"
WKS_FILE = "beaglebone-yocto-dual.wks.in"
IMAGE_BOOT_FILES += " boot.scr"

# Optimizations for RAUC adaptive method 'block-hash-index'
# rootfs image size must to be 4K-aligned
IMAGE_ROOTFS_ALIGNMENT = "4"
# ext4 block and inode size should be set to 4K
EXTRA_IMAGECMD:ext4 = "-i 4096 -b 4096"
require rauc-image.inc
Loading
Loading