On Fri, Mar 06, 2020 at 11:29:57PM +0000, Stuart Henderson wrote:
> I've finally managed to get openbsd installed on an rpi3b (need
> something to run signify/pkg_sign and this is what I have). Thought I'd
> write up the install method because there are no useful docs at the
> moment and it's a bit fiddly. (Note that only rpi3b works - 3b+ has no
> network/usb, the 32-bit ones are unsupported, 4 is unsupported).
> 
> - boot linux, set the otp bit to permanently enable booting from usb (set
> "program_usb_boot_mode=1" in /boot/config.txt and reboot)

You don't need to boot linux for that.  Just boot with rpi firmware.
3b+ can boot off usb by default.

And if you don't want to blow the fuse the sd card can be left in and
boot_targets set in the U-Boot environment as mentioned on arm64.html.

> 
> - write miniroot64.fs to an SD card (I tried 6.3 up to 6.6 and -current,
> that's the only one where I get any console output)

Are you using pins 8 (tx) and 10 (rx)?

With the Ethernet port facing towards you numbering is

1  2
3  4
5  6
7  8
9 10

After 6.6 the uart is now the more capable pl011 by default.

> 
> - write whatever version miniroot to a USB stick (I have a -current one)

Above you said the 6.4 miniroot, which is it?

> 
> - ttl cable on standard pins on the pinout.xyz connector 115200
> 
> - boot it. if you just leave it to itself you get
> 
> ## Starting EFI application at 00080000 ...
> >> OpenBSD/arm64 BOOTAA64 0.13
> boot>
> kcannot open sd0a:/etc/random.seed: No such file or directory
> booting sd0a:/bsd: 2696864+410652+8951776+739752=0xf3e4c8
> "Synchronous Abort" handler, esr 0x02000000
> 
> instead you have to do "machine exit" (thanks aalm for the tip)
> and then it boots the installer.

U-Boot packages on build machines are infrequently updated and going by
your dmesg it is still 2019.10.  Does anything change if you take the
rpi3 u-boot.bin from u-boot-aarch64 2020.01 and replace it?

> 
> ## Starting EFI application at 00080000 ...
> >> OpenBSD/arm64 BOOTAA64 0.13
> boot> machine exit
> ## Application terminated, r = 0
> EFI LOAD FAILED: continuing...
> 
> Device 0: Vendor: SanDisk Rev: 1.00 Prod: Ultra Fit
>             Type: Removable Hard Disk
>             Capacity: 29340.0 MB = 28.6 GB (60088320 x 512)
> ... is now current device
> Scanning usb 0:1...
> Found EFI removable media binary efi/boot/bootaa64.efi
> FDT memrsv map 0: Failed to add to map
> 168758 bytes read in 112 ms (1.4 MiB/s)
> FDT memrsv map 0: Failed to add to map
> ## Starting EFI application at 00080000 ...
> disks: sd0* sd1
> >> OpenBSD/arm64 BOOTAA64 0.20
> boot>
> cannot open sd0a:/etc/random.seed: No such file or directory
> booting sd0a:/bsd: 2258968+636456+8767192+739512 
> [182308+109+529152+204440]=0xff0d80
> type 0x0 pa 0x0 va 0x0 pages 0x1 attr 0x8
> type 0x7 pa 0x1000 va 0x0 pages 0x1ff attr 0x8
> [...]
> 
> after it has installed, remove the SD and just leave the USB drive,
> cross fingers, and hopefully it will boot automatically.
> 
> dmesg currently looks like:
> 
> OpenBSD 6.6-current (GENERIC.MP) #486: Thu Mar  5 23:22:04 MST 2020
>     [email protected]:/usr/src/sys/arch/arm64/compile/GENERIC.MP
> real mem  = 958996480 (914MB)
> avail mem = 899473408 (857MB)
> mainbus0 at root: Raspberry Pi 3 Model B Rev 1.2
> cpu0 at mainbus0 mpidr 0: ARM Cortex-A53 r0p4
> cpu0: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
> cpu0: 512KB 64b/line 16-way L2 cache
> efi0 at mainbus0: UEFI 2.8
> efi0: Das U-Boot rev 0x20191000
> apm0 at mainbus0
> simplefb0 at mainbus0: 656x416, 32bpp
> wsdisplay0 at simplefb0 mux 1
> wsdisplay0: screen 0-5 added (std, vt100 emulation)
> "system" at mainbus0 not configured
> "axi" at mainbus0 not configured
> "thermal-zones" at mainbus0 not configured
> simplebus0 at mainbus0: "soc"
> "dma" at simplebus0 not configured
> bcmdog0 at simplebus0
> "cprman" at simplebus0 not configured
> bcmrng0 at simplebus0
> "mailbox" at simplebus0 not configured
> "gpio" at simplebus0 not configured
> pluart0 at simplebus0: console
> "mmc" at simplebus0 not configured
> "dsi" at simplebus0 not configured
> bcmaux0 at simplebus0
> dwctwo0 at simplebus0
> bcmintc0 at simplebus0
> bcmtemp0 at simplebus0
> "local_intc" at simplebus0 not configured
> "mmcnr" at simplebus0 not configured
> simplebus1 at simplebus0: "firmware"
> "expgpio" at simplebus1 not configured
> "power" at simplebus0 not configured
> "mailbox" at simplebus0 not configured
> "gpiomem" at simplebus0 not configured
> "fb" at simplebus0 not configured
> "vcsm" at simplebus0 not configured
> "virtgpio" at simplebus0 not configured
> simplebus2 at mainbus0: "clocks"
> "clock" at simplebus2 not configured
> "clock" at simplebus2 not configured
> "phy" at mainbus0 not configured
> "arm-pmu" at mainbus0 not configured
> agtimer0 at mainbus0: tick rate 19200 KHz
> "__overrides__" at mainbus0 not configured
> "leds" at mainbus0 not configured
> "fixedregulator_3v3" at mainbus0 not configured
> "fixedregulator_5v0" at mainbus0 not configured
> "__symbols__" at mainbus0 not configured
> cpu1 at mainbus0 mpidr 1: ARM Cortex-A53 r0p4
> cpu1: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
> cpu1: 512KB 64b/line 16-way L2 cache
> cpu2 at mainbus0 mpidr 2: ARM Cortex-A53 r0p4
> cpu2: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
> cpu2: 512KB 64b/line 16-way L2 cache
> cpu3 at mainbus0 mpidr 3: ARM Cortex-A53 r0p4
> cpu3: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
> cpu3: 512KB 64b/line 16-way L2 cache
> usb0 at dwctwo0: USB revision 2.0
> uhub0 at usb0 configuration 1 interface 0 "Broadcom DWC2 root hub" rev 
> 2.00/1.00 addr 1
> uhub1 at uhub0 port 1 configuration 1 interface 0 "Standard Microsystems 
> product 0x9514" rev 2.00/2.00 addr 2
> smsc0 at uhub1 port 1 configuration 1 interface 0 "Standard Microsystems 
> SMSC9512/14" rev 2.00/2.00 addr 3
> smsc0: address b8:27:eb:5d:c0:5e
> ukphy0 at smsc0 phy 1: Generic IEEE 802.3u media interface, rev. 3: OUI 
> 0x0001f0, model 0x000c
> umass0 at uhub1 port 5 configuration 1 interface 0 "SanDisk Ultra Fit" rev 
> 2.10/1.00 addr 4
> umass0: using SCSI over Bulk-Only
> scsibus0 at umass0: 2 targets, initiator 0
> sd0 at scsibus0 targ 1 lun 0: <SanDisk, Ultra Fit, 1.00> removable 
> serial.0781558381079d26fa39
> sd0: 29340MB, 512 bytes/sector, 60088320 sectors
> vscsi0 at root
> scsibus1 at vscsi0: 256 targets
> softraid0 at root
> scsibus2 at softraid0: 256 targets
> bootfile: sd0a:/bsd
> boot device: sd0
> root on sd0a (b2b4d0b998c15160.a) swap on sd0b dump on sd0b
> WARNING: CHECK AND RESET THE DATE!
> 
> 

Reply via email to