From c767e4b5ef2b91b16767117607feb31191f24df8 Mon Sep 17 00:00:00 2001 From: Manjukumar Matha Date: Mon, 19 Nov 2018 09:40:06 -0800 Subject: linux-xlnx.inc: Add support for simpleImage Add a new class to enable build simpleImage. Signed-off-by: Manjukumar Matha --- meta-xilinx-bsp/classes/kernel-simpleimage.bbclass | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 meta-xilinx-bsp/classes/kernel-simpleimage.bbclass (limited to 'meta-xilinx-bsp/classes') diff --git a/meta-xilinx-bsp/classes/kernel-simpleimage.bbclass b/meta-xilinx-bsp/classes/kernel-simpleimage.bbclass new file mode 100644 index 00000000..be70ffa3 --- /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 +} + -- cgit v1.2.3-54-g00ecf