Skip to content

Commit

Permalink
fix build for pvbsp-oe-init-env approach.
Browse files Browse the repository at this point in the history
* TMPDIR=${TOPDIR}/tmp/${DISTRO_CODENAME}
* do not use multiconfig by default
  • Loading branch information
asac committed Dec 17, 2024
1 parent 4c4d282 commit 81f2c89
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 15 deletions.
3 changes: 2 additions & 1 deletion classes/image-pvrexport.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ IMAGE_TYPES_MASKED += " ${@bb.utils.contains('PVROOT_IMAGE', 'no', 'pvrexportit'
${@bb.utils.contains('IMAGE_BASENAME', 'pantavisor-initramfs', ' pvrexportit ', '', d)} \
"

inherit ${@bb.utils.contains('PVROOT_IMAGE_BSP', '${IMAGE_BASENAME}', 'image pvr-ca', '', d)}
inherit image
inherit ${@bb.utils.contains('PVROOT_IMAGE_BSP', '${IMAGE_BASENAME}', 'pvr-ca', '', d)}

IMAGE_INSTALL += "pvcontrol"

Expand Down
2 changes: 1 addition & 1 deletion conf/distro/panta.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ IMAGE_CLASSES += "image-pvrexport"
INITRAMFS_IMAGE = "pantavisor-initramfs"
INITRAMFS_IMAGE_BUNDLE = "1"
INITRAMFS_MULTICONFIG = "pv-initramfs-panta"
INITRAMFS_DEPLOY_DIR_IMAGE = "${TOPDIR}/tmp-${DISTRO_CODENAME}-${INITRAMFS_MULTICONFIG}/deploy/images/${MACHINE}"
INITRAMFS_DEPLOY_DIR_IMAGE = "${TOPDIR}/tmp/${DISTRO_CODENAME}-${INITRAMFS_MULTICONFIG}/deploy/images/${MACHINE}"

DISTRO_FEATURES += "pantavisor-system"

Expand Down
2 changes: 1 addition & 1 deletion conf/multiconfig/pv-initramfs-panta.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
TMPDIR = "${TOPDIR}/tmp-${DISTRO_CODENAME}-pv-initramfs-panta"
TMPDIR = "${TOPDIR}/tmp/${DISTRO_CODENAME}-pv-initramfs-panta"
TCLIBC = "musl"
TCLIBCAPPEND = ""
DISTRO = "panta-distro-bsp"
Expand Down
2 changes: 1 addition & 1 deletion conf/multiconfig/pv-panta.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
TMPDIR = "${TOPDIR}/tmp-${DISTRO_CODENAME}-pv-panta"
TMPDIR = "${TOPDIR}/tmp/${DISTRO_CODENAME}-pv-panta"
TI_COMMON_DEPLOY = "${TMPDIR}/deploy"
DEPLOY_DIR_IMAGE = "${TMPDIR}/deploy/images/${MACHINE}"
INITRAMFS_MULTICONFIG = "pv-initramfs-panta"
Expand Down
2 changes: 1 addition & 1 deletion kas/bsp-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ local_conf_header:
package_management: |
PACKAGE_CLASSES = "package_rpm"
panta-base: |
TMPDIR = "${TOPDIR}/tmp-${DISTRO_CODENAME}"
TMPDIR = "${TOPDIR}/tmp/${DISTRO_CODENAME}"
pantavisor-system: |
DISTRO_FEATURES:append = " pantavisor-system "
PANTAVISOR_FEATURES:append = " dm-crypt"
Expand Down
4 changes: 2 additions & 2 deletions kas/bsp-multi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ local_conf_header:
meta-pantavisor-multi: |
BBMULTICONFIG = "default pv-initramfs-panta pv-panta"
INITRAMFS_MULTICONFIG = "pv-initramfs-panta"
INITRAMFS_DEPLOY_DIR_IMAGE = "${TOPDIR}/tmp-${DISTRO_CODENAME}-${INITRAMFS_MULTICONFIG}/deploy/images/${MACHINE}"
INITRAMFS_DEPLOY_DIR_IMAGE = "${TOPDIR}/tmp/${DISTRO_CODENAME}-${INITRAMFS_MULTICONFIG}/deploy/images/${MACHINE}"
PANTA_MULTICONFIG = "pv-panta"
PANTA_DEPLOY_DIR_IMAGE = "${TOPDIR}/tmp-${DISTRO_CODENAME}-pv-panta/deploy/images/${MACHINE}"
PANTA_DEPLOY_DIR_IMAGE = "${TOPDIR}/tmp/${DISTRO_CODENAME}-pv-panta/deploy/images/${MACHINE}"
pantavisor-remix: "# overriden empty by bsp-multi; done through conf/multiconfig/pv-panta.conf"
panta-busybox: "# empty panta busybox version fix; will be set in pv-initramfs-panta.conf multiconfig"
panta-mbedtls: "# empty panta mbedtls version fix; will be set in pv-initramfs-panta.conf multiconfig"
Expand Down
2 changes: 1 addition & 1 deletion pv-oe-init-env
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ cat >> $BUILDDIR/conf/local.conf <<EOF
### BEGIN META PANTAVISOR
TMPDIR = "${TOPDIR}/tmp-${DISTRO_CODENAME}"
TMPDIR = "${TOPDIR}/tmp/${DISTRO_CODENAME}"
GOVERSION = "1.20.%"
Expand Down
7 changes: 3 additions & 4 deletions pvbsp-oe-init-env
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@ cat >> $BUILDDIR/conf/local.conf <<EOF
### BEGIN META PANTAVISOR
TMPDIR = "${TOPDIR}/tmp-${DISTRO_CODENAME}"
INITRAMFS_IMAGE = "pantavisor-initramfs"
INITRAMFS_MULTICONFIG = "pv-initramfs"
INITRAMFS_DEPLOY_DIR_IMAGE = "${TMPDIR}-${INITRAMFS_MULTICONFIG}/deploy/images/${MACHINE}"
TMPDIR = "${TOPDIR}/tmp/${DISTRO_CODENAME}"
# enable image-pvrexport class; This one will produce
# a root container pvrexport from the rootfs of the images
Expand All @@ -42,6 +39,8 @@ PANTAVISOR_SYSTEM_DISTRO = "yes"
# select mbedtls
PREFERRED_VERSION_mbedtls = "2.28.%"
# select busybox
PREFERRED_VERSION_busybox = "1.36~%"
DISTRO_FEATURES:remove = "usrmerge"
AGL_DEFAULT_DISTRO_FEATURES:remove = "usrmerge"
Expand Down
2 changes: 1 addition & 1 deletion recipes-pv/busybox/busybox.inc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export EXTRA_LDFLAGS = "${LDFLAGS}"

