diff options
author | Mark Hatle <mark.hatle@xilinx.com> | 2021-12-15 13:52:16 -0800 |
---|---|---|
committer | Mark Hatle <mark.hatle@xilinx.com> | 2021-12-22 08:19:01 -0800 |
commit | 322e23dc213d51a12345ca705b3776f189dc413f (patch) | |
tree | e257ca97fa6d3eef83c845b67d711b2d8ecba5ba /meta-xilinx-core/classes/kernel-simpleimage.bbclass | |
parent | dd95dde009dc7968f6e6e4c0609e7b443c55c627 (diff) | |
download | meta-xilinx-322e23dc213d51a12345ca705b3776f189dc413f.tar.gz |
Initial restructure/split of meta-xilinx-bsp
Create a new meta-xilinx-core, move core functionality to the core, keeping
board specific files in the bsp layer.
zynqmp-generic changed from require <board> to include, so if meta-xilinx-bsp
is not available it will not fail.
Signed-off-by: Mark Hatle <mark.hatle@xilinx.com>
Diffstat (limited to 'meta-xilinx-core/classes/kernel-simpleimage.bbclass')
-rw-r--r-- | meta-xilinx-core/classes/kernel-simpleimage.bbclass | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/meta-xilinx-core/classes/kernel-simpleimage.bbclass b/meta-xilinx-core/classes/kernel-simpleimage.bbclass new file mode 100644 index 00000000..110ee254 --- /dev/null +++ b/meta-xilinx-core/classes/kernel-simpleimage.bbclass | |||
@@ -0,0 +1,35 @@ | |||
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 [ -z "${type##*simpleImage*}" ] && [ ${ARCH} = "microblaze" ]; then | ||
17 | ext="${type##*.}" | ||
18 | # Microblaze simpleImage only works with dts file | ||
19 | cp ${RECIPE_SYSROOT}/boot/devicetree/${ext}.dts ${B}/arch/${ARCH}/boot/dts/ | ||
20 | fi | ||
21 | done | ||
22 | } | ||
23 | |||
24 | do_deploy:append () { | ||
25 | for type in ${KERNEL_IMAGETYPES} ; do | ||
26 | if [ -z "${type##*simpleImage*}" ] && [ ${ARCH} = "microblaze" ]; then | ||
27 | base_name=${type}-${KERNEL_IMAGE_NAME} | ||
28 | install -m 0644 ${KERNEL_OUTPUT_DIR}/${type}.strip $deployDir/${base_name}.strip | ||
29 | install -m 0644 ${KERNEL_OUTPUT_DIR}/${type}.unstrip $deployDir/${base_name}.unstrip | ||
30 | symlink_name=${type}-${KERNEL_IMAGE_LINK_NAME} | ||
31 | ln -sf ${base_name}.strip $deployDir/${symlink_name}.strip | ||
32 | ln -sf ${base_name}.unstrip $deployDir/${symlink_name}.unstrip | ||
33 | fi | ||
34 | done | ||
35 | } | ||