eeebuntu tip: using a custom kernel with ASUS's modules
I like the eee hardware but dislike the software. Personal preference; when I can't use a Mac I use Ubuntu. Readers will surely like some other distro (I know I used to be big on Gentoo), but this tip should not be distro-specific.
I wanted to put Ubuntu 7.10 on my eee without sacrificing any features. I've largely pulled it off, but it's a long journey down a narrow, undocumented road (sigh, Linux). The journey starts with the proverbial single step, which in this case is replacing the kernel with a largely identical one built from source. (If you're going to do anything cool to the kernel, you've got to be able to build it.)
I started out by installing Ubuntu 7.10 off a live stick. This isn't strictly necessary -- the kernel we're building will probably work in Xandros -- but since Ubuntu is my eventual goal, I aimed high. The live stick boots without a hitch (into Compiz, no less!) and the install was uneventful. Note before installing: there are files on the eee's filesystem you will need to complete this tutorial! It is worth your time to make a backup in an accessible form, such as dd'ing the filesystem to somewhere you can loop-mount it.
(Caveat lector: I actually installed onto an SD card, leaving the internal flash disk unmodified, but doing this requires a bunch of extra steps that are not documented here. It's sufficiently involved that I'll have to describe it in a followup.)
The install was largely uneventful and is not the topic of this post.
Ubuntu 7.10 does not, out of the box, support the following hardware on the eee:
(Those of you who have been in the Linux/FreeBSD laptop community for some time may notice how incredibly short that list is, and the fact that it does not include multihead 3D accelerated graphics, audio, and USB 2. How far we've come.)
As a result of the botched ACPI support, suspend/resume doesn't work quite right. Suspend-to-RAM will work sometimes, kinda, after a few VT switches to thunk the display adapter. Not good enough! I want instant suspend/resume and working wireless! Waaaah, the Mac has spoiled me! :-)
The pragmatic solution, if not the most FSF-friendly one, is to build a kernel with the exact version string from ASUS's so their binary modules will work. (If you care, note your kernel will be tainted! Danger Will Robinson!)
The recipe below skips some steps and is not intended for Linux or Unix newbies. Sorry; I've been immersed in Unix long enough that I'm not the right guy to write the newbie tutorial. Feel free to steal my instructions to make one!
At this point, if it worked, you have a booting Ubuntu (or ${YOUR_DISTRO}) system running on a reasonable facsimile of ASUS's 2.6.21.4 kernel. If you issue
You may find that suspend/resume to RAM works with the asus_acpi module loaded. Edit your /etc/modules as you see fit.
Getting from "loading the Atheros modules" to "reading Slashdot" is unfortunately involved -- but the process is no different than the normal madwifi drivers. (Hint: until I post my scripts, search on Google for "wlanconfig ath0 create".)
Happy hacking!
I wanted to put Ubuntu 7.10 on my eee without sacrificing any features. I've largely pulled it off, but it's a long journey down a narrow, undocumented road (sigh, Linux). The journey starts with the proverbial single step, which in this case is replacing the kernel with a largely identical one built from source. (If you're going to do anything cool to the kernel, you've got to be able to build it.)
I started out by installing Ubuntu 7.10 off a live stick. This isn't strictly necessary -- the kernel we're building will probably work in Xandros -- but since Ubuntu is my eventual goal, I aimed high. The live stick boots without a hitch (into Compiz, no less!) and the install was uneventful. Note before installing: there are files on the eee's filesystem you will need to complete this tutorial! It is worth your time to make a backup in an accessible form, such as dd'ing the filesystem to somewhere you can loop-mount it.
(Caveat lector: I actually installed onto an SD card, leaving the internal flash disk unmodified, but doing this requires a bunch of extra steps that are not documented here. It's sufficiently involved that I'll have to describe it in a followup.)
The install was largely uneventful and is not the topic of this post.
Ubuntu 7.10 does not, out of the box, support the following hardware on the eee:
- The Atheros wireless card. (The madwifi drivers ASUS ships are not the 9.3.3 drivers, and a freshly built set from SVN trunk doesn't work either.)
- The ASUS ACPI features for controlling backlight and powering PCIe devices on and off. The mechanism is conceptually similar to the kernel's asus_acpi module, but as I noted in a previous post, ASUS ships a modified driver.
(Those of you who have been in the Linux/FreeBSD laptop community for some time may notice how incredibly short that list is, and the fact that it does not include multihead 3D accelerated graphics, audio, and USB 2. How far we've come.)
As a result of the botched ACPI support, suspend/resume doesn't work quite right. Suspend-to-RAM will work sometimes, kinda, after a few VT switches to thunk the display adapter. Not good enough! I want instant suspend/resume and working wireless! Waaaah, the Mac has spoiled me! :-)
The pragmatic solution, if not the most FSF-friendly one, is to build a kernel with the exact version string from ASUS's so their binary modules will work. (If you care, note your kernel will be tainted! Danger Will Robinson!)
The recipe below skips some steps and is not intended for Linux or Unix newbies. Sorry; I've been immersed in Unix long enough that I'm not the right guy to write the newbie tutorial. Feel free to steal my instructions to make one!
- Prereq: a Linux machine with a working set of devtools and the 2.6 version of depmod. This might be the eee, I suppose, but I used a much faster machine. (Specifically, an Ubuntu 7.10 virtual machine under VMware Fusion.)
- Download the sources for the matching Linux kernel version -- in this case, 2.6.21.4. (For the kernel-impaired, it comes from kernel.org's 2.6 site.)
- Untar.
- Nab the ASUS kernel configuration, helpfully shipped right on your eee. It lives in
/boot/config-2.6.21.4-eeepc
. Copy it into your untarred kernel sources as a file named.config
. - If you tried to build the kernel now, you'd notice some errors about missing unionfs. Unionfs isn't in the 2.6.21.4 mainline kernel, but ASUS uses it. If you want it, download the version for 2.6.21.7 and apply it in the kernel tree with
If you don't want it, simply delete or comment out all lines in the config containing the word UNIONFS.patch -p1 </path/to/patch
- ASUS's config in place, build a replacement kernel by issuing
make oldconfig && make
- Create a directory to hold your new kernel and modules, and issue
You do not need to (and should not!) run these commands as root.make INSTALL_PATH=/your/directory install
make INSTALL_MOD_PATH=/your/directory modules_install - In your directory are a bunch of files: a kernel and associated files at the root, and a
lib/modules/2.6.21.4-eeepc
directory with your modules in it. - Copy the files out of the directory into /boot on your eeepc. Note at this point that, if you are still running Xandros, you have just overwritten your kernel. Hope you had a backup. (If you're running Ubuntu 7.10 you have installed an additional kernel alongside the main one. This is safe.)
- Copy the contents of the
/lib...
directory, not into /boot with the others, but into/lib/modules/2.6.21.4-eeepc
. - Try booting your eee. You will need to get to the grub menu and change the "kernel=" parameter. (How to do this is beyond the scope of this article.) If it does not work, I'm afraid I am not the man to help you; I make Linux work through sheer dumb luck and a lot of Unix engineering experience, but a Linux guru I'm not.
- If it seems to work, simply copy the
atheros
andacpi
. directories from/lib/modules/2.6.21.4-eeepc
on your eee backup filesystem into the same locations on the new one, and run (as root)depmod -a
.
At this point, if it worked, you have a booting Ubuntu (or ${YOUR_DISTRO}) system running on a reasonable facsimile of ASUS's 2.6.21.4 kernel. If you issue
modprobe asus_acpi
or modprobe ath_pci
, the modules should load (and put some control files in /proc/acpi/asus, or create wlan0, respectively).You may find that suspend/resume to RAM works with the asus_acpi module loaded. Edit your /etc/modules as you see fit.
Getting from "loading the Atheros modules" to "reading Slashdot" is unfortunately involved -- but the process is no different than the normal madwifi drivers. (Hint: until I post my scripts, search on Google for "wlanconfig ath0 create".)
Happy hacking!
19 Comments:
Thanks for the tutorial. The new kernel won't load the asus modules: Invalid module format. I am going to try to remove module versionning from the config file.
By Ben, at 6:37 PM
It works!
so, just make sure that the kernel does not support module versions in .config
# CONFIG_MODVERSIONS is not set
another thing is to get wlanconfig scripts, download the .deb for madwifi-tools from http://packages.ubuntu.com/gutsy/net/madwifi-tools
and install it (dpkg -i ..., or double-click on it)
enjoy.
By Ben, at 7:13 PM
Benoit, glad you got it working!
In my case, I didn't have to disable module versioning. Just make sure the kernel you build reports the exact same version string as the ASUS kernel and you should be good. In particular, don't change the "-eeepc" string!
I'm happy to post my config if it would help -- it really does Just Work.
By Cliff L. Biffle, at 10:54 PM
Oh, I missed your second comment, Benoit.
The wlanconfig scripts aren't necessary, and interfere with NetworkManager. I'm preparing a tutorial on getting hal to auto-create the ath0 interface and configure it with NetworkManager -- it's far more pleasant! I'll post it soon.
By Cliff L. Biffle, at 10:55 PM
I played around a little with networkmanager trying to understand why it did not create the device automatically. my only clue is that the device is reported as an ethernet controller in lspci and hal-device-manager. it has capabilities 802.03 instead of 802.11
do you know a way to fix this?
By Ben, at 11:08 PM
Benoit,
Yup. See my next post.
By Cliff L. Biffle, at 12:22 AM
Thanks for the great writeup!
By Garry Dolley, at 12:31 AM
Thanks for the great writeup! I just got my Eee and am wondering which distro I want to run - F8 or Ubuntu... but the remark that I wanted to ask you about is the one where you say that you are simply booting from an SD card. I tried that and couldn't get it to work... a few pointers would be welcome (and no, I am not a Linux newby)
By D2, at 8:41 PM
d,
Long story short: the SD card shows up as a standard USB device, assuming you have it enabled in the BIOS.
However, it takes about 6 seconds for the 2.6.21.4 kernel to enumerate USB devices after starting up and loading the modules. As a result, if your kernel tries to mount the root filesystem in less than 6 seconds, it will panic.
My solution is to create an initrd with "sleep 6" at the top of the init script. (Also, make sure USB support is either compiled-in or available to the initrd.)
Note that the USB devices will re-enumerate if you have something else plugged in at boot (the card reader, normally sdb, will become sdc or sdd). If your initrd can identify the root by UUID or LABEL, you're good, but mine can't -- so I just don't plug anything in at boot. :-)
I'll post a more detailed writeup soon.
By Cliff L. Biffle, at 11:28 AM
This is complete package. You write briefly in this article. These both blog entry totally informative for readers.
Hadoop Training Institute in Noida
By ciitnoida, at 11:52 PM
تعد شركة تركيب اثاث ايكيا بالرياض هي الشركة الرائده والاولي في كافة الاثاث من تركيب وفك ونقل وتخزين وكافة الاعمال المتعلقة بالاثاث في الرياض وكافة المناطق والمحافظات بالمملكة العربية السعودية، وقد تصدرت شركة خبراء المملكة لتكون الأولى في مجال فك ونقل وتركيب الأثاث المنزلي وايضا فك وتركيب الستائر بالرياض وهي تتميز عن باقي شركات الرياض نظرا لما تقدمة من خدمات بشكل احترافي كما انها تتميز عن غيرها بكفاءة الفنيين والامتخصصين في مجال تركيب الاثاث فلا داعي لكثرة البحث فلديك خبراء المملكة فهم فعلا خبراء ومتميزون في جميع خدماتهم المقدمة
شركة تركيب اثاث ايكيا بالرياض
فني تركيب اثاث ايكيا بالرياض
شركة تركيب ستائر بالرياض
عامل تركيب ستائر بالرياض
شركة تركيب غرف نوم بالرياض
فني تركيب غرف نوم بالرياض
شركة تركيب باركية بالرياض
شركة تركيب عفش بالرياض
ما يميز شركة تركيب نقل وتركيب اثاث بالرياض
- تعد شركة تركيب اثاث ايكيا من الشركات المفضلة لكثير من العملاء فهم من منحوها الصدارة والتميز لتميز الخدمات المقدمة لهم وهي الاولي في تركيب الاثاث لزيادة خبراتها الكبيرة لسنوات.
تتميز ايضا شركة خبراء المملكة بكبر فرق العمل المتخصصة والمدربة بمهاره وتقنية عالية كما اننا ندعم صفوفنا بصفة مستمرة من العمال والموظفين والفنيين الأكفاء والمهرة كما انها Jستقبل العمالة الفليبنية
By anosh, at 12:00 PM
شركة مكافحة البق بالدمام
شركة تسليك مجارى بالخبر شركة تسليك مجارى بالخبر
شركة تسليك مجارى بالجبيل شركة تسليك مجارى بالجبيل
شركة تنظيف مجارى بالقطيف شركة تنظيف مجارى بالقطيف
شركة تنظيف منازل بالخبر افضل شركة تنظيف منازل بالخبر
وايت شفط مجارى بالدمام شركة شفط مجارى بالدمام
شركة جلى رخام بالرياض جلي وتلميع رخام بالرياض
By jojo, at 2:15 PM
hotmail sign in
Much informative article, and I really appreciate this info and willing for moreinteresting article like this.
By hotmail, at 8:16 PM
الابداع
شركة عزل فوم بالرياض
عزل فوم بالرياض
شركة تركيب باركيه بالرياض
تركيب باركيه بالرياض
تركيب سيراميك باركيه بالرياض
شركة تنظيف مجالس بالرياض
تنظيف مجالس بالرياض
شركة تنظيف خزانات بالرياض
شركه تنظيف وعزل خزانات بالرياض
شركة تسليك مجاري بالرياض
شركة تسليك مجارى شمال الرياض
تسليك مجاري بالرياض
تسليك مجاري بالضغط بالرياض
By sara, at 10:04 AM
شركة تسليك مجاري بالضغط بالرياض
شركة تنظيف مسابح بالرياض
شركة تنظيف وصيانة مسابح بالرياض
شركة عزل اسطح بالرياض
عزل اسطح في الرياض
شركة تركيب اثاث ايكيا بالرياض
فنى تركيب اثاث ايكيا بالرياض
شركة تركيب ستائر ايكيا بالرياض
شركة تنظيف سجاد بالرياض
شركة مكافحة الوزغ بالرياض
شركة مكافحة الوزغ بالرياض
مكافحة الوزغ بالرياض
شركة تنظيف مكيفات بالرياض
By sara, at 10:05 AM
شركة مكافحة حشرات بالرياض
شركة مكافحة الحشرات بالرياض
شركة نقل عفش بالرياض
نقل عفش بالرياض
شركة نقل عفش بالرياض
شركة نقل اثاث بالرياض
By sara, at 10:09 AM
شركة كشف تسربات المياه بمكة
تنسيق حدائق منزلية بجدة
تركيب باركيه بجدة
كلادينج
كلادينج جدة
مظلات
By sara, at 10:17 AM
I have been searching for quite some time for information on this topic and no doubt your website saved my time and I got my desired information. Your post has been very helpful. look for instagram from my site picbear
By Sophie Grace, at 12:36 AM
Your website is very good and nice information was provided in your site, thanks for sharing.
python internship | web development internship |internship for mechanical engineering students|mechanical engineering internships|java training in chennai |internship for 1st year engineering students |online internships for cse students|online internship for engineering students |internship for ece students|data science internships |
By periyannan, at 5:54 AM
Post a Comment
<< Home