From 473ef8ffd135679ed0463a60c0296023e9f737d8 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 | 3 +++ 2 files changed, 14 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..bf3951b 100644 --- a/recipes-pv/pantavisor/pantavisor_019.bb +++ b/recipes-pv/pantavisor/pantavisor_019.bb @@ -11,6 +11,7 @@ RDEPENDS:${PN} += "lxc-pv \ e2fsprogs-mke2fs \ cryptsetup \ libthttp-certs \ + u-boot-fw-utils \ ${@bb.utils.contains('PANTAVISOR_FEATURES', 'autogrow', 'gptfdisk e2fsprogs-resize2fs', '', d)} \ " RDEPENDS:${PN}:qemumips += "lxc-pv libthttp-certs " @@ -26,6 +27,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 += " file://fw_env.config" SRCREV = "88c3e58e75ce8117994148f52d1790addfcda8f1" @@ -80,6 +82,7 @@ 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 + install -m 0644 ${WORKDIR}/fw_env.config ${D}/etc/fw_env.config if [ -f ${WORKDIR}/pantavisor-installer ]; then install -m 0755 ${WORKDIR}/pantavisor-installer ${D}/lib/pv/pantavisor-installer fi