1.make -j4 出现如下错误
recipe for target 'kernel/timeconst.h' failed
. 查找资料后发现:因为在新版本的(Linux) 上编译老版本的内核版本出现的错误(新版主机linux内核是4.10,被编译版本的内核是3.0的,好像是这么回事!),解决办法是:将kernel/timeconst.pl中第373行的defined()去掉,去掉后如下:
if (!@val) {
2. 执行make -j4 再次出现问题:"mkimage" command not found - U-Boot images will not be built
查资料,是因为主机中制作uImage镜像依赖的一个包没安装,执行:sudo apt-get install u-boot-tools
再次执行:make -j4 成功编译!!
external/mtd-utils/mkfs.ubifs/mkfs.ubifs.h:48:10: fatal error: uuid/uuid.h: No such file or directory
?#include <uuid/uuid.h>
sudo apt-get install uuid-dev
external/mtd-utils/mkfs.ubifs/compr.c:28:10: fatal error: lzo/lzo1x.h: No such file or directory
?#include <lzo/lzo1x.h>
sudo apt-get install liblzo2-dev
external/mtd-utils/mkfs.ubifs/hashtable/hashtable_itr.c:42:1: error: redefinition of 'hashtable_iterator_key'
?hashtable_iterator_key(struct hashtable_itr *i)
mkfs.ubifs/hashtable/hashtable_itr.c | 12 ------------
mkfs.ubifs/hashtable/hashtable_itr.h | 4 ++--
2 files changed, 2 insertions(+), 14 deletions(-)
diff --git a/mkfs.ubifs/hashtable/hashtable_itr.c b/mkfs.ubifs/hashtable/hashtable_itr.c
index 24f4dde..d102453 100644
--- a/mkfs.ubifs/hashtable/hashtable_itr.c
+++ b/mkfs.ubifs/hashtable/hashtable_itr.c
@@ -35,18 +35,6 @@ hashtable_iterator(struct hashtable *h)
}
/*****************************************************************************/
-/* key - return the key of the (key,value) pair at the current position */
-/* value - return the value of the (key,value) pair at the current position */
-
-void *
-hashtable_iterator_key(struct hashtable_itr *i)
-{ return i->e->k; }
-
-void *
-hashtable_iterator_value(struct hashtable_itr *i)
-{ return i->e->v; }
-
-/*****************************************************************************/
/* advance - advance the iterator to the next element
* returns zero if advanced to end of table */
diff --git a/mkfs.ubifs/hashtable/hashtable_itr.h b/mkfs.ubifs/hashtable/hashtable_itr.h
index 87a97eb..5c94a04 100644
--- a/mkfs.ubifs/hashtable/hashtable_itr.h
+++ b/mkfs.ubifs/hashtable/hashtable_itr.h
@@ -28,7 +28,7 @@ hashtable_iterator(struct hashtable *h);
/* hashtable_iterator_key
* - return the value of the (key,value) pair at the current position */
-extern inline void *
+static inline void *
hashtable_iterator_key(struct hashtable_itr *i)
{
return i->e->k;
@@ -37,7 +37,7 @@ hashtable_iterator_key(struct hashtable_itr *i)
/*****************************************************************************/
/* value - return the value of the (key,value) pair at the current position */
-extern inline void *
+static inline void *
hashtable_iterator_value(struct hashtable_itr *i)
{
return i->e->v;
--
2.1.4