Part Number: PROCESSOR-SDK-LINUX-AM64X
Hello,
I'm failing with my attempts to compile custom kernel modules.
I did follow general guidelines for kernel module compilation, including cross-compilation.
Here is my Makefile:
-include ../../Rules.make
obj-m += driver_test.o
KDIR := ../../board-support/ti-linux-kernel-6.12.35+git-ti
all:
make -C $(KDIR) M=$(PWD) modules
clean:
make -C $(KDIR) M=$(PWD) clean
It is called from a directory where the relative paths are existent.
When I call make, I get the following output:
make -C ../../board-support/ti-linux-kernel-6.12.35+git-ti M=/home/mtr/ti-processor-sdk-linux-am64xx-evm-11.01.05.03/TestApps/Driver_Test1 modules
make[1]: Entering directory '/home/mtr/ti-processor-sdk-linux-am64xx-evm-11.01.05.03/board-support/ti-linux-kernel-6.12.35+git-ti'
CC [M] /home/mtr/ti-processor-sdk-linux-am64xx-evm-11.01.05.03/TestApps/Driver_Test1/driver_test.o
aarch64-oe-linux-gcc: error: unrecognized argument in option ‘-mcmodel=kernel’
aarch64-oe-linux-gcc: note: valid arguments to ‘-mcmodel=’ are: large small tiny
aarch64-oe-linux-gcc: error: unrecognized command-line option ‘-mno-sse’; did you mean ‘-fno-dse’?
aarch64-oe-linux-gcc: error: unrecognized command-line option ‘-mno-mmx’
aarch64-oe-linux-gcc: error: unrecognized command-line option ‘-mno-sse2’
aarch64-oe-linux-gcc: error: unrecognized command-line option ‘-mno-3dnow’
aarch64-oe-linux-gcc: error: unrecognized command-line option ‘-mno-avx’
aarch64-oe-linux-gcc: error: unrecognized command-line option ‘-m64’
aarch64-oe-linux-gcc: error: unrecognized command-line option ‘-mno-80387’
aarch64-oe-linux-gcc: error: unrecognized command-line option ‘-mno-red-zone’
make[3]: *** [scripts/Makefile.build:229: /home/mtr/ti-processor-sdk-linux-am64xx-evm-11.01.05.03/TestApps/Driver_Test1/driver_test.o] Error 1
make[2]: *** [/home/mtr/ti-processor-sdk-linux-am64xx-evm-11.01.05.03/board-support/ti-linux-kernel-6.12.35+git-ti/Makefile:1945: /home/mtr/ti-processor-sdk-linux-am64xx-evm-11.01.05.03/TestApps/Driver_Test1] Error 2
make[1]: *** [Makefile:224: __sub-make] Error 2
make[1]: Leaving directory '/home/mtr/ti-processor-sdk-linux-am64xx-evm-11.01.05.03/board-support/ti-linux-kernel-6.12.35+git-ti'
make: *** [Makefile:22: all] Error 2
I believe that all of these mentioned unrecognized command line options are dedicated to x86 rather than ARM. So it seems there are picked up some wrong parameters. At least the selected compiler seems to be the right one.
Btw., I'm using SDK version 11.01.05.03 so far.
Any ideas what I'm doing wrong here?
Thanks,
Mario