On Sat, Nov 26, 2016 at 10:21:51PM -0800, lawgi...@nym.hush.com wrote:
> I've attached a Banana Pi M1 using a USB-TTL serial cable, and am
> following the instructions at pub/OpenBSD/snapshots/armv7/INSTALL.armv7
> 
> Using the below steps I have arrived at the OpenBSD installer, but am
> asking for feedback:
> 
> 1) At one step, dd to sd card's rsd0c returns "Invalid argument", but sd0c 
> works

To use the raw device conv=sync should do it, but yes we should probably
change the help to use sd0c.

> 2) Should the (missing) step to cp u-boot.img be added to the install doc for 
> AllWinner SoCs?

No, allwinner devices load u-boot from a raw offset.  That part is not
required.

> 3) No disks available to installer; is the failure to enable sdmmc0 
> expected at this time?  What can I do here?

It would seem the clock handling in the kernel may need to be adjusted.

> 
> Thanks for the hard work.  I'm excited to see this platform supported.
> 
> -lg
> 
> #####
> 
> # working directory
> 
> user@i386:~ $ mkdir bpi
> user@i386:~ $ cd bpi
> 
> # no bananapi m1 miniroot exists, so fetch (any?) existing miniroot
> 
> user@i386:~/bpi $ wget http://ftp.openbsd.org/pub/OpenBSD/snapshots/ar
> mv7/miniroot-beagle-60.fs
> 
> # write miniroot to sd card
> 
> user@i386:~/bpi $ doas dd if=miniroot-beagle-60.fs of=/dev/rsd0c bs=1m
> 
> # mount msdos partition from sd card
> 
> user@i386:~/bpi $ doas mount /dev/sd0i /mnt
> user@i386:~/bpi $ ls /mnt
> total 1256
> -rw-r--r--  1 root  wheel   54648 Nov 25 04:02 MLO
> drwxr-xr-x  1 root  wheel    4096 Nov 25 04:02 efi
> -rw-r--r--  1 root  wheel   64633 Nov 25 04:02 omap3-beagle-xm-ab.dtb
> -rw-r--r--  1 root  wheel   64602 Nov 25 04:02 omap3-beagle-xm.dtb
> -rw-r--r--  1 root  wheel   64752 Nov 25 04:02 omap3-beagle.dtb
> -rw-r--r--  1 root  wheel  381584 Nov 25 04:02 u-boot.img
> 
> # no dtb package exists for i386, fetch and unpack from arm branch

Strange, it exists for amd64 and others
http://ftp.openbsd.org/pub/OpenBSD/snapshots/packages/amd64/dtb-4.8.tgz

> 
> user@i386:~/bpi $ wget http://ftp.openbsd.org/pub/OpenBSD/snapshots/pa
> ckages/arm/dtb-4.8.tgz
> user@i386:~/bpi $ tar zxvf dtb-4.8.tgz
> user@i386:~/bpi $ doas cp share/dtb/arm/sun7i-a20-bananapi.dtb /mnt
> 
> # remove beagle dtbs
> 
> user@i386:~/bpi $ doas rm /mnt/omap3*
> 
> # uboot package exists for i386
> 
> user@i386:~/bpi $ doas pkg_add u-boot
> 
> user@i386:~/bpi $ ls -l /usr/local/share/u-boot/Bananapi/
> total 6592
> -rwxr-xr-x  1 root  bin  1994552 Nov 24 15:49 u-boot
> -rw-r--r--  1 root  bin   491811 Nov 24 15:49 u-boot-sunxi-with-spl.bin
> -rw-r--r--  1 root  bin   458979 Nov 24 15:49 u-boot.bin
> -rw-r--r--  1 root  bin   459043 Nov 24 15:49 u-boot.img
> 
> # this step is missing from INSTALL.armv7?  I believe it won't boot
> # without it...
> 
> user@i386:~/bpi $ doas cp /usr/local/share/u-boot/Bananapi/u-boot.img /mnt

Not required.

> 
> user@i386:~/bpi $ doas umount /mnt
> 
> user@i386:~/bpi $ ls -l /usr/local/share/u-boot/Bananapi/u-boot-sunxi-
> with-spl.bin
> -rw-r--r--  1 root  bin  491811 Nov 24 15:49 /usr/local/share/u-boot/B
> ananapi/u-boot-sunxi-with-spl.bin
> 
> # using rsd0c fails?  wrong number of bytes transferred?

add conv=sync 

> 
> user@i386:~/bpi $ doas dd if=/usr/local/share/u-boot/Bananapi/u-boot-s
> unxi-with-spl.bin of=/dev/rsd0c bs=1024 seek=8
> dd: /dev/rsd0c: Invalid argument
> 480+1 records in
> 480+0 records out
> 491520 bytes transferred in 0.368 secs (1332813 bytes/sec)
> 
> # but using sd0c works ?

or yes, use that

> 
> user@i386:~/bpi $ doas dd if=/usr/local/share/u-boot/Bananapi/u-boot-s
> unxi-with-spl.bin of=/dev/sd0c bs=1024 seek=8
> 480+1 records in
> 480+1 records out
> 491811 bytes transferred in 0.834 secs (589592 bytes/sec)
> 
> # booting from the sd card
> 
> U-Boot SPL 2016.11 (Nov 24 2016 - 16:23:23)
> DRAM: 1024 MiB
> CPU: 912000000Hz, AXI/AHB/APB: 3/2/2
> Trying to boot from MMC1
> 
> 
> U-Boot 2016.11 (Nov 24 2016 - 16:23:23 -0700) Allwinner Technology
> 
> CPU:   Allwinner A20 (SUN7I)
> Model: LeMaker Banana Pi
> I2C:   ready
> DRAM:  1 GiB
> MMC:   SUNXI SD/MMC: 0
> *** Warning - bad CRC, using default environment
> 
> Setting up a 720x576i composite-pal console (overscan 32x20)
> In:    serial
> Out:   vga
> Err:   vga
> SCSI:  SATA link 0 timeout.
> AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode
> flags: ncq stag pm led clo only pmp pio slum part ccc apst
> Net:   eth0: ethernet@01c50000
> starting USB...
> USB0:   USB EHCI 1.00
> USB1:   USB OHCI 1.0
> USB2:   USB EHCI 1.00
> USB3:   USB OHCI 1.0
> scanning bus 0 for devices... 1 USB Device(s) found
> scanning bus 2 for devices... 1 USB Device(s) found
> Hit any key to stop autoboot:  2  1  0
> switch to partitions #0, OK
> mmc0 is current device
> Scanning mmc 0:1...
> reading /sun7i-a20-bananapi.dtb
> 34955 bytes read in 32 ms (1 MiB/s)
> Found EFI removable media binary efi/boot/bootarm.efi
> reading efi/boot/bootarm.efi
> 64684 bytes read in 45 ms (1.4 MiB/s)
> ## Starting EFI application at 0x42000000 ...
> CACHE: Misaligned operation at range [79f1d000, 79f2ccac]
> Scanning disks on scsi...
> Scanning disks on usb...
> Scanning disks on mmc...
> MMC Device 1 not found
> MMC Device 2 not found
> MMC Device 3 not found
> Found 6 disks
> >> OpenBSD/armv7 BOOTARM 0.5
> boot>
> cannot open sd0a:/etc/random.seed: No such file or directory
> booting sd0a:/bsd: -\|/-2139368\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/
> -\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\
> |/-\|/-\|/-\|/-\|/-\|/+7982388-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/
> -\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\
> |/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/
> -\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\
> |/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/
> -\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/+447280 [80+310944-\|/
> -\|/-\|/-\|/-\|+150684/-\|/-\|/]=0xa8ad8c
> 
> OpenBSD/armv7 booting ...
> arg0 0xc0d8ad8c arg1 0x0 arg2 0x48000000
> Allocating page tables
> freestart = 0x40d8b000, free_pages = 258271 (0x0003f0df)
> IRQ stack: p0x40db9000 v0xc0db9000
> ABT stack: p0x40dba000 v0xc0dba000
> UND stack: p0x40dbb000 v0xc0dbb000
> SVC stack: p0x40dbc000 v0xc0dbc000
> Creating L1 page table at 0x40d8c000
> Mapping kernel
> Constructing L2 page tables
> undefined page pmap board type: 0
> Copyright (c) 1982, 1986, 1989, 1991, 1993
>     The Regents of the University of California.  All rights reserved.
> Copyright (c) 1995-2016 OpenBSD. All rights reserved.  https://www.OpenBSD.org
> 
> OpenBSD 6.0-current (RAMDISK) #0: Fri Nov 25 05:02:42 MST 2016
>     bu...@armv7.openbsd.org:/usr/src/sys/arch/armv7/compile/RAMDISK
> real mem  = 1072078848 (1022MB)
> avail mem = 1037008896 (988MB)
> mainbus0 at root: LeMaker Banana Pi
> cpu0 at mainbus0: ARM Cortex A7 rev 4 (ARMv7 core)
> cpu0: DC enabled IC enabled WB disabled EABT branch prediction enabled
> cpu0: 32KB(32b/l,2way) I-cache, 32KB(64b/l,4way) wr-back D-cache
> cortex0 at mainbus0
> agtimer0 at mainbus0: tick rate 24000 KHz
> sxiccmu0 at mainbus0
> simplebus0 at mainbus0: "soc"
> sxipio0 at simplebus0: 175 pins
> sximmc0 at simplebus0
> sdmmc0 at sximmc0: 4-bit, sd high-speed, mmc high-speed, dma
> ehci0 at simplebus0
> usb0 at ehci0: USB revision 2.0
> uhub0 at usb0 configuration 1 interface 0 "Allwinner EHCI root hub" rev 
> 2.00/1.00 addr 1
> sxiahci0 at simplebus0: AHCI 1.1
> scsibus0 at sxiahci0: 32 targets
> ehci1 at simplebus0
> usb1 at ehci1: USB revision 2.0
> uhub1 at usb1 configuration 1 interface 0 "Allwinner EHCI root hub" rev 
> 2.00/1.00 addr 1
> sxidog0 at simplebus0
> sxirtc0 at simplebus0
> com0 at simplebus0: ns16550, no working fifo
> com0: console
> com1 at simplebus0: ns16550, no working fifo
> com2 at simplebus0: ns16550, no working fifo
> dwge0 at simplebus0
> dwge0: Ethernet address: 02:8a:06:xx:xx:xx
> rgephy0 at dwge0 phy 1: RTL8169S/8110S/8211 PHY, rev. 5
> ampintc0 at simplebus0 nirq 160
> gpio0 at sxipio0: 18 pins
> gpio1 at sxipio0: 24 pins
> gpio2 at sxipio0: 25 pins
> gpio3 at sxipio0: 28 pins
> gpio4 at sxipio0: 12 pins
> gpio5 at sxipio0: 6 pins
> gpio6 at sxipio0: 12 pins
> gpio7 at sxipio0: 28 pins
> gpio8 at sxipio0: 22 pins
> sximmc0: timeout updating clock
> sximmc0: timeout updating clock
> sximmc0: timeout updating clock
> sximmc0: timeout updating clock
> sximmc0: timeout updating clock
> sximmc0: timeout updating clock
> sdmmc0: can't enable card
> sximmc0: timeout updating clock
> boot device: lookup 'sd0a:/bsd' failed.
> root on rd0a swap on rd0b dump on rd0b
> WARNING: clock lost 17130 days
> WARNING: CHECK AND RESET THE DATE!
> erase ^?, werase ^W, kill ^U, intr ^C, status ^T
> 
> Welcome to the OpenBSD/armv7 6.0 installation program.
> (I)nstall, (U)pgrade, (A)utoinstall or (S)hell? i
> At any prompt except password prompts you can escape to a shell by
> typing '!'. Default answers are shown in []'s and are selected by
> pressing RETURN.  You can exit this program at any time by pressing
> Control-C, but this can leave your system in an inconsistent state.
> 
> Terminal type? [vt220]
> System hostname? (short form, e.g. 'foo') bpi
> 
> Available network interfaces are: dwge0.
> Which network interface do you wish to configure? (or 'done') [dwge0]
> IPv4 address for dwge0? (or 'dhcp' or 'none') [dhcp]
> DHCPDISCOVER on dwge0 - interval 1
> DHCPOFFER from 192.168.0.1 (cc:65:ad:xx:xx:xx)
> DHCPREQUEST on dwge0 to 255.255.255.255
> DHCPACK from 192.168.0.1 (cc:65:ad:xx:xx:xx)
> bound to 192.168.0.205 -- renewal in 1800 seconds.
> IPv6 address for dwge0? (or 'rtsol' or 'none') [none]
> Available network interfaces are: dwge0.
> Which network interface do you wish to configure? (or 'done') [done]
> Using DNS domainname example.com.
> Using DNS nameservers at 75.75.75.75 75.75.76.76
> 
> Password for root account? (will not echo)
> Password for root account? (again)
> Start sshd(8) by default? [yes]
> Setup a user? (enter a lower-case loginname, or 'no') [no] user
> Full name for user user? [user] user mcuserface
> Password for user user? (will not echo)
> Password for user user? (again)
> WARNING: root is targeted by password guessing attacks, pubkeys are safer.
> Allow root ssh login? (yes, no, prohibit-password) [no]
> What timezone are you in? ('?' for list) [America/Los_Angeles]
> 
> Available disks are: none.
> Which disk is the root disk? ('?' for details)
> 

Reply via email to