Tuesday, July 29, 2008

Building linux for atngw100 from OE (open embedded)


You may ask why open embedded when u have buildroot. The thing is that open embedded has lots of packages that u can build. As far i know they added avr32 arch support recently.
U can get started from
http://wiki.openembedded.net/index.php/Getting_Started.

My local.conf is
----------------------------------------------------------------------------------------------------------------------------------------------------------
DL_DIR = "/home/vijay/stuff/embeddedlinux/OE/stuff/sources"
BBFILES := "/home/vijay/stuff/embeddedlinux/OE/stuff/org.openembedded.dev/packages/*/*.bb"
MACHINE = "atngw100"
TARGET_OS = "linux-uclibc"
DISTRO = "angstrom-2008.1"
IMAGE_FSTYPES = "jffs2 tar ext2 ext3"
ANGSTROM_MODE = "uclibc"
PREFERRED_VERSION_uclibc ?= "0.9.29"
PREFERRED_VERSION_uclibc-initial ?= "0.9.29"
----------------------------------------------------------------------------------------------------------------------------------------------------------
I cracked my head to findout that i need to add
ANGSTROM_MODE = "uclibc" and PREFERRED_VERSION_uclibc ?= "0.9.29" options ....... huh ... modify the above file to ur system convenience.

now u cam build a minimal-image for atngw100 by
bitbake minimal-image

u can have a look at
org.openembedded.dev/packages/images folder for wht images u can build and org.openembedded.dev/packages for the list of packages/applications that OE can build.
Get help from #avr32 at irc.freenode.net
or http://www.avrfreaks.net

Building linux for atngw100 from buildroot


You can build linux system for ur atngw100 easily by using buildroot. There are many suppliers for buildroot
1) Atmel beta release (http://www.atmel.no/buildroot/)
2) From buildroot site (http://buildroot.uclibc.org/)
3) Some guy (http://code.google.com/p/buildroot/) mentioned in http://avr32linux.org/twiki/bin/view/Main/DevelopmentTools
I have build my system from the 3rd buildroot.
svn checkout http://buildroot.googlecode.com/svn/trunk/ buildroot-avr32

make atngw100_defconfig
make menuconfig
make

u can also use atngw100_expanded_defconfig or atngw100-base_defconfig instead of atngw100_defconfig; these add more options like lcd driver,keyboard driver, mouse driver, X-windows etc ...... if u have one attached to ur atngw100. have a look at this "buildroot-avr32/target/device/Atmel" folder; there u will find for what all devices u can build the buildroot.

I have few problems while building for atngw100_expanded_defconfig, but fortunately they were easy to solve. :D.

PS: Im yet to get my board, i was just playing around with buildroot and OE till i comes.

Cheapest evaluation board that support embedded linux (ATNGW100)


I have been searching for a evaluation board that support embedded linux; The ATNGW100 from atmel is the cheapest i could find around.Its based on avr32 - AP7000 microcontroller . Its around $80. You can build linux system and applications for this board either by buildroot or OE (open embedded). only draw back that i could say is that this doesn't have a usb host (AP7000 microcontroller); Other than that its pretty good for $80(Rs 4000). Atmel is gonna release AP720* series which has support for usb host around end of 2008 . Long time for me ,cant wait . Planning to get one of these soon :D

Sunday, July 6, 2008

Psp Linux toolchain

here is my buildroot environment i compiled for psp using instructions from http://jacksonm80.googlepages.com/linuxonpsp.htm
extract it to /usr/src and add mipsel-linux-gcc to PATH variable

1)
http://rapidshare.com/files/127658821/pspbuildroot-aa.html
2)http://rapidshare.com/files/127659257/pspbuildroot-ab.html
3)
http://rapidshare.com/files/127659358/pspbuildroot-ac.html
4)
http://rapidshare.com/files/127659334/pspbuildroot-ad.html
5) http://rapidshare.com/files/127657597/pspbuildroot-ae.html


cat pspbuildroot-aa pspbuildroot-aa pspbuildroot-aa pspbuildroot-aa pspbuildroot-aa > buildroot-20071216.tar.bz2

Wednesday, May 28, 2008

What is Qtopia ?


Qtopia is an operation system; It can be run without a X server on the embedded system, so consumes less resources and boots faster. There are many versions of Qtopia, Initially i got frustrated finding out which is what and what is it for. There are basically two versions of qtopia one is embedded and other is phone

1) packages with the name qt-embedded-linux-opensource-src or qtopia-core-opensource-src is for embedded linux in general.
2) packages with the name qtopia-opensource-src is a phone edition.

I haven't got a chance to test the performance of qtopia on a real device. But i was testing it on fedora-arm running on qemu. It looks like developing applications for qtopia is almost like Qt (If u are familiar with KDE desktop u will be knowing that its based on qt4 ) for PC, I still have to look into it.

There are many phones and PDAs that are based on Qtopia Phone Edition; best example would be
Openmoko Neo FreeRunner phone (www.openmoko.com). And almost every device that is based on embedded linux can run qtopia.

Monday, May 12, 2008

programming for psp -1 (getting started)

