ti-sdk-am335x-evm-08.00.00.00 u-boot和内核编译的过程。
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
你好 , 我是按照你提供的文档编译的,编译过程都成功了,但我用内核编译驱动代码的时候,出现问题;
这是我编译内核的方法:
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- distclean
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- chinaepg_defconfig
3、配置内核驱动
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig
4、编译内核
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage
5、编译的二进制文件的设备树
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- am335x-boneblack.dtb
6、编译内核模块
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- modules
7、模块安装
sudo make ARCH=arm modules_install
二、出现的问题
make -C /home/yaun/ti-sdk-am335x-evm-08.00.00.00/board-support/linux-3.14.26-g2489c02 M=/home/yaun/chinaepg/drive/1_demo_dev modules
make[1]: 正在进入目录 `/home/yaun/ti-sdk-am335x-evm-08.00.00.00/board-support/linux-3.14.26-g2489c02'
CC [M] /home/yaun/chinaepg/drive/1_demo_dev/01_demo_dev.o
In file included from /home/yaun/ti-sdk-am335x-evm-08.00.00.00/board-support/linux-3.14.26-g2489c02/arch/x86/include/asm/bitops.h:504:0,
from include/linux/bitops.h:36,
from include/linux/kernel.h:10,
from /home/yaun/ti-sdk-am335x-evm-08.00.00.00/board-support/linux-3.14.26-g2489c02/arch/x86/include/asm/percpu.h:44,
from /home/yaun/ti-sdk-am335x-evm-08.00.00.00/board-support/linux-3.14.26-g2489c02/arch/x86/include/asm/preempt.h:5,
from include/linux/preempt.h:20,
from include/linux/spinlock.h:50,
from include/linux/seqlock.h:35,
from include/linux/time.h:5,
from include/linux/stat.h:18,
from include/linux/module.h:10,
from /home/yaun/chinaepg/drive/1_demo_dev/01_demo_dev.c:1:
/home/yaun/ti-sdk-am335x-evm-08.00.00.00/board-support/linux-3.14.26-g2489c02/arch/x86/include/asm/arch_hweight.h: 在函数‘__arch_hweight64’中:
/home/yaun/ti-sdk-am335x-evm-08.00.00.00/board-support/linux-3.14.26-g2489c02/arch/x86/include/asm/arch_hweight.h:53:7: 错误: expected ‘:’ or ‘)’ before ‘POPCNT64’
/home/yaun/ti-sdk-am335x-evm-08.00.00.00/board-support/linux-3.14.26-g2489c02/arch/x86/include/asm/arch_hweight.h:54:8: 错误: 程序中有游离的‘\243’
/home/yaun/ti-sdk-am335x-evm-08.00.00.00/board-support/linux-3.14.26-g2489c02/arch/x86/include/asm/arch_hweight.h:54:8: 错误: 程序中有游离的‘\272’
In file included from /home/yaun/ti-sdk-am335x-evm-08.00.00.00/board-support/linux-3.14.26-g2489c02/arch/x86/include/asm/thread_info.h:22:0,
from include/linux/thread_info.h:54,
from /home/yaun/ti-sdk-am335x-evm-08.00.00.00/board-support/linux-3.14.26-g2489c02/arch/x86/include/asm/preempt.h:6,
from include/linux/preempt.h:20,
from include/linux/spinlock.h:50,
from include/linux/seqlock.h:35,
from include/linux/time.h:5,
from include/linux/stat.h:18,
from include/linux/module.h:10,
from /home/yaun/chinaepg/drive/1_demo_dev/01_demo_dev.c:1:
/home/yaun/ti-sdk-am335x-evm-08.00.00.00/board-support/linux-3.14.26-g2489c02/arch/x86/include/asm/processor.h: 在文件作用域:
/home/yaun/ti-sdk-am335x-evm-08.00.00.00/board-support/linux-3.14.26-g2489c02/arch/x86/include/asm/processor.h:131:30: 错误: ‘CONFIG_X86_L1_CACHE_SHIFT’未声明(不在函数内)
/home/yaun/ti-sdk-am335x-evm-08.00.00.00/board-support/linux-3.14.26-g2489c02/arch/x86/include/asm/processor.h:131:1: 错误: 要求的对齐边界不是常量
/home/yaun/ti-sdk-am335x-evm-08.00.00.00/board-support/linux-3.14.26-g2489c02/arch/x86/include/asm/processor.h:164:0: 警告: “cache_line_size”重定义 [默认启用]
include/linux/cache.h:64:0: 附注: 这是先前定义的位置
/home/yaun/ti-sdk-am335x-evm-08.00.00.00/board-support/linux-3.14.26-g2489c02/arch/x86/include/asm/processor.h:253:1: 错误: 要求的对齐边界不是常量
/home/yaun/ti-sdk-am335x-evm-08.00.00.00/board-support/linux-3.14.26-g2489c02/arch/x86/include/asm/processor.h:284:1: 错误: 要求的对齐边界不是常量
In file included from /home/yaun/ti-sdk-am335x-evm-08.00.00.00/board-support/linux-3.14.26-g2489c02/arch/x86/include/asm/atomic.h:255:0,
from include/linux/atomic.h:4,
from /home/yaun/ti-sdk-am335x-evm-08.00.00.00/board-support/linux-3.14.26-g2489c02/arch/x86/include/asm/thread_info.h:23,
from include/linux/thread_info.h:54,
from /home/yaun/ti-sdk-am335x-evm-08.00.00.00/board-support/linux-3.14.26-g2489c02/arch/x86/include/asm/preempt.h:6,
from include/linux/preempt.h:20,
from include/linux/spinlock.h:50,
from include/linux/seqlock.h:35,
from include/linux/time.h:5,
from include/linux/stat.h:18,
from include/linux/module.h:10,
from /home/yaun/chinaepg/drive/1_demo_dev/01_demo_dev.c:1:
/home/yaun/ti-sdk-am335x-evm-08.00.00.00/board-support/linux-3.14.26-g2489c02/arch/x86/include/asm/atomic64_64.h:19:1: 错误: 未知的类型名‘atomic64_t’
/home/yaun/ti-sdk-am335x-evm-08.00.00.00/board-support/linux-3.14.26-g2489c02/arch/x86/include/asm/atomic64_64.h: 在函数‘atomic64_read’中:
/home/yaun/ti-sdk-am335x-evm-08.00.00.00/board-support/linux-3.14.26-g2489c02/arch/x86/include/asm/atomic64_64.h:21:32: 错误: 在非结构或联合中请求成员‘counter’
/home/yaun/ti-sdk-am335x-evm-08.00.00.00/board-support/linux-3.14.26-g2489c02/arch/x86/include/asm/atomic64_64.h: 在文件作用域:
/home/yaun/ti-sdk-am335x-evm-08.00.00.00/board-support/linux-3.14.26-g2489c02/arch/x86/include/asm/atomic64_64.h:31:33: 错误: 未知的类型名‘atomic64_t’
/home/yaun/ti-sdk-am335x-evm-08.00.00.00/board-support/linux-3.14.26-g2489c02/arch/x86/include/asm/atomic64_64.h:43:41: 错误: 未知的类型名‘atomic64_t’
/home/yaun/ti-sdk-am335x-evm-08.00.00.00/board-support/linux-3.14.26-g2489c02/arch/x86/include/asm/atomic64_64.h:57:41: 错误: 未知的类型名‘atomic64_t’
/home/yaun/ti-sdk-am335x-evm-08.00.00.00/board-support/linux-3.14.26-g2489c02/arch/x86/include/asm/atomic64_64.h:73:49: 错误: 未知的类型名‘atomic64_t’
/home/yaun/ti-sdk-am335x-evm-08.00.00.00/board-support/linux-3.14.26-g2489c02/arch/x86/include/asm/atomic64_64.h:84:33: 错误: 未知的类型名‘atomic64_t’
/home/yaun/ti-sdk-am335x-evm-08.00.00.00/board-support/linux-3.14.26-g2489c02/arch/x86/include/asm/atomic64_64.h:97:33: 错误: 未知的类型名‘atomic64_t’
/home/yaun/ti-sdk-am335x-evm-08.00.00.00/board-support/linux-3.14.26-g2489c02/arch/x86/include/asm/atomic64_64.h:112:41: 错误: 未知的类型名‘atomic64_t’
/home/yaun/ti-sdk-am335x-evm-08.00.00.00/board-support/linux-3.14.26-g2489c02/arch/x86/include/asm/atomic64_64.h:125:41: 错误: 未知的类型名‘atomic64_t’
/home/yaun/ti-sdk-am335x-evm-08.00.00.00/board-support/linux-3.14.26-g2489c02/arch/x86/include/asm/atomic64_64.h:139:49: 错误: 未知的类型名‘atomic64_t’
/home/yaun/ti-sdk-am335x-evm-08.00.00.00/board-support/linux-3.14.26-g2489c02/arch/x86/include/asm/atomic64_64.h:151:48: 错误: 未知的类型名‘atomic64_t’
/home/yaun/ti-sdk-am335x-evm-08.00.00.00/board-support/linux-3.14.26-g2489c02/arch/x86/include/asm/atomic64_64.h:156:48: 错误: 未知的类型名‘atomic64_t’
/home/yaun/ti-sdk-am335x-evm-08.00.00.00/board-support/linux-3.14.26-g2489c02/arch/x86/include/asm/atomic64_64.h:164:37: 错误: 未知的类型名‘atomic64_t’
/home/yaun/ti-sdk-am335x-evm-08.00.00.00/board-support/linux-3.14.26-g2489c02/arch/x86/include/asm/atomic64_64.h:169:34: 错误: 未知的类型名‘atomic64_t’
/home/yaun/ti-sdk-am335x-evm-08.00.00.00/board-support/linux-3.14.26-g2489c02/arch/x86/include/asm/atomic64_64.h:183:39: 错误: 未知的类型名‘atomic64_t’
/home/yaun/ti-sdk-am335x-evm-08.00.00.00/board-support/linux-3.14.26-g2489c02/arch/x86/include/asm/atomic64_64.h:207:45: 错误: 未知的类型名‘atomic64_t’
In file included from include/linux/elf.h:4:0,
from include/linux/module.h:14,
from /home/yaun/chinaepg/drive/1_demo_dev/01_demo_dev.c:1:
/home/yaun/ti-sdk-am335x-evm-08.00.00.00/board-support/linux-3.14.26-g2489c02/arch/x86/include/asm/elf.h: 在函数‘elf_common_init’中:
/home/yaun/ti-sdk-am335x-evm-08.00.00.00/board-support/linux-3.14.26-g2489c02/arch/x86/include/asm/elf.h:173:3: 错误: ‘struct thread_struct’没有名为‘fs’的成员
/home/yaun/ti-sdk-am335x-evm-08.00.00.00/board-support/linux-3.14.26-g2489c02/arch/x86/include/asm/elf.h: 在文件作用域:
/home/yaun/ti-sdk-am335x-evm-08.00.00.00/board-support/linux-3.14.26-g2489c02/arch/x86/include/asm/elf.h:367:1: 错误: 要求的对齐边界不是常量
In file included from include/linux/module.h:22:0,
from /home/yaun/chinaepg/drive/1_demo_dev/01_demo_dev.c:1:
/home/yaun/ti-sdk-am335x-evm-08.00.00.00/board-support/linux-3.14.26-g2489c02/arch/x86/include/asm/module.h:57:2: 错误: #error unknown processor family
make[2]: *** [/home/yaun/chinaepg/drive/1_demo_dev/01_demo_dev.o] 错误 1
make[1]: *** [_module_/home/yaun/chinaepg/drive/1_demo_dev] 错误 2
make[1]:正在离开目录 `/home/yaun/ti-sdk-am335x-evm-08.00.00.00/board-support/linux-3.14.26-g2489c02'
make: *** [default] 错误 2