Skip to content

Commit

Permalink
Merge pull request #595 from lumag/fix-workdir
Browse files Browse the repository at this point in the history
WORKDIR -> UNPACKDIR migration
  • Loading branch information
lumag authored May 25, 2024
2 parents 6f5e642 + 34e906d commit 75d6186
Show file tree
Hide file tree
Showing 16 changed files with 47 additions and 38 deletions.
2 changes: 1 addition & 1 deletion conf/layer.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ BBFILE_PATTERN_qcom := "^${LAYERDIR}/"
BBFILE_PRIORITY_qcom = "5"

LAYERDEPENDS_qcom = "core"
LAYERSERIES_COMPAT_qcom = "nanbield scarthgap"
LAYERSERIES_COMPAT_qcom = "styhead"

BBFILES_DYNAMIC += " \
openembedded-layer:${LAYERDIR}/dynamic-layers/openembedded-layer/*/*/*.bb \
Expand Down
6 changes: 4 additions & 2 deletions recipes-bsp/firmware-nexus/firmware-qcom-nexus.inc
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ SRC_URI = "https://dl.google.com/dl/android/aosp/qcom-${FW_QCOM_NAME}-${AOSP_BUI

PV = "${AOSP_BUILD}"

S = "${UNPACKDIR}"

require recipes-bsp/firmware/firmware-qcom.inc

DEPENDS += "pil-squasher-native"

# extract the license file
do_extract() {
head -n 280 ${WORKDIR}/extract-qcom-${FW_QCOM_NAME}.sh | tail -n +16 > ${S}/license.txt
tail -n +315 ${WORKDIR}/extract-qcom-${FW_QCOM_NAME}.sh | tar xzfv - -C ${S}
head -n 280 ${UNPACKDIR}/extract-qcom-${FW_QCOM_NAME}.sh | tail -n +16 > ${S}/license.txt
tail -n +315 ${UNPACKDIR}/extract-qcom-${FW_QCOM_NAME}.sh | tar xzfv - -C ${S}
}
addtask extract after do_unpack before do_patch

Expand Down
4 changes: 2 additions & 2 deletions recipes-bsp/firmware-nexus/firmware-qcom-nexus4.bb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ do_install:append() {

install -m 0644 vendor/qcom/${FW_QCOM_NAME}/proprietary/vidc_1080p.fw ${D}${FW_QCOM_PATH}

install -m 0644 ${WORKDIR}/git/WCNSS_cfg.dat ${D}${FW_QCOM_PATH}
install -m 0644 ${WORKDIR}/git/WCNSS_qcom_wlan_nv.bin ${D}${FW_QCOM_PATH}
install -m 0644 ${UNPACKDIR}/git/WCNSS_cfg.dat ${D}${FW_QCOM_PATH}
install -m 0644 ${UNPACKDIR}/git/WCNSS_qcom_wlan_nv.bin ${D}${FW_QCOM_PATH}
}
6 changes: 3 additions & 3 deletions recipes-bsp/firmware-nexus/firmware-qcom-nexus7-2013.bb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ do_install:append() {
install -m 0644 vendor/qcom/${FW_QCOM_NAME}/proprietary/vidcfw.elf ${D}${FW_QCOM_PATH}
install -m 0644 vendor/qcom/${FW_QCOM_NAME}/proprietary/vidc_1080p.fw ${D}${FW_QCOM_PATH}

install -m 0644 ${WORKDIR}/git/WCNSS_cfg.dat ${D}${FW_QCOM_PATH}
install -m 0644 ${WORKDIR}/git/WCNSS_qcom_wlan_nv_deb.bin ${D}${FW_QCOM_PATH}
install -m 0644 ${WORKDIR}/git/WCNSS_qcom_wlan_nv_flo.bin ${D}${FW_QCOM_PATH}/WCNSS_qcom_wlan_nv.bin
install -m 0644 ${UNPACKDIR}/git/WCNSS_cfg.dat ${D}${FW_QCOM_PATH}
install -m 0644 ${UNPACKDIR}/git/WCNSS_qcom_wlan_nv_deb.bin ${D}${FW_QCOM_PATH}
install -m 0644 ${UNPACKDIR}/git/WCNSS_qcom_wlan_nv_flo.bin ${D}${FW_QCOM_PATH}/WCNSS_qcom_wlan_nv.bin
}
6 changes: 4 additions & 2 deletions recipes-bsp/firmware-nexus/firmware-qcom-pixel.inc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ SRC_URI = "https://dl.google.com/dl/android/aosp/${VENDOR}-${FW_QCOM_NAME}-${AOS

PV = "${AOSP_BUILD}"

S = "${UNPACKDIR}"

require recipes-bsp/firmware/firmware-qcom.inc

DEPENDS += "pil-squasher-native"
Expand All @@ -16,8 +18,8 @@ VENDOR_IMG_SPARSE ?= "1"

# extract the license file
do_extract() {
head -n 280 ${WORKDIR}/extract-${VENDOR}-${FW_QCOM_NAME}.sh | tail -n +16 > ${S}/license.txt
tail -n +315 ${WORKDIR}/extract-${VENDOR}-${FW_QCOM_NAME}.sh | tar xzfv - -C ${S}
head -n 280 ${UNPACKDIR}/extract-${VENDOR}-${FW_QCOM_NAME}.sh | tail -n +16 > ${S}/license.txt
tail -n +315 ${UNPACKDIR}/extract-${VENDOR}-${FW_QCOM_NAME}.sh | tar xzfv - -C ${S}
if [ "${VENDOR_IMG_SPARSE}" = "1" ] ; then
simg2img ${S}/vendor/${VENDOR}/${FW_QCOM_NAME}/proprietary/vendor.img ${B}/vendor.img
else
Expand Down
2 changes: 1 addition & 1 deletion recipes-bsp/firmware-nexus/firmware-qcom-radio.inc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ do_extract[depends] += "mtools-native:do_populate_sysroot"

do_extract:append() {
mkdir -p ${B}/radio
radio="${WORKDIR}/${FACTORY_NAME}-${AOSP_BUILD}/radio-*img"
radio="${UNPACKDIR}/${FACTORY_NAME}-${AOSP_BUILD}/radio-*img"
if [ "${RADIO_VFAT}" = "1" ] ; then
mcopy -i $radio ::/image/* ${B}/radio
else
Expand Down
7 changes: 5 additions & 2 deletions recipes-bsp/firmware-woa/firmware-woa.inc
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
DEPENDS += "cabextract-native"

S = "${UNPACKDIR}"

require recipes-bsp/firmware/firmware-qcom.inc

WOA_FW_URL = "https://github.com/WOA-Project/Qualcomm-Reference-Drivers/raw/master/${WOA_SUBDIR}/${PV}"
Expand All @@ -11,7 +14,7 @@ FILES:linux-firmware-qcom-${FW_QCOM_NAME}-sensors += "${FW_QCOM_PATH}/qcslpi*.mb
FILES:linux-firmware-qcom-${FW_QCOM_NAME}-venus += "${FW_QCOM_PATH}/qcvss*.mbn"

do_compile:append() {
for file in ${WORKDIR}/*cab ; do
for file in ${UNPACKDIR}/*cab ; do
cabextract $file || exit 1
done
}
Expand All @@ -22,5 +25,5 @@ do_install:append() {
install -m 0644 ${B}/*.mbn ${D}${FW_QCOM_PATH}
ls ${B}/*.elf && install -m 0644 ${B}/*.elf ${D}${FW_QCOM_PATH}

install -m 0644 ${WORKDIR}/*.jsn ${D}${FW_QCOM_PATH}
install -m 0644 ${UNPACKDIR}/*.jsn ${D}${FW_QCOM_PATH}
}
8 changes: 4 additions & 4 deletions recipes-bsp/firmware/firmware-qcom-adreno.inc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ADRENO_URI ??= ""
SRC_URI += "${@['', '${ADRENO_URI};subdir=adreno;name=adreno'][d.getVar('ADRENO_URI') != ''] }"

# the file is unpacked to this dir, clean it up
do_unpack[cleandirs] = "${WORKDIR}/adreno"
do_unpack[cleandirs] = "${UNPACKDIR}/adreno"

DEPENDS += "pil-squasher-native"

Expand All @@ -28,12 +28,12 @@ python () {

do_compile:append() {
if [ -n "${ADRENO_URI}" ] ; then
for fw in ${WORKDIR}/adreno/${ADRENO_PATH}/*_zap.mdt ; do
for fw in ${UNPACKDIR}/adreno/${ADRENO_PATH}/*_zap.mdt ; do
pil-squasher ${B}/`basename $fw mdt`mbn $fw || exit 1
done
for fw in ${FW_QCOM_LIST} ; do
if [ -r ${WORKDIR}/adreno/${ADRENO_PATH}/$fw ] ; then
cp ${WORKDIR}/adreno/${ADRENO_PATH}/$fw ${B}/
if [ -r ${UNPACKDIR}/adreno/${ADRENO_PATH}/$fw ] ; then
cp ${UNPACKDIR}/adreno/${ADRENO_PATH}/$fw ${B}/
fi
done
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ SRC_URI[sha256sum] = "9885f915ebd4986432340cf1d03b8fd2bfdd97ad6a4a7466200fddbe41

PACKAGE_ARCH = "${MACHINE_ARCH}"

S = "${WORKDIR}"
S = "${WORKDIR}/sources"
UNPACKDIR = "${S}"

do_deploy() {
install -D -p -m644 ${S}/*.mbn ${DEPLOYDIR}
Expand Down
4 changes: 2 additions & 2 deletions recipes-bsp/firmware/firmware-qcom-nhlos.inc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ handle_nonhlos_image() {
done
}

# If the URL is the file:// URI, the whole local path will be duplicated in the WORKDIR.
# If the URL is the file:// URI, the whole local path will be duplicated in the UNPACKDIR.
# Otherwise we just need the last (filename) part of the path.
def get_nhlos_path(path):
from urllib.parse import urlparse
Expand All @@ -34,7 +34,7 @@ def get_nhlos_path(path):

do_compile:prepend() {
if [ -n "${NHLOS_URI}" ] ; then
handle_nonhlos_image ${WORKDIR}/${@get_nhlos_path(d.getVar("NHLOS_URI"))}
handle_nonhlos_image ${UNPACKDIR}/${@get_nhlos_path(d.getVar("NHLOS_URI"))}
fi
}

Expand Down
2 changes: 1 addition & 1 deletion recipes-bsp/firmware/firmware-qcom-sm8150-hdk.bb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ SPLIT_FIRMWARE_PACKAGES = "\

do_install:append() {
if [ -n "${ADRENO_URI}" ] ; then
install -m 0644 ${WORKDIR}/adreno/${ADRENO_PATH}/a640_gmu.bin ${D}${FW_QCOM_BASE_PATH}
install -m 0644 ${UNPACKDIR}/adreno/${ADRENO_PATH}/a640_gmu.bin ${D}${FW_QCOM_BASE_PATH}
fi
}

Expand Down
4 changes: 2 additions & 2 deletions recipes-bsp/firmware/firmware-qcom-sm8450-hdk.bb
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ SPLIT_FIRMWARE_PACKAGES = "\

do_install:append() {
if [ -n "${ADRENO_URI}" ] ; then
install -m 0644 ${WORKDIR}/adreno/${ADRENO_PATH}/a730_sqe.fw ${D}${FW_QCOM_BASE_PATH}
install -m 0644 ${WORKDIR}/adreno/${ADRENO_PATH}/gmu_gen70000.bin ${D}${FW_QCOM_BASE_PATH}
install -m 0644 ${UNPACKDIR}/adreno/${ADRENO_PATH}/a730_sqe.fw ${D}${FW_QCOM_BASE_PATH}
install -m 0644 ${UNPACKDIR}/adreno/${ADRENO_PATH}/gmu_gen70000.bin ${D}${FW_QCOM_BASE_PATH}
fi
}

Expand Down
14 changes: 7 additions & 7 deletions recipes-kernel/linux/linux-linaro-qcom.inc
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ kernel_conf_variable() {
}

do_configure:prepend() {
if [ -f '${WORKDIR}/defconfig' ]; then
cp '${WORKDIR}/defconfig' '${B}/.config'
if [ -f '${UNPACKDIR}/defconfig' ]; then
cp '${UNPACKDIR}/defconfig' '${B}/.config'
else
cp '${KERNEL_DEFCONFIG}' '${B}/.config'
fi
Expand All @@ -54,20 +54,20 @@ do_configure:prepend() {

# Check for kernel config fragments. The assumption is that the config
# fragment will be specified with the absolute path. For example:
# * ${WORKDIR}/config1.cfg
# * ${UNPACKDIR}/config1.cfg
# * ${S}/config2.cfg
# Iterate through the list of configs and make sure that you can find
# each one. If not then error out.
# NOTE: If you want to override a configuration that is kept in the kernel
# with one from the OE meta data then you should make sure that the
# OE meta data version (i.e. ${WORKDIR}/config1.cfg) is listed
# OE meta data version (i.e. ${UNPACKDIR}/config1.cfg) is listed
# after the in kernel configuration fragment.
# Check if any config fragments are specified.
if [ ! -z "${KERNEL_CONFIG_FRAGMENTS}" ]
then
for f in ${KERNEL_CONFIG_FRAGMENTS}
do
# Check if the config fragment was copied into the WORKDIR from
# Check if the config fragment was copied into the UNPACKDIR from
# the OE meta data
if [ ! -e "$f" ]
then
Expand All @@ -77,10 +77,10 @@ do_configure:prepend() {
done

# Now that all the fragments are located merge them.
( cd ${WORKDIR} && ${S}/scripts/kconfig/merge_config.sh -m -r -O ${B} ${B}/.config ${KERNEL_CONFIG_FRAGMENTS} 1>&2 )
( cd ${UNPACKDIR} && ${S}/scripts/kconfig/merge_config.sh -m -r -O ${B} ${B}/.config ${KERNEL_CONFIG_FRAGMENTS} 1>&2 )
fi
}

do_configure:append() {
oe_runmake -C ${S} O=${B} savedefconfig && cp ${B}/defconfig ${WORKDIR}/defconfig.saved
oe_runmake -C ${S} O=${B} savedefconfig && cp ${B}/defconfig ${UNPACKDIR}/defconfig.saved
}
10 changes: 5 additions & 5 deletions recipes-support/fastrpc/fastrpc_git.bb
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ do_install:append() {
install -d ${D}${libdir}/rfsa

install -d ${D}${systemd_unitdir}/system
install -m 0644 ${WORKDIR}/usr-lib-rfsa.service ${D}${systemd_unitdir}/system
install -m 0644 ${WORKDIR}/adsprpcd.service ${D}${systemd_unitdir}/system
install -m 0644 ${WORKDIR}/cdsprpcd.service ${D}${systemd_unitdir}/system
install -m 0644 ${WORKDIR}/sdsprpcd.service ${D}${systemd_unitdir}/system
install -m 0644 ${UNPACKDIR}/usr-lib-rfsa.service ${D}${systemd_unitdir}/system
install -m 0644 ${UNPACKDIR}/adsprpcd.service ${D}${systemd_unitdir}/system
install -m 0644 ${UNPACKDIR}/cdsprpcd.service ${D}${systemd_unitdir}/system
install -m 0644 ${UNPACKDIR}/sdsprpcd.service ${D}${systemd_unitdir}/system

install -d ${D}${sbindir}
install -m 0755 ${WORKDIR}/mount-dsp.sh ${D}${sbindir}
install -m 0755 ${UNPACKDIR}/mount-dsp.sh ${D}${sbindir}
}

FILES:${PN} += " \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ RDEPENDS:${PN} = "initramfs-framework-base ${VIRTUAL-RUNTIME_base-utils}"

SRC_URI = "file://copy-modules.sh"

S = "${WORKDIR}"
S = "${WORKDIR}/sources"
UNPACKDIR= "${S}"

do_install() {
install -d ${D}/init.d
install -m 0755 ${WORKDIR}/copy-modules.sh ${D}/init.d/95-copy_modules
install -m 0755 ${UNPACKDIR}/copy-modules.sh ${D}/init.d/95-copy_modules
}

FILES:${PN} = "/init.d/"
2 changes: 1 addition & 1 deletion recipes-support/qbootctl/qbootctl_0.1.2.bb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ inherit meson systemd

do_install:append () {
install -d ${D}${systemd_system_unitdir}
sed 's:@bindir@:${bindir}:' < ${WORKDIR}/qbootclt-bless-boot.service.in > ${D}${systemd_system_unitdir}/qbootclt-bless-boot.service
sed 's:@bindir@:${bindir}:' < ${UNPACKDIR}/qbootclt-bless-boot.service.in > ${D}${systemd_system_unitdir}/qbootclt-bless-boot.service
}

SYSTEMD_SERVICE:${PN} = "qbootclt-bless-boot.service"

0 comments on commit 75d6186

Please sign in to comment.