openwrt 编译 问题



问题一:OpenWrt can only be built on a case-sensitive filesystem 原因是文件解压保存在windows的文件夹,应该要解压到linux环境的文件夹上

root@ubuntu:/mnt/hgfs/openwrt/trunk# make menuconfig
svn: The path '.' appears to be part of a Subversion 1.7 or greater
working copy.  Please upgrade your Subversion client to use this
working copy.
Checking 'working-make'... ok.
Checking 'case-sensitive-fs'... failed.
Checking 'gcc'... ok.
Checking 'working-gcc'... ok.
Checking 'g++'... ok.
Checking 'working-g++'... ok.
Checking 'ncurses'... ok.
Checking 'zlib'... ok.
Checking 'libssl'... ok.
Checking 'tar'... ok.
Checking 'find'... ok.
Checking 'bash'... ok.
Checking 'patch'... ok.
Checking 'diff'... ok.
Checking 'cp'... ok.
Checking 'seq'... ok.
Checking 'awk'... ok.
Checking 'grep'... ok.
Checking 'getopt'... ok.
Checking 'stat'... ok.
Checking 'md5sum'... ok.
Checking 'unzip'... ok.
Checking 'bzip2'... ok.
Checking 'wget'... ok.
Checking 'perl'... ok.
Checking 'python'... ok.
Checking 'svn'... ok.
Checking 'git'... ok.
Checking 'file'... ok.
Checking 'openssl'... ok.
Checking 'ldconfig-stub'... ok.

Build dependency: OpenWrt can only be built on a case-sensitive filesystem

Prerequisite check failed. Use FORCE=1 to override.


问题二:

Build dependency: Please install the openssl library (with development headers)

这个错误还需要安装两个软件包:

sudo apt-get install libssl-dev
sudo apt-get install libssl0.9.8

成功后再执行make defconfig就OK了


问题三:

root@ubuntu:/openwrt/trunk# make
 make[1] world
 make[2] toolchain/install
 make[3] -C toolchain/gdb prepare
 make[3] -C toolchain/gdb compile
 make[3] -C toolchain/gdb install
 make[3] -C toolchain/binutils prepare
 make[3] -C toolchain/binutils compile
 make[3] -C toolchain/binutils install
 make[3] -C toolchain/gcc/minimal prepare
 make[3] -C toolchain/gcc/minimal compile
 make[3] -C toolchain/gcc/minimal install
 make[3] -C toolchain/kernel-headers prepare
make -r world: build failed. Please re-run make with -j1 V=s to see what's going on
make: *** [world] Error 1


原因:没有连接网络,在编译的过程中要连外网,按照提示运行 make -j1 V=s 可以知道问题 。

root@ubuntu:/openwrt/trunk#make -j1 V=s
make[1]: Entering directory `/openwrt/trunk'
make[2]: Entering directory `/openwrt/trunk'
+ mkdir -p /openwrt/trunk/staging_dir/target-mips_34kc_musl-1.1.10
+ cd /openwrt/trunk/staging_dir/target-mips_34kc_musl-1.1.10
+ mkdir -p bin lib include stamp
mkdir -p /openwrt/trunk/build_dir/target-mips_34kc_musl-1.1.10/stamp
touch /openwrt/trunk/staging_dir/target-mips_34kc_musl-1.1.10/.prepared
make[3]: Entering directory `/openwrt/trunk/toolchain/gdb'
make[3]: Nothing to be done for `prepare'.
make[3]: Leaving directory `/openwrt/trunk/toolchain/gdb'
make[3]: Entering directory `/openwrt/trunk/toolchain/gdb'
make[3]: Nothing to be done for `compile'.
make[3]: Leaving directory `/openwrt/trunk/toolchain/gdb'
make[3]: Entering directory `/openwrt/trunk/toolchain/gdb'
make[3]: Nothing to be done for `install'.
make[3]: Leaving directory `/openwrt/trunk/toolchain/gdb'
make[3]: Entering directory `/openwrt/trunk/toolchain/binutils'
make[3]: Nothing to be done for `prepare'.
make[3]: Leaving directory `/openwrt/trunk/toolchain/binutils'
make[3]: Entering directory `/openwrt/trunk/toolchain/binutils'
make[3]: Nothing to be done for `compile'.
make[3]: Leaving directory `/openwrt/trunk/toolchain/binutils'
make[3]: Entering directory `/openwrt/trunk/toolchain/binutils'
make[3]: Nothing to be done for `install'.
make[3]: Leaving directory `/openwrt/trunk/toolchain/binutils'
make[3]: Entering directory `/openwrt/trunk/toolchain/gcc/minimal'
make[3]: Nothing to be done for `prepare'.
make[3]: Leaving directory `/openwrt/trunk/toolchain/gcc/minimal'
make[3]: Entering directory `/openwrt/trunk/toolchain/gcc/minimal'
make[3]: Nothing to be done for `compile'.
make[3]: Leaving directory `/openwrt/trunk/toolchain/gcc/minimal'
make[3]: Entering directory `/openwrt/trunk/toolchain/gcc/minimal'
make[3]: Nothing to be done for `install'.
make[3]: Leaving directory `/openwrt/trunk/toolchain/gcc/minimal'
make[3]: Entering directory `/openwrt/trunk/toolchain/kernel-headers'
mkdir -p /openwrt/trunk/dl
/openwrt/trunk/scripts/download.pl "/openwrt/trunk/dl" "linux-3.18.16.tar.xz" Resolving ftp.all.kernel.org (ftp.all.kernel.org)... 199.204.44.194, 198.145.20.140, 149.20.4.69
Connecting to ftp.all.kernel.org (ftp.all.kernel.org)|199.204.44.194|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /pub/linux/kernel/v3.x ... done.
==> SIZE linux-3.18.16.tar.xz ... 80967120
==> PASV ... done.    ==> RETR linux-3.18.16.tar.xz ... done.
Length: 80967120 (77M) (unauthoritative)

 0% [                                       ] 94,248      27.5K/s  eta 47m 47s ^


问题四:

root@ubuntu:/opt/EmbedSky/openwrt/backfire# make
Checking 'working-make'... ok.
Checking 'case-sensitive-fs'... ok.
Checking 'getopt'... ok.
Checking 'fileutils'... ok.
Checking 'working-gcc'... ok.
Checking 'working-g++'... ok.
Checking 'ncurses'... ok.
Checking 'zlib'... ok.
Checking 'gawk'... ok.
Checking 'flex'... ok.
Checking 'unzip'... ok.
Checking 'bzip2'... ok.
Checking 'patch'... ok.
Checking 'perl'... ok.
Checking 'python'... ok.
Checking 'wget'... ok.
Checking 'gnutar'... ok.
Checking 'svn'... ok.
Checking 'gnu-find'... ok.
Checking 'getopt-extended'... ok.
Checking 'non-root'... failed.

Build dependency: Please do not compile as root.

Prerequisite check failed. Use FORCE=1 to override.
make[1]: *** [tmp/.prereq-build] Error 1
make: *** [world] Error 2

解决方法:先改变文件的权限 ,然后su命令切换用户。

1.

root@ubuntu:/opt/EmbedSky/openwrt/backfire# chmod -R 777 ./
root@ubuntu:/opt/EmbedSky/openwrt/backfire# ls
BSDmakefile  Config.in  docs                include  Makefile  README    scripts      target  toolchain
build_dir    dl         feeds.conf.default  LICENSE  package   rules.mk  staging_dir  tmp     tools
root@ubuntu:/opt/EmbedSky/openwrt/backfire#

2.

root@ubuntu:/opt/EmbedSky/openwrt# su admin
admin@ubuntu:/opt/EmbedSky/openwrt$


问题五:

admin@ubuntu:/opt/EmbedSky/openwrt/backfire$ make
rm: cannot remove `/opt/EmbedSky/openwrt/backfire/tmp/info/.files-packageinfo-2624': Permission denied
make[3]: *** No rule to make target `/opt/EmbedSky/openwrt/backfire/tmp/info/.files-packageinfo-2999'.  Stop.
cat: /opt/EmbedSky/openwrt/backfire/tmp/info/.files-packageinfo-2999: No such file or directory
rm: cannot remove `/opt/EmbedSky/openwrt/backfire/tmp/info/.files-packageinfo.stamp.567c0f90fc335e16ec8ba4359356749d': Permission denied


解决:

root@ubuntu:/opt/EmbedSky/openwrt/backfire# chmod -R 777 ./
root@ubuntu:/opt/EmbedSky/openwrt/backfire# ls
BSDmakefile  Config.in  docs                include  Makefile  README    scripts      target  toolchain
build_dir    dl         feeds.conf.default  LICENSE  package   rules.mk  staging_dir  tmp     tools
root@ubuntu:/opt/EmbedSky/openwrt/backfire#





  • 9
    点赞
  • 18
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值