Subject: Re: Weirdness with ELF bootblocks
To: Jarkko Teppo <jate@UWasa.Fi>
From: Simon Burge <simonb@wasabisystems.com>
List: port-hp300
Date: 02/13/2001 23:58:37
Jarkko Teppo wrote:
> Hello!
>
> The ELF bootblocks are giving me some headache. [ ... ]
>
> (It's a 380 actually, the wait state jumper makes it lie)
> I have root on sd2a and the HP is set to select sd2 (1Z in this case)
> automatically. However the bootblocks suggest booting from
> sd131a:netbsd, followed by a failed attempt with "bad adaptor number".
This patch:
Index: rominfo.h
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/hp300/stand/common/rominfo.h,v
retrieving revision 1.1
diff -d -p -u -r1.1 rominfo.h
--- rominfo.h 1997/02/04 03:52:49 1.1
+++ rominfo.h 2001/02/13 12:54:17
@@ -47,7 +47,7 @@
struct jmpvec {
short op; /* jmp instruction */
long addr; /* address */
-};
+} __attribute__((__packed__));
struct rominfo {
char p1[0xDC0];
@@ -65,4 +65,4 @@ struct rominfo {
char p6; /* ?? (FFFFFEDB) */
long msus; /* ?? (FFFFFEDC) */
struct jmpvec jvec[48]; /* jump vectors (FFFFFEE0) */
-};
+} __attribute__((__packed__));
fixes the problem for me. Basically the rominfo structure gets padded
differently when compiled with the ELF compiler, and I assume the jmpvec
structure would have the same problem.
Jason - is this the right way to fix this?
Simon.
--
Simon Burge <simonb@wasabisystems.com>
NetBSD CDs, Support and Service: http://www.wasabisystems.com/