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  [ 6 posts ] 
Author Message
 Post subject: howto add custom AT919260 board to buildroot 2011.05
PostPosted: Thu Jul 21, 2011 8:18 pm 
Offline

Joined: Thu Jul 21, 2011 7:43 pm
Posts: 7
Greetings,

I have a custom built board based on AT91SAM9260 MPU. We have working kernel, drivers, etc, all. fine.

We are upgrading our host machine and I am trying to get our kernel, boot, rootfs in better shape and I am moving from old buildroot (~2008) to 2011.05. The new buildroot is significantly different than our working old version. I have kernel code that
has MACHINE_START macro etc for this device and has been shown to work.

The problem is I cant figure out how to setup board support to get this to happen correctly in new buildroot scheme. I can build kernel for 9260EK, but need my own machine defs. I have tried to follow how 9260EK code gets into kernel but with little luck.

I have searched over last few days and am now tying here. Best info I have assembled so far is:
- http://buildroot.org/downloads/buildroo ... rd_support (woefully brief)
- http://www.atmel.com/dyn/resources/prod ... c32085.pdf (best lead so far but based on older version of buildroot)

I would appreciate any help from exact instructions to leads on more complete documentation.

My background is a physicist trying to get by building my own systems and somewhat over my head. But I can build a kernel, dev driver, etc (at least with old buildroot).


Top
 Profile  
 
 Post subject: Re: howto add custom AT919260 board to buildroot 2011.05
PostPosted: Fri Jul 29, 2011 9:25 am 
Offline

Joined: Thu Jan 06, 2011 11:13 am
Posts: 31
Hello,

You can have a look on the new linux4sam web page. It is about the new 5 serie products but open embedded and buildroot have been updated so you can see how the board has been adding to the new buildroot scheme.


Regards,

Ludovic


Top
 Profile  
 
 Post subject: Re: howto add custom AT919260 board to buildroot 2011.05
PostPosted: Fri Jul 29, 2011 4:24 pm 
Offline

Joined: Thu Jul 21, 2011 7:43 pm
Posts: 7
Thanks... you can tell by how fast I jumped on this that I have not yet found solution... not as easy as I had hoped...

I immediately took your advice and went to those new pages (only few days old!). I followed those instructions and am building kernel now. Looks like that method does this:
- gets buildroot-2011.05
- patches it with defconfig and scripts that then patch kernel with
BR2_LINUX_KERNEL_PATCH="ftp://www.linux4sam.org/pub/linux/2.6.39-at91/2.6.39-at91-exp.tar.gz"
- those kernel patches then change Kconfig files, board-XXXX.c, etc
- and the kernel is built

I had succeeded in figuring out that needed to be done. I was trying to make kernel changes by hand in the linux build directory and then try to figure out how to make in kernel build directory to redo kernel (before I embarked on writing kernel pathches, which I have never done). That has been failure. I cant do kernel makes after using buildroot makes, not sure why.

I think best way to proceed is to use that at91sam9x5ek as templet and change for my board. To do, I have to learn how to use patch system... ok.

Another lead that I had followed which was tantalizing close to working was the avr32 buildroot setup that I got from atmel. Should have worked, but....

Thanks again.


Top
 Profile  
 
 Post subject: Re: howto add custom AT919260 board to buildroot 2011.05
PostPosted: Mon Aug 01, 2011 2:25 pm 
Offline

Joined: Thu Jan 06, 2011 11:13 am
Posts: 31
There are a lot of things in your answer! I have read again your first message and maybe I didn't understand the whole issue.

I only give you some clues to do the same thing as 5series. It seems you have understood what to do but after I don't really understand the issues with the kernel.

Here Buildroot manages kernel build with atmel patches because it is easier for the user. If you want to modify the kernel (I thought you were only interested in buildroot stuff) then don't build it with Buildroot.

Build your kernel in standalone. Once you have hacked the kernel successfully, create the patches and give them to Buildroot.

What do you mean by patch system? How to create a patch? How to use your kernel patches with BuildRoot?

Regards

Ludovic


Top
 Profile  
 
 Post subject: Re: howto add custom AT919260 board to buildroot 2011.05
PostPosted: Tue Aug 02, 2011 4:40 pm 
Offline

Joined: Thu Jul 21, 2011 7:43 pm
Posts: 7
Hi,
Once again thanks for reply. I do have alot going on in my question as I was figuring out alot
of things at once.

In short, your lead to the new info on the 5series was the example I needed.

I wanted to make everything work in the buildroot system. I didnt understand (and I dont think it is yet well-documented) how to plug in kernel patches in buildroot if they dont come in linux distribution. The 5series example showed that which is basically a config variable that points to kernel patches. I figured our how to build patches and am now using that system.

I still have few issues with our particular custom kernel that I am working through, but I have more-less figured out how to make buildroot do what I want.

RT


Top
 Profile  
 
 Post subject: Re: howto add custom AT919260 board to buildroot 2011.05
PostPosted: Tue Aug 02, 2011 5:10 pm 
Offline

Joined: Thu Jan 06, 2011 11:13 am
Posts: 31
Hello,

I agree with you use patches for the kernel is not very well documented and you can see in the atmel patch for buildroot that the script usually used to apply patches has been entirely changed.
This changed is not yet approuved by the buildroot community (I don't know why) but it was done because of issues when you wanted to apply several patches to the kernel. It seems that the old script didn't respect the alphabetical file order so the patch serie could'nt be applied correctly.
If you have a look to the patch kernel script you may find more information.

To patch your kernel from buildroot (with this new script), you can give a directory, a simple patch, an archive or regex (for example: my_dir/my_patches*.patch).

Regards,

Ludovic


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 4 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: