u-boot-dey: altboot: remove the 'altboot' script for all platforms
All the 'altboot' script functionality has been moved directly to the 'altbootcmd' command in U-Boot, so this script is no longer necessary. Remove it for all platforms. https://onedigi.atlassian.net/browse/DEL-8674 Signed-off-by: David Escalona <david.escalona@digi.com>
This commit is contained in:
parent
a26c96e35f
commit
3c9384a99c
|
|
@ -85,7 +85,7 @@ DEY_SELINUX_POLICY ?= "1"
|
||||||
|
|
||||||
# U-Boot scripts to include in 'linux' partition
|
# U-Boot scripts to include in 'linux' partition
|
||||||
# (use the '+=' operator, since other layers may append scripts to this list)
|
# (use the '+=' operator, since other layers may append scripts to this list)
|
||||||
BOOT_SCRIPTS += "boot.scr:boot.scr altboot.scr:altboot.scr"
|
BOOT_SCRIPTS += "boot.scr:boot.scr"
|
||||||
|
|
||||||
# This can be used to enable U-Boot update through swupdate
|
# This can be used to enable U-Boot update through swupdate
|
||||||
SWUPDATE_UBOOTIMG ?= "false"
|
SWUPDATE_UBOOTIMG ?= "false"
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,6 @@ INSTALL_FW_UBOOT_SCRIPTS = " \
|
||||||
|
|
||||||
SRC_URI = " \
|
SRC_URI = " \
|
||||||
${UBOOT_GIT_URI};branch=${SRCBRANCH} \
|
${UBOOT_GIT_URI};branch=${SRCBRANCH} \
|
||||||
file://altboot.txt \
|
|
||||||
file://boot.txt \
|
file://boot.txt \
|
||||||
${INSTALL_FW_UBOOT_SCRIPTS} \
|
${INSTALL_FW_UBOOT_SCRIPTS} \
|
||||||
"
|
"
|
||||||
|
|
@ -96,9 +95,6 @@ build_uboot_scripts() {
|
||||||
mkimage -T script -n bootscript -C none -d ${TMP_BOOTSCR} ${DEPLOYDIR}/boot.scr
|
mkimage -T script -n bootscript -C none -d ${TMP_BOOTSCR} ${DEPLOYDIR}/boot.scr
|
||||||
rm -f ${TMP_BOOTSCR}
|
rm -f ${TMP_BOOTSCR}
|
||||||
|
|
||||||
# Alternate boot script for dualboot
|
|
||||||
mkimage -T script -n "Alternate bootscript" -C none -d ${WORKDIR}/altboot.txt ${DEPLOYDIR}/altboot.scr
|
|
||||||
|
|
||||||
# Sign the scripts (TODO signing of artifacts for STM-based platforms)
|
# Sign the scripts (TODO signing of artifacts for STM-based platforms)
|
||||||
if [ "${TRUSTFENCE_SIGN}" = "1" ] && [ "${DEY_SOC_VENDOR}" != "STM" ]; then
|
if [ "${TRUSTFENCE_SIGN}" = "1" ] && [ "${DEY_SOC_VENDOR}" != "STM" ]; then
|
||||||
export CONFIG_SIGN_KEYS_PATH="${TRUSTFENCE_SIGN_KEYS_PATH}"
|
export CONFIG_SIGN_KEYS_PATH="${TRUSTFENCE_SIGN_KEYS_PATH}"
|
||||||
|
|
@ -109,11 +105,6 @@ build_uboot_scripts() {
|
||||||
TMP_SIGNED_BOOTSCR="$(mktemp ${WORKDIR}/bootscr-signed.XXXXXX)"
|
TMP_SIGNED_BOOTSCR="$(mktemp ${WORKDIR}/bootscr-signed.XXXXXX)"
|
||||||
trustfence-sign-artifact.sh -p "${DIGI_SOM}" -b "${DEPLOYDIR}/boot.scr" "${TMP_SIGNED_BOOTSCR}"
|
trustfence-sign-artifact.sh -p "${DIGI_SOM}" -b "${DEPLOYDIR}/boot.scr" "${TMP_SIGNED_BOOTSCR}"
|
||||||
mv "${TMP_SIGNED_BOOTSCR}" "${DEPLOYDIR}/boot.scr"
|
mv "${TMP_SIGNED_BOOTSCR}" "${DEPLOYDIR}/boot.scr"
|
||||||
|
|
||||||
# Sign altboot script
|
|
||||||
TMP_SIGNED_BOOTSCR="$(mktemp ${WORKDIR}/altboot-signed.XXXXXX)"
|
|
||||||
trustfence-sign-artifact.sh -p "${DIGI_SOM}" -b "${DEPLOYDIR}/altboot.scr" "${TMP_SIGNED_BOOTSCR}"
|
|
||||||
mv "${TMP_SIGNED_BOOTSCR}" "${DEPLOYDIR}/altboot.scr"
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,37 +0,0 @@
|
||||||
#
|
|
||||||
# U-Boot bootscript for altbootcmd (dual boot fallback after retries)
|
|
||||||
#
|
|
||||||
|
|
||||||
# After an upgrade, active_system has changed. U-Boot tries to boot this system
|
|
||||||
# for a number of tries. If the limit is reached, altbootcmd is run instead.
|
|
||||||
# This is the script that it will run. It has to:
|
|
||||||
# * switch back to previous system
|
|
||||||
# * reset the firmware update flag
|
|
||||||
# * run the regular boot command
|
|
||||||
|
|
||||||
if test "${dualboot}" = "yes" && test "${upgrade_available}" = "1"; then
|
|
||||||
if test "${active_system}" = "linux_a"; then
|
|
||||||
setenv active_system linux_b
|
|
||||||
part number mmc ${mmcbootdev} linux_b linux_b_index
|
|
||||||
setexpr mmcpart ${linux_b_index}
|
|
||||||
# Save the partition index on variable rootfs_b_index
|
|
||||||
part number mmc ${mmcbootdev} rootfs_b rootfs_b_index
|
|
||||||
# Save the rootfs_b UUID into mmcroot_b
|
|
||||||
part uuid mmc ${mmcbootdev}:${rootfs_b_index} mmcroot_b
|
|
||||||
setenv mmcroot PARTUUID=${mmcroot_b}
|
|
||||||
else
|
|
||||||
setenv active_system linux_a
|
|
||||||
part number mmc ${mmcbootdev} linux_a linux_a_index
|
|
||||||
setexpr mmcpart ${linux_a_index}
|
|
||||||
# Save the partition index on variable rootfs_a_index
|
|
||||||
part number mmc ${mmcbootdev} rootfs_a rootfs_a_index
|
|
||||||
# Save the rootfs_a UUID into mmcroot_a
|
|
||||||
part uuid mmc ${mmcbootdev}:${rootfs_a_index} mmcroot_a
|
|
||||||
setenv mmcroot PARTUUID=${mmcroot_a}
|
|
||||||
fi
|
|
||||||
setenv upgrade_available
|
|
||||||
setenv bootcount 0
|
|
||||||
saveenv
|
|
||||||
echo "## System boot failed; Switching active partitions bank to ${active_system}..."
|
|
||||||
fi
|
|
||||||
run bootcmd
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
||||||
#
|
|
||||||
# U-Boot bootscript for altbootcmd (boot fallback after N failed boot retries)
|
|
||||||
#
|
|
||||||
|
|
||||||
# U-Boot tries to boot the active system for a number of tries. If the limit
|
|
||||||
# is reached, altbootcmd is run instead. This is the script that it will run.
|
|
||||||
# It has to:
|
|
||||||
# * switch active partitions bank in case of dual boot systems
|
|
||||||
# * reset the 'bootcount' number
|
|
||||||
# * reboot the system
|
|
||||||
|
|
||||||
if test "${dualboot}" = "yes"; then
|
|
||||||
if test "${active_system}" = "linux_a"; then
|
|
||||||
setenv active_system linux_b
|
|
||||||
setenv mtdbootpart ${active_system}
|
|
||||||
setenv mtdrootfspart ${rootfsvol_b}
|
|
||||||
setenv rootfsvol ${rootfsvol_b}
|
|
||||||
else
|
|
||||||
setenv active_system linux_a
|
|
||||||
setenv mtdbootpart ${active_system}
|
|
||||||
setenv mtdrootfspart ${rootfsvol_a}
|
|
||||||
setenv rootfsvol ${rootfsvol_a}
|
|
||||||
fi
|
|
||||||
saveenv
|
|
||||||
echo "## System boot failed; Switching active partitions bank to ${active_system}..."
|
|
||||||
fi
|
|
||||||
bootcount reset
|
|
||||||
reset
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
||||||
#
|
|
||||||
# U-Boot bootscript for altbootcmd (boot fallback after N failed boot retries)
|
|
||||||
#
|
|
||||||
|
|
||||||
# U-Boot tries to boot the active system for a number of tries. If the limit
|
|
||||||
# is reached, altbootcmd is run instead. This is the script that it will run.
|
|
||||||
# It has to:
|
|
||||||
# * switch active partitions bank in case of dual boot systems
|
|
||||||
# * reset the 'bootcount' number
|
|
||||||
# * reboot the system
|
|
||||||
|
|
||||||
if test "${dualboot}" = "yes"; then
|
|
||||||
if test "${active_system}" = "linux_a"; then
|
|
||||||
setenv active_system linux_b
|
|
||||||
part number mmc ${mmcbootdev} linux_b linux_b_index
|
|
||||||
setexpr mmcpart ${linux_b_index}
|
|
||||||
# Save the partition index on variable rootfs_b_index
|
|
||||||
part number mmc ${mmcbootdev} rootfs_b rootfs_b_index
|
|
||||||
# Save the rootfs_b UUID into mmcroot_b
|
|
||||||
part uuid mmc ${mmcbootdev}:${rootfs_b_index} mmcroot_b
|
|
||||||
setenv mmcroot PARTUUID=${mmcroot_b}
|
|
||||||
else
|
|
||||||
setenv active_system linux_a
|
|
||||||
part number mmc ${mmcbootdev} linux_a linux_a_index
|
|
||||||
setexpr mmcpart ${linux_a_index}
|
|
||||||
# Save the partition index on variable rootfs_a_index
|
|
||||||
part number mmc ${mmcbootdev} rootfs_a rootfs_a_index
|
|
||||||
# Save the rootfs_a UUID into mmcroot_a
|
|
||||||
part uuid mmc ${mmcbootdev}:${rootfs_a_index} mmcroot_a
|
|
||||||
setenv mmcroot PARTUUID=${mmcroot_a}
|
|
||||||
fi
|
|
||||||
saveenv
|
|
||||||
echo "## System boot failed; Switching active partitions bank to ${active_system}..."
|
|
||||||
fi
|
|
||||||
bootcount reset
|
|
||||||
reset
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
||||||
#
|
|
||||||
# U-Boot bootscript for altbootcmd (boot fallback after N failed boot retries)
|
|
||||||
#
|
|
||||||
|
|
||||||
# U-Boot tries to boot the active system for a number of tries. If the limit
|
|
||||||
# is reached, altbootcmd is run instead. This is the script that it will run.
|
|
||||||
# It has to:
|
|
||||||
# * switch active partitions bank in case of dual boot systems
|
|
||||||
# * reset the 'bootcount' number
|
|
||||||
# * reboot the system
|
|
||||||
|
|
||||||
if test "${dualboot}" = "yes"; then
|
|
||||||
if test "${active_system}" = "linux_a"; then
|
|
||||||
setenv active_system linux_b
|
|
||||||
part number mmc ${mmcbootdev} linux_b linux_b_index
|
|
||||||
setexpr mmcpart ${linux_b_index}
|
|
||||||
# Save the partition index on variable rootfs_b_index
|
|
||||||
part number mmc ${mmcbootdev} rootfs_b rootfs_b_index
|
|
||||||
# Save the rootfs_b UUID into mmcroot_b
|
|
||||||
part uuid mmc ${mmcbootdev}:${rootfs_b_index} mmcroot_b
|
|
||||||
setenv mmcroot PARTUUID=${mmcroot_b}
|
|
||||||
else
|
|
||||||
setenv active_system linux_a
|
|
||||||
part number mmc ${mmcbootdev} linux_a linux_a_index
|
|
||||||
setexpr mmcpart ${linux_a_index}
|
|
||||||
# Save the partition index on variable rootfs_a_index
|
|
||||||
part number mmc ${mmcbootdev} rootfs_a rootfs_a_index
|
|
||||||
# Save the rootfs_a UUID into mmcroot_a
|
|
||||||
part uuid mmc ${mmcbootdev}:${rootfs_a_index} mmcroot_a
|
|
||||||
setenv mmcroot PARTUUID=${mmcroot_a}
|
|
||||||
fi
|
|
||||||
saveenv
|
|
||||||
echo "## System boot failed; Switching active partitions bank to ${active_system}..."
|
|
||||||
fi
|
|
||||||
bootcount reset
|
|
||||||
reset
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
||||||
#
|
|
||||||
# U-Boot bootscript for altbootcmd (boot fallback after N failed boot retries)
|
|
||||||
#
|
|
||||||
|
|
||||||
# U-Boot tries to boot the active system for a number of tries. If the limit
|
|
||||||
# is reached, altbootcmd is run instead. This is the script that it will run.
|
|
||||||
# It has to:
|
|
||||||
# * switch active partitions bank in case of dual boot systems
|
|
||||||
# * reset the 'bootcount' number
|
|
||||||
# * reboot the system
|
|
||||||
|
|
||||||
if test "${dualboot}" = "yes"; then
|
|
||||||
if test "${active_system}" = "linux_a"; then
|
|
||||||
setenv active_system linux_b
|
|
||||||
part number mmc ${mmcbootdev} linux_b linux_b_index
|
|
||||||
setexpr mmcpart ${linux_b_index}
|
|
||||||
# Save the partition index on variable rootfs_b_index
|
|
||||||
part number mmc ${mmcbootdev} rootfs_b rootfs_b_index
|
|
||||||
# Save the rootfs_b UUID into mmcroot_b
|
|
||||||
part uuid mmc ${mmcbootdev}:${rootfs_b_index} mmcroot_b
|
|
||||||
setenv mmcroot PARTUUID=${mmcroot_b}
|
|
||||||
else
|
|
||||||
setenv active_system linux_a
|
|
||||||
part number mmc ${mmcbootdev} linux_a linux_a_index
|
|
||||||
setexpr mmcpart ${linux_a_index}
|
|
||||||
# Save the partition index on variable rootfs_a_index
|
|
||||||
part number mmc ${mmcbootdev} rootfs_a rootfs_a_index
|
|
||||||
# Save the rootfs_a UUID into mmcroot_a
|
|
||||||
part uuid mmc ${mmcbootdev}:${rootfs_a_index} mmcroot_a
|
|
||||||
setenv mmcroot PARTUUID=${mmcroot_a}
|
|
||||||
fi
|
|
||||||
saveenv
|
|
||||||
echo "## System boot failed; Switching active partitions bank to ${active_system}..."
|
|
||||||
fi
|
|
||||||
bootcount reset
|
|
||||||
reset
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
#
|
|
||||||
# U-Boot bootscript for altbootcmd (boot fallback after N failed boot retries)
|
|
||||||
#
|
|
||||||
|
|
||||||
# U-Boot tries to boot the active system for a number of tries. If the limit
|
|
||||||
# is reached, altbootcmd is run instead. This is the script that it will run.
|
|
||||||
# It has to:
|
|
||||||
# * switch active partitions bank in case of dual boot systems
|
|
||||||
# * reset the 'bootcount' number
|
|
||||||
# * reboot the system
|
|
||||||
|
|
||||||
if test "${dualboot}" = "yes"; then
|
|
||||||
if test "${active_system}" = "linux_a"; then
|
|
||||||
setenv active_system linux_b
|
|
||||||
setenv mtdbootpart ${active_system}
|
|
||||||
setenv rootfsvol ${rootfsvol_b}
|
|
||||||
else
|
|
||||||
setenv active_system linux_a
|
|
||||||
setenv mtdbootpart ${active_system}
|
|
||||||
setenv rootfsvol ${rootfsvol_a}
|
|
||||||
fi
|
|
||||||
saveenv
|
|
||||||
echo "## System boot failed; Switching active partitions bank to ${active_system}..."
|
|
||||||
fi
|
|
||||||
bootcount reset
|
|
||||||
reset
|
|
||||||
Loading…
Reference in New Issue