Tuesday, May 23, 2006

Mounting and formatting of Memory card / USB pen drives

To mount a usb device on Desktop use the folowing commands on terminal as:

fdisk -l
It will display all the devices attached to the desktop, probably the last one is the attached USB device for ex: /dev/sdb1

Use
mount /dev/sdb1 /mnt/usb

It will mount the device in /mnt/usb folder.

To unmount the device use
umount /mnt/usb

To format the device use the following commands:
(Using the same example device /dev/sdb1)

Unmount the device the first:
umount /mnt/usb

then use..
mkfs.ext2 /dev/sdb1
(ext2 for linux filesystem, msdos for windows-dos, ntfs for windows ntfs filesystem.. )

and finally use:
tune2fs -c 100 /dev/sdb1

Mount the device again and here you go...
the device is now ready again to b used.

Setting up of tftp Server on Linux

To have tftp service enabled on your "Technology rich Idiot Box" use the following steps:

Download the tftp package based on Linux flavor from site like:
http://rpm.pbone.net/index.php3?stat=3&search=tftp-server&srodzaj=3

It might have some dependencies for different packages like:
xinetd services
(It can again be downloaded from rpm.pbone site )

Once all the required dependent service RPMs are downloaded, install them using the command on terminal as:
rpm -ivh xinetxxx..i386.rpm
(optional use -U option to update the RPM)

and finally:
rpm -ivh tftp-serverxxx.i386.rpm

Reboot the PC/Lappy for tftp services to be up..

For more info check the following thread:
http://forums.fedoraforum.org/archive/index.php/t-127266.html

Happy TFTPing...

Linux: Setting up of Minicom

Use Terminal to make a setup of minicom.

Type commands as:
minicom -s

A config menu will appear.
Select : Serial Port Setup option
Update the name based on device like:
/dev/ttyUSB0 (In case of Serial to USB connectors) or
/dev/ttyS0 (In case of serial cables)

Press ENTER key.

Save the setup.
It will create a default config file(with name as "dfl") which will be used by the minicom while starting up.

We can have different config files depending on devices being in use... To use a specific config file use the following command:
minicom xyz

Enjoy!!!

Important Links for Linux

To get Linux Kernel Archives, Use following link:
http://www.kernel.org/

To get Resource Packages Managers (RPM) use the following link:
http://rpm.pbone.net/
For more info on RPMs:
http://en.wikipedia.org/wiki/RPM_Package_Manager

How to write kernel image on NAND???

To write the kernel image on NAND follow the steps below.

The parameters being used here are:
280000: This probably represents the baud-rate.
200000: This represents the size of the kernel image.
After calculating all these parameters follow the commands listed below.

Once the board starts and uboot is executed, the command prompt will appear, execute the commands in the following order:

tftp 0x80000000 uImage_touch_IPv6
nand unlock
nand erase 280000 200000
nand ecc sw
nand write.i 0x80000000 280000 200000
nand read.i 0x80000000 280000 200000; bootm 0x80000000

And here you go...
The kernel is now placed in the NAND Flash and next time when you will start the board the kernel will be loaded automatically...
Enjoy!!!

Automating the boot sequence of kernel for OMAP board

To automate the settings and booting sequence of kernel for OMAP board, We have done the following steps:

Store the Kernel image in the NAND flash of the board...
File System is placed on the memory card so all the required folders are kept in the mmc.
Create a script file xyz.sh which will do the settings and launch of applications.
Add the entry of this script file in the file placed at following location:
In MMc Cards file system, check for /etc folder.
In /etc folder search for "init.d" folder, in this folder there will be a file named "rcS".
Open the "rcS" file
Search for "System Initialization Complete"
After this statement user application can be executed..
Add following statements:
echo -n "Starting User application"
sh /app/scripts/xyz.sh

This script will now be executed at the start-up and will do the settings and launch the application..

Happy Launching!!!