diff options
| author | Appana Durga Kedareswara rao <appana.durga.rao@xilinx.com> | 2019-12-10 11:11:08 +0530 |
|---|---|---|
| committer | Mark Hatle <mark.hatle@xilinx.com> | 2020-02-27 08:33:25 -0800 |
| commit | 9bf7e5020264a52188fbb203b6509bb87e3afdf8 (patch) | |
| tree | 85ded746a6b468d3e3ece81285593df105b3e6ff /meta-xilinx-standalone/classes | |
| parent | ed70e2e44ef347b956c9efefcdbc39764b8a8547 (diff) | |
| download | meta-xilinx-9bf7e5020264a52188fbb203b6509bb87e3afdf8.tar.gz | |
meta-xilinx-standalone: classes: Add bbclass for building esw examples
This patch adds bbclass which contains the common code for building the
esw examples.
This class does the below
--> Task generate_eglist generates the linker script for the given dtb
along with this it updates EXAMPLE_LIST CMAKE variable for the recipe.
--> deploys the images to the tmp/deploy folder.
Signed-off-by: Appana Durga Kedareswara rao <appana.durga.rao@xilinx.com>
Diffstat (limited to 'meta-xilinx-standalone/classes')
| -rw-r--r-- | meta-xilinx-standalone/classes/esw_examples.bbclass | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/meta-xilinx-standalone/classes/esw_examples.bbclass b/meta-xilinx-standalone/classes/esw_examples.bbclass new file mode 100644 index 00000000..8b59ccb9 --- /dev/null +++ b/meta-xilinx-standalone/classes/esw_examples.bbclass | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | inherit esw deploy | ||
| 2 | |||
| 3 | DEPENDS += "dtc-native python3-pyyaml-native xilstandalone xiltimer device-tree" | ||
| 4 | |||
| 5 | do_generate_eglist () { | ||
| 6 | cd ${S} | ||
| 7 | nativepython3 ${S}/scripts/example.py -d ${DTBFILE} -o ${OECMAKE_SOURCEPATH} | ||
| 8 | } | ||
| 9 | addtask generate_eglist before do_configure after do_prepare_recipe_sysroot | ||
| 10 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
| 11 | |||
| 12 | do_install() { | ||
| 13 | install -d ${D}/${base_libdir}/firmware | ||
| 14 | install -m 0755 ${B}/*.elf ${D}/${base_libdir}/firmware | ||
| 15 | } | ||
| 16 | |||
| 17 | do_deploy() { | ||
| 18 | install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/*.elf ${DEPLOYDIR}/ | ||
| 19 | } | ||
| 20 | addtask deploy before do_build after do_package | ||
| 21 | |||
| 22 | FILES_${PN} = "${base_libdir}/firmware/*.elf" | ||
