Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

siot and updater improvements, set MOUNT_BOOT on all platforms #840

Merged
merged 6 commits into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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