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