OSLoader+bootldr / Syswatch / Blob / GAPI

Hasjim Williams futaris01@optusnet.com.au
Tue, 13 May 2003 00:21:29 +1000


> I don't understand why you're trying to port OSLoader.
> I mean, we already have hpcboot and/or hpcboot+blob working.
> What new functionality are you trying to achieve?
> To me, the only use of a bootloader would be to dump the RAM
> of a working but frozen WinCE system over serial, so we can
> reverse engineer it, and/or restore it when we leave Linux.
> Unless of course you know how to replace the ROM with some Linux-ready
> Flash or so.

I know we can do all of the above using blob, but it was more of a
fiddling thing...  It was only 1-2 hours work (looking at WinCE code),
and it would make dumping the ROM to CF or PCMCIA easy...  Bootldr is
much more featured than hpcboot.  For example, it supports having the
kernel/root filesystem on a PCMCIA or CF card, xmodem transfers, etc,
etc.

Running bootldr isn't supported from hpcboot as it only supports ELF
files. :(  The CIBD (Compiled In Block Device) patch made by Jacek
Lipkowski [that Hiroshi Ishii used] is a hack at best and I doubt it
would ever get merged into the mainstream kernel.  It is good for a
stopgap measure, but I wouldn't want my rootfs/initrd eating up all the
RAM.  Loading the root/initrd image is really the job of the bootloader.
Whether that should be the WinCE bootloader (hpcboot/osloader) or the
second bootloader (blob/bootldr) is trivial.

I'm not sure how the PSION Series 7/Netbook
(http://linux-7110.sourceforge.net) people are doing things, but I'm
pretty sure their bootloader (arlo) loads the kernel and initrd into
memory.  The best thing would be to have a similar WinCE bootloader.

I also don't know how you are going to backup RAM from the bootldr.
You'd have to back it up to the PCMCIA or the CF slot.  IMHO, it would
probably be easier to back it up from Windows CE just before you jump to
the second bootloader.

I couldn't get syswatch going, but I figured I'd try and get osloader
going first, since it had the basic functionality there.  Syswatch will
be needed to watch what the SA-1100 does for power management, etc.  It
might also be useful to see what registers get changed when brightness
or contrast is changed or, if a PCMCIA/CF card is inserted.  To watch
these things, we need to have a program running whilst CE is running.

I haven't been able to get blob to compile properly yet, and I haven't
fiddled with the code.  I'm not very knowledgable about bootloaders at
the moment and I haven't really looked at your changes to blob.  Have
you documented what changes you needed to do, to get blob running?  I
think blob isn't initialising everything correctly, as I the kernel
halts just before booting up.

I'm also not really sure about how to get blob to use PIC (Position
Independent Code), or how to load it into the framebuffer.
Wince-bootldr is conveniently already in framebuffer space.  This would
allow us to dump the entire 16MB/32MB of RAM (ignoring the framebuffer).

It should also be possible to replace the ROM with a couple of Intel
28F160s (or similar), giving 16MB of flash.  A larger amount of flash
depends on how many address lines are brought out to the ROM
daughterboard connector.  Programming the flash would be done through
the JTAG pins and jflash.  This is of course assuming the schematic &
pinout of the ROM daughterboard, the JTAG pin locations and the
footprint of the ROM daughterboard connector are all discovered.

> Anyway, keep us tuned as of progresses.
> My 820 was sent by post office a few days ago,
> so hopefully; I can start hacking again soon.

That sounds good.  Is this a 32MB unit?  I hope you can get blob working
soon.

On another note I successfully compiled GAPI for the Jornada 820.  GAPI
is a Games API generally used on the Pocket PC.  I wanted to make sure
that the framebuffer address was right, and I wanted to play with
ScummVM @ http://www.scummvm.org on the Jornada 820.  Anyway, a copy of
the DLL and source code is available at
http://members.optusnet.com.au/futaris01/gapi_j820/gapi_j820.zip

It should also be possible to compile PocketMVP (Freeware Pocket Music
and Video Player) for the Jornada 820.