help in loading linux from sdcard on arm9

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hi Guys,

I have a EP9307 (Arm 920T) based board. The design is based on Cirrus logic
EP9307 development board.  At present the boot sequence is first stage
bootloader (com port) => redboot (com port) => Zimage (ethernet) => Ramdisk
(ethernet).


I want to load Zimage directly from SDcard without using redboot. I have
modified first stage bootloader to boot from spi eeprom. This in turn loads
a second stage bootloader which initializes Sdcard. At present I have not
implemented a file system in second stage bootloader.  I will have to stick
to FAT file system as the users would be copying binaries from windows
machine so that they can upgrade the firmware.


I have been reading about arm kernel boot process on following links.

http://www.simtec.co.uk/products/SWLINUX/files/booting_article.html

http://www.webworldarticles.com/e/a/title/Loading-the-kernel-into-memory-and-starting-a-Linux-system /


One of the kernel boot requirments is boot parameters Atag List. At present
redboot sets these parameters. Is there any way to see what these
parameters are. How to create this list.


Has any one done anything similar. Can some one please share there inputs/
provide some pointers on this.


Thanks
Tama

 
      
                    
---------------------------------------        
Posted through http://www.EmbeddedRelated.com

Re: help in loading linux from sdcard on arm9
tamamontu skrev:
Quoted text here. Click to load it
http://www.webworldarticles.com/e/a/title/Loading-the-kernel-into-memory-and-starting-a-Linux-system /
Quoted text here. Click to load it

The boot parameters are in a string and the
address is passed to the kernel in a register.

If you switch to U-Boot as a second stage boot loader,
you will have SD-Card support.

The SD-Card boot process is supported in modern AT91SAM9 boot ROMs,
so you do not have to have any flash memory/eeprom in the system.

I implemented loaidng a USB Mass Storage adapter as an alternative,
on my SAM9G45 machine, so the user can copy the kernel directly
to the development board using drag n drop.


Quoted text here. Click to load it


--
Best Regards
Ulf Samuelsson
We've slightly trimmed the long signature. Click to see the full one.
Re: help in loading linux from sdcard on arm9

Quoted text here. Click to load it

Second stage bootloader will be stored on a onboard spi eeprom. Hence it is
restricted by the size. Its a cirrus logic EP9307 chip and apparently there
is not much support for these chips.


I am planing to implement a small fat file system in second stage
bootloader and then load the kernel from the sdcard. This gives us a
flexibility to upgrade the firmware in the field.


Do you boot the kernel from usb directly.

Quoted text here. Click to load it

      
                    
---------------------------------------        
Posted through http://www.EmbeddedRelated.com

Re: help in loading linux from sdcard on arm9
tamamontu skrev:
Quoted text here. Click to load it
No, I have an SD-Card with two partitions.
Partition #1 is FAT32 and I store:

* at91bootstrap
* U-Boot
* Kernel
* USB Mass Storage Adapter application.

Partition #2 is EXT2/EXT3 and I store the Linux file system here.

The BootROM will always load at91bootstrap from the FAT32 partition
to the internal SRAM and start executing it.

at91bootstrap will test a button, and if not pressed,
it will continue and load U-Boot.
If the button is pressed, then the USB Mass Storage Adapter
is loaded into SDRAM, and executed.

If the host PC is connected to the target using USB,then
the host will open a window for each partition on the SD-Card.
It is easy to upgrade the kernel, since you can drag it from
the host PC file system and drop it on the FAT32 partition window.

You can also seletively update the EXT2/3 file system (if your host is
running Linux).

Once you have finished updating the SD-Card through USB,
you just reset the system and then if you dont press the button
U-Boot will load the new kernel.

Since U-Boot cannot write to SD-Card, you cannot easily update
the U-Boot environment, so I have a precompiled environment
which will load a script file from the SD-Card, just before loading
linux. By editing the script file you can change the environment.


Quoted text here. Click to load it




--
Best Regards
Ulf Samuelsson
We've slightly trimmed the long signature. Click to see the full one.
Re: help in loading linux from sdcard on arm9
tamamontu skrev:
Quoted text here. Click to load it
No, I have an SD-Card with two partitions.
Partition #1 is FAT32 and I store:

* at91bootstrap
* U-Boot
* Kernel
* USB Mass Storage Adapter application.

Partition #2 is EXT2/EXT3 and I store the Linux file system here.

The BootROM will always load at91bootstrap from the FAT32 partition
to the internal SRAM and start executing it.

at91bootstrap will test a button, and if not pressed,
it will continue and load U-Boot.
If the button is pressed, then the USB Mass Storage Adapter
is loaded into SDRAM, and executed.

If the host PC is connected to the target using USB,then
the host will open a window for each partition on the SD-Card.
It is easy to upgrade the kernel, since you can drag it from
the host PC file system and drop it on the FAT32 partition window.

You can also seletively update the EXT2/3 file system (if your host is
running Linux).

Once you have finished updating the SD-Card through USB,
you just reset the system and then if you dont press the button
U-Boot will load the new kernel.

Since U-Boot cannot write to SD-Card, you cannot easily update
the U-Boot environment, so I have a precompiled environment
which will load a script file from the SD-Card, just before loading
linux. By editing the script file you can change the environment.


Quoted text here. Click to load it




--
Best Regards
Ulf Samuelsson
We've slightly trimmed the long signature. Click to see the full one.
Re: help in loading linux from sdcard on arm9
Quoted text here. Click to load it

Hi I am trying to implement fat16 file system in spi eeprom but i ran into
problem with the tool chain. I want to use stdlibraries but the linker is
not happing linking it. it gives segmentation fault


arm-linux-ld: BFD 2.17 assertion fail
/opt/buildroot.920t-cc/toolchain_build_arm_nofpu/binutils-2.17/bfd/elf32-arm.c:7214

make: *** [SDcard_bootloader] Segmentation fault

As you mentioned that uboot supports sdcard. I could put uboot into spi
eeprom and load it which in turn will load the kernel from sdcard.


Can you please share some info on how to configure uboot for a particular
processor.


Thanks
Tama      
                    
---------------------------------------        
Posted through http://www.EmbeddedRelated.com

Re: help in loading linux from sdcard on arm9
tamamontu skrev:
Quoted text here. Click to load it
/opt/buildroot.920t-cc/toolchain_build_arm_nofpu/binutils-2.17/bfd/elf32-arm.c:7214
Quoted text here. Click to load it

SD-Card use is described in the U-Boot documentation.
(assuming that brand has SD-Card support)

--
Best Regards
Ulf Samuelsson
We've slightly trimmed the long signature. Click to see the full one.
Re: help in loading linux from sdcard on arm9

Quoted text here. Click to load it


When you say sdcard support for this chip, does it mean that uboot source
would need modification to access sdcard.


Also can you please tell me what version of arm-linux-tool chain you are
using. My toolchain is very old 3.4 thats why i am unable to compile the
file recognition in my bootloader.


Any pointers on uboot would really help a lot.

Thanks
Tama
      
                    
---------------------------------------        
Posted through http://www.EmbeddedRelated.com

Site Timeline