diff options
| author | RAM M ABINANTHAN <abinanthanramm.ramm@amd.com> | 2024-01-30 15:20:52 +0530 |
|---|---|---|
| committer | Mark Hatle <mark.hatle@amd.com> | 2024-02-03 18:40:09 -0600 |
| commit | c4bb3ad81e48abd910eb240db3af29beeb212774 (patch) | |
| tree | 14023312298c31f7914211facdddfd8c8166e3f1 | |
| parent | c8089a2ae4cd1e3dbc221ad2e2401cffda8537a0 (diff) | |
| download | meta-xilinx-c4bb3ad81e48abd910eb240db3af29beeb212774.tar.gz | |
meta-xilinx-standalone-experimental: add support for compiling srec_spi_bootloader in Yocto flow
Add recipe for srec_spi_bootloader application.
Signed-off-by: RAM M ABINANTHAN <abinanthanramm.ramm@amd.com>
Signed-off-by: Mark Hatle <mark.hatle@amd.com>
| -rw-r--r-- | meta-xilinx-standalone-experimental/recipes-applications/srec-spi-bootloader/srec-spi-bootloader_2024.1.bb | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/srec-spi-bootloader/srec-spi-bootloader_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-applications/srec-spi-bootloader/srec-spi-bootloader_2024.1.bb new file mode 100644 index 00000000..7c0f2122 --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-applications/srec-spi-bootloader/srec-spi-bootloader_2024.1.bb | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | inherit esw deploy | ||
| 2 | |||
| 3 | ESW_COMPONENT_SRC = "/lib/sw_apps/srec_spi_bootloader/src/" | ||
| 4 | |||
| 5 | DEPENDS += "libxil xiltimer" | ||
| 6 | |||
| 7 | inherit python3native | ||
| 8 | |||
| 9 | do_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 | |||
| 19 | do_install() { | ||
| 20 | install -d ${D}/${base_libdir}/firmware | ||
| 21 | # Note that we have to make the ELF executable for it to be stripped | ||
| 22 | install -m 0755 ${B}/srec_spi_bootloader* ${D}/${base_libdir}/firmware | ||
| 23 | } | ||
| 24 | |||
| 25 | inherit image-artifact-names | ||
| 26 | |||
| 27 | SREC_SPI_BOOTLOADER_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" | ||
| 28 | |||
| 29 | ESW_CUSTOM_LINKER_FILE ?= "None" | ||
| 30 | EXTRA_OECMAKE = "-DCUSTOM_LINKER_FILE=${@d.getVar('ESW_CUSTOM_LINKER_FILE')}" | ||
| 31 | |||
| 32 | do_deploy() { | ||
| 33 | |||
| 34 | # We need to deploy the stripped elf, hence why not doing it from ${D} | ||
| 35 | install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/srec_spi_bootloader.elf ${DEPLOYDIR}/${SREC_SPI_BOOTLOADER_BASE_NAME}.elf | ||
| 36 | ln -sf ${SREC_SPI_BOOTLOADER_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf | ||
| 37 | ${OBJCOPY} -O binary ${WORKDIR}/package/${base_libdir}/firmware/srec_spi_bootloader.elf ${WORKDIR}/package/${base_libdir}/firmware/srec_spi_bootloader.bin | ||
| 38 | install -m 0644 ${WORKDIR}/package/${base_libdir}/firmware/srec_spi_bootloader.bin ${DEPLOYDIR}/${SREC_SPI_BOOTLOADER_BASE_NAME}.bin | ||
| 39 | ln -sf ${SREC_SPI_BOOTLOADER_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin | ||
| 40 | } | ||
| 41 | |||
| 42 | addtask deploy before do_build after do_package | ||
| 43 | |||
| 44 | FILES:${PN} = "${base_libdir}/firmware/srec_spi_bootloader*" | ||
