On Mon, Sep 18, 2023 at 02:37:50PM +0200, Peter J. Philipp wrote: > Hi, > > I've been working a little bit on making OpenBSD run on Mango Pi, I haven't > succeeded yet, but I think we're close. My patches are here: > > https://github.com/pbug44/openbsd-src/tree/MANGOPI
Just a status report, I got it to boot to the exec'ing init. I had to disable plic0 and com0, and am running on the boot loaders console. That is probably why I see no installer message (no /dev/console). So that is the work that still needs to be done, getting the console working right. It's the same as the Allwinner H6 (APB driven), though when I enable cn_tab (which I hashed out) in /sys/dev/fdt/com_fdt.c then all I see is one or two bytes in the serial cu, and it reminds me of a speedrate problem. I haven't figured that out yet. The other thing is the plic. I did workarounds to get around its freezing, but those are likely wrong. Because when an IRQ gets enabled it freezes the boot process. I'll hopefully get this all fixed up by next weekend at which time I'm going back to dns programming (shift of priorities). Here is the dmesg to the point of WARNING: CHECK AND RESET THE DATE! -------> U-Boot 2022.10 (Jul 20 2023 - 09:48:42 +0000) Allwinner Technology DRAM: 1 GiB sunxi_set_gate: (CLK#24) unhandled Core: 54 devices, 20 uclasses, devicetree: separate WDT: Not starting watchdog@6011000 MMC: mmc@4020000: 0, mmc@4021000: 1 Loading Environment from FAT... PLL reg = 0xf8216300, freq = 1200000000 OK In: serial@2500000 Out: serial@2500000 Err: serial@2500000 Net: eth0: ethernet@4500000 starting USB... Bus usb@4101000: USB EHCI 1.00 Bus usb@4101400: USB OHCI 1.0 Bus usb@4200000: USB EHCI 1.00 Bus usb@4200400: USB OHCI 1.0 scanning bus usb@4101000 for devices... 1 USB Device(s) found scanning bus usb@4101400 for devices... 1 USB Device(s) found scanning bus usb@4200000 for devices... 3 USB Device(s) found scanning bus usb@4200400 for devices... 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found Hit any key to stop autoboot: 0 => run bootobsd 24525 bytes read in 10 ms (2.3 MiB/s) 152332 bytes read in 30 ms (4.8 MiB/s) Card did not respond to voltage select! : -110 ** Unable to read file ubootefi.var ** Failed to load EFI variables Booting /\EFI\OpenBSD\BOOTRISCV64.EFI disks: sd0* >> OpenBSD/riscv64 BOOTRISCV64 1.5 boot> boot -c cannot open sd0a:/etc/random.seed: No such file or directory booting sd0a:/bsd: 2142436+1168164+8505520+538824 [181570+122+283152+186205]=0xf3f470 bootargs: -c [oh it's a Mango Pi, hold on this might take a whi. :-)] all mapped type 0x0 pa 0x40000000 va 0x40000000 pages 0x40 attr 0x8 type 0x7 pa 0x40040000 va 0x40040000 pages 0x1c0 attr 0x8 type 0x2 pa 0x40200000 va 0x40200000 pages 0x4000 attr 0x8 type 0x7 pa 0x44200000 va 0x44200000 pages 0x3d00 attr 0x8 type 0x9 pa 0x47f00000 va 0x47f00000 pages 0x9 attr 0x8 type 0x7 pa 0x47f09000 va 0x47f09000 pages 0x36cd7 attr 0x8 type 0x2 pa 0x7ebe0000 va 0x7ebe0000 pages 0x8 attr 0x8 type 0x4 pa 0x7ebe8000 va 0x7ebe8000 pages 0x1 attr 0x8 type 0x7 pa 0x7ebe9000 va 0x7ebe9000 pages 0x1 attr 0x8 type 0x2 pa 0x7ebea000 va 0x7ebea000 pages 0x100 attr 0x8 type 0x1 pa 0x7ecea000 va 0x7ecea000 pages 0x26 attr 0x8 type 0x4 pa 0x7ed10000 va 0x7ed10000 pages 0x5 attr 0x8 type 0x6 pa 0x7ed15000 va 0x7ed15000 pages 0x1 attr 0x8000000000000008 type 0x4 pa 0x7ed16000 va 0x7ed16000 pages 0x3 attr 0x8 type 0x6 pa 0x7ed19000 va 0x7ed19000 pages 0x1 attr 0x8000000000000008 type 0x4 pa 0x7ed1a000 va 0x7ed1a000 pages 0x1 attr 0x8 type 0x6 pa 0x7ed1b000 va 0x7ed1b000 pages 0x6 attr 0x8000000000000008 type 0x4 pa 0x7ed21000 va 0x7ed21000 pages 0x17 attr 0x8 type 0x2 pa 0x7ed38000 va 0x7ed38000 pages 0x122c attr 0x8 type 0x5 pa 0x7ff64000 va 0x7ff64000 pages 0x1 attr 0x8000000000000008 type 0x2 pa 0x7ff65000 va 0x7ff65000 pages 0x9b attr 0x8 Copyright (c) 1982, 1986, 1989, 1991, 1993 The Regents of the University of California. All rights reserved. Copyright (c) 1995-2023 OpenBSD. All rights reserved. https://www.OpenBSD.org OpenBSD 7.3-current (MANGOPI) #185: Sat Sep 23 08:52:28 CEST 2023 p...@stern.mainrechner.de:/riscv64/compile/MANGOPI real mem = 1073741824 (1024MB) avail mem = 988495872 (942MB) SBI: OpenSBI v1.3, SBI Specification Version 1.0 User Kernel Config UKC> disable com 67 com* disabled UKC> disable plic 5 plic* disabled UKC> quit Continuing... random: boothowto does not indicate good seed mainbus0 at root: Allwinner D1 Nezha cpu0 at mainbus0: T-Head C906 imp 0 rv64imafdc intc0 at cpu0 cpu0: 32KB 64b/line 128-way L1 I-cache, 32KB 64b/line 256-way L1 D-cache "dcxo-clk" at mainbus0 not configured "display-engine" at mainbus0 not configured simplebus0 at mainbus0: "soc" sxipio0 at simplebus0: 88 pins sxiccmu0 at simplebus0 syscon0 at simplebus0: "audio-codec" "regulators" at syscon0 not configured "pwm" at simplebus0 not configured "iommu" at simplebus0 not configured "timer" at simplebus0 not configured "watchdog" at simplebus0 not configured "serial" at simplebus0 not configured "serial" at simplebus0 not configured "i2c" at simplebus0 not configured "syscon" at simplebus0 not configured "dma-controller" at simplebus0 not configured "efuse" at simplebus0 not configured "crypto" at simplebus0 not configured "dram-controller" at simplebus0 not configured sximmc0 at simplebus0 sdmmc0 at sximmc0: 4-bit, sd high-speed, mmc high-speed, dma sximmc1 at simplebus0 sdmmc1 at sximmc1: 4-bit, sd high-speed, mmc high-speed, dma "spi" at simplebus0 not configured "spi" at simplebus0 not configured "usb" at simplebus0 not configured "phy" at simplebus0 not configured "usb" at simplebus0 not configured "usb" at simplebus0 not configured "usb" at simplebus0 not configured "usb" at simplebus0 not configured "ethernet" at simplebus0 not configured "clock-controller" at simplebus0 not configured "mixer" at simplebus0 not configured "mixer" at simplebus0 not configured "phy" at simplebus0 not configured "tcon-top" at simplebus0 not configured "lcd-controller" at simplebus0 not configured "lcd-controller" at simplebus0 not configured "power-controller" at simplebus0 not configured "clock-controller" at simplebus0 not configured "rtc" at simplebus0 not configured "temperature-sensor" at simplebus0 not configured "watchdog" at simplebus0 not configured "interrupt-controller" at simplebus0 not configured "watchdog" at simplebus0 not configured "hdmi" at simplebus0 not configured "phy" at simplebus0 not configured "led-controller" at simplebus0 not configured "keys" at simplebus0 not configured gpio0 at sxipio0: 32 pins gpio1 at sxipio0: 32 pins gpio2 at sxipio0: 32 pins gpio3 at sxipio0: 32 pins gpio4 at sxipio0: 32 pins gpio5 at sxipio0: 32 pins gpio6 at sxipio0: 32 pins "opp-table-cpu" at mainbus0 not configured "vcc" at mainbus0 not configured "vcc-3v3" at mainbus0 not configured "connector" at mainbus0 not configured "usbvbus" at mainbus0 not configured "vdd-cpu" at mainbus0 not configured "wifi-pwrseq" at mainbus0 not configured Timecounters tick every 10.000 msec dev=0x802 chrdev=0x2f02 rawdev=0x2f02 readdoslabel enter: rd0, spoofonly 0, partoffp NULL readdoslabel: N/A -- label partition @ daddr_t 0 (default) readdoslabel return: rd0, 0, checkdisklabel() of daddr_t 1 ok sximmc1: timeout updating clock sdmmc1: can't supply clock sdmmc1: can't enable card softraid0 at root scsibus0 at softraid0: 256 targets root on rd0a swap on rd0b dump on rd0b dev=0x800 chrdev=0x2f00 rawdev=0x2f02 readdoslabel enter: rd0, spoofonly 0, partoffp NULL readdoslabel: N/A -- label partition @ daddr_t 0 (default) readdoslabel return: rd0, 0, checkdisklabel() of daddr_t 1 ok readdoslabel enter: rd0, spoofonly 0, partoffp NULL readdoslabel: N/A -- label partition @ daddr_t 0 (default) readdoslabel return: rd0, 0, checkdisklabel() of daddr_t 1 ok WARNING: CHECK AND RESET THE DATE! init: copying out path `/sbin/init' 11 hello, world leave me alone, I'm execing <------- If you would like to help, I'd be delighted. I'm looking for good advice, people with the same hardware, people with an Allwinner H6 perhaps, people who know 16550 UARTS. Thanks! -peter -- Over thirty years experience on Unix-like Operating Systems starting with QNX.