2.6.12.2 cross-compiling existing EK modules from 2.4.27

This forum is for users of Microchip MPUs and who are interested in using Linux OS.

Moderator: nferre

bruce vicknair
Contact:
Location: tomball, tx
Posts: 60
Joined: Wed Jan 26, 2005 3:24 am

2.6.12.2 cross-compiling existing EK modules from 2.4.27

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

bruce
nahas.sylvain
Posts: 5
Joined: Wed Jun 29, 2005 6:36 pm

Re: 2.6.12.2 cross-compiling existing EK modules from 2.4.27

Fri Jul 08, 2005 1:36 pm

Hi Bruce,

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 !

Sylvain
bruce vicknair
Contact:
Location: tomball, tx
Posts: 60
Joined: Wed Jan 26, 2005 3:24 am

2.6 mymodule.ko

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.

bruce
bruce vicknair
Contact:
Location: tomball, tx
Posts: 60
Joined: Wed Jan 26, 2005 3:24 am

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) //

bye

Return to “LINUX”

Who is online

Users browsing this forum: Google [Bot] and 1 guest