Message ID | 20200707082932.3990864-1-sbabic@denx.de |
---|---|
State | Changes Requested |
Headers | show |
Series | mtd-utils: Use include dir that upstream suggests | expand |
Am 07.07.20 um 10:29 schrieb Stefano Babic: > This prepares to move mtd headers in /usr/include instead of the mtd/ > namespace used by kernel. This will be synchronized with future dev > packages for mtd-utils that will be merged into Linux distros (Debian). > For a while, the OE recipe will still contain links to the old path to > be compatible with previous SWUpdate release. The links should be > dropped in future. > > Signed-off-by: Stefano Babic <sbabic@denx.de> > CC: Bastian Germann <bage@linutronix.de> > --- > recipes-devtools/mtd/mtd-utils_%.bbappend | 15 ++++++++++----- > 1 file changed, 10 insertions(+), 5 deletions(-) > > diff --git a/recipes-devtools/mtd/mtd-utils_%.bbappend b/recipes-devtools/mtd/mtd-utils_%.bbappend > index 7ffbb0c..7c4a1c5 100644 > --- a/recipes-devtools/mtd/mtd-utils_%.bbappend > +++ b/recipes-devtools/mtd/mtd-utils_%.bbappend > @@ -3,11 +3,16 @@ FILES_${PN}-staticdev += "ubi-utils/libubi.a ${libdir}/*.a" > do_install_append () { > install -d ${D}${includedir}/mtd/ > install -d ${D}${libdir}/ > - install -m 0644 ${S}/include/libubi.h ${D}${includedir}/mtd/ > - install -m 0644 ${S}/include/libmtd.h ${D}${includedir}/mtd/ > - install -m 0644 ${S}/include/mtd/ubi-media.h ${D}${includedir}/mtd/ mtd/ubi-media.h is a private kernel header that should stay in the mtd/ namespace. Instead of installing the header one could apply two mtd-utils commits that I handed in to get rid of depending on that header: 87809c4804d3355ecd2fd0bd3362526fa27bf953 42e051acd32c28c2f93c946d0c4bf6f9eada2aa4 Unfortunately, they are not in any released version yet. > - #oe_libinstall -a -C ubi-utils libubi ${D}${libdir}/ > - #oe_libinstall -a -C lib libmtd ${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} > + install -m 0644 ${S}/include/mtd/ubi-media.h ${D}${includedir} > + ln -s ../libubi.h ${D}${includedir}/mtd/libubi.h > + ln -s ../libmtd.h ${D}${includedir}/mtd/libmtd.h > + ln -s ../libscan.h ${D}${includedir}/mtd/libscan.h > + ln -s ../libubigen.h ${D}${includedir}/mtd/libubigen.h > + ln -s ../ubi-media.h ${D}${includedir}/mtd/ubi-media.h > oe_libinstall -a libubi ${D}${libdir}/ > oe_libinstall -a libmtd ${D}${libdir}/ > } >
On 07.07.20 10:35, Bastian Germann wrote: > Am 07.07.20 um 10:29 schrieb Stefano Babic: >> This prepares to move mtd headers in /usr/include instead of the mtd/ >> namespace used by kernel. This will be synchronized with future dev >> packages for mtd-utils that will be merged into Linux distros (Debian). >> For a while, the OE recipe will still contain links to the old path to >> be compatible with previous SWUpdate release. The links should be >> dropped in future. >> >> Signed-off-by: Stefano Babic <sbabic@denx.de> >> CC: Bastian Germann <bage@linutronix.de> >> --- >> recipes-devtools/mtd/mtd-utils_%.bbappend | 15 ++++++++++----- >> 1 file changed, 10 insertions(+), 5 deletions(-) >> >> diff --git a/recipes-devtools/mtd/mtd-utils_%.bbappend b/recipes-devtools/mtd/mtd-utils_%.bbappend >> index 7ffbb0c..7c4a1c5 100644 >> --- a/recipes-devtools/mtd/mtd-utils_%.bbappend >> +++ b/recipes-devtools/mtd/mtd-utils_%.bbappend >> @@ -3,11 +3,16 @@ FILES_${PN}-staticdev += "ubi-utils/libubi.a ${libdir}/*.a" >> do_install_append () { >> install -d ${D}${includedir}/mtd/ >> install -d ${D}${libdir}/ >> - install -m 0644 ${S}/include/libubi.h ${D}${includedir}/mtd/ >> - install -m 0644 ${S}/include/libmtd.h ${D}${includedir}/mtd/ >> - install -m 0644 ${S}/include/mtd/ubi-media.h ${D}${includedir}/mtd/ > > mtd/ubi-media.h is a private kernel header that should stay in the mtd/ > namespace. Yes, but without it, build breaks for any SWUpdate release including 2020.04. Agree it should be removed in future, but I also need that at least the current release is not broken. > > Instead of installing the header one could apply two mtd-utils commits > that I handed in to get rid of depending on that header: > 87809c4804d3355ecd2fd0bd3362526fa27bf953 > 42e051acd32c28c2f93c946d0c4bf6f9eada2aa4 Ok, got it. > > Unfortunately, they are not in any released version yet. > This is exactly the point. Putting your two commits into meta-swupdate is anyway dummy, they are already merged into mtd-utils on TOT. The best solution does not yet exist, but it could be less prone to error if I force mtd-utils to TOT for -master, -dunfell and I will remove the SRCREV I am going to put in the .bbappend after next poky release. I try a V2. >> - #oe_libinstall -a -C ubi-utils libubi ${D}${libdir}/ >> - #oe_libinstall -a -C lib libmtd ${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} >> + install -m 0644 ${S}/include/mtd/ubi-media.h ${D}${includedir} >> + ln -s ../libubi.h ${D}${includedir}/mtd/libubi.h >> + ln -s ../libmtd.h ${D}${includedir}/mtd/libmtd.h >> + ln -s ../libscan.h ${D}${includedir}/mtd/libscan.h >> + ln -s ../libubigen.h ${D}${includedir}/mtd/libubigen.h >> + ln -s ../ubi-media.h ${D}${includedir}/mtd/ubi-media.h >> oe_libinstall -a libubi ${D}${libdir}/ >> oe_libinstall -a libmtd ${D}${libdir}/ >> } >> Regards, Stefano
diff --git a/recipes-devtools/mtd/mtd-utils_%.bbappend b/recipes-devtools/mtd/mtd-utils_%.bbappend index 7ffbb0c..7c4a1c5 100644 --- a/recipes-devtools/mtd/mtd-utils_%.bbappend +++ b/recipes-devtools/mtd/mtd-utils_%.bbappend @@ -3,11 +3,16 @@ FILES_${PN}-staticdev += "ubi-utils/libubi.a ${libdir}/*.a" do_install_append () { install -d ${D}${includedir}/mtd/ install -d ${D}${libdir}/ - install -m 0644 ${S}/include/libubi.h ${D}${includedir}/mtd/ - install -m 0644 ${S}/include/libmtd.h ${D}${includedir}/mtd/ - install -m 0644 ${S}/include/mtd/ubi-media.h ${D}${includedir}/mtd/ - #oe_libinstall -a -C ubi-utils libubi ${D}${libdir}/ - #oe_libinstall -a -C lib libmtd ${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} + install -m 0644 ${S}/include/mtd/ubi-media.h ${D}${includedir} + ln -s ../libubi.h ${D}${includedir}/mtd/libubi.h + ln -s ../libmtd.h ${D}${includedir}/mtd/libmtd.h + ln -s ../libscan.h ${D}${includedir}/mtd/libscan.h + ln -s ../libubigen.h ${D}${includedir}/mtd/libubigen.h + ln -s ../ubi-media.h ${D}${includedir}/mtd/ubi-media.h oe_libinstall -a libubi ${D}${libdir}/ oe_libinstall -a libmtd ${D}${libdir}/ }
This prepares to move mtd headers in /usr/include instead of the mtd/ namespace used by kernel. This will be synchronized with future dev packages for mtd-utils that will be merged into Linux distros (Debian). For a while, the OE recipe will still contain links to the old path to be compatible with previous SWUpdate release. The links should be dropped in future. Signed-off-by: Stefano Babic <sbabic@denx.de> CC: Bastian Germann <bage@linutronix.de> --- recipes-devtools/mtd/mtd-utils_%.bbappend | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-)