summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--classes/linux-raspberrypi-base.bbclass4
-rw-r--r--classes/sdcard_image-rpi.bbclass8
2 files changed, 5 insertions, 7 deletions
diff --git a/classes/linux-raspberrypi-base.bbclass b/classes/linux-raspberrypi-base.bbclass
index 930fc44..3a6e33d 100644
--- a/classes/linux-raspberrypi-base.bbclass
+++ b/classes/linux-raspberrypi-base.bbclass
@@ -1,6 +1,6 @@
1inherit linux-kernel-base 1inherit linux-kernel-base
2 2
3def get_dts(d, ver): 3def get_dts(d, ver=None):
4 import re 4 import re
5 5
6 staging_dir = d.getVar("STAGING_KERNEL_BUILDDIR", True) 6 staging_dir = d.getVar("STAGING_KERNEL_BUILDDIR", True)
@@ -32,7 +32,7 @@ def get_dts(d, ver):
32 return dts 32 return dts
33 33
34 34
35def split_overlays(d, ver, out): 35def split_overlays(d, out, ver=None):
36 dts = get_dts(d, ver) 36 dts = get_dts(d, ver)
37 if out: 37 if out:
38 overlays = oe.utils.str_filter_out('\S+\-overlay\.dtb$', dts, d) 38 overlays = oe.utils.str_filter_out('\S+\-overlay\.dtb$', dts, d)
diff --git a/classes/sdcard_image-rpi.bbclass b/classes/sdcard_image-rpi.bbclass
index 2f0daee..0487ef1 100644
--- a/classes/sdcard_image-rpi.bbclass
+++ b/classes/sdcard_image-rpi.bbclass
@@ -71,8 +71,6 @@ SDIMG = "${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.rpi-sdimg"
71# Additional files and/or directories to be copied into the vfat partition from the IMAGE_ROOTFS. 71# Additional files and/or directories to be copied into the vfat partition from the IMAGE_ROOTFS.
72FATPAYLOAD ?= "" 72FATPAYLOAD ?= ""
73 73
74RPI_KERNEL_VERSION := "${@get_kernelversion_file('${STAGING_KERNEL_BUILDDIR}')}"
75
76IMAGE_CMD_rpi-sdimg () { 74IMAGE_CMD_rpi-sdimg () {
77 75
78 # Align partitions 76 # Align partitions
@@ -83,7 +81,7 @@ IMAGE_CMD_rpi-sdimg () {
83 echo "Creating filesystem with Boot partition ${BOOT_SPACE_ALIGNED} KiB and RootFS $ROOTFS_SIZE KiB" 81 echo "Creating filesystem with Boot partition ${BOOT_SPACE_ALIGNED} KiB and RootFS $ROOTFS_SIZE KiB"
84 82
85 # Check if we are building with device tree support 83 # Check if we are building with device tree support
86 DTS="${@get_dts(d, '${RPI_KERNEL_VERSION}')}" 84 DTS="${@get_dts(d)}"
87 85
88 # Initialize sdcard image file 86 # Initialize sdcard image file
89 dd if=/dev/zero of=${SDIMG} bs=1024 count=0 seek=${SDIMG_SIZE} 87 dd if=/dev/zero of=${SDIMG} bs=1024 count=0 seek=${SDIMG_SIZE}
@@ -104,8 +102,8 @@ IMAGE_CMD_rpi-sdimg () {
104 mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/* ::/ 102 mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/* ::/
105 if test -n "${DTS}"; then 103 if test -n "${DTS}"; then
106 # 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 104 # 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
107 DT_OVERLAYS="${@split_overlays(d, '${RPI_KERNEL_VERSION}', 0)}" 105 DT_OVERLAYS="${@split_overlays(d, 0)}"
108 DT_ROOT="${@split_overlays(d, '${RPI_KERNEL_VERSION}', 1)}" 106 DT_ROOT="${@split_overlays(d, 1)}"
109 107
110 # Copy board device trees to root folder 108 # Copy board device trees to root folder
111 for DTB in ${DT_ROOT}; do 109 for DTB in ${DT_ROOT}; do