linux-mips-fnet
[Top] [All Lists]

Re: PDA-MIPS port?

To: linux-mips@fnet.fr
Subject: Re: PDA-MIPS port?
From: Warner Losh <imp@harmony.village.org>
Date: Thu, 01 Apr 1999 00:49:11 -0700
In-reply-to: Your message of "Wed, 31 Mar 1999 19:29:50 PST." <Pine.GSO.4.10.9903311928330.11541-100000@q7.q7.com>
References: <Pine.GSO.4.10.9903311928330.11541-100000@q7.q7.com>
In message <Pine.GSO.4.10.9903311928330.11541-100000@q7.q7.com> Ryan Sweet 
writes:
: Is it possibl;e that you could pass along the theory about what's involved
: in writing a bootloader?thanks,

Briefly:

Create a WinCE program that will read in ELF binaries.  Read in the
binary into virtual memory using the Win32 apis.  Kick into kernel
mode[*], touch each page building a page table by looking at the tlb.
Seize total control of the processor.  Copy (and this is tricky) the
pages to the right location using physical addresses using the page
table you built before.  Create whatever boot args you need to pass to
the kernel.  Call the boot address.

This should get you loaded.  I've not solved the reboot problem (eg
how do I reboot w/o having to reconfigure wince to get to the point
that I can run this program again), nor have I actually run this
stuff.

I have much of this written.  I'm missing the WinCE specific parts :-)

Also, I'm still working on getting a mips-hpc-wince target for
gcc/egcs functional.  I found a start on the net, but it needed a lot
of work to even build.

Warner

[*] Yes, user processes can do this on WinCE!

<Prev in Thread] Current Thread [Next in Thread>