View Single Post
Old 10-24-2006, 03:58 PM   #1
scotty1024
Banned
scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.
 
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
How to setup your iLiad so you don't kill /

The disk storage in the iLiad is tiny.

One of the challenges in adding applications to your iLiad is how to do it with out filling up your root filesystem (/).

You need an ext2 storage device as many unix tools require case sensitive access to files. The best example is the x in X11, it's upper case. iRex mounts the fat32 storage devices in a "force to lower case" mode, so when an app goes looking for X11, it can't find it because it's been forced to x11.

I've described how to setup an ext2 card elsewhere here at Mobile Read.

BTW do yourself a favor, get a big CF card. Once you get addicted to adding software you'll want all the space you can find.

I created an opt directory on my CF card and then put a debian directory under that: /mnt/cf/opt/debian. The thought was I could then put other distro's on the same card.

The dpkg command supports arguments to re-direct package installs onto the memory card and keep the stuff out of your root file system:

dpkg --root=/mnt/cf/opt/debian

The other thing you can do is setup a chroot shell to /mnt/cf/opt/debian. The unix chroot call changes the root filesystem to be the directory you chroot it to. This very effectively ensures you don't have any leakage into the root filesystem, and in essence means you are running debian (or any other distro) on your iLiad when you are logged in.

Your chrooted apps can still get to the iLiad's X server since that is done via socket's.

In any case, you will want a start up script to setup your environment each time you login.

Here is a basic starter script.

Code:
export DISPLAY=10.0.1.2:0.0
export EDITOR=/usr/bin/emacs
export LD_LIBRARY_PATH=/usr/lib:/lib:/mnt/cf/opt/debian/usr/lib:/mnt/cf/opt/debian/lib:/mnt/cf/opt/debian/usr/X11R6/lib
export PATH=/mnt/cf/opt/debian/usr/sbin:/mnt/cf/opt/debian/usr/X11R6/bin:/mnt/cf/opt/debian/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin
export TERM=xtermc
export TZ=PST
I've got my DISPLAY set to send X applications over to my Mac, where I have a keyboard and real time display. So when I invoke emacs on the iLiad it pops up over there.

EDITOR is the path to an editor to be invoked by various apps when you decide to edit something. Like say in CVS when you need to enter a description of the changes you made.

LD_LIBRARY_PATH tells the unix process loader where to go looking for all those shared libraries. If you are not running chroot this is handy for letting you just install stuff on the card and yet still have the bits be found as needed. Some times though an app will internally try to manually load a shared library, in those cases they typically don't respect LD_LIBRARY_PATH and you will need to ln -s the needed library (or use the chroot method).

PATH is where to find applications.

TERM is the name of the display device being used. In this case I've selected an xterm with color. This tells ncurses how to do its magic.

TZ is the time zone you are located in. PST is Pacific Standard Time e.g. US west coast.

I'm putting together a debian starter kit. Its a classic chicken and egg issue to get dpkg/apt-get up and going.

Once you get this stuff setup you can supposedly invoke things via the contentLister hack. I haven't seen that work yet (but I've got hopes). This would let you have a list of scripts you could browse with contentLister and then poke 'em to start 'em.

For example, your favorite RSS feed puller.

If you don't want to wait for my debian dpkg/apt-get, here is how to pull apart a .deb file.

Code:
ar -x emacs21_21.2-1woody3_arm.deb
This will produce a data.tar.gz file. Here's how to unpack that.

Code:
cd /mnt/cf/opt/debian (or where ever)
tar xvfz /mnt/cf/debs/data.tar.gz (or where ever you keep your deb files)
I've attached a seed.tar.gz to this posting with the goods needed for ar. Debian deb's can be gotten from http://www.debian.org, make sure you download from stable and get arm files (the iLiad has an arm CPU chip.)

Once you transfer the seed.tar.gz to your iLiad you unpack it thusly.

Code:
tar xfz seed.tar.gz
mv ar /usr/bin
mv libbfd-2.15.so /usr/lib
You are then ready to start manually installing deb's.
Attached Files
File Type: gz seed.tar.gz (182.0 KB, 522 views)
scotty1024 is offline   Reply With Quote