Skip to content

Commit

Permalink
Merge pull request #840 from YoeDistro/cbrake/master
Browse files Browse the repository at this point in the history
siot and updater improvements, set MOUNT_BOOT on all platforms
  • Loading branch information
cbrake authored Sep 14, 2023
2 parents 14aaf00 + 45064fc commit 2c5c16e
Show file tree
Hide file tree
Showing 12 changed files with 48 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ DEPENDS += "go-native elm-binary-native nodejs-native curl-native ca-certificate

inherit systemd update-rc.d goarch

SRCREV = "503b9abd1df451f7def490173667bd82e61a7850"
SRCREV = "79a514fc2749257c30a9aef26bdb64e636c7e0f4"

BRANCH ?= "master"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ OVERLAY_TYPE=persistent
# which is used by volatile-binds during main rootfs boot
PERSISTENT_BINDS=""

MOUNT_BOOT=1

plat_init() {
msg "Running $PLAT initializations ..."
cat /proc/cpuinfo | grep Revision | cut -d' ' -f 2 > /etc/hwrevision
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ IMX_BOOT_SEEK=32

# Space separated list of dirs to create in /data
# which is used by volatile-binds during main rootfs boot
PERSISTENT_BINDS="/etc/ssh"
PERSISTENT_BINDS=""

MOUNT_BOOT=1

plat_init() {
msg "Running $PLAT initializations ..."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ IMX_BOOT_SEEK=32

# Space separated list of dirs to create in /data
# which is used by volatile-binds during main rootfs boot
PERSISTENT_BINDS="/etc/ssh"
PERSISTENT_BINDS=""

MOUNT_BOOT=1

plat_init() {
msg "Running $PLAT initializations ..."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ IMX_BOOT_SEEK=32

# Space separated list of dirs to create in /data
# which is used by volatile-binds during main rootfs boot
PERSISTENT_BINDS="/etc/ssh"
PERSISTENT_BINDS=""

MOUNT_BOOT=1

plat_init() {
msg "Running $PLAT initializations ..."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,13 @@ BOOT_FSTYPE=vfat
UPDATER_SPEECH=0
UPDATER_CAN_PARTITION=0
# OVERLAY_TYPE is one of 'tmpfs' or 'persistent'
OVERLAY_TYPE=persistent
# OVERLAY_TYPE=persistent
# Space separated list of dirs to create in /data
# which is used by volatile-binds during main rootfs boot
PERSISTENT_BINDS=""

MOUNT_BOOT=1

plat_init() {
msg "Running $PLAT initializations ..."
cat /proc/cpuinfo | grep Revision | cut -d' ' -f 2 > /etc/hwrevision
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ OVERLAY_TYPE=persistent
# which is used by volatile-binds during main rootfs boot
PERSISTENT_BINDS=""

MOUNT_BOOT=1

plat_init() {
msg "Running $PLAT initializations ..."
cat /proc/cpuinfo | grep Revision | cut -d' ' -f 2 > /etc/hwrevision
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ OVERLAY_TYPE=persistent
# which is used by volatile-binds during main rootfs boot
PERSISTENT_BINDS=""

MOUNT_BOOT=1

plat_init() {
msg "Running $PLAT initializations ..."
cat /proc/cpuinfo | grep Revision | cut -d' ' -f 2 > /etc/hwrevision
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ OVERLAY_TYPE=persistent
# which is used by volatile-binds during main rootfs boot
PERSISTENT_BINDS=""

MOUNT_BOOT=1

plat_init() {
msg "Running $PLAT initializations ..."
cat /proc/cpuinfo | grep Revision | cut -d' ' -f 2 > /etc/hwrevision
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ OVERLAY_TYPE=persistent
# which is used by volatile-binds during main rootfs boot
PERSISTENT_BINDS=""

MOUNT_BOOT=1

plat_init() {
msg "Running $PLAT initializations ..."
cat /proc/cpuinfo | grep Revision | cut -d' ' -f 2 > /etc/hwrevision
Expand Down
26 changes: 22 additions & 4 deletions sources/meta-yoe/recipes-support/updater/files/updater.installer
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

VERSION=20.5
VERSION=21.3

. ./platform

Expand Down Expand Up @@ -71,7 +71,6 @@ msg_splash() {
rescue_shell() {
msg "$@"
msg "Something went wrong. Dropping you to a shell."
busybox --install -s
exec /bin/sh
}

Expand Down Expand Up @@ -348,7 +347,12 @@ mount_rootfs_sd() {
fi
fi

#mount_boot /mnt/boot $SD_BOOT_DEV
if [ "$MOUNT_BOOT" = "1" ]; then
msg_splash "mounting boot"
mount_boot /mnt/boot $SD_BOOT_DEV
mount -n --move /mnt/boot $FINAL_ROOTFS/boot
fi

mount_data /mnt/data $SD_DATA_DEV
if [ "$OVERLAY_TYPE" = "persistent" ]; then
msg_splash "Mounting filesystem overlay on data partition"
Expand All @@ -371,7 +375,12 @@ mount_rootfs_emmc() {
fi
fi

#mount_boot /mnt/boot $EMMC_BOOT_DEV
if [ "$MOUNT_BOOT" = "1" ]; then
msg_splash "mounting boot"
mount_boot /mnt/boot $EMMC_BOOT_DEV
mount -n --move /mnt/boot $FINAL_ROOTFS/boot
fi

mount_data /mnt/data $EMMC_DATA_DEV
if [ "$OVERLAY_TYPE" = "persistent" ]; then
msg_splash "Mounting filesystem overlay on data partition"
Expand Down Expand Up @@ -500,7 +509,14 @@ find_update_file() {
cd - >/dev/null
}

check_rescue_shell() {
if [ -f $1/rescue-shell ]; then
rescue_shell
fi
}

update_from_usb() {
check_rescue_shell $USB_MOUNT_POINT
update_file=$(find_update_file $USB_MOUNT_POINT)
if [ "$update_file" != "" ]; then
speak "updater, found u s b disk"
Expand All @@ -522,6 +538,7 @@ update_from_usb() {
}

update_from_sd() {
check_rescue_shell $SD_MOUNT_POINT
update_file=$(find_update_file $SD_MOUNT_POINT)
if [ "$update_file" != "" ]; then
speak "update found on S D card"
Expand All @@ -543,6 +560,7 @@ update_from_sd() {
}

update_from_data() {
check_rescue_shell $DATA_MOUNT_POINT
update_file=$(find_update_file $DATA_MOUNT_POINT)
if [ "$update_file" != "" ]; then
speak "update found on data partition"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ UPDATER_CAN_PARTITION=0

# Space separated list of dirs to create in /data
# which is used by volatile-binds during main rootfs boot
PERSISTENT_BINDS="/etc/ssh"
PERSISTENT_BINDS=""

MOUNT_BOOT=1

plat_init() {
msg "Running $PLAT initializations ..."
Expand Down

0 comments on commit 2c5c16e

Please sign in to comment.