* [Buildroot] Newbie: AT91SAM9260 NAND Boot
@ 2010-02-23 3:51 Roo
2010-02-23 15:40 ` Grant Edwards
2010-02-23 22:51 ` Peter Korsgaard
0 siblings, 2 replies; 7+ messages in thread
From: Roo @ 2010-02-23 3:51 UTC (permalink / raw)
To: buildroot
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.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] Newbie: AT91SAM9260 NAND Boot
2010-02-23 3:51 [Buildroot] Newbie: AT91SAM9260 NAND Boot Roo
@ 2010-02-23 15:40 ` Grant Edwards
2010-02-23 23:15 ` Roo
2010-02-23 22:51 ` Peter Korsgaard
1 sibling, 1 reply; 7+ messages in thread
From: Grant Edwards @ 2010-02-23 15:40 UTC (permalink / raw)
To: buildroot
On 2010-02-23, Roo <roo.watt@gmail.com> wrote:
> 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.
> 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.
> 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?
--
Grant Edwards grante Yow! I just got my PRINCE
at bumper sticker ... But now
visi.com I can't remember WHO he
is ...
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] Newbie: AT91SAM9260 NAND Boot
@ 2010-02-23 21:22 Sagaert Johan
2010-02-23 23:30 ` Roo
0 siblings, 1 reply; 7+ messages in thread
From: Sagaert Johan @ 2010-02-23 21:22 UTC (permalink / raw)
To: buildroot
Hi
I use buildroot to build a tarred rootfs
Then i confure U-boot to boot from NFS :
setenv bootfile uImage
setenv serverip 192.168.1.110
setenv bootargs mem=64M console=ttyS0,115200 root=/dev/nfs rw
nfsroot=192.168.1.110:/home/johan/srcmain ip=dhcp
tftpboot 0x21000000
bootm 0x21000000
i use UBIFS on the nandflash : it seems to be the best choice
once booted ftom nfs (for my board )
#partition info
#mtd
#0 0x00000000-0x00040000 : "bootstrap"
#1 0x00040000-0x00080000 : "u-boot"
#2 0x00080000-0x00200000 : "u-boot environment"
#3 0x00200000-0x00800000 : "kernel"
#4 0x00800000-0x40000000 : "filesystems"
then
#erasing mtd3 partition for the kernel
flash_eraseall /dev/mtd3
#write the kernel image to mtd3
nandwrite -p /dev/mtd3 /uImage
#erase mtd4 partition
flash_eraseall /dev/mtd4
# attach mtd4 to the ubi driver
# -m 4-->mtd block 4
ubiattach /dev/ubi_ctrl -m 4
#create a 128 Mbyte volume in ubi0 (partition 0)
#-N rootfs ---> partition name
# -s --->size
ubimkvol /dev/ubi0 -N rootfs -s 128MiB
#rest of the nand
ubimkvol /dev/ubi0 -N data -m
#create mountpoint
mkdir /mnt/vol0
#mount the ubi volume named rootfs to /mnt/vol0
mount -t ubifs ubi0:rootfs /mnt/vol0
#cd into it
cd /mnt/vol0
#untar the tar containing the rootfilesystem generated with buildroot
tar xf /at91sam9260dfc-rootfs.arm.tar
sync
then reboot and setup u-boot to boot from nand
setenv bootargs mem=64M console=ttyS0,115200n8 ubi.mtd=4 root=ubi0:rootfs rw
rootfstype=ubifs
nand read 0x21000000 0x00200000 0x200000
bootm 0x21000000
this should help you
Johan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20100223/55742d82/attachment.htm>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] Newbie: AT91SAM9260 NAND Boot
2010-02-23 3:51 [Buildroot] Newbie: AT91SAM9260 NAND Boot Roo
2010-02-23 15:40 ` Grant Edwards
@ 2010-02-23 22:51 ` Peter Korsgaard
1 sibling, 0 replies; 7+ messages in thread
From: Peter Korsgaard @ 2010-02-23 22:51 UTC (permalink / raw)
To: buildroot
>>>>> "Roo" == Roo <roo.watt@gmail.com> 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.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] Newbie: AT91SAM9260 NAND Boot
2010-02-23 15:40 ` Grant Edwards
@ 2010-02-23 23:15 ` Roo
2010-02-23 23:32 ` Grant Edwards
0 siblings, 1 reply; 7+ messages in thread
From: Roo @ 2010-02-23 23:15 UTC (permalink / raw)
To: buildroot
On 24 February 2010 02:40, Grant Edwards <grant.b.edwards@gmail.com> wrote:
> On 2010-02-23, Roo <roo.watt@gmail.com> wrote:
>
>> 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.
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.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] Newbie: AT91SAM9260 NAND Boot
2010-02-23 21:22 Sagaert Johan
@ 2010-02-23 23:30 ` Roo
0 siblings, 0 replies; 7+ messages in thread
From: Roo @ 2010-02-23 23:30 UTC (permalink / raw)
To: buildroot
On 24 February 2010 08:22, Sagaert Johan <sagaert.johan@skynet.be> wrote:
> i use UBIFS on the nandflash : it seems to be the best choice
>
> once booted from nfs (for my board )
Thanks for the quick run down, that will be very helpful. I have done
some reading about file system and comparisons, it seemed the
conclusion was that jffs2 might be better under powercuts. Do you
think this is the case.
The current plan is to mount the rootfs read only (or use a read only
fs) and use a tmpfs for /var/{log,run} etc. The application uses an
embedded database and it seems we will need to place that on a sd card
due to its size.
Thanks for you help, it's really appreciated.
Cameron.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] Newbie: AT91SAM9260 NAND Boot
2010-02-23 23:15 ` Roo
@ 2010-02-23 23:32 ` Grant Edwards
0 siblings, 0 replies; 7+ messages in thread
From: Grant Edwards @ 2010-02-23 23:32 UTC (permalink / raw)
To: buildroot
On Wed, Feb 24, 2010 at 10:15:18AM +1100, Roo wrote:
>>> 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.
>
> 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.
> 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.
--
Grant Edwards grante Yow! World War III?
at No thanks!
visi.com
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-02-23 23:32 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-23 3:51 [Buildroot] Newbie: AT91SAM9260 NAND Boot Roo
2010-02-23 15:40 ` Grant Edwards
2010-02-23 23:15 ` Roo
2010-02-23 23:32 ` Grant Edwards
2010-02-23 22:51 ` Peter Korsgaard
-- strict thread matches above, loose matches on Subject: below --
2010-02-23 21:22 Sagaert Johan
2010-02-23 23:30 ` Roo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox