meta-digi-dey: core: add 'bootcount' to DEY core package group to reset bootcount on boot
While on it, remove the block of the 'dualboot' script that was taking care of this action. https://onedigi.atlassian.net/browse/DEL-8506 Signed-off-by: David Escalona <david.escalona@digi.com>
This commit is contained in:
parent
7174a42e87
commit
981c5e44bb
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (C) 2012-2022 Digi International.
|
# Copyright (C) 2012-2023 Digi International.
|
||||||
#
|
#
|
||||||
SUMMARY = "Core packagegroup for DEY image"
|
SUMMARY = "Core packagegroup for DEY image"
|
||||||
|
|
||||||
|
|
@ -36,6 +36,7 @@ SYSVINIT_SCRIPTS = " \
|
||||||
RDEPENDS:${PN} = "\
|
RDEPENDS:${PN} = "\
|
||||||
base-files \
|
base-files \
|
||||||
base-passwd \
|
base-passwd \
|
||||||
|
bootcount \
|
||||||
connectcore-demo-example \
|
connectcore-demo-example \
|
||||||
${CLOUDCONNECTOR_PKG} \
|
${CLOUDCONNECTOR_PKG} \
|
||||||
dualboot \
|
dualboot \
|
||||||
|
|
|
||||||
|
|
@ -28,16 +28,6 @@ dualboot_init () {
|
||||||
fw_setenv active_system "${MTD_BOOT_PART}"
|
fw_setenv active_system "${MTD_BOOT_PART}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ISUPGRADING="$(fw_printenv -n upgrade_available 2>/dev/null)"
|
|
||||||
|
|
||||||
if [ "$ISUPGRADING" = "1" ]; then
|
|
||||||
BOOTCOUNT="$(fw_printenv -n bootcount 2>/dev/null)"
|
|
||||||
if [ "${BOOTCOUNT}" -lt 3 ]; then
|
|
||||||
fw_setenv upgrade_available
|
|
||||||
fw_setenv bootcount 0
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue