From: Khem Raj <raj.khem@gmail.com>
To: yocto@yoctoproject.org
Subject: [meta-raspberrypi][PATCH 4/4] sdcard_image-rpi.bbclass: Remove redundant RPI_KERNEL_VERSION
Date: Thu, 6 Oct 2016 19:09:06 -0700 [thread overview]
Message-ID: <20161007020906.32228-4-raj.khem@gmail.com> (raw)
In-Reply-To: <20161007020906.32228-1-raj.khem@gmail.com>
From: Jonathan Liu <net147@gmail.com>
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>
---
classes/linux-raspberrypi-base.bbclass | 4 ++--
classes/sdcard_image-rpi.bbclass | 8 +++-----
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 @@
inherit linux-kernel-base
-def get_dts(d, ver):
+def get_dts(d, ver=None):
import re
staging_dir = d.getVar("STAGING_KERNEL_BUILDDIR", True)
@@ -32,7 +32,7 @@ def get_dts(d, ver):
return dts
-def split_overlays(d, ver, out):
+def split_overlays(d, out, ver=None):
dts = get_dts(d, ver)
if out:
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"
# Additional files and/or directories to be copied into the vfat partition from the IMAGE_ROOTFS.
FATPAYLOAD ?= ""
-RPI_KERNEL_VERSION := "${@get_kernelversion_file('${STAGING_KERNEL_BUILDDIR}')}"
-
IMAGE_CMD_rpi-sdimg () {
# Align partitions
@@ -83,7 +81,7 @@ IMAGE_CMD_rpi-sdimg () {
echo "Creating filesystem with Boot partition ${BOOT_SPACE_ALIGNED} KiB and RootFS $ROOTFS_SIZE KiB"
# Check if we are building with device tree support
- DTS="${@get_dts(d, '${RPI_KERNEL_VERSION}')}"
+ DTS="${@get_dts(d)}"
# Initialize sdcard image file
dd if=/dev/zero of=${SDIMG} bs=1024 count=0 seek=${SDIMG_SIZE}
@@ -104,8 +102,8 @@ IMAGE_CMD_rpi-sdimg () {
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/* ::/
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, '${RPI_KERNEL_VERSION}', 0)}"
- DT_ROOT="${@split_overlays(d, '${RPI_KERNEL_VERSION}', 1)}"
+ DT_OVERLAYS="${@split_overlays(d, 0)}"
+ DT_ROOT="${@split_overlays(d, 1)}"
# Copy board device trees to root folder
for DTB in ${DT_ROOT}; do
--
2.10.0
next prev parent reply other threads:[~2016-10-07 2:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-07 2:09 [meta-raspberrypi][PATCH 1/4] linux-raspberrypi_4.4: Upgrade to 4.4.23 Khem Raj
2016-10-07 2:09 ` [meta-raspberrypi][PATCH 2/4] userland: Upgrade to latest Khem Raj
2016-10-07 2:09 ` [meta-raspberrypi][PATCH 3/4] firmware: " Khem Raj
2016-10-07 2:09 ` Khem Raj [this message]
2016-10-10 5:14 ` [meta-raspberrypi][PATCH 4/4] sdcard_image-rpi.bbclass: Remove redundant RPI_KERNEL_VERSION Gary Thomas
2016-10-14 7:16 ` [meta-raspberrypi][PATCH 1/4] linux-raspberrypi_4.4: Upgrade to 4.4.23 Andrei Gherzan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161007020906.32228-4-raj.khem@gmail.com \
--to=raj.khem@gmail.com \
--cc=yocto@yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.