Skip to content

Commit

Permalink
Add u-boot-fw-utils which provide fw_setenv and fw_printenv apps
Browse files Browse the repository at this point in the history
  • Loading branch information
fortizc committed Oct 31, 2024
1 parent dea8406 commit d620e88
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
11 changes: 11 additions & 0 deletions recipes-pv/pantavisor/files/fw_env.config
Original file line number Diff line number Diff line change
@@ -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
7 changes: 7 additions & 0 deletions recipes-pv/pantavisor/pantavisor_019.bb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit d620e88

Please sign in to comment.