aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManjukumar Matha <manjukumar.harthikote-matha@xilinx.com>2018-11-19 09:40:06 -0800
committerManjukumar Matha <manjukumar.harthikote-matha@xilinx.com>2019-01-01 20:03:46 -0800
commitc767e4b5ef2b91b16767117607feb31191f24df8 (patch)
tree2e15ceba029a142b0cd96412f816957772fe4163
parent6217bd74d4fd47c20cd243945a91b6d73a605c28 (diff)
downloadmeta-xilinx-c767e4b5ef2b91b16767117607feb31191f24df8.tar.gz
meta-xilinx-c767e4b5ef2b91b16767117607feb31191f24df8.tar.bz2
meta-xilinx-c767e4b5ef2b91b16767117607feb31191f24df8.zip
linux-xlnx.inc: Add support for simpleImage
Add a new class to enable build simpleImage. Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com>
-rw-r--r--meta-xilinx-bsp/classes/kernel-simpleimage.bbclass22
-rw-r--r--meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx.inc2
2 files changed, 24 insertions, 0 deletions
diff --git a/meta-xilinx-bsp/classes/kernel-simpleimage.bbclass b/meta-xilinx-bsp/classes/kernel-simpleimage.bbclass
new file mode 100644
index 0000000..be70ffa
--- /dev/null
+++ b/meta-xilinx-bsp/classes/kernel-simpleimage.bbclass
@@ -0,0 +1,22 @@
+python __anonymous () {
+ kerneltypes = set((d.getVar("KERNEL_IMAGETYPE") or "").split())
+ kerneltypes |= set((d.getVar("KERNEL_IMAGETYPES") or "").split())
+ if any(t.startswith("simpleImage.") for t in kerneltypes):
+ # Enable building of simpleImage
+ bb.build.addtask('do_prep_simpleimage', 'do_compile', 'do_configure', d)
+ uarch = d.getVar("UBOOT_ARCH")
+ if uarch == "microblaze":
+ d.appendVarFlag('do_prep_simpleimage', 'depends', ' virtual/dtb:do_populate_sysroot')
+}
+
+do_prep_simpleimage[dirs] += "${B}"
+do_prep_simpleimage () {
+ install -d ${B}/arch/${ARCH}/boot/dts
+ for type in ${KERNEL_IMAGETYPES} ; do
+ if [[ "${type}" =~ "simpleImage" ]] && [ ${ARCH} = "microblaze" ]; then
+ ext="${type##*.}"
+ cp ${RECIPE_SYSROOT}/boot/devicetree/${ext}.dtb ${B}/arch/${ARCH}/boot/dts/
+ fi
+ done
+}
+
diff --git a/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx.inc b/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx.inc
index 3022b28..ec056db 100644
--- a/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx.inc
+++ b/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx.inc
@@ -23,6 +23,8 @@ do_kernel_metadata_prepend () {
[ -n "${KBUILD_DEFCONFIG}" ] && [ -e ${WORKDIR}/defconfig ] && rm ${WORKDIR}/defconfig
}
+inherit kernel-simpleimage
+
# Default to be only compatible with specific machines or soc families
COMPATIBLE_MACHINE ?= "^$"
COMPATIBLE_MACHINE_zynq = ".*"