On Sat, 2019-10-26 at 14:25 +1100, Jonathan Gray wrote:
> On Fri, Oct 25, 2019 at 05:16:49PM +0200, Unicorn wrote:
> > On Fri, 2019-10-25 at 18:00 +1100, Jonathan Gray wrote:
> > > On Fri, Oct 25, 2019 at 08:48:21AM +0200, Unicorn wrote:
> > > > On Fri, 2019-10-25 at 13:34 +1100, Jonathan Gray wrote:
> > > > > On Thu, Oct 24, 2019 at 06:21:14PM +0200, Unicorn wrote:
> > > > > > Hello everyone,
> > > > > > 
> > > > > > I own an Allwinner A20 based OLinuXino LIME2, a little OSHW
> > > > > > board
> > > > > > by
> > > > > > Olimex. I saw that there is support for some A20 devices,
> > > > > > unfortunately
> > > > > > not the OLinuXino LIME2. Since I am new to both BSD and
> > > > > > ARM, I
> > > > > > do
> > > > > > not
> > > > > > know where to start with getting OpenBSD to run on my
> > > > > > board.
> > > > > > 
> > > > > > Does anyone here have experience with this board in
> > > > > > particular
> > > > > > or
> > > > > > advice on where to start with getting it to run?
> > > > > > 
> > > > > > Thanks in advance!
> > > > > > 
> > > > > 
> > > > > System firmware unfortunately does not ship with such systems
> > > > > and
> > > > > has
> > > > > to
> > > > > share the storage device with the operating system.
> > > > > 
> > > > > Assuming you have another OpenBSD install or something that
> > > > > can
> > > > > extract
> > > > > the package see
> > > > > 
> > > > > "Install on systems without a supported miniroot" from
> > > > > https://ftp.openbsd.org/pub/OpenBSD/snapshots/armv7/INSTALL.armv7
> > > > > 
> > > > > Install the u-boot-arm package and run
> > > > > 
> > > > > dd if=miniroot-cubie-66.fs of=/dev/rsdXc
> > > > > dd if=/usr/local/share/u-boot/A20-OLinuXino-Lime2/u-boot-
> > > > > sunxi-
> > > > > with-
> > > > > spl.bin \
> > > > >     of=/dev/sdXc bs=1024 seek=8
> > > > > 
> > > > > where sdX is the device the sd card shows up as.
> > > > > 
> > > > > alternatively there is also a 'A20-OLinuXino-Lime2-eMMC'
> > > > > target
> > > > > built.
> > > > 
> > > > Thanks a lot for the pointer, I will try with these
> > > > instructions
> > > > later
> > > > with an OpenBSD VM when I have the time!
> > > > 
> > > > > alternatively there is also a 'A20-OLinuXino-Lime2-eMMC'
> > > > > target
> > > > > built.
> > > > 
> > > > What do you mean by this? Would this be for installation on the
> > > > eMMC
> > > > chip on the LIME2?
> > > 
> > > It is for models where eMMC is present as it is optional.
> > > You should still be able to install to sd card when using it.
> > > 
> > 
> > Alright, I was able to boot and start installation, but OpenBSD
> > does
> > not manage to work with the LAN port.
> > 
> > When telling it to use dhcp to configure the interface during
> > installation, it just responds something along the lines of "no
> > lease",
> > but I can't even see an attempt at communicating when I check my
> > router's log :/ (Armbian connects just fine and shows up in the
> > log)
> > 
> > Do you have any idea how I could fix this?
> > On the datasheet about the specific model I own, I found that the
> > LAN
> > port is 'TM211Q01FM22_SH', but I am not sure if that is of any
> > help.
> > 
> > If it would help to tell you the output of any commands, I am happy
> > to
> > report back if you have an idea :)
> > 
> > Thanks for your input!
> 
> Can you include the full serial output when booting?
> 
> If you break into the U-Boot prompt can you get a dhcp lease?
> 
> Hit any key to stop autoboot:  0 
> => setenv autoload no
> => dhcp
> => printenv ipaddr
> 
> It matters which phy you have as well, the U-Boot images are not
> built
> with CONFIG_GMAC_TX_DELAY=3 which is needed for the revision H boards
> with a Micrel/Microchip KSZ9031 phy according to
> https://linux-sunxi.org/Olimex_A20-OLinuXino-Lime2
> 
> It seems armbian have a patched U-Boot, it is unclear if the latest
> patch is
> https://github.com/armbian/build/blob/master/patch/u-boot/u-boot-sunxi/board_lime2/GMAC_TX_DELAY_autocorrection.patch
> 
> olimex have their own U-Boot branch
> https://github.com/OLIMEX/u-boot/tree/olimex
> which has many changes, one of which sets the tx delay to 4 for
> revisions >= H.
> 


Alright, I am running Rev. K, so that may indeed be the issue.
Here is what it spits out when booting my fresh install:

--------------------------

U-Boot SPL 2019.10 (Oct 11 2019 - 13:02:58 -0600)
DRAM: 1024 MiB
CPU: 912000000Hz, AXI/AHB/APB: 3/2/2
Trying to boot from MMC1


U-Boot 2019.10 (Oct 11 2019 - 13:02:58 -0600) Allwinner Technology

CPU:   Allwinner A20 (SUN7I)
Model: Olimex A20-OLinuXino-LIME2-eMMC
I2C:   ready
DRAM:  1 GiB
MMC:   mmc@1c0f000: 0, mmc@1c11000: 1
Loading Environment from FAT... Unable to use mmc 1:1... In:    serial
Out:   serial
Err:   serial
Allwinner mUSB OTG (Peripheral)
Net:   eth0: ethernet@1c50000
Warning: usb_ether using MAC address from ROM
, eth1: usb_ether
starting USB...
Bus usb@1c14000: USB EHCI 1.00
Bus usb@1c14400: USB OHCI 1.0
Bus usb@1c1c000: USB EHCI 1.00
Bus usb@1c1c400: USB OHCI 1.0
scanning bus usb@1c14000 for devices... 1 USB Device(s) found
scanning bus usb@1c14400 for devices... 1 USB Device(s) found
scanning bus usb@1c1c000 for devices... 1 USB Device(s) found
scanning bus usb@1c1c400 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage 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...
Found EFI removable media binary efi/boot/bootarm.efi
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
78Scanning disk m...@1c0f000.blk...
Scanning disk m...@1c11000.blk...
Found 5 disks
BootOrder not defined
EFI boot manager: Cannot load any image
88176 bytes read in 11 ms (7.6 MiB/s)
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
>> OpenBSD/armv7 BOOTARM 1.6



boot> 



booting sd0a:/bsd: \|/-\4595732|/-\|+676948/-\|/-
+249604\|//+564980- [303528\|+120+317408\||/+281715-
\]=0x0



EHCI failed to shut down host controller.


OpenBSD/armv7 booting ...

arg0 0xc09ac6d0 arg1 0x0 arg2 0x47ef5000

Allocating page tables

IRQ stack: p0x409db000 v0xc09db000

ABT stack: p0x409dc000 v0xc09dc000

UND stack: p0x409dd000 v0xc09dd000

SVC stack: p0x409de000 v0xc09de000

Creating L1 page table at 0x409b0000

Mapping kernel

Constructing L2 page tables

undefined page type 0x2 pa 0x40000000 va 0x40000000 pages 0x2000 attr
0x8

type 0x7 pa 0x42000000 va 0x42000000 pages 0x5ef5 attr 0x8

type 0x4 pa 0x47ef5000 va 0x47ef5000 pages 0x16 attr 0x8

type 0x7 pa 0x47f0b000 va 0x47f0b000 pages 0x318a5 attr 0x8

type 0x2 pa 0x797b0000 va 0x797b0000 pages 0x667 attr 0x8

type 0x4 pa 0x79e17000 va 0x79e17000 pages 0x1 attr 0x8

type 0x7 pa 0x79e18000 va 0x79e18000 pages 0x1 attr 0x8

type 0x2 pa 0x79e19000 va 0x79e19000 pages 0x100 attr 0x8

type 0x1 pa 0x79f19000 va 0x79f19000 pages 0x16 attr 0x8

type 0x0 pa 0x79f2f000 va 0x79f2f000 pages 0x7 attr 0x8

type 0x4 pa 0x79f36000 va 0x79f36000 pages 0x1 attr 0x8

type 0x6 pa 0x79f37000 va 0x79f37000 pages 0x1 attr 0x8000000000000008

type 0x4 pa 0x79f38000 va 0x79f38000 pages 0x2 attr 0x8

type 0x0 pa 0x79f3a000 va 0x79f3a000 pages 0x6 attr 0x8

type 0x4 pa 0x79f40000 va 0x79f40000 pages 0x2 attr 0x8

type 0x6 pa 0x79f42000 va 0x79f42000 pages 0x1 attr 0x8000000000000008

type 0x2 pa 0x79f43000 va 0x79f43000 pages 0x5029 attr 0x8

type 0x5 pa 0x7ef6c000 va 0x7ef6c000 pages 0x1 attr 0x8000000000000008

type 0x2 pa 0x7ef6d000 va 0x7ef6d000 pages 0x93 attr 0x8

type 0x4 pa 0x7f000000 va 0x7f000000 pages 0x1000 attr 0x8

pmap [ using 903384 bytes of bsd ELF symbol table ]

board type: 0

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.6 (GENERIC) #226: Sat Oct 12 08:36:17 MDT 2019

    dera...@armv7.openbsd.org:/usr/src/sys/arch/armv7/compile/GENERIC

real mem  = 964272128 (919MB)

avail mem = 935239680 (891MB)

mainbus0 at root: Olimex A20-OLinuXino-LIME2-eMMC

cpu0 at mainbus0 mpidr 0: ARM Cortex-A7 r0p4

cpu0: 32KB 32b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-
cache

cpu0: 256KB 64b/line 8-way L2 cache

