Port-mips archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: NetBSD/sgimips binary packages?
> On May 26, 2024, at 6:50 PM, Tim McIntosh <tmcintos%eskimo.com@localhost> wrote:
>
> I’m curious about the GENERIC64_IP2x and GENERIC_64_32_IP2x kernel configs. It looks like these are 64-bit (LP64) and 32-bit kernels (respectively) supporting 64-bit user land (though comments indicate the latter is currently broken).
>
> As the R4x00 CPUs are 64-bit, what’s to stop me from building/running the GENERIC64_IP2x config and then using the still-supported mips64eb packages?
>
> https://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/mips64eb/10.0_2023Q4/All/
>
> It seems like this could be a good path forward.
>
> Or would this also require a full 64-bit world build / installation and/or other things that could prove difficult?
Unfortunately, it looks like it’s the latter.
I was able to build a sgimips64 release with installcd image after making the additional tweaks below, but this seems to hang in the boot loader:
> >> boot -f scsi(0)cdrom(4)rdisk(0)partition(8)ip2xboot
>
> NetBSD/sgimips 10.0_STABLE Bootstrap, Revision 1.5 (Mon May 27 06:49:46 UTC 2024)
>
> devopen: scsi(0)cdrom(4)rdisk(0)partition(0) type scsi file ip2x
> 7899792|
I got a little further by copying the unzipped `netbsd-INSTALL64_IP2x` to the sd0 root, adding the 64-bit `ip2xboot` to the volume header as `boot64`, and then booting as follows, but it appears that the boot loader still crashes due to a bad access somewhere in loadfile_elf64():
> >> setenv OSLoader boot64
> >> setenv OSLoadFilename netbsd-INSTALL64_IP2x
> >> boot
>
> NetBSD/sgimips 10.0_STABLE Bootstrap, Revision 1.5 (Mon May 27 06:49:46 UTC 2024)
>
> devopen: scsi(0)disk(3)rdisk(0)partition(0) type scsi file netbsd-INSTALL64_IP2x
> 7899792+186336
> Exception: <vector=UTLB Miss>
> Status register: 0x30044803<CU1,CU0,CH,IM7,IM4,IPL=???,MODE=KERNEL,EXL,IE>
> Cause register: 0x800c<CE=0,IP8,EXC=WMISS>
> Exception PC: 0x88009de0, Exception RA: 0x8800722c
> exception, bad address: 0xfffffffc
> Local I/O interrupt register 2: 0x44 <SLOT0>
> Saved user regs in hex (&gpda 0xa8740e48, &_regs 0xa8741048):
> arg: a8740000 0 0 2d7e0
> tmp: a8740000 887fdcc8 7d 887fe160 0 70 0 ffffffff
> sve: a8740000 3 400000 8000000 16 3f80 0 10000000
> t8 a8740000 t9 0 at 0 v0 0 v1 0 k1 88010000
> gp a8740000 fp 0 sp 0 ra 0
>
> PANIC: Unexpected exception
>
> [Press reset or ENTER to restart.]
From ip2xboot.map:
> .text 0x0000000088006aa0 0xf70 /Users/tmcintos/Development/3rdParty/NetBSD/src/../sgimips64/sys/arch/sgimips/stand/boot/lib/sa/libsa.a(loadfile_elf64.o)
> 0x0000000088006ce4 loadfile_elf64
> .text 0x0000000088007a10 0xcc0 /Users/tmcintos/Development/3rdParty/NetBSD/src/../sgimips64/sys/arch/sgimips/stand/boot/lib/sa/libsa.a(loadfile_elf32.o)
> 0x0000000088007c78 loadfile_elf32
> .text 0x00000000880086d0 0x370 /Users/tmcintos/Development/3rdParty/NetBSD/src/../sgimips64/sys/arch/sgimips/stand/boot/lib/sa/libsa.a(loadfile_ecoff.o)
> 0x00000000880086d0 loadfile_coff
> …
> .text 0x0000000088009d30 0xc0 /Users/tmcintos/Development/3rdParty/NetBSD/src/../sgimips64/sys/arch/sgimips/stand/boot/lib/sa/libsa.a(alloc.o)
> 0x0000000088009d30 alloc
> 0x0000000088009dd4 dealloc
> .text 0x0000000088009df0 0x22f0 /Users/tmcintos/Development/3rdParty/NetBSD/src/../sgimips64/sys/arch/sgimips/stand/boot/lib/z/libz.a(inflate.o)
> ...
I’m not set up to debug this, and out of time, so I’m going to give up on this approach for now, though it still seems to me that sgimips64 on IP2x would be the best path forward (assuming there are no show stopping issues with that).
Thanks,
Tim McIntosh
diff --git a/distrib/sgimips/cdroms/installcd/Makefile b/distrib/sgimips/cdroms/installcd/Makefile
index 55adcb761..905f65c54 100644
--- a/distrib/sgimips/cdroms/installcd/Makefile
+++ b/distrib/sgimips/cdroms/installcd/Makefile
@@ -1,9 +1,16 @@
# $NetBSD: Makefile,v 1.4 2019/09/23 13:42:35 christos Exp $
+
+.if ${MACHINE_ARCH} == "mipseb"
+NX= 32
+.else
+NX= 64
+.endif
+
CDBASE= sgimipscd # gives ${CDBASE}.iso
CDRELEASE= true # include $RELEASEDIR/$RELEASEMACHINEDIR
CDRELEASE_NODEBUG= true
-CDKERNELS= netbsd-INSTALL32_IP2x.gz ip2x
-CDKERNELS+= netbsd-INSTALL32_IP3x.gz ip3x
+CDKERNELS= netbsd-INSTALL${NX}_IP2x.gz ip2x
+CDKERNELS+= netbsd-INSTALL${NX}_IP3x.gz ip3x
CDINSTKERNEL= ../../instkernel
SGIVOLHDR.size= 4096
@@ -14,7 +21,7 @@ image_md_post:
dd if=/dev/zero of=${CDIMAGE} bs=512 count=${SGIVOLHDR.size}
dd if=${CDIMAGE}.tmp of=${CDIMAGE} bs=512 seek=${SGIVOLHDR.size}
${TOOLDIR}/bin/nbsgivol -f -i -h ${SGIVOLHDR.size} ${CDIMAGE}
- ${TOOLDIR}/bin/nbsgivol -f -w aoutboot ${DESTDIR}/usr/mdec/aoutboot ${CDIMAGE}
+# ${TOOLDIR}/bin/nbsgivol -f -w aoutboot ${DESTDIR}/usr/mdec/aoutboot ${CDIMAGE}
${TOOLDIR}/bin/nbsgivol -f -w ip2xboot ${DESTDIR}/usr/mdec/ip2xboot ${CDIMAGE}
${TOOLDIR}/bin/nbsgivol -f -w ip3xboot ${DESTDIR}/usr/mdec/ip3xboot ${CDIMAGE}
${RM} -f ${CDIMAGE}.tmp
diff --git a/distrib/sgimips/instkernel/Makefile b/distrib/sgimips/instkernel/Makefile
index 5b68c7a82..9c83c9c6c 100644
--- a/distrib/sgimips/instkernel/Makefile
+++ b/distrib/sgimips/instkernel/Makefile
@@ -11,7 +11,7 @@ SFX= # none
LISTS= ${.CURDIR}/list
.else
NX= 64
-SFX= .elf32
+SFX= # .elf32
LISTS= ${.CURDIR}/list64
.endif
@@ -29,8 +29,10 @@ MDSETTARGETS= INSTALL${NX}_IP2x ${RAMDISK} netbsd-INSTALL${NX}_IP2x${SFX} \
MDSET_RELEASEDIR= binary/kernel
+.if ${MACHINE_ARCH} == "mipseb"
MDSET_SUFFIXES.netbsd-INSTALL${NX}_IP2x=ecoff create-ecoff
create-ecoff= ${MIPS_ELF2ECOFF} ${.TARGET:R} ${.TARGET}
+.endif
IMAGE_RELEASEDIR= installation/diskimage
Home |
Main Index |
Thread Index |
Old Index