使用在bpi m3上编译BPI-M3-bsp 遇到的问题

为了提高m3 开发的灵活性,我打算使用m3 编译自己的内核。

1.首先下载 git clone https://github.com/BPI-SINOVOIP/BPI-M3-bsp.git

2.添加依赖包 apt-get install git build-essential libncurses5-dev

3.修改BPI-M3-bsp/Makefile
由于我只编译内核,所有我只修改的内核编译部分,去掉交叉编译的修饰
[table]
[tr][td]kernel: $(K_DOT_CONFIG)[/td][/tr]
[tr][td][/td][td] $(Q)$(MAKE) -C linux-sunxi -j$J INSTALL_MOD_PATH=output uImage modules[/td][/tr]
[tr][td][/td][td] $(Q)$(MAKE) -C linux-sunxi/modules/gpu LICHEE_KDIR=${LICHEE_KDIR}[/td][/tr]
[tr][td][/td][td] $(Q)$(MAKE) -C linux-sunxi -j$J INSTALL_MOD_PATH=output modules_install[/td][/tr]
[tr][td][/td][td] $(Q)$(MAKE) -C linux-sunxi -j$J headers_install[/td][/tr]
[tr][td][/td][td] #cd linux-sunxi && ${K_CROSS_COMPILE}objcopy -R .note.gnu.build-id -S -O binary vmlinux bImage[/td][/tr]
[tr][td][/td][td]由于我只需要Uimage,所以这一行被我注释掉了[/td][/tr]
[tr][td][/td][td]kernel-clean:[/td][/tr]
[tr][td][/td][td] $(Q)$(MAKE) -C linux-sunxi/arch/arm/mach-sunxi/pm/standby clean[/td][/tr]
[tr][td][/td][td] $(Q)$(MAKE) -C linux-sunxi/modules/gpu LICHEE_KDIR=${LICHEE_KDIR} clean[/td][/tr]
[tr][td][/td][td] $(Q)$(MAKE) -C linux-sunxi -j$J distclean[/td][/tr]
[tr][td][/td][td] rm -rf linux-sunxi/output/[/td][/tr]
[tr][td][/td][td] rm -f linux-sunxi/bImage[/td][/tr]
[tr][td][/td][td][/td][/tr]
[tr][td][/td][td]kernel-config: $(K_DOT_CONFIG)[/td][/tr]
[tr][td][/td][td] $(Q)$(MAKE) -C linux-sunxi -j$J menuconfig[/td][/tr]
[tr][td][/td][td] cp linux-sunxi/.config linux-sunxi/arch/arm/configs/$(KERNEL_CONFIG)[/td][/tr]
[/table]
经过修改
直接运行 . build.sh 没有遇到大的问题 ,按照以前的帖选择 内核类型(1)和编译内核(3)。
但是在编译过程中出现了如下问题:

arch/arm/mach-sunxi/pm/standby/gen_check_code: 1: arch/arm/mach-sunxi/pm/standby/gen_check_code: Syntax error: end of file unexpecte d (expecting “)”)
/home/pi/emmc/BPI-M3-bsp/linux-sunxi/arch/arm/mach-sunxi/pm/standby/Makefile:102: recipe for target ‘arch/arm/mach-sunxi/pm/standby/ resume1.code’ failed
make[4]: *** [arch/arm/mach-sunxi/pm/standby/resume1.code] Error 2
/home/pi/emmc/BPI-M3-bsp/linux-sunxi/arch/arm/mach-sunxi/pm/Makefile:90: recipe for target ‘arch/arm/mach-sunxi/pm/standby/standby.c ode’ failed
make[3]: *** [arch/arm/mach-sunxi/pm/standby/standby.code] Error 2
scripts/Makefile.build:443: recipe for target ‘arch/arm/mach-sunxi/pm’ failed
make[2]: *** [arch/arm/mach-sunxi/pm] Error 2
Makefile:948: recipe for target ‘arch/arm/mach-sunxi’ failed
make[1]: *** [arch/arm/mach-sunxi] Error 2
make[1]: *** Waiting for unfinished jobs…

求救1111111111111111111111111111111111111111

arch/arm/mach-sunxi/pm/standby/gen_check_code: 1: arch/arm/mach-sunxi/pm/standby/gen_check_code: Syntax error: end of file unexpected (expecting “)”)
/home/pi/emmc/BPI-M3-bsp/linux-sunxi/arch/arm/mach-sunxi/pm/standby/Makefile:102: recipe for target ‘arch/arm/mach-sunxi/pm/standby/resume1.code’ failed
make[4]: *** [arch/arm/mach-sunxi/pm/standby/resume1.code] Error 2
/home/pi/emmc/BPI-M3-bsp/linux-sunxi/arch/arm/mach-sunxi/pm/Makefile:90: recipe for target ‘arch/arm/mach-sunxi/pm/standby/standby.code’ failed
make[3]: *** [arch/arm/mach-sunxi/pm/standby/standby.code] Error 2
scripts/Makefile.build:443: recipe for target ‘arch/arm/mach-sunxi/pm’ failed
make[2]: *** [arch/arm/mach-sunxi/pm] Error 2
Makefile:948: recipe for target ‘arch/arm/mach-sunxi’ failed
make[1]: *** [arch/arm/mach-sunxi] Error 2
make[1]: *** Waiting for unfinished jobs…

感觉您发重复了,以哪个为准了,官方建议的编译环境是ubuntu x64

我不知道怎么删 ,我感觉在m3 上编译自己的内核更 方便,不是所有用户都厚linux pc。

两个都有一样的

问题被我自己解决了 @@@@@@@@@ 新帖子马上发 《在bpi m3上编译BPI-M3-bsp 内核》