Re: [Etherboot-developers] Building a ROM
Brought to you by:
marty_connor,
stefanhajnoczi
|
From: Robb M. <ma...@ac...> - 2001-02-04 22:29:28
|
Building a ROMFrom makerom.c, function getromsize():
---
size = buffer[2] * 512L;
/* sizes are usually powers of two, warn if not */
for (i = MINROMSIZE; i < MAXROMSIZE && i < size; i *= 2)
;
if (size > 0 && i > size)
fprintf(stderr, "%ld is a strange size for a boot ROM\n",
size);
---
The third byte in PC OptionROMs indicates the size in 512 byte blocks. In
the etherboot loader ("loader.S") this is set to zero, so that makerom will
automatically size it based on the binary filesize. If the third byte is
non-zero, it is assumed the binary file must fit into the specified size.
The "...is a stranges size for a boot ROM" message is displayed in your case
because MINROMSIZE is set to 8KB, and your ROM is 1024KB. Note that the 8KB
min is arbitrary (PC OptionROMs _can_ be as small as 512 bytes, but of
course it is not likely etherboot will ever be that small...).
The problem will be one of:
- Your code patches are being interpreted as the "third byte" of the option
ROM, and are the source of the 1KB size. Make sure that the first three
bytes of the binary code you are feeding to makeROM are "0x55, 0xAA, <size
in 512 byte blocks>" (from "loader.S").
- You fed a small piece of "test" code to makerom to check it's operation,
and although the first three bytes are correct, the overall size of this
code _is_ 1KB.
Robb.
----- Original Message -----
From: Wolf, Paul
To: 'eth...@li...'
Sent: Saturday, February 03, 2001 2:46 PM
Subject: [Etherboot-developers] Building a ROM
I am trying to rebuild the Etherboot 4.6.12 project. I need to add some
space in the ROM write after the header info and before the boot INT19 code.
I enabled the AS86 flag in the MAKEFILE but it gives me an error when it
does MAKEROM. The error is 1024 is a strange size for a ROM. I have not mad
any code changes yet, I am just trying to see if I can build the code. Any
help would be great!
Paul
|