Running Linux on HP Jornada 720

HP Jornada 720 is bit older device, but exactly for that reason it
is time to run Linux on it as Microsoft Windows for Handheld PC 2000
3.0 is suffering from driver and software insufficiency. Therefore
Linux can bring a new life to this nice device. And Linux is even nicer
than MWHPC2000.

After 7 years of excelent services I retired my J720 at 05/2012. It will take a honour place in my computer history museum. I do not have a 1:1 replacement, so far i got Sony Vaio P, this is the closest I can find.

PCMCIA supports only 16bit PC
Card standard - 32bit CardBus will not work. There is USB port on
docking cradle, however Jornada is able to serve only as slave, not
master. LCD display seems to be slow (compared to nowadays LCD).
Operating system in Jornada is in ROM (no flash!).Modem is soft modem.You can not poweroff Jornada as you can e.g. PC. It is ever running device, except you remove all power sources.

History: Production started in 2000, ended Q2 2002. It is successor to
HP Jornada 6xx however it has different hardware. Also 728 is not
completely same (there is probably not many of them).

Linux for Jornada 720

First, I'd like to point to that Linux could be started
on Jornada
only from its Windows. This is due to fact, that operating system is in
ROM, which can not be changed anyhow. Well, yes there is option - so
called flash board exists. However this is not a standard part of
Jornada and it is very rare to have it. (There is scheme of the board,
but it's not easy to make it.) To start Linux, you'll need Compact
Flash card (at least 64MB) and some kind of
loader - linexec (recommended), haret or hpcboot could be used.
Loader is a binary for WinCE that stops WinCE operation and boots Linux
kernel.

As Linux you can either use

Familiar Linux distribution (now several projects around handheld
devices merged under OpenEmbedded, so Familiar is also based upon it)

The most common choice is Familiar Linux. Even thought this is mainly
for HP (Compaq) iPaqs, Familiar 0.8.2 has also its images available for
j720. There are two kinds of images

jffs2 - those could be used only with flash board (you do not have flash board most probably)

rootfs.tar.bz2 - this is only compressed / root file system,
could be uncompressed on almost any filesystem (recommended is ext2,
ext3) - I'll continue with this.

There is one more complication - that's main part - kernel. Familiar linux includes kernel 2.6. Kernel 2.6
is not able to boot with unmodified linexec, and 2.4 kernel are not
available in Familiar 0.8.2. Luckily Michael Gernoth is creating 2.4
kernel version that is suitable for Familiar and also modified linexec
that it is able to boot 2.6 kernel. For now 2.6 seems to have better
support for j720 some of the devices, however is under development, so no Image
usable to run Familiar exist. 2.4 kernel for j720 has several hacks so battery/brightness/audio is working now.

Using 2.4 kernel with Familiar Linux, without flashboard

To use Familiar 0.8.2 with 2.4 kernel you have to make modification to
rootfs. This is due to fact that 2.6 kernel, which is in Familiar, is using udev (dynamicaly
created device files) and it needs different commands to handle modules
(2.6. kernel changed module names etc.) Also you'll need to use initrd,
but this is because you'll boot from WinCE.

Modified Familiar 0.8.2 opie image

As some users request "accurate" Jornada 720 image of F0.8.2 I prepared
opie image with few modifications, that will make your start easier.
You can skip step 4 with this image and most of issues from step 6 are
also solved in it. You can use this image only with kernel 2.4.31-j720-5!opie-image-jornada720-20050407154438-covex.rootfs.tar.bz2

3. Partition Compact Flash

Make two partitions on CF (use linux fdisk or anything else that is able to make linux filesystem)

4. Modify rootfs for kernel 2.4

Uncompress modules to ext2 partition (you need modules for 2.4 kernel instead of 2.6 but you can leave 2.6 modules there) .
Get device files and module tools here
-> (NOTE: if you
used older version than _2 then you have incorrect depmod.24 and none
of your modules could be inserted) and copy it to
ext2 partition too (also basic fstab and initrd dir included).

You are ready now to put CF to j720 and start linexec.

5. Add more apps

Familiar is using ipkg tools. As soon as you will get up your network you can try to do ipkg update and ipkg install something.
If network is not working for you, you can download files manualy from http://ipkgfind.handhelds.org/, copy them to CF and install with ipkg install file.

As handhelds.org seems to be most of the time down, here is a mirror of familiar 0.8.2 ipkg feeds. Change the /etc/ipkg.conf to

There is no sound.Sound is working well
with saa1111-uda1341 module loaded. It is possible to use mpg123 (cpu load 40-45%) to play mp3
files. mp3blaster is too heavy load for CPU and sound is choppy. Best is to use madplay (is not using FPU, cpu load cca 15%).

Battery status is not available (sometimes it say something but
is not correct all the time). Have to insert j720_control module, then take a look at /proc/jornada/battery. Nevertheless Opie does not show status.

Power management is bad, only decreases
frequency from 206MHz to 59MHz and suspends pcmcia card. Battery lasts
only 10-12h when "suspended".

2.4 kernel does not reboot properly with F0.8.2 - your FS requires fsck - there is not e2fsck in F0.8.2

Keyboard keys for { } [ ] are not working. | \ is on
{[ key. / ? in on right alt gr key. Alternative keys for PgDn, PgUp, Home, End are not working,
special HP keys are not always used (They are F1...F11). See further.

Do
not enable console on tty2 with opie - opie uses it and it colides with
getty. To enabled it on tty4 uncomment line "4:23:respawn:/sbin/getty
38400 tty4"

Desktops as they are in F0.8.2
GPE: desktop seems unhandled - no icons on desktop, some apps from menu
do nothing. Display is not organised well for 640x240, it assumes high
and narrow display sometimes. First time boot is quite long, you'll have to wait. (This is not true for a new GPE images available nowadays.)
OPIE:beautiful environment, fast, for all people wanting PDA functions with Linux under the hood.

Tips and tricks for Familiar and Jornada at all

1. if you are getting still messages that /etc/modules.conf is more
recent than /lib/modules/`uname -r`/modules.dep than it is because
every time you hard reset jornada your clock is reset too. Therefore
you can add touch /etc/modules.conf at the beginnig of
/etc/init.d/modutils.sh (before depmod -Ae), or you can use a short script to store and load date at shutdown/startup.
2. To see/read a syslogd output from circular buffer use busybox logread command
3. When booting WinCE and starting linux you do not need to go through
all the settings, simply press ctrl+esc, select with arrow keys
Programs/Windows Explorer OR better pres Win+e to open Explorer directly. In Explorer go again with arrows to Storage
Card, then select linexec.
4. If you, as I do, often needs to hard reset Jornada, remove backup battery permanently.
It is useless for Linux. To hard reset jornada you have to remove all
sources - battery, backup battery, AC. If Jornada asks if it could
delete RAM data at boot say Y.
If you have original Jornada with WinCE in ROM, you do not need to
worry that you can damage wince anyhow with your experiments. They can
not be overwritten.

If you press "s" key during boot you start System Diagnostic. You can
test there all components of Jornada, however not all tests are
possible for us as they need special "tools". At least you can test ROM
and RAM, sound, keyboard etc. What I was not able to accomplish is IR
test, serial test (need counter part I do not have), PCMCIA and CF
(need special cards).

Kernel 2.6 - experimental

The vanilla kernel 2.6.13 supports Jornada 720 and has some functions
of Jornada implemented but not all - so vanilla kernel is missing lot
of usefull stuff like audio support.

Therefore there are three lines of 2.6 kernel suitable for j720:

-hh version - from handhelds.org cvs. This version has lot of
additional features patched, but is not always possible to compile. It
is included in Familiar images, however is suitable only for Jornada
with flashboard.

vanilla kernel - only few thinks supported, but could be compiled for j720.

Using Linux with flashboard

With flashboard I was not able to get Familiar 0.8.2 working (this is
most probably caused by bootldr which is too old (2.19.7) and needs to
be updated to boot 2.6 kernel). Kernel always ends up with unable to
mount root.
There are two jffs images that at least run Linux:

As flashboard flash content needs to be changed, that task is not easy for begginers.

Flash on board is devided to two part - bootldr and root. When bootldr
part is damaged then your board is dead. There is only one place in
world where it could be brink back to life, and maybe it does not exist
anymore. So beware! If you have any troubles to update bootldr DO NOT SWITCH OFF Jornada - join IRC and discuss further.

Root partition you can use to store the system. It has 32MB only.

You need to have serial console working, then you have to get into bootldr (pressing "space" while checking flash)

Thats it - in short. You have to take in mind, that you have only 32MB
of flash - it's limited. You can mount CF, but you can not easily make
it rootfs.

Serial console to Jornada

Howto setup serial console to Jornada

PC (DB9M) (DB9F)<----->(Jornada720_10pinF)(Jornada720_10pinM) Jornada

To make a serial console on Familiar working with Jornada first you have to make at least this device for it.

mknod ttySA0 c 204 5

This is a serial connector at the back of Jornada. Then you need to have proper line in /etc/inittab

S:12345:respawn:/sbin/getty 115200 ttySA0

This starts serial port console in Linux and you can login
and work with Linux. The other parts - bootldr and kernel, have their
own serial console handling but for all of them you need to have proper
terminal configuration.
To see also the ouput of the kernel it is desired to add a kernel boot parameters like

Card is not transmiting, autonegotiation is not inicialized (none of the leds lights).

SMC

Works well even though it sometimes also says that tramsition
timed out. Identifies as NE2000 compatible card. Loads modules 8390 and
pcnet_cs.
SMC card is mentioned to be low power.

Wireless

The only card I can recommand is

Zcom XI-325 PCMCIA Wireless LAN PC Card

Zcom XI-325 PCMCIA Wireless LAN PC Card

This is 2.4GHz LANEscape 11Mbps IEEE 802.11b card. It is working in Familiar out of the box with orinoco_cs module or with hostap_cs after some tweaking.

GPS

iTec CompactFlash GPS reciever BC-337 SiRF STAR III

shows as COM2 device

Reduction

I am using

PQI Compact Flash Adapter

SanDisk 6in1 PC Card Adapter

both working flawlessly.

Jornada Keyboard and touchscreen

This is a picture of keyboard on Jornada 720 country code ABB (CC you
can find on label at bottom of jornada). For this Jornada you can
load keymap at the start of the system to have correct keys mapping in
console.
For Familiar 0.8.2 with kernel 2.4 you need to:

Install console-tools - ipkg install -force-overwrite console-tools (you have to use -force-overwrite because some of the tools are already provided by busybox)

download this keymap
(Thanx to Marek Coufal), ungzip it and put it e.g. to /etc/keymap/
directory and create rc script with command loadkeys /etc/keymap/bootime.kmap

To fix keyboard in Xwindow you can use xmodmap. Opie is using same map as console.

For kernel 2.6 you have to apply patch, if it is not already included.

Howto calibare touchscreen - xtscal

For touchscreen calibration under gpe xtscal program is used. But it is
not easy to invoke gpe-xcalibrate.sh when your touchscreen is
completely misscalibrated.
You can use serial console or network to start calibration. After login:

DISPLAY=:0 gpe-xcalibrate.sh

however in Familiar 0.7.2 the calibration was not ok, so you can use
xtscalibrate directly to set the touchscreen parameters, here is what I
aproximated.

DISPLAY=:0 xtscal-bin -cal -180 700 75 -33 0

Expected values to xtscal: XSCALE XTRANS YSCALE YTRANS SWTCHXY.

Jornada 680 and 720 cradle pin out

Cradle pinout is different for 680 and 720!

Cradle pinout is almost same for 680 and 720 - I measured it myself. Cradles could be swaped.

Sync cable pinout

Sync cable pinout is same for 680/690 and 720/728.

It is (DB9F)<->(Jornada720_10pinF).
Refering to the left hand side of the connector as pin 1 looking into
the jornadas port - Male connector. ( sync cable connector if F and the number are from right to left - see picture):

DB9F Jornada720_10pin1 42 33 24 15 56 47 88 79 N/CShield to Shield

If you have cradle you should be able to make DB9 serial connector out of
this PCB - the numbers are pins for Jornada720_10pinF connector (not
tested!).