Port-sparc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Failing to netboot



On Mon, Apr 28, 2025 at 13:56:32 +1000, Matt Wallis wrote:

> No matter what I do though I get “Transfer failed, The file
> downloaded does not appear to be executable.”

IIRC, our boot.net fakes an a.out header by prepending:

SUN_MAGIC_HEADER='\01\03\01\07\060\200\0\07\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0'

$ sparc--netbsdelf-objdump \
    --target binary --architecture sparc --endian big \
    --disassemble-all header.bin

header.bin:     file format binary


Disassembly of section .data:

00000000 <.data>:
   0:	 01 03 01 07	sethi  %hi(0xc041c00), %g0
   4:	 30 80 00 07 	b,a   0x20
   8:	 00 00 00 00 	unimp  0
   ...

which, IIRC, is supposed to look like an OMAGIC (0407 = 0x0107) a.out

May be feeding it a real a.out boot.net will make it happy?

See sys/arch/sparc/stand/boot/Makefile, boot.${RELOC} targets at the
end.  You can keep the ELF ${.TARGET}.tmp and convert it to a.out with
objcopy manually afterwards (or just add that to the makefile).

-uwe


Home | Main Index | Thread Index | Old Index