Skip to content
Snippets Groups Projects
Commit 08f2b974 authored by Tobias Kahlki's avatar Tobias Kahlki
Browse files

[machine][tanaro] Removed RAUC boot script

The RAUC boot script has been replaced by boot script for SysData.
See meta-seco-edgehog/recipes-bsp/u-boot.
parent cba7993a
No related branches found
No related tags found
1 merge request!13[machine][tanaro] Fixed protocol and branch for BT driver
......@@ -2,23 +2,20 @@
# SPDX-License-Identifier: Apache
#
DESCRIPTION = "i.MX bootfiles for SECO boards"
DESCRIPTION = "Bootfiles for SECO Northern Europe HMIs"
HOMEPAGE = "https://www.seco.com"
SECTION = "BSP"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
inherit deploy
DEPENDS += "u-boot-mkimage-native"
RPROVIDES:${PN} += " boot.cfg boot.scr rauc_boot.scr "
PROVIDES += " boot.cfg boot.scr rauc_boot.scr "
RPROVIDES:${PN} += " boot.cfg boot.scr "
PROVIDES += " boot.cfg boot.scr "
SRC_URI = " \
file://boot.cfg \
file://boot.scr.sh \
file://rauc_boot.scr.sh \
"
do_configure() {
......@@ -28,14 +25,12 @@ do_configure() {
do_compile() {
mkimage -A arm -T script -O linux -d ${WORKDIR}/boot.scr.sh ${WORKDIR}/boot.scr
mkimage -A arm -T script -O linux -d ${WORKDIR}/rauc_boot.scr.sh ${WORKDIR}/rauc_boot.scr
}
do_install() {
install -d ${D}/boot
install -m 0644 ${WORKDIR}/boot.cfg ${D}/boot/boot.cfg
install ${WORKDIR}/boot.scr ${D}/boot/boot.scr
install ${WORKDIR}/rauc_boot.scr ${D}/boot/rauc_boot.scr
}
FILES:${PN} += "boot/*"
#test -n "${BOOT_ORDER}" || setenv BOOT_ORDER "A B"
#test -n "${BOOT_A_LEFT}" || setenv BOOT_A_LEFT 3
#test -n "${BOOT_B_LEFT}" || setenv BOOT_B_LEFT 3
sysdata dev
sysdata switchslot status
if env exists slot_partition; then
echo "Found valid sysdata environment; Active boot slot: ${slot_partition}"
setenv BOOT_ORDER "${slot_partition} recovery"
else
echo "No valid sysdata environment found; Falling back to slot A"
setenv BOOT_ORDER "A recovery"
fi
setenv bootargs
for BOOT_SLOT in "${BOOT_ORDER}"; do
if test "x${bootargs}" != "x"; then
# Skip remaining slots
elif test "x${BOOT_SLOT}" = "xA"; then
if test ${BOOT_A_LEFT} -gt 0; then
echo "Found valid slot A, ${BOOT_A_LEFT} attempts remaining"
setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1
setenv kernel_partition 2
setenv fdt_partition 2
setenv root_partition 3
setenv bootargs "${default_bootargs} root=/dev/mmcblk0p3 rauc.slot=A"
fi
elif test "x${BOOT_SLOT}" = "xB"; then
if test ${BOOT_B_LEFT} -gt 0; then
echo "Found valid slot B, ${BOOT_B_LEFT} attempts remaining"
setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1
setenv kernel_partition 4
setenv fdt_partition 4
setenv root_partition 5
setenv bootargs "${default_bootargs} root=/dev/mmcblk0p5 rauc.slot=B"
fi
fi
done
if test -n "${bootargs}"; then
saveenv
else
echo "No valid slot found, resetting tries to 3"
setenv BOOT_A_LEFT 3
setenv BOOT_B_LEFT 3
saveenv
reset
fi
# The loading of the kernel, fdt, fdto, and root partition is
# device-dependent and needs to be performed outside of the
# boot script
if env exists sysdata_device; then
setenv bootargs "${bootargs} bootdevice=${sysdata_device}"
fi
# The boot command is also device-dependent
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment