As most of you have already noticed I have a Yeeloong netbook and I read that it’s actually possible to install Debian Squeeze on it, even though Squeeze officially doesn’t support the Yeeloong or the Loongson processor. Fortunately the install doesn’t involve anything too scary. The Debian mipsel binaries are o32 binaries not really optimized for a particular CPU, which means they will run on lots of CPUs (not unlike how the i386 binaries run on most x86 processors). The Loongson 2F processor has all instructions to be MIPS III compliant, which is enough for the Debian binaries. So where is the problem then? It’s with the kernel, Debian doesn’t provide any linux kernel images for the Loongson CPU and even more particularly the Yeeloong Netbook.
Basic Installation
I’ve built a kernel image and kernel package for general use on the Yeeloong which is also capable of booting the Malta Debian installer. To actually use them download all three, and put them in the root of an ext2 formatted USB stick. Then plug the USB stick into your Yeeloong and make sure it has wired Ethernet connectivity. Then start the Yeeloong and press Del during bootup to enter PMON (it’s BIOS alternative). In PMON you need to enter the following commands:
load /dev/fs/ext2@usb0/vmlinux-2.6.38.3
initrd /dev/fs/ext2@usb0/initrd.gz
g
If you use an older kernel you also need to pass the ‘console=tty’ and ‘no_auto_cmd’ parameters to the g command.
If all went well you’ll notice the Debian installer starting, and prompting you with it’s first questions. Select your preferred language, location, locale, keyboard layout, hostname, domainname, Debian archive mirror & proxy information.
If all went well, you’ll notice the Debian installer complaining it hasn’t found any (matching) kernel modules, and it’ll ask you if you want to proceed without. We’ll answer Yes, since everything critical has been monolithically compiled into my custom kernel.
Next, setup your root password and an initial user account.
Now we’re entering the partitioning tool, which will complain with a scary red dialog that my custom kernel is missing Software RAID and LVM support, which we really don’t need. Select continue for both warnings.
Now we’ve really entered the partition tool, and you’ll notice two devices the (probably) FUJITSU 160GB harddisk, and the USB stick, make sure you don’t touch the USB stick (sdc). Then select the FUJITSU (sda) harddisk and press enter, which will effectively erase the whole disk, and reinitialize the disk with a new partition table. The partitioning tool will complain that it does not know the partition table type for the Loongson architecture. Select the familiar msdos partition table type. Next create a new partition, 1GB, primary, beginning, make sure it’s used as the ext2 file system otherwise your yeeloong won’t boot, with a /boot mount point and relatime,sync mount options. When you’re done setting up the first “special” boot partition. We can create a new swap partition: 2GB, primary, beginning, use as swap area. With that done, we can create a new root partition: 17GB, primary, beginning, use as ext4 journaling file system, mount point / , mount options relatime. And last we can create a new home partition: 140GB, primary, beginning, use as ext4 journaling file system, mount point /home, mount options relatime. Now finish and write the changes to disk.
You’ll notice the Debian installer downloading packages and installing them. At some point it will complain no installable kernel was found, and if you want to continue without a kernel. Yes you do.
Now only a few things are left, software selection, where I usually unselect everything, and bootloader installation, where the installer will complain it can’t install any. We don’t care as the Yeeloong doesn’t need a bootloader at all. So we continue.
When we (next) get the “Finish the installation” dialog, we do not continue immediately. Instead we press Ctrl+Alt+F2 and Enter (to active the console). Now we need to manually install a kernel package, to do so enter the following commands:
mount /dev/sdc1 /mnt
cp /mnt/linux-image-2.6.38.3_2.6.38.3-0yeeloong0_mipsel.deb /target/root
umount /mnt
chroot /target /bin/bash
dpkg -i /root/linux-image-2.6.38.3_2.6.38.3-0yeeloong0_mipsel.deb
cp /boot/vmlinux-2.6.38.3 /boot/vmlinux
exit
exit
Then press Ctrl+Alt+F1 to return to the installer and finally press continue to reboot. During the reboot press Del to enter PMON once again, since we need to tell PMON about our new installation:
set ShowBootMenu "no"
set al "/dev/fs/ext2@wd0/vmlinux"
set arg "root=/dev/sda3"
reboot
Now you should see your Yeeloong reboot again, and booting into your new Debian Squeeze installation.
Installing extra utilities
Your new clean installed Debian system isn’t very useful yet, so you’ll need to add some extra software. One of the things I usually do is disable the installation of “Recommended” packages, these are a kind of soft dependancy, this is how packages pull along other packages which aren’t strictly required, but are usually nice to have but sometimes are utterly useless (and clutter up your system). So to disable the automatic installation of Recommends do the following as root:
echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf.d/99synaptic
Whenever you install a new package apt will tell you what it’s Recommends would have been, I highly recommend you to inspect the Recommended packages to see if they would be useful to you.
Now, let’s install a bunch of packages I always like to have handy:
apt-get install alsa-base alsa-utils autoconf automake build-essential \
libncurses5-dev autotools-dev binutils bison \
busybox-static bzip2 cdbs command-not-found coreutils \
cpio curl debhelper devscripts dpkg-dev fakeroot file \
findutils flex fortune-mod fortunes-debian-hints g++ \
gcc gdb gfortran git-core gnupg gobjc grep gzip \
iproute less lftp links lsof m4 make mtr-tiny nano \
openssh-client patch pciutils usbutils procps psmisc \
quilt rsync screen sharutils sl smartmontools splint \
subversion sudo telnet tftp-hpa unzip util-linux wget \
wpasupplicant xz-utils
This will take a while to install, but it’ll leave you with a very functional base system.
Installing Basic X11
Before installing X11 there are a couple of considerations. First I would highly recommend using my optimized pixman packages (though Debian’s own pixman will work). Next you’ll have to choose between an optimized SiliconMotion driver and using Xorg via the kernel framebuffer. If you need video playback you should use the optimized SiliconMotion driver, if you don’t you might want to consider sticking with the linux framebuffer driver, since with it, tty switching will be smoother, and you won’t need patched Xorg packages. And last but not least you’ll need to choose a login manager. I highly recommend SLiM, though Debian’s version is a tad buggy, I have a fixed package available as well (with GNOME Keyring integration for Network Manager).
My repository has the following mipsel components available: linux, pixman, slim, thinice, ufraw, xorg. To use my repository with the optimized pixman, fixed SLiM login manager, my customized ThinIce theme and updated ufraw, execute as root:
echo 'deb http://debian.pcode.nl/debian squeeze linux pixman slim thinice ufraw' > /etc/apt/sources.list.d/pcode.list
apt-get update
apt-get install xserver-xorg xserver-xorg-input-evdev \
xserver-xorg-input-mouse xserver-xorg-video-fbdev \
slim
Installing XFCE
Now we have a very basic X11 setup, we probably want a decent desktop environment as well. To get a basic but functional XFCE installation:
apt-get install xfce4-panel xfce4-session xfce4-settings xfce4-terminal \
xfce4-utils xfdesktop4 xfwm4 xfwm4-themes thunar \
network-manager-gnome libpam-gnome-keyring thinice-noble \
gnome-noble-icon-theme gnome-keyring seahorse gtk2-engines \
ttf-liberation ttf-dejavu-core gsfonts ghostscript
If you like my old school UNIX like ThinIce-Noble theme, you can download my skel files here, and install them to be used with newly created users:
cd /etc/skel
tar zxvf /root/xfce-thinice-noble-skel.tar.gz
Installating Applications
Obviously without applications your new desktop is useless, just some quick tips:
apt-get install iceweasel geany abiword xarchiver
apt-get install gimp gimp-plugin-registry gimp-resynthesizer gimp-ufraw
Have fun.