Re: Reverse engineering AT91RM9200 board

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Tue, 16 Dec 2008 09:42:19 +1100, Aras Vaichas <arasv@xxxxxxxxxxxxxx>
wrote:
> viper@xxxxxxxxxxx wrote:
>> - U-boot is now 1.1.1 and want to change it. How can this be done?
> Download the latest U-Boot and see if there is already support for your
> board, otherwise you can ask the manufacturer for the board specific
> patches. Otherwise, you will have to make your own board support. Try
> the U-Boot mailing list for further information.

I don't know anything about the board an no one will tell me anything about
it :( What I See Is What I Get :)

> 
>> And how is U-boot loaded?
>>
> Do you mean "how is it burned into the Flash", or "where does it boot
> from"?
> 
> U-Boot can boot from NOR flash (execute in place), or the first stage
> bootloader can copy it from NAND/Dataflash into SDRAM and then execute
it.
> 
> U-Boot can be programmed into your device via the first stage
> bootloader, or via JTAG into the NOR/Dataflash.
> 
>> There's no DataFlash on the board, and as I can see
>> everything is loaded from the NAND.
>>
> Look harder.  The at91rm9200 cannot boot from NAND, so there has to be
> another memory device.
> 
> Is the memory OneNAND? What does dmesg say about the memory devices on
> the board?

Just one  MX29LV320CTTC-70G flash, which is NOR, as I looked up. Problemo
uno solved :)

> 
>> Is it possible, that there's no
>> "first-stage" boot loader like Darell loader, or Atmel's own?
>>
> AFAIK, this is only the case where you have NOR flash.

So, if it's a NOR flash, than no first-stage bootloader? Changing U-boot
than is "just" writing it from the booted sys (get image via nfs)?

The partitions (from dmesg):

Flash device: 0x400000 at 0x10000000
Physically mapped flash: mtfs filesystem found at block 1118
Creating 6 MTD partitions on "Physically mapped flash":
0x00000000-0x00020000 : "bootcode"
0x00020000-0x003b0000 : "linux"
0x00117b84-0x003b0000 : "rootfs"
0x003b0000-0x003d0000 : "nvram"

> 
> 
>> - Kernel is 2.4.27 now. Tried to boot up a 2.6.26.8 via NFS, but got
> "Bad
>> magic number". What's that? ( compiled a kernel for AT91RM9200BGA with
>> nearly default config )
>>

Maybe it's u-boot, sincs my mkimage is for 1.1.4...

> It wasn't a U-Boot image, or the image was corrupt. This is how I make
> my image:
> 
>         make ARCH=arm CROSS_COMPILE=${CROSS_PATH}
> INSTALL_MOD_PATH=${FS_PATH} Image
>         ${CROSS_PATH}/objcopy -O binary -S vmlinux linux.bin
> 
>         # zip up the file
>         rm linux.bin.gz
>         gzip -v9 linux.bin
> 
>         # create the U-Boot image
>         ${MKIMAGE} -A arm -O linux -C gzip -a 0x20008000 -e 0x20008000
> -d linux.bin.gz uImage
> 
>> - How can I make a correct board file for the board?
> U-Boot or Linux?
> 
> Copy one of the other at91rm9200 board files and customize it for your
> board.
> 
>> How can I get the NAND
>> partitions, etc? ( most options I can configure )
>>
> What do you mean "get"?
> 
> dmesg should show you how any partitions are configured.
> 
> Try:
> # cat /proc/partitions
> # cat /proc/mtd
> 
> and see what it says.
> 
> To set NAND up in your board file, have a look at:
> arch/arm/mach-at91/board-dk.c
> 
> static struct mtd_partition __initdata dk_nand_partition[] = {
>     {
>         .name   = "NAND Partition 1",
>         .offset = 0,
>         .size   = MTDPART_SIZ_FULL,
>     },
> };
> 
> static struct mtd_partition * __init nand_partitions(int size, int
> *num_partitions)
> {
>     *num_partitions = ARRAY_SIZE(dk_nand_partition);
>     return dk_nand_partition;
> }
> 
> static struct at91_nand_data __initdata dk_nand_data = {
>     .ale        = 22,
>     .cle        = 21,
>     .det_pin    = AT91_PIN_PB1,
>     .rdy_pin    = AT91_PIN_PC2,
>     // .enable_pin  = ... not there
>     .partition_info = nand_partitions,
> };
> 
>> - What's the easiest way to get the GPIO pins visible on the board?
>>
> There is kernel support, but I'm not sure of the current status. There
> are a few user space applications around:
> 
> http://wiki.emqbit.com/at91-gpio
> 
> I use the one of this page:
> http://dwisasongko.890m.com/User%20Space%20-%20Kernel%20space/
> 
> Aras
> 
> 

Thanks, 

     Tom


> 
> 
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________


-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php

[Linux ARM]     [Linux ARM MSM]     [Linux ARM Kernel]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

Add to Google Follow linuxarm on Twitter