Author Topic: Yad - Yet Another Debian  (Read 12911 times)

Locutus73

  • Newbie
  • *
  • Posts: 21
    • View Profile
Yad - Yet Another Debian
« on: August 21, 2007, 06:21:24 pm »
Hi.
Some days ago I got my brand new SL-C3200 and I started experimenting with it.
I achieved to have a dualboot config with Angstrom and EABI Debian via Altboot, with the help of the precious guide at http://inv2004.googlepages.com/z1000_debian.txt.
Essentially these are the steps I followed (as far as I can recall, probably I'll miss something... when I'll be satisfied, I'll reinstall all from scratch and I will try to document correctly all the steps)... so basically:
1) Using the rescue system I made 4 partitions: 2 gig ext 3, 2 gig ext 3,  1.8 gig fat32, 128Mb swap
2) I installed Angstrom X11 and setup fstab, usb networking, ipkg update & upgrade, etc (I'm waiting for a WiFi CF)
3) I installed debootstrap (http://http.us.debian.org/debian/pool/main/d/debootstrap/debootstrap_1.0.2_all.deb)
4) I downloaded debootstrap sources, installed Angstrom dev packages and compiled pkgdetails executable, needed by debootstrap. pkgdetails must be put in /usr/lib/debootstrap (for ease of use I attach compiled pkgdetails to this message)
5) I created a debian root filesystem on my second partition. It was mounted on /media/hdd2 so the command was debootstrap --verbose --arch armel sid /media/hdd2 http://ftp.gnuab.org/debian
6) Go for a cup of coffee
7) I copied /lib/modules, /etc/modules and /etc/modules.conf in the debian root
8) I copied /etc/network/interfaces, /etc/fstab, /etc/hostname, /etc/hosts, /etc/resolv.conf in the debian root
9) I downloaded the following packages from the Angstrom repository in debian /root directory
gpe-conf_0.2.6-r0_armv5te.ipk
ipaq-sleep_0.9-r1_armv5te.ipk
libgpewidget1_0.115-r0_armv5te.ipk
libmb1_1.9-r1_armv5te.ipk
libts-1.0-0_1.0-r16_armv5te.ipk
tslib-calibrate_1.0-r16_armv5te.ipk
tslib-conf_1.0-r16_armv5te.ipk
usb-gadget-mode_0.0.2-r0_spitz.ipk
xmonobut_0.4.1-r1_armv5te.ipk
xserver-kdrive-fbdev_1.3.0.0-r16_armv5te.ipk
zaurusd_0.0+svn20060628-r10_spitz.ipk
10) I installed altboot in Angstrom
11) In the debian root I moved /sbin/init to /sbin/init.sysvinit and made a softlink ln -s /sbin/init.sysvinit /sbin/init; same process fro /sbin/halt, /sbin/shutdown, /sbin/reboot, /bin/pidof, /usr/bin/mesg, /usr/bin/last, /usr/bin/wall
12) With the rescue system I copied the first partition /dev directory in the second partition (I'm unsure if this step is useful)
13) Rebooted with altboot and choosed 3 - 1 - 2 and we are in debian
14) Install all the ipk with dpkg -i --force-architecture name-of-ipk.ipk
15) Reboot and we should have network after ifup usb0 (or setup your cf wifi)
16) Install udev (apt-get install udev) and reboot and we should have /dev/rtc in order to have a working clock; install apm
17) ntpdate time.apple.com (I don't remeber if we have to install ntpdate), apt-get update, apt-get upgrade (actually, using debootstrap, we start with an updated system)
18) apt-get install xserver-xorg-video-fbdev xfonts-base rxvt at the xserver setup screen choose 640x480 only
10) set /etc/X11/xorg.conf: Section "Screen": DefaultDepth 16
20) add /etc/X11/xorg.conf: Section "Device": Option   "Rotate" "CW"
21) add . /etc/profile.d/tslib.sh to /etc/profile, logout and login (or reboot)
22) run ts_calibrate as root
23) install your wm (you can apt-get install xfce4, or apt-get install kde-core, or use aptitude and install whathever you want)
24) softlink /etc/X11/X to /usr/bin/Xfbdev
25) update-rc.d -f zaurusd remove, update-rc.d -f gdm remove, update-rc.d -f kdm remove,  update-rc.d ipaq-sleep defaults, update-rc.d usb-gadget defaults
26) make an user and add to audio and video groups
27) edit /etc/X11/xinit/xserverrc and add . /etc/profile.d/tslib.sh, sudo /etc/init.d/zaurusd start before exec /usr/bin/X11/X
28) in order to run sudo /etc/init.d/zaurusd start we have to install sudo and add the user to sudoers without password (as root run visudo, uncomment %sudo ALL=NOPASSWD; ALL, and add your user to sudo group)
29) edit /etc/zaurusd/hinge-landscape.d/20-matchbox-landscape and modify xrandr line at the end with xrandr -o right; edit /etc/zaurusd/hinge-portrait.d/20-matchbox-portrait and modify xrandr line at the end with xrandr -o normal
30) if you installed KDE edit .xinitrc in your home with exec startkde
31) enjoy... startxfce4 to start xfce and startx to start kde

