EeeBSD
This guide is to describe solutions to problems installing FreeBSD onto the Asus EeePC series of subnotebook computers. This guide was written for FreeBSD 7.0-BETA3/i386 on an Asus EeePC model 701 (4GB SDD with webcam), but should work with other models of the Eee and different versions of FreeBSD.
Installation
Installation of FreeBSD onto the Eee is reasonably straightforward. "Out of the box" most things work, but you should take the following into account when installing.
- It's difficult to partition the 4GB SSD into useful sizes. During my first install attempt, I ran out of space in my / partition (NOT GOOD). I ended up deciding to make the entire "disk" one partition. This is not necessary, but is probably a good idea.
- You probably won't want to make a swap partition. As highly non-recommended as this is, it's really not a good idea to use flash storage for swap. It'll kill the SSD very quickly, and that you probably want to avoid. I can run Firefox, Thunderbird, several xterms, and compile ports simultaneously without running out of memory, and my Eee still has the stock 512MB of memory. If you feel that you need more memory, get more physical memory.
- After installation, you will not have any networking, as appropriate drivers are not in the default install. MAKE SURE YOU INSTALL AT LEAST THE KERNEL SOURCES, AS YOU WILL NEED THEM TO GET NETWORKING WORKING.
- Obviously, the Eee does not have an optical drive. The easiest way to install is either to make a bootable USB key with the installation media on it, or get a USB CDROM drive. Usually it's possible to take apart a USB hard drive and attach a standard IDE CDROM to its controller board. The Eee does technically support netboot, so it might be possible to do a network install, but you'll need to build a custom kernel with appropriate network drivers (see the networking section below).
- Remember not to try to install the amd64 port of FreeBSD. Unlike many new laptops, the Eee does NOT have a 64-bit CPU.
Other than taking these notes into account, installation should be reasonably standard. After installation is complete, you may want to edit your /etc/fstab file to make / (and any other partitions you decided to make) mount with noatime. This will reduce the number of writes made to your SSD, and will theoretically prolong its life.
Post-Installation
After installation, several things will not work quite right.
Wireless Networking
The wireless card in the EeePC is an Atheros card which would normally be supported by FreeBSD's ath driver, except that the HAL in the stock driver does not support PCIe as used in the Eee.
On another computer that does have internet access, download this patched copy of MadWifi, which does have support for the wireless card in the Eee: http://snapshots.madwifi.org/special/madwifi-ng-r2756+ar5007.tar.gz
Copy the tarball onto the Eee using a USB memory key or some other media. Decompress the tarball and then run the following as root:
cd madwifi-ng-r2756+ar5007/hal cp -R * /usr/src/sys/contrib/dev/ath/
Recompile your kernel, and reboot. When the system comes up, you should have wireless networking. The NIC will show up as ath0. Note that compiling the kernel will probably take about two hours. Go get some coffee or something.
- Important warning: DO NOT USE Fn+F2 ONCE THE WIRELESS CARD DRIVER IS LOADED! Fn+F2 will do what it says (toggle power to the wireless card), but the driver does not know how to handle this state and will get rather angry at you if the wireless card disappears.
Wired networking
Out of the box, there is no driver for the wired NIC in the Eee. The Ethernet chipset is an Attansic L2 10/100. The lii driver in NetBSD 5.0 supports this network card, and work is being done to port that code to FreeBSD. I will post when I hear that the ported driver is available.
Sound
The Eee uses the standard Intel High Definition Audio chipset for sound. Add the following to /boot/loader.conf to load the appropriate driver:
snd_hda_load="YES"
Hotkeys
The hotkeys for switching between the internal display and external display, the sound controls, and whatever Fn+F6 is supposed to do don't work. I haven't gotten around to figuring out how to fix them. Also, see my note in the Wireless section regarding Fn+F2.
X11
Make sure you install the xorg-drivers/xf86-video-intel driver and not xorg-drivers/xf86-video-i810.
Once you do that, you can use this xorg.conf:
Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
Section "Files"
RgbPath "/usr/local/share/X11/rgb"
ModulePath "/usr/local/lib/xorg/modules"
FontPath "/usr/local/lib/X11/fonts/misc/"
FontPath "/usr/local/lib/X11/fonts/TTF/"
FontPath "/usr/local/lib/X11/fonts/OTF"
FontPath "/usr/local/lib/X11/fonts/Type1/"
FontPath "/usr/local/lib/X11/fonts/100dpi/"
FontPath "/usr/local/lib/X11/fonts/75dpi/"
FontPath "/usr/local/lib/X11/fonts/URW/"
FontPath "/usr/local/lib/X11/fonts/bitstream-vera/"
EndSection
Section "Module"
Load "extmod"
Load "record"
Load "dbe"
Load "glx"
Load "GLcore"
Load "xtrap"
Load "dri"
Load "freetype"
Load "type1"
EndSection
Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
EndSection
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/sysmouse"
Option "ZAxisMapping" "4 5 6 7"
EndSection
Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
ModeLine "800x480" 29.58 800 816 896 992 480 481 484 497 -HSync +Vsync
Option "DPMS"
EndSection
Section "Device"
Identifier "Card0"
Driver "intel"
VendorName "Intel Corporation"
BoardName "Mobile 915GM/GMS/910GML Express Graphics Controller"
BusID "PCI:0:2:0"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
SubSection "Display"
Viewport 0 0
Depth 24
Modes "800x480"
EndSubSection
EndSection
Webcam
To my knowledge, no drivers exist for the webcam.
Other Notes
I've found that the 4 GB SSD is rather restrictive, especially if you have the ports and source trees installed. You may wish to consider getting an SDHC (Secure Digital High Capacity) card to put in the reader and use it for /home. The prices on 8 and 16 GB cards have dropped significantly recently (16 GB cards are now sub US$70, and 32 GB cards are becoming available (though are still in the US$300 range).
Video Playback
I've found that a great use for my Eee is to watch movies. Obviously, however, the Eee doesn't have an optical drive, so that can be a bit tricky. What I've found works best is to transcode the video into h.264. To save encode time, I stuck with using a constant "quality" setting of 50% (setting an average bitrate requires making two passes over the input data). Since the Eee's screen is so close to the native resolution of DVDs, I decided to leave the encoded resolution the same. This results in video on the Eee that looks nearly as sharp as high-definition content looks on my HDTV at home, though obviously much smaller. I use vlc for playback, and as long as you configure it to use Xv for output, the Eee's CPU is powerful enough to decode all but the most complex of video (when playing back video that has a sequence where there is a LOT of on-screen movement, like an explosion or something, the video may loose some frames).
If you pair your Eee with a high capacity "external" battery (like this one) and a large SD card, you will end up with a great portable movie-watching device. I was able to play back movies on mine nonstop during my recent 9 hour flight from Rome to Washington. Just some food for thought.
Contact info
If you have any questions or comments, please feel free to contact me at james@nighthack.org.