EXTRA_OEMAKE = "CC='${CC}' LD='${CCLD}' V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX} SKIP_STRIP=y HOSTCC='${BUILD_CC}' HOSTCPP='${BUILD_CPP}'"

PACKAGES =+ ""
PACKAGES =+ "busybox-mdev busybox-syslog"

FILES:${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www"
FILES:${PN}-syslog = "${sysconfdir}/init.d/syslog* ${sysconfdir}/syslog-startup.conf* ${sysconfdir}/syslog.conf* ${systemd_system_unitdir}/syslog.service ${sysconfdir}/default/busybox-syslog"
Expand Down
2 changes: 1 addition & 1 deletion recipes-pv/images/pantavisor-bsp.bb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ DEPENDS:append = " \
INITRAMFS_IMAGE ?= "pantavisor-initramfs"
INITRAMFS_IMAGE_NAME ?= "${@['${INITRAMFS_IMAGE}-${MACHINE}', ''][d.getVar('INITRAMFS_IMAGE') == '']}"
INITRAMFS_MULTICONFIG ?= ""
INITRAMFS_DEPLOY_DIR_IMAGE = '${@oe.utils.conditional("INITRAMFS_MULTICONFIG", "", "${DEPLOY_DIR_IMAGE}", "${TOPDIR}/tmp-${DISTRO_CODENAME}-${INITRAMFS_MULTICONFIG}/deploy/images/${MACHINE}", d)}'
INITRAMFS_DEPLOY_DIR_IMAGE = '${@oe.utils.conditional("INITRAMFS_MULTICONFIG", "", "${DEPLOY_DIR_IMAGE}", "${TOPDIR}/tmp/${DISTRO_CODENAME}-${INITRAMFS_MULTICONFIG}/deploy/images/${MACHINE}", d)}'

OVERRIDES =. "${@bb.utils.contains('PANTAVISOR_FEATURES', 'squash-lz4', 'pv-squash-lz4:', '', d)}"
OVERRIDES =. "${@bb.utils.contains('PANTAVISOR_FEATURES', 'squash-zstd', 'pv-squash-zstd:', '', d)}"
Expand Down
10 changes: 9 additions & 1 deletion recipes-pv/pantavisor/pantavisor-pvroot.bb
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,16 @@ SRC_URI += " \
file://pvrconfig \
file://uboot.txt \
"
PSEUDO_IGNORE_PATHS .= ",/tmp,${DEPLOYDIR}"
PSEUDO_IGNORE_PATHS .= ",${WORKDIR}/tmp,${DEPLOYDIR}"

do_install[cleandirs] += " ${WORKDIR}/tmp "


fakeroot do_install() {

oldtmp=$TMPDIR
export TMPDIR=${WORKDIR}/tmp

install -d -m 0755 ${D}/boot
install -d -m 0755 ${D}/config
install -d -m 0755 ${D}/logs
Expand All @@ -44,6 +51,7 @@ fakeroot do_install() {

echo tar -C "${D}" -cvzf ${B}/${IMAGE_NAME}.tar.gz .
tar -C "${D}" -cvzf ${B}/${IMAGE_NAME}.tar.gz .
export TMPDIR=$oldtmp
}


Expand Down

0 comments on commit 81f2c89

Please sign in to comment.