openwrt on mini2440

在openwrt dream-box官網下載openwrt源碼,其中支持mini2440 boardsphp

https://dev.openwrt.org.cn/wiki/GetSourceui

下載好以後,進行編譯,能夠參照以下教程spa

https://dev.openwrt.org.cn/wiki/howtocode

編譯過程出現問題和解決方法記錄以下:教程

error1:ci

In file includedfrom clean-temp.h:22:0,get

from clean-temp.c:23:源碼

./stdio.h:456:1:error: 'gets' undeclared here (not in a function)it

_GL_WARN_ON_USE(gets, "gets is a security hole - use fgets instead");io

解決方法:

參考連接:

http://www.civilnet.cn/talk/browse.php?topicno=78555,2樓.

 

找到:host-m4-1.4.15/lib/stdio.h,而後對stdio.h文件作出以下改動,必要時連同stdio.in.h一塊兒修改:

<span style="font-family:Arial;font-size:12px;"># Begin patch
=== modified file 'grub-core/gnulib/stdio.in.h'
--- grub-core/gnulib/stdio.in.h	2010-09-20 10:35:33 +0000
+++ grub-core/gnulib/stdio.in.h	2012-07-04 15:18:15 +0000
@@ -140,8 +140,10 @@
 /* It is very rare that the developer ever has full control of stdin,
    so any use of gets warrants an unconditional warning.  Assume it is
    always declared, since it is required by C89.  */
+#if defined gets
 #undef gets
 _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+#endif

error 2:

elf.cpp:68:5: error: '::close' has not been declared:

方法:
參考trunk的源碼和此問題"https://dev.openwrt.org.cn/ticket/45"
修改 ./build_dir/host/mklibs/src/mklibs-readelf/elf.cpp,添加以下語句

#include <unistd.h> 

相關文章
相關標籤/搜索