1-For Debian EABI

From OESF

Revision as of 01:50, 1 May 2008 by Dkm (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

Most tips come from OESF forums


1. /etc/apt/sources.list

The armel port is now available from the normal Debian mirrors (you can see the full list at http://www.debian.org/mirror/list-full). An example using a mirror in Germany:

# official
deb http://ftp.de.debian.org/debian unstable main contrib non-free
# old sources
#deb http://ftp.debian-ports.org/debian unstable main
#deb http://ftp.debian-ports.org/debian unreleased main
#if wanted : deb http://ftp.debian-ports.org/debian experimental main

add this line if you want latest packages from oesf :

deb http://matrixmen.free.fr/zaurus/debian sid main contrib non-free

2. Use your normal user under X

apt-get install xdm
cd /usr/bin
mv X X.OLD
ln -s Xfbdev X
chmod 2755 Xfbdev

customize these files :

in /etc/ts.conf, comment all "module_raw" lines : (Do not do this in clamshell models - or the pointer will move at right angles to the input)

#module_raw corgi
...

in /etc/X11/xdm/Xresources , add this line:

xlogin*geometry: 520x400+60+40

in /etc/X11/xdm/Xsetup , add this line:

xrandr -o right

and, if you want :

Esetroot ~/cool_pix.jpg

in /etc/X11/xdm/Xsession :

export TSLIB_TSDEVICE=/dev/input/event1
(or /dev/input/touchscreen0)

in /etc/X11/xdm/Xservers , replace last line with :

:0 local /usr/bin/X :0 vt7 -dpi 100 -nolisten tcp -fp /usr/share/fonts/X11/misc

then, you can launch xdm, and log into X as $USER:

/etc/init.d/xdm start

Note: this tip seems to destroy the key binding for the menu and mice buttons in icewm


3. Have a good time :)

choose your time zone:

dpkg-reconfigure tzdata
 

install ntpdate:

apt-get install ntpdate

get the time:

ntpdate -s ntp.univ-lyon1.fr


4. Usb Networking Between a Z and a Linux host.

usb-gadget start

The first step would be to configure the device usb0 in /etc/network/interfaces on your Z.

# Ethernet/RNDIS gadget (g_ether)
# ... or on host side, usbnet and random hwaddr
iface usb0 inet static
address 192.168.129.10
netmask 255.255.255.0
network 192.168.129.0
gateway 192.168.129.1

usb-gadget already pre-configures usb0 for you, so you can just use the defaults here.

The next step is to configure usb0 on your PC. Again, this is done in /etc/network/interfaces:

iface usb0 inet static
address 192.168.129.1
pointopoint 192.168.129.10
netmask 255.255.255.0
network 192.168.129.0
broadcast 192.168.129.255

The IP of your Zaurus has been set to 192.168.129.10, the IP of your PC (for the USB network only!) has been set to 192.168.129.1.

Run ifup usb0 on both your Zaurus and the PC to bring up the devices. At this point your Zaurus should be able to ping your PC:

# ping 192.168.129.1
PING 192.168.129.1 (192.168.129.1): 56 data bytes
64 bytes from 192.168.129.1: icmp_seq=0 ttl=64 time=1.3 ms
64 bytes from 192.168.129.1: icmp_seq=1 ttl=64 time=4.1 ms

To allow your Z to connect to the other machines in your local network (LAN), you have to enable IP forwarding on the machine connected to your Z:

echo 1 > /proc/sys/net/ipv4/ip_forward

and use NAT on outgoing connections:

iptables -t nat -A POSTROUTING -s 192.168.129.0/24 -j MASQUERADE


5. backlight under normal user

(mostly inspired from cortez' post : http://www.oesf.org/forum/index.php?showtopic=24888 )

personnaly, i add my normal user to the group "adm", in order to be able to see logs... if you don't want, you may create a group "wheel" or else... and adapt what follows.

under user ROOT

adduser $USER adm

echo -ne "#!/bin/sh\n\n chgrp adm /sys/class/backlight/corgi-bl/brightness \n chmod 664 /sys/class/backlight/corgi-bl/brightness" >> /etc/rc.local

(download it at : http://franck.kernlog.net/informatique/zaurus/sh/brightness.sh or here is the code) :

under your normal user :

vi ~/bin/brightness
#!/bin/sh
STEP=5
MIN=1
SYSBACKLIGHT="/sys/class/backlight"
DRIVER="$(ls $SYSBACKLIGHT | head -n 1)"
BRIGHTNESS_FILE="$SYSBACKLIGHT/$DRIVER/brightness"
ACTUAL_BRIGHTNESS="$SYSBACKLIGHT/$DRIVER/actual_brightness"
MAX_BRIGHTNESS="$SYSBACKLIGHT/$DRIVER/max_brightness"
if [ ! -n "$1" ] ; then

echo "max / current" echo "$(cat $MAX_BRIGHTNESS) / $(cat $ACTUAL_BRIGHTNESS)"

fi
case $1 in
       up)
       let CURRENT_BRIGHTNESS=$(cat $ACTUAL_BRIGHTNESS)+$STEP
       echo $CURRENT_BRIGHTNESS > $BRIGHTNESS_FILE
       ;;
       down)
       let CURRENT_BRIGHTNESS=$(cat $ACTUAL_BRIGHTNESS)-$STEP
       echo $CURRENT_BRIGHTNESS > $BRIGHTNESS_FILE
       ;;
       max)
       let CURRENT_BRIGHTNESS=47
       echo $CURRENT_BRIGHTNESS > $BRIGHTNESS_FILE
       ;;
       min)
       let CURRENT_BRIGHTNESS=1
       echo $CURRENT_BRIGHTNESS > $BRIGHTNESS_FILE
       ;;
       0)
       let CURRENT_BRIGHTNESS=0
       echo $CURRENT_BRIGHTNESS > $BRIGHTNESS_FILE
       ;;
       *)
       echo -e "\nUsage :\n$(basename $0) [up | down | max | min | 0}\n"
esac


EOF

then, chmod 755 ~/bin/brightness.sh
and then, if it isn't done, in your ~/.bashrc, add this line :
if [ -d ~/bin] ; then
   PATH=~/bin:"${PATH}"
fi
after logout-login... :
BE CAREFULL with : brightness.sh 0  !!!!
before playing with it, you should :
sudo apt-get install xbindkeys xbindkeys-config
xbindkeys --defaults >> .xbindkeysrc
xbindkeys-config
herein, i "aliased" :   
   Fn-1 : brightness.sh 0
   Fn-2 : brightness.sh min
   Fn-3 : brightness.sh down
   Fn-4 : brightness.sh up
   Fn-5 : brightness.sh max
do as you want...

PS: the brightness.sh script can also be downloaded here : http://matrixmen.free.fr/zaurus/debian/files/brightness.sh


6. After apt-get (dist-)upgrade

Things to double-check before rebooting :

- touchscreen settings (ts.conf, permission of /dev/input/event1)

- window manager

in /etc/alternatives
ln -s /usr/bin/icewm-session x-session-manager

- keyboard under X

before update:
 xmodmap -pke >> keymap-debian-X
after update:
 xmodmap keymap-debian-X

- if using xdm and you want to login as $USER :

#!/bin/sh
cd /usr/bin
if [ ! -L X ] ; then
 mv X X.OLD
 ln -s Xfbdev X
 chmod 2755 Xfbdev
fi


7. Localisation

apt-get install locales
dpkg-reconfigure locales   
(and choose your locales, and defaults locales there)

You may add in your ~/.profile :

export LC_ALL=fr_FR.UFT8

Logout, login, that's it !


8. closing lid setup

all stuff pass in 4 files : you'd better kick them out, recreate it with :

1) /etc/zaurusd/hinge-close.d/00-backlight-off

             #!/bin/sh
             echo 0 > /sys/class/backlight/corgi-bl/brightness


2) /etc/zaurusd/hinge-landscape.d/00-backlight-on + /etc/zaurusd/hinge-portrait/00-backlight-on

             #!/bin/sh
             echo 35 > /sys/class/backlight/corgi-bl/brightness


3) /etc/zaurusd/hinge-landscape.d/20-matchbox-landscape

             #!/bin/sh
             if [ -x /usr/bin/xrandr ] ; then
                     xrandr -o right
             fi

4) /etc/zaurusd/hinge-portrait.d/20-matchbox-portrait

             #!/bin/sh
             if [ -x /usr/bin/xrandr ] ; then
                     xrandr -o normal
             fi 

of course, for the right now moment, the portrait-landscape won't work... but backlight yes. you could also use my "brightness.sh" (http://franck.kernlog.net/informatique/zaurus/sh/brightness.sh, developped on paragraph 5 above) in the files 00-backlight-o{n,ff} and put :

  /PATH/to/brightness.sh 0    PATH/to/brightness.sh up    (for example... do as you want of course ! )

or you can "play" with "apm" to suspend/resume the zaurus... depends on your need...


9. Change speed of rate of key

xset r rate 1000

adjust the value with preferred setting.


10. Calibrate the touch screen

ts_calibrate

touch the crosshairs and away you go!

also if your pointer jitters a lot

rmmod mousedev


seems to help a bit

11. Get flash player working

very simple really

apt-get install konqueror konqueror-plugin-gnash

takes quite a while to load flash animations but works fine

Click to get back to Debian main page Debian/Zaurus

Personal tools