Archive for the Unix/Linux Category

TFTP Boot using u-boot

Posted in Arm stuffs, Unix/Linux with tags , , , , , , , , , , , on January 16, 2013 by UnixmanLinuxboy

I was fiddling around with my newly purchased Beaglebone and wanted to get my hands dirty with kernel hacking and stuff. Since beaglebone is hard-wired to boot off an SD card I found it tedious to shuttle the card between my development laptop and the board.
===================
Enter TFTP boot.
===================
This is a very handy way of booting when you need to recompile your kernel repeatedly and inserting/removing the card from/to board becomes a tedious process. For those who wanted to try out this fantastic way of booting, here is my short howto:

Before I begin, here is snapshot of my development platform:
Host machine: am64 lubuntu 12.10
Tftp software: tftp-hpa 5.2 [client and server]
U-boot: 2013.01-dirty

===========================================================
To install, run: sudo apt-get install tftpd-hpa tftp-hpa
===========================================================

Before we begin, we need to configure the tftpd’s configuration file so edit:
————————————————–

sudo vim /etc/default/tftpd-hpa
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="your-ftp-root-directory"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--secure"

————————————————–
After that restart the daemon: sudo service tftpd restart
Now that the server has been setup in our host machine, we may now concentrate on the target system.
Note: The SD card containing MLO and u-boot should always be present in the beaglebone’s slot.
Power up the board and and get to the u-boot prompt:
———————————————————————————————————-

U-Boot 2013.01-dirty (Jan 16 2013 - 15:36:41)
I2C: ready
DRAM: 256 MiB
WARNING: Caches not enabled
NAND: No NAND device found!!!
0 MiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
*** Warning - readenv() failed, using default environment

musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Peripheral mode controller at 47401000 using PIO, IRQ 0
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Host mode controller at 47401800 using PIO, IRQ 0
Net: cpsw, usb_ether
Hit any key to stop autoboot: 0
U-Boot#

———————————————————————————————————-
Make sure that ethernet cable is plugged into the board and a dhcp server is running in either your host machine or your router.
———————————————————————————————————-

U-Boot# setenv autoload no
U-Boot# dhcp
link up on port 0, speed 100, full duplex
BOOTP broadcast 1
DHCP client bound to address 192.168.1.11

———————————————————————————————————-
Next will be configuring the server-ip [our host machine’s IP], kernel’s command line and the load address
———————————————————————————————————-

U-Boot# setenv serverip 192.168.1.4
U-Boot# setenv bootfile uImage
U-Boot# setenv bootargs console=ttyO0,115200 root=/dev/mmcblk0p2 rw rootwait ip=dhcp
U-Boot# tftp 0x80200000 uImage
link up on port 0, speed 100, full duplex
Using cpsw device
TFTP from server 192.168.1.4; our IP address is 192.168.1.11
Filename 'uImage'.
Load address: 0x80200000
Loading: #################################################################
#####################################################T ############
##########################################T #######################
###################################T ########
146.5 KiB/s
done
Bytes transferred = 3484264 (352a68 hex)
U-Boot# bootm 0x80200000
## Booting kernel from Legacy Image at 80200000 ...
Image Name: Angstrom/3.2.28/beaglebone
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3484200 Bytes = 3.3 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 3.2.28 (koen@Angstrom-F16-vm-rpm) (gcc version 4.5.4 20120305 (prerelease) (GCC) ) #1 Tue Sep 11 13:08:30 CEST 2012
[ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=50c53c7d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine: am335xevm

———————————————————————————————————-
And voila! It boots!!!!

A RALink (rt2x00 / rt2800pci) Wifi chipset and does not seem to work? Read on

Posted in Unix/Linux with tags , , , , , , , , , on June 10, 2012 by UnixmanLinuxboy

There can a lot of reason why the wi-fi card don’t seem to work.

In my Lubuntu 12.04 (kernel 3.2.0-24-generic-pae) it never worked with Network Manager. I chucked nm and installed wicd, after some time, it too, refused to connect me to encrypted network.

So I fired up good ol’ (# cat /proc/kmsg) and lo! What do I see ?

phy0 -> rt2x00queue_write_tx_frame: Error – Dropping frame due to full tx queue 0.
phy0 -> rt2x00queue_write_tx_frame: Error – Dropping frame due to full tx queue 0.
phy0 -> rt2x00queue_write_tx_frame: Error – Dropping frame due to full tx queue 1.
phy0 -> rt2x00queue_write_tx_frame: Error – Dropping frame due to full tx queue 1.
phy0 -> rt2x00queue_write_tx_frame: Error – Dropping frame due to full tx queue 1.
phy0 -> rt2x00queue_write_tx_frame: Error – Dropping frame due to full tx queue 1.
phy0 -> rt2x00queue_write_tx_frame: Error – Dropping frame due to full tx queue 1.
phy0 -> rt2x00queue_write_tx_frame: Error – Dropping frame due to full tx queue 1.

Dear friend, if you face similar logs in your kernel, it is time we get into some bug-banging ๐Ÿ˜‰

Let check against the daily builds of compat-wireless drivers. You can get ’em here

http://wireless.kernel.org/download/compat-wireless-2.6/ 

As of today it is compat-wireless-2012-05-10.tar.bz2 updated 2012-Jun-09 22:38:35

Download this in your box and run the following:

./scripts/driver-select rt2x00
make
sudo make install

 

— Now you can reboot your box, or unload your modules and modprobe them.
sudo make unload
sudo modprobe -v rt2800pci

 

Official instructions are here: http://wireless.kernel.org/en/users/Download#Selecting_your_driver

 

Clipgrab

Posted in Unix/Linux on March 19, 2011 by UnixmanLinuxboy

ClipGrab is a free GPLโ€™ed software for downloading online videos.
With ClipGrab you can download online clips from many sites with just some clicks and then automatically convert them into โ€œusableโ€ files. This way, you can watch your favourite clips again and again wherever and whenever you like. And since ClipGrab can also save your videos as audio files, you can also put them on your mp3 player if you like.

Which sites are supported by ClipGrab?

At the moment, the following sites are officially supported:

* YouTube
* Clipfish
* Collegehumor
* Dailymotion
* MyVideo
* MySpass
* Sevenload
* Tudou
* Vimeo

Which formats are supported by ClipGrab?

At the moment, ClipGrab supports these formats:

* MPEG4 (video)
* WMV (video)
* OGG Theora (video)
* MP3 (audio only)
* OGG Vorbis (audio only)

Install clipgrab in ubuntu 10.10/10.04/9.10

Open the terminal and run the following commands

sudo add-apt-repository ppa:clipgrab-team/ppa

sudo apt-get update

sudo apt-get install clipgrab

Arch and 64bit??

Posted in Unix/Linux with tags , , , , , , on November 7, 2010 by UnixmanLinuxboy

Just reformatted my laptop to install Arch 64bit and running 32bit Linux Mint debian Edition on vbox.

Wi-Fi issues: If you have 64 bit kernel > 32 minor number onwards and having a Ralink wifi card, mostlikely it will not work for you out of box.
Here is how I got through

edit /etc/rc.conf and in the modules section,
enter ————> !rt2800usb !rt2x00lib !rt2x00usb
save it and reboot voila! It works ๐Ÿ™‚

When the going gets tough…

Posted in Unix/Linux on September 3, 2010 by UnixmanLinuxboy

They say that when the going gets tough, the tough gets going. But this idiom here seems to loose its meaning these days. One by one hurdles and overcoming them is a challenge but now the list seems unending. Don’t know for how long things will hold up.

Desperately seeking a miracle ๐Ÿ™‚