Firefly开源社区
标题:
fireprime编译linux失败
[打印本页]
作者:
mianhuacar
时间:
2015-9-19 18:05
标题:
fireprime编译linux失败
我按照这里说的
http://wiki.t-firefly.com/index.php/FirePrime/Build_kernel
做,不过出错了,请帮我这个新手
谢谢~
1、安装开发包没问题
sudo apt-get install build-essential lzop libncurses5-dev libssl-dev
2、安装 mkbootimg 工具也没问题
git clone
https://github.com/neo-technologies/rockchip-mkbootimg.git
cd rockchip-mkbootimg
make && sudo make install
3、获取内核源码和安装交叉编译工具链
因为安卓的SDK太大了,没下下来,打算暂时先弄一下linux
只是下载了内核源码和arm-eabi-4.6 交叉编译工具链
4、编译内核映像
执行
export ARCH=arm
export CROSS_COMPILE=/home/mh/rockchip-mkbootimg/arm-eabi-4.6/bin/arm-eabi-
make fireprime-linux_defconfig
这里还是OK的,但是执行下面那句就出错了
make -j4 rk3128-fireprime.img
内核源码放在/home/mh/rockchip-mkbootimg/fireprime-kernel
交叉编译器放在/home/mh/rockchip-mkbootimg/arm-eabi-4.6
报出的错误如下
root@mh-A8Se:/home/mh/rockchip-mkbootimg/fireprime-kernel# make -j4 rk3128-fireprime.img
/home/mh/rockchip-mkbootimg/arm-eabi-4.6/bin/arm-eabi-gcc: 1: /home/mh/rockchip-mkbootimg/arm-eabi-4.6/bin/arm-eabi-gcc: Syntax error: "(" unexpected
scripts/kconfig/conf --silentoldconfig Kconfig
drivers/net/wireless/rockchip_wlan/rtl8188eu/Kconfig:6:warning: defaults for choice values not supported
/home/mh/rockchip-mkbootimg/arm-eabi-4.6/bin/arm-eabi-gcc: 1: /home/mh/rockchip-mkbootimg/arm-eabi-4.6/bin/arm-eabi-gcc: Syntax error: "(" unexpected
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
CC scripts/mod/empty.o
/home/mh/rockchip-mkbootimg/arm-eabi-4.6/bin/arm-eabi-gcc: 1: /home/mh/rockchip-mkbootimg/arm-eabi-4.6/bin/arm-eabi-gcc: Syntax error: "(" unexpected
make[2]: *** [scripts/mod/empty.o] 错误 2
make[2]: *** 正在等待未完成的任务....
HOSTCC scripts/mod/mk_elfconfig
make[1]: “include/generated/mach-types.h”是最新的。
CC kernel/bounds.s
/home/mh/rockchip-mkbootimg/arm-eabi-4.6/bin/arm-eabi-gcc: 1: /home/mh/rockchip-mkbootimg/arm-eabi-4.6/bin/arm-eabi-gcc: Syntax error: "(" unexpected
make[1]: *** [kernel/bounds.s] 错误 2
make: *** [prepare0] 错误 2
make: *** 正在等待未完成的任务....
make[1]: *** [scripts/mod] 错误 2
make: *** [scripts] 错误 2
作者:
mianhuacar
时间:
2015-9-21 22:27
版主,我重装了ubuntu14.04,然后下载了android的源码还是不行,救我:'(
1/我在百度网盘下载了源码
2/检验没问题
$ md5sum /path/to/fireprime_android5.1_git_20150612.tar
b896848a3068b50be4c6780e8bd73a2c fireprime_android5.1_git_20150612.tar
3/下面两个步骤也执行了
确认无误后,就可以解压:
mkdir -p ~/proj/fireprime
cd ~/proj/fireprime
tar xf /path/to/fireprime_android5.1_git_20150612.tar
git reset --hard
git remote add bitbucket
https://bitbucket.org/T-Firefly/firenow-lollipop.git
确认无误后,就可以解压:
mkdir -p ~/proj/fireprime
cd ~/proj/fireprime
tar xf /path/to/fireprime_android5.1_git_20150612.tar
git reset --hard
git remote add bitbucket
https://bitbucket.org/T-Firefly/firenow-lollipop.git
以后就可以直接从 bitbucket 处更新:
git pull bitbucket fireprime:fireprime
4/编译linux还是失败
在内核源码目录里执行:
make fireprime-linux_defconfig
make -j8 rk3128-fireprime.img
错误代码如下:
root@mh-A8Se:/home/mh# cd ~/proj/fireprime/
root@mh-A8Se:~/proj/fireprime# cd kernel/
root@mh-A8Se:~/proj/fireprime/kernel# ls
android Documentation ipc logo.bmp pack-kernel.sh scripts
arch drivers Kbuild MAINTAINERS pie security
block firmware Kconfig Makefile README sound
COPYING fs kernel mkkrnlimg REPORTING-BUGS tools
CREDITS include lib mm resource_tool usr
crypto init linaro net samples virt
root@mh-A8Se:~/proj/fireprime/kernel# make fireprime-linux_defconfig
drivers/net/wireless/rockchip_wlan/rtl8188eu/Kconfig:6:warning: defaults for choice values not supported
#
# configuration written to .config
#
root@mh-A8Se:~/proj/fireprime/kernel# make -j4 rk3128-fireprime.img
../prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-gcc: 1: ../prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-gcc: Syntax error: "(" unexpected
scripts/kconfig/conf --silentoldconfig Kconfig
drivers/net/wireless/rockchip_wlan/rtl8188eu/Kconfig:6:warning: defaults for choice values not supported
../prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-gcc: 1: ../prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-gcc: Syntax error: "(" unexpected
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
CC scripts/mod/empty.o
HOSTCC scripts/pnmtologo
../prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-gcc: 1: ../prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-gcc: Syntax error: "(" unexpected
make[2]: *** [scripts/mod/empty.o] 错误 2
make[1]: *** [scripts/mod] 错误 2
make[1]: *** 正在等待未完成的任务....
make[1]: “include/generated/mach-types.h”是最新的。
CC kernel/bounds.s
../prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-gcc: 1: ../prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-gcc: Syntax error: "(" unexpected
make[1]: *** [kernel/bounds.s] 错误 2
make: *** [prepare0] 错误 2
make: *** 正在等待未完成的任务....
make: *** [scripts] 错误 2
作者:
暴走的阿Sai
时间:
2015-9-22 09:24
交叉编译工具链是指向SDK内的吗?看报错还是交叉编译的问题,编译内核不用那么多进程,试试单进程看看
../prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-gcc: 1: ../prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-gcc: Syntax error: "(" unexpected
作者:
mianhuacar
时间:
2015-9-22 13:12
没想到真的可以得到暴走的回复,太兴奋了。
请问怎样设置交叉编译工具链是指向SDK内呢?不是说在内核源码内不用设置吗?
作者:
暴走的阿Sai
时间:
2015-9-22 15:55
不用设置的,SDK里面已经有对应的编译工具,而且已经指向了。记得是在prebuilts里面的。如果自己去修改其他的交叉编译,可能会出现编译问题。
作者:
mianhuacar
时间:
2015-9-22 21:02
本帖最后由 mianhuacar 于 2015-9-22 21:03 编辑
麻烦了,单进程还是同样的问题:dizzy:我没有修改过任何东西:dizzy:
root@mh-A8Se:~/proj/fireprime/kernel# make rk3128-fireprime.img
../prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-gcc: 1: ../prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-gcc: Syntax error: "(" unexpected
CC scripts/mod/empty.o
../prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-gcc: 1: ../prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-gcc: Syntax error: "(" unexpected
make[2]: *** [scripts/mod/empty.o] 错误 2
make[1]: *** [scripts/mod] 错误 2
make: *** [scripts] 错误 2
作者:
mianhuacar
时间:
2015-9-22 21:38
是不是要能够打印出交叉编译器版本才行?
即这个arm-linux-gcc -v,要有输出?
我现在是arm-linux-gcc:未找到命令
作者:
暴走的阿Sai
时间:
2015-9-23 12:47
mianhuacar 发表于 2015-9-22 21:38
是不是要能够打印出交叉编译器版本才行?
即这个arm-linux-gcc -v,要有输出?
那先检查编译器
../prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-gcc
作者:
mianhuacar
时间:
2015-9-23 21:49
暴走你好,这样算是OK吗?
root@mh-A8Se:~/proj/fireprime/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin# ls
arm-eabi-addr2line arm-eabi-g++ arm-eabi-gdb arm-eabi-ranlib
arm-eabi-ar arm-eabi-gcc arm-eabi-gprof arm-eabi-readelf
arm-eabi-as arm-eabi-gcc-4.8 arm-eabi-ld arm-eabi-size
arm-eabi-c++ arm-eabi-gcc-ar arm-eabi-ld.bfd arm-eabi-strings
arm-eabi-c++filt arm-eabi-gcc-nm arm-eabi-nm arm-eabi-strip
arm-eabi-cpp arm-eabi-gcc-ranlib arm-eabi-objcopy
arm-eabi-elfedit arm-eabi-gcov arm-eabi-objdump
作者:
mianhuacar
时间:
2015-9-23 21:55
我打arm,然后tap两次也会出现这些,算OK吗?
root@mh-A8Se:~# arm
arm2hpdl arm-eabi-gcc arm-eabi-ld.bfd
arm-eabi-addr2line arm-eabi-gcc-4.8 arm-eabi-nm
arm-eabi-ar arm-eabi-gcc-ar arm-eabi-objcopy
arm-eabi-as arm-eabi-gcc-nm arm-eabi-objdump
arm-eabi-c++ arm-eabi-gcc-ranlib arm-eabi-ranlib
arm-eabi-c++filt arm-eabi-gcov arm-eabi-readelf
arm-eabi-cpp arm-eabi-gdb arm-eabi-size
arm-eabi-elfedit arm-eabi-gprof arm-eabi-strings
arm-eabi-g++ arm-eabi-ld arm-eabi-strip
作者:
mianhuacar
时间:
2015-9-23 23:29
今晚又弄了一晚还是失败,编译linux也需要64位的CPU?
作者:
mianhuacar
时间:
2015-9-26 22:57
版主,我终于解决那个编译问题了,估计是因为我那是的系统是32位的,现在换了64位12.04的ubuntu可以了。
不过现在又碰到一个新问题,make modules时出现一个错误,这个又要怎么解呢?
root@mh-A8Se:~/proj/fireprime/kernel# make modules
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
make[1]: “include/generated/mach-types.h”是最新的。
CALL scripts/checksyscalls.sh
CC scripts/mod/devicetable-offsets.s
GEN scripts/mod/devicetable-offsets.h
HOSTCC scripts/mod/file2alias.o
HOSTLD scripts/mod/modpost
Building modules, stage 2.
MODPOST 3 modules
ERROR: "mali_platform_device_register" [drivers/gpu/arm/mali400/mali/mali.ko] undefined!
ERROR: "mali_platform_device_unregister" [drivers/gpu/arm/mali400/mali/mali.ko] undefined!
make[1]: *** [__modpost] 错误 1
make: *** [modules] 错误 2
作者:
qinchwuhuai
时间:
2016-7-9 02:08
楼主,谢谢你提到的这个问题,帮了我很大忙,谢谢
作者:
scx56
时间:
2017-9-13 16:24
请问楼主解决问题了么?我也出现了同样的问题
欢迎光临 Firefly开源社区 (https://dev.t-firefly.com/)
Powered by Discuz! X3.1