You've already forked meta-qcom-extras
mirror of
https://github.com/linux-msm/meta-qcom-extras.git
synced 2026-02-25 13:14:43 -08:00
To be ARM System Ready IR compliant, QCOM UEFI implementation is now supporting loading a matching device-tree by reading 'combined-dtb.dtb' from the dtb partition. linux-qcom-dtbbin.bbclass when inherited by kernel recipe, generates one vfat image per dtb by packing dtb as 'combined-dtb.dtb'. This image can be flashed into dtb parititon for UEFI to read and load device-tree. Signed-off-by: Viswanath Kraleti <quic_vkraleti@quicinc.com>
34 lines
1.4 KiB
Plaintext
34 lines
1.4 KiB
Plaintext
# SPDX-License-Identifier: BSD-3-Clause-Clear
|
|
|
|
DTBBIN_DEPLOYDIR = "${WORKDIR}/qcom_dtbbin_deploy-${PN}"
|
|
DTBBIN_SIZE ?= "4096"
|
|
|
|
do_qcom_dtbbin_deploy[depends] += "dosfstools-native:do_populate_sysroot mtools-native:do_populate_sysroot"
|
|
do_qcom_dtbbin_deploy[cleandirs] = "${DTBBIN_DEPLOYDIR}"
|
|
do_qcom_dtbbin_deploy() {
|
|
for dtbf in ${KERNEL_DEVICETREE}; do
|
|
bbdebug 1 " combining: $dtbf"
|
|
dtb=`normalize_dtb "$dtbf"`
|
|
dtb_ext=${dtb##*.}
|
|
dtb_base_name=`basename $dtb .$dtb_ext`
|
|
mkdir -p ${DTBBIN_DEPLOYDIR}/$dtb_base_name
|
|
cp ${D}/${KERNEL_DTBDEST}/$dtb_base_name.dtb ${DTBBIN_DEPLOYDIR}/$dtb_base_name/combined-dtb.dtb
|
|
mkfs.vfat $@ -C ${DTBBIN_DEPLOYDIR}/dtb-${dtb_base_name}-image.vfat ${DTBBIN_SIZE}
|
|
mcopy -i "${DTBBIN_DEPLOYDIR}/dtb-${dtb_base_name}-image.vfat" -vsmpQ ${DTBBIN_DEPLOYDIR}/$dtb_base_name/* ::/
|
|
rm -rf ${DTBBIN_DEPLOYDIR}/$dtb_base_name
|
|
done
|
|
}
|
|
addtask qcom_dtbbin_deploy after do_populate_sysroot do_packagedata before do_deploy
|
|
|
|
# Setup sstate, see deploy.bbclass
|
|
SSTATETASKS += "do_qcom_dtbbin_deploy"
|
|
do_qcom_dtbbin_deploy[sstate-inputdirs] = "${DTBBIN_DEPLOYDIR}"
|
|
do_qcom_dtbbin_deploy[sstate-outputdirs] = "${DEPLOY_DIR_IMAGE}"
|
|
|
|
python do_qcom_dtbbin_deploy_setscene () {
|
|
sstate_setscene(d)
|
|
}
|
|
addtask do_qcom_dtbbin_deploy_setscene
|
|
|
|
do_qcom_dtbbin_deploy[stamp-extra-info] = "${MACHINE_ARCH}"
|