summaryrefslogtreecommitdiffstats
path: root/meta-xilinx-standalone-experimental/classes-recipe/esw_examples.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta-xilinx-standalone-experimental/classes-recipe/esw_examples.bbclass')
-rw-r--r--meta-xilinx-standalone-experimental/classes-recipe/esw_examples.bbclass36
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 @@
1inherit esw deploy python3native
2
3DEPENDS += "python3-dtc-native python3-pyyaml-native xilstandalone libxil xiltimer"
4
5do_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
14ESW_CUSTOM_LINKER_FILE ?= "None"
15EXTRA_OECMAKE = "-DCUSTOM_LINKER_FILE=${@d.getVar('ESW_CUSTOM_LINKER_FILE')}"
16
17do_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}
22addtask generate_eglist before do_configure after do_prepare_recipe_sysroot
23do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
24
25do_install() {
26 install -d ${D}/${base_libdir}/firmware
27 install -m 0755 ${B}/*.elf ${D}/${base_libdir}/firmware
28}
29
30do_deploy() {
31 install -d ${DEPLOYDIR}/${BPN}/
32 install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/*.elf ${DEPLOYDIR}/${BPN}/
33}
34addtask deploy before do_build after do_package
35
36FILES:${PN} = "${base_libdir}/firmware/*.elf"