I've been planning to port Linux to a 386EX embedded system that I
have designed which has 2MB of SRAM for main memory and 1MB of Flash
for program/disk storage. I'll be using a standard serial port as my
console, the ROMFS filesystem, and PCMCIA drivers for SRAM cards, ATA
flash cards, and possibly Ethernet Cards. It also has a VGA
controller, but I do not intend to use it as my console.
Anyhoo, I've been looking at the kernel source code, reading the
kernel hackers guide, etc. I don't plan on having a BIOS in this
system so I'm going to need to modify the boot code for the kernel a
little. (No floppy.) Here's what I *THINK* I have to do:
Compressed Kernel:
The flash memory in my design is in the memory space of the 386EX. I
could decompress directly from there into the first 1MB of SRAM and
launch the kernel from there. This is nice since the kernel will
take up less of my flash ROM, but it will use more of my main memory.
This is also nice since my main memory is 20nS SRAM and is zero
wait-state. :)
Uncompressed Kernel:
If the kernel code is ROM-able, I could have an uncompressed kernel
in flash and map it to where I want it to be. Then I could run
from ROM with stack and storage, etc in the SRAM. This is nice
since it will free up lots of main memory. (Run in 1MB instead?)
But it'll take up a lot more space in my flash ROM.
Hmm... Flash is cheap compared to SRAM. And it's not TOO slow (2
wait states) so it may mean that I should go with a 2MB flash and run
the kernel directly from it (if that's possible.)
I'd also like to run gdb on this thing. I figure if I get a PCMICA
ethernet card running I can do swap over the network and start running
some more interesting stuff. :)
Any kernel guru's out there care to give me a few pointers? I've
heard rumor of patch for making the kernel independent of a BIOS.
I'm also looking at making a new subdirectory under arch, say
arch/386ex or arch/386embed. There is a lot of hardware specific
stuff that I'd rather not try to mix into the i386 tree.
Update on my sytem status: I sucessfully have booted ROMDOS on the
system a week ago. I'm able to program the flash memory with any
binary images I like, the SRAM is tested, and my PCMCIA slot is
(mostly) operational. The serial port works as well. I'd just be
happier if I wasn't running ROMDOS... Linux would be much better.
TIA,
-= shane.anderson@infrasol.com ======== Infrared Solutions, Inc. =-