Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Running vanilla Linux 3.x on SAM9G25
PostPosted: Wed Nov 23, 2011 11:08 pm 
Offline

Joined: Fri Oct 28, 2011 7:25 pm
Posts: 29
I have a SAM9G45 dev board on which I have the vanilla 3.0.4 kernel running. Just changed the makefile for the appropriate cross compiler, changed the configuration for the SAM9G45 and for my dev board, recompiled and it worked. We realized the SAM9G45 is more than we need, so we're trying out the SAM9G25-EK. I would like to get the same 3.0.4 kernel running on the SAM9G25-EK.

When I looked at the processor options in the kernel configuration, I didn't see the SAM9G25 as an option (under 'System Type->Atmel AT91 System-on-Chip->Atmel AT91 Processor' for xconfig). I even downloaded the 3.1 kernel and applied the 3.1 patch that I found in this forum; still no SAM9G25 option under that configuration. Which processor should I choose? I know that the SAM9G45 has a different memory mapping than the SAM9G25, so that one won't work. Has anyone had the 3.x kernel running on the SAM9G25 yet?

Thanks,
Bryan


Top
 Profile  
 
 Post subject: Re: Running vanilla Linux 3.x on SAM9G25
PostPosted: Thu Nov 24, 2011 3:16 am 
Offline

Joined: Sat Oct 30, 2010 6:04 pm
Posts: 574
You have a single region at 0x20000000, like most of the entire AT91SAM9 family, and not the primary one at 0x70000000 for the 9G45, with it's secondary at 0x20000000. I guess I'd attack it by reverting some of the changes made to support the 9G45, especially the ones related to handling two distinct memory regions.

Compare/contrast the 9G20 vs 9G45 kernel changes/configs.


Top
 Profile  
 
 Post subject: Re: Running vanilla Linux 3.x on SAM9G25
PostPosted: Mon Dec 05, 2011 11:34 pm 
Offline

Joined: Fri Oct 28, 2011 7:25 pm
Posts: 29
I tackled the problem by obtaining the experimental 2.6.39 patch for SAM9X5 support available in the SAM9X5 section of the linux4sam website and tailoring that for the 3.0.4 kernel. I then modified the kernel configuration to be as close to my SAM9G45 configuration as possible. I've built it and TFTP working. However, NFS is not working at this time. I see in my bootlog the following:

macb macb.0: failed to get macb_clk
macb: probe of macb.0 failed with error -12

So it appears that the Linux kernel is having issues with obtaining the correct clock source for eth0. I did some initial poking around, and haven't seen anything obvious. Any ideas what may be going wrong?

Once I get this up and running, I plan on posting my modified patch for those who'd like to use Linux 3.x on their SAM9X5 setups.


Top
 Profile  
 
 Post subject: Re: Running vanilla Linux 3.x on SAM9G25
PostPosted: Wed Dec 07, 2011 5:25 pm 
Offline

Joined: Fri Oct 28, 2011 7:25 pm
Posts: 29
I've gotten farther, but I still don't have things working. I thought I'd post things at this point to see if anyone else has better success than I do or sees something that I'm missing. Here's what the state of things are so far:
-Able to TFTP kernel to SAM9G25-EK board.
-Able to load filesystem that I'm using on my SBC6045 eval board on the SAM9G25-EK using NFS.

I really haven't tested much else. To get to the same place I am (if that is your desire), do the following:

1. Get the following files, and place them all in the same directory:
a. Kernel version 3.0.4 from kernel.org (linux-3.0.4.tar.bz2).
b. The 3.0.0 kernel patch from this other forum post: viewtopic.php/f,12/t,19631/ (3.0.0-at91.patch.bz2)
c. The 3.0.4 SAM9X5 patch attached to this post (3.0.4-at91-highly-exp.tar.bz2)

2. From a terminal in that directory, enter the following commands:
a. tar -jxvf linux-3.0.4.tar.bz2
b. cp -a 3.0.0-at91-patch.tar.bz2 linux-3.0.4
c. cp -a 3.0.4-at91-highly-exp.tar.bz2 linux-3.0.4
d. cd linux-3.0.4
e. tar -jxvf 3.0.0-at91-patch.tar.bz2
f. tar -jxvf 3.0.4-at91-highly-exp.tar.bz2
g. patch -p1 --ignore-whitespace < 3.0.0-at91.patch
h. for p in 3.0.4-at91-highly-exp/* ; do patch -p1 --ignore-whitespace < $p ; done

3. Build the patched kernel the way you normally would.

If you want to use the same configuration I've been using, grab the attached configuration (sam9g25-ek_myconfig.tar.bz2), extract the file and save it as .config. Otherwise, keep using the same configuration you've been using.

I have been attempting to get USART0 and USART3 up and going, but the kernel boot hangs when it tries to add these ports. It looks like it's trying to re-add the debug serial port and hangs there. If you aren't concerned with getting the serial ports working, then comment out lines 337 and 339 of linux-3.0.4/arch/arm/mach-at91/board-sam9x5-ek.c.

In modifying the 2.6.39 patch for SAM9x5 support, I removed patches that were already applied to the Linux 3.x kernel. I kept the file numbers the same to make it easier to see what I changed if you are making comparisons between the 2.6.39 patch and mine.

As the patch name describes, this patch is highly experimental. The patch installs with some fuzz and a lot has not been fully tested, but so far this seems the closest of anything that has been posted for adding SAM9x5 support to the Linux 3.x kernel. I'm willing to work with people to get this working and vetted.

-Bryan


Attachments:
File comment: My current configuration settings.
sam9g25-ek_myconfig.tar.bz2 [9.76 KiB]
Downloaded 12 times
File comment: Experimental patch for adding SAM9x5 support to Linux kernel 3.0.4. Not yet working, in progress.
3.0.4-at91-highly-exp.tar.bz2 [126.69 KiB]
Downloaded 17 times
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron