> Date: Sun, 11 Aug 2019 23:49:10 +0000 > From: ioh <m...@sdf.org> > > I have been able to successfully install OpenBSD Current Aug 06 > 2019 on the Olimex Teres laptop. It has very similar hardware to > the PineBook, arm64 allwinner, etc. I used u-boot-sunxi-with-spl.bin > from u-boot v2019.07 (teres_i_defconfig) and Arm Trusted Firmware > v2.1. The dtb (sun50i-a64-teres-i.dtb) is from the OpenBSD 6.5-release > ports tree. > > To complete kernel initialization from either the install bsd.rd > or bsd from an install, the ohci driver must be disabled. I have > included the serial console output and dmesg of first a boot without > the ohci driver disabled, and then the boot log of my successful > install with ohci disabled. According to linux dmesg or the > sun50i-a64-teres-i.dts, ohci is available so the driver is probed > correctly - but even after several minutes the initialization process > will not continue past the line "ohci0 at simplebus0".
The hang at that point suggests that accessing the OHCI registers hangs the machine. That happened in the past when the relevant clock wasn't running or when the OHCI logic block wasn't brought out of reset. But those issues got fixed and ohci(4) works fine on other boards that use the Allwinner A64 SoC. What seems to be different is that the Teres-i only has the 2nd USB controller enabled. > What works: the embedded mmc and external mmc, external usb ports, > the serial line, and if xorg is running, the display. The "arm64 glass console" diff I posted last weekend should give you a framebuffer console. Note that that diff is for the bootloader, so you'll need to build and install it and then run installboot. That diff is probably going to be committed today or tomorrow so you could just wait a few days for a new snapshot. > What does not: wifi (as expected, realtek 8723bs), keyboard and > trackpad. There is some evidence of the keyboard that shows up in dmesg: > umodem0 at uhub1 port 4 configuration 1 interface 2 "Olimex Ltd. TERES > Keyboard+Touchpad (drv)" rev 1.10/0.01 addr 5 > umodem0: data interface 3, has no CM over data, has break > umodem0: status change notification available > ucom0 at umodem0 It'd be interesting to see what happens if you disable umoden(4) and see what the USB descriptors are for that device. For that purpose install the usbutils package and post the output of "lsusb -v". > Please let me know if there is anything I can do to help improve > support for this platform. I tried building a DEBUG kernel and > booting with "verbose" from the UKC> prompt but did not find any > useful (afaik) information. I don't know how else to get more verbose > information from the initialization process (add printf's to the > driver code?). Adding printfs is probably the way to go here. Start with ohci_fdt_attach() in sys/dev/fdt/ohci_fdt.c and try to pinpoint at which point it hangs. > U-Boot SPL 2019.07 (Aug 06 2019 - 22:39:39 +0000) > DRAM: 2048 MiB > Trying to boot from MMC2 > NOTICE: BL31: v2.1(release):v2.1 > NOTICE: BL31: Built : 22:20:23, Aug 6 2019 > NOTICE: BL31: Detected Allwinner A64/H64/R18 SoC (1689) > NOTICE: BL31: Found U-Boot DTB at 0x408a4a0, model: Olimex A64 Teres-I > NOTICE: BL31: PMIC: Detected AXP803 on RSB. > > > U-Boot 2019.07 (Aug 06 2019 - 22:39:39 +0000) Allwinner Technology > > CPU: Allwinner A64 (SUN50I) > Model: Olimex A64 Teres-I > DRAM: 2 GiB > MMC: Device 'mmc@1c11000': seq 1 is in use by 'mmc@1c10000' > mmc@1c0f000: 0, mmc@1c10000: 2, mmc@1c11000: 1 > Loading Environment from FAT... *** Warning - bad CRC, using default > environment > > In: serial > Out: vidconsole > Err: vidconsole > Net: No ethernet found. > starting USB... > Bus usb@1c1b000: USB EHCI 1.00 > scanning bus usb@1c1b000 for devices... 2 USB Device(s) found > scanning usb for storage devices... 0 Storage Device(s) found > Hit any key to stop autoboot: 0 > switch to partitions #0, OK > mmc1(part 0) is current device > Scanning mmc 1:1... > 19606 bytes read in 4 ms (4.7 MiB/s) > Found EFI removable media binary efi/boot/bootaa64.efi > MMC: no card present > Scanning disk m...@1c0f000.blk... > Disk m...@1c0f000.blk not ready > Card did not respond to voltage select! > Scanning disk m...@1c10000.blk... > Disk m...@1c10000.blk not ready > Scanning disk m...@1c11000.blk... > Found 3 disks > BootOrder not defined > EFI boot manager: Cannot load any image > 159484 bytes read in 10 ms (15.2 MiB/s) > disks: sd0* > >> OpenBSD/arm64 BOOTAA64 0.17 > boot> > booting sd0a:/bsd: 6060108+1228568+514296+816936 > [422297+109+714912+416614]=0xac09f8 > type 0x2 pa 0x40000000 va 0x40000000 pages 0x4000 attr 0x8 > type 0x7 pa 0x44000000 va 0x44000000 pages 0x3ef8 attr 0x8 > type 0x4 pa 0x47ef8000 va 0x47ef8000 pages 0x10 attr 0x8 > type 0x7 pa 0x47f08000 va 0x47f08000 pages 0x705e9 attr 0x8 > type 0x2 pa 0xb84f1000 va 0xb84f1000 pages 0xa0e attr 0x8 > type 0x1 pa 0xb8eff000 va 0xb8eff000 pages 0x27 attr 0x8 > type 0x0 pa 0xb8f26000 va 0xb8f26000 pages 0x7 attr 0x8 > type 0x6 pa 0xb8f2d000 va 0x9b4d7f000 pages 0x1 attr 0x8000000000000008 > type 0x0 pa 0xb8f2e000 va 0xb8f2e000 pages 0x3 attr 0x8 > type 0x6 pa 0xb8f31000 va 0x9b4d83000 pages 0x1 attr 0x8000000000000008 > type 0x0 pa 0xb8f32000 va 0xb8f32000 pages 0x1 attr 0x8 > type 0x2 pa 0xb8f33000 va 0xb8f33000 pages 0x501d attr 0x8 > type 0x5 pa 0xbdf50000 va 0x9b9da2000 pages 0x10 attr 0x8000000000000008 > type 0x2 pa 0xbdf60000 va 0xbdf60000 pages 0xa0 attr 0x8 > type 0x0 pa 0xbe000000 va 0xbe000000 pages 0x401 attr 0x8 > type 0x2 pa 0xbe401000 va 0xbe401000 pages 0x1bff attr 0x8 > [ using 1554904 bytes of bsd ELF symbol table ] > Copyright (c) 1982, 1986, 1989, 1991, 1993 > The Regents of the University of California. All rights reserved. > Copyright (c) 1995-2019 OpenBSD. All rights reserved. https://www.OpenBSD.org > > OpenBSD 6.5-current (GENERIC.MP) #158: Tue Aug 6 16:46:13 MDT 2019 > dera...@arm64.openbsd.org:/usr/src/sys/arch/arm64/compile/GENERIC.MP > real mem = 2018381824 (1924MB) > avail mem = 1928839168 (1839MB) > mainbus0 at root: Olimex A64 Teres-I > 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.7 > efi0: Das U-Boot rev 0x20190700 > apm0 at mainbus0 > psci0 at mainbus0: PSCI 1.1, SMCCC 1.1 > "osc24M_clk" at mainbus0 not configured > "osc32k_clk" at mainbus0 not configured > "internal-osc-clk" at mainbus0 not configured > "sound_spdif" at mainbus0 not configured > "spdif-out" at mainbus0 not configured > agtimer0 at mainbus0: tick rate 24000 KHz > simplebus0 at mainbus0: "soc" > sxiccmu0 at simplebus0 > sxipio0 at simplebus0: 103 pins > ampintc0 at simplebus0 nirq 224, ncpu 4 ipi: 0, 1: "interrupt-controller" > sxiccmu1 at simplebus0 > sxipio1 at simplebus0: 13 pins > sxirsb0 at simplebus0 > axppmic0 at sxirsb0 addr 0x3a3: AXP803 > "de2" at simplebus0 not configured > "syscon" at simplebus0 not configured > "dma-controller" at simplebus0 not configured > "lcd-controller" at simplebus0 not configured > "lcd-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 > sximmc2 at simplebus0 > sdmmc2 at sximmc2: 8-bit, sd high-speed, mmc high-speed, dma > "eeprom" at simplebus0 not configured > "phy" at simplebus0 not configured > ehci0 at simplebus0 > usb0 at ehci0: USB revision 2.0 > uhub0 at usb0 configuration 1 interface 0 "Generic EHCI root hub" rev > 2.00/1.00 addr 1 > ohci0 at simplebus0 > > ############# > It is at this point ^^^ that the boot process stops proceeding indefinitely. > ############# > > > U-Boot SPL 2019.07 (Aug 06 2019 - 22:39:39 +0000) > DRAM: 2048 MiB > Trying to boot from MMC2 > NOTICE: BL31: v2.1(release):v2.1 > NOTICE: BL31: Built : 22:20:23, Aug 6 2019 > NOTICE: BL31: Detected Allwinner A64/H64/R18 SoC (1689) > NOTICE: BL31: Found U-Boot DTB at 0x408a4a0, model: Olimex A64 Teres-I > NOTICE: BL31: PMIC: Detected AXP803 on RSB. > > > U-Boot 2019.07 (Aug 06 2019 - 22:39:39 +0000) Allwinner Technology > > CPU: Allwinner A64 (SUN50I) > Model: Olimex A64 Teres-I > DRAM: 2 GiB > MMC: Device 'mmc@1c11000': seq 1 is in use by 'mmc@1c10000' > mmc@1c0f000: 0, mmc@1c10000: 2, mmc@1c11000: 1 > Loading Environment from FAT... *** Warning - bad CRC, using default > environment > > In: serial > Out: vidconsole > Err: vidconsole > Net: No ethernet found. > starting USB... > Bus usb@1c1b000: USB EHCI 1.00 > scanning bus usb@1c1b000 for devices... 2 USB Device(s) found > scanning usb for storage devices... 0 Storage Device(s) found > Hit any key to stop autoboot: 0 > switch to partitions #0, OK > mmc1(part 0) is current device > Scanning mmc 1:1... > 19606 bytes read in 3 ms (6.2 MiB/s) > Found EFI removable media binary efi/boot/bootaa64.efi > MMC: no card present > Scanning disk m...@1c0f000.blk... > Disk m...@1c0f000.blk not ready > Card did not respond to voltage select! > Scanning disk m...@1c10000.blk... > Disk m...@1c10000.blk not ready > Scanning disk m...@1c11000.blk... > Found 3 disks > BootOrder not defined > EFI boot manager: Cannot load any image > 159484 bytes read in 10 ms (15.2 MiB/s) > disks: sd0* > >> OpenBSD/arm64 BOOTAA64 0.17 > boot> boot sd0a:/bsd -c > booting sd0a:/bsd: 6060108+1228568+514296+816936 > [422297+109+714912+416614]=0xac09f8 > type 0x2 pa 0x40000000 va 0x40000000 pages 0x4000 attr 0x8 > type 0x7 pa 0x44000000 va 0x44000000 pages 0x3ef8 attr 0x8 > type 0x4 pa 0x47ef8000 va 0x47ef8000 pages 0x10 attr 0x8 > type 0x7 pa 0x47f08000 va 0x47f08000 pages 0x705e9 attr 0x8 > type 0x2 pa 0xb84f1000 va 0xb84f1000 pages 0xa0e attr 0x8 > type 0x1 pa 0xb8eff000 va 0xb8eff000 pages 0x27 attr 0x8 > type 0x0 pa 0xb8f26000 va 0xb8f26000 pages 0x7 attr 0x8 > type 0x6 pa 0xb8f2d000 va 0x9b4d7f000 pages 0x1 attr 0x8000000000000008 > type 0x0 pa 0xb8f2e000 va 0xb8f2e000 pages 0x3 attr 0x8 > type 0x6 pa 0xb8f31000 va 0x9b4d83000 pages 0x1 attr 0x8000000000000008 > type 0x0 pa 0xb8f32000 va 0xb8f32000 pages 0x1 attr 0x8 > type 0x2 pa 0xb8f33000 va 0xb8f33000 pages 0x501d attr 0x8 > type 0x5 pa 0xbdf50000 va 0x9b9da2000 pages 0x10 attr 0x8000000000000008 > type 0x2 pa 0xbdf60000 va 0xbdf60000 pages 0xa0 attr 0x8 > type 0x0 pa 0xbe000000 va 0xbe000000 pages 0x401 attr 0x8 > type 0x2 pa 0xbe401000 va 0xbe401000 pages 0x1bff attr 0x8 > [ using 1554904 bytes of bsd ELF symbol table ] > Copyright (c) 1982, 1986, 1989, 1991, 1993 > The Regents of the University of California. All rights reserved. > Copyright (c) 1995-2019 OpenBSD. All rights reserved. https://www.OpenBSD.org > > OpenBSD 6.5-current (GENERIC.MP) #158: Tue Aug 6 16:46:13 MDT 2019 > dera...@arm64.openbsd.org:/usr/src/sys/arch/arm64/compile/GENERIC.MP > real mem = 2018381824 (1924MB) > avail mem = 1928839168 (1839MB) > User Kernel Config > UKC> disable ohci > 133 ohci* disabled > 169 ohci* disabled > UKC> quit > Continuing... > mainbus0 at root: Olimex A64 Teres-I > 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.7 > efi0: Das U-Boot rev 0x20190700 > apm0 at mainbus0 > psci0 at mainbus0: PSCI 1.1, SMCCC 1.1 > "osc24M_clk" at mainbus0 not configured > "osc32k_clk" at mainbus0 not configured > "internal-osc-clk" at mainbus0 not configured > "sound_spdif" at mainbus0 not configured > "spdif-out" at mainbus0 not configured > agtimer0 at mainbus0: tick rate 24000 KHz > simplebus0 at mainbus0: "soc" > sxiccmu0 at simplebus0 > sxipio0 at simplebus0: 103 pins > ampintc0 at simplebus0 nirq 224, ncpu 4 ipi: 0, 1: "interrupt-controller" > sxiccmu1 at simplebus0 > sxipio1 at simplebus0: 13 pins > sxirsb0 at simplebus0 > axppmic0 at sxirsb0 addr 0x3a3: AXP803 > "de2" at simplebus0 not configured > "syscon" at simplebus0 not configured > "dma-controller" at simplebus0 not configured > "lcd-controller" at simplebus0 not configured > "lcd-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 > sximmc2 at simplebus0 > sdmmc2 at sximmc2: 8-bit, sd high-speed, mmc high-speed, dma > "eeprom" at simplebus0 not configured > "phy" at simplebus0 not configured > ehci0 at simplebus0 > usb0 at ehci0: USB revision 2.0 > uhub0 at usb0 configuration 1 interface 0 "Generic EHCI root hub" rev > 2.00/1.00 addr 1 > "usb" at simplebus0 not configured > com0 at simplebus0: ns16550, no working fifo > com0: console > sxitwi0 at simplebus0 > iic0 at sxitwi0 > "hdmi-phy" at simplebus0 not configured > sxirtc0 at simplebus0 > "interrupt-controller" at simplebus0 not configured > "watchdog" 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 > gpio7 at sxipio0: 32 pins > gpio8 at sxipio1: 32 pins > "gpio-keys" at mainbus0 not configured > "leds" at mainbus0 not configured > "usb1-vbus" at mainbus0 not configured > "wifi_pwrseq" at mainbus0 not configured > simplefb0 at mainbus0: 1366x768, 32bpp > wsdisplay0 at simplefb0 mux 1 > wsdisplay0: screen 0-5 added (std, vt100 emulation) > 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 > manufacturer 0x024c, product 0xb723 at sdmmc1 function 1 not configured > scsibus0 at sdmmc2: 2 targets, initiator 0 > sd0 at scsibus0 targ 1 lun 0: <Micron, R1J56L, 0000> SCSI2 0/direct removable > sd0: 14080MB, 512 bytes/sector, 28835840 sectors > uhub1 at uhub0 port 1 configuration 1 interface 0 "Genesys Logic USB2.0 Hub" > rev 2.00/85.36 addr 2 > urtwn0 at uhub1 port 2 configuration 1 interface 0 "Realtek 802.11n NIC" rev > 2.00/0.00 addr 3 > urtwn0: MAC/BB RTL8188EU, RF 6052 1T1R, address 84:16:f9:1d:70:5c > uvideo0 at uhub1 port 3 configuration 1 interface 0 "Generic USB2.0 PC > CAMERA" rev 2.00/1.00 addr 4 > video0 at uvideo0 > umodem0 at uhub1 port 4 configuration 1 interface 2 "Olimex Ltd. TERES > Keyboard+Touchpad (drv)" rev 1.10/0.01 addr 5 > umodem0: data interface 3, has no CM over data, has break > umodem0: status change notification available > ucom0 at umodem0 > 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 (7f4f193dd87e3ae5.a) swap on sd0b dump on sd0b > Automatic boot in progress: starting file system checks. > /dev/sd0a (7f4f193dd87e3ae5.a): file system is clean; not checking > /dev/sd0l (7f4f193dd87e3ae5.l): file system is clean; not checking > /dev/sd0d (7f4f193dd87e3ae5.d): file system is clean; not checking > /dev/sd0f (7f4f193dd87e3ae5.f): file system is clean; not checking > /dev/sd0g (7f4f193dd87e3ae5.g): file system is clean; not checking > /dev/sd0h (7f4f193dd87e3ae5.h): file system is clean; not checking > /dev/sd0k (7f4f193dd87e3ae5.k): file system is clean; not checking > /dev/sd0j (7f4f193dd87e3ae5.j): file system is clean; not checking > /dev/sd0e (7f4f193dd87e3ae5.e): file system is clean; not checking > pf enabled > ddb.console: 0 -> 1 > starting network > urtwn0: no link... got link > urtwn0: no lease..... got lease > urtwn0: 192.168.1.28 lease accepted from 192.168.1.1 (c8:d7:19:d9:eb:54) > reordering libraries: done. > starting early daemons: syslogd pflogd ntpd. > starting RPC daemons:. > savecore: no core dump > checking quotas: done. > clearing /tmp > kern.securelevel: 0 -> 1 > creating runtime link editor directory cache. > preserving editor files. > starting network daemons: sshd smtpd sndiod. > starting local daemons: cron. > Sun Aug 11 16:25:28 PDT 2019 > > OpenBSD/arm64 (hedges.my.domain) (console) > > login: > > -- > ioh > >