问题一: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" "3b0e66fdf47b0660521d79b881eabf04" "@KERNEL/linux/kernel/v3.x"
--2015-06-25 10:36:04-- ftp://ftp.all.kernel.org/pub/linux/kernel/v3.x/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#