diff options
Diffstat (limited to 'meta-xilinx-standalone-experimental/classes-recipe/esw_examples.bbclass')
-rw-r--r-- | meta-xilinx-standalone-experimental/classes-recipe/esw_examples.bbclass | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/meta-xilinx-standalone-experimental/classes-recipe/esw_examples.bbclass b/meta-xilinx-standalone-experimental/classes-recipe/esw_examples.bbclass new file mode 100644 index 00000000..9a94f3cd --- /dev/null +++ b/meta-xilinx-standalone-experimental/classes-recipe/esw_examples.bbclass | |||
@@ -0,0 +1,36 @@ | |||
1 | inherit esw deploy python3native | ||
2 | |||
3 | DEPENDS += "python3-dtc-native python3-pyyaml-native xilstandalone libxil xiltimer" | ||
4 | |||
5 | do_configure:prepend() { | ||
6 | ( | ||
7 | cd ${S} | ||
8 | lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} | ||
9 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
10 | cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files | ||
11 | ) | ||
12 | } | ||
13 | |||
14 | ESW_CUSTOM_LINKER_FILE ?= "None" | ||
15 | EXTRA_OECMAKE = "-DCUSTOM_LINKER_FILE=${@d.getVar('ESW_CUSTOM_LINKER_FILE')}" | ||
16 | |||
17 | do_generate_eglist () { | ||
18 | cd ${S} | ||
19 | lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} drvcmake_metadata | ||
20 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
21 | } | ||
22 | addtask generate_eglist before do_configure after do_prepare_recipe_sysroot | ||
23 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
24 | |||
25 | do_install() { | ||
26 | install -d ${D}/${base_libdir}/firmware | ||
27 | install -m 0755 ${B}/*.elf ${D}/${base_libdir}/firmware | ||
28 | } | ||
29 | |||
30 | do_deploy() { | ||
31 | install -d ${DEPLOYDIR}/${BPN}/ | ||
32 | install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/*.elf ${DEPLOYDIR}/${BPN}/ | ||
33 | } | ||
34 | addtask deploy before do_build after do_package | ||
35 | |||
36 | FILES:${PN} = "${base_libdir}/firmware/*.elf" | ||