cortex0 at mainbus0

psci0 at mainbus0: PSCI 0.0

sxiccmu0 at mainbus0

agtimer0 at mainbus0: tick rate 24000 KHz

simplebus0 at mainbus0: "soc"

sxiccmu1 at simplebus0

sxipio0 at simplebus0: 175 pins

sxirtc0 at simplebus0

ampintc0 at simplebus0 nirq 160, ncpu 2: "interrupt-controller"

"system-control" at simplebus0 not configured

"interrupt-controller" at simplebus0 not configured

"dma-controller" at simplebus0 not configured

"lcd-controller" at simplebus0 not configured

"lcd-controller" at simplebus0 not configured

"video-codec" 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

"usb" 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: version 1.0

"crypto-engine" at simplebus0 not configured

"hdmi" at simplebus0 not configured

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 "Generic EHCI root hub" rev
2.00/1.00 addr 1

ohci1 at simplebus0: version 1.0

"timer" at simplebus0 not configured

sxidog0 at simplebus0

"eeprom" at simplebus0 not configured

sxits0 at simplebus0

com0 at simplebus0: ns16550, no working fifo

com0: console

sxitwi0 at simplebus0

iic0 at sxitwi0

axppmic0 at iic0 addr 0x34: AXP209

sxitwi1 at simplebus0

iic1 at sxitwi1

"atmel,24c16" at iic1 addr 0x50 not configured

"gpu" at simplebus0 not configured

dwge0 at simplebus0: address 02:c2:0b:41:b4:bf

ukphy0 at dwge0 phy 1: Generic IEEE 802.3u media interface, rev. 2: OUI
0x000885, model 0x0022

"hstimer" at simplebus0 not configured

"display-frontend" at simplebus0 not configured

"display-frontend" at simplebus0 not configured

"display-backend" at simplebus0 not configured

"display-backend" 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 sxipio0: 32 pins

usb2 at ohci0: USB revision 1.0

uhub2 at usb2 configuration 1 interface 0 "Generic OHCI root hub" rev
1.00/1.00 addr 1

usb3 at ohci1: USB revision 1.0

uhub3 at usb3 configuration 1 interface 0 "Generic OHCI root hub" rev
1.00/1.00 addr 1

scsibus1 at sdmmc0: 2 targets, initiator 0

sd0 at scsibus1 targ 1 lun 0: <SD/MMC, SD08G, 0030> removable

sd0: 7600MB, 512 bytes/sector, 15564800 sectors

scsibus2 at sdmmc1: 2 targets, initiator 0

sd1 at scsibus2 targ 1 lun 0: <Micron, Q2J55L, 0000> removable

sd1: 7264MB, 512 bytes/sector, 14876672 sectors

vscsi0 at root

scsibus3 at vscsi0: 256 targets

softraid0 at root

scsibus4 at softraid0: 256 targets

bootfile: sd0a:/bsd

boot device: sd0

root on sd0a (86faf72d06df1e13.a) swap on sd0b dump on sd0b

WARNING: / was not properly unmounted

Automatic boot in progress: starting file system checks.
/dev/sd0a (86faf72d06df1e13.a): 1705 files, 26839 used, 504288 free (48
frags, 63030 blocks, 0.0% fragmentation)
/dev/sd0a (86faf72d06df1e13.a): MARKING FILE SYSTEM CLEAN
/dev/sd0e (86faf72d06df1e13.e): 10 files, 9 used, 1030518 free (14
frags, 128813 blocks, 0.0% fragmentation)
/dev/sd0e (86faf72d06df1e13.e): MARKING FILE SYSTEM CLEAN
/dev/sd0d (86faf72d06df1e13.d): 24135 files, 350732 used, 1195883 free
(2155 frags, 149216 blocks, 0.1% fragmentation)
/dev/sd0d (86faf72d06df1e13.d): MARKING FILE SYSTEM CLEAN
pf enabled
starting network
dwge0: no lease......... sleeping
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.
Sat Oct 26 09:15:12 CEST 2019

OpenBSD/armv7 (hostname.local.domain) (console)

login:

--------------------------

Even the U-Boot prompt did not lead me to success:

--------------------------

Hit any key to stop autoboot:  2  0
=> setenv autoload no
=> dhcp
Speed: 1000, full duplex
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
BOOTP broadcast 4
BOOTP broadcast 5
BOOTP broadcast 6
BOOTP broadcast 7
BOOTP broadcast 8
BOOTP broadcast 9
BOOTP broadcast 10
BOOTP broadcast 11
BOOTP broadcast 12
BOOTP broadcast 13
BOOTP broadcast 14
BOOTP broadcast 15
BOOTP broadcast 16
BOOTP broadcast 17

Retry time exceeded; starting again
=> dhcp    printenv ipaddr
## Error: "ipaddr" not defined

------------------------------

Do you have advice on how to proceed? I assume I need to build it
myself, but I don't know what exactly that entails. I would be happy to
work on it though if you point me to the general steps I need to take.

Thanks for all your help!

Reply via email to