For those who don't know what's a PSP is , it's a handheld gaming device made by sony called as playstation portable and in short PSP. Hacker's around net have cracked the psp and created their own psp toolchain, which is a collection of headerfiles and libraries which are used to create applications programs and even games. So basically psp toolchain is a cross compiler that runs natively on a pc and used to compile programs for PSP.
Here i will be explaining how to get the psp toolchain on a linux box and get started with programming for psp.

First make sure that you have installed all the dependencies needed for compiling the toolchain
sudo apt-get install autoconf automake bison flex gcc make libncurses5-dev libusb-dev patch subversion texinfo wget build-essential
now we need to setup the environment variables; let us edit the .bashrc file in home folder; the commands in this file are executed when a terminal window is opened.
gedit ~/.bashrc
add the following two lines at the end of the .bashrc file.
export PSPDEV=/opt/pspdev
export PATH=$PATH:$PSPDEV/bin

the /opt/pspdev is the folder in which you want to install the psp toolchain. You can change it to any directory you want suppose if u want to install in /usr/local/pspdev change the line "export PSPDEV=/opt/pspdev" to "export PSPDEV=/usr/local/pspdev". We also modifid the PATH variable so as to include the /opt/pspdev/bin directory into the search path when you type a command in the terminal.

Now we need to download the psp toolchain from net and compile it. you can get it from subversion
svn checkout svn://svn.ps2dev.org/psp/trunk/psptoolchain
now change directory into the downloaded toolchain installer
cd psptoolchain
and get root access by foolowing command and entering the password
sudo su
and start the installer by
./toolchain.sh
it downloads the files necessary for toolchain from net and compile. This process takes alot of time so be patient. Once the compilation finishes you have you psp dev environment setup.

Now u may want to install basic psp libraries for advanced programming involving opengl port, mp3 ,ogg , image file support in programming. You can get the psplibraries installer from the subversion same as above.
svn checkout svn://svn.ps2dev.org/psp/trunk/psplibraries
get root access by this command, if you already have root access dont do the following command
sudo su
start the installer by
./libraries.sh
This command also takes a long time like above.

Once everything is done, you now have your PSPDEV with the basic libraries. You can get more libraries from the subversion. If you want, just download the whole psp dev trunk from ps2dev.org subversion by
svn checkout svn://svn.ps2dev.org/psp/trunk/
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
OFFLINE INSTALLATION
For those who dont have a net connection or those who dont want to compile. Iam sharing my compiled toolchain. You can get it from this link Just extract it
and place it anywhere (eg:- /opt/ ) on your pc .

tar -xvjf pspdev.tar.bz2
mv pspdev /opt/
and add the path to .bashrc
export PSPDEV=/opt/pspdev
export PATH=$PATH:$PSPDEV/bin
change /opt/ to location where you want to install, or just leave it as it is.

I have also shared the whole trunk of psp dev, you can get it from here
-----------------------------------------------------------------------------------------------------------------------------------------------------------------

TUTORIALS

You can get started with psp-programming now, you can find good tutorials to get started here
i have made a small filebrowser application based on above tutorials, i will be discussing about it later.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
IDE
You can use any IDE that supports makefile and c language. Iam using eclipse. See how to setup eclipse for c and c++ in this blog.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------

Hope this helps to get u started programming for psp.

Thursday, May 1, 2008

Eclipse IDE simply rocks !!!

Just recently i came across this awesome application, it simply the best IDE i have seen till now . So I thought i would share with you guys. The IDE is totally customizable for any programming language (nearly every language out there, u name it :) ). The power lies in the flexibility for plugins.

U can get it from www.eclipse.org/ . Linux users simply get it from apt-get (ubuntu/debian etc....) or from yum (redhat/fedora).
sudo apt-get install eclipse
sudo yum install eclipse


After installing eclipse, we need to configure it to use java from sun microsystems (by default it uses gnu java). First we need to install jdk from sun
sudo apt-get install sun-java6-jdk


add /usr/lib/jvm/java-6-sun on the top of /etc/jvm file
sudo gedit /etc/jvm
after editing the file should look something like this (remember lines with # are just comments)
/usr/lib/jvm/java-6-sun
/usr/lib/jvm/java-gcj
/usr/lib/jvm/ia32-java-1.5.0-sun
/usr/lib/jvm/java-1.5.0-sun /usr

Make sure that /usr/lib/jvm/java-6-sun is on the topline of the file /etc/eclipse/java_home if not just add it.
sudo gedit /etc/eclipse/java_home
#/usr/lib/jvm/java-7-icedtea
/usr/lib/jvm/java-6-sun
/usr/lib/jvm/java-gcj
/usr/lib/kaffe/pthreads
/usr/lib/jvm/java-1.5.0-sun
/usr/lib/j2se/1.5
/usr/lib/j2se/1.4
/usr/lib/j2sdk1.5-ibm

/usr/lib/j2sdk1.4-ibm
/usr/lib/j2sdk1.6-sun
/usr/lib/j2sdk1.5-sun
/usr/lib/j2sdk1.4-sun


Thats all is there for setting up eclipse
I will be posting more about how to configure it for different programming languages other than java (by default) when i get time :D


Google