Wednesday, November 12, 2008

On the current bootloader and the boot process

The current bootloader is a hack on top of the PalmPowerups bootloader as used in PowerDrive. Booting while holding down the [home] key enters it, and it waits for a FAT32-formatted card [FAT12 and 16 NOT supported] card to be inserted containing a file called "kernel" in its root folder. The reason for lack of support for FAT12 and FAT16 is that the bootloader is NOT using my FAT driver, but in fact another one, under BSD license, which only supports FAT32 (and barely so).

After th ekernel is loaded from card into ram, the bootloader jumps to it.

The kernel copies itself to a known location in ram (the start of physical ram) and jumps to itself there. Once there it enables the MMU, and caches, and sets up the memory map for itself. Kernel space on DGOS begins at 0xE0000000. All lower addresses are available for use by user applications. This will allow a lot of PalmOS apps to run unmodified, that rely on memory addresses like 0x8xxxxxxx and 0xACxxxxxx being available to them.

Once the memory space is all setup, the LCD driver re-initializes the LCD (which has been on this entire time). LCD is initialized very early to enable printing debug messages to it. After that other peripherals are brought up, like LifeDrive's internal HDD.

3 comments:

Esteban said...

Sounds great...do you have any plans on using your own drivers after the kernel is finished, for FAT32?

Jason Wozniak said...

That rewrite seems to be coming along fairly quick. I started working on writing a set of PIM apps. Should I write those to be PalmOS native, or will you have something like Java or Python supported in the root filesystem?

avanturismo said...

Wish python will be supported.
It's written in pure-C so imo there will be no problems to implement this support. what do you think?