===== Rebuilding the eee kernel on eeePC ===== - Install the [[howto:installingdevelopmenttools|development tools]] - download the 2.6.21.4 kernel for you eeepc from ASUS support website: http://support.asus.com/download/Download.aspx?SLanguage=en-us or from [[http://dlsvr01.asus.com/pub/ASUS/EeePC/701/Linux_Kernel_071127.rar|here]] - unpack this file by running the unrar command (in a terminal window, Ctrl+Alt+T):\\ unrar x Linux_Kernel_071127.rar - install linux-source-2.6.21.4-eeepc.deb:\\ dpkg --install linux-source-2.6.21.4-eeepc.deb - unpack linux source code tarball:\\ cd /usr/src; tar xvjf linux-source-2.6.21.4-eeepc.tar.bz2; cd linux-source-2.6.21.4-eeepc - cp /boot/config-2.6.21.4-eeepc .config - Now to actually compile it (use default answers, i.e. just press Enter when asked to choose). this will take about 30 minutes: makeThe kernel image built will be in arch/i386/boot/bzImage. Copy it to /boot and modify the kernel line in /boot/grub/menu.lst to use the new kernel - If you configured any new parts of the kernel as "modules", you will also have to do "make modules_install". To use the new module, you can either symbolically link the new linux source to /lib/modules/2.6.21.4-eeepc/ or copy the new modules to the /lib/modules/2.6.21.4-eeepc/ and then run "depmod -a" ===== Rebuilding a vanilla kernel on eeePC ===== - Install the [[howto:installingdevelopmenttools|development tools]] - download the 2.6.21.4 kernel from kernel.org: http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.21.4.tar.bz2 - unpack this file. I did this in debian/usr/src by running the following command (in a terminal window, Ctrl+Alt+T):\\ tar xvjf ../../../linux-2.6.21.4.tar.bz2 - download http://download.filesystems.org/unionfs/unionfs-2.x/unionfs-2.1.8_for_2.6.21.7.diff.gz to the same folder as you've just unpacked your kernel source. - now unpack that: \\ gunzip unionfs-2.1.8_for_2.6.21.7.diff.gz - cd linux-2.6.21.4 - patch -p1 <../unionfs-2.1.8_for_2.6.21.7.diff - cp /boot/config-2.6.21.4-eeepc .config - Now to actually compile it (use default answers, i.e. just press Enter when asked to choose). this will take about 30 minutes: make The kernel image will be in arch/i386/boot/bzImage ===== Rebuilding a vanilla kernel under other Linux distros ===== This section is tested under ubuntu 7.10. Note that this assumes a reasonable linux knowledge. Also the path's and directories may differ a little bit depending on your choices and paths. Some more info on setting up the environment can be found at http://www.debian-administration.org/articles/426 - login as root (or su) - apt-get install debootstrap - mkdir debian - debootstrap lenny debian - chroot debian - download the 2.6.21.4 kernel from kernel.org: http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.21.4.tar.bz2 - unpack this file. I did this in debian/usr/src (using a different shell): tar xvjf ../../../linux-2.6.21.4.tar.bz2 - download http://download.filesystems.org/unionfs/unionfs-2.x/unionfs-2.2.2_for_2.6.21.7.diff.gz to usr/src - gunzip unionfs-2.2.2_for_2.6.21.7.diff.gz - cd linux-2.6.21.4 - patch -p1 <../unionfs-2.2.2_for_2.6.21.7.diff - cp config-2.6.21.4-eeepc .config - mknod /dev/eee b 9 0 - make ROOT_DEV=/dev/eee (use default answers)\\ this will take some time (5 minutes on a 3Ghz Intel Dual core (D930)\\ The kernel image will be in arch/i386/boot/bzImage ===== Installing the kernel ===== Boot the eeePC so you can write to the first partition\\ copy bzImage to the first partition (e.g. /boot)\\ add an entry in menu.lst to reboot your new kernel (and while you are at it, change timeout to 3 and comment hiddenmenu. NOTE: You can't do the above unless you are in single-user-mode! See http://appliedlife.blogspot.com/2007/11/kernel-recompile-on-asus-eee.html and http://wiki.eeeuser.com/howto:installrescuemode for more about that. If you have compiled the kernel on another machine than eee so you have to install kernel and new modules too. - make a package which contains everything necessary:\\ cd $dir_where_kernel_has_been_compiled make INSTALL_MOD_PATH=$PWD modules_install mkdir boot cp -f arch/i386/boot/bzImage boot/vmlinuz-$version-eeepc cp -f System.map boot/System.map-eeepc tar cvjf lkupdate.tar.bz2 lib/modules boot - copy the package on the eee PC first partition:\\ sudo -s cd $dir_where_has_has_been_copied mkdir -p /mnt/sda1 mount -o ro /dev/sda1 /mnt/sda1 mount -o remount,rw /mnt/sda1 cd /mnt/sda1 tar xvjf $dir_where_archive_has_been_copied/lkupdate.tar.bz2 sync; cd; umount /mnt/sda1 - copy the package on the eee PC unionfs root partition:\\ cd / tar xvjf $dir_where_archive_has_been_copied/lkupdate.tar.bz2 ===== Changing the configuration ===== If you want to change the configuration you can edit the .config file and rerun make.\\ You can also use menuconfig to change the options. For that you need to install libncurses5-dev (**apt-get install libncurses5-dev**, then run **make menuconfig**\\ After that you can add the modules/functionality you need.\\ Be sure not to eliminate necessarily components (so avoid changing a y to m).\\ \\ If you are only interested in getting new modules, you can change .config and do make modules (or probably run make menuconfig; then make modules)\\ \\ The following is a list of things that you might want to change using menuconfig:\\ * For a kernel that supports 2G of memory: go into "Processor type and features", then go to "High Memory Support" and select 4GB. * For compiling USB into the kernel: go into "Device Drivers" then into "USB Support". Move down to the line EHCI HCD (USB 2.0) support and type **y**, move down to the line "OHCI HCD support" and type **y**, move down to the line "UHCI HCD (most Intel and Via) support, then type **y**, and move to the line "USB Mass Storage Support and type **y** * For compiling Bluetooth into the kernel: go into "Networking Support", move down to "Bluetooth subsystem support" then type **y**, then move into "Bluetooth subsystem support" and compile in whatever you need. * For adding support to "USB Generic Serial Driver", which is needed for one CDMA 1XRIT / EVDO modem. ===== Configuration Options ===== Which configuration options are required to use your EEE PC properly. 701, kernel 2.6.26-rc6: | **Config Option** | **Function** | | Power management options->CPU Frequency scaling->Intel Pentium 4 clock modulation | CPU Throttling | | Device Drivers->ATA SFF support->Intel ESB, ICH, PIIX3, PIIX4 PATA/SATA support | SATA | | Device Drivers->MMC/SD card support->Secure Digital Host Controller Interface support | SD Cardreader | | Networking->Atheros L2 Fast Ethernet support | LAN | | Device Drivers->Sound->Advanced Linux Sound Architecture->PCI devices->Intel HD Audio | Sound | | ? | Fan | | ? | Hotkeys | | linux-uvc.berlios.de | Webcam | | external madwifi modules | Wireless | | i2c + i801 | required for eee.ko, overlocking + fan control | | config_drm_i915 | required for xorg DRI | ===== Miscellaneous ===== You might want to add additional patches, e.g. from debian or xandros. The new atheros wireless HAL is currently in a development branch, but should hopefully, barring any other issues, be migrated to trunk and kernel soon. The kernel ath5k module may not work until then. Tarballs are available from http://snapshots.madwifi.org/madwifi-hal-0.10.5.6/ ===== Additional Sources ===== [[http://forum.eeeuser.com/viewtopic.php?id=65112|HOWTO: 901: Rebuild kernel (and add dmcrypt support) ]] \\ [[http://forum.eeeuser.com/viewtopic.php?id=55459|Kernel upgrade for eee for Xandros from stock 2.6.21.4 to 2.6.27.10]]