From: AshishKumar Mishra <emailaddress.ashish@gmail.com>
To: openembedded-devel@lists.openembedded.org
Cc: AshishKumar Mishra <emailaddress.ashish@gmail.com>
Subject: [meta-openembedded][PATCH v3 2/3] android-tools: export libsparse/libbase/liblog headers and libs to sysroot
Date: Tue, 21 Jul 2026 21:56:43 +0530 [thread overview]
Message-ID: <20260721162645.2056048-3-emailaddress.ashish@gmail.com> (raw)
In-Reply-To: <20260721162645.2056048-1-emailaddress.ashish@gmail.com>
Export libsparse, libbase, and liblog headers and libraries to the sysroot.
Currently, these are often internal to the build.
Reorganise header installation to ${includedir}/sparse to match the expected
include paths for e2fsprogs contrib tools.
Signed-off-by: AshishKumar Mishra <emailaddress.ashish@gmail.com>
---
.../android-tools/android-tools_%.bbappend | 54 +++++++++++++++++++
1 file changed, 54 insertions(+)
create mode 100644 meta-oe/recipes-devtools/android-tools/android-tools_%.bbappend
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools_%.bbappend b/meta-oe/recipes-devtools/android-tools/android-tools_%.bbappend
new file mode 100644
index 0000000000..50c54145b8
--- /dev/null
+++ b/meta-oe/recipes-devtools/android-tools/android-tools_%.bbappend
@@ -0,0 +1,54 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+
+# e2fsprogs expecting headers in sparse/ subdirectory
+do_install:append:class-native() {
+ # to resolve the "Multiple shlib providers" conflict.
+ rm -f ${D}${libdir}/android/libsparse.so*
+ rm -f ${D}${libdir}/android/libbase.so*
+ rm -f ${D}${libdir}/android/liblog.so*
+
+ if [ -d "${S}/system/core/libsparse/include/sparse" ]; then
+ install -d ${D}${includedir}/sparse
+ cp -r ${S}/system/core/libsparse/include/sparse/* ${D}${includedir}/sparse/
+ else
+ bbfatal "Sparse headers not found in ${S}/system/core/libsparse/include/sparse"
+ fi
+
+ install -d ${D}${libdir}
+ for lib in libsparse libbase liblog; do
+ if [ -f "${S}/debian/out/system/${lib}.so" ]; then
+ bbnote "Installing ${lib} from ${S}/debian/out/system/${lib}.so"
+ install -m 0755 ${S}/debian/out/system/${lib}.so ${D}${libdir}/${lib}.so.0
+ ln -sf ${lib}.so.0 ${D}${libdir}/${lib}.so
+ elif [ -f "${S}/debian/out/system/${lib}.so.0" ]; then
+ bbnote "Installing ${lib} from ${S}/debian/out/system/${lib}.so.0"
+ install -m 0755 ${S}/debian/out/system/${lib}.so.0 ${D}${libdir}/${lib}.so.0
+ ln -sf ${lib}.so.0 ${D}${libdir}/${lib}.so
+ else
+ bberror "${lib} not found in ${S}/debian/out/system"
+ fi
+ done
+
+ install -d ${D}${libdir}/android
+ for lib in libsparse libbase liblog; do
+ if [ -f "${D}${libdir}/${lib}.so.0" ]; then
+ ln -sf ../${lib}.so.0 ${D}${libdir}/android/${lib}.so.0
+ ln -sf ../${lib}.so ${D}${libdir}/android/${lib}.so
+ fi
+ done
+}
+
+FILES:${PN}-dev += " \
+ ${includedir}/sparse \
+ ${libdir}/lib*.so \
+ ${libdir}/android/lib*.so \
+"
+
+FILES:${PN} += " \
+ ${libdir}/lib*.so.* \
+ ${libdir}/android/lib*.so.* \
+"
+
+SYSROOT_DIRS:append:class-native = " ${includedir} ${libdir}"
+
+DEPENDS:append:class-native = " googletest-native"
--
2.43.0
next prev parent reply other threads:[~2026-07-21 16:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-21 16:26 [meta-openembedded][PATCH v3 0/3] image_types_sparse: use ext2simg_android for ext* sparse images AshishKumar Mishra
2026-07-21 16:26 ` [meta-openembedded][PATCH v3 1/3] e2fsprogs-ext4sparse-native: compiles ext2simg.c using android-tools-native AshishKumar Mishra
2026-07-21 16:26 ` AshishKumar Mishra [this message]
2026-07-21 16:26 ` [meta-openembedded][PATCH v3 3/3] image_types_sparse: switch ext* conversion to ext2simg_android AshishKumar Mishra
2026-07-21 16:29 ` [meta-openembedded][PATCH v3 0/3] image_types_sparse: use ext2simg_android for ext* sparse images AshishKumar Mishra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260721162645.2056048-3-emailaddress.ashish@gmail.com \
--to=emailaddress.ashish@gmail.com \
--cc=openembedded-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox