【背景】
折腾:
【记录】Cygwin下安装crosstool-ng后去为arm920t制作交叉编译器
期间,在用ct-ng menuconfig去配置:
【记录】Cygwin下为arm920t配置crosstool-ng
后,此处就可以去ct-ng build去编译了。
【折腾过程】
1.直接去ct-ng build,结果出现了之前就遇到的错误:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | Administrator@PC-20130611GART /home/develop/crosstool-ng/crosstool-ng-1 .18.0_build $ ct-ng build [INFO ] Performing some trivial sanity checks [ERROR] Your file system in '/home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build' is *not* case -sensitive! [ERROR] [ERROR] >> [ERROR] >> Build failed in step '(top-level)' [ERROR] >> [ERROR] >> Error happened in : CT_Abort[scripts /functions @331] [ERROR] >> called from: CT_TestAndAbort[scripts /functions @351] [ERROR] >> called from: main[scripts /crosstool-NG .sh@90] Current command (unknown), exited with error code: 1 Please fix it up and finish by exiting the shell with one of these values: 1 fixed, continue with next build command 3 abort build ct-ng: /home/develop/crosstool-ng/crosstool-ng-1 .18.0_build> |
所以,参考:
去改注册表,重启win7。
注:
其实之前也看到有说别的解决办法,说是cygwin启动时,挂载为managed,好像也可以。
但是暂时不去弄那个,还是用之前的方式,暂时解决此问题:
去改:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\kernel
中的
obcaseinsensitive=0
即可:
2.重启后,继续编译:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | Administrator@PC-20130611GART /home/develop/crosstool-ng/crosstool-ng-1 .18.0_build $ ct-ng build [INFO ] Performing some trivial sanity checks [INFO ] Build started 20130829.233429 [INFO ] Building environment variables [EXTRA] Preparing working directories [EXTRA] Installing user-supplied crosstool-NG configuration [EXTRA] ================================================================= [EXTRA] Dumping internal crosstool-NG configuration [EXTRA] Building a toolchain for : [EXTRA] build = i686-pc-cygwin [EXTRA] host = i686-pc-cygwin [EXTRA] target = arm-arm920t-linux-gnueabi [EXTRA] Dumping internal crosstool-NG configuration: done in 0.72s (at 00:27) [INFO ] ================================================================= [INFO ] Retrieving needed toolchain components' tarballs [EXTRA] Retrieving 'make-3.81' [EXTRA] Saving 'make-3.81.tar.bz2' to local storage [EXTRA] Using 'linux-custom' from custom location [EXTRA] Retrieving 'gmp-4.3.2' [EXTRA] Saving 'gmp-4.3.2.tar.bz2' to local storage [EXTRA] Retrieving 'mpfr-2.4.2' [EXTRA] Saving 'mpfr-2.4.2.tar.xz' to local storage [EXTRA] Retrieving 'libelf-0.8.13' [EXTRA] Saving 'libelf-0.8.13.tar.gz' to local storage [EXTRA] Retrieving 'binutils-2.20.1a' [03:48] / /opt/crosstool-ng/bin/ct-ng :148: recipe for target `build' failed make : *** [build] Interrupt |
3.期间,为了加快速度,手动终止编译,手动去下载了一下包文件:
http://ftp.gnu.org/gnu/binutils/binutils-2.20.1a.tar.bz2
http://cbuild.validation.linaro.org/snapshots/eglibc-2_17.tar.bz2
http://ftp.gnu.org/gnu/gdb/gdb-6.8a.tar.bz2
然后就下载完毕,进入解压,打包,安装的阶段:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | Administrator@PC-20130611GART /home/develop/crosstool-ng/crosstool-ng-1 .18.0_build $ ct-ng build [INFO ] Performing some trivial sanity checks [INFO ] Build started 20130829.234101 [INFO ] Building environment variables [EXTRA] Preparing working directories [EXTRA] Installing user-supplied crosstool-NG configuration [EXTRA] ================================================================= [EXTRA] Dumping internal crosstool-NG configuration [EXTRA] Building a toolchain for : [EXTRA] build = i686-pc-cygwin [EXTRA] host = i686-pc-cygwin [EXTRA] target = arm-arm920t-linux-gnueabi [EXTRA] Dumping internal crosstool-NG configuration: done in 0.73s (at 00:31) [INFO ] ================================================================= [INFO ] Retrieving needed toolchain components' tarballs [EXTRA] Using 'linux-custom' from custom location [EXTRA] Retrieving 'eglibc-2_17' [EXTRA] Saving 'eglibc-2_17.tar.bz2' to local storage [EXTRA] Retrieving 'eglibc-ports-2_17' [EXTRA] Saving 'eglibc-ports-2_17.tar.bz2' to local storage [EXTRA] Retrieving 'dmalloc-5.5.2' [EXTRA] Saving 'dmalloc-5.5.2.tgz' to local storage [EXTRA] Retrieving 'duma_2_5_15' [EXTRA] Saving 'duma_2_5_15.tar.gz' to local storage [EXTRA] Retrieving 'gdb-6.8a' [EXTRA] Saving 'gdb-6.8a.tar.bz2' to local storage [EXTRA] Retrieving 'ncurses-5.9' [EXTRA] Saving 'ncurses-5.9.tar.gz' to local storage [EXTRA] Retrieving 'expat-2.1.0' [EXTRA] Saving 'expat-2.1.0.tar.gz' to local storage [EXTRA] Retrieving 'ltrace_0.5.3.orig' [EXTRA] Saving 'ltrace_0.5.3.orig.tar.gz' to local storage [EXTRA] Retrieving 'strace-4.5.19' [EXTRA] Saving 'strace-4.5.19.tar.bz2' to local storage [INFO ] Retrieving needed toolchain components' tarballs: done in 459.86s (at 08:11) [INFO ] ================================================================= [INFO ] Extracting, patching and installing companion tools [EXTRA] Extracting 'make-3.81' [EXTRA] Patching 'make-3.81' [EXTRA] ================================================================= [EXTRA] Installing make [EXTRA] Installing make : done in 155.55s (at 10:50) [INFO ] Extracting, patching and installing companion tools: done in 158.54s (at 10:50) [INFO ] ================================================================= [INFO ] Extracting and patching toolchain components [EXTRA] Extracting 'linux-custom' [EXTRA] Extracting 'gmp-4.3.2' [EXTRA] Patching 'gmp-4.3.2' [EXTRA] Extracting 'mpfr-2.4.2' [EXTRA] Patching 'mpfr-2.4.2' [11:42] / |
4.结果此处,由于E盘空间的问题,竟然出错了:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | [INFO ] ================================================================= [INFO ] Extracting and patching toolchain components [EXTRA] Extracting 'linux-custom' [EXTRA] Extracting 'gmp-4.3.2' [EXTRA] Patching 'gmp-4.3.2' [EXTRA] Extracting 'mpfr-2.4.2' [EXTRA] Patching 'mpfr-2.4.2' [EXTRA] Extracting 'libelf-0.8.13' [EXTRA] Patching 'libelf-0.8.13' [EXTRA] Extracting 'binutils-2.20.1a' [12:16] / /opt/crosstool-ng/lib/ct-ng .1.18.0 /scripts/functions : line 198: printf : write error: No space left on device [ERROR] [ERROR] >> [12:17] / /opt/crosstool-ng/lib/ct-ng .1.18.0 /scripts/functions : line 198: printf : write error: No space left on device [ERROR] >> Build failed in step 'Extracting and patching toolchain components' [12:17] / /opt/crosstool-ng/lib/ct-ng .1.18.0 /scripts/functions : line 198: printf : write error: No space left on device [ERROR] >> called in step '(top-level)' [12:17] / /opt/crosstool-ng/lib/ct-ng .1.18.0 /scripts/functions : line 198: printf : write error: No space left on device [ERROR] >> [12:17] / /opt/crosstool-ng/lib/ct-ng .1.18.0 /scripts/functions : line 198: printf : write error: No space left on device [ERROR] >> Error happened in : CT_DoLog[scripts /functions @198] [12:17] / /opt/crosstool-ng/lib/ct-ng .1.18.0 /scripts/functions : line 198: printf : write error: No space left on device [ERROR] >> called from: CT_DoExecLog[scripts /functions @257] [12:17] / /opt/crosstool-ng/lib/ct-ng .1.18.0 /scripts/functions : line 198: printf : write error: No space left on device [ERROR] >> called from: CT_Extract[scripts /functions @926] [12:17] / /opt/crosstool-ng/lib/ct-ng .1.18.0 /scripts/functions : line 198: printf : write error: No space left on device [ERROR] >> called from: do_binutils_extract[scripts /build/binutils/binutils .sh@33] [12:17] / /opt/crosstool-ng/lib/ct-ng .1.18.0 /scripts/functions : line 198: printf : write error: No space left on device [ERROR] >> called from: main[scripts /crosstool-NG .sh@601] Current command : 'tar' '--strip-components=1' '-C' 'binutils-2.20.1a' '-xv' '-f' '-' exited with error code: 1 Please fix it up and finish by exiting the shell with one of these values: 1 fixed, continue with next build command 2 repeat this build command 3 abort build ct-ng: /home/develop/crosstool-ng/crosstool-ng-1 .18.0_build/.build /src > |
所以去给E盘腾出更多空间,然后继续输入:
exit 2
去继续执行,结果还是出错了:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | ct-ng: /home/develop/crosstool-ng/crosstool-ng-1 .18.0_build/.build /src > exit 2 exit Re-trying last command . [ERROR] [ERROR] >> [ERROR] >> Build failed in step 'Extracting and patching toolchain components' [ERROR] >> called in step '(top-level)' [ERROR] >> [ERROR] >> Error happened in : CT_DoExecLog[scripts /functions @257] [ERROR] >> called from: CT_Extract[scripts /functions @926] [ERROR] >> called from: do_binutils_extract[scripts /build/binutils/binutils .sh@33] [ERROR] >> called from: main[scripts /crosstool-NG .sh@601] Current command : 'tar' '--strip-components=1' '-C' 'binutils-2.20.1a' '-xv' '-f' '-' exited with error code: 2 Please fix it up and finish by exiting the shell with one of these values: 1 fixed, continue with next build command 2 repeat this build command 3 abort build ct-ng: /home/develop/crosstool-ng/crosstool-ng-1 .18.0_build/.build /src > |
算了,先去clean一遍:
1 2 3 4 5 | Administrator@PC-20130611GART /home/develop/crosstool-ng/crosstool-ng-1 .18.0_build $ ct-ng clean CLEAN config CLEAN config.gen CLEAN log |
然后再重新继续ct-ng build吧。
5.继续去ct-ng build编译之前,想起来一个事情:
根据自己教程中总结的:
此处的多线程数,应该是CPU核数的2倍。
此处我的是2核的,所以应该设置成4比较好。
所以去确认一下是否是4:
1 2 3 4 5 6 7 8 9 10 11 | Administrator@PC-20130611GART /home/develop/crosstool-ng/crosstool-ng-1.18.0_build $ ct-ng menuconfig LN config MKDIR config.gen IN config.gen/arch.in IN config.gen/kernel.in IN config.gen/cc.in IN config.gen/binutils.in IN config.gen/libc.in IN config.gen/debug.in CONF config/config.in |
结果果真是2:
(2) Number of parallel jobs
去改为4:
(4) Number of parallel jobs
然后开始ct-ng build编译:
6.结果出错:
7.继续编译,结果出错:
8.然后又出错:
9.接着继续去解决:
10.接着,又出现其他错误:
11.继续编译,又出现:
12.然后又出现:
13.接着又出现:
14.
【总结】
转载请注明:在路上 » 【记录】cygwin下在针对arm920t去ct-ng menuconfig配置后去ct-ng build去编译