La terre vue d'ailleurs
[306] La terre vue d'ailleurs / Informatique / Zaurus / How to update and flash the kernel on the Netwalker (Sharp PC-Z1)
Zaurus :
Jiba
The Netwalker is a very small laptop computer with an ARM CPU, running Ubuntu GNU/Linux. As it uses flash memory instead of a hard drive, you need a special procedure to update the kernel (the Netwalker does not use standard boot loader like Lilo or Grub). This small how to describes how to compile the Linux kernel for the Netwalker, and then how to flash the kernel. I will provide interesting kernel hacks later on this blog.

Compiling the kernel

I used the kernel from Canonical archive. The sources are available here: http://netbook-remix.archive.canonical.com/updates/pool/public/l/linux-fsl-imx51/linux-fsl-imx51_2.6.28-15.50fsl1araneo7.tar.gz. It is not the same sources used by Sharp, but they work well.

Then, you can grab the Sharp's Netwalker kernel configuration in /sys/config.gz . Uncompress it, rename it ".config", and move it in the kernel source directory. Add in the kernel config the option CONFIG_KS7010_SDIO for the Wifi (strangely it is not present in /sys/config.gz).

Finally, compile the Linux kernel as usual, and install it.

Flashing the kernel

  1. You need a 2 Gb (or more) microSD / microSDHC card. BEWARE : the card will be reformatted and any data on the card will be deleted! You should also make a safe copy of any data on the Netwalker.
  2. Create a microSD recovery card; instruction are in Japanese on Sharp's website, so here is a summary.
  3. Download this script, and uncompress it: http://www.sharp.co.jp/support/ex-data/recovery.sh.tar.gz
  4. Insert the microSD card in the Netwalker, connect the Netwalker to Internet, and run the script. The script will set up the recovery card. It downloads many data (about 1 Gb) and thus it takes several hours.
  5. The microSD recovery card can be used to reset the Netwalker, reflashing the kernel and erasing all data. This can be done by shutting down the Netwalker, and pressing both mouse button at start-up (you need to press the button quite a long time). However, this is not what we want to do: the objective of this how-to is to flash only the kernel. To do so, follow the next steps.
  6. Mount the microSD card. This can be done with these commands:
    mkdir /tmp/test
    mount /dev/mmcblk0p1 /tmp/test
    
  7. Edit file /tmp/test/firmware/spider.srp ,and remove the line "5,ubi.img". This line is responsible for erasing all data on the Netwalker. The next line (4,zImage) is responsible for flashing the kernel, so we keep it.
  8. Replace /tmp/test/firmware/zImage by the new kernel image (typically /boot/vmlinuzXXX).
  9. Edit file /tmp/test/usr/local/bin/update_spider.sh . At line 47 and following, add /tmp/test before /usr/local/bin/... (there is 5 lines to modify).
  10. Connect the Netwalker's power cable.
  11. Run /tmp/test/usr/local/bin/update_spider.sh . Then press "y", wait a few second and press any key to exit.
  12. The kernel has been flashed! Now, reboot the Netwalker and enjoy your new kernel!
(add comment, edit)