生成C工具鏈的問題我有一個自定義Linux由硬件供應商根據版本2.6.18修改的內核。我需要爲它使用最新版本的uClibc生成一個新的工具鏈,用於MIPS拱門。爲自定義Linux 2.6.18
我選擇了工具crosstool-ng來簡化過程,但在生成過程中失敗。這裏是錯誤部分的日誌:
[INFO ] =================================================================
[INFO ] Installing kernel headers
[DEBUG] Using kernel's headers_install
[EXTRA] Installing kernel headers
[DEBUG] ==> Executing: 'make' '-C' '/home/myuser/sources/custom-linux/toolchain/.build/src/linux-custom' 'O=/home/myuser/sources/custom-linux/toolchain/.build/mipsel-unknown-linux-uclibc/build/build-kernel-headers' 'ARCH=mips' 'INSTALL_HDR_PATH=/home/myuser/x-tools/mipsel-unknown-linux-uclibc/mipsel-unknown-linux-uclibc/sysroot/usr' 'V=0' 'headers_install'
[ALL ] make[1]: Entering directory `/home/myuser/sources/custom-linux/stblinux-2.6.18'
[ALL ] CHK include/linux/version.h
[ALL ] UPD include/linux/version.h
[ALL ] *** Error: Headers not exportable for this architecture (mips)
[ERROR] make[2]: *** [headers_install] Error 1
[ERROR] make[1]: *** [headers_install] Error 2
[ALL ] make[1]: Leaving directory `/home/myuser/sources/custom-linux/stblinux-2.6.18'
[ERROR]
[ERROR] >>
[ERROR] >> Build failed in step 'Installing kernel headers'
[ERROR] >> called in step '(top-level)'
[ERROR] >>
[ERROR] >> Error happened in: CT_DoExecLog[scripts/[email protected]]
[ERROR] >> called from: do_kernel_install[scripts/build/kernel/[email protected]]
[ERROR] >> called from: do_kernel_headers[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] >> '/home/myuser/.local/share/doc/crosstool-ng/ct-ng.hg+default-20f2459b97bf/B - Known issues.txt'
[ERROR]
[ERROR] (elapsed: 41:41.63)
這個問題似乎與* headers_install *規則有關。我認爲它是與特定版本的內核一起引入的。有趣的事實是,如果我運行
make ARCH=mips INSTALL_HDR_PATH=... headers_install
標題將被安裝得很好。該問題似乎在使用O =參數時發生。有誰知道它是幹什麼用的?有沒有解決這個問題的方法?
1.使用第二個make時,headers_install規則是否運行? –
2. * mipsel-unknown-linux-uclibc *似乎值得研究 - 在構建過程中,當構建工具宣稱某些東西被**爲未知**時,我總是感到有趣。 –
@MarkLeightonFisher是的。 – ivarec