1
我試圖建立電流(從GIT)香草Linux內核的Android(Nexus S的),我以下:錯誤,同時建立香草內核爲Android
$ adb pull /proc/config.gz
$ cat config.gz | gunzip > .config
$ export PATH=$PATH:<...>/prebuilt/linux-x86/toolchain/arm-eabi-4.3.1/bin
$ export CROSS_COMPILE=arm-eabi-
$ make
之後,我讓所有的新選項是默認。 而且我得到了以下錯誤:
CC arch/arm/mach-s5pv210/common.o
arch/arm/mach-s5pv210/common.c:169: error: expected identifier or '(' before 'void'
arch/arm/mach-s5pv210/common.c:169: error: expected ')' before numeric constant
arch/arm/mach-s5pv210/common.c:201: error: expected identifier or '(' before 'void'
arch/arm/mach-s5pv210/common.c:201: error: expected ')' before numeric constant
arch/arm/mach-s5pv210/common.c:239: error: expected identifier or '(' before 'void'
arch/arm/mach-s5pv210/common.c:239: error: expected ')' before numeric constant
arch/arm/mach-s5pv210/common.c:247: error: expected identifier or '(' before 'void'
arch/arm/mach-s5pv210/common.c:247: error: expected ')' before numeric constant
make[1]: *** [arch/arm/mach-s5pv210/common.o] Error 1
make: *** [arch/arm/mach-s5pv210] Error 2
這是該行:
...
}
void __init s5pv210_map_io(void)
{
...
如何解決呢?我沒有在源代碼
不能保證它是相關的,也可能有其他問題,但gcc 4.3.x讓我覺得有些老舊。我認爲現在大部分Android工作都是在4.4.x或更新的版本上完成的。你應該可以使用adb shell'cat/proc/version'來查看當前內核使用的是什麼。 –
Linux版本3.0.29-Cyanogenmod-g7f075f6(rankor @ rankor-nettop)(gcc版本4.4.3(GCC)),由我用這個編譯器編譯。 – arts777
試用4.4.3,有同樣的錯誤。 – arts777