Hi Alistair.
> As far as I am aware noone has yet booted ELKS from ROM, and if
> you wanted to do this you would have to write your own bootstrap
> code, and tweak the kernel to work from ROM.
> The actual kernel data and code are compiled an linked into a
> file called System which can be found in the arch/i86/tools
> directory. It is a minix format binary which is fairly easy to
> deal with. The are a few places in the kernel where it is
> necessary to write to the kernel code segment, but these can be
> removed if you know the physical location at which the data
> segment will be located.
> All the code does is store the kernels data segment so that it
> can retrieve it later after an interrupt has occured.
One possible way round this would be to reserve one of the interrupt
vectors for this, and use something like the following, assuming the
vector for INT 255 was chosen - I'm using Intel opcodes here as I'm
not yet familiar enough with the Linux versions to be happy:
Q> ; Initial code which gets the kernel data segment in DS at a
Q> ; point where the contents of ES and AX are irrelevant.
Q>
Q> ; Store DS:0 in INT 255 vector
Q>
Q> XOR AX,AX
Q> MOV ES,AX
Q> MOV SI,0x0FF0 ; Change to suit = 16 * vector chosen
Q> MOV ES:[SI+0],AX
Q> MOV AX,DS
Q> MOV ES:[SI+2],AX
Q>
Q> ; Rest of ELKS kernel.
Best wishes from Riley.
+----------------------------------------------------------------------+
| There is something frustrating about the quality and speed of Linux |
| development, ie., the quality is too high and the speed is too high, |
| in other words, I can implement this XXXX feature, but I bet someone |
| else has already done so and is just about to release their patch. |
+----------------------------------------------------------------------+
* ftp://ftp.MemAlpha.cx/pub/rhw/Linux
* http://www.MemAlpha.cx/kernel.versions.html