From d620e88ec7c57f85779ab5655bd06b3dd316a7e1 Mon Sep 17 00:00:00 2001 From: Felipe Ortiz Date: Wed, 30 Oct 2024 17:25:08 +0000 Subject: [PATCH] Add u-boot-fw-utils which provide fw_setenv and fw_printenv apps --- recipes-pv/pantavisor/files/fw_env.config | 11 +++++++++++ recipes-pv/pantavisor/pantavisor_019.bb | 7 +++++++ 2 files changed, 18 insertions(+) create mode 100644 recipes-pv/pantavisor/files/fw_env.config diff --git a/recipes-pv/pantavisor/files/fw_env.config b/recipes-pv/pantavisor/files/fw_env.config new file mode 100644 index 0000000..47cdfb6 --- /dev/null +++ b/recipes-pv/pantavisor/files/fw_env.config @@ -0,0 +1,11 @@ +# Configuration file for fw_(printenv/setenv) utility. +# Up to two entries are valid, in this case the redundant +# environment sector is assumed present. +# Notice, that the "Number of sectors" is not required on NOR and SPI-dataflash. +# Futhermore, if the Flash sector size is omitted, this value is assumed to +# be the same as the Environment size, which is valid for NOR and SPI-dataflash +# Device offset must be prefixed with 0x to be parsed as a hexadecimal value. + +# Device name Device offset Env. size Flash sector size Number of sectors +/dev/mtd1 0 0x20000 0x20000 4 +/dev/mtd2 0 0x20000 0x20000 4 diff --git a/recipes-pv/pantavisor/pantavisor_019.bb b/recipes-pv/pantavisor/pantavisor_019.bb index ebada9c..6d2b2d8 100644 --- a/recipes-pv/pantavisor/pantavisor_019.bb +++ b/recipes-pv/pantavisor/pantavisor_019.bb @@ -12,7 +12,10 @@ RDEPENDS:${PN} += "lxc-pv \ cryptsetup \ libthttp-certs \ ${@bb.utils.contains('PANTAVISOR_FEATURES', 'autogrow', 'gptfdisk e2fsprogs-resize2fs', '', d)} \ + ${@bb.utils.contains('PANTAVISOR_FEATURES', 'uboot-ab', 'u-boot-fw-utils', '', d)} \ " + + RDEPENDS:${PN}:qemumips += "lxc-pv libthttp-certs " LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" @@ -26,6 +29,7 @@ PANTAVISOR_BRANCH ??= "master" SRC_URI = "git://github.com/pantavisor/pantavisor.git;protocol=https;branch=${PANTAVISOR_BRANCH}" SRC_URI += " file://pantavisor-run" SRC_URI += " file://rev0json" +SRC_URI += " ${@bb.utils.contains('PANTAVISOR_FEATURES', 'uboot-ab', 'file://fw_env.config', '', d)}" SRCREV = "88c3e58e75ce8117994148f52d1790addfcda8f1" @@ -80,6 +84,9 @@ do_install() { install -m 0644 ${WORKDIR}/rev0json ${D}/var/pantavisor/storage/trails/0/.pvr/json install -m 0755 ${WORKDIR}/pantavisor-run ${D}/usr/bin/pantavisor-run install -m 0755 ${WORKDIR}/pantavisor-run ${D}/usr/bin/pantavisor-run + if ${@bb.utils.contains('PANTAVISOR_FEATURES','uboot-ab','true','false',d)}; then + install -m 0644 ${WORKDIR}/fw_env.config ${D}/etc/fw_env.config + fi if [ -f ${WORKDIR}/pantavisor-installer ]; then install -m 0755 ${WORKDIR}/pantavisor-installer ${D}/lib/pv/pantavisor-installer fi