mirror of
git://git.yoctoproject.org/meta-raspberrypi.git
synced 2025-07-19 21:09:03 +02:00
sdcard_image-rpi.bbclass: copy the DTB files with canonical name
* instead of using ${KERNEL_IMAGETYPE}-${DTB_BASE_NAME}.dtb use the entries from KERNEL_DEVICETREE * basename is still needed because raspberrypi3-64 is using: broadcom/bcm2710-rpi-3-b.dtb and the ${DEPLOY_DIR_IMAGE} doesn't contain any directories for DTBs and we cannot remove broadcom/ prefix, because then "make bcm2710-rpi-3-b.dtb" from kernel-devicetree.bbclass will fail with: make[3]: *** No rule to make target 'arch/arm64/boot/dts/bcm2710-rpi-3-b.dtb'. Stop. Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
This commit is contained in:
parent
c4400ca811
commit
4826d22580
|
@ -79,6 +79,7 @@ SDIMG_LINK_VFAT = "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.vfat"
|
||||||
|
|
||||||
def split_overlays(d, out, ver=None):
|
def split_overlays(d, out, ver=None):
|
||||||
dts = d.getVar("KERNEL_DEVICETREE")
|
dts = d.getVar("KERNEL_DEVICETREE")
|
||||||
|
# Device Tree Overlays are assumed to be suffixed by '-overlay.dtb' (4.1.x) or by '.dtbo' (4.4.9+) string and will be put in a dedicated folder
|
||||||
if out:
|
if out:
|
||||||
overlays = oe.utils.str_filter_out('\S+\-overlay\.dtb$', dts, d)
|
overlays = oe.utils.str_filter_out('\S+\-overlay\.dtb$', dts, d)
|
||||||
overlays = oe.utils.str_filter_out('\S+\.dtbo$', overlays, d)
|
overlays = oe.utils.str_filter_out('\S+\.dtbo$', overlays, d)
|
||||||
|
@ -118,24 +119,17 @@ IMAGE_CMD_rpi-sdimg () {
|
||||||
mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/boot.img $BOOT_BLOCKS
|
mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/boot.img $BOOT_BLOCKS
|
||||||
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/* ::/
|
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/* ::/
|
||||||
if test -n "${DTS}"; then
|
if test -n "${DTS}"; then
|
||||||
# Device Tree Overlays are assumed to be suffixed by '-overlay.dtb' (4.1.x) or by '.dtbo' (4.4.9+) string and will be put in a dedicated folder
|
|
||||||
DT_OVERLAYS="${@split_overlays(d, 0)}"
|
|
||||||
DT_ROOT="${@split_overlays(d, 1)}"
|
|
||||||
|
|
||||||
# Copy board device trees to root folder
|
# Copy board device trees to root folder
|
||||||
for DTB in $DT_ROOT; do
|
for dtbf in ${@split_overlays(d, True)}; do
|
||||||
DTB_BASE_NAME=`basename ${DTB} .dtb`
|
dtb=`basename $dtbf`
|
||||||
|
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/$dtb ::$dtb
|
||||||
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTB_BASE_NAME}.dtb ::${DTB_BASE_NAME}.dtb
|
|
||||||
done
|
done
|
||||||
|
|
||||||
# Copy device tree overlays to dedicated folder
|
# Copy device tree overlays to dedicated folder
|
||||||
mmd -i ${WORKDIR}/boot.img overlays
|
mmd -i ${WORKDIR}/boot.img overlays
|
||||||
for DTB in $DT_OVERLAYS; do
|
for dtbf in ${@split_overlays(d, False)}; do
|
||||||
DTB_EXT=${DTB##*.}
|
dtb=`basename $dtbf`
|
||||||
DTB_BASE_NAME=`basename ${DTB} ."${DTB_EXT}"`
|
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/$dtb ::overlays/$dtb
|
||||||
|
|
||||||
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTB_BASE_NAME}.${DTB_EXT} ::overlays/${DTB_BASE_NAME}.${DTB_EXT}
|
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
if [ "${RPI_USE_U_BOOT}" = "1" ]; then
|
if [ "${RPI_USE_U_BOOT}" = "1" ]; then
|
||||||
|
|
Loading…
Reference in New Issue
Block a user