我正在尝试使用crosstool-ng构build一个工具链,我已经完成了所有工作,按照http://crosstool-ng.org/#download_and_usage中的描述select了我的cpu,然后我可以build立我的工具链。 当我inputct-ng build时,它会取消以下错误:
$ ct-ng build [INFO ] Performing some trivial sanity checks [INFO ] Build started 20170126.135517 [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 = x86_64-pc-linux-gnu [EXTRA] host = x86_64-pc-linux-gnu [EXTRA] target = powerpc-e500v2-linux-gnuspe [EXTRA] Dumping internal crosstool-ng configuration: done in 0.09s (at 00:02) [INFO ] ================================================================= [INFO ] Retrieving needed toolchain components' tarballs [EXTRA] Retrieving 'linux-4.3' [ERROR] [ERROR] >> [ERROR] >> Build Failed in step 'Retrieving needed toolchain components' tarballs' [ERROR] >> called in step '(top-level)' [ERROR] >> [ERROR] >> Error happened in: do_kernel_get[scripts/build/kernel/linux.sh@741] [ERROR] >> called from: main[scripts/crosstool-ng.sh@590] [ERROR] >> [ERROR] >> For more info on this error,look at the file: 'build.log' [ERROR] >> There is a list of kNown issues,some with workarounds,in: [ERROR] >> '/usr/local/share/doc/crosstool-ng/crosstool-ng-1.22.0/B - KNown issues.txt' [ERROR] [ERROR] (elapsed: 0:31.10) [00:31] / make: *** [build] Error 1
在build.log我得到以下内容:
[EXTRA] Retrieving 'linux-4.3' ... ... ... [DEBUG] Not at this location: "http://www.kernel.org/pub/linux/kernel/v4.x/longterm/v4.3/linux-4.3.zip" [DEBUG] Trying 'http://www.kernel.org/pub/linux/kernel/v4.x/longterm/linux-4.3.zip' [DEBUG] ==> Executing: 'wget' '--passive-ftp' '--tries=3' '-nc' '--... [DEBUG] Not at this location: "http://www.kernel.org/pub/linux/kernel/v4.x/longterm/linux-4.3" [ERROR] [ERROR] >> [ERROR] >> Build Failed in step 'Retrieving needed toolchain components' tarballs' [ERROR] >> called in step '(top-level)' [ERROR] >> [ERROR] >> Error happened in: do_kernel_get[scripts/build/kernel/linux.sh@741] [ERROR] >> called from: main[scripts/crosstool-ng.sh@590] [ERROR] >> [ERROR] >> For more info on this error,in: [ERROR] >> '/usr/local/share/doc/crosstool-ng/crosstool-ng-1.22.0/B - KNown issues.txt' [ERROR] [ERROR] (elapsed: 0:31.10)
我知道它不能检索内核,有没有办法我可以手动下载并告诉脚本tarball的位置?
好吧,我意识到wget http://www.kernel.org/pub/linux/kernel/v4.x/linux-4.3.tar.gz将会失败,但是wget --no-check-certificate http://www.kernel.org/pub/linux/kernel/v4.x/linux-4.3.tar.gz将通过代理工作下载tarball。 所以我把/usr/bin/wget拷贝到/ usr / binwget〜orig and wrote a wrapper / usr / bin / wget:
将现有的rootfs与自定义工具链结合起来
各种glibc和Linux内核版本的兼容性
在cygwin上的crosstool-ng构build中,gettext编译失败
如何获得crosstool-ng C ++编译器的工作
使用python subprocess.call()来启动一个ncurses进程
#!/bin/bash /usr/bin/wget~orig --no-check-certificate $1
但是这似乎也不工作,我现在在build.log获得以下内容:
[DEBUG] ==> Executing: 'wget' '--passive-ftp' '--tries=3' '-nc' '--progress=dot:binary' '-T' '10' '-O' '/home/ron/src/toolchain/work/.build/tarballs/linux-4.3.tar.xz.tmp-dl' 'http://www.kernel.org/pub/linux/kernel/v4.x/linux-4.3.tar.xz' [ALL ] wget~orig: missing URL [ALL ] Usage: wget~orig [OPTION]... [URL]... [ALL ] [ALL ] Try `wget~orig --help' for more options. [DEBUG] Not at this location: "http://www.kernel.org/pub/linux/kernel/v4.x/linux-4.3.tar.xz" [DEBUG] Trying 'http://www.kernel.org/pub/linux/kernel/v4.x/longterm/v4.3/linux-4.3.tar.xz' [DEBUG] ==> Executing: 'wget' '--passive-ftp' '--tries=3' '-nc' '--progress=dot:binary' '-T' '10' '-O' '/home/ron/src/toolchain/work/.build/tarballs/linux-4.3.tar.xz.tmp-dl' 'http://www.kernel.org/pub/linux/kernel/v4.x/longterm/v4.3/linux-4.3.tar.xz' [ALL ] wget~orig: missing URL [ALL ] Usage: wget~orig [OPTION]... [URL]...
它如何自动地知道我原来的wget二进制文件现在叫做wget~orig ? Andit试图用它来代替我现在位于/usr/bin/wget包装器(是的,我已经添加了x的权限并试用了, wget http://www.kernel.org/pub/linux/kernel/v4.x/linux-4.3.tar.gz从shell(利用我的包装脚本)现在工作得很好…
如何使用crosstool-ng来改变GCC的“加拿大十字”汇编的主机types
crosstool-ng,目录结构和sysroot
为什么工具链名称具有单独的操作系统和EABI字段?
好的,
由于wget被多个(9)参数调用,所以我修复了我的包装脚本(在/usr/bin/wget ):
#!/bin/bash /usr/bin/wget~orig --no-check-certificate $1 $2 $3 $4 $5 $6 $7 $8 $9
这似乎正在成功地下载ct-ng所需的源代码压缩包
你可以配置ct-ng来阻止它下载源代码:
ct-ng menuconfig
去Path and misc options
在*** Downloading *** ,选择[*] Forbid downloads
出口…
当你尝试构建你的工具链( ct-ng build )时,构建过程会希望你把手动下载的tarball放到~/src 。
只要检查build.log可以知道需要什么tarball。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。