diff options
author | Jonathan Liu <net147@gmail.com> | 2016-10-06 19:09:06 -0700 |
---|---|---|
committer | Andrei Gherzan <andrei@resin.io> | 2016-10-13 10:39:59 +0200 |
commit | 41689e8fe2ee0ff83fc94fbb3a12ebcab648106b (patch) | |
tree | 04bae1a5c3c3f4c101b2b064c807d7d654864087 /classes/sdcard_image-rpi.bbclass | |
parent | 5697e77ec4b53c2f4618d20bfe0af16cd3dee604 (diff) | |
download | meta-raspberrypi-41689e8fe2ee0ff83fc94fbb3a12ebcab648106b.tar.gz |
sdcard_image-rpi.bbclass: Remove redundant RPI_KERNEL_VERSION
The value of the RPI_KERNEL_VERSION can change between None and the
kernel version which can result in taskhash mismatch errors while
building images.
The taskhash mismatch errors can be reproduced using:
bitbake -c cleansstate virtual/kernel core-image-minimal && bitbake core-image-minimal
The get_dts() and split_overlays() functions are modified so that the
kernel version argument is optional. If the version is not supplied to
these functions, they will fallback to the Python equivalent of the
expression used for RPI_KERNEL_VERSION.
Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'classes/sdcard_image-rpi.bbclass')
-rw-r--r-- | classes/sdcard_image-rpi.bbclass | 8 |
1 files changed, 3 insertions, 5 deletions
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. |
72 | FATPAYLOAD ?= "" | 72 | FATPAYLOAD ?= "" |
73 | 73 | ||
74 | RPI_KERNEL_VERSION := "${@get_kernelversion_file('${STAGING_KERNEL_BUILDDIR}')}" | ||
75 | |||
76 | IMAGE_CMD_rpi-sdimg () { | 74 | IMAGE_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 |