Page 1 of 1
188.8.131.52 cross-compiling existing EK modules from 2.4.27
Posted: Thu Jul 07, 2005 10:08 pm
Has anyone actually cross compiled a new style 2.6 loadable module?
I was a breeze in 2.4 but i am really confused on this.
note: the atmel suppied compiler is too old for compiling 2.6 (macros outdated)
i'm using gcc 3.3.4
Re: 184.108.40.206 cross-compiling existing EK modules from 2.4.27
Posted: Fri Jul 08, 2005 1:36 pm
I haven't tried with these modules, but I have already ported some 2.4 modules to 2.6 kernel. It will never be possible to compile a source code aimed at 2.4 for the 2.6 without changes. Both kernel are too different. Event he build process has changed !
Posted: Fri Jul 08, 2005 10:36 pm
after nashing of teeth with makefiles, i put one file in the mach-at91rm9200 directory, mymodule.c, added mymodule.o to the makefile in mach-at91rm9200:
obj-m := mymodule.o
then from the linux top dir : 'make modules'.. its like magic. mymodule.ko ready to insmod. (mymodule is an interrupt using TC0.)
Now i have to figure out the vm, its different on the 2.6 patch, when i enabled the addresses on cs 2,3,4,5,6 i got a memory overlap error on bootup. i had this resolved on 2.4.
I think we need a 2.6 linux forum on at91.com.
Posted: Wed Jul 27, 2005 11:03 pm
ok the vm is fixed, had to adjust the top in hardware.h
#define AT91C_IO_SIZE (0xFFFFFFFF - AT91C_IO_PHYS_BASE + 1) + (FPGA_PHYS_SIZE + 1) \
+ (UART_PHYS_SIZE + 1) + (CAN0_PHYS_SIZE + 1) + (CAN1_PHYS_SIZE + 1) + (CAN2_PHYS_SIZE + 1) \
+ (CAN3_PHYS_SIZE + 1)
#define AT91C_IO_VIRT_BASE (0xFF000000 - AT91C_IO_SIZE) //