Skip to contentSkip to conversation

Newbie: AT91SAM9260 NAND Boot

Buildroot Roo 3 participants 5 messages Feb 23, 2010

lore
Share & tools
lore

Roo

author
#0 lore raw

Hi,

I am new to buildroot and have been given a AT91SAM9260 SOM to work with. The latest buildroot does not appear to include a defconfig for a NAND boot system. The module in question is
http://www.otech.cn/chinese/ProductShow.asp?ID=103 and they do not provide a build system, just a rootfs image and kernel image etc, unfortunately that is nearly all the information I have on the board.

I would like to use buildroot to build the rootfs, kernel and tools required for our application. I would appreciate any advice on where to start with this, is there any reason that a NAND boot defconfig does not exist currently? Will it be a difficult job to develop one? I know that there is a rootsf image and kernel image at at91.com but I see more value in supporting the latest buildroot particularly as I would like to integrate our own packages.

Also can anyone advise whether there are issues building on a 64bit host?

Any advice appreciated.

Kind regards,

Cameron.

#1 lore raw
Quoted 3 lines · Roo

I am new to buildroot and have been given a AT91SAM9260 SOM to work with. The latest buildroot does not appear to include a defconfig for a NAND boot system.

Can you explain what a "NAND boot system" is?

When I boot an AT91SAM9xxx from NAND, I tell buildroot to build a JFFS2 root image, a uImage kernel with MTD/JFFS2 support, put the resulting kernel and root image into NAND, and configure U-Boot to boot from NAND.

Quoted 4 lines

I would like to use buildroot to build the rootfs, kernel and tools required for our application. I would appreciate any advice on where to start with this, is there any reason that a NAND boot defconfig does not exist currently?

Presumably because nobody has bothered to submit one.

Quoted 1 line

Will it be a difficult job to develop one?

I'm still not sure what you're after beyond selecting JFFS2 for the root fs type and enabling MTD and JFFS2 support in the kernel. Can you explain what it is you're missing?

Signature · 4 lines
Grant Edwards                   grante             Yow! I just got my PRINCE
                                  at               bumper sticker ... But now
                               visi.com            I can't remember WHO he
                                                   is ...
#4 lore raw
In reply to Roo
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Roo" == Roo <[email protected]> writes:

Hi,

Roo> I would like to use buildroot to build the rootfs, kernel and tools Roo> required for our application. I would appreciate any advice on where Roo> to start with this, is there any reason that a NAND boot defconfig Roo> does not exist currently? Will it be a difficult job to develop one? I Roo> know that there is a rootsf image and kernel image at at91.com but I Roo> see more value in supporting the latest buildroot particularly as I Roo> would like to integrate our own packages.

It shouldn't be much of a problem. Basically you just need to decide what pakcages you want to include and then what kind of filesystem you want to use on your NAND flash (E.G. jffs2), and then configure that.

Roo> Also can anyone advise whether there are issues building on a Roo> 64bit host? Any advice appreciated.

No, I only use 64bit machines.

Signature · 1 line
Bye, Peter Korsgaard
author
#2 lore raw
In reply to Grant Edwards
Quoted 6 lines · Grant Edwards
Quoted 3 lines · Roo

I am new to buildroot and have been given a AT91SAM9260 SOM to work with. The latest buildroot does not appear to include a defconfig for a NAND boot system.

Quoted 6 lines

Can you explain what a "NAND boot system" is?

When I boot an AT91SAM9xxx from NAND, I tell buildroot to build a JFFS2 root image, a uImage kernel with MTD/JFFS2 support, put the resulting kernel and root image into NAND, and configure U-Boot to boot from NAND.

I believe that I had some of the terminology wrong.

I would like a jffs (or a readonly FS) to reside in NAND as you had described, but I was confused by the dataflash/dataflashcard terminology. I thought it was referring to a SD or micro SD card and I do not want the rootfs or kernel to reside on the card.

My understanding now is that configurations relate to where the bootloader resides rather than where the rootfs resides. I am little embarrassed that I didn't realise this earlier and if I am right this just got easier. :)

I have only just started looking with buildroot, I have inherited the platform and didn't have any real input into its selection or design so I am still trying to find my feet.

Thanks for taking the time to respond to a newbie.

Regards,

Cameron.

#3 lore raw
Quoted 11 lines · Roo
Quoted 10 lines
Quoted 3 lines

I am new to buildroot and have been given a AT91SAM9260 SOM to work with. The latest buildroot does not appear to include a defconfig for a NAND boot system.

Can you explain what a "NAND boot system" is?

When I boot an AT91SAM9xxx from NAND, I tell buildroot to build a JFFS2 root image, a uImage kernel with MTD/JFFS2 support, put the resulting kernel and root image into NAND, and configure U-Boot to boot from NAND.

Quoted 7 lines

I believe that I had some of the terminology wrong.

I would like a jffs (or a readonly FS) to reside in NAND as you had described, but I was confused by the dataflash/dataflashcard terminology. I thought it was referring to a SD or micro SD card and I do not want the rootfs or kernel to reside on the card.

Dataflash is a serial NOR-flash part that's attached to an SPI interface. It's sort of similar to an SD-card, but the interface/protocol is a little different.

Quoted 4 lines

My understanding now is that configurations relate to where the bootloader resides rather than where the rootfs resides. I am little embarrassed that I didn't realise this earlier and if I am right this just got easier. :)

You're probably right. Buildroot can build U-Boot and, IIRC, also the low-level SAM9 bootloader: it's what is initially loaded by the MCU's built-in bootloader from somewhere (NAND, NOR, SDcard, dataflash) into internal SRAM and run -- it enables SDRAM, and then loads U-Boot from somewhere (same choices as before) into SDRAM, and then runs U-Boot. U-Boot then loads a kernel image into SDRAM (and optionally loads a rootfs into SDRAM), and boots the kernel.

And there's no rule that says the low-level SAM9 bootloader, U-Boot, the kernel, and the rootfs can't all be on different media.

I've never selected either the bootloader or U-Boot in buildroot, so I don't know what configuration options are available for them -- but I would guess that support for the various boot media are configurable.

Signature · 3 lines
Grant Edwards                   grante             Yow! World War III?
                                  at               No thanks!
                               visi.com