rk3399编译u-boot报错Error: arch/arm/dts/.rk3036-sdk.dtb.pre.tmp:77.1-10 syntax error

目录

背景

解决方案


     

 

 

    先贴报错信息,如下:

  LD      u-boot
  OBJCOPY u-boot.srec
  OBJCOPY u-boot-nodtb.bin
  SYM     u-boot.sym
  DTC     arch/arm/dts/rk3036-sdk.dtb
  DTC     arch/arm/dts/rk3188-radxarock.dtb
  DTC     arch/arm/dts/rk3288-miqi.dtb
  DTC     arch/arm/dts/rk3288-phycore-rdk.dtb
  DTC     arch/arm/dts/rk3288-popmetal.dtb
  DTC     arch/arm/dts/rk3288-rock2-square.dtb
start=$(/home/saflam/rk3399/rk3399-android-10/prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-nm u-boot | grep __rel_dyn_start | cut -f 1 -d ' '); end=$(/home/saflam/rk3399/rk3399-android-10/prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-nm u-boot | grep __rel_dyn_end | cut -f 1 -d ' '); tools/relocate-rela u-boot-nodtb.bin 0x00200000 $start $end
  DTC     arch/arm/dts/rk3288-tinker.dtb
Error: arch/arm/dts/.rk3036-sdk.dtb.pre.tmp:77.1-10 syntax error
FATAL ERROR: Unable to parse input tree
make[2]: *** [scripts/Makefile.lib:319:arch/arm/dts/rk3036-sdk.dtb] 错误 1
make[2]: *** 正在等待未完成的任务....
Error: arch/arm/dts/.rk3188-radxarock.dtb.pre.tmp:383.1-10 syntax error
FATAL ERROR: Unable to parse input tree
make[2]: *** [scripts/Makefile.lib:319:arch/arm/dts/rk3188-radxarock.dtb] 错误 1
make[1]: *** [dts/Makefile:101:arch-dtbs] 错误 2
make: *** [Makefile:883:dts/dt.dtb] 错误 2

 

 

 

 

 

 

 

背景

      我的开发板是friendly的nanoPC-T4,rk3399芯片,编译Android10源码因时间太长就睡觉去了,睡醒看编译成功了但是缺少各种img文件,然后就单编u-boot,kernel,编u-boot的时候就报上面的Error: arch/arm/dts/.rk3036-sdk.dtb.pre.tmp:77.1-10 syntax error等错误(下面是报错文件摘要),思路被报错信息给带节奏了,最后的#include前面多了个"\",一直从编译流程文件里一个一个的捋,绕在去除"\"的思路里根本无法自拔~>_<~ 排查了四天都没搞清楚,在国内也查不到相关的解决方法,在萤火虫(firefly)论坛也有人讨论,但是太冷清了也没有回复,真的已经搞懵杯了,番强到google上搜,从搜索的title上也没有找到与这个问题相关的;

&usb_host {
        vbus-supply = <&vcc5v0_host>;
        status = "okay";
};

&usb_otg {
        vbus-supply = <&vcc5v0_otg>;
        status = "okay";
};

&pinctrl {
        usb_otg {
                otg_vbus_drv: host-vbus-drv {
                        rockchip,pins = <0 26 RK_FUNC_GPIO &pcfg_pull_none>;
                };
        };

        usb_host {
                host_vbus_drv: host-vbus-drv {
                        rockchip,pins = <2 23 RK_FUNC_GPIO &pcfg_pull_none>;
                };
        };
};
\#include "rk3036-sdk-u-boot.dtsi"

 

 

 

 

 

 

 

 

 

解决方案

  通过逛国外论坛和github找到了方法[传送门] 

1. vi  u-boot/Makefile 添加 KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member)   位置的话理论上讲只要是没有if判断影响执行这句语句的位置都可以;

2. vi u-boot/arch/arm/dts/Makefile  CONFIG_ARCH_ROCKCHIP内把报错的dtb删掉;一般就是rk3036-sdk.dtb、rk3188-radxarock.dtb、rk3368-lion.dtb、rk3368-sheep.dtb、rk3368-geekbox.dtb、rk3368-px5-evb.dtb,我记得还有1~2个报错的dtb文件,请根据错误自行删除;

3. vi u-boot/scripts/dtc/dtc-lexer.l  搜索yylloc  把-YYLTYPE yylloc 整行删掉;

4.vi u-boot/scripts/dtc/dtc-lexer.lex.c_shipped 搜索yylloc 把-YYLTYPE yylloc 整行删掉;

5.重新编译,齐活└(^o^)┘   ▼▼▼

 

rk3399编译u-boot报错Error: arch/arm/dts/.rk3036-sdk.dtb.pre.tmp:77.1-10 syntax error_第1张图片

 

你可能感兴趣的:(Android源码,u-boot,uboot,rk3399,dtb..pre.tmp,syntax,error)