Tina5.0 T113 编写makefile 编译驱动模块,都是提示不对,各位大请指教一下
-
请教一下各位大神,全志的T113,编译 自已写的 驱动模块 时候,makefile ,应该如何写,有没有例子?
我写了,老是提示有问题
问题如下:lin@ubuntu:~/mydata2/T113_Tina5.0/usrdriver/focaltech_touch$ make make ARCH=arm -I/home/lin/mydata2/T113_Tina5.0/T113-Tina5.0-V1.2/out/t113/kernel/build/ CROSS_COMPILE=/home/lin/mydata2/T113_Tina5.0/T113-Tina5.0-V1.2/out/toolchain/gcc-linaro-5.3.1-2016.05-x86_64_arm-linux-gnueabi/bin/arm-linux-gnueabi- -C /home/lin/mydata2/T113_Tina5.0/T113-Tina5.0-V1.2/kernel/linux-5.4/ M=/home/lin/mydata2/T113_Tina5.0/usrdriver/focaltech_touch modules make[1]: 进入目录“/home/lin/mydata2/T113_Tina5.0/T113-Tina5.0-V1.2/kernel/linux-5.4” awk: 致命错误: 无法以读模式打开文件“include/generated/asm-offsets.h”(没有那个文件或目录) awk: 致命错误: 无法以读模式打开文件“include/generated/asm-offsets.h”(没有那个文件或目录) CC [M] /home/lin/mydata2/T113_Tina5.0/usrdriver/focaltech_touch/focaltech_core.o cc1: error: cannot load plugin ./scripts/gcc-plugins/arm_ssp_per_task_plugin.so ./scripts/gcc-plugins/arm_ssp_per_task_plugin.so: cannot open shared object file: No such file or directory scripts/Makefile.build:286: recipe for target '/home/lin/mydata2/T113_Tina5.0/usrdriver/focaltech_touch/focaltech_core.o' failed make[2]: *** [/home/lin/mydata2/T113_Tina5.0/usrdriver/focaltech_touch/focaltech_core.o] Error 1 Makefile:1810: recipe for target '/home/lin/mydata2/T113_Tina5.0/usrdriver/focaltech_touch' failed make[1]: *** [/home/lin/mydata2/T113_Tina5.0/usrdriver/focaltech_touch] Error 2 make[1]: 离开目录“/home/lin/mydata2/T113_Tina5.0/T113-Tina5.0-V1.2/kernel/linux-5.4” Makefile:36: recipe for target 'kernel_modules' failed make: *** [kernel_modules] Error 2
makefile 如下:
TINA_SDK_ROOT = /home/lin/mydata2/T113_Tina5.0/T113-Tina5.0 KERNELDIR := $(TINA_SDK_ROOT)/kernel/linux-5.4/ CURRENT_PATH := $(shell pwd) STAGING_DIR := $(TINA_SDK_ROOT)/out/t113/100ask_nand/openwrt/staging_dir/target obj-m := ft5446.o ft5446-objs += focaltech_core.o focaltech_ex_fun.o focaltech_ex_mode.o ft5446-objs += focaltech_gesture.o focaltech_esdcheck.o focaltech_i2c.o focaltech_point_report_check.o ARCH := arm CROSS_COMPILE := $(TINA_SDK_ROOT)/out/toolchain/gcc-linaro-5.3.1-2016.05-x86_64_arm-linux-gnueabi/bin/arm-linux-gnueabi- #CROSS_COMPILE = ${TINA_SDK_ROOT}/prebuilt/rootfsbuilt/arm/gcc-arm-10.3-2021.07-x86_64-arm-none-linux-gnueabihf/bin/arm-none-linux-gnueabihf- CFLAGS += -I$(TINA_SDK_ROOT)/out/t113/kernel/build/ build: kernel_modules kernel_modules: $(MAKE) ARCH=$(ARCH) $(CFLAGS) $(LCOMPILELIBAll) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KERNELDIR) M=$(CURRENT_PATH) modules clean: $(MAKE) -C $(KERNELDIR) M=$(CURRENT_PATH) clean
-
@daming123 KERNELDIR出错,不是kernel源码地址,而是kernel编译后的目录地址。大致目录为
KERNELDIR := $(TINA_SDK_ROOT)/out/kernel/build
-
@jasonzhang 好的,谢谢,可以了
Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号