summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-xilinx-standalone-experimental/recipes-applications/ddr-self-refresh/ddr-self-refresh_2024.1.bb51
1 files changed, 51 insertions, 0 deletions
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/ddr-self-refresh/ddr-self-refresh_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-applications/ddr-self-refresh/ddr-self-refresh_2024.1.bb
new file mode 100644
index 00000000..001cefa9
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-applications/ddr-self-refresh/ddr-self-refresh_2024.1.bb
@@ -0,0 +1,51 @@
1inherit esw deploy
2
3ESW_COMPONENT_SRC = "/lib/sw_apps/ddr_self_refresh/src/"
4
5DEPENDS += "libxil xiltimer xilpm"
6
7inherit python3native
8
9do_configure:prepend() {
10 (
11 cd ${S}
12 lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC}
13 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
14 cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files
15 install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC}
16 )
17}
18
19do_generate_app_data() {
20 # This script should also not rely on relative paths and such
21 cd ${S}
22 lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S}
23 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
24}
25
26addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot
27do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
28
29do_install() {
30 install -d ${D}/${base_libdir}/firmware
31 # Note that we have to make the ELF executable for it to be stripped
32 install -m 0755 ${B}/ddr_self_refresh* ${D}/${base_libdir}/firmware
33}
34
35inherit image-artifact-names
36
37DDR_SELF_REFRESH_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
38
39do_deploy() {
40
41 # We need to deploy the stripped elf, hence why not doing it from ${D}
42 install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/ddr_self_refresh.elf ${DEPLOYDIR}/${DDR_SELF_REFRESH_BASE_NAME}.elf
43 ln -sf ${DDR_SELF_REFRESH_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf
44 ${OBJCOPY} -O binary ${WORKDIR}/package/${base_libdir}/firmware/ddr_self_refresh.elf ${WORKDIR}/package/${base_libdir}/firmware/ddr_self_refresh.bin
45 install -m 0644 ${WORKDIR}/package/${base_libdir}/firmware/ddr_self_refresh.bin ${DEPLOYDIR}/${DDR_SELF_REFRESH_BASE_NAME}.bin
46 ln -sf ${DDR_SELF_REFRESH_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin
47}
48
49addtask deploy before do_build after do_package
50
51FILES:${PN} = "${base_libdir}/firmware/ddr_self_refresh*"