1、/tmp/ccFzdWQP.s: Assembler messages: /tmp/ccFzdWQP.s:508: Error: garbage following instruction -- `dsb nshst' /tmp/ccFzdWQP.s:523: Error: garbage following instruction -- `dsb nsh' 编译器问题。更换编译器即可。 sudo apt-get install gcc-arm-linux-gnueabi 编译内核时,修改编译器: ARCH ?= arm CROSS_COMPILE ?= arm-linux-gnueabi- 保存后执行make uImage。 2、Kernel: arch/arm/boot/zImage is ready multiple (or no) load addresses: This is incompatible with uImages Specify LOADADDR on the commandline to build an uImage arch/arm/boot/Makefile:90: recipe for target 'arch/arm/boot/uImage' failed 原因:没有指定加载地址 解决方法:1. 编译时指定地址make uImage ARCH=arm LOADADDR=0x20008000 2.修改相关文件,添加地址\arch\arm\mach-s5pv210\Makefile.boot zreladdr-y := 0x20008000 params_phys-y := 0x20000100 zreladdr-$(CONFIG_MACH_SMDKC110) := 0x30008000 params_phys-$(CONFIG_MACH_SMDKC110) := 0x30000100 但是发现新版的kernel 4.15没有Makefile.boot文件,原因待查 3、init/do_mounts_rd.o:在函数‘return_address’中: /root/code/linux-3.8.3/arch/arm/include/asm/ftrace.h:51: `return_address'被多次定义 init/do_mounts.o:/root/code/linux-3.8.3/arch/arm/include/asm/ftrace.h:51:第一次在此定义 init/do_mounts_initrd.o:在函数‘return_address’中: /root/code/linux-3.8.3/arch/arm/include/asm/ftrace.h:51: `return_address'被多次定义 init/do_mounts.o:/root/code/linux-3.8.3/arch/arm/include/asm/ftrace.h:51:第一次在此定义 修改/arch/arm/include/asm/ftrace.h:51 改extern inline void *return_address(unsigned int level) 为static inline void *return_address(unsigned int level) 4、arch/arm/kernel/return_address.c:62:2: warning: #warning "TODO: return_address should use unwind tables" [-Wcpp] #warning "TODO: return_address should use unwind tables" ^ arch/arm/kernel/return_address.c:65:7: error: redefinition of ‘return_address’ void *return_address(unsigned int level) 修改:arch/arm/kernel/return_address.c 源代码:void *return_address(unsigned int level)(这里是第二个return_address,里面只有return NULL一行代码) { return NULL; } 修改为:全部注释掉,或者删除掉 5、/usr/local/arm/opt/FriendlyARM/toolschain/4.4.3/bin/.arm-none-linux-gnueabi-ld: no machine record defined 修改:arch\arm\kernel\vmlinux.lds.S文件的最后部分: /*ASSERT((__proc_info_end - __proc_info_begin), "missing CPU support") ASSERT((__arch_info_end - __arch_info_begin), "no machine record defined")*/ 6. 解决:在编译完成的u-boot-1.1.6的tool/下面找到mkimage这个文件, 把它烤贝到交叉编译的路径下面/work/tools/gcc-3.4.5-glibc-2.3.6/bin 7. make menuconfig出错, 解决:安装apt install libncurses5-dev |
kernel 编译遇到的问题
最新推荐文章于 2023-05-15 16:07:11 发布