Subject: Re: TODO List: Bootloader Source Available
To: Bruce Martin <brucem@cat.co.za>
From: Reinoud Zandijk <imago@kabel065011.kabel.utwente.nl>
List: port-arm32
Date: 07/25/2000 12:32:58
Really great Bruce!

wow... could this be contributed to NetBSD ? I would love to help with
it... Allthough booting from RiscOS is a bit a PitA since RiscOS allready
set up lots of stuff, it will be good to have one bootloader to start with
anyway... maybe it can have a special RiscOS/RC7500 subroutine that tries
to undo RiscOS's initialisation.... or just let that subroutine load
NetBSD in a block of memory at the top physical pages... to be downloaded
and initialised later.

Also it would be a GREAT start/boost of my planned port (oh do please
answer my mail soon Richard :-) ... ) of NetBSD/arm32 for the Millipede
Imago.... booting from Flash is an option there too !!

> The bootloader does the following:
> 	Fetches a kernel from either block 1 or block 12 of flash (depending on the
> state of the software switch, we use this as a way to boot a backup stable
> kernel if our primary one fails)

nice ... its allways good to have a backup plan :) ... would like to be
able to configure that blocknumber 12 though... but thats a minor

> 	Loads it into RAM
> 	Sets up the MMU

hmm... the ARM6/7/8 do need some extra work ... they aren't 100% code
compatible with StrongARM ... that could be a huge flaw for the
RiscPC/RC7500 ones, but code and strategy is available in the initcpu()
for riscpc ... Not a problem for Imago since it has a StrongARM initialy
anyway.

> 	Scans the PCI Slots and initialises the devices

Ok ... this could be made optional ... make it setup the video and serial
port f.e. (debugging etc).... Imago has no PCI ...

> 	Boots into NetBSD.
>
> I do not see this as an ideal bootloader: it has been written for a specific
> purpose and piece of hardware, and it has also been written in arm
> assembler, in one big file i.e. it is untidy and clumsy. I do however

hmm... some work to split it out and clean up ok ... but doable :) ... it
saves having a runtime C environment to maintain ... that is a pre.

> believe that releasing it will enable a developer, or team of developers (in
> which I'd like to be included) to develop a good bootloader much more
> quickly than writing it from scratch. And it does work, for those who just
> want to get something running on their EBSA.

Good idea, count me in (well for RiscOS initially and for Imago later on i
hope)

> Now, a question: how do I handle the release? I don't want this to cause 50
> different versions of the bootloader floating around out there, but rather
> decent versioning and stuff. Ideas?

Uhm ... there is an empty

.../syssrc/sys/arch/arm32/boot

directory on CVS =) .... now getting permission to update there... any
idea how to get CVS update rights ? If even for Anon-CVS ?

Bit off topic : is it posible to swap pages of memory during boot? I mean
... if a page is allready used for something just swap the contents and
the MMU mapping ? Then you can reorganise memory this way without specific
juggling around. This could be handy to relocate high physical pages used
by RiscOS to an unused place ... so to free them for relocating the loaded
NetBSD and start up the rest.

My over-enthousiasic (as usual ? :) ... ) $0.02,

Cheers,
Reinoud