diff options
author | Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com> | 2018-11-19 09:40:06 -0800 |
---|---|---|
committer | Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com> | 2019-01-01 20:03:46 -0800 |
commit | c767e4b5ef2b91b16767117607feb31191f24df8 (patch) | |
tree | 2e15ceba029a142b0cd96412f816957772fe4163 | |
parent | 6217bd74d4fd47c20cd243945a91b6d73a605c28 (diff) | |
download | meta-xilinx-c767e4b5ef2b91b16767117607feb31191f24df8.tar.gz |
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.bbclass | 22 | ||||
-rw-r--r-- | meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx.inc | 2 |
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 00000000..be70ffa3 --- /dev/null +++ b/meta-xilinx-bsp/classes/kernel-simpleimage.bbclass | |||
@@ -0,0 +1,22 @@ | |||
1 | python __anonymous () { | ||
2 | kerneltypes = set((d.getVar("KERNEL_IMAGETYPE") or "").split()) | ||
3 | kerneltypes |= set((d.getVar("KERNEL_IMAGETYPES") or "").split()) | ||
4 | if any(t.startswith("simpleImage.") for t in kerneltypes): | ||
5 | # Enable building of simpleImage | ||
6 | bb.build.addtask('do_prep_simpleimage', 'do_compile', 'do_configure', d) | ||
7 | uarch = d.getVar("UBOOT_ARCH") | ||
8 | if uarch == "microblaze": | ||
9 | d.appendVarFlag('do_prep_simpleimage', 'depends', ' virtual/dtb:do_populate_sysroot') | ||
10 | } | ||
11 | |||
12 | do_prep_simpleimage[dirs] += "${B}" | ||
13 | do_prep_simpleimage () { | ||
14 | install -d ${B}/arch/${ARCH}/boot/dts | ||
15 | for type in ${KERNEL_IMAGETYPES} ; do | ||
16 | if [[ "${type}" =~ "simpleImage" ]] && [ ${ARCH} = "microblaze" ]; then | ||
17 | ext="${type##*.}" | ||
18 | cp ${RECIPE_SYSROOT}/boot/devicetree/${ext}.dtb ${B}/arch/${ARCH}/boot/dts/ | ||
19 | fi | ||
20 | done | ||
21 | } | ||
22 | |||
diff --git a/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx.inc b/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx.inc index 3022b285..ec056db4 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 () { | |||
23 | [ -n "${KBUILD_DEFCONFIG}" ] && [ -e ${WORKDIR}/defconfig ] && rm ${WORKDIR}/defconfig | 23 | [ -n "${KBUILD_DEFCONFIG}" ] && [ -e ${WORKDIR}/defconfig ] && rm ${WORKDIR}/defconfig |
24 | } | 24 | } |
25 | 25 | ||
26 | inherit kernel-simpleimage | ||
27 | |||
26 | # Default to be only compatible with specific machines or soc families | 28 | # Default to be only compatible with specific machines or soc families |
27 | COMPATIBLE_MACHINE ?= "^$" | 29 | COMPATIBLE_MACHINE ?= "^$" |
28 | COMPATIBLE_MACHINE_zynq = ".*" | 30 | COMPATIBLE_MACHINE_zynq = ".*" |