In OpenBSD 6.8, loongson was converted to use MI installboot.

For Gdium, INSTALL.loongson tells you this:

    To boot the bsd kernel on the G-Key by default, assuming it has been
    copied to /boot/bsd on the first ext3 partition, and the bootloader
    has been copied to /boot/boot on the same filesystem, the settings
    are:

        PMON> set al /dev/fs/ext2@usbg0/boot/boot
        PMON> set rd /dev/fs/ext2@usbg0/boot/bsd

Earlier OpenBSD versions would copy the kernel for you on that
partition.  OpenBSD 6.8 doesn't do this anymore, so it won't
boot on Gdium unless you manually copy the kernel to the ext2fs
partition.

Indeed, distrib/loongson/ramdisk/install.md had this:

    # Use cat below to avoid holes created by cp(1)
    if mount -t ext2fs /dev/${_disk}i /mnt2 &&
        mkdir -p /mnt2/boot &&
        cat /mnt/usr/mdec/boot > /mnt2/boot/boot &&
        { [[ $(sysctl -n hw.product) != Gdium ]] ||
          cp /mnt/bsd /mnt2/boot/bsd; }; then
             umount /mnt2
             return
    fi

but loongson_installboot.c doesn't copy the kernel anymore,
so what worked "out the box" on Gdium before now doesn't.

I don't know if the way the you want to fix this is to add
the missing kernel copy to loongson_installboot.c, or if
INSTALL.loongson should just be modified so that the "you
must copy the kernel manually" requirement becomes a bit more
explicit, now that this is mandatory on Gdium.

Partially related discussions:

https://marc.info/?l=openbsd-bugs&m=160140069120755&w=2
https://marc.info/?l=openbsd-misc&m=134255744005406&w=2

dmesg:
OpenBSD 6.8 (GENERIC) #62: Tue Oct  6 14:13:00 MDT 2020
    [email protected]:/usr/src/sys/arch/loongson/compile/GENERIC
real mem = 536870912 (512MB)
avail mem = 521797632 (497MB)
random: boothowto does not indicate good seed
mainbus0 at root: EMTEC Gdium
cpu0 at mainbus0: STC Loongson2F CPU 892 MHz, STC Loongson2F FPU
cpu0: cache L1-I 64KB D 64KB 4 way, L2 512KB 4 way
bonito0 at mainbus0: memory and PCI-X controller, rev 1
pci0 at bonito0 bus 0
ral0 at pci0 dev 13 function 0 "Ralink RT2561S" rev 0x00: irq 6, address XXX
ral0: MAC/BBP RT2561C, RF RT2527
voyager0 at pci0 dev 14 function 0 "Silicon Motion Voyager GX" rev 0xc0: irq 4
gpio0 at voyager0: 64 pins
gdiumiic0 at gpio0 pins 6 13: SDA[13], SCL[6]
iic0 at gdiumiic0
stsec0 at iic0 addr 0x40: revision 1.5
lmtemp0 at iic0 addr 0x48: lm75
mfokclock0 at iic0 addr 0x68
smfb0 at voyager0: 1024x600, 16bpp
wsdisplay0 at smfb0 mux 1: console (std, vt100 emulation)
ohci0 at pci0 dev 15 function 0 "NEC USB" rev 0x44: irq 5, version 1.0
ehci0 at pci0 dev 15 function 1 "NEC USB" rev 0x05: irq 5
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 configuration 1 interface 0 "NEC EHCI root hub" rev 2.00/1.00 
addr 1
rl0 at pci0 dev 16 function 0 "Realtek 8139" rev 0x10: irq 7, address XXX
rlphy0 at rl0 phy 0: RTL internal PHY
ohci1 at pci0 dev 17 function 0 "NEC USB" rev 0x44: irq 6, version 1.0
ehci1 at pci0 dev 17 function 1 "NEC USB" rev 0x05: irq 6
usb1 at ehci1: USB revision 2.0
uhub1 at usb1 configuration 1 interface 0 "NEC EHCI root hub" rev 2.00/1.00 
addr 1
usb2 at ohci0: USB revision 1.0
uhub2 at usb2 configuration 1 interface 0 "NEC OHCI root hub" rev 1.00/1.00 
addr 1
usb3 at ohci1: USB revision 1.0
uhub3 at usb3 configuration 1 interface 0 "NEC OHCI root hub" rev 1.00/1.00 
addr 1
clock0 at mainbus0: int 5
apm0 at mainbus0
umass0 at uhub0 port 3 configuration 1 interface 0 " USB DISK 2.0" rev 
2.00/1.10 addr 2
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, initiator 0
sd0 at scsibus0 targ 1 lun 0: <, USB DISK 2.0, PMAP> removable 
serial.13fe1e00078C12BB0049
sd0: 15272MB, 512 bytes/sector, 31277056 sectors
uvideo0 at uhub1 port 1 configuration 1 interface 0 "Suyin USB2.0 0.35M WebCam" 
rev 2.00/1.00 addr 2
video0 at uvideo0
umass1 at uhub1 port 2 configuration 1 interface 0 "Generic USB2.0-CRW" rev 
2.00/58.87 addr 3
umass1: using SCSI over Bulk-Only
scsibus1 at umass1: 2 targets, initiator 0
sd1 at scsibus1 targ 1 lun 0: <Generic-, Multi-Card, 1.00> removable 
serial.0bda0158114173400000
uhidev0 at uhub2 port 2 configuration 1 interface 0 "Cypress Semiconductor 
CY4636 LP RDK Bridge" rev 2.00/0.01 addr 2
uhidev0: iclass 3/1
ukbd0 at uhidev0: 8 variable keys, 6 key codes
wskbd0 at ukbd0: console keyboard, using wsdisplay0
uhidev1 at uhub2 port 2 configuration 1 interface 1 "Cypress Semiconductor 
CY4636 LP RDK Bridge" rev 2.00/0.01 addr 2
uhidev1: iclass 3/1, 5 report ids
ums0 at uhidev1 reportid 1: 3 buttons, Z dir
wsmouse0 at ums0 mux 0
uhid0 at uhidev1 reportid 2: input=2, output=0, feature=0
uhid1 at uhidev1 reportid 3: input=1, output=0, feature=0
uhid2 at uhidev1 reportid 4: input=0, output=0, feature=7
uhid3 at uhidev1 reportid 5: input=0, output=0, feature=7
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
boot device: sd0
root on sd0a (adef496a131f2e9f.a) swap on sd0b dump on sd0b

Reply via email to