Wednesday, October 15, 2008

Booting Linux from SD card on my Beagle

It was the day when i started my battle to bring up Linux on my Beagle from SD card . After a long struggle , i learnt two things
* For my Kernel , MMC and SD cards are different .
* SD fs should be built with ROOT user .

The MMC/SD card can be partitioned using gparted .
Partition 1 : VFAT , flag =boot (uImage , MLO)
Partition 2: EXT-2 (file system)

The uboot ENV params are here :
setenv bootcmd 'mmcinit;fatload mmc 0 0x80300000 uImage;bootm 0x80300000';
setenv bootargs console=ttyS2,115200n8 noinitrd root=/dev/mmcblk0p2 rootfstype=ext2 rw rootdelay=1 nohz=off

Some tips on RAMDISK ...

# on the linux host
mkdir workspace
cd workspace
gzip -cd /rd.ext2-bin > ramdisk.orig
mkdir mountpoint
mount -o loop ..../workspace/ramdisk.orig ..../workspace/mountpoint
# should see all the files, etc. in "mountpoint" subdirectory
# you can make your changes there - or clone the filesytem and
# modify the clone

# then copy somewhere...
mkdir newFs
tar cf - -C mountpount . | tar xvf - -C newFs
umount mountpoint ;# unmount the old image
# then make whatever changes are wanted in 'newFs'
mkdir newFs/home/user ....
// whatever

# tar it up so we can do this more easily next time
tar zcf ramFileSystem.tgz --C newFs .

# then reverse the steps
mkdir -p newFsMountPoint
dd if=/dev/zero of=newRamDiskImage bs=8M count=1 ;# create the file
mkfs.ext2 newRamDiskImage
mount -o loop newRamDiskImage .../newFsMountPoint
tar zxf ramFileSystem.tgz -C ../newFsMountPoint

# finally, unmount and zip
umount .../newFsMountPoint
gzip -c newFsMountPoint myNewRd-ext2.bin
... then copy the file to the SD card
[http://groups.google.com/group/beagleboard/browse_thread/thread/16dc0686c1a78420]

Saturday, October 11, 2008

In the middle of a difficulty lies opportunity....

We , most of the times believe that the components around us doesn't obey the laws . We used to make mistakes at the start , then will endup in observing a faulty results in the mid and we blame that this is against our formulas and theories .Many of the things we can count, don't count. Many of the things we can't count, really count at the situation . What is required all the time is a good start with strong fundamental Concepts ,patience to make things in order and march towards the result .. Yes .. you will defenitely enjoy the fruit . It's not that we need to be smart , it's just that we should stay with problems longer, hitting all he sides .