8/21/2011
I have an ARM (WM8505 SOC based ) 7 inch "netbook" and I was able to
get Arch Linux running on it. I thought I would describe how to do
that here in case others are interested in the same thing.
The only tricky part was getting the kernel for it. The mainline
kernel.org code doesn't have all the support in it yet for these type of
netbooks so I had to get it from elsewhere. Plus other supporting
pieces had to be put together to get it running.
Briefly, an SD card will be used to contain the Linux install. The
first partition of the SD card will be used to contain the boot
'scripts' and the kernel. The netbook firmware looks on the first
SD card partition and if it finds the proper script files there, it will
execute them and this will start the kernel running.
========================================================================
What is needed:
0) An SDHC card (plain SD might work -- but didn't try one...). Mine is
4Gig and I partitioned and formatted it as follows:
Command (m for help): p
Disk /dev/sdc: 3951 MB, 3951034368 bytes
122 heads, 57 sectors/track, 1109 cylinders
Units = cylinders of 6954 * 512 = 3560448 bytes
Disk identifier: 0x1feeeff9
Device Boot Start End Blocks Id System
/dev/sdc1 1 9 31264+ b W95 FAT32
/dev/sdc2 10 572 1957551 83 Linux
/dev/sdc3 573 798 785802 82 Linux swap / Solaris
/dev/sdc4 799 1109 1081347 83 Linux
Formatted partition 1 as FAT, 2 as ext2, 3 as swap and 4 as ext3
1) fatpart.tgz: wget http://crux-arm.nu/files/devices/wm8505/fatpart.tgz
This provides the boot script files needed to boot Linux on the device. The
firmware on the netbook looks for these script files on the first
(needs to be FAT FS) partition of the SD card and, if found, executes
them. The commands in these scripts load the kernel and start it running.
There is also a kernel (uzImage.bin) in this tarball. However it
is old, doesn't work for this, and I replace it with a more current one.
2) Kernel code from http://gitorious.org/linux-on-via-vt8500
The site has work in progress kernel code for the wm8505/vt8500 netbooks.
It's tarball naming implies it is 2.6.35 based but I found that it is actually
looks like it is kept reasonably current with the mainline kernel code.
3) kernel config file. (mine is attached).
This config works with my flavor netbook but may not on others. Adapt it
for your specific HW or just roll your own however you like.
4) The Arch Linux ARM 'tarball':
wget http://archlinuxarm.org/os/ArchLinuxARM ... est.tar.gz
I did an install with both the 'latest' and June 2011 versions of the
tarball. Both worked ok.
========================================================================
What to do:
1) (Cross) Build the initial kernel.
The tricky part to getting it running is that there is no kernel
for the netbook in the Arch tarball. So, I initially used the
ELDK-5.0 tool kit to cross build a kernel (used 'make uImage') using
the kernel source from gitorious and my kernel config file. Once the netbook
was booting, I then rebuilt the kernel natively on my netbook and
began using a native built kernel instead.
After build, the needed kernel file is found in ./arch/arm/boot/uImage.
2) Load SD card partition 1 (boot partition)
On host machine, mkdir /mnt/loadit and then mount partition 1
of the SD card as /mnt/loadit and cd to /mnt/loadit.
Extract the fatpart.tgz file into the partition... tar xvfzp fatpart.tgz
(from wherever it is). cd down to the script directory and
then mv uzImage.bin orig.uzImage.bin (just in case you want it later...)
and then cp uImage uzImage.bin (from wherever your kernel uImage file is.)
cd out of /mnt/loadit and unmount it.
3) Load SD card partition 2 (root partition)
Again, do on host machine...
Mount SD card partition 2 (root partition) as /mnt/loadit and
cd to /mnt/loadit.
Then extract the Arch Linux tarball:
tar xvfzp ArchLinuxARM-armv5te-latest.tar.gz (from wherever it lives).
(My kernel doesn't have any crucial modules so I just skipped installing
modules until later when I built it natively.)
Edit /mnt/loadit/etc/fstab and modify it to match the SD card partitions:
#
# /etc/fstab: static file system information
#
# <file system> <dir> <type> <options> <dump> <pass>
/dev/mmcblk0p1 /boot vfat defaults 0 0
/dev/mmcblk0p2 / ext2 defaults 0 0
/dev/mmcblk0p3 swap swap defaults 0 0
/dev/mmcblk0p4 /home ext3 defaults 0 0
devpts /dev/pts devpts defaults 0 0
none /sys sysfs defaults 0 0
none /proc proc defaults 0 0
#tmp /tmp tmpfs defaults 0 0
shm /dev/shm tmpfs defaults 0 0
#usb /proc/bus/usb usbfs defaults 0 0
Edit /mnt/loadit/etc/inittab. I shut off the ttyS0 agetty since
my netbook does not have a serial port.
cd out of /mnt/loadit and umount it.
4) Transfer SD card to netbook.
Make sure all SD card partitions are unmounted and then put the
SD card into the netbook SD card slot. Connect the netbook ethernet
port to the network and power the netbook on.
Should boot to a prompt. Will complain about missing modules but
will boot ok.
Login as root. Then install the needed compile tools by doing:
pacman -Sy base-devel file which linux-api-headers uboot-mkimage
Numerous things are updated. I rebooted it after the updates finished
(rebooting is probably not needed but I'm paranoid so I do.)
Get a copy of the kernel code tarball and config file onto the
netbook. Unpack the kernel tarball and cd into it. Do a
'make mrproper' and then copy the config file to '.config'. Do
'make oldconfig' and then 'make uImage' and then 'make modules_install'.
Then 'cp -f arch/arm/boot/uImage /boot/script/uzImage.bin' (SD card
partition 1 should be mounted as /boot...)
It took about 4 hours to rebuild the kernel natively on the netbook
(it's a slow 300Mhz...).
Then reboot and it will restart on the native built kernel.
Done.
Networking, USB flash sticks, USB keyboard all work....
I don't know if sound and wireless work cause I don't use those.
The only oddity that I've found is that the RTC seems to work
fine unless it gets out of whack (like if the netbook battery runs completely
out...). Then linux doesn't seem to be able to set the date. In that
situation, I've had to reboot into Windows CE and reset the RTC with it
for it to work again with Linux.
The netbooks come with Windows CE pre-installed in the netbooks builtin
storage. Linux runs from the SD card, and this install does not
displace CE. So, (unless you do something that corrupts the CE storage
device) you can get back into CE by powering down, removing
the SD card and then starting it back up.