blob: a5993cc0c7809e1a6d1e33b54b3c58c86242d4a1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# 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}"
|