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 .

Sunday, August 3, 2008

IRC channels :

irc://irc.freenode.net/#OL - Omap Linux
irc://irc.freenode.net/#mtd - Memory technology devices
irc://irc.freenode.net/#u-boot - U-Boot
irc://irc.freenode.net/#linux-sensors - LM-Sensors channel
irc://irc.freenode.net/#beagle - The tiny beagle site..

Getting Started with Beagle

How to set up CROSS Compiler :

1.Set up code Sourcery
2.Setup Environment settings :
>>export PATH=$PATH:~/CROSSCOMPILE/CROSSCOMPILING >>/CROSSTOOLCHAINS/arm-2007q3/arm-2007q3/bin:/home/shankar/Kermit

Kermit :

C-Kermit>set modem type none
C-Kermit>set line /dev/ttyUSB0
C-Kermit>set carrier-watch off
C-Kermit>set speed 115200
C-Kermit>robust
C-Kermit>connect

"CTL + \" & C to get back to kermit

Few GIT trees :
git-clone git://git.denx.de/u-boot-v2.git u-boot-v2
git clone
http://git.omapzoom.org/repo/omapkernel
git-clone git://git.denx.de/u-boot-v2.git U-BOOT_V2

How to Build
UBoot V2:

make CROSS_COMPILE=arm-none-linux-gnueabi- distclean
make CROSS_COMPILE=arm-none-linux-gnueabi- omap3530beagle_config
make CROSS_COMPILE=arm-none-linux-gnueabi-

How to Build kernel
Step 1) cd to kernel git repository and clean the kernel build folder
make CROSS_COMPILE=arm-none-linux-gnueabi- distclean
Step 2) Set BEAGLE as default platform configuration by
make CROSS_COMPILE=arm-none-linux-gnueabi- omap3_beagle_defconfig
Step 3) Compile the source code and generate the binary by
make CROSS_COMPILE=arm-none-linux-gnueabi- uImage
Kerenel binary uImage will be generated at arch/arm/boot/ directory.
Note that mkimage tool is needed to generate uImage file.

Sunday, July 27, 2008

Freedom for my mind

Do we have the freedom of programming ?
  • Freedom 0: the freedom to run the programme however you wish.
  • Freedom 1: the freedom to help yourself. That's the freedom to study the source code and change it to do what you wish.
  • Freedom 2: the freedom to help your neighbour. That's the freedom to copy the programme and distribute the copies to others when you wish.
  • Freedom 3: the freedom to help your community. That's the freedom to publish or distribute a modified version when you wish.
And YES Finally , TI helped all of us to OPEN SOURCE OUR CEREBRUMS ....:)


http://elinux.org/BeagleBoard

Beagle Boards

The little master makes everyone mad who hangs around embedded processors ..