Subject: port-sparc64/18692: ofwboot can't boot sun firmware upgraders
To: None <gnats-bugs@gnats.netbsd.org>
From: None <martin@duskware.de>
List: netbsd-bugs
Date: 10/18/2002 11:47:58
>Number: 18692
>Category: port-sparc64
>Synopsis: ofwboot can't boot sun firmware upgraders
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: port-sparc64-maintainer
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Fri Oct 18 02:49:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Martin Husemann
>Release: NetBSD 1.6I
>Organization:
>Environment:
System: NetBSD setting-sun.duskware.de 1.6I NetBSD 1.6I (SETTINGSUN) #0: Mon Oct 14 23:02:10 MEST 2002 martin@setting-sun.duskware.de:/usr/src/sys/arch/sparc64/compile/SETTINGSUN sparc64
Architecture: sparc64
Machine: sparc64
>Description:
I wanted to upgrade the firmware in my machine, which has only NetBSD installed.
Following the README file that comes with the standalone flash upgrade tool,
I copied it to my root partition and tried to boot it. I noticed I had to
rename it (see PR 18691), but even then it was not loadable.
NetBSD IEEE 1275 Bootblock
..>> NetBSD/sparc64 OpenFirmware Boot, Revision 1.5
>How-To-Repeat:
s/a
>Fix:
n/a
>Release-Note:
>Audit-Trail:
>Unformatted:
>> (root@setting-sun.duskware.de, Sat Apr 27 20:47:18 MEST 2002)
loadfile: reading header
unknown executable format
Program terminated
ok
I had to borrow a Solaris network bootblock from a friend and set up a network
boot server with NFS root and put the firmware update there. This was double
luck (found bootblock, network server available), and pretty inconvenient.
If I'd had a CD rom I might have found a bootable Solaris CD and go on from there,
but I have no CD rom drive in this machine nor a bootable Solaris CD.
Fixing loadfile() to accept this binary is probably not very hard, and would
help NetBSD users w/o Solaris.
Here is some info on the binary:
$ file /fu
/fu: ELF 32-bit MSB executable, SPARC32PLUS, V8+ Required, version 1 (SYSV), statically linked, stripped
$ objdump -x /fu
/fu: file format elf32-sparc
/fu
architecture: sparc:v8plus, flags 0x00000002:
EXEC_P
start address 0x0000000000400000
Program Header:
LOAD off 0x0000000000000078 vaddr 0x0000000000400000 paddr 0x0000000000000000 align 2**0
filesz 0x0000000000039a1a memsz 0x0000000000039a1a flags r-x
LOAD off 0x0000000000039a98 vaddr 0x0000000000449a98 paddr 0x0000000000000000 align 2**16
filesz 0x00000000002281e5 memsz 0x0000000000229248 flags rwx
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 00031a78 0000000000400000 0000000000400000 00000078 2**3
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .fini 00000008 0000000000431a78 0000000000431a78 00031af0 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
2 .rodata 000078ae 0000000000431a80 0000000000431a80 00031af8 2**3
CONTENTS, ALLOC, LOAD, READONLY, DATA
3 .rodata1 000006ea 0000000000439330 0000000000439330 000393a8 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
4 .data 00225660 0000000000449a98 0000000000449a98 00039a98 2**3
CONTENTS, ALLOC, LOAD, DATA
5 .data1 00002b85 000000000066f0f8 000000000066f0f8 0025f0f8 2**2
CONTENTS, ALLOC, LOAD, DATA
6 .bss 00001060 0000000000671c80 0000000000671c80 00261c80 2**3
ALLOC
objdump: /fu: no symbols