diff --git a/recipes-core/sw-update/sw-update.bb b/recipes-core/sw-update/sw-update.bb index 82cd097..286a54f 100644 --- a/recipes-core/sw-update/sw-update.bb +++ b/recipes-core/sw-update/sw-update.bb @@ -4,9 +4,9 @@ LICENSE = "Proprietary" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Proprietary;md5=0557f9d92cf58f2ccdd50f62f8ac0b28" RDEPENDS_${PN} = "e2fsprogs" -FILESEXTRAPAHT_prepend := "${THISDIR}/${PN}/${MACHINE}:" +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}/${MACHINE}:" -PV = "1.0.0" +PV = "1.0.1" SRC_URI = " \ file://sw-update.sh \ diff --git a/recipes-core/sw-update/sw-update/am335x-vcu/sw_update_config b/recipes-core/sw-update/sw-update/am335x-vcu/sw_update_config new file mode 100644 index 0000000..2f4e06d --- /dev/null +++ b/recipes-core/sw-update/sw-update/am335x-vcu/sw_update_config @@ -0,0 +1,36 @@ +PLATFORM_MAIN_STORAGE="/dev/mmcblk1" +PLATFORM_FIRST_PARTITION=$PLATFORM_MAIN_STORAGE"p1" +PLATFORM_SECOND_PARTITION=$PLATFORM_MAIN_STORAGE"p2" +PLATFORM_PROD_COMPATIBILITY= +PLATFORM_HW_VERSION= +get_active_partition() +{ + boot_part=$(bd read boot_part) + if [ "$boot_part" == "None" ]; then + flag=$(bd read partition64.flags) + if [ $flag -ne 0 ]; then + boot_part=0 + else + boot_part=1 + fi + fi + echo $boot_part +} +PLATFORM_ACTIVE_PARTITION=$(get_active_partition) + +set_active_partition() +{ + boot_part=$(bd read boot_part) + if [ "$boot_part" == "None" ]; then + if [ $1 -eq 0 ]; then + bd write partition64.flags=128 + bd write partition64_1.flags=0 + else + bd write partition64_1.flags=128 + bd write partition64.flags=0 + fi + else + bd write boot_part=$1 + fi +} +