View previous topic :: View next topic |
Author |
Message |
feffi Apprentice


Joined: 29 Mar 2003 Posts: 216 Location: Sol->Earth->Germany->Giessen
|
Posted: Thu Jan 29, 2004 4:50 pm Post subject: Gentoo Acer 803LCi support thread (manual section) |
|
|
Acer Travelmate 803 LCi Support Thread (manual section)
This Manual Thread is out of date, it's only intented to give a hint, where to move on. For the actual maintained manual move on to the Gentoo Wiki
If you wish to participate in the discussion around this thread just go ahead and use this thread Gentoo Acer 803 LCi Discussion threador the Gentoo Wiki directly[/i]
We are proud to be listed on TuxMobil
Table of contents
- Updates
- About this Howto
- Important things to know about the ACER Travelmate 803 LCi
Specifications of the ACER Travelmate 803 LCi
General Handling
Battery Uptime
Falling down & Scratches
Output of 'lspci'
- Compiler Flags
Design of the Pentium-M
CFLAGS
USE-Variables
- Important Must-Have-Software
- GEP (Gentoo Emerge.log Parser)
Compile times for different applications
- ACPI
General ACPI
ACPI Event Handling
Enhanced Speedstepping
Software suspending w/wo XFree
Hardware Sensors
- Harddrive & 'hdparm' Optimization
- Networking LAN
Broadcom 4400
- Networking Tools
SSH-Agent and Keychain
tcpdump
mtr
iptraf
tethereal
nessus
Backup and distribution solutions
- Networking WLAN
ipw2100
ndiswrapper
Exchanging the Intel Mini-PCI with a Dell Truemobile 1150
- Wireless Tools
Kismet
Wellenreiter
Airsnort
IPSEC & VPN
- Internal modem
- IRDA support
Siemens mobile phones
- PCMCIA
- Special Laptop-Keys aka FN-Keys
Windows Keys
System Help
ACPI Standy/Sleep
Video Out
External Display
Touchpad Activator
Mute Sound
Display Bightness
Volume FN-Keys
Volume Keys and XFree OSD
Other FN-Keys
Hints
- Acer Launchkeys & AcerHK
Installing
Testing & Mapping
Scripts
- Graphics
ATI Radeon 9000 Mobility & XFree
Alternate ATI Radeon 9000 Mobility Installation & MTRR fix
Console Framebuffer
TV-Out
Beamer & external devices
- Sound
Sound recording
- Universal Serial Bus (USB)
General Hotplug
General USB
USB-Mouse
USB-Mouse and XFree support
USB Tools
RootPlug
USB-Memory-Stick
User Authentification via pam_usb
- Synaptics Touchpad
- Firewire IEEE 1394
- Styleguide
Exchanging XFree Cursors
Bootsplash
Qingy
LILO Graphical Menu
- Link Graveyard
- Missing Items & later additions
Updates
23.07.2004 Added Networking Tools - SSH-Agent and Keychain
10.07.2004 Review of the Networking section
10.07.2004 Added Networking LAN
10.07.2004 Added Networking LAN - Broadcom 4400
10.07.2004 Added Networking WLAN
10.07.2004 Added Networking WLAN - ipw2100
10.07.2004 Added Acer Launchkeys & AcerHK (THX to pjv)
10.07.2004 Added Internal Modem (THX to pjv)
01.07.2004 Rewrote TOC
12.03.2004 Added 'Volume Keys and XFree OSD' (really nice)
12.03.2004 Added 'Alternate ATI Radeon 9000 Mobility Installation & MTRR fix'
24.02.2004 Added 'Compile times for different applications'
24.02.2004 Added 'Email LED' to section 17. Styleguide
24.02.2004 Added 'User Authentication via pam_usb to section 13. Universal Serial Bus
13.02.2004 Added my important configs to the Link Graveyard
13.02.2004 Added EXTENSIVE Report on Hardware to section 3
05.02.2004 Added pictures to Networking - Exchanging the Intel Mini-PCI with a Dell Truemobile 1150
05.02.2004 Quingy and Bootsplash resolution change to 1400x1050
29.01.2004 LILO Graphical Menu
29.01.2004 Qingy
About this Howto
Reference:
Gentoo Installation Documents
Gentoo Forum
This Howto is intended to provide a usefull overview and installation & configuration guide for Gentoo-Linux on a ACER Travelmate 80x/2xx/. This Howto doesn't cover the ultimate truth, it's merely a compilation of work-reports, own testing, redoing of other howtos always with focus on an optimal stability and relyability on an ACER Travelmate 803 LCi. This howto doesn't cover the basic installation process of the Gentoo Linux distribution as this is exaustively covered by the Gentoo Installation Documents. The Howto is structured upon the inside-out-concept. All sections are optimized for work progress optimization (e.g hdparm before software-installation). So if you do this tutorial from beginning to end, the result should be a optimized stable and working Gentoo-Linux on your ACER-Travelmate 803 LCi. Also this howto is based on kernel 2.6. In special I would like to thank all those geeks in the Gentoo Forums for their help, suggestions, hints, tips, tricks and corrections for this tutorial as it would not be in this form without their help. Thank you !
Code: |
for $user in
(
smiler.se, ScubaStreb, treehugger, mrblade, kwaakie, svmaris, Baron FrostFire,
Fladnag, corey_s, tuxlover, miju, swell, fredrin, federico, |T5|, pjv, thepi
)
do
echo 'thanx to ${user}'
done
|
Important things to know about the ACER Travelmate 803 LCi
Reference:
Acer Worldwide
Toms Hardware Guide
Specifications of the ACER Travelmate 803 LCi
CPU: Intel Pentium-M 1600 MHz
Memory: 512 MB DDR-RAM
Graphics: ATI Radeon 9000 Mobility (64 MB) with VGA-Out / S-Video-Out
Harddrive: 40 GB
Optical-Drive: DVD/CD-RW-Combo (6x-24x/10x/24x) in MediaBay
Soundcard: Intel AC'97 Sound-on-Board
PCMCIA: Standard (i82365)
O2Micro Smartcardreader
Network: Broadcom Corporation BCM4401 10/100Base-T
Wireless-LAN: Intel Corp. PRO/Wireless LAN 2100 3B Mini PCI Adapter
Internal Modem: Intel AC97 Modem-on-Board
Ports: Parallel Port (Standard)
FastInfraRed (F-IR)
USB (4x USB2.0 / EHCI / OHCI / UHCI)
FireWire Texas Instruments TSB43AB21 (iLink/IEEE1394)
General Handling
Although the Travelmate 803LCi looks relatively slim (overall height 34 mm) due to its 15.1" display, it is by no means small (area 333 x 284 mm). With 1400 x 1050 pixels, the display offers SXGA+-resolution. Perhaps the most conspicuous feature of the Travelmate (TM) 803LCi is the curved keyboard. The corresponding switches for enabling and disabling the WLAN, Bluetooth and IRDA modules are located on the front of the device. The combo drive is integrated on the right-hand side in the media bay. Anyone who does not require an optical drive while out and about can save himself around 100 grams in weight by using the supplied Weight Saver module. By way of an option, Acer offers an additional battery for this slot.
The rear side incorporates the ports for the modem, Ethernet, I/O port replicator, printer and VGA, in addition to the S-Video output. Acer has not fitted a flap to protect the ports from dust. The hard disk drive, RAM and WLAN modules are easily accessible via flaps on the underside, which greatly facilitates upgrading. Anyone thinking about upgrading his 800 series with more than 512 MB RAM will be disappointed. The only "free" RAM slot is already occupied by a 256-MB module. As such, users are left with only the (expensive) upgrade option of adding an additional 512-MB module to 768 MB max.
From a purely statistical perspective, only one in ten people are left-handed writers. A mere two percent of all people are ambidextrous, and the majority of those left over are clearly right-handed. Despite this, Acer has integrated the USB and audio ports as well as the PC card slot on the left-hand side. Left-handed users will be delighted, although the odd one or two right-handed users might find this annoying. The PC card slot is positioned between the audio jacks and the USB ports. Beneath the slot, you will find a smartcard reader, which provides the device's security functions.
Battery Uptime
From my own experience I can give you two settings on this section: First section is Gentoo-Linux with minimal usage of disc and processor. Due to the use of 'speedfreq' and the complete powerdown of all unneccesary devices (e.g. LAN/WLAN) my longest uptime with this layout is about 6 hours of writing this tutorial.
Second section is Gentoo-Linux with full blown usage of both CPU and disc. With this layout you'll get a runtime of about 2 hours compiling XFree and GCC over and over again.
Falling down & Scratches
From my own hard experience I had to take the bitter pill of frustration when a friend of mine dropped my laptop from about 1 meter right on the floor. I think it hit on the lower right edge. As far as I know nothing bad happened to my hardware. Not even my display or harddrive. Another bad thing is letting a full blown desktop computer drop on your lid-open laptop. It hit my laptop right above the 'P1' key at the angle of the lid. I now have a little (1mm) scratch there, but despite that AGAIN nothing happened.
Output of 'lspci'
Code: |
bash$ lspci
00:00.0 Host bridge: Intel Corp. 82855PM Processor to I/O Controller (rev 03)
00:01.0 PCI bridge: Intel Corp. 82855PM Processor to AGP Controller (rev 03)
00:1d.0 USB Controller: Intel Corp. 82801DB USB (Hub #1) (rev 03)
00:1d.1 USB Controller: Intel Corp. 82801DB USB (Hub #2) (rev 03)
00:1d.2 USB Controller: Intel Corp. 82801DB USB (Hub #3) (rev 03)
00:1d.7 USB Controller: Intel Corp. 82801DB USB2 (rev 03)
00:1e.0 PCI bridge: Intel Corp. 82801BAM/CAM PCI Bridge (rev 83)
00:1f.0 ISA bridge: Intel Corp. 82801DBM LPC Interface Controller (rev 03)
00:1f.1 IDE interface: Intel Corp. 82801DBM Ultra ATA Storage Controller (rev 03)
00:1f.3 SMBus: Intel Corp. 82801DB/DBM SMBus Controller (rev 03)
00:1f.5 Multimedia audio controller: Intel Corp. 82801DB AC'97 Audio Controller (rev 03)
00:1f.6 Modem: Intel Corp. 82801DB AC'97 Modem Controller (rev 03)
01:00.0 VGA compatible controller: ATI Technologies Inc Radeon R250 Lf [Radeon Mobility 9000 M9] (rev 01)
02:02.0 Ethernet controller: Broadcom Corporation BCM4401 100Base-T (rev 01)
02:04.0 Network controller: Intel Corp. PRO/Wireless LAN 2100 3B Mini PCI Adapter (rev 04)
02:06.0 CardBus bridge: O2 Micro, Inc.: Unknown device 7114 (rev 20)
02:06.1 CardBus bridge: O2 Micro, Inc.: Unknown device 7114 (rev 20)
02:06.2 System peripheral: O2 Micro, Inc.: Unknown device 7110
02:07.0 FireWire (IEEE 1394): Texas Instruments TSB43AB21 IEEE-1394a-2000 Controller (PHY/Link)
|
There is also a really exhaustive hardware report in a seperate html file I made. Maybe this is helpfull to someone? Maybe more tricks? Be aware that this file's size is 280kb, so be patient: Extensive Hardware report
Compiler Flags
Reference:
GCC Documetation
CFLAGS Thread Gentoo Forum
USE-Flags Gentoo-Howto
USE-Flags Description
The experimental Freehackers
Design of the Pentium-M
As this section is the most essential for all packages that will be installed afterwards, it will be the first I would like to introduce. The internal layout of the Acer 803 is based upon the Centrino technology introduced by Intel. The Centrino package consist of two parts: The new Pentium-M processor and the Intel Wireless Network Adapter. Despite all rumors about the Pentium-M, often mistaken as an Pentium 4 Mobile (or Pentium 4-M) this processor is a new designed Pentium III. I know that several geeks are now starting to cry, but if you look at the stepping information of this processor you'll get an Pentium II family, not the Pentium 4. Although the Pentium-M is not an Pentium 4, it has several improvements above the Pentium III. The compilerflags for GCC below are not the optimal as the GCC team has currently no working optimization setting especialy for the Pentium-M. Those flags only represent a hybrid set of optimizations. Also there are settings for the Pentium-M based upon the Pentium 4 layout that I maybe point out later.
CFLAGS
The CFLAGS option is set in the '/etc/make.conf' file where all your global optimzations and variables reside. My currently working set of CFLAGS are as below:
Code: |
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium3 -pipe -O2 -fomit-frame-pointer -fforce-addr -frename-registers -fprefetch-loop-arrays -falign-functions=64"
CXXFLAGS="${CFLAGS}"
|
Be aware that the 'march=??' breaks compatability to other systems but enables a little more performance. For all other options despite the '-falign-functions=64' please look up the GCC Reference for further details. The '-falign-functions' option in detail aligns all system calls an funtions in orders of 64 byte, wich is exactly the size of the Pentium-M instruction pipe.
USE-Variables
The USE variables tell all packages you install on your system which extra components or interfaces to include. A usefull set of USE flags CAN be the following.
Code: |
USE="acpi alsa avi cups curl dga doc dvd encode ethereal fbcon freetds gb gd gif gphoto2 gpm gtk2 imap innodb jpeg junit kerberos lcms lirc maildir mmx mozilla mpeg mpi mysql oggvorbis opengl pam pcmcia plotutils png pnp ppds quicktime samba sasl scanner sdl slp snmp socks5 sse ssl tcltk tiff trusted usb vmf wmf X x86 xinerama xml zlib -apm -arm -arts -alpha -berkdb -hppa -java -kde -mips -slang -sparc"
|
Keep in mind that the flags above should be in ONE line. Also these flags heavily depend on the purpose your system is intended for. This is not the ultimate truth but a hint to start from.
Important Must-Have-Software
Before we go on I would recommend to install to most essential software. These tools are used in the sections ahead. If you don't want to install all the tools one-shot, each section has a requirement pointed out at the beginning. For all those who want to go through the complete tutorial, fire up a console as root and start the emerge below:
Code: |
bash$ emerge sys-apps/acpid sys-apps/speedfreq sys-apps/hdparm net-misc/dhcpcd net-wireless/wireless-tools
media-sound/setmixer media-gfx/bootsplash media-video/ati-drivers sys-apps/hotplug app-admin/usbview
|
Compile times on different applications
So I've finaly gathered some compilation times for the Acer Travelmate 803 LCi.
Code: |
real user sys
bootstrap -f 17m13s 14m12s 0m02s
Kernel 2.4
Kernel 2.6 9m16s 8m01s 0m36s
XFree
KDE 3.2
Gnome
|
ACPI
Requirement:
sys-apps/acpid
sys-apps/speedfreq
General ACPI
The integration of ACPI is fully supported and working. The ACPI support can be enabled in kernel 2.6 by activating the following config:
Code: |
Power management options (ACPI, APM) --->
[*] Power Management support
[*] Software Suspend (EXPERIMENTAL)
[*] Suspend-to-Disk Support
(/dev/hda1) Default resume partition
ACPI (Advanced Configuration and Power Interface) Support --->
[*] ACPI Support
[*] Sleep States (EXPERIMENTAL)
<*> AC Adapter
<*> Battery
<*> Button
<*> Fan
<*> Processor
<*> Thermal Zone
CPU Frequency scaling --->
[*] CPU Frequency scaling
Default CPUFreq governor (performance) --->
<*> 'userspace' governor for userspace frequency scaling
[*] /proc/sys/cpu/ interface (2.4. / OLD)
<*> CPU frequency table helpers
<*> Intel Enhanced SpeedStep
|
This will enable all needed modules for the forthcoming sections in this tutorial. As the configuration of the ACPI implementation also mostly applies to other systems, this can be used by many different layouts of laptops. On kernel 2.6 you'll get the new '/sys' interface which can be used with the sys-apps/speedfreq package. If you're having trouble accessing the 'sys-interface', simply do the following:
Code: |
bash$ cd /
bash$ mkdir sys
|
to get it working correctly. Sometimes just the directory is not created or missing.
ACPI Event Handling
The acpid daemon by default has it's scripts and settings stored in '/etc/acpi/'. The default events like pressing the power-button and closing the lid are defined in '/etc/acpi/events/default'
Code: |
bash$ vi /etc/acpi/events/default
event=button power.*
action=/sbin/init 0
# Optionally you can specify the placeholder %e. It will pass
# through the whole kernel event message to the program you've
# specified.
event=.*
action=/etc/acpi/default.sh %e
|
Now let's install 'acpid' to your system, if you did not do this already in section 3 and add the daemon to your boot runlevel to have it available at boot time:
Code: |
bash$ emerge sys-apps/acpid
bash$ rc-update add acpid boot
|
Now you're ready to go: If you close your laptop-lid the blacklight of you LCD will go off and at anytime you hit your power-button the system will go to runlevel 0 and power-off your laptop.
Enhanced Speedstepping
With activating all settings for 'CPU Frequency Scaling' in kernel 2.6, you have prepared nearly everything you need. If you already loaded your new kernel this will get you a '/proc/acpi/processor/CPU0/performance' interface which can be used for accessing the Speedstepping features. You can look up your current frequency with
Code: |
bash$ cat /proc/acpi/processor/CPU0/performance
state count: 5
active state: P1
states:
P0: 1600 MHz, 24000 mW, 10 uS
*P1: 1400 MHz, 20000 mW, 10 uS
P2: 1200 MHz, 18000 mW, 10 uS
P3: 800 MHz, 16000 mW, 10 uS
P4: 600 MHz, 12000 mW, 10 uS
|
And if you want to change this setting, just do a
Code: |
bash$ echo "x" > /proc/acpi/processor/CPU0/performance
|
where "x" is your desired frequency. The only thing that misses is the userspace tool 'speedfreq'. This tool runs as a daemon and is able to adjust the CPU frequency accordingly to your needs. If the CPU is nod used it scales down to 600 MHz if in full use it scales up to 1600 MHz. All you have to do now is to emerge and install it into your runlevel:
Code: |
bash$ emerge speedfreq
bash$ rc-update add speedfreq boot
|
The config for speedfreq can be found in /etc/conf.d/speedfreq. Here you can set the default behaviour of speedfreq and also control if users are able to monitor speedfreq. I would suggest to set the speed setting to 'dynamic' as this allows the feature described above.
Code: |
bash$ vi /etc/conf.d/speedfreq
# powersave maximise power savings
# performance maximise performance
# dynamic adjust speed according to CPU load (default)
# NNN set CPU to a fixed speed of NNN MHz
# auto let the init script detect current battery status
SPEEDFREQ_SPEED="dynamic"
# If you want normal users to be able to control the speed
# Default is to only allow root
SPEEDFREQ_USERS="yes"
bash$ /etc/init.d/speedfreq start
|
After that the speedfreqd daemon will come alive and set your frequency based on your policy. If you have set this setting to 'dynamic' you can monitor this process by typing
in an active console. If you start an compilejob now, you'll have a nice raise or drop in your scaling.
Hardware Sensors
The hardware sensors (like lm-sensors) are not fully working yet. Despite that, I've managed to get some modules of the I2C section to work. To enable these modules follow the kernel options below:
Code: |
Device Drivers --->
Character devices --->
I2C support --->
<M> I2C support
<M> I2C device interface
I2C Algorithms --->
<M> I2C bit-banging interfaces
<M> I2C PCF 8584 interfaces
I2C Hardware Bus support --->
<M> Intel 801
<M> ISA Bus support
I2C Hardware Sensors Chip support --->
<M> EEPROM (DIMM) reader
|
After recompiling the kernel you will be provided with the kernel modules you have to load. This can be done by setting the modules up in '/etc/modules.autoload.d/kernel-2.6':
Code: |
bash$ vi /etc/modules.autoload.d/kernel-2.6
# /etc/modules.autoload.d/kernel-2.6: kernel modules to load when system boots.
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/modules.autoload.d/kernel-2.6,v 1.1 2003/07/16 18:13:45 azarah Exp $
#
# Note that this file is for 2.6 kernels.
#
i2c_core
i2c_sensor
i2c_dev
i2c-algo-bit
i2c-algo-pcf
i2c-isa
i2c-i801
eeprom
|
The information provided by these modules can be found in '/sys/bus/i2c/'.
Harddrive & 'hdparm' Optimization
Reference:
O'Reilly hdparm Howto
hdparm Thread Gentoo Forum
Requirement:
sys-apps/hdparm
The first thing we are doing is to set some harddriver parameters with hdparm. This will definetly optimize
speed and throughoutput of your harddrive and will speed up disc usage a lot. But first let's check the
possible settings and verify the HD correctness:
Code: |
bash$ hdparm -I /dev/hda
/dev/hda:
ATA device, with non-removable media
Model Number: IC25N040ATCS04-0
Serial Number: CSH406DDHN872B
Firmware Revision: CA4OA71A
Standards:
Used: ATA/ATAPI-5 T13 1321D revision 3
Supported: 5 4 3 2 & some of 6
Configuration:
Logical max current
cylinders 16383 16383
heads 16 16
sectors/track 63 63
--
CHS current addressable sectors: 16514064
LBA user addressable sectors: 78140160
device size with M = 1024*1024: 38154 MBytes
device size with M = 1000*1000: 40007 MBytes (40 GB)
Capabilities:
LBA, IORDY(can be disabled)
bytes avail on r/w long: 4 Queue depth: 1
Standby timer values: spec'd by Vendor, no device specific minimum
R/W multiple sector transfer: Max = 16 Current = 16
Advanced power management level: 128 (0x80)
DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 *udma5
Cycle time: min=120ns recommended=120ns
PIO: pio0 pio1 pio2 pio3 pio4
Cycle time: no flow control=240ns IORDY flow control=120ns
Commands/features:
Enabled Supported:
* NOP cmd
* READ BUFFER cmd
* WRITE BUFFER cmd
* Host Protected Area feature set
* Look-ahead
* Write cache
* Power Management feature set
Security Mode feature set
* SMART feature set
* Device Configuration Overlay feature set
* SET MAX security extension
Address Offset Reserved Area Boot
Power-Up In Standby feature set
* Advanced Power Management feature set
* SMART self-test
* SMART error logging
Security:
Master password revision code = 65534
supported
not enabled
not locked
not frozen
not expired: security count
not supported: enhanced erase
44min for SECURITY ERASE UNIT.
HW reset results:
CBLID- above Vih
Device num = 0 determined by the jumper
Checksum: correct
|
See the 'Checksum: correct' ? This should alway be the condition of a healthy harddrive. If this isn't in your case
please contact your manufacturer as some hardware related problems could be occured and your Hd is in severe danger.
But let's go on with some primary settings I use on my ACER 803 since it first contacted Gentoo:
Code: |
bash$ hdparm -d1 -A1 -m16 -u1 -a64 -c3 /dev/hda
-d1 : enable overall DMA access
-A1 : enable drive read-lookahead
-m16 : set multiple sector count to 16
-u1 : enable unmaskirq
-a1 : enable fs readahead
-c3 : enable IDE 32-bit IO access with sync
|
Please take a little time to test these settings and test their correctness for your system. After that you can also
edit your /etc/conf.d/hdparm file accordingly to set these settings at boot time:
Code: |
bash$ rc-update add hdparm boot
bash$ vi /etc/conf.d/hdparm
all_args="-d1 -A1 -m16 -u1 -a64 -c3"
#EOF
|
And finally for all those who want to try a more extreme setting with hdparm, take those below, BUT BE WARNED:
Code: |
bash$ hdparm -X udma5 -A1 -a1 -m16 -u1 -d1 -c3 /dev/hda
-X udma5 : enable UDMA-5 for hda
-A1 : enable drive read-lookahead
-a1 : enable fs readahead
-m16 : set multiple sector count to 16
-u1 : enable unmaskirq
-d1 : enable DMA access
-c3 : enable IDE 32-bit IO access
|
ATTENTION: PLEASE BE AWARE THAT MESSING AROUND WITH YOUR HARDDRIVE SETTINGS (hdparm) CAN SERIOUSLY DAMAGE YOUR HARDDRIVE
OR RESULT IN LOSS OF DATA. BE CAREFULL ! I AM NOT RESPORNSIBLE FOR ANY DAMAGE TO YOUR SYSTEM, YOU TRY THIS AT YOUR OWN RISK !
Networking LAN
Reference:
Requirements:
net-misc/dhcpcd
Broadcom 4400
The Acer 803 LCi runs network through a Broadcom Corporation BCM4401 10/100Base-T ethernet adapter which runs fine with the modules provided by both kernels:
Code: |
Device Drivers --->
Networking support --->
Ethernet (10 or 100Mbit) --->
[*] Ethernet (10 or 100Mbit)
[*] EISA, VLB, PCI and on board controllers
<M> Broadcom 4400 ethernet support (EXPERIMENTAL)
|
This will give you a module named 'b44' in kernel 2.6 which also can be loaded at boot time through
'/etc/modules.autoload.d/kernel-2.6':
Code: |
bash$ vi /etc/modules.autoload.d/kernel-2.6
# /etc/modules.autoload.d/kernel-2.6: kernel modules to load when system boots.
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/modules.autoload.d/kernel-2.6,v 1.1 2003/07/16 18:13:45 azarah Exp $
#
# Note that this file is for 2.6 kernels.
#
b44
|
Beneath that you also need to install the package 'dhcpcd' to get IP's from your DHCP-server (if you have one)
Code: |
bash$ emerge net-misc/dhcpcd
|
add the startup script for the network device 'eth0' to the boot runlevel
Code: |
bash$ rc-update add net.eth0 boot
|
and on next boot you'll be given an IP automagically, if your device can find a DHCP server
Networking Tools
Reference:
IBM developerWorks - Keychain article
Gentoo Linux Documentation - Keychain
Requirements:
net-misc/openssh
net-misc/keychain
net-misc/gtk2-ssh-askpass
net-misc/x11-ssh-askpass
Welcome to the fine art of networking tools. This section will introduce you to the secret (and not-so-secret) tools of everyday use in a networked enviroment. All tools pinned out here are usefull supplements for your work. Although some of them could be misused, so be warned to do nothing that could harm other against their will or without their knowledge. I'm not responsible for any trouble you might be exposed to, so don't complain.
SSH-Agent and Keychain
This section mainly covers passphraseless logins on remote-servers, by using openssh and a tool named keychain. First be sure you have openssh installed and configured correctly. If you don't have (what I don't expect), you need to install it first:
Code: |
bash$ emerge net-misc/openssh
|
After your successfull installation and configuration of ssh and sshd we'll move on to install net-misc/keychain. Keychain in general will spawn a ssh-agent session which remembers your passphrases and ssh-keys for later use in a current session. This is extremely usefull as you only enter your passphrase once you login and have these keys available throughout your whole system without entering the passphrase again. Let's emerge:
Code: |
bash$ emerge net-misc/keychain
|
Keychain doesn't need any configuration as all parameters are given at runtime. Let's move on
Code: |
bash$ emerge net-misc/gtk2-ssh-askpass
or
bash$ emerge net-misc/x11-ssh-askpass
|
Depending on your favourites emerge one of those askpass-tools (I prefer the GTK2 - looks geekier ). Now let's move on to include your keys:
Code: |
bash$ vi /etc/X11/Sessions/fluxbox
#!/bin/sh
...
export SSH_ASKPASS="/usr/bin/gtk2-ssh-askpass"
/usr/bin/keychain --dir ~/.ssh ~/.ssh/ssh2_key1 ~/.ssh/ssh2_key2 ...
source ~/.ssh/your-computers-name-sh > /dev/null
...
exec /usr/bin/fluxbox
|
As you can see above there are three lines of code you need to include. The first tells SSH what favour to use if it asks for a passphrase. The second one is the actual keychaining where you include your key(s). You can include more than one key (e.g. for different servers). Keychain creates some sort of PID-file for the spawned ssh-agent therefore I also specified the directory to put this file. I prefer to have the file in ~/.ssh/ but you can leave this option. Keychain then will put this PID-file in ~/.keychain/. The third line sources your PID-file to the current bash-session and makes the ssh-agent available. If you restart your xfree now, gtk2-ssh-askpass should ask you for your passphrase.
Last but not least we also need to edit our ~./.bashrc file for keychain to work correctly:
Code: |
bash$ vi ~/.bashrc
# /etc/skel/.bashrc:
...
case $TERM in
xterm*|rxvt|Eterm|eterm)
export SSH_ASKPASS="/usr/bin/gtk2-ssh-askpass"
/usr/bin/keychain --dir ~/.ssh ~/.ssh/ssh2_key1 ~/.ssh/ssh2_key2 ...
source ~/.ssh/your-computers-name-sh > /dev/null
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"'
;;
screen)
PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\033\\"'
;;
esac
...
|
As you can see here, the same three lines are included. The purpose, why these lines are included inside the "case" is because I use xterm and I don't want to spawn keychain (and especially gtk2-ssh-askpass) on a normal text-console (without xfree running). Else this will produce a deadlock, where keychain is waiting for a passphrase and gtk2-ssh-askpass cannot ask you, because there is no display from xfree. This can be optimized by exporting different SSH_ASKPASS variables on different logins, but I need more research in this. If someone has a good hint, post it!! If you now open up a console in xfree, keychain will come to live, search for your key(s), a running ssh-agent and load them all. But what the heck?? We forgot to put our keys on the server?? surely we'll do!! All we need is to put our public keypart on the server to authenticate there with our private key:
Code: |
cat ~/.ssh/your_key.pub | ssh username@machine.org "cat >> .ssh/authorized_keys"
|
Voila! If you now fire up another console and ssh to your remote-machine, no passphrase will be asked. Have fun!!
Networking WLAN
Reference:
ipw2100 source driver
Gentoo Forum Thread
ndiswrapper
Requirements:
net-misc/dhcpcd
net-wireless/hostap-driver
net-wireless/ipw2100
net-wireless/wireless-tools
intel wlan driver for WindowsXP
ndiswrapper
The first tool that was known to emulate the NDIS structure of the win-drivers for the Intel 2100 Pro was the tool 'ndiswrapper'. As it is free and open-source it found acceptance than the commercial tools around. To get ndiswrapper working first you have to enable some options in your kernel config:
Code: |
Device Drivers --->
Networking support --->
Wireless LAN (non-hamradio) --->
[*] Wireless LAN drivers (non-hamradio) & Wireless Extensions
|
This will provide you with the interface in '/proc/net/wireless' which is used by the wireless-tools package and some other tools. After recompiling your kernel you'll have to install the ndiswrapper. The source is currently not in portage but you can download it. Untar it in some temporary directory (e.g. /tmp/ndiswrapper/). Follow the installation instructions to compile the driver and the utils. If you ever recompile your kernel, be sure to recompile 'ndiswrapper' as well! It won't work otherways because of linking problems. If you have done that, copy the file './driver/ndiswrapper.o' and './driver/ndiswrapper.ko' into the directory '/lib/modules/2.6.0/kernel/drivers/net/' and you'll have a new module for modprobe. Now do:
Code: |
bash$ cd /tmp/ndiswrapper
bash$ cp driver/ndiswrapper.o /lib/modules/2.6.0/kernel/drivers/net/
bash$ cp driver/ndiswrapper.ko /lib/modules/2.6.0/kernel/drivers/net/
bash$ modules-update
bash$ mkdir /usr/local/bin/wlan
bash$ cp utils/loadndisdriver /usr/local/bin/wlan/
bash$ ln -s /usr/local/bin/wlan/loadndisdriver /usr/local/bin/loaddriver
|
to set up the binary part of the ndiswrapper tool. All we need now is to copy the w70n51.inf and w70n51.sys files from the Intel Wireless Network Drivers for WindowsXP to your freshly installed directory:
Code: |
bash$ cp w70n51.inf /usr/local/bin/wlan
bash$ cp w70n51.sys /usr/local/bin/wlan
|
But how we are going to use it? Nothing easier that that: All you have to do, is to copy the little script provided below to '/etc/init.d/net.wlan'
Code: |
bash$ vi /etc/init.d/net.wlan
#!/sbin/runscript
start() {
ebegin "Bringing WLAN (NDISwrapper) up"
modprobe ndiswrapper 2> /dev/null
/usr/local/bin/loaddriver 8086 1043 /usr/local/bin/wlan/w70n51.sys /usr/local/bin/wlan/w70n51.inf
/sbin/dhcpcd eth1 &
#/sbin/ifconfig eth1 192.168.0.2 up 2>/dev/null
#/sbin/route add -net 192.168.0.0 netmask 255.0.0.0 gw 192.168.0.1 dev lo 2> /dev/null
eend 0
}
stop() {
ebegin "Bringing WLAN (NDISwrapper) down"
/sbin/ifconfig eth1 down &>/dev/null
rmmod ndiswrapper 2> /dev/null
eend 0
}
|
Done that you have to add it to runlevel boot:
Code: |
bash$ rc-update add net.wlan boot
bash$ /etc/init.d/net.wlan start
* Bringing WLAN (NDISwrapper) up...
Calling putdriver ioctl
Parsing the inf file.
Driver version: 07/31/2003,1.2.0.58
Calling startdriver ioctl
bash$ iwconfig
lo no wireless extensions.
eth0 no wireless extensions.
eth1 IEEE 802.11b ESSID:"WWLAN"
Mode:Managed Frequency:2.437GHz Access Point: 00:60:B3:99:AD:30
Bit Rate=11Mb/s
RTS thr=1600 B Fragment thr=2344 B
Encryption key:off
Power Management:off
Link Quality:0 Signal level:180 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
|
If your output looks somewhat like this you'll have a working eth1 interface which can be used with the wireless-tools mentioned above. Of course the most networking tools should work with that interface.
Exchanging the Intel Mini-PCI with a Dell Truemobile 1150
As mentioned below in this thread it is possible to replace the Intel Mini-PCI WLAN Card with a Dell Truemobile 1150 (costs about $49). So here is a small conclusion: The new Card needs Kernel 2.6 to run properly as the drivers in 2.4 arent working correctly. The replacement of the card itself is a little bit missleading, as the antenna-cables look soldered right onto the board. However they are not. They do look like they are soldered, however they are not. They push down onto their ports so all you have to do is pull straight up and they will come off. The Truemobile has two antenna wire inputs and the connectors fit onto them perfectly. To disconnect the wires, just pull straight up. To reconnect them, push straight down.
Closeup of the antenna connectors
The installed card
In Kernel 2.6 config you'll need to enable
Code: |
Bus Options -->
[*] PCMCIA Cardbus Support
[*]Cardbus yenta-compatible bridge support
[*]I82365 bridge support
|
and
Code: |
Networking Support -->
Wireless Lan (Non-Ham Radio) -->
[*] Wireless LAN (Non-Hamradio)
[*] Hermes Chipset 802.11b...
[*] Hermes PCMCIA Card Support
|
After that it should work right away. I can't proof this, because i don't have that piece of hardware, but it's reported to work.
ATTENTION: PLEASE BE AWARE THAT MESSING AROUND WITH YOUR HARDWARE CAN SERIOUSLY DAMAGE YOUR COMPUTER OR RESULT IN LOSS OF DATA.
BE CAREFULL ! I AM NOT RESPONSIBLE FOR ANY DAMAGE TO YOUR SYSTEM, YOU TRY THIS AT YOUR OWN RISK !
Wireless Tools
Reference:
Kismet Wireless WLAN Sniffer
Requirements:
net-wireless/kismet-cvs
Kismet
Kismet is (as you probably all know) a wireless sniffing tool at the best. In fact its the standart of scanning or wardriving. At the moment, kimet standard is not able to handle the ipw2100 drivers, so we need to install the cvs version. Maybe this becomes obsolete the next time. First create a new directory for the kismet-cvs version:
Code: |
bash$ cd /usr/portage/net-wireless
bash$ mkdir kismet-cvs
bash$ cd kismet-cvs
|
Now download the ebuild provided by the kismet developers either directly from their site kismetwireless.net or via wget:
Code: |
bash$ wget http://dev.gentoo.org/~latexer/files/kismet-cvs-3.1.0.ebuild
|
Now we need to create the manifesto for this ebuild and then we're able to emerge kismet-cvs
Code: |
bash$ ebuild kismet-cvs/kismet-cvs-3.1.0.ebuild digest
bash$ emerge kismet-cvs
|
After successfull installation, we now move on to configure kismet to use the correct sources for capturing:
Code: |
bash$ nano /etc/conf.d/kismet
logtemplate=/home/defaultuser/kismet_log/%n-%d-%i.%l
WIFI_DEV="eth1"
KISMET_MONITOR_OPTS=""
KISMET_SERVER_OPTS=""
|
Keep an eye on the defaultuser entry in this and the next config. This should be the name of your normal user as kismet drops priviledges to it. Now kismet is set to use the correct network device, but we also need to tell kismet where to find the capture sources:
Code: |
bash$ nano /etc/kismet/kismet.conf
servername=Kismet
suiduser=defaultuser
source=ipw2100,eth1,ipw2100,10
channelhop=true
|
These are only the main settings, so feel free to set your own settings depending on devices (e.g. GPS) you own or preferences you might have for scanning. After configuring, init the the kismet server via the init script in /etc/init.d/kismet:
Code: |
bash$ /etc/init.d/kismet start
|
Some last words on using kismet: To use it you have to change to the home directory of the user you entered in the config files and then start kismet:
Code: |
bash$ cd /home/user
bash$ kismet
|
Happy scanning...
Internal Modem
The following introduction on the internal modem currently only works with kernel 2.6. Once more compile the kernel after enabling the following option:
Code: |
Device Drivers --->
Sound --->
Advanced Linux Sound Architecture --->
PCI Devices --->
[M] Intel i8x0/MX440; AMD768/8111 modems (EXPERIMENTAL)
|
This will make a module of the modem via ALSA. After reboot load the module with (or set it to load everytime):
Code: |
bash$ modprobe snd_intel8x0m
|
Now simply add ALSA support to your make.conf and emerge slmodem which is in portage with
Code: |
bash$ nano /etc/make.conf
SUPPORT_ALSA=1
bash$ emerge slmodem
bash$ emerge pcsc-lite
|
After a successfull emerge add the following line to /etc/modules.d/alsa. If the doesn't exist, just create it:
Code: |
bash$ nano /etc/modules.d/alsa
alias snd-card-1 snd-intel8x0m
|
For the first time run the driver with:
Code: |
bash$ slmodemd -a hw:1 -c <country>
|
Fill in the right <country> above. Now you should have a device created at /dev/ttySL0. Next install the neccessary tools to use your dialin:
Code: |
bash$ emerge ppp
bash$ emerge pppconfig
bash$ emerge wvdial
|
Now we go on with the setup of ppp and wvdial
or edit them manually at /etc/ppp/peers/YourISP. Follow the instructions and setup for your ISP, using /dev/ttySL0 as the modem device. I chose PAP and staticDNS. You might have to do this a couple times, because with me it didn't always stay the way I left it. Doesn't seem very stable.
Code: |
bash$ wvdialconf /etc/wvdial.conf
|
and manually edit the /etc/wvdial.conf. Again follow instructions and once more fill in the data for your ISP. After configuring just run
and it should connect you to your ISP. First dialup, then connecting and negotiating, and finally handing over to the pppd deamon. As long as it is running you are online. You can exit with Ctrl-C.
Code: |
bash$ wvdial
--> WvDial: Internet dialer version 1.53
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Modem initialized.
--> Sending: ATDT0909 30 199
--> Waiting for carrier.
ATDT0909 30 199
CONNECT 37333
--> Carrier detected. Waiting for prompt.
~[7f]}#@!}!O} }9}"}&} }*} } }#}%B#}%}%}&[1b][7f]x}9}'}"}(}"o[17]~
--> PPP negotiation detected.
--> Starting pppd at Fri Jul 2 17:48:09 2004
--> pid of pppd: 10753
|
Note: If you also have networking configured, you might have some problems with the default route. I think it's best that you first shutdown your network connection and turn off your ADSL modem by running:
Code: |
bash$ /etc/init.d/net.eth0 stop
|
Ofcourse in real life you will only have 1 connection up. These are sane outputs:
Code: |
bash$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:C0:9F:20:D5:52
inet addr:<xxx> Bcast:10.0.0.255 Mask:255.255.255.0
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:42729 errors:0 dropped:0 overruns:0 frame:0
TX packets:42347 errors:0 dropped:0 overruns:0 carrier:5
collisions:118 txqueuelen:1000
RX bytes:57731041 (55.0 Mb) TX bytes:3175717 (3.0 Mb)
Interrupt:5
...
ppp0 Link encap:Point-to-Point Protocol
inet addr:<yyy> P-t-P:194.78.16.11 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:4 errors:0 dropped:0 overruns:0 frame:0
TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:64 (64.0 b) TX bytes:97 (97.0 b)
bash$ ping -I ppp0 www.gentoo.org
PING www.gentoo.org (203.112.31.164) from <yyy> ppp0: 56(84) bytes of data.
64 bytes from 203.112.31.164: icmp_seq=1 ttl=44 time=477 ms
64 bytes from 203.112.31.164: icmp_seq=2 ttl=44 time=471 ms
64 bytes from 203.112.31.164: icmp_seq=3 ttl=44 time=460 ms
64 bytes from 203.112.31.164: icmp_seq=4 ttl=44 time=454 ms
--- www.gentoo.org ping statistics ---
5 packets transmitted, 4 received, 20% packet loss, time 4003ms
rtt min/avg/max/mdev = 454.167/465.744/477.388/9.080 ms
|
Now just have a look at your routes with eth0 up
Code: |
bash$ linux # route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
194.78.16.11 * 255.255.255.255 UH 0 0 0 ppp0
10.0.0.0 * 255.255.255.0 U 0 0 0 eth0
loopback localhost 255.0.0.0 UG 0 0 0 lo
default sth.lan 0.0.0.0 UG 0 0 0 eth0
|
and your routes with eth0 down
Code: |
bash$ linux # route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
194.78.16.11 * 255.255.255.255 UH 0 0 0 ppp0
loopback localhost 255.0.0.0 UG 0 0 0 lo
default 194.78.16.11 0.0.0.0 UG 0 0 0 ppp0
|
You also don't need to touch /etc/init.d/net.ppp0 or it's config. What you do need to do is make an init script for the slmodemd deamon. This is an adapted version from http://www.kcore.org/?menumain=4&menusub=1
Code: |
bash$ nano /etc/init.d/slmodemd
#! /bin/bash
#
# slmodemd Starts the slmodemd daemon.
#
NAME=slmodemd
DAEMON=/usr/sbin/slmodemd
PIDFILE=/var/run/$NAME.pid
COUNTRY=BELGIUM
DEVICE=/dev/ttySL0
test -f $DAEMON || exit 0
start_dev()
{
echo -n "Starting slmodem daemon: $NAME "
start-stop-daemon --start --pidfile $PIDFILE --make-pidfile --background --exec $DAEMON -- -a hw:1 -c $COUNTRY
}
stop_dev()
{
echo -n "Stopping slmodem daemon: $NAME"
start-stop-daemon --stop --pidfile $PIDFILE --exec $DAEMON
}
case "$1" in
start)
start_dev
;;
stop)
stop_dev
;;
restart)
stop_dev
echo ""
rm $PIDFILE
start_dev
;;
*)
echo "Usage: /etc/init.d/$NAME {start|stop|restart}"
exit 1
;;
esac
if [ $? == 0 ]; then
echo .
if [ $1 == "stop" ]; then
rm $PIDFILE
fi
exit 0
else
echo failed
exit 1
fi
|
Now to make the modem modules and also the pcscd deamon run at boot do
Code: |
bash$ rc-update add pcscd boot
bash$ rc-update add slmodemd default
|
It's as easy as that. And it practically works out of itself. These connections also go very well with the gnome 2.6 Network Monitor applets!
IRDA support
References:
Tutorial via Email from tuxlover (THANX)
Requirements:
sys-apps/irda-utils
app-misc/gscmxx
As the infrared-port (IRDA) works flawlessly on kernel 2.6 don't forget to enable them in your BIOS (I forgot it and almost threw my notebook out of the window)!. Just enable the following kernel options to get the correct modules:
Code: |
Device Drivers --->
Networking support --->
<M> IrDA (infrared) subsystem support --->
--- IrDA (infrared) subsystem support
<M> IrNET protocol
<M> IrCOMM protocol
[*] Ultra (connectionless) protocol
--- IrDA options
[*] Cache last LSAP
[*] Fast RRs (low latency)
Infrared-port device drivers --->
--- SIR device drivers
<M> IrTTY (uses Linux serial driver)
--- FIR device drivers
<M> NSC PC87108/PC87338
|
After recompiling and installing your new kernel install the irda-utils, which provide all kinds of programms for accessing IRDA. Also you should add the /etc/init.d/irda to your default runlevel to initialize the IRDA device on boot:
Code: |
bash$ emerge irda
bash$ rc-update add irda default
|
After rebooting with your new kernel, you can use irdadump to check if there's any traffic on your infrared port. By default, you should see your own computer's polling:
Code: |
bash$ irdadump
13:51:49.342590 xid:cmd ebbe58d4 > ffffffff S=6 s=0 (14)
13:51:49.432474 xid:cmd ebbe58d4 > ffffffff S=6 s=1 (14)
13:51:49.522460 xid:cmd ebbe58d4 > ffffffff S=6 s=2 (14)
13:51:49.612446 xid:cmd ebbe58d4 > ffffffff S=6 s=3 (14)
13:51:49.702433 xid:cmd ebbe58d4 > ffffffff S=6 s=4 (14)
13:51:49.792418 xid:cmd ebbe58d4 > ffffffff S=6 s=5 (14)
13:51:49.882405 xid:cmd ebbe58d4 > ffffffff S=6 s=* linux hint=0400 [Computer] (20)
|
You should now make the IRDA device (/dev/ircom...) accessible for all users. To archive it just edit /etc/devfsd.conf and add the following line:
Code: |
bash$ nano /etc/devfsd.conf
REGISTER ^ircomm.* PERMISSIONS root.users 0660
|
Now, if you put an irda device in front of your irda port, it could look like this:
Code: |
bash$ irdadump
13:57:22.291974 xid:cmd ebbe58d4 > ffffffff S=6 s=0 (14)
13:57:22.381857 xid:cmd ebbe58d4 > ffffffff S=6 s=1 (14)
13:57:22.471843 xid:cmd ebbe58d4 > ffffffff S=6 s=2 (14)
13:57:22.561830 xid:cmd ebbe58d4 > ffffffff S=6 s=3 (14)
13:57:22.651814 xid:cmd ebbe58d4 > ffffffff S=6 s=4 (14)
13:57:22.741804 xid:cmd ebbe58d4 > ffffffff S=6 s=5 (14)
13:57:22.823723 xid:rsp ebbe58d4 < 00481537 S=6 s=5 SIEMENS S45i
hint=b124 [ PnP Modem Fax IrCOMM IrOBEX ] (29)
13:57:22.831790 xid:cmd ebbe58d4 > ffffffff S=6 s=* linux hint=0400 [Computer] (20) |
[/code]
Now you should be set to connect any IRDA devices to your notebook.
Siemens mobile phones
If you have a siemens mobile phone like I do (S25 to MT50), you can install app-misc/gscmxx and use it to manage your address book, pictures and similar things:
Code: |
emerge app-misc/gscmxx
|
Put your phone close to your irda port, start gscmxx and configure it to use /dev/ircomm0, baudrate 115200, and set the timeouts to relatively high values.
PCMCIA
The PCMCIA card slot of the Acer 803 Lci is fully supported by the yenta-compatible module, so all you have to do is to compile yourself a new kernel with the following options:
Code: |
Bus options (PCI, PCMCIA, EISA, MCA, ISA) --->
[*] Support for hot-pluggable devices
PCMCIA/CardBus support --->
<M> PCMCIA/CardBus support
<M> CardBus yenta-compatible bridge support
|
to get it working. By it's nature as a module you need to load the appropiate modules before you can use the tools by using the commands below:
Code: |
modprobe pcmcia_core
modprobe yenta_socket
modprobe ds
|
You can also load those modules at boot-time by placing the settings in your '/etc/modules.autoload.d/kernel-2.6' file:
Code: |
bash$ vi /etc/modules.autoload.d/kernel-2.6
# /etc/modules.autoload.d/kernel-2.6: kernel modules to load when system boots.
# $Header: /var/cvsroot/acer_thread/sections/pcmcia.txt,v 1.1 2004/02/24 15:31:46 feffi Exp $
#
# Note that this file is for 2.6 kernels.
#
pcmcia_core
yenta_socket
ds
|
To configure and work with you PCMCIA-cards, you'll need to install the 'pcmcia-cs' package which will provide you with the neccessary tools:
Code: |
emerge sys-apps/pcmcia-cs
|
After you installed these tools you can get some information about the sockets and the installed cards by typing:
Code: |
bash$ cardctl status
Socket 0:
no card
Socket 1:
5V 16-bit PC Card
function 0: [ready]
|
The card that resides in Socket 1 displayed here is the O2Micro Smartcardreader which is currently not supported under Linux. You can also get more information about your plugged-in cards by:
Code: |
bash$ cardctl ident
Socket 0:
no product info available
Socket 1:
product info: "O2Micro", "SmartCardBus Reader", "V1.0"
manfid: 0xffff, 0x0001
|
Last edited by feffi on Tue Aug 03, 2004 12:59 pm; edited 25 times in total |
|
Back to top |
|
 |
feffi Apprentice


Joined: 29 Mar 2003 Posts: 216 Location: Sol->Earth->Germany->Giessen
|
Posted: Thu Jan 29, 2004 4:51 pm Post subject: |
|
|
Special Laptop-Keys aka FN-Keys
Reference:
xOSD Homepage
Enlightened OSD
Requirements:
media-sound/setmixer
x11-libs/xosd
Windows Keys
Because I'm using fluxbox I have no real need for those keys. But for one reason I include those keys here: I found it rather annoying to use FN+Home or FN+End to jump in text lines, so I remapped those for Home and End. This is a very simple task when using Xmodmap. Just add a file called 'Xmodmap' to your home directory and add the following lines:
Code: |
bash$ vi Xmodmap
keycode 117 = End
keycode 115 = Home
|
Done this you need to tell your XFree server to load this remapping when starting your favourite window manager. To accomplish this just add the following line to your '.xsession' file:
Code: |
bash$ vi .xsession
exec /usr/bin/X11/xmodmap /etc/X11/Xmodmap &
|
This will invoke the usespace tool 'xmodmap' to redefine your keycodes. Of course you can also redifine other keys.
System Help
Key combination: FN+F1
This key comnation hasn't any effect yet.
ACPI Standy/Sleep
Key combination: FN+F4
This combination triggers the ACPI sleep action which needs to be defined in '/etc/acpi/events/default'.
Video Out
Key combination: FN+F5
This combination uses raw BIOS calls and works out of the box.
External Display
Key combination: FN+F6
Again raw BIOS calls. But beware, you may connect your external device (e.g. Beamer, Monitor, etc.) BEFORE you power on.
If you don't, your device may get lost from the BIOS and doen't work until reboot.
Touchpad Activator
Key combination: FN+F7
This key function activates/deactivates the touchpad directly without any os interference. But be carefull: Sometimes you could hit those without notice and afterwards wonder why your touchpad isn't working and maybe even call for support.
Be warned.
Mute Sound
Key combination: FN+F8
See Volume Keys
Display Bightness
Key combination: FN+LEFT/RIGHT
The display dimming or display brightness Keys are working with raw BIOS calls and so there are no special tricks to handle. They should work right out of the box.
Volume FN-Keys
To get the Volume keys to work we first need the correct keycodes for those keys. To aquire the keycodes they use just fire up a xterm in XFree and start 'xev'. Now press the keys and watch xev's reaction to it. The correct keycodes for my laptop
were:
Raise Volume (Fn + UP) : 176
Lower Volume (Fn + DOWN): 174
Going on now we'll need to map these keycodes to specific events in XFree. Again we are using the 'Xmodmap' file and add the following:
Code: |
bash$ vi Xmodmap
keycode 174 = XF86AudioLowerVolume
keycode 176 = XF86AudioRaiseVolume
|
After that you'll need to map these events to specific commands.
As I use fluxbox I need to add some actions to my ~/.fluxbox/keys file:
Code: |
bash$ vi ~/.fluxbox/keys
None XF86AudioRaiseVolume :ExecCommand setmixer vol +3
None XF86AudioLowerVolume :ExecCommand setmixer vol -3
|
Before this can work, as you've probably noticed, you need to emerge media-sound/setmixer. Now you're set to use your volume keys in XFree.
Hint: I don't use the keycode for mute (160) because it interferes with the button "e"!
Volume Keys and XFree OSD
So, as time goes by, I've discovered a cool feature (maybe some of you know already), the XFree-OSD library. You cat display any message or text with the tool osd_cat directly on your XFree screen. This will enable us to implement all the funtions (and some more) the windows tools enable e.g. switching the sound. Let's begin installing the x11-libs/xosd package as it will provide you with all necessary tools:
Code: |
bash$ emerge x11-libs/xosd
|
After successfull installation simply add a new file called osd.sh to your ~/bin directory (or somewhere similar):
Code: |
bash$ vi ~/bin/osd.sh
#!/bin/sh
if [ $1 == '+' ]
then
setmixer vol +5
else
setmixer vol -5
fi
exec echo `setmixer -V vol +0 | awk '/vol/{split ($3,a,",");print a[1];}'` "% Volume" | osd_cat --font="-adobe-helvetica-bold-*-*-*-34-*-*-*-*-*-*-*" --shadow=2 --pos=top --align=right --colour=green --delay=1
|
After this make the file executable:
Code: |
bash$ chmod 770 osd.sh
|
Executing this script will set a new volume and diplay it via OSD directly on your XFree screen. To use it with your already defined volume hotkeys (see above) simply change your keys assignments:
Code: |
bash$ vi ~/.fluxbox/keys
None XF86AudioRaiseVolume :ExecCommand ~/bin/osd.sh +
None XF86AudioLowerVolume :ExecCommand ~/bin/osd.sh
|
Now try it, it should produce a really nice OSD-Volume display. Just for the coders out there: You can paste anything (like tail -f ...) to the osd_cat command...really nice
Other FN-Keys
All other key combinations like numeric pad, numlock, scroll-lock, etc work right out of the box. They also make raw BIOS calls, thus the system is not required to be configured here.
Hint:
If you don't like messing around with Xmodmap's config files directly, you can also emerge x11-misc/xkeycaps which is a GUI frontent for xmodmap.
Acer Hotkeys & LEDs
Installing
To be able to use the four hotkeys (mail, web, P1 and P2) you need a special driver called acerhk. Beside the keys this driver will also give you control over the mail LED, the wireless LED and the bluetooth LED. First you'll have to download the driver from http://www.informatik.hu-berlin.de/~tauber/acerhk/ and untar it in a directory of your choice. I prefer to include the acerhk driver directly into the kernel. The current version is acerhk-0.5.13. Note that support for the 800-series is still experimental, allthough it seems to work for me and others:
Code: |
bash$ cd /usr/src/linux/drivers/misc
bash$ wget http://www.informatik.hu-berlin.de/~tauber/acerhk/archives/acerhk-0.5.13.tar.bz2
bash$ tar xvfj acerhk-0.5.13.tar.bz2
bash$ mv acerhk-0.5.13 acerhk
|
As we copied the source files directly into the desired kernel directory. Now we just have to include the driver directory in the config files. Just add the following lines to the config file /usr/src/linux/drivers/misc/Kconfig as shown below:
Code: |
bash$ nano /usr/src/linux/drivers/misc/Kconfig
config ACERHK
tristate "Acerhk driver"
depends on EXPERIMENTAL
---help---
This is an experimental acer keyboard driver for
acer laptops
|
Now include the acerhk directory in it's parents Makefile (/usr/src/linux/drivers/misc/Makefile) and add the following line:
Code: |
bash$ nano /usr/src/linux/drivers/misc/Makefile
obj-$(CONFIG_ACERHK) += acerhk/
|
Next you'll have to activate the misc drivers first by sourcing them:
Code: |
bash$ source "drivers/misc/Kconfig"
|
One last step and the installation process is finished. Go to your favourite kernel config (make menuconfig, oldconfig, gconfig) and enable the acerhk driver by activating
Code: |
Device Drivers --->
Misc devices --->
<M> Acerhk driver
|
Now recompile your kernel and install it. After a reboot with your new kernel you should have a fresh working acerhk module you can load. It's as easy as that!
Testing & Mapping
Now it's time to read the README file included with the driver (again the last part)... or you can read below. First load the module or put it in /etc/modules.autoload.d/kernel-2.6
to load it at every bootup automatically
Code: |
bash$ modprobe acerhk
|
Now you can interact with the driver at:
Code: |
bash$ cd /proc/driver/acerhk/
bash$ ls -al
dr-xr-xr-x 2 root root 0 Jul 5 20:11 .
dr-xr-xr-x 4 root root 0 Jul 5 20:11 ..
--w--w--w- 1 root root 0 Jul 5 20:11 blueled
-r--r--r-- 1 root root 0 Jul 5 20:11 info
-r--r--r-- 1 root root 0 Jul 5 20:11 key
--w--w--w- 1 root root 0 Jul 5 20:11 led
--w--w--w- 1 root root 0 Jul 5 20:11 wirelessled
|
If you can see these entries, all is set up and should work. Let's go on! First press some hotkeys and then type "dmesg" in a terminal. You'll see that the kernel has detected your keypresses (and releases). Here's what the README says about it:
Code: |
If you have one of the newer models with the dritek hardware <we do ;-)>, use kernel 2.6
and get (after enabling it) kernel messages of the form:
atkbd.c: Unknown key pressed (translated set 2, code 0xf4 on
isa0060/serio0).
atkbd.c: Use 'setkeycodes e074 <keycode>' to make it known.
then you should do exactly what your told. In this case you could do
setkeycodes e074 158
to map the button with scancode e074 (hex) to keycode 158 (decimal).
...
The keycode you give as parameter to setkeycodes is one out of the header file
/usr/src/linux/include/linux/input.h ...
|
In my case I just had to do
Code: |
setkeycodes e074 149
|
twice, once for e074 and once for e073. The keycode didn't matter because it seemed to choose it's own. It got set to 158 despite me asking for 149. Also all four keys got defined!?? So to get your keys working after boot, just edit /etc/conf.d/keyscodes to map the scancodes to keycodes:
Code: |
bash$ nano /etc/conf.d/keycodes
KEYCODES="e025 89 e026 90 e027 91 e074 92 e073 93"
|
and install the keycodes rc script to your runlevel by typeing
Code: |
bash$ rc-update add keycodes default
|
If you're keycodes script is missing, just create it:
Code: |
bash$ nano /etc/init.d/keycodes
#!/sbin/runscript
depend()
{
need localmount
}
start()
{
# Load scan code to key code mappings
if [ -n "$KEYCODES" -a -x /usr/bin/setkeycodes ]
then
ebegin "Loading scan code to key code mappings"
/usr/bin/setkeycodes $KEYCODES
eend $? "Error loading key code mappings"
fi
}
|
Thats it, you're almost done. After a reboot or start of the keycodes script you should be able to get some output from e.g. xev for your keys pressed. I mapped all keys to F17 to F20 with xmodmap so I can access them easily in XFree. Just edit your .Xmodmap file and add:
Code: |
bash$ nano /etc/X11/Xmodmap
keycode 236 = F17
keycode 178 = F18
keycode 129 = F19
keycode 120 = F20
bash$ xmodmap /etc/X11/Xmodmap
|
After execution of xmodmap all your keys should be mapped ready for use. For the gnome 2.6 users amongst you: You can now define actions for these keys in the "Multimedia keys" dialog. My settings seemed a bit gibberish because my "Preferred applications" dialog wouldn't hangon to my choices at first (not even via GConf) and I also had to redefine the multimedia keys once by deleting them and redefining them... But anyhow, at least now they are staying where I put them.
Scripts
I would suggest we gather some nice ways of utilizing the keys and the LEDs here. I'll start with some scripts to automize mailprocessing with gnome 2.6 and Ximian Evolution:
Code: |
bash$ nano /usr/bin/ledon:
#! /bin/sh
#
# led* - a script to change "You've got mail"-led light state
echo "Setting mail led light on"
echo 1 > /proc/driver/acerhk/led
|
Code: |
bash$ nano /usr/bin/ledoff:
#! /bin/sh
#
# led* - a script to change "You've got mail"-led light state
echo "Setting mail led light off"
echo 0 > /proc/driver/acerhk/led
|
Code: |
bash$ nano /usr/bin/mailchecked:
#! /bin/sh
#
# mailchecked - a script for the double click event on the postbus-monitor applet: switch led off and start evolution
echo "Setting mail led light off and launching mail client"
ledoff
evolution $1
|
Put a Postbus-Monitor-2.6 applet on your panel and copy these scripts to /usr/bin (with right chmod 755 ofcourse). Setup the applet and set "ledon" to be executed when a new mail arrives. Set "mailchecked" to be executed on a double click. Also put "mailchecked %s" as your mail application in the "Preferred applications" dialog and link the mail hotkey to opening your mail. Now, when "you've got mail!", your LED will blink until you press the mail hotkey, which will launch Evolution (eventually already writing a new mail to %s) and turn off the LED. The mailto:%s command from your browser will still work.
Graphics
Reference:
Gentoo DRI Howto
Gentoo Forum Thread
Gentoo Forum Thread
Gentoo Forum Thread
Gentoo Forum Thread
DRI Project Homepage
FreeBSD DRI FAQ
FreeBSD DRI Troubleshooting Guide
DRI Patches by Alan H. from the XFree Project
Requirements:
media-video/ati-driversATI Radeon 9000 Mobility & XFree
Here comes the hardest part. The "ATI Radeon 9000 Mobility". After several troubles with XFree 4.2.x and kernel 2.4.x the ati-drivers included in portage now work with kernel 2.6. The version of the drivers which should work is 3.2.8 and to install those drivers, which recompile a part of your kernel upon install, just do:
Code: |
bash$ opengl-update xfree
bash$ emerge media-video/ati-drivers
bash$ opengl-update ati
bash$ fglrxconfig
|
The tool 'fglrxconfig', which is provided with the ati-drivers package, tunes and adjusts all needed settings for you in your '/etc/X11/XF86Config'. Beware: the config tool generates a new 'XF86Config-4' which overrides your old one. For all those who part the fate of an kernel 2.4.x, use the references above and try yourself. From my experience sometimes
the drivers work, sometimes not, don't really know why.
Alternate ATI Radeon 9000 Mobility Installation & MTRR fix
Ok here is the short alternative guide on the ATI 9000 Mobility configuration using the build in kernel Module:
the 'linux' directory should be pointing to the kernel version you are about to build. Ok, for the 2.6.x kernel versions you'll have to enable the AGPgart support modules:
Code: |
Device Drivers --->
Character devices --->
<M> /dev/agpgart (AGP Support)
<M> Intel 440LX/BX/GX, I8xx and E7x05 chipset support
|
After that you also have to enable the ATI-DRI-Module:
Code: |
Device Drivers --->
Character devices --->
[*] Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)
<M> ATI Radeon
|
Now recompile the kernel and load your new kernel and make sure the agp modules are loaded...how you did this? Either do it manually:
Code: |
bash$ modprobe agpgart
bash$ modprobe intel-agp
|
or load them automagically when you load your system by adding them to your '/etc/modules.autoload.d/kernel-2.x' file:
Code: |
bash$ echo "agpgart" >> /etc/modules.autoload.d/kernel-2.6
bash$ echo "intel-agp" >> /etc/modules.autoload.d/kernel-2.6
|
This will load the modules during boot up. Now go on for a nice clean X Configuration:
IMPORTANT: Make sure you are using the opengl version from 'ati', so change it back to 'xfree':
Code: |
bash$ opengl-update xfree
|
First of all i tested this on the Xfree 4.3.0-r4 AND Xfree 4.3.0-r5 so i can't gurantee anything for previous versions of Xfree (allthough it should work without any problems). Now let's go ahead to configure the XFree config file:
Code: |
bash$ vi /etc/X11/XF86Config-4
Section "Device"
Option "AGPMode" "4"
Option "EnablePageFlip" "True"
Option "IgnoreEDID" "off"
Identifier "Card0"
Driver "ati"
VendorName "ATI Technologies Inc"
BoardName "Radeon R250 Lf [Radeon Mobility 9000 M9]"
BusID "PCI:1:0:0"
EndSection
Section "Monitor"
#DisplaySize 300 230 # mm
Identifier "Monitor0"
VendorName "AUO"
ModelName "f03"
HorizSync 27-90
VertRefresh 40-60
#DisplaySize 320 240
Option "DPMS" "true"
EndSection
Section "DRI"
Mode 0666
EndSection
|
Ok start X...you should be able to reproduce this scores:
Code: |
bash$ glxgears
9360 frames in 5.0 seconds = 1872.000 FPS
10040 frames in 5.0 seconds = 2008.000 FPS
10037 frames in 5.0 seconds = 2007.400 FPS
10053 frames in 5.0 seconds = 2010.600 FPS
|
As a last change to your altenate config, you need to include the MTRR-fix:
Code: |
bash$ vi /etc/conf.d/mtrr-fix
#!/bin/bash
echo "disable=2" >| /proc/mtrr
echo "base=0xd8000000 size=0x4000000 type=write-combining" > /proc/mtrr
|
Now make sure this fix is loaded at boot time:
Code: |
bash$ vi /etc/conf.d/local.start
# This is a good place to load any misc.
# programs on startup ( 1>&2 )
/etc/conf.d/mtrr-fix
|
You can't be 100% sure the ranges included in this fix are reflecting the same range your card uses, so have a look at the kernel messages in '/var/log/messages'. You should be able to see the following lines:
Code: |
Feb 16 17:11:52 computername mtrr: MTRR 3 not used
Feb 16 17:11:52 computername mtrr: 0xd8000000,0x4000000 overlaps existing 0xd8000000,0x1000000
|
So, to be sure, if you can see the lines above, you're correct. If you don't see those lines, change the following in your 'mtrr-fix' file:
Code: |
"base=0xd8000000" --> To the first number shown in the mtrr /var/log/messages message
"size=0x4000000" --> to the second number of the mtrr message.
|
Now your ATI Radeon 9000 should be fixed. If you experience any errors or have corrections on this topic, pls pm me immediatly. This fix is very alpha and has not approved yet.
Special thanks to pestilence for researching so deeply into this topic
Console framebuffer
To get an high resolution framebuffer console in normal text mode, you'll need to tune your kernel a little bit:
Code: |
Device Drivers --->
Graphics support --->
[*] Support for frame buffer devices
[*] VESA VGA graphics support
Console display driver support --->
[*] Video mode selection support
<*> Framebuffer Console support
|
now recompile your kernel and add the entry 'vga=794' to your kernel section in '/etc/lilo.conf'
Code: |
bash$ vi /etc/lilo.conf
image = /boot/kernel_2.6.0_final
root = /dev/hda2
label = 2.6.0-final
read-only
vga=794
|
The important line is the vga=***. The values can be replaced to suit your needs:
Code: |
Colours 640x480 800x600 1024x768 1280x1024 1600x1200
--------+---------------------------------------------
256 | 769 771 773 775 796
32,768 | 784 787 790 793 797
65,536 | 785 788 791 794 798
16.8M | 786 789 792 795 799
|
Sound
This topic is fairly easy as ALSA works right out of the box with kernel 2.6. To get the correct drivers you'll need to enable
Code: |
Device Drivers --->
Sound --->
<*> Sound card support
Advanced Linux Sound Architecture --->
<*> Advanced Linux Sound Architecture
<*> Sequencer support
[*] OSS API emulation
<*> OSS Mixer API
<*> OSS PCM (digital audio) API
[*] OSS Sequencer API
PCI devices --->
<*> Intel i8x0/MX440, SiS 7012; Ali 5455; NForce Audio; AMD768/8111
|
in your kernel settings. This will give you the interfaces to your AC97 sound chip in '/dev/sound/' with access to all volume settings, a dsp, sequencers and a mixer. After that you should emerge 'alsamixer' or some other tool to adjust your volume settings (I prefer gkrellm).
Universal Serial Bus (USB)
References:
pam_usb Project
PAM X509 Authentication Module
Requirements:
sys-apps/hotplug
app-admin/usbview
sys-libs/pam_usbGeneral Hotplug
For the USB section ahead the package 'sys-apps/hotplug' is esseantial as it manages all module loading and unloading required for several devices you can use with USB. To install hotplug just do
Code: |
bash$ emerge sys-apps/hotplug
bash$ rc-update add hotplug default
|
Also hotplug needs to be added to runlevel 'default' as you can see. This will load the hotplugd daemon at boot time. Just a little hint from me: Don't add hotplug to runlevel 'boot' (pointed out in several howto's if read) as it needs several variables from runlevel default.
General USB
The USB-Hub-Controller of the Acer Travelmate 803 LCi is an EHCI USB 2.0 compatible device. So all you have to do is to change the settings in your kernel to support the device. Also, for using USB 1.1 compatible devices, you need to select the UHCI module:
Code: |
Device Drivers --->
USB support --->
<M> Support for USB
[*] USB device filesystem
[*] Enforce USB bandwidth allocation (EXPERIMENTAL)
[*] Dynamic USB minor allocation (EXPERIMENTAL)
<M> EHCI HCD (USB 2.0) support
<M> UHCI HCD (most Intel and VIA) support
|
Chosen this settings you'll have basic USB 1.1 and 2.0 support compiled into the kernel as modules. Ahead now comes the customization section where several devices are discussed, so keep on reading before you compile your kernel.
USB-Mouse
Most people nowadays use an USB-Mouse despite of the tbuilt in touchpad, because it's more comfortable. To install the support for the most common mouse devices, you'll just have to activate the following also residing in the USB section:
Code: |
<M> USB Human Interface Device (full HID) support
[*] HID input layer support
[*] /dev/hiddev raw HID device support
USB HID Boot Protocol drivers --->
<M> USB HIDBP Keyboard (simple Boot) support
<M> USB HIDBP Mouse (simple Boot) support
|
This will get you, in combination with hotplug a comfortable way to work with your mouse through the interface '/dev/input/mice' The USB kernel modules will automatically be loaded by hotplug if you plug in your device so no modules need to be loaded at boot time.
USB-Mouse and XFree support
To get your freshly installed mouse to work with XFree you need to tweak your 'InputDevice' section in
'/etc/X11/XF86Config':
Code: |
bash$ vi /etc/X11/XF86Config
Section "InputDevice"
Identifier "USBMouse"
Driver "mouse"
Option "Protocol" "ImPS/2"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5"
EndSection
|
The 'Option "ZAxisMapping" "4 5"' will also give you back your mouse-wheel and third button. After that you normally have to add the following lines to your 'ServerLayout' section as it needs to be registered as pointer device. The following lines will get the touchpad and the USB-Mouse working both at the same time:
Code: |
Section "ServerLayout"
InputDevice "USBMouse" "CorePointer"
InputDevice "Mouse2" "SendCoreEvents"
InputDevice "Keyboard1" "CoreKeyboard"
EndSection
|
After a restart of XFree you're all set to use you USB-Mouse with XFree.
USB Tools
Just for making this topic complete I want to mention the tool usbview which is available through portage via:
Code: |
bash$ emerge app-admin/usbview.
|
RootPlug
RootPlug is a fine thing to work with, as you only have to edit a file in your kernel directory. The file you need is '/usr/src/linux/security/root_plug.c'. But first you have to determine the vendor- and product-id of your root-plug-device. To do this, just fire up 'usbview' an look for your device. Next you'll have to extract the following information from the usbview-diplay:
Vendor Id: 033a
Product Id: 025f
These are the values you need to edit your device section in the root-plug file mentioned above accordingly:
Code: |
bash$ vi /usr/src/linux/security/root_plug.c
/* default is a generic type of usb to serial converter */
static int vendor_id = 0x033a;
static int product_id = 0x025f;
|
After you've managed this, you simply have to enable some kernel options as shown below:
Code: |
Security options --->
[*] Enable different security models
<M> Root Plug Support
|
After recompiling your kernel a module named 'root_plug' which can be loaded via
Code: |
bash$ modprobe root_plug
|
But be warned: If ever your device is broken, you'll only be able to recover your root-state by circumventing your module loading phase by using a boot cdrom or another kernel (e.g. kernel 2.4.) without RootPlug support.
USB-Memory-Stick
A USB-Memory-Stick is a fine thing to make a quick backup of your config and favourite data or to store important data on. If you emerged the 'sys-apps/hotplug' package you nearly have all you need. Some kernel settings have to be adjusted to get the USB-Memory-Sticks work. First we need the SCSI section as this will give us a device in '/dev/scsi/' later if you plug in a memory stick.
Code: |
Device Drivers --->
SCSI device support --->
<M> SCSI device support
[*] legacy /proc/scsi/ support
<M> SCSI disk support
<M> SCSI generic support
|
Now we go on to the real USB section to enable all those neat USB mass storage devices.
Code: |
Device Drivers --->
USB support --->
<M> Support for USB
<M> EHCI HCD (USB 2.0) support
<M> OHCI HCD support
<M> UHCI HCD (most Intel and VIA) support
<M> USB Mass Storage support
[*] USB Mass Storage verbose debug
|
The settings ahead are not neccessary as you already havfe the basic settings for your device, but who knows which hardware you'll have to combat with. If you wish you can in addition enable:
Code: |
[*] Datafab Compact Flash Reader support (EXPERIMENTAL)
[*] Freecom USB/ATAPI Bridge support
[*] ISD-200 USB/ATA Bridge support
[*] Microtech CompactFlash/SmartMedia support
[*] HP CD-Writer 82xx support (EXPERIMENTAL)
[*] SanDisk SDDR-09 (and other SmartMedia) support (EXPERIMENTAL)
[*] SanDisk SDDR-55 SmartMedia support (EXPERIMENTAL)
[*] Lexar Jumpshot Compact Flash Reader (EXPERIMENTAL)
|
Recompiled and installed your new kernel it will now be able to send some events if you plug in your memory stick. These events will be handled by 'hotplug' which will start the correct modules for your memory device. After plugging in your memory stick a new device will be in '/dev/scsi/hostX...' with the endpoints 'disc' and 'partX' where 'X' stands for a generic number. The 'disc' device can be easily mounted via the normal mount commant. Although the most usb memory sticks have a vfat filesystem, some are reported to go fine with ext2. Here is a sample of mounting an usb memory stick:
Code: |
bash$ mount -t vfat /dev/scsi/host0/target0/lun0/disc /mnt/usb
|
Now you can access your usb memory stick through '/mnt/usb'. Be aware to 'sync' AND unmount your usb stick BEFORE you unplug it. If you don't, you may loose data and sure get a kernel oops.
User Authentification via pam_usb
In this section I want to explain some basic user authentification via an USB stick using the pam_usb modules. To begin we first have to emerge the sys-libs/pam_usb with
Code: |
bash$ emerge sys-libs/pam_usb
|
After the finished installation of the module we will have a application called usbadm which is responsible for managing keys and serial numbers stored on you USB stick. So the next step would be generating a key for your authentication e.g. for root. First mount your USB stick to something like /mnt/usb
Code: |
bash$ mount -t vfat /dev/sda /mnt/usb
|
Then use the admin application to generate a appropiate key for your login:
Code: |
bash$ usbadm keygen /mnt/usb root 4096
|
This will create a directory /mnt/usb/.auth where all your keys are stored. Optionally you can also cipher your key on the USB stick with a password or add a serial number so the only device that is valid with this key is the current mounted. Just go ahead and play a little bit with the options of usbadm. Now comes the tricky part as usb_pam needs a little workaround since we are using kernel 2.6. We need to tell PAM how to authenticate you with pam_usb. So we'll edit /etc/pam.d/system-auth:
Code: |
bash$ vi /etc/pam.d/system-auth
auth required /lib/security/pam_env.so
# pam_usb #
auth sufficient /lib/security/pam_usb.so fs=vfat debug=1 check_device=-1 check_if_mounted=-1 force_device=/dev/sda
# pam_usb #
auth sufficient /lib/security/pam_unix.so likeauth nullok
auth required /lib/security/pam_deny.so
account required /lib/security/pam_unix.so
password required /lib/security/pam_cracklib.so retry=3
password sufficient /lib/security/pam_unix.so nullok md5 shadow use_authtok
password required /lib/security/pam_deny.so
session required /lib/security/pam_limits.so
session required /lib/security/pam_unix.so
|
For PAM to use pam_usb we simply add the line above. After saving you can already try it, just fire up a normal user shell:
Code: |
bash$ su -
[device.c:287] Forcing device /dev/sda
[device.c:267] Creating temporary mount point...
[device.c:273] Using /tmp/pam_usbp9Y5UT as mount point
[device.c:167] Trying to mount /dev/sda on /tmp/pam_usbp9Y5UT using vfat
[device.c:175] Device mounted, trying to open private key
[device.c:150] Opening /tmp/pam_usbp9Y5UT/.auth/root.somemachine
[device.c:183] Private key opened
[auth.c:135] Private key imported
[auth.c:143] Public key imported
[dsa.c:78] Checking DSA key pair...
[dsa.c:88] Signing pseudo random data [1 time(s)]...
[dsa.c:95] Valid signature
[dsa.c:88] Signing pseudo random data [2 time(s)]...
[dsa.c:95] Valid signature
[dsa.c:88] Signing pseudo random data [3 time(s)]...
[dsa.c:95] Valid signature
[pam.c:88] Access granted
bash root$ _
|
As you can see pam_usb will automagically mount /dev/sda and look for a key to authenticate your account. I've done this for the account 'root' here but you can also do this for every account you like by just logging in that account, mount the USB stick and generate a new key. The keyfile on the USB stick will have an automatical generated name. You can also generate keys for other machines beside you laptop (of course you'll have to install pam_usb on them too). If you're finished with configuring the module and keys, just remove the entry 'debug=1' from the line in /etc/pam.d/system-auth to prevent pam_usb spitting out all those debug messages.
Synaptics Touchpad
Reference:
http://www.gama.de/projects/debian/acertm800lci/index.php
Requirements:
http://www.tuxmobil.org/software/synaptics/
To get the touchpad working in XFree 4.x you'll need a synaptics-linux-driver which provides all function of the touchpad under XFree. You can obtain this driver at the link above. Once downloaded, untar it and copy the file 'synaptics_drv.o' into your XFree module directory '/usr/X11R6/lib/modules/drivers'. Now you'll have to change a few lines in your 'InputDevice' section in '/etc/X11/XF86Config':
Code: |
Section "InputDevice"
Identifier "SynapticsTouchpad"
Driver "synaptics"
Option "Device" "/dev/psaux"
Option "ZAxisMapping" "4 5"
Option "Edges" "1900 5400 1800 3900"
Option "Finger" "25 30"
Option "MaxTapTime" "20"
Option "MaxTapMove" "220"
Option "VertScrollDelta" "100"
Option "MinSpeed" "0.02"
Option "MaxSpeed" "0.18"
Option "AccelFactor" "0.0007"
Option "SHMConfig" "on"
Option "UpDownScrolling" "on"
Option "Protocol" "ImPS/2"
Option "CorePointer" ""
EndSection
|
All you need to do now is to register this device in the 'ServerLayout' section also in this file:
Code: |
Section "ServerLayout"
InputDevice "USBMouse" "CorePointer"
InputDevice "SynapticsTouchpad" "SendCoreEvents"
InputDevice "Keyboard1" "CoreKeyboard"
EndSection
|
This will add a pointer device for the Synaptics Touchpad for use in XFree. To use your mouse in an console (framebuffer or not) you'll need to use the 'sys-libs/gpm' package. First you'll have to install this package:
Code: |
bash$ emerge sys-libs/gpm
|
This will give you the config files for 'gpm'. Change the following lines accordingly to the following to get your USB-Mouse and Synaptics Touchpad working in your text-console:
Code: |
bash$ vi /etc/conf.d/gpm
# Config file for /etc/init.d/gpm
#MOUSE=ps2
MOUSE=imps2
MOUSEDEV=/dev/psaux
#MOUSEDEV=/dev/input/mice
|
Done that, you may add gpm to one of your runlevels by
Code: |
bash$ rc-update add gpm default
|
If you want to test it now (without rebooting) start the service manually by typing
Code: |
bash$ /etc/init.d/gpm start
|
Now a little text coursor should appear when you move your mouse in an text-console. You can also use copy and paste like in XFree.
Firewire IEEE 1394
The Acer Travelmate 803 LCi also has a firewire IEEE 1394 device. the kernel modules support a wide variety of firewire devices like harddiscs, cameras or LAN-over-1394. To enable all these features and the different hardware specific modules, enable the following settings in your kernel config:
Code: |
Device Drivers --->
IEEE 1394 (FireWire) support (EXPERIMENTAL) --->
<M> IEEE 1394 (FireWire) support (EXPERIMENTAL)
<M> OHCI-1394 support
<M> OHCI-1394 Video support
<M> SBP-2 support (Harddisks etc.)
[*] Enable Phys DMA support for SBP2 (Debug)
<M> Ethernet over 1394
<M> OHCI-DV I/O support
<M> Raw IEEE1394 I/O support
<M> IEC61883-1 Plug support
<M> IEC61883-6 (Audio transmission) support
|
After recompiling your kernel, you'll get several modules you can use to attach and work your firewire hardware. In special you'll get:
Code: |
bash$ modprobe ieee1394.o
|
This is the standard interface for firewire support in the kernel. This has to be loaded always if you want to work with firewire.
Code: |
bash$ modprobe ohci1394.o
|
As the firewire chipset is a OHCI-1394 specification compliant, this modules also has to be loaded.
Code: |
bash$ modprobe video1394.o
|
This module enables video device usage for OHCI-1394 cards. Enable this module only if you have an IEEE 1394 video device connected to an OHCI-1394 card.
Code: |
bash$ modprobe sbp2.o
|
This module enables you to use SBP-2 devices connected to your IEEE 1394 bus. SBP-2 devices include firewire-harddrives and DVD/CDROM devices.
Code: |
bash$ modprobe dv1394.o
|
This module allows you to transmit and receive DV (digital video) over the OHCI-1394 firewire port.
Code: |
bash$ modprobe raw1394.o
|
The raw firewire module enables direct communication of user programs with the IEEE 1394 bus and thus with the attached peripherals.
Code: |
bash$ modprobe cmp.o
|
This module enables the Connection Management Procedures (IEC61883-1) driver, which implements input and output plugs. This is generally a good idea, because newer hardware also supports this feature.
Code: |
bash$ modprobe amdtp.o
|
This module enables the Audio & Music Data Transmission Protocol (IEC61883-6) module, which implements audio transmission over IEEE1394.
This should get all your firewire hardware to work on kernel basis. For special needs you naturally need some userspace tools to use these features.
Styleguide
Reference:
Qingy Homepage
Lilo Graphics Tutorial
AcerHK Homepage
Requirements:
bootsplash diff
media-gfx/bootsplash
sys-apps/qingyExchanging XFree Cursors
XFree 4.3 supports the feature of semi-transparent mouse pointers with shadows. To exchange your boring standard XFree cursor you need to emerge one of the following packages:
Code: |
bash$ x11-themes/blueglass-xcursors
bash$ x11-themes/golden-xcursors
bash$ x11-themes/silver-xcursors
|
To enable ththe installed cursors you just need to edit or create the file ".Xdefaults" in your home directory:
Code: |
bash$ vi ~/.Xdefaults
Xcursor.size: 32
Xcursor.theme: blueglass
|
Dones this just reload your XFree server and enjoy your new fancy cursors.
Bootsplash
To get bootsplash up and running with Gentoo and kernel 2.6 you'll need a little patience as this not an easy task. First of all you have to install bootsplash
Code: |
bash$ emerge media-gfx/bootsplash
|
to get your rc-scripts and some files in '/sbin' patched. Now follows the tricky part: Download the bootsplash diff-file for kernel 2.6.x from the bootsplash homepage and place it in '/usr/src'. Next we patch the kernel with
Code: |
bash$ patch -p1 < /path/to/bootsplash-3.0.7-2.6.xxxx-vanilla.diff
|
to get the correct options in menuconfig. If patching was successfull, enable the following settings in your newly patched kernel:
Code: |
Processor type and features --->
[*] MTRR (Memory Type Range Register) support
Device Drivers --->
Block devices --->
<*> RAM disk support
(4096) Default RAM disk size
[*] Initial RAM disk (initrd) support
[*] Support for Large Block Devices
Graphics support --->
Bootsplash configuration --->
[*] Bootup splash screen
|
Also be sure to disable ALL BootLogo options in
Code: |
Device Drivers --->
Graphics support --->
Logo configuration --->
[ ] Bootup logo
|
as the interfere with the bootsplash configuration. Now recompile your kernel with all the new options set and copy it to your /boot (or whatever you use) directory. Next we will set up an appropiate splashscreen as an initrd:
Code: |
bash$ splash -f -s /etc/bootsplash/gentoo/config/bootsplash-*.cfg /boot/initrd-*
|
The * marks the desired screen size you want to use. The defaults are 800x600, 1024x768, 1280x1024 or 1600x1200. I prefer the size of 1400x1050 as it is the maximum this LCD can display correctly. To use an initrd with 1400x1050 you might have to edit your background images to suit your resolution. In this case simply take your current background image an resize it with gimp to 1400x1050 and afterwards edit your config file in your '/etc/bootsplash/...' directory to fit the resolution. Next you'll have to edit your '/etc/lilo.conf' again to introduce the new compiled kernel to the initrd and bootsplash options:
Code: |
bash$ vi /etc/lilo.conf
image = /boot/kernel_2.6_splash
vga=0x342 #1400x1050
root = /dev/hda2
initrd = /boot/initrd-1400x1050
append = "video=vesa:1400x1050,mtrr splash=silent"
label = 2.6_fb_splash
read-only
|
After altering your 'lilo.conf' accordingly, you're just two commands away from your bootsplash screen:
Code: |
bash$ lilo
bash$ rc-update add bootsplash default
|
Now you should be all set for your bootsplash screen at boot time. If you wish to exchange the default Gentoo theme (which looks really nice), just go ahead and download them from your favourite themes archive around the corner.
Quingy
Qingy is a replacement of getty. Written in C, it uses DirectFB to provide a fast, nice GUI without the overhead of the X Windows System. It allows the user to log in and start the session of his choice (text console, gnome, kde, wmaker, ...). I use Qingy because it's really fast an not bloated and slow like the other login-managers provided by XFree (if you ever used gdm or kdm, you'll know what I mean). Qingy despite that is no real login manager by itself it's a replacement of agetty. If you don't know what agetty is, just switch to a terminal, where you aren't logged in, thats agetty. Despite that Qingy can also fire up your Xfree as well as log you into a text based console. But enough of that, let's begin installing:
Code: |
bash$ emerge sys-apps/qingy
|
Right after emerging Qingy, you'll have to edit your '/etc/inittab' to set Qingy as your login manager. Just go ahead to the terminals section of the file and change the following lines. Terminal 6 will be your old 'agetty'. This is for security, if something with Qingy goes completely wrong, you have a secure way to log in.
Code: |
bash$ vi /etc/inittab
# TERMINALS
c1:12345:respawn:/sbin/qingy tty1
c2:12345:respawn:/sbin/qingy tty2
c3:12345:respawn:/sbin/qingy tty3
c4:12345:respawn:/sbin/qingy tty4
c5:12345:respawn:/sbin/qingy tty5
c6:12345:respawn:/sbin/agetty 38400 tty6 linux
#c7:12345:respawn:/usr/bin/top tty8
|
BTW: Don't forget to take 'gdm/kdm' out of your runlevels. This can be done by
Code: |
bash$ rc-update del xdm
|
You can also change the theme Qingy uses for your login screen. Just go ahead to the Qingy homepage and read the manual. But let's go on now: To get Qingy work with a resolution of 1400x1050, you'll have to add a new mode (if it isn't already present) to your '/etc/fb.modes' file to get the correct mode settings, just boot to your freshly installed bootsplash kernel. Now log in as root and type
Code: |
bash$ fbset
mode "1400x1050-77"
# D: 147.037 MHz, H: 83.166 kHz, V: 77.436 Hz
geometry 1400 1050 1400 1050 16
timings 6801 168 32 16 4 168 4
rgba 5/11,6/5,5/0,0/0
endmode
|
without any parameters. fbset should display your current framebuffer mode (if you already booted to bootsplash, this should be something like 1400x1050-77 or something similar like above). These lines need to be added to '/etc/fb.modes' before you can use Qingy at this resolution. Last step is to edit '/etc/directfbrc.qingy' and set your freshly added mode from '/etc/fb.modes'. Now do a simply reboot and Qingy should work at 1400x1050.
Lilo Graphical Menu
This topic was a really hard one. Not because it's hard to do the configuration itself, but because of the fact that there is merely no documentation about this topic available. First, this will give you a graphical boot menu in LILO (not bootsplash) instead of the text driven menu default. To archive this, you'll have to do several steps. First step is to prepare a nice bmp picture to load. Second step takes you to the LILO configuration. First go ahead and get some nice picture and load it with gimp. Now resize you picture to 640x480 pixels and crop down the colors to 16. Next save it to '/boot' as an bmp picture. If gimp asks you for RLE compression, go ahead and select it. Second: Edit your '/etc/lilo.conf'. There is an important line, that has to be changed in order to get graphics, so be aware. As the file differs from system to system, I only point out the major changes here.
Code: |
bash$ vi /etc/lilo.conf
#menu-title=" linuXbunker " # THIS has to be deactivated
#menu-scheme=Wb # THIS also
install = /boot/boot-bmp.b # ATTENTION: this is NOT 'boot-menu.b'
#bitmap=imagefile (bitmap 640x480x16)
#bmp-colors=<foreground>,<background>,<shadow>,<highlighted-fg>,<highlighted-bg>,<highlighted-sh>
#bmp-table=<x>,<y>,<ncol>,<nrow>,<xsep>,<spill>
#bmp-timer=<x>,<y>,<fg>,<bg>,<sh>
# I use these settings for a bootmenu with 3 options with gentoo.bmp :
bitmap = /boot/gentoo.bmp
bmp-colors = 15,0,0,0,15,15
bmp-table = 105p,125p,1,5,,
bmp-timer = 45p,300p,15,0,0
|
Thats it. Remember to change the IMPORTANT lines. Just mess around some with the 'bmp-*' settings, as a description is included. More information can be found in the 'man lilo.conf'. Now fire up lilo and reboot. If everything works fine, you're setup for some cool graphics boot menu.
Link Graveyard
General
Specs and Handling
Compiler Flags
Harddrive & 'hdparm' Optimization
Networking
PCMCIA
USB & Hotplug
Graphics
Missing Items & later additions:
Later Additions
Missing Items
Smartcardreader & keycard login/logout
_________________ have fun
feffi
/(bb|[^b]{2})/ that is the Question!
Gentoo-Wiki: Acer Travelmate 803 LCi manual
Last edited by feffi on Sat Jul 10, 2004 12:18 pm; edited 11 times in total |
|
Back to top |
|
 |
feffi Apprentice


Joined: 29 Mar 2003 Posts: 216 Location: Sol->Earth->Germany->Giessen
|
Posted: Thu Jan 29, 2004 4:52 pm Post subject: reserved |
|
|
reserved for later addidtion due to limitations of this board... |
|
Back to top |
|
 |
feffi Apprentice


Joined: 29 Mar 2003 Posts: 216 Location: Sol->Earth->Germany->Giessen
|
Posted: Thu Jan 29, 2004 4:53 pm Post subject: reserved |
|
|
reserved for later addidtion due to limitations of this board... |
|
Back to top |
|
 |
feffi Apprentice


Joined: 29 Mar 2003 Posts: 216 Location: Sol->Earth->Germany->Giessen
|
Posted: Thu Jan 29, 2004 4:53 pm Post subject: reserved |
|
|
reserved for later addidtion due to limitations of this board... |
|
Back to top |
|
 |
feffi Apprentice


Joined: 29 Mar 2003 Posts: 216 Location: Sol->Earth->Germany->Giessen
|
Posted: Thu Jan 29, 2004 4:54 pm Post subject: reserved |
|
|
reserved for later addidtion due to limitations of this board... |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|