Skip to content

Commit d0a0ae2

Browse files
Merge pull request #639 from balena-os/alexgg/partconf
Guarantee to boot from the boot0 mmc partition
2 parents d416138 + a5e40ae commit d0a0ae2

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

.github/workflows/iot-gate-imx8-sb.yml

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ jobs:
5050
secrets: inherit
5151
with:
5252
machine: iot-gate-imx8
53+
slug: iot-gate-imx8-sb
5354
build-args: '--templates-path layers/meta-balena-hab'
5455
# worker_type defaults to testbot
5556
# worker_fleets defaults to balena/testbot-rig,balena/testbot-rig-partners,balena/testbot-rig-x86,balena/testbot-rig-partners-x86

layers/meta-balena-imx8mm/recipes-support/hostapp-update-hooks/files/99-flash-bootloader

+4-2
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,11 @@ for i in $update_files; do
3333

3434
if [ ! "$existing_md5sum" = "$update_md5sum" ]; then
3535
echo "Flashing $current_update_file to $device"
36-
echo 0 > /sys/block/mmcblk2boot0/force_ro
36+
echo 0 > /sys/block/mmcblk2boot0/force_ro
3737
dd if=/resin-boot/$current_update_file of=$device conv=fdatasync seek=$seek_blocks bs=$block_size
38-
echo 1 > /sys/block/mmcblk2boot0/force_ro
38+
echo 1 > /sys/block/mmcblk2boot0/force_ro
39+
# Make sure to configure the eMMC to boot from the boot0 partition
40+
mmc bootpart enable 1 0 ${device%boot0}
3941
fi
4042
done
4143

Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
FILESEXTRAPATHS:append := "${THISDIR}/${PN}"
2+
3+
RDEPENDS:${PN} += "mmc-utils"

layers/meta-balena-imx8mm/recipes-support/resin-init/resin-init-flasher-board/resin-init-flasher-board

+2
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@ uboot_device="/dev/mmcblk2boot0"
1515
echo 0 > /sys/block/mmcblk2boot0/force_ro
1616
dd if=/mnt/boot/$uboot_file of=$uboot_device conv=fdatasync seek=$uboot_seek_blocks bs=$uboot_block_size
1717
echo 1 > /sys/block/mmcblk2boot0/force_ro
18+
# Make sure to configure the eMMC to boot from the boot0 partition
19+
mmc bootpart enable 1 0 ${uboot_device%boot0}

0 commit comments

Comments
 (0)