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.

Linux/PROCESSOR-SDK-AM335X: PROCESSOR-SDK-AM335X

Part Number: PROCESSOR-SDK-AM335X

Tool/software: Linux

Hello, All.

I'm inherited a project on customized beaglegone with ti-processor-sdk-linux-am335x-evm-03.01.00.06 / linux-4.4.19

And it works fine, but I want to use KSZ8795 with it and now everything works, but this (including u-boot and hardware).

By now I'm trying to make it compile with entire kernel and modules:

1. copied the all sources from linux-3.3_ksz8795 driver to drivers/net/ethernet/micrel,

2. triple checked Kconfigs, Makefile with single string in it: obj-$(CONFIG_SPI_KSZ8795) += spi-ksz8795.o

3. "make menuconfig" and made right config for project

4. adapted sources for 4.4.19 to avoid errors and warnings for further step

5. compiled it with

../../linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-gcc ../../linux-devkit/sysroots/x86_64-arago-linux/usr/bin/../lib/gcc/arm-linux-gnueabihf/5.3.1/include -I./arch/arm/include -Iarch/arm/include/generated/uapi -Iarch/arm/include/generated  -Iinclude -I./arch/arm/include/uapi -Iarch/arm/include/generated/uapi -I./include/uapi -Iinclude/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ -mlittle-endian -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-dwarf2-cfi-asm -fno-omit-frame-pointer -mapcs -mno-sched-prolog -fno-ipa-sra -mabi=aapcs-linux -mno-thumb-interwork -mfpu=vfp -marm -D__LINUX_ARM_ARCH__=7 -march=armv7-a -msoft-float -Uarm -fno-delete-null-pointer-checks -Os -Wno-maybe-uninitialized --param=allow-store-data-races=0 -Wframe-larger-than=1024 -fno-stack-protector -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -pg -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -DCC_HAVE_ASM_GOTO    -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(spi-ksz8795)"  -D"KBUILD_MODNAME=KBUILD_STR(spi-ksz8795)" -c -o drivers/net/ethernet/micrel/spi-ksz8795.o drivers/net/ethernet/micrel/spi-ksz8795.c && ../../linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-ld -EL -r  -T ./scripts/module-common.lds --build-id  -o drivers/net/ethernet/micrel/spi-ksz8795.ko drivers/net/ethernet/micrel/spi-ksz8795.o

I got spi-ksz8795.ko . unfortunatelly, I got "insmod: ERROR: could not insert module spi-ksz8795.ko: Invalid module format" after copying that to device, but kernel config slightly differs, so it's ok.

6 Sailed for three days in makefiles of any kind to find the answer: why it doesn't compiles after make clean && make linux ? I tried to make it as Y as M. M is prefered.

6.1 Assume that SDK was configured fine before me and dtb making clearly

6.2 when It makes zImage, directory driver/net/ethernet/micrel is ignored though #define CONFIG_SPI_KSZ8795_MODULE 1 is in include/generated/autoconf.h and include/config/auto* too

6.3 other directories like driver/net/ethernet/microchip and driver/net/ethernet/ti and driver/net/phy/ are seeded with .o files

6.4 when "make modules" it not compiles .ko even if drivers/net/ethernet/micrel/spi-ksz8795.o is on place

Best Regards,

Denis