Posts

stupid little alarm program (bash script)

almost missing office hour due to jetlag is not a nice idea.. hence wrote this nonsense little script, which would stream a shoutcast stream while waiting to kick me up screaming.. Now, why should I suffer alone? :D.. #!/bin/bash #Choose your favourite stations from shoutcast.com (net radio) LINK="http://yp.shoutcast.com/sbin/tunein-station.pls?id=6063" if [ $# -eq 0 ]; then echo "usage $0 wakeup_duration" echo "wakeup_duration: wakeup after how long? 6 hours, 1 hour, 20 mins etc. or even 5am tomorrow.." exit 1 fi NOW_SEC=$(date +%s) WAKEUP_SEC=$(date +%s --date="$*") if [ $? -ne 0 ]; then echo "oopss.. i dont think date understands $*" exit 2 fi if [ $NOW_SEC -gt $WAKEUP_SEC ]; then SLEEP_SEC=$(( $NOW_SEC - $WAKEUP_SEC)) echo "Do you wish to wakeup $SLEEP_SEC seconds previously??.." echo "Sorry cant help you with that.. :(" exit 3 fi SLEEP_SEC=$(( $WAKEUP_SEC - $NOW_SEC)) echo "NOW=$NOW_SEC WAKE=$WAKEU...

NAND not booting on a new OMAP3 board? check this list out

The following check list was compiled based on a discussion here a) Did you check if the device id of the device is in TRM under supported devices? -> ROM Code should support this device if it should ever boot.. b) Did you read your CTRL_STATUS register and verify the SYSBOOT boot sequence in TRM -> is NAND in the sequence and nothing else preventing it from being hit? c) what is the status of your EMU0-1 JTAG pins are they both high or in tristate condition during OMAP boot? -> the wrong setting would prevent boot sequence from being executed d) is it on CS0? -> well OMAP boots out of CS0 e) Do you have an 8 bit or a 16 bit NAND? is your config file in x-loader, u-boot handling this correctly? -> accessing wrong width is not very helpful.. ;) f) Did you sign x-loader.bin.ift with signGP.c? Try this in x-loader directory: grep _start System.map|cut -d' ' -f1|xargs signGP x-load.bin -> x-loader loads up at the address we tell it to, few variants of x-loaders s...

OMAP support in U-boot-v1

Finally! After months of effort by many, mostly Dirk driving hard, we have omap3 support in: a) beagleboard b) overo c) evm d) pandora e) zoom1. This should ideally make omapzoom git based u-boo t redundant. Lets see if this happens in the upcoming days.. v2009.02 will have official support :).. Hip Hip Hooraah!!

beagleboard recovery take 2

[2013-03-06 update]: after a few years of letting things rot, I just managed to pick up my old binaries and gave it a dry run: https://github.com/nmenon/beagle-recover  has the original working binaries since the google groups link no longer work. NOTE: I HAVE NOT TRIED WITH ANY OF THE LATEST SOURCES. I do not have plans to do so in the future as well  - an quick try indicated things are broke :( [Original post] http://groups.google.com/group/beagleboard/web/beagle_recover.tar.bz2 has the recovery package ready to go for ubuntu 8.04 32bit OS: download this, run sudo ./recover_beagle.sh - as shown in the video... Steps summary: 1. first shutdown the board. 2. run 'sudo recover_beagle.sh /dev/ttyUSB0' in a terminal -> you need super user permissions(sudo permissions) to run this script. 3. Keep the pushbutton S1pressed while powering on the board -> there are two white push button switches, use the one closer to the edge of the board NOTE: if your nand is com...

Grr at code.google.com uploads

After using a bunch of time getting firefox to upload from my ubuntu 8.10 box to here , I got an util which told me to use my code.google.com password instead of my google passwd.. Grrrr... anyway, couple of my sleep hours later, u-boot utils rev 0.2 "Jumpin' Monkey" is uploaded (the code name was made up as i typed ;))

is nand ecc correction logic sane enough?

for some time now, I have gone with the belief that the nand ecc imlementation such as this which I helped write good enough for nand devices, but Vimal Singh pointed me to these two articles: http://lists.infradead.org/pipermail/linux-mtd/2008-August/022611.html http://lists.infradead.org/pipermail/linux-mtd/2008-August/022613.html Essentially: If we do just old_ecc^new_ecc to detect/correct ecc errors - the logic handles the case of bit flip error at 63rd bit(as e.g.) faultily. I was completely unaware of this weakness of the algo.. thanks Vimal for pointing me here.. I have plans of setting up a bit of code to verify this (essentially hack up the current drivers by overriding the read path ;) ).. will post if I can proove(I suspect this would be the case) this is the case with gpmc..

Changes in Linux OMAP

Tony Lindgren, Linux OMAP maintainer announced that source.mvista.com linux omap copy would not be used anymore.. It has been more than three years since the discussion on hosting the kernel tree at mvista site .. Thank you mvista for hosting all our pulls to date.. from now on look here (actually it was there since 2006, though I will miss doing " linux omap git " on google).

omap peripheral boot - what the heck is it?

Kinda got a few questions on how omap uboot utils works.. so here is my attempt to try and summarize what omap3 TRM says(for details TRM is the best place to go - yes, it is beautifully written ;) ): ARM is a useless unless we have some software to run on it, so OMAP has a special piece of ROM code which gets the initial control of things. Now, ROM code is capable of: a) booting off a memory device such as NOR, NAND, OneNAND, MMC etc.. kind of devices. b) booting off a peripheral such as UART, USB etc.. Before anyone asks, yep ROMCode is a software code within OMAP. And, yep, and yeah it's got all kind of drivers for devices it supports, and further yeah, it is a tiny optimized code and finally NO - you cant modify it since it is R ead O nly M emory. Now, in the world of OMAP s/w guys, (a) is called memory boot and (b) is called peripheral boot.. Now, how does ROM Code know what kind of device you have and which mode you want to boot from? This is called the SYSBOOT(again read th...

quick removable drive with omap3

One neat little trick of having an OTG port is the capability to have the board act as any type of device you'd want it to be.. in my case, I wanted to emulate a disk drive for the heck of it.. I found this link particularly useful. g_file_storage.ko which is generated once you enable file storage gadget as a module in the kernel build. Step 1: create the "disk" - essentially a file dd bs=1M count=64 if=/dev/zero of=fs fdisk fs (follow the steps in the link) fdisk -lu fs sudo losetup -o 4096 /dev/loop0 fs sudo mkdosfs /dev/loop0 mkdir r sudo mount -t vfat /dev/loop0 r vim r/hellow.txt (put what ever files we want here) sudo umount r sudo losetup -d /dev/loop0 ensure that fs file exists in the filesystem of the target Step 2: load it up.. insmod g_file_storage.ko file=./fs stall=n where fs is the file which we created in the first place.. and that'z it.. once you connect the musb to a windows PC, it appears as a disk ;)...

Towards creating a beagleboard NAND recovery script

NOTE: This is a work in progress yet.. Get Code base: x-loader: git clone git://www.sakoman.net/git/x-load-omap3.git u-boot-v1 - omap3: git clone git://www.sakoman.net/git/u-boot-omap3.git cd u-boot-omap3 git checkout --track -b omap3-dev origin/omap3-dev Updated: see here if this did not work.. u-boot-v2: git clone git://git.denx.de/u-boot-v2.git omap-uboot-utils: git clone git://github.com/nmenon/omap-u-boot-utils.git signGP tool: wget http://beagleboard.googlecode.com/files/signGP.c Compilers: Cross compiler: arm-none-eabi-gcc: 2007q3-53 (4.2.1) Host compiler: x64bit: (Ubuntu 4.3.2-1ubuntu11) Build commands: Before starting the build process, lets set up a simple alias command: alias mymake='make ARCH=arm CROSS_COMPILE=arm-none-eabi- V=1' U-boot-arm: mymake omap3_beagle_config mymake U-Boot-v2: mymake omap3530_beagle_per_uart_defconfig mymake X-Loader: mymake omap3530beagle_config mymake [Update: 2008-12-13 - I completely forgot that we need to sign an image for it to boot ...

Send a git patch with gmail

The following is thanks to Dirk Behme (based on ubuntu 8.10): Install packages: On Ubuntu, I have done: sudo apt-get install git git-email Stage1: development: set up your GIT variables(probably in ~/.bashrc) export GIT_COMMITTER_EMAIL=yourEmail@somewhere.com export GIT_COMMITTER_NAME='YourName' export GIT_AUTHOR_EMAIL=yourEmail@somewhere.com export GIT_AUTHOR_NAME='YourName' git clone ... or git pull.. etc to get to the latest code. git branch branch_name git checkout branch_name Do changes git commit with commit message in incremental stages.. Stage 2: Generate email-able patch files. git-format-patch -s -n -o origin.. -s will generate the signed of-by -n will generate numbered patches (if you have just a single patch, you can ignore it) - but if you have multiple ones, this is a good idea to use to generate subject auto numbered 1/2, 2/2 etc.. -o is where the output patch files will be stored -> each commit is a separate file. Stage3: Email the patches:(for gmai...

omap-uboot-utils supports usb2serial device

It has been a long time desire to use usb2serial convertors for pserial application. :(.. Anyways, yesterday night, I looped back my usb2serial back to my PCI serial port and tried to write a bit of loopback code.. to figure out the issue with pserial, I wrote a simple little app to print the ttySx flags: #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <termios.h> #include <stdio.h> #include <string.h> #include <unistd.h> #include <errno.h> /************* VARS ***************/ static int fd; static struct termios oldtio; int main(int argc,char * argv[]) { int ret; int i; if (argc!=2){ printf ( "error no args..%d\n" ,argc); return 1; } printf ( "port: %s\n" ,argv[1]); fd = open(argv[1], O_RDWR | O_NOCTTY); if (!fd) { printf( "terminal is not open!\n" ); return 1; } /* sa...

Linux audio flows

Image
The following link is thanks to mru in beagleboard irc channel. the link to the discussion is here. The interesting thing is unless you work at oss/alsa layer, there are too many higher sound server options... IMHO, flexibility vs scaring folks off... ;)

Overo: yet another low cost OMAP3 development board

Gumstix guys have been a fun bunch known to create tiny little boards at low costs.. Overo seems to be their solution for OMAP3! check it out here . lots of the linux guys hacking are in the beagle community too.. you can find many(such as Steve Sakoman) in the beagle irc also if you are interested..

IRC games: Customizing Festival voice

Setting basics up: I use x-chat2 with uberscripts and festival plugin . Tired of the default festival voice, Today's effort was to change the voices ;). I found this to be the best available resource. Here are the instructions in command format. You can just copy paste the following. sudo apt-get install festival festlex-cmu festlex-poslex festlex-oald libestools1.2 unzip sudo apt-get install festvox-don festvox-rablpc16k festvox-kallpc16k festvox-kdlpc16 cd ~/tmp mkdir hts_tmp cd hts_tmp/ wget -c http://hts.sp.nitech.ac.jp/archives/2.0.1/festvox_nitech_us_awb_arctic_hts-2.0.1.tar.bz2 wget -c http://hts.sp.nitech.ac.jp/archives/2.0.1/festvox_nitech_us_bdl_arctic_hts-2.0.1.tar.bz2 wget -c http://hts.sp.nitech.ac.jp/archives/2.0.1/festvox_nitech_us_clb_arctic_hts-2.0.1.tar.bz2 wget -c http://hts.sp.nitech.ac.jp/archives/2.0.1/festvox_nitech_us_rms_arctic_hts-2.0.1.tar.bz2 wget -c http://hts.sp.nitech.ac.jp/archives/2.0.1/festvox_nitech_us_slt_arctic_hts-2.0.1.tar.bz2 wget -c http...

50 years of integrated Circuits!!

Image
Jack Kilby invented IC this very day 50 years back :).. And guess what? in his memory, Texas Instruments has started Kilby Labs . We have come some way in the last 50 years.. and beagleboard is one of the shining lights of what our technology really is :)

arm and cortex documentation

thanks to beagle board irc (#beagle on freenode), found this link useful: http://infocenter.arm.com/help/topic/com.arm.doc.ddi0344e/index.html It is literally a goldmine for those working on ARM processors!

Low cost Jtag for beagle

Image
In the quest for a proper debug tool.. printfs have been my friend so far.. but printfs cannot help in many cases optimally.. JTAG is the right solution for such cases. keesj and I have been independently working on getting openocd working with flyswatter . http://elinux.org/BeagleBoardJTAG is the starting point in this quest! join us, provide your thoughts etc.. [ Update : Sept 3, 2008: 1. keesj has mailed an excellent report to the beagleboard list on his progress on the JTAG saga. Read about it here (excellent job Kees :) ). 2. As pointed by keesj, tincan tools have the adapter on the product page ] Today, the thought has been in creating a jtag debugger convertor - given that "ARM standard" and "TI standard" are not 1-1! Note: Tincan tools is planning on making a more professional connector than "mine" and most probably will work.. one thing I can say for sure.. OMAP still works after plugging this in.. and I can probe the chip ID from openocd we...