diff options
author | John Toomey <john.toomey@amd.com> | 2025-01-29 17:54:03 +0000 |
---|---|---|
committer | Mark Hatle <mark.hatle@amd.com> | 2025-03-30 14:16:15 -0600 |
commit | 166b86d36dda24d2bbaa2fd2ffbbc16fbd0e58da (patch) | |
tree | 6932fbac047f1648e800b534a2cbea6f99d9f34c | |
parent | 9efbabf63a43e321b30658a2f6d9c535f3896cac (diff) | |
download | meta-xilinx-166b86d36dda24d2bbaa2fd2ffbbc16fbd0e58da.tar.gz |
bmap-writer: Backport bmap-writer and libtinyxml2
Backport bmap-writer recipe from meta-openembedded master
Signed-off-by: John Toomey <john.toomey@amd.com>
Signed-off-by: Mark Hatle <mark.hatle@amd.com>
3 files changed, 70 insertions, 0 deletions
diff --git a/meta-xilinx-core/recipes-support/bmap-writer/bmap-writer_git.bb b/meta-xilinx-core/recipes-support/bmap-writer/bmap-writer_git.bb new file mode 100644 index 00000000..c0516f0c --- /dev/null +++ b/meta-xilinx-core/recipes-support/bmap-writer/bmap-writer_git.bb | |||
@@ -0,0 +1,26 @@ | |||
1 | # Backported from meta-openembedded master - updated to latest commit which requires libtinyxml2 | ||
2 | # https://git.openembedded.org/meta-openembedded/tree/meta-oe/recipes-support/bmap-writer/bmap-writer_git.bb | ||
3 | |||
4 | SUMMARY = "bmaptool alternative written in C++" | ||
5 | DESCRIPTION = "bmap-writer is a command-line utility designed to efficiently write disk images \ | ||
6 | to storage devices using block mapping (BMAP). It serves as \ | ||
7 | a lightweight alternative to the Yocto BMAP tool, \ | ||
8 | bmap-writer is C++ based does not require Python and focuses solely on writing an image." | ||
9 | HOMEPAGE = "https://github.com/embetrix/bmap-writer" | ||
10 | SECTION = "console/utils" | ||
11 | |||
12 | LICENSE = "GPL-3.0-only" | ||
13 | LIC_FILES_CHKSUM = "file://LICENSE;md5=e49f4652534af377a713df3d9dec60cb" | ||
14 | |||
15 | SRC_URI = "git://github.com/embetrix/${BPN};branch=master;protocol=https" | ||
16 | SRCREV = "cd94d9f1fee34215bd761d05838bc7b4dbebfacc" | ||
17 | S = "${WORKDIR}/git" | ||
18 | |||
19 | DEPENDS = "libtinyxml2 libarchive" | ||
20 | inherit cmake pkgconfig | ||
21 | |||
22 | EXTRA_OEMAKE += 'LIBXML2_HEADER_PATH="${STAGING_INCDIR}/libxml2"' | ||
23 | |||
24 | FILES:${PN} = "${bindir}/bmap-writer" | ||
25 | |||
26 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/meta-xilinx-core/recipes-support/libtinyxml2/files/run-ptest b/meta-xilinx-core/recipes-support/libtinyxml2/files/run-ptest new file mode 100644 index 00000000..87091267 --- /dev/null +++ b/meta-xilinx-core/recipes-support/libtinyxml2/files/run-ptest | |||
@@ -0,0 +1,10 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | for i in `ls xmltest`; do | ||
4 | ./$i | ||
5 | if [ $? -eq 0 ]; then | ||
6 | echo "PASS: $i" | ||
7 | else | ||
8 | echo "FAIL: $i" | ||
9 | fi | ||
10 | done | ||
diff --git a/meta-xilinx-core/recipes-support/libtinyxml2/libtinyxml2_10.0.0.bb b/meta-xilinx-core/recipes-support/libtinyxml2/libtinyxml2_10.0.0.bb new file mode 100644 index 00000000..c27bd452 --- /dev/null +++ b/meta-xilinx-core/recipes-support/libtinyxml2/libtinyxml2_10.0.0.bb | |||
@@ -0,0 +1,34 @@ | |||
1 | # Backported from meta-openembedded master | ||
2 | # https://git.openembedded.org/meta-openembedded/tree/meta-oe/recipes-support/libtinyxml2/libtinyxml2_10.0.0.bb | ||
3 | |||
4 | SUMMARY = "TinyXML-2 is a simple, small, efficient, C++ XML parser that can be easily integrating into other programs" | ||
5 | HOMEPAGE = "https://leethomason.github.io/tinyxml2" | ||
6 | SECTION = "libs" | ||
7 | LICENSE = "Zlib" | ||
8 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=135624eef03e1f1101b9ba9ac9b5fffd" | ||
9 | CVE_PRODUCT = "tinyxml2" | ||
10 | |||
11 | SRCREV = "321ea883b7190d4e85cae5512a12e5eaa8f8731f" | ||
12 | SRC_URI = "git://github.com/leethomason/tinyxml2.git;branch=master;protocol=https \ | ||
13 | file://run-ptest" | ||
14 | |||
15 | S = "${WORKDIR}/git" | ||
16 | |||
17 | inherit meson ptest | ||
18 | |||
19 | EXTRA_OEMESON += " \ | ||
20 | ${@bb.utils.contains('PTEST_ENABLED', '1', '-Dtests=true', '', d)} \ | ||
21 | -Ddefault_library=both \ | ||
22 | " | ||
23 | |||
24 | CXXFLAGS:append:libc-musl = " -D_LARGEFILE64_SOURCE" | ||
25 | |||
26 | do_install_ptest() { | ||
27 | install -Dm 0755 ${B}/xmltest ${D}${PTEST_PATH}/xmltest | ||
28 | install -d ${D}${PTEST_PATH}/resources/out | ||
29 | for f in ${S}/resources/*.xml; do | ||
30 | install -m 0644 $f ${D}${PTEST_PATH}/resources/ | ||
31 | done | ||
32 | } | ||
33 | |||
34 | BBCLASSEXTEND = "native nativesdk" | ||