diff options
Diffstat (limited to 'meta-xilinx/meta-xilinx-bsp/classes/kernel-simpleimage.bbclass')
-rw-r--r-- | meta-xilinx/meta-xilinx-bsp/classes/kernel-simpleimage.bbclass | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/meta-xilinx/meta-xilinx-bsp/classes/kernel-simpleimage.bbclass b/meta-xilinx/meta-xilinx-bsp/classes/kernel-simpleimage.bbclass new file mode 100644 index 0000000000..be70ffa387 --- /dev/null +++ b/meta-xilinx/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 +} + |