Message ID | 20230602112426.28353-1-sbabic@denx.de |
---|---|
State | New |
Headers | show |
Series | mtd-utils: export headers and libraries for MTD and UBI | expand |
On Fri, 2023-06-02 at 13:24 +0200, Stefano Babic wrote: > Mtd-utils has internal libraries (libmtd and libubi) that simplify the > usage and access, and they can be used by applications to access MTD > devices without reinventing the code. Does upstream plan to turn these into a shared library if people are using them like this? Cheers, Richard
Hi Richard, On 02.06.23 14:02, Richard Purdie wrote: > On Fri, 2023-06-02 at 13:24 +0200, Stefano Babic wrote: >> Mtd-utils has internal libraries (libmtd and libubi) that simplify the >> usage and access, and they can be used by applications to access MTD >> devices without reinventing the code. > > Does upstream plan to turn these into a shared library if people are > using them like this? Not yet, I will push changes if this happen. I am not sure if tthis can be done soon: mtd-utils and these libraries are GPL-2 and not LGPL, and they can be used just by GPL2 compliant projects. Best regards, Stefano
diff --git a/meta/recipes-devtools/mtd/mtd-utils_git.bb b/meta/recipes-devtools/mtd/mtd-utils_git.bb index 2d76991d2f..cdcc766748 100644 --- a/meta/recipes-devtools/mtd/mtd-utils_git.bb +++ b/meta/recipes-devtools/mtd/mtd-utils_git.bb @@ -55,6 +55,14 @@ ALTERNATIVE_LINK_NAME[flashcp] = "${sbindir}/flashcp" do_install () { oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} INCLUDEDIR=${includedir} + install -d ${D}${includedir}/mtd + install -d ${D}${libdir} + install -m 0644 ${S}/include/libubi.h ${D}${includedir} + install -m 0644 ${S}/include/libmtd.h ${D}${includedir} + install -m 0644 ${S}/include/libscan.h ${D}${includedir} + install -m 0644 ${S}/include/libubigen.h ${D}${includedir} + oe_libinstall -a libubi ${D}${libdir}/ + oe_libinstall -a libmtd ${D}${libdir}/ } PACKAGES =+ "mtd-utils-misc mtd-utils-tests"
Mtd-utils has internal libraries (libmtd and libubi) that simplify the usage and access, and they can be used by applications to access MTD devices without reinventing the code. Signed-off-by: Stefano Babic <sbabic@denx.de> --- meta/recipes-devtools/mtd/mtd-utils_git.bb | 8 ++++++++ 1 file changed, 8 insertions(+)