Debian-old

From Internet Tablet Talk

Contents

How I put Debian on my N800

How I did it (Obsolete):

Not only is this old and busted, it doesn't even reflect the way things work in the newest release! However, it might give people ideas for how to get Debian on other devices so I'm going to leave this up. Just grab the tarball from Debian unless you're a real masochist!

  1. Setup boot from SD and verify that it works
  2. Paritioned an SD card with one big partition and formatted it to ext3
  3. On my x86 ubuntu machine I put my ext3 formatted I ran:
    debootstrap --verbose --arch armel --foreign sid /media/disk/ http://ftp.debian-ports.org/debian ; umount /media/disk
  4. I booted my tablet off of internal flash, put that same SD card in the internal slot and ran:
    chroot /media/mmc2 /debootstrap/debootstrap --second-stage
  5. Copy utelnetd (from fanoush's modified initfs) and g_ether.ko to to someplace on your SD card
  6. Apply an ugly hack to the Debian boot scripts to make sure that usb networking comes up and we have a way to login. I put this at the beginning of /etc/init.d/glibc.sh to make sure it ran early:
    /sbin/insmod /root/modules/g_ether.ko ; /sbin/ifconfig usb0 192.168.2.2 ; /usr/sbin/utelnetd -d -l /bin/bash
    BTW, if you didn't figure it out this is outrageously insecure. Anyone who can ping your tablet, can now get a root shell.
  7. The screen remains white with the words "now booting int-sd..."
  8. Plug your tablet into your computer via USB and hopefully your PC will bring up the usb0 interface on it's own. Run:
    ifconfig usb0 192.168.2.1
  9. Now you should be ready to telnet into Debian on your tablet for the first time!
    telnet 192.168.2.2
  10. With any luck you'll get logged in and be sitting at a root prompt. If this doesn't work try adding some basic debugging to the debian init scripts. Root is mounted RW from the second Debian's init gets called by fanoush's initfs so you can write anywhere you want on the SD card and look at it later.

Bonus Stuff

The rest is just bonus stuff: You can do whatever you want from here! But after I was logged in, here's what I did: rm /var/run && mkdir /var/run (it was a dangling symlink, need to fix this every boot, TODO)

Inet over usbnet

First I got my tablet access to the internet over usbnet. I just used the script from here:
http://tldp.org/HOWTO/IP-Masquerade-HOWTO/firewall-examples.html#RC.FIREWALL-IPTABLES . Then I ran: route add default gw 192.168.2.1 on the tablet. Make sure you set nameservers in /etc/resolv.conf !

Basic cleanup/setup
  1. Next, I installed udev and rebooted. Then I did:
    mkdir /mnt/nand && mount -t jffs2 -o ro /dev/mtdblock4 /mnt/nand . That gives you access to the internal 256MB of flash and all your stuff from ITOS.
  2. I installed dpkg-repack. This will let you repackage software from ITOS if you want.
X11
  1. I made myself a package of the Xomap server:
    dpkg-repack --root=/mnt/nand xserver-xomap
  2. Next I faked one of the depends the server has and installed it:
    apt-get install equivs && equivs-control tslib && equivs-build tslib && dpkg -i tslib*deb && dpkg -i xserver-xomap*deb && apt-get -f install
  3. If it doesn't start automatically, then run
    /etc/init.d/x-server start
    You probably won't see any difference in your screen. But try installing x11-apps and run xeyes. Tap the screen! Does your touchscreen work?
Wireless
  1. How about wireless? Grab a patch here (This may work for the 770 as well as the N800/N810!):
    https://garage.maemo.org/pipermail/cx3110x-devel/2007-November/000005.html
  2. Grab the source inside scratchbox:
    apt-get build-dep cx3110x-module-src && apt-get -b source cx3110x-module-src ; dpkg -i cx3110x-module-src_2.0.15-1_all.deb
  3. Apply the patch you grabbed, build the source, grab the cx3110x.ko from the src dir and put it on your tablet. It won't load unless the firmware is accessible so:
    cp -r /mnt/nand/usr/lib/hotplug/firmware/* /usr/lib/hotplug/firmware/
    Now rmmod the old module, insmod the new one, install wpasupplicant and see if you can get connected. (I don't know why but when I loaded the module the second time it showed up as wlan1 instead of wlan0. YMMV) Check /usr/share/doc/wpasupplicant for help with the right settings for your /etc/network/interfaces. For normal WPA-PSK mine looks like this (/etc/network/interfaces):
auto wlan0
iface wlan0 inet dhcp
       wpa-ssid mynetwork
       wpa-psk mypassword

All times are GMT -4. The time now is 03:02 AM.