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 /meta-xilinx-bsp/classes | |
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>
Diffstat (limited to 'meta-xilinx-bsp/classes')
-rw-r--r-- | meta-xilinx-bsp/classes/kernel-simpleimage.bbclass | 22 |
1 files changed, 22 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 | |||