Linux on the Jornada 720 via hpcboot


This page describes booting linux via hpcboot (netbsd loader) on HP Jornada 720. Hpcboot is able to load ELF objects, and various people mentioned that it is possible or that it should be possible, however no actual description exists. All output was gathered from the jornada serial port. All of the necessary files are here.


Important notice: hpcboot doesn't work if the image is in the root directory on the jornada. It works if the image is in \My documents\. If you boot from the root directory, the loader freezes.
Output from bootloader

If you boot a kernel from the right directory, the kernel displays:

Error: a

Output from bootloader and kernel.
This is due to code in arch/arm/kernel/head-armv.S:
Around line 135:
                bl      __lookup_architecture_type
                teq     r7, #0                          @ invalid architecture?
                moveq   r0, #'a'                        @ yes, error 'a'
                beq     __error
As a workaround the last three lines have been commented out like so:
                bl      __lookup_architecture_type
//                teq     r7, #0                          @ invalid architecture?
//                moveq   r0, #'a'                        @ yes, error 'a'
//                beq     __error



If you boot a kernel compiled with framebuffer support it freezes during framebuffer initialisation.
Output from bootloader and kernel.
Because of these further kernels were compiled without epson1356 framebuffer support. The proper thing to do would be to fix drivers/video/epson1356fb.c. The kernel has to be compiled with serial console support (and the parameter

console=ttySA0
has to be present).

After the above workarounds have been made the kernel boots but doesn't have a filesystem to boot from (at present i don't have a spare memory card or microdrive). Output from bootloader and kernel

Since there is nowhere to get a filesystem from (and hpcboot doesn't support initrd) one has to patch the kernel so that the filesystem is linked with the kernel (i always thought that the linux kernel has a feature to do this, but apparently this is not the case). A quick hack named CIBD was done (cibd stands for Compiled In Block Device). CIBD copies the contents of a filesystem image present in drivers/block/cibd.h into the ramdisk upon boot. This hack was tested both on x86 and on arm architectures.
Here is how it works:

$ gunzip dist.minix.gz
$ cd linux/drivers/block
$ ./makeh ../../../dist.minix
[cibd.h is being created]
$ cd ../../..
[configure and compile the kernel as usual...
$ make menuconfig
$ make dep && make vmlinux
$ gzip -9 vmlinux

Next copy vmlinux.gz to \My Documents\vmlinux.gz on the Jornada via Activesync (or synce). Also copy hpcboot.exe. On the Jornada launch hpcboot.exe, select \My Documents\ as the location, select vmlinux.gz as the image, check "Serial Console" and set it to 115200. Connect the Jornada via serial cable to a pc running a serial terminal program (set to 115200bps). Tap on "BOOT", and say yes to the "are you sure?" popup. After the kernel boots you shuld have a working shell (lash from Busybox if you used the supplied image).
Output from bootloader and kernel booting a shell

All of the necsessary files(incluging a precompiled kernel and the hpcboot.exe bootloader) are here. The kernel is patched not to check the architecture type, to set argv[0] of init to "sh" (since we're using busybox) and to include the CIBD patch.

If these instuctions are unclear to you please tell me exactly what you don't understand and i will try to explain it better.

Jacek Lipkowski sq5bpf@acid.ch.pw.edu.pl

Accessed times...