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

re: fw: migrating from uclinux to emdebian crush on a xscale pxa270 board board



Title: re: fw: migrating from uclinux to emdebian crush on a xscale pxa270 board board

Hello Martin,
thanks a lot for your detailed suggestions.
I could successfully install a NFS server and I am able to boot the old file system via nfs. I have now added the emdebian rootfs to the nfs folder and the next step is to run the ./emsecondstage script.
Unfortunately I dont have the chroot compiled yet on the old elinos fs. Anyway, it shouldn't be a problem to compile chroot with the elinos tools.
Marco



________________________________

Von: Martin Fuzzey [mailto:mfuzzey@gmail.com]
Gesendet: Di 03.02.2009 23:33
An: Hoefle Marco
Cc: debian-embedded@lists.debian.org
Betreff: [SPAM] re: fw: migrating from uclinux to emdebian crush on a xscale pxa270 board board



Hoefle Marco wrote:
> Right now I got the emdebian-arm.tgz which has a size of 25 MByte uncompressed which means it will fit into the flash of the XScale PXA270 board.
> In the emdebian how to it is mentioned that a debian like system is required to update the romfs. This is not the case for me. We have uboot running together
> with this kernel version:
>
> Hit any key to stop autoboot:  0                                              
> **** Try to boot from Flash ****                                              
> ## Booting image at 00040000 ...                                              
>    Image Name:   Linux Kernel Image                                           
>    Image Type:   ARM Linux Kernel Image (uncompressed)                        
>    Data Size:    2367256 Bytes =  2.3 MB                                      
>    Load Address: a0008000                                                     
>    Entry Point:  a0008000                                                     
>    Verifying Checksum ... OK                                                  
> OK                                                                            
>                                                                               
> Starting kernel ...                                                           
>                                                                               
> Linux version 2.6.22.18-ELinOS-469 (joye@hrwks7001-l) (gcc version 3.4.4 (ELinO8
> CPU: XScale-PXA270 [69054117] revision 7 (ARMv5TE), cr=0000397f
>
>
> The flash is partitioned into:
> 0x00000000-0x00040000 : "Bootloader"                                          
> 0x00040000-0x00400000 : "Kernel"                                              
> 0x00400000-0x02000000 : "Filesystem"
>
> I suppose it won't work to replace the data on 0x00400000 with the packed .tgz data. Do you have any hints on how to proceed?
> Thanks,
> Marco
>

Hi Marco,

does your board have a network interface?

If so I would suggest that you use a NFS mounted root filesystem for
your first attempts and initial debugging.
That is easier than writing it to flash as you can just modify files on
your desktop / laptop and the changes are "seen" by the board.

For this to work you'll need NFS compiled into your kernel.
You may need to reconfigure and recompile your kernel if this is not the
case.

To do this:
1) aptitude install nfs-kernel-server
2) Unpack the emdebian-arm.tgz somewhere (I'm assuming
/home/marco/nfsroot for the rest). You'll need to do this as root so it
can create device nodes etc.
3) Edit /etc/exports and add a line like:

/home/marco/nfsroot (rw,no_root_squash)

4) Restart the nfs server (invoke-rc.d nfs-kernel-server restart) [as root]
5) Set your board's kernel command line to something like
root=/dev/nfs ip=_targetIp_:_hostIp_:_gateway_:_netmask_
nfsroot=/home/marco/nfsroot

where:
_targetIp_ = ip address for your board
_hostIp_ = ip address of your desktop / laptop


A more detailed explanation of all this can be found at
http://www.faqs.org/docs/Linux-mini/NFS-Root.html


Regarding actually flashing the root filesystem (once it works with NFS):
As you suspect you can't just put the tgz into flash - you need to
create a filesystem on the flash.
For a good overview of embedded filesystems take a look at
http://free-electrons.com/docs/filesystems/

I would probably use jffs2 but ubi looks good (though I haven't tried it
and its only available from 2.6.27).
The basic idea is that on your desktop you:
1) create a file that will contain the image
2) use losetup to create a block device refering to that file
3) use the block2mtd module to simulate a mtd device on top of the above
4) mount jffs on this simulated mtd
5) copy your root filesystem onto it
[see page 18 of the document above for the actual commands]

Once you've done all that the image file will contain what you have to
write to flash.
You'll have to use uboot to flash it (for example after transfering by
tftp).

Another way is to boot the board with a NFS root filesystem and then
write the flash directly from linux on the device (page 17)


Hope this helps a little

btw the free-electrons site I referenced above has lots of useful info
for embedded linux.

Martin













Reply to: