Utilisateur:FreedomSound
De openmoko-fr.
Sommaire |
CONFIGURER
Creation d'un swap
On peut facilement rajouter du swap en utilisant un fichier (à la windows) sur la carte microsd (qu'on va appeler swapfile ici), pas besoin de jouer avec les partitions :
créer un fichier vide avec dd (ici de 128mo) :
dd if=/dev/zero of=/path/to/swapfile bs=1M count=128
préparer le swap :
mkswap /path/to/swapfile
l'activer :
swapon /path/to/swapfile
Ça y est, vous pouvez faire vos updates tranquillement.
Si vous voulez que ça persiste, faut soit refaire le swapon swapfile à chaque boot, soit le rajouter dans le fstab :
/path/to/swapfile swap swap defaults 0 0
MATERIEL
Carte µSD 8Go KingSton : http://www.amazon.fr/gp/product/B001CQT0X4
Batterie Nokia compatible : http://www.amazon.fr/Batterie-lithium-li-ion-compatible-%C3%A9quivalent/dp/B001KWE3I2/ref=sr_1_11?ie=UTF8&s=electronics&qid=1234269469&sr=8-11
PROJET SERVEUR DE DONNEES SOUS DEBIAN
LE WIFI
à rajouter dans /etc/network/interfaces :
auto eth0 iface eth0 inet manual wpa-driver wext wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf iface front_home inet dhcp iface back_home inet dhcp iface default inet dhcp
à rajouter dans /etc/wpa_supplicant/wpa_supplicant.conf :
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
eapol_version=1
ap_scan=1
fast_reauth=1
network={
ssid="SSID DU RESEAU 1"
psk=LECODEPSKENHEXADECIMAL
id_str="front_home"
}
network={
ssid="SSID DU RESEAU 2"
psk=LECODEPSKENHEXADECIMAL
id_str="back_home"
}
Création d'un script /etc/init.d/wifi :
#!/bin/sh
### BEGIN INIT INFO
# Provides: wifi
# Required-Start: $remote_fs dbus frameworkd
# Required-Stop: $remote_fs dbus frameworkd
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Starts the wifi connection
# Description: This init script starts & configures the wifi connection
# for systems running the fso-frameworkd server.
### END INIT INFO
case "$1" in
start|"")
echo "Activation du Wifi"
mdbus -s org.freesmartphone.odeviced /org/freesmartphone/Device/PowerControl/WiFi org.freesmartphone.Resource.Enable
echo "activite du wifi : `mdbus -s org.freesmartphone.odeviced /org/freesmartphone/Device/PowerControl/WiFi org.freesmartphone.Device.PowerControl.GetPower`"
ifup eth0
;;
stop)
echo "Demontage de l'interface"
mdbus -s org.freesmartphone.odeviced /org/freesmartphone/Device/PowerControl/WiFi org.freesmartphone.Resource.Disable
echo "activite du wifi : `mdbus -s org.freesmartphone.odeviced /org/freesmartphone/Device/PowerControl/WiFi org.freesmartphone.Device.PowerControl.GetPower`"
wpa_action eth0 down
;;
*)
echo "Usage: wifi [start|stop]" >&2
exit 3
;;
esac
Le rendre connu des processus d'init :
update-rc.d wifi defaults 03
Soucis.. Je n'ai pas l'interface wifi de montée au démarrage... à creuser
L'HOTE USB et le PARTAGE NFS
Installer un serveur nfs :
apt-get install nfs-common nfs-kernel-server
Le configurer : http://www.lininfo.org/spip.php?article13
Ensuite, ajouter un disque dans fstab qui sera monter dans /media/disk. Dans mon cas, un disque avec une unique partition en FAT32. J'ai rencontré quelques petits soucis à l'écriture sur ce disque avec nfs.. du coup je vous donne ma ligne de FSTAB :
UUID=XXXX-YYYY /media/disk vfat defaults,rw,uid=1000,umask=000,iocharset=utf8 0 0
Activer l'usb en mode hôte, créer le script /etc/init.d/usbhost :
#!/bin/sh
### BEGIN INIT INFO
# Provides: usbhost
# Required-Start: $remote_fs dbus frameworkd udev
# Required-Stop: $remote_fs dbus frameworkd udev
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Starts the usb host mode
# Description: This init script starts & configures the usb hostmode
# for systems running the fso-frameworkd server.
### END INIT INFO
case "$1" in
start|"")
grep -q 'host' /sys/devices/platform/s3c-ohci/usb_mode
if [ $? -eq 0 ]
then
echo "Le mode Hote USB est deja actif"
exit 3
else
ifconfig usb0 down
echo host > /sys/devices/platform/s3c-ohci/usb_mode
lsusb
wait 10
mount /media/disk
wait 10
/etc/init.d/nfs-kernel-server restart
echo "Le mode Hote USB est maintenant actif."
fi
;;
stop)
grep -q 'host' /sys/devices/platform/s3c-ohci/usb_mode
if [ $? -eq 0 ]
then
/etc/init.d/nfs-kernel-server stop
wait 10
umount /media/disk
wait 10
echo device > /sys/devices/platform/s3c-ohci/usb_mode
ifconfig usb0 up
echo "Le mode Hote USB est maintenant inactif."
else
echo "Le mode Hote USB est deja inactif."
exit 3
fi
;;
*)
echo "Usage: usbhost [start|stop]" >&2
exit 3
;;
esac
Le rendre connu des processus d'init :
update-rc.d hostusb defaults 04
Pas encore essayé

