我想建立一個工具鏈使用crosstool-ng
,我已經把它設置好了,選擇我的CPU,如http://crosstool-ng.org/#download_and_usage所述,我在我可以建立我的工具鏈的步驟。當我進入ct-ng build
但是,它取消,出現以下錯誤:crosstool-ng無法取得linux tarball
$ 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/[email protected]]
[ERROR] >> called from: main[scripts/[email protected]]
[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/[email protected]]
[ERROR] >> called from: main[scripts/[email protected]]
[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)
我明白,這不是能夠檢索內核,是有辦法,我可以手動下載並告訴腳本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〜原稿and wrote a wrapper
在/ usr/bin中/ wget`,看起來像:
#!/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權限並嘗試了它,從shell中使用wget http://www.kernel.org/pub/linux/kernel/v4.x/linux-4.3.tar.gz
(利用我的包裝腳本)現在工作得很好...