Skip to content

Commit

Permalink
balena-image-flasher: Added beagleplay support.
Browse files Browse the repository at this point in the history
Updated the balena-image-flasher and associated dependent recipes to support building a balena-image-flasher image for the beagleplay device.

Changelog-entry: Add beagleplay support
Signed-off-by: Sidd Gupta <[email protected]>
  • Loading branch information
delhiryder authored and floion committed Jun 20, 2024
1 parent b0560b8 commit 7df302a
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
include balena-image.inc

BALENA_BOOT_PARTITION_FILES:append:beaglebone = " uEnv.txt_internal:"

IMAGE_INSTALL:append:beaglebone = " bb-org-overlays"
IMAGE_INSTALL:append:beaglebone-ai64 = " mmc-utils vxd-dec-fw"
IMAGE_INSTALL:append:beagleplay = " mmc-utils"
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/sh

#
# Script used by hostapps updater to flash bootloader onto internal media.
#

set -o errexit

# The following lines of code are copied from
# https://openbeagle.org/beagleboard/repos-arm64/-/blob/main/bb-u-boot-beagleplay-debian-12/suite/bookworm/debian/install-emmc.sh?ref_type=heads

if [ -b /dev/mmcblk0 ] ; then
#mmc extcsd read /dev/mmcblk0
mmc bootpart enable 1 2 /dev/mmcblk0
mmc bootbus set single_backward x1 x8 /dev/mmcblk0
mmc hwreset enable /dev/mmcblk0 | true

echo "Clearing eMMC boot0"

echo '0' >> /sys/class/block/mmcblk0boot0/force_ro

echo "dd if=/dev/zero of=/dev/mmcblk0boot0 count=32 bs=128k"
dd if=/dev/zero of=/dev/mmcblk0boot0 count=32 bs=128k

echo "dd if=/resin-boot/tiboot3.bin of=/dev/mmcblk0boot0 bs=128k"
dd if=/resin-boot/tiboot3.bin of=/dev/mmcblk0boot0 bs=128k
fi

sync

echo 1 > /sys/block/mmcblk0boot0/force_ro
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ FILESEXTRAPATHS:append := ":${THISDIR}/files"

HOSTAPP_HOOKS += "99-resin-uboot"

HOSTAPP_HOOKS:append:beaglebone-ai64 = " 99-flash-bootloader-beaglebone-ai64"
HOSTAPP_HOOKS:append:beaglebone-ai64 = " 99-flash-bootloader-beaglebone-ai64"
HOSTAPP_HOOKS:append:beagleplay = " 99-flash-bootloader-beagleplay"
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@ INTERNAL_DEVICE_KERNEL:beaglebone = "mmcblk1"
# Except on the beaglebone-ai64
INTERNAL_DEVICE_KERNEL:beaglebone-ai64 = "mmcblk0"

# Because eMMC enumeration on the beagpleplay is different from other Beaglebone devices (?)
INTERNAL_DEVICE_KERNEL:beagleplay = "mmcblk0"

# the name of the bootloader config file to be written to internal media
INTERNAL_DEVICE_BOOTLOADER_CONFIG:beaglebone = "uEnv.txt_internal"
INTERNAL_DEVICE_BOOTLOADER_CONFIG:beagleplay = "uEnv.txt_internal"

# the pathname (relative to /boot/) where the internal bootloader config file should reside in
# (currently assuming this is on partition 1 of the internal media)
INTERNAL_DEVICE_BOOTLOADER_CONFIG_PATH:beaglebone = "/uEnv.txt"
INTERNAL_DEVICE_BOOTLOADER_CONFIG_PATH:beagleplay = "/uEnv.txt"

0 comments on commit 7df302a

Please sign in to comment.