Compiling the Kernel for Power Management on the Cruseo chipset
- To start with I downloaded the source for kernel 2.4.20
evan@wazza-dunnart:/usr/src/kernel-source-x.x.x$ apt-get install kernel-source-2.4.20 - I then did a cache search (in unstable) for transmeta
evan@wazza-dunnart:/usr/src/kernel-source-x.x.x$ apt-cache search transmeta - Transmeta bought up a list of files which I installed
evan@wazza-dunnart:~$ apt-cache search transmeta
longrun - Transmeta Crusoe LongRun utilityevan@wazza-dunnart:~$ apt-cache show longrun
Description: Transmeta Crusoe LongRun utility
LongRun (power management mechanism of Transmeta's Crusoe CPU)
control utility. You can set/get LongRun status from command line.This utility only works on the LongRun support Crusoe CPU, and require the Linux CPUID and MSR device drivers.
evan@wazza-dunnart:~$ apt-get install longrun - I had significant trouble identifying the exact names of the hardware embeded in the P2120 mostly because the specs from the manufacturer were useless and secondly the info gleened from the doing an
lspciprobe is not always as usefull as it could be (I assume because manufacturers don't seem to have any standard way of identifying their cards so Lynux coders can't name their hardware drivers consistantly either.)
Notes on which modules are loaded for the working 2.2.x:
evan@wazza-dunnart:~$ sudo lsmod
Password:
Module Size Used by
lockd 42372 0 (autoclean) (unused)
sunrpc 57784 0 (autoclean) [lockd]
usb-ohci 12036 0 (unused)
usbcore 43888 0 [usb-ohci]
trident 17812 0 (unused)
soundcore 2420 5 [trident]
[This appears to be the Soundcard Module that works]
ac97_codec 7372 0 [trident]
rtl8139 11184 0 (unused)
[This module workes]
ide-scsi 7012 0
parport_probe 3360 0 (autoclean) (unused)
parport 6852 0 (autoclean) [parport_probe]
af_packet 6152 0 (unused)
unix 11320 24 (autoclean)
Notes on PCI devices embedded in the laptop:
evan@wazza-dunnart:~$ lspci
00:00.0 Host bridge: Transmeta Corporation LongRun Northbridge (rev 03) 00:00.1
RAM memory: Transmeta Corporation SDRAM controller
00:00.2 RAM memory: Transmeta Corporation BIOS scratchpad
00:02.0 USB Controller: Acer Laboratories Inc. [ALi] USB 1.1 Controller (rev 03)
00:04.0 Multimedia audio controller: Acer Laboratories Inc. [ALi] M5451 PCI AC-Link Controller Audio Device (rev 01)
00:06.0 Bridge: Acer Laboratories Inc. [ALi] M7101 PMU
00:07.0 ISA bridge: Acer Laboratories Inc. [ALi] M1533 PCI to ISA Bridge [Aladdin IV]
00:09.0 USB Controller: NEC Corporation USB (rev 41)
00:09.1 USB Controller: NEC Corporation USB (rev 41)
00:09.2 USB Controller: NEC Corporation USB 2.0 (rev 02)
00:0c.0 CardBus bridge: Texas Instruments PCI1410 PC card Cardbus Controller (rev 01)
00:0f.0 IDE interface: Acer Laboratories Inc. [ALi] M5229 IDE (rev c3)
00:10.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C (rev 10)
00:13.0 FireWire (IEEE 1394): Texas Instruments TSB43AB21 IEEE-1394 Controller (PHY/Link) 1394a-2000
00:14.0 VGA compatible controller: ATI Technologies Inc Radeon Mobility M6 LY
Notes on Network stuff:
evan@wazza-dunnart:~$ sudo ifconfig
Password:
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:3924 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:560 (560.0 b) TX bytes:560 (560.0 b)
Notes on Kernel compiling:
I couldn't get make xconfig to work in an x-terminal, I kept getting a Kiss error (can't remember the full message) because I was missing the tcltk libraries so...
I did a search fortclevan@wazza-dunnart:~$ apt-cache search tcl |less (and searched: /tcl)
evan@wazza-dunnart:~$ apt-cache show tcl8.4
Description: Tcl (the Tool Command Language) v8.4 - run-time files Tcl is a powerful, easy to use, embeddable, cross-platform interpreted scripting language. This package contains everything you need to run Tcl scripts and Tcl-enabled apps.Homepage: http://www.tcl.tk/
apt-get install tcl8.4 -->
evan@wazza-dunnart:~$ sudo apt-get install tcl8.4and did the same thing for tk
evan@wazza-dunnart:~$ apt-cache search tk |less
(and searched: /tk)
evan@wazza-dunnart:~$ apt-cache show tk8.4
Description: Tk toolkit for Tcl and X11, v8.4 - run-time files Tk is a cross-platform graphical toolkit which provides the Motif look-and-feel and is implemented using the Tcl scripting language. This package contains everything you need to run Tk (wish) scripts and Tk-enabled apps.Homepage: http://www.tcl.tk/
evan@wazza-dunnart:~$ sudo apt-get install tkl8.4
Stuffing up the compiling:
I had a number of attempts at compiling the kernel which failed at various stages of the boot process. I kept fiddling (hoping I could work it out) untill I finaly created a kernial image that would even start the boot process - as you can imagine this is somewhat problematic but to make it worse I couldn't work out why and didn't have any backup of the original default settings. So I untared the Kernel source again:
evan@wazza-dunnart:~$ sudo tar xvf kernel-source-2.4.20.tarThen ran make xconfig. From XConfig I saved the original default settings as
kernel_2.4.20_originaland then saved the settings that I was working on askernel_2.4.20_aso as to not loose the original settings if I stuffed it up again. (see Changes to defaults for Kernel 2.4.20 for the options I chose for my Kernel for the P2120 I got this error "Error EBDA too big" with one of the kernels. I'm not sure what caused it but I got it to go away (I think by saying Yes to MTTR). The other problem I had was with the bzImage not decompressing properly which hung the system and required a hard reboot.Also in make xconfig it is easy (for some - like myself) to miss the CPU option don't forget to set the CPU to the correct type, the default is Pentium III and but the P2120 uses a Cruseo processor...
note was forgetting to do amake dep(checks for dependacies) [see "make"` manual -man make]so it should go:evan@wazza-dunnart:~$ cd /usr/src/kernel-source-x.x.x
evan@wazza-dunnart:/usr/src/kernel-source-x.x.x$ make clean
evan@wazza-dunnart:/usr/src/kernel-source-x.x.x$ make xconfi
evan@wazza-dunnart:/usr/src/kernel-source-x.x.x$ make dep
evan@wazza-dunnart:/usr/src/kernel-source-x.x.x$ make bzImage
evan@wazza-dunnart:/usr/src/kernel-source-x.x.x$ make modules
evan@wazza-dunnart:/usr/src/kernel-source-x.x.x$ sudo make modules_install
evan@wazza-dunnart:/usr/src/kernel-source-x.x.x$ sudo mv /arch/i386/boot/bzImage /boot "new kernel's name"
evan@wazza-dunnart:/usr/src/kernel-source-x.x.x$ sudo lilo
Notes - General
Issues with sound card:
- Initially I could not identify the sound card (for Kernel configuration purposes) because there were no ALi sound cards listed.
- If you rely solely on the info from the lspci you will probably not get all the info you need because lspci only gives you the name and make of the card, not the chipset. As I found out with the sound card.
- Although the sound card is an "ALi M5451 PCI AC-Link Controller Audio Device (rev 01)" it uses a Trident Chipset.
Issues with network card:
After compiling a 2.4.20 kernel, when booting off the new Kernel, it would hang while trying to configure Eth0, to try and rectify this I modified
/etc/network/interfacesevan@wazza-dunnart:/usr/src/kernel-source-x.x.x$ sudo vim /etc/network/interfaces
commenting out
iface eth0 inet dhcp(with no effect)
I uncommented all the references to static ip# iface eth0 inet static
# address 192.168.1.2
# netmask 255.255.255.0
# network 192.168.1.0
# broadcast 192.168.1.255
# gateway 192.168.1.1It still hung when configuring Eth0 so I commented it all out
It still hung so I had to go back and recompile the Kernel again.
