The Zaurus is a tiny computerrunning under Linux and produced by Sharp in Japan at the beginning of the 2000 years. Despite low performances, I used it for many years... actually the build quality of the Zaurus is impressive and even today, there is no equivalent computer of similar size. I stop using the Zaurus in 2010.
I keep these Zaurus pages here as archives.
Using Sunbird calendar on PDA (i.e. wake on RTC alarm on calendar's events)
The attached scripts allow to use Sunbird on PDA, that is to say to wake up automatically the device on Sunbird's alarm. I am successfully using them on the Sharp Netwalker (aka PC-Z1) but it should work on any device that supports wake up on RTC (the Netwalker does only after some hacks) and uses the APM daemon for power-related event management (the Netwalker does ; however for other devices that use ACPI, it should be quite easy to adapt).
To install it, proceed as following:
Install the python-pysqlite2 package.
Copy the attached file (link below) sunbird_set_next_rtc_alarm.py somewhere on your PATH (for example, in /usr/bin) and make this file executable:
chmod a+x /usr/bin/sunbird_set_next_rtc_alarm.py
Copy the attached file (link below) 50sunbird_rtc_alarm in /etc/apm/suspend.d and make this file executable:
chmod a+x /etc/apm/suspend.d/50sunbird_rtc_alarm).
Edit sunbird_set_next_rtc_alarm.py . At line 3, indicate the maximum time (in second) your device needs to resume from suspend (the default 10 seconds is right for the Netwalker).
At line 4, indicate the path to the Sunbird's storage file. if you have no idea at all, the following command should give you some hints:
ls /home/*/.mozilla/sunbird/*/storage.sdb
That's all! Now, every time you suspend the device, sunbird_set_next_rtc_alarm.py is called. It looks Sunbird's calendar for the closest alarm, and, if any, define the device's RTC alarm as needed. Then, the device will wake up a few second before the alarm, and thus Sunbird will be able to beep you.
wake up on RTC alarm for the Netwalker
By default, the Netwalker does not support waking up on RTC alarm, which implies that it cannot be used as a PDA. It has a calendar program (Sunbird), and alarms can be set on events, but the Netwalker will raise the alarm only if the device is on at this time... not good for a PDA !
Actually, the hardware does support waking up on RTC alarm, but this functionality is already used... by the battery drivers ! Any alarm you set will be erased by the drivers of the battery when suspending the Netwalker. It seems that the battery need to be checked every 30 minutes when the device is suspended.
So here is a patch that modifies the battery drivers so as it honors the previously set RTC alarm if it is closer in time. The patch is intended to be applied on the Netwalker's Linux kernel from http ://netbook-remix.archive.canonical.com/updates/pool/public/l/linux- fsl-imx51/linux-fsl-imx51_2.6.28-15.50fsl1araneo7.tar.gz. See this how to for compiling and flashing the Linux kernel on the Netwalker.
With this patch, the Netwalker can now wake up on RTC alarm. You can verify that by running the commands:
sudo echo 0 > /sys/class/rtc/rtc0/wakealarm sudo echo `date '+%s' -d '+2minutes'` > /sys/class/rtc/rtc0/wakealarm
And then suspend your Netwalker. It should wake up 2 minutes later.
You can also find below my .config kernel configuration file. I've also disabled the Netwalker's quick keys since they are constantly starting apps even if I don't touch them ; if you want to keep them working, change CONFIG_TOUCHKEY_MXC in .config.
However, wake up on RTC alarm is only the first step for using the Netwalker as a PDA: the next step consists in creating RTC alarm from the calendar program. Stay tuned!
How to update and flash the kernel on the Netwalker (Sharp PC-Z1)
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
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.
Create a microSD recovery card; instruction are in Japanese on Sharp's website, so here is a summary.
Download this script, and uncompress it: http://www.sharp.co.jp/support/ex-data/recovery.sh.tar.gz
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.
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.
Mount the microSD card. This can be done with these commands:
mkdir /tmp/test mount /dev/mmcblk0p1 /tmp/test
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.
Replace /tmp/test/firmware/zImage by the new kernel image (typically /boot/vmlinuzXXX).
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).
Connect the Netwalker's power cable.
Run /tmp/test/usr/local/bin/update_spider.sh . Then press "y", wait a few second and press any key to exit.
The kernel has been flashed! Now, reboot the Netwalker and enjoy your new kernel!