Bump buidlroot version to 2018.02.6

This commit is contained in:
jbnadal
2018-10-22 14:55:59 +02:00
parent 222960cedb
commit bec94fdb63
6150 changed files with 84803 additions and 117446 deletions

View File

@@ -1,64 +0,0 @@
From 5f50207231414bfdbac8f0f974a2824f24177d6e Mon Sep 17 00:00:00 2001
From: Enrico Jorns <ejo@pengutronix.de>
Date: Fri, 11 Sep 2015 15:28:13 +0200
Subject: [PATCH] mtd-utils: ubinize: Always return error code (at least -1) in
case of an error
ubinize should not fail silenty, this can be very annoying when using
it from other tools that rely on the exit code for determining the
success of their operation.
Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
---
ubi-utils/ubinize.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/ubi-utils/ubinize.c b/ubi-utils/ubinize.c
index 34f465a..60bbd9a 100644
--- a/ubi-utils/ubinize.c
+++ b/ubi-utils/ubinize.c
@@ -519,6 +519,7 @@ int main(int argc, char * const argv[])
*/
seek = ui.peb_size * 2;
if (lseek(args.out_fd, seek, SEEK_SET) != seek) {
+ err = -1;
sys_errmsg("cannot seek file \"%s\"", args.f_out);
goto out_free;
}
@@ -530,6 +531,7 @@ int main(int argc, char * const argv[])
int fd, j;
if (!sname) {
+ err = -1;
errmsg("ini-file parsing error (iniparser_getsecname)");
goto out_free;
}
@@ -550,6 +552,7 @@ int main(int argc, char * const argv[])
*/
for (j = 0; j < i; j++) {
if (vi[i].id == vi[j].id) {
+ err = -1;
errmsg("volume IDs must be unique, but ID %d "
"in section \"%s\" is not",
vi[i].id, sname);
@@ -557,6 +560,7 @@ int main(int argc, char * const argv[])
}
if (!strcmp(vi[i].name, vi[j].name)) {
+ err = -1;
errmsg("volume name must be unique, but name "
"\"%s\" in section \"%s\" is not",
vi[i].name, sname);
@@ -580,6 +584,7 @@ int main(int argc, char * const argv[])
if (img) {
fd = open(img, O_RDONLY);
if (fd == -1) {
+ err = fd;
sys_errmsg("cannot open \"%s\"", img);
goto out_free;
}
--
1.9.1

View File

@@ -0,0 +1,92 @@
From 0f833ac73ad631248826386e2918d8571ecf0347 Mon Sep 17 00:00:00 2001
From: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Date: Sat, 9 Jun 2018 16:45:22 +0200
Subject: [PATCH] Revert "Return correct error number in ubi_get_vol_info1"
This reverts commit dede98ffb706676309488d7cc660f569548d5930.
The original commit tried to fix a descrepancy between the implementation
and the documentation by making the implementation comply.
When making the change, it was overlooked, that ubinfo and ubirename were
written against the implementation instead of the behaviour specified by
the documentation. So were further internal functions like
ubi_get_vol_info1_nm which further breaks ubirmvol.
A report with an outline of a resulting problem can be read on
the mailing list:
http://lists.infradead.org/pipermail/linux-mtd/2018-June/081562.html
From the report:
steps to reproduce: have mtd-utils 2.0.1 or 2.0.2
0. make a bunch of ubi volumes in sequential order
ubimkvol /dev/ubi0 -s 64KiB -N test1
ubimkvol /dev/ubi0 -s 64KiB -N test2
ubimkvol /dev/ubi0 -s 64KiB -N test3
ubimkvol /dev/ubi0 -s 64KiB -N test4
..
1. delete the test1 volume, making a hole in the volume table
ubirmvol /dev/ubi0 -N test1
2. try an affected tool (i.e. "ubirmvol /dev/ubi0 -N test4" )
|root at mr24:/# ubirmvol /dev/ubi0 -N test4
|ubirmvol: error!: cannot find UBI volume "test4"
| error 19 (No such device)
or "ubinfo -a"
| root at mr24:/# ubinfo -a
| UBI version: 1
| Count of UBI devices: 1
| UBI control device major/minor: 10:59
| Present UBI devices: ubi0
|
| ubi0
| Volumes count: 11
| Logical eraseblock size: 15872 bytes, 15.5 KiB
| Total amount of logical eraseblocks: 1952 (30982144 bytes, 29.5 MiB)
| Amount of available logical eraseblocks: 75 (1190400 bytes, 1.1 MiB)
| Maximum count of volumes 92
| Count of bad physical eraseblocks: 0
| Count of reserved physical eraseblocks: 40
| Current maximum erase counter value: 984
| Minimum input/output unit size: 512 bytes
| Character device major/minor: 251:0
| ubinfo: error!: libubi failed to probe volume 5 on ubi0
| error 19 (No such device)
| Present volumes: 0, 1, 2, 3, 4root at mr24:/#
Reported-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Signed-off-by: David Owens <david.owens@rockwellcollins.com>
---
lib/libubi.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/lib/libubi.c b/lib/libubi.c
index b50e68a..978b433 100644
--- a/lib/libubi.c
+++ b/lib/libubi.c
@@ -1240,11 +1240,8 @@ int ubi_get_vol_info1(libubi_t desc, int dev_num, int vol_id,
info->dev_num = dev_num;
info->vol_id = vol_id;
- if (vol_get_major(lib, dev_num, vol_id, &info->major, &info->minor)) {
- if (errno == ENOENT)
- errno = ENODEV;
+ if (vol_get_major(lib, dev_num, vol_id, &info->major, &info->minor))
return -1;
- }
ret = vol_read_data(lib->vol_type, dev_num, vol_id, buf, 50);
if (ret < 0)
--
2.14.4

View File

@@ -1,62 +0,0 @@
From 30f0cd91b21dbc5d593d61ae44875ad0cb53cb4d Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Sat, 16 Jul 2016 11:27:06 +0200
Subject: [PATCH] integck: only use execinfo.h when INTEGCK_DEBUG is enabled
Guard the usage of execinfo.h by INTEGCK_DEBUG so that by defaut,
integck builds properly on systems without <execinfo.h> (uClibc and
musl based systems). As stated in the code, the backtrace()
functionality of <execinfo.h> will anyway only work properly when
INTEGCK_DEBUG is defined (it makes all functions non-static, which is
needed for backtrace to provide some useful information).
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
tests/fs-tests/integrity/integck.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/tests/fs-tests/integrity/integck.c b/tests/fs-tests/integrity/integck.c
index 8badd1f..6ef817e 100644
--- a/tests/fs-tests/integrity/integck.c
+++ b/tests/fs-tests/integrity/integck.c
@@ -31,7 +31,9 @@
#include <getopt.h>
#include <assert.h>
#include <mntent.h>
+#ifdef INTEGCK_DEBUG
#include <execinfo.h>
+#endif
#include <bits/stdio_lim.h>
#include <sys/mman.h>
#include <sys/vfs.h>
@@ -248,14 +250,18 @@ static char *random_name_buf;
static void check_failed(const char *cond, const char *func, const char *file,
int line)
{
- int error = errno, count;
+ int error = errno;
+#ifdef INTEGCK_DEBUG
+ int count;
void *addresses[128];
+#endif
fflush(stdout);
fflush(stderr);
errmsg("condition '%s' failed in %s() at %s:%d",
cond, func, file, line);
normsg("error %d (%s)", error, strerror(error));
+#ifdef INTEGCK_DEBUG
/*
* Note, to make this work well you need:
* 1. Make all functions non-static - add "#define static'
@@ -264,6 +270,7 @@ static void check_failed(const char *cond, const char *func, const char *file,
*/
count = backtrace(addresses, 128);
backtrace_symbols_fd(addresses, count, fileno(stdout));
+#endif
exit(EXIT_FAILURE);
}
--
2.7.4

View File

@@ -1,45 +0,0 @@
From 600ab10e3b452cdffc6c82770b0bb2ff5c23ad70 Mon Sep 17 00:00:00 2001
From: Rahul Bedarkar <rahul.bedarkar@imgtec.com>
Date: Fri, 12 Aug 2016 22:59:35 +0530
Subject: [PATCH 1/1] fs-tests: integrity: don't include header
<bits/stdio_lim.h>
With musl C library, we get following build error
integck.c:37:28: fatal error: bits/stdio_lim.h: No such file or directory
#include <bits/stdio_lim.h>
^
compilation terminated.
make[2]: *** [integck] Error 1
Header <bits/stdio_lim.h> is not available in musl C library. However
<stdio.h> has all definition that <bits/stdio_lim.h> supposed to be
providing. Moreover <bits/stdio_lim.h> shouldn't be included directly
instead we should be using <stdio.h>.
Since we already include <stdio.h> and in case of uClibc or glibc
<bits/stdio_lim.h> gets included internally, we can safely remove it.
This build issue is found by Buildroot autobuilder
http://autobuild.buildroot.net/results/175/1754861457af520480cc34d7d2d0edff2868ff66/
Signed-off-by: Rahul Bedarkar <rahul.bedarkar@imgtec.com>
---
tests/fs-tests/integrity/integck.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/tests/fs-tests/integrity/integck.c b/tests/fs-tests/integrity/integck.c
index 6ef817e..0bb9711 100644
--- a/tests/fs-tests/integrity/integck.c
+++ b/tests/fs-tests/integrity/integck.c
@@ -34,7 +34,6 @@
#ifdef INTEGCK_DEBUG
#include <execinfo.h>
#endif
-#include <bits/stdio_lim.h>
#include <sys/mman.h>
#include <sys/vfs.h>
#include <sys/mount.h>
--
2.6.2

View File

@@ -6,6 +6,22 @@ config BR2_PACKAGE_MTD
http://www.linux-mtd.infradead.org/
if BR2_PACKAGE_MTD
# The two hidden options below match mtd configure script options
# --enable-jffs and --enable-ubifs
config BR2_PACKAGE_MTD_JFFS_UTILS
bool
select BR2_PACKAGE_LZO
select BR2_PACKAGE_ZLIB
config BR2_PACKAGE_MTD_UBIFS_UTILS
bool
select BR2_PACKAGE_LZO
select BR2_PACKAGE_UTIL_LINUX
select BR2_PACKAGE_UTIL_LINUX_LIBUUID
select BR2_PACKAGE_ZLIB
comment "MTD tools selection"
config BR2_PACKAGE_MTD_DOCFDISK
@@ -50,18 +66,15 @@ config BR2_PACKAGE_MTD_FTL_FORMAT
config BR2_PACKAGE_MTD_JFFS2DUMP
bool "jffs2dump"
select BR2_PACKAGE_MTD_JFFS_UTILS
config BR2_PACKAGE_MTD_MKFSJFFS2
bool "mkfs.jffs2"
select BR2_PACKAGE_ZLIB
select BR2_PACKAGE_LZO
select BR2_PACKAGE_MTD_JFFS_UTILS
config BR2_PACKAGE_MTD_MKFSUBIFS
bool "mkfs.ubifs"
select BR2_PACKAGE_ZLIB
select BR2_PACKAGE_LZO
select BR2_PACKAGE_UTIL_LINUX
select BR2_PACKAGE_UTIL_LINUX_LIBUUID
select BR2_PACKAGE_MTD_UBIFS_UTILS
config BR2_PACKAGE_MTD_MTD_DEBUG
bool "mtd_debug"
@@ -102,6 +115,7 @@ config BR2_PACKAGE_MTD_SERVE_IMAGE
config BR2_PACKAGE_MTD_SUMTOOL
bool "sumtool"
select BR2_PACKAGE_MTD_JFFS_UTILS
config BR2_PACKAGE_MTD_MTDINFO
bool "mtdinfo"
@@ -155,10 +169,43 @@ config BR2_PACKAGE_MTD_UBIBLOCK
bool "ubiblock"
default y
config BR2_PACKAGE_MTD_TESTS
bool "MTD test tools"
depends on BR2_USE_MMU # fork() in fstests
depends on BR2_TOOLCHAIN_HAS_THREADS
help
Build and install tools for testing MTD devices and drivers.
if BR2_PACKAGE_MTD_TESTS
config BR2_PACKAGE_MTD_FLASH_READTEST
bool "flash_readtest"
config BR2_PACKAGE_MTD_FLASH_SPEED
bool "flash_speed"
config BR2_PACKAGE_MTD_FLASH_STRESS
bool "flash_stress"
config BR2_PACKAGE_MTD_FLASH_TORTURE
bool "flash_torture"
config BR2_PACKAGE_MTD_INTEGCK
bool "integck"
depends on BR2_USE_MMU # fork()
help
Install the integck test program.
config BR2_PACKAGE_MTD_NANDBITERRS
bool "nandbiterrs"
config BR2_PACKAGE_MTD_NANDPAGETEST
bool "nandpagetest"
config BR2_PACKAGE_MTD_NANDSUBPAGETEST
bool "nandsubpagetest"
endif
comment "MTD test tools need a toolchain w/ threads"
depends on BR2_USE_MMU
depends on !BR2_TOOLCHAIN_HAS_THREADS
endif

View File

@@ -1,3 +1,4 @@
# Locally calculated after checking pgp signature
# ftp://ftp.infradead.org/pub/mtd-utils/mtd-utils-1.5.2.tar.bz2.asc
sha256 5db57389280a3abaec5dd23af2590988b70f213fa3929c12a2642c8f9a86f400 mtd-utils-1.5.2.tar.bz2
# ftp://ftp.infradead.org/pub/mtd-utils/mtd-utils-2.0.2.tar.bz2.asc
sha256 fb3de61be8e932abb424e8ea3c30298f553d5f970ad158a737bb303bbf9660b8 mtd-utils-2.0.2.tar.bz2
sha256 dcc100d4161cc0b7177545ab6e47216f84857cda3843847c792a25289852dcaa COPYING

View File

@@ -4,25 +4,31 @@
#
################################################################################
MTD_VERSION = 1.5.2
MTD_VERSION = 2.0.2
MTD_SOURCE = mtd-utils-$(MTD_VERSION).tar.bz2
MTD_SITE = ftp://ftp.infradead.org/pub/mtd-utils
MTD_LICENSE = GPLv2
MTD_LICENSE = GPL-2.0
MTD_LICENSE_FILES = COPYING
MTD_INSTALL_STAGING = YES
ifeq ($(BR2_PACKAGE_MTD_MKFSJFFS2),y)
MTD_DEPENDENCIES = zlib lzo
ifeq ($(BR2_PACKAGE_MTD_JFFS_UTILS),y)
MTD_DEPENDENCIES += zlib lzo host-pkgconf
MTD_CONF_OPTS += --with-jffs
else
MTD_CONF_OPTS += --without-jffs
endif
ifeq ($(BR2_PACKAGE_MTD_MKFSUBIFS),y)
ifeq ($(BR2_PACKAGE_MTD_UBIFS_UTILS),y)
MTD_DEPENDENCIES += util-linux zlib lzo host-pkgconf
define MTD_ADD_MISSING_LINTL
$(SED) "/^LDLIBS_mkfs\.ubifs/ s%$$% `$(PKG_CONFIG_HOST_BINARY) --libs uuid`%" \
$(@D)/Makefile
endef
MTD_POST_PATCH_HOOKS += MTD_ADD_MISSING_LINTL
MTD_CONF_OPTS += --with-ubifs
else
MTD_CONF_OPTS += --without-ubifs
endif
ifeq ($(BR2_PACKAGE_MTD_TESTS),y)
MTD_CONF_OPTS += --enable-tests --enable-install-tests
else
MTD_CONF_OPTS += --disable-tests --disable-install-tests
endif
ifeq ($(BR2_PACKAGE_BUSYBOX),y)
@@ -33,26 +39,20 @@ endif
# also be enabled which will also include the attr package.
ifeq ($(BR2_PACKAGE_ACL),y)
MTD_DEPENDENCIES += acl
MTD_MAKE_OPTS += WITHOUT_XATTR=0
MTD_CONF_OPTS += --with-xattr
else
MTD_MAKE_OPTS += WITHOUT_XATTR=1
MTD_CONF_OPTS += --without-xattr
endif
HOST_MTD_DEPENDENCIES = host-zlib host-lzo host-e2fsprogs
HOST_MTD_DEPENDENCIES = host-zlib host-lzo host-util-linux
HOST_MTD_CONF_OPTS = \
--with-jffs \
--with-ubifs \
--disable-tests
define HOST_MTD_BUILD_CMDS
$(HOST_CONFIGURE_OPTS) $(MAKE1) \
CROSS= BUILDDIR=$(@D) WITHOUT_XATTR=1 -C $(@D)
endef
MKFS_JFFS2 = $(HOST_DIR)/sbin/mkfs.jffs2
SUMTOOL = $(HOST_DIR)/sbin/sumtool
define HOST_MTD_INSTALL_CMDS
$(MAKE1) BUILDDIR=$(@D) DESTDIR=$(HOST_DIR) -C $(@D) install
endef
MKFS_JFFS2 = $(HOST_DIR)/usr/sbin/mkfs.jffs2
SUMTOOL = $(HOST_DIR)/usr/sbin/sumtool
MTD_STAGING_y = lib/libmtd.a ubi-utils/libubi.a
MTD_TARGETS_$(BR2_PACKAGE_MTD_DOCFDISK) += docfdisk
MTD_TARGETS_$(BR2_PACKAGE_MTD_DOC_LOADBIOS) += doc_loadbios
MTD_TARGETS_$(BR2_PACKAGE_MTD_FLASHCP) += flashcp
@@ -79,56 +79,46 @@ MTD_TARGETS_$(BR2_PACKAGE_MTD_RFDDUMP) += rfddump
MTD_TARGETS_$(BR2_PACKAGE_MTD_RFDFORMAT) += rfdformat
MTD_TARGETS_$(BR2_PACKAGE_MTD_SERVE_IMAGE) += serve_image
MTD_TARGETS_$(BR2_PACKAGE_MTD_SUMTOOL) += sumtool
MTD_TARGETS_UBI_$(BR2_PACKAGE_MTD_MTDINFO) += mtdinfo
MTD_TARGETS_UBI_$(BR2_PACKAGE_MTD_UBIATTACH) += ubiattach
MTD_TARGETS_UBI_$(BR2_PACKAGE_MTD_UBICRC32) += ubicrc32
MTD_TARGETS_UBI_$(BR2_PACKAGE_MTD_UBIDETACH) += ubidetach
MTD_TARGETS_UBI_$(BR2_PACKAGE_MTD_UBIFORMAT) += ubiformat
MTD_TARGETS_UBI_$(BR2_PACKAGE_MTD_UBIMKVOL) += ubimkvol
MTD_TARGETS_UBI_$(BR2_PACKAGE_MTD_UBINFO) += ubinfo
MTD_TARGETS_UBI_$(BR2_PACKAGE_MTD_UBINIZE) += ubinize
MTD_TARGETS_UBI_$(BR2_PACKAGE_MTD_UBIRENAME) += ubirename
MTD_TARGETS_UBI_$(BR2_PACKAGE_MTD_UBIRMVOL) += ubirmvol
MTD_TARGETS_UBI_$(BR2_PACKAGE_MTD_UBIRSVOL) += ubirsvol
MTD_TARGETS_UBI_$(BR2_PACKAGE_MTD_UBIUPDATEVOL) += ubiupdatevol
MTD_TARGETS_UBI_$(BR2_PACKAGE_MTD_UBIBLOCK) += ubiblock
MTD_TARGETS_y += $(addprefix ubi-utils/,$(MTD_TARGETS_UBI_y))
MTD_TARGETS_$(BR2_PACKAGE_MTD_MKFSUBIFS) += mkfs.ubifs/mkfs.ubifs
ifeq ($(BR2_PACKAGE_MTD_INTEGCK),y)
define MTD_BUILD_INTEGCK
$(TARGET_CONFIGURE_OPTS) $(MAKE1) CROSS=$(TARGET_CROSS) \
BUILDDIR=$(@D) $(MTD_MAKE_OPTS) -C $(@D)/tests/fs-tests all
endef
define MTD_INSTALL_INTEGCK
$(INSTALL) -D -m 755 $(@D)/tests/fs-tests/integrity/integck $(TARGET_DIR)/usr/sbin/integck
endef
endif
define MTD_BUILD_CMDS
$(TARGET_CONFIGURE_OPTS) $(MAKE1) CROSS=$(TARGET_CROSS) \
BUILDDIR=$(@D) $(MTD_MAKE_OPTS) -C $(@D) \
$(addprefix $(@D)/,$(MTD_TARGETS_y)) \
$(addprefix $(@D)/,$(MTD_STAGING_y))
$(MTD_BUILD_INTEGCK)
endef
define MTD_INSTALL_STAGING_CMDS
$(INSTALL) -D -m 0755 $(@D)/lib/libmtd.a $(STAGING_DIR)/usr/lib/libmtd.a
$(INSTALL) -D -m 0755 $(@D)/ubi-utils/libubi.a $(STAGING_DIR)/usr/lib/libubi.a
$(INSTALL) -D -m 0644 $(@D)/include/libmtd.h $(STAGING_DIR)/usr/include/mtd/libmtd.h
$(INSTALL) -D -m 0644 $(@D)/ubi-utils/include/libubi.h $(STAGING_DIR)/usr/include/mtd/libubi.h
$(INSTALL) -D -m 0644 $(@D)/include/mtd/ubi-media.h $(STAGING_DIR)/usr/include/mtd/ubi-media.h
endef
MTD_TARGETS_$(BR2_PACKAGE_MTD_MTDINFO) += mtdinfo
MTD_TARGETS_$(BR2_PACKAGE_MTD_UBIATTACH) += ubiattach
MTD_TARGETS_$(BR2_PACKAGE_MTD_UBICRC32) += ubicrc32
MTD_TARGETS_$(BR2_PACKAGE_MTD_UBIDETACH) += ubidetach
MTD_TARGETS_$(BR2_PACKAGE_MTD_UBIFORMAT) += ubiformat
MTD_TARGETS_$(BR2_PACKAGE_MTD_UBIMKVOL) += ubimkvol
MTD_TARGETS_$(BR2_PACKAGE_MTD_UBINFO) += ubinfo
MTD_TARGETS_$(BR2_PACKAGE_MTD_UBINIZE) += ubinize
MTD_TARGETS_$(BR2_PACKAGE_MTD_UBIRENAME) += ubirename
MTD_TARGETS_$(BR2_PACKAGE_MTD_UBIRMVOL) += ubirmvol
MTD_TARGETS_$(BR2_PACKAGE_MTD_UBIRSVOL) += ubirsvol
MTD_TARGETS_$(BR2_PACKAGE_MTD_UBIUPDATEVOL) += ubiupdatevol
MTD_TARGETS_$(BR2_PACKAGE_MTD_UBIBLOCK) += ubiblock
MTD_TARGETS_$(BR2_PACKAGE_MTD_MKFSUBIFS) += mkfs.ubifs
MTD_TARGETS_$(BR2_PACKAGE_MTD_FLASH_READTEST) += flash_readtest
MTD_TARGETS_$(BR2_PACKAGE_MTD_FLASH_SPEED) += flash_speed
MTD_TARGETS_$(BR2_PACKAGE_MTD_FLASH_STRESS) += flash_stress
MTD_TARGETS_$(BR2_PACKAGE_MTD_FLASH_TORTURE) += flash_torture
MTD_TARGETS_$(BR2_PACKAGE_MTD_INTEGCK) += integck
MTD_TARGETS_$(BR2_PACKAGE_MTD_NANDBITERRS) += nandbiterrs
MTD_TARGETS_$(BR2_PACKAGE_MTD_NANDPAGETEST) += nandpagetest
MTD_TARGETS_$(BR2_PACKAGE_MTD_NANDSUBPAGETEST) += nandsubpagetest
define MTD_INSTALL_TARGET_CMDS
for f in $(MTD_TARGETS_y) ; do \
$(INSTALL) -D -m 0755 $(@D)/$$f $(TARGET_DIR)/usr/sbin/$${f##*/} ; \
done
$(MTD_INSTALL_INTEGCK)
$(foreach f,$(MTD_TARGETS_y), \
$(INSTALL) -D -m 0755 $(@D)/$(f) $(TARGET_DIR)/usr/sbin/$(notdir $(f))
)
endef
$(eval $(generic-package))
$(eval $(host-generic-package))
# Those libraries are not installed by "make install", but are needed
# by other packages, such as swupdate.
define MTD_INSTALL_LIBS
$(INSTALL) -D -m 0755 $(@D)/include/libmtd.h $(STAGING_DIR)/usr/include/mtd/libmtd.h
$(INSTALL) -D -m 0755 $(@D)/include/libubi.h $(STAGING_DIR)/usr/include/mtd/libubi.h
$(INSTALL) -D -m 0755 $(@D)/include/mtd/ubi-media.h $(STAGING_DIR)/usr/include/mtd/ubi-media.h
$(INSTALL) -D -m 0755 $(@D)/libmtd.a $(STAGING_DIR)/usr/lib/libmtd.a
$(INSTALL) -D -m 0755 $(@D)/libubi.a $(STAGING_DIR)/usr/lib/libubi.a
endef
MTD_POST_INSTALL_STAGING_HOOKS += MTD_INSTALL_LIBS
$(eval $(autotools-package))
$(eval $(host-autotools-package))