With these steps (I forgot something for sure) I got a working debian, with 2.6.21 Angstrom kernel, and Zaurus customizations.
We have xserver-kdrive with tslibs that is lighter than xorg
We have usb gadget mode for usb networking, usb disk mode or usb host (configuration in /etc/default/usb-gadget)
We have ipaq-sleep for automatic sleep mode (configuration in /etc/ipaq-sleep.conf)
We have zaurusd package to manage screen rotation, backlight on-off on open-close lid events, etc.
We have standard debian with dualboot  

At this point I have some problem to resolve
First of all, debian eabi is not a complete debian repository, so something is tricky to achieve
At this moment I have two major problems I'd like to resolve and any help is appreciated:

1) Xrandr (and consequentely zaurusd) works correctly only with xfce; with KDE all start ok in landscape, if you rotate the screen, all go correctly in portrait mode, but, when we go back in landscape, the screen rotates, but we have a 480x640 resolution in a 640x480 screen (the kde bar is below the screen margin)
2) I can't get three button mode. Xmonobut doesn't work, but it seem that it's no its fault. If I launch xmodmap -e "pointer = 3 2 1", xev reports "MappingNotify event, serial 29, synthetic NO, window 0x0, request MappingPointer, first_keycode 0, count 0" and I allways get left button click. I tryed loading slcXXXX.xmodmap from angstrom, with no results.

The second point is essential in order to get a full working enviroment.

As soon as I'll resolve these issues, and I'll get the WiFi CF, I think I'll made a full debian install (no dualboot) with one big ext3 partition and a 256Mb swap partition.

I think the eabi repository gradually will be fully synced to debian sid and we can have a major distro, with some minor tweaks for zaurus.

Debian EABI seems to be quite fast... Konqueror is slow to load, but it's rendering engine appears to be faster than gecko (it renders pages faster than minimo)
« Last Edit: August 21, 2007, 06:22:25 pm by Locutus73 »

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3707
    • View Profile
Yad - Yet Another Debian
« Reply #1 on: August 21, 2007, 07:17:58 pm »
hmm, interesting post, suddenly the Zaurus is alive with new linux distros!
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

gojira

  • Full Member
  • ***
  • Posts: 122
    • View Profile
Yad - Yet Another Debian
« Reply #2 on: September 02, 2007, 06:49:26 am »
Quote

Nice!  I'd love to be running debian on the z (finally got it working ok on my macbook), but pocketworkstation is too clunky.  I just got my new 3200 too (the 860 is falling apart...), so please let us know how you get on!
Zaurus SL-C3200 Debian EABI / Sharp ROM (tetsu v18j), Socket CF Bluetooth (Rev E), BT747 GPS, Canon K30225 CF Wifi.  RIP: Zaurus SL-C860 Sharp ROM (1.40JP).

dlj0

  • Full Member
  • ***
  • Posts: 218
    • View Profile
Yad - Yet Another Debian
« Reply #3 on: September 07, 2007, 12:30:34 am »
I tried, but could not succeed with this.  I could neither get networking (wifi) to work, nor could I get a keyboard that would let me type a / or a :.  Without the network, and with only painfully slow access from one directory to another, it was frustrating.

I have never set up usb networking; maybe, with that, things would be better.  

So, after hunting on the net I found Titchy.  This is a kernel and basic-apps package for the 3x00 series Zaurus only.  The developer provides only the kernel, modules, basic system tweaked for the Zaurus.  The rest is pure debian.  

I went from Angstrom, where pleas for help to get tex, or wxmaxima, or icedove, or iceweasel (AKA thunderbird and firefox) went unheard.  Their kernel works well, their distribution is rather full of nonfunctional packages.

Now I have all the packages I need --- and more.  My biggest problem is too many packages -- which auto-installed when I said I wanted too much.  Gnome is not for these machines, believe me.

Also, I have the best-functioning wifi connection I have ever had with these machines.  It just works.  No, no WPA, at least not with my old card.  

The best thing is that everything works.  This comes from the idea of using a major distribution to provide packages, rather than try to maintain them wth a small group of developers.  

If, instead of fixing packages in Angstrom, the developers fixed the dpkg system (best if it could deal with packages installed under ipkg as well), then Angstrom users could have the packages they need to actually work on the machines.

Titchy has only one drawback that I can see.  It uses debian-arm and an arm kernel, rather than using armel.
Zaurus:  SL C3100
ROM:  eabi debian/sid

Dromede

  • Full Member
  • ***
  • Posts: 155
    • View Profile
    • http://
Yad - Yet Another Debian
« Reply #4 on: September 07, 2007, 09:08:44 am »
following the instructions from http://inv2004.googlepages.com/z1000_debian.txt i managed to boot  a debian rootfs found here --> http://armel.applieddata.net/developers/li...root-fs.tar.bz2. since i own a C1000, i wanted to use the internal nand for the rootfs. so i recompiled the debian 2.6.21 kernel so it would search for rootfs on nand. it boots, but i can't get usb networking to work. my ubuntu box just can't see the zaurus when i plug it in. i also don't know which modules am i supposed to load for this to work.i tried loading the g_ether module on the Z and here's what i get in dmesg:

usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
dummy_hcd dummy_hcd: USB Host+Gadget Emulator, driver 02 May 2005
dummy_hcd dummy_hcd: Dummy host controller
dummy_hcd dummy_hcd: new USB bus registered, assigned bus number 1
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
dummy_udc dummy_udc: binding gadget driver 'ether'
ether gadget: using random self ethernet address
ether gadget: using random host ethernet address
usb0: Ethernet Gadget, version: May Day 2005
usb0: using dummy_udc, OUT ep-b IN ep-a STATUS ep-c
usb0: MAC 46:4d:35:34:40:66
usb0: HOST MAC ba:a5:9c:59:a0:c6
usb0: RNDIS ready
dummy_hcd dummy_hcd: port status 0x00010101 has changes
dummy_hcd dummy_hcd: port status 0x00010101 has changes
dummy_hcd dummy_hcd: port status 0x00100503 has changes
usb 1-1: new high speed USB device using dummy_hcd and address 2
dummy_hcd dummy_hcd: port status 0x00100503 has changes
dummy_udc dummy_udc: set_address = 2
usb 1-1: rejected 2 configurations due to insufficient available bus power
usb 1-1: no configuration chosen from 2 choices
usb 1-1: 100mA is over 8mA budget for port 1!
hub 1-0:1.0: 92mA over power budget!

and on the ubuntu box when i plug the Z in i get:
usb 5-2: USB disconnect, address 25

locutus73, could you help me with this one?
« Last Edit: September 07, 2007, 09:10:57 am by Dromede »

Dromede

  • Full Member
  • ***
  • Posts: 155
    • View Profile
    • http://
Yad - Yet Another Debian
« Reply #5 on: September 07, 2007, 09:30:27 pm »
i compiled the 2.6.22 kernel and i got usb networking working. the new problem is the jffs2 filesystem. apt-get simply doesn't like it. there is a patch but i can't find the apt sources. right now i'm using a workaround to get apt-get working. it's rather clunky, but it works.

Locutus73

  • Newbie
  • *
  • Posts: 21
    • View Profile
Yad - Yet Another Debian
« Reply #6 on: September 12, 2007, 11:06:55 am »
Quote
I tried, but could not succeed with this.  I could neither get networking (wifi) to work, nor could I get a keyboard that would let me type a / or a :.  Without the network, and with only painfully slow access from one directory to another, it was frustrating.
Did you manage to make a native install or did you use altboot?
If you used altboot you should have no problems with the keyboard, otherwise you have to download and install a proper keymap
I used http://www.angstrom-distribution.org/unsta...0-r14_spitz.ipk
and added the provided /etc/init.d/keymap to rc0.d
I use wifi with no problem, I managed to edit /etc/network/interfaces copied from angstrom and connected to my network
I can even use knetworkmanager under kde

Titchy is interesting, but it is not EABI

Dromede

  • Full Member
  • ***
  • Posts: 155
    • View Profile
    • http://
Yad - Yet Another Debian
« Reply #7 on: September 12, 2007, 02:18:09 pm »
you use kde? is it really usable?

dlj0

  • Full Member
  • ***
  • Posts: 218
    • View Profile
Yad - Yet Another Debian
« Reply #8 on: September 17, 2007, 10:14:21 pm »
Quote
Quote
I tried, but could not succeed with this.  I could neither get networking (wifi) to work, nor could I get a keyboard that would let me type a / or a :.  Without the network, and with only painfully slow access from one directory to another, it was frustrating.
Did you manage to make a native install or did you use altboot?
If you used altboot you should have no problems with the keyboard, otherwise you have to download and install a proper keymap
I used http://www.angstrom-distribution.org/unsta...0-r14_spitz.ipk
and added the provided /etc/init.d/keymap to rc0.d
I use wifi with no problem, I managed to edit /etc/network/interfaces copied from angstrom and connected to my network
I can even use knetworkmanager under kde

Titchy is interesting, but it is not EABI
[div align=\"right\"][a href=\"index.php?act=findpost&pid=167328\"][{POST_SNAPBACK}][/a][/div]

I tried altboot, but still had trouble with the keyboard and networking.  Did you use wifi during an install?  Since I had not ever configured usb networking, that was my standard, and I could not get wifi networking, nor wired networking, to, um, work.  With the two problems, no keyboard and no net, I did give up and went to titchy.  Yes, it is not eabi.  I don't know how much of a penalty I pay for that, but I need to get this thing working well enough to be my only machine while on sabbatical in Spain, and titchy has made that possible, so I am happy for now.
Zaurus:  SL C3100
ROM:  eabi debian/sid

ZDevil

  • Hero Member
  • *****
  • Posts: 1998
    • View Profile
    • http://
Yad - Yet Another Debian
« Reply #9 on: September 24, 2007, 06:51:14 pm »
Looking forward to the solution to networking.

If this works then EABI will be even better because of the speed improvement over ARM Debian.  
Even though there are not as ready made program packages available in the EABI feeds (despite their huge number of SUBpackages) as in the ARM feeds, there are (cross)toolchains which are stated to be working!  http://www.codesourcery.com/gnu_toolchains/arm/download.html
« Last Edit: September 24, 2007, 07:17:28 pm by ZDevil »

Life is too precious for hacking *too much*
Visit my Z screencap gallery[/color]
My EeePC 701 Black = Debian (Lenny) on IceRocks + Transcend SDHC Class6 8GB + 2GB RAM
My Zaurus SL-C3200 = Debian EABI (kernel 2.6.24.3-yonggun) on a swapped internal Sandisk Extreme III CF 16gb
My Debian EABI feed: http://matrixmen.free.fr/zaurus/debian/
My OpenBSD/Zaurus feeds:  Link1, Link2
[/i][/font][/color][/size]