Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 May 2017 15:10:47 +0200
From:      aggaz <aggaz@paranoici.org>
To:        Emmanuel Vadot <manu@bidouilliste.com>
Cc:        freebsd-arm@freebsd.org
Subject:   Re: FreeBSD 12-CURRENT on OrangePi One
Message-ID:  <b4061d03-3fed-3ccf-2d04-15cdb3fdc1cc@paranoici.org>
In-Reply-To: <20170502132311.26aa210165fc10f5435def80@bidouilliste.com>
References:  <9e04f3cf-ddce-1b53-b9d6-2fe05ad1cc25@paranoici.org> <20170502105507.4c51a7323bd01903e402f551@bidouilliste.com> <64893df0-f9f7-d24b-8644-bc84824fc657@paranoici.org> <20170502132311.26aa210165fc10f5435def80@bidouilliste.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Sorry, I had the same error even with another dtb file (from nanopi, the
one I always used until now).

I never noticed this and I don't know if this is related to the dtb
files or to my own OrangePi/FreeBSD-image or SD-card.

I just did an "fsck" and the error seem corrected... for now.

FYI, these are the messages I goot during the booting process when the
"glitch" showed up:

======================================
U-Boot SPL 2017.01-rc3 (Apr 14 2017 - 05:00:34)
DRAM: 512 MiB
Trying to boot from MMC1

U-Boot 2017.01-rc3 (Apr 14 2017 - 05:00:34 +0000) Allwinner Technology

CPU:   Allwinner H3 (SUN8I 1680)
Model: Xunlong Orange Pi One
DRAM:  512 MiB
MMC:   SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   phy interface0
eth0: ethernet@1c30000
starting USB...
USB0:   USB EHCI 1.00
USB1:   USB OHCI 1.0
scanning bus 0 for devices... 1 USB Device(s) found
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found FreeBSD U-Boot Loader (bin)
reading ubldr.bin
237360 bytes read in 34 ms (6.7 MiB/s)
## Starting application at 0x42000000 ...
Consoles: U-Boot console
Compatible U-Boot API signature found @0x5bf41100

FreeBSD/armv6 U-Boot loader, Revision 1.2
(Tue Apr 25 13:04:20 CEST 2017 orangepi@anuro)

DRAM: 512MB
MMC Device 1 not found
MMC Device 2 not found
MMC Device 3 not found
Number of U-Boot devices: 1
U-Boot env: loaderdev not set, will probe all devices.
Found U-Boot device: disk
  Probing all disk devices...
  Checking unit=0 slice=<auto> partition=<auto>... good.
Booting from disk0s2a:
/boot/kernel/kernel data=0x6a9880+0x1a6780 syms=[0x4+0xba5b0+0x4+0xaab13]

Hit [Enter] to boot immediately, or any other key for command prompt.
Booting [/boot/kernel/kernel]...
/boot/dtb/sun8i-h3-orangepi-one.dtb size=0x5087
Loaded DTB from file 'sun8i-h3-orangepi-one.dtb'.
Kernel entry at 0x42200100...
Kernel args: (null)
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2017 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 12.0-CURRENT #0 r317402: Tue Apr 25 13:04:13 CEST 2017

orangepi@anuro:/media/ventello/src/crochet/work/obj/arm.armv6/media/ventello/src/freebsd/sys/ALLWINNER
arm
FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (based on
LLVM 4.0.0)
WARNING: WITNESS option enabled, expect reduced performance.
VT: init without driver.
CPU: ARM Cortex-A7 r0p5 (ECO: 0x00000000)
CPU Features:
  Multiprocessing, Thumb2, Security, Virtualization, Generic Timer, VMSAv7,
  PXN, LPAE, Coherent Walk
Optional instructions:
  SDIV/UDIV, UMULL, SMULL, SIMD(ext)
LoUU:2 LoC:3 LoUIS:2
Cache level 1:
 32KB/64B 4-way data cache WB Read-Alloc Write-Alloc
 32KB/32B 2-way instruction cache Read-Alloc
Cache level 2:
 512KB/64B 8-way unified cache WB Read-Alloc Write-Alloc
real memory  = 536870912 (512 MB)
avail memory = 509968384 (486 MB)
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
arc4random: no preloaded entropy cache
random: entropy device external interface
kbd0 at kbdmux0
ofwbus0: <Open Firmware Device Tree>
aw_ccu0: <Allwinner Clock Control Unit> on ofwbus0
clk_fixed0: <Fixed clock> on aw_ccu0
clk_fixed1: <Fixed clock> on aw_ccu0
clk_fixed2: <Fixed factor clock> on aw_ccu0
aw_gate0: <Allwinner APB0 Clock Gates> mem 0x1f01428-0x1f0142b on aw_ccu0
aw_modclk0: <Allwinner Module Clock> mem 0x1f01454-0x1f01457 on aw_ccu0
simplebus0: <Flattened device tree simple bus> on ofwbus0
aw_ccung0: <Allwinner Clock Control Unit NG> mem 0x1c20000-0x1c203ff on
simplebus0
aw_reset0: <Allwinner Module Resets> mem 0x1f014b0-0x1f014b3 on simplebus0
iichb0: <Allwinner Integrated I2C Bus Controller> mem
0x1f02400-0x1f027ff irq 34 on simplebus0
iichb0: could not find clock
device_attach: iichb0 attach returned 2
regfix0: <Fixed Regulator> on ofwbus0
regfix1: <Fixed Regulator> on ofwbus0
regfix2: <Fixed Regulator> on ofwbus0
iichb0: <Allwinner Integrated I2C Bus Controller> mem
0x1f02400-0x1f027ff irq 34 on simplebus0
iichb0: could not find clock
device_attach: iichb0 attach returned 2
aw_sid0: <Allwinner Secure ID Controller> mem 0x1c14000-0x1c143ff on
simplebus0
iichb0: <Allwinner Integrated I2C Bus Controller> mem
0x1f02400-0x1f027ff irq 34 on simplebus0
iichb0: could not find clock
device_attach: iichb0 attach returned 2
awusbphy0: <Allwinner USB PHY> mem
0x1c19400-0x1c1942b,0x1c1a800-0x1c1a803,0x1c1b800-0x1c1b803,0x1c1c800-0x1c1c803,0x1c1d800-0x1c1d803
on simplebus0
iichb0: <Allwinner Integrated I2C Bus Controller> mem
0x1f02400-0x1f027ff irq 34 on simplebus0
iichb0: could not find clock
device_attach: iichb0 attach returned 2
gic0: <ARM Generic Interrupt Controller> mem
0x1c81000-0x1c81fff,0x1c82000-0x1c82fff,0x1c84000-0x1c85fff,0x1c86000-0x1c87fff
irq 28 on simplebus0
gic0: pn 0x1, arch 0x2, rev 0x1, implementer 0x43b irqs 160
iichb0: <Allwinner Integrated I2C Bus Controller> mem
0x1f02400-0x1f027ff irq 34 on simplebus0
iichb0: could not find clock
device_attach: iichb0 attach returned 2
gpio0: <Allwinner GPIO/Pinmux controller> mem 0x1c20800-0x1c20bff irq
14,15 on simplebus0
gpiobus0: <OFW GPIO bus> on gpio0
gpio1: <Allwinner GPIO/Pinmux controller> mem 0x1f02c00-0x1f02fff irq 32
on simplebus0
gpiobus1: <OFW GPIO bus> on gpio1
iichb0: <Allwinner Integrated I2C Bus Controller> mem
0x1f02400-0x1f027ff irq 34 on simplebus0
iichb0: could not find clock
device_attach: iichb0 attach returned 2
iichb0: <Allwinner Integrated I2C Bus Controller> mem
0x1f02400-0x1f027ff irq 34 on simplebus0
iichb0: could not find clock
device_attach: iichb0 attach returned 2
generic_timer0: <ARMv7 Generic Timer> irq 0,1,2,3 on ofwbus0
Timecounter "ARM MPCore Timecounter" frequency 24000000 Hz quality 1000
Event timer "ARM MPCore Eventtimer" frequency 24000000 Hz quality 1000
rtc0: <Allwinner RTC> mem 0x1f00000-0x1f00053 irq 29,30 on simplebus0
iichb0: <Allwinner Integrated I2C Bus Controller> mem
0x1f02400-0x1f027ff irq 34 on simplebus0
iichb0: could not find clock
device_attach: iichb0 attach returned 2
cpulist0: <Open Firmware CPU Group> on ofwbus0
cpu0: <Open Firmware CPU> on cpulist0
cpufreq_dt0: <Generic cpufreq driver> on cpu0
cpufreq_dt0: no regulator for cpu@0
device_attach: cpufreq_dt0 attach returned 6
cpu1: <Open Firmware CPU> on cpulist0
cpu2: <Open Firmware CPU> on cpulist0
cpu3: <Open Firmware CPU> on cpulist0
a31dmac0: <Allwinner DMA controller> mem 0x1c02000-0x1c02fff irq 4 on
simplebus0
a10_mmc0: <Allwinner Integrated MMC/SD controller> mem
0x1c0f000-0x1c0ffff irq 5 on simplebus0
mmc0: <MMC/SD bus> on a10_mmc0
ehci0: <Allwinner Integrated USB 2.0 controller> mem 0x1c1d000-0x1c1d0ff
irq 12 on simplebus0
usbus0: EHCI version 0.0
usbus0 on ehci0
ohci0: <Generic OHCI Controller> mem 0x1c1d400-0x1c1d4ff irq 13 on
simplebus0
usbus1 on ohci0
gpioc0: <GPIO controller> on gpio0
aw_wdog0: <Allwinner A31 Watchdog> mem 0x1c20ca0-0x1c20cbf irq 20 on
simplebus0
uart0: <16750 or compatible> mem 0x1c28000-0x1c283ff irq 21 on simplebus0
uart0: console (115384,n,8,1)
gpioc1: <GPIO controller> on gpio1
awg0: <Allwinner Gigabit Ethernet> mem
0x1c30000-0x1c30103,0x1c00030-0x1c00033 irq 33 on simplebus0
awg0: soft reset timed out
device_attach: awg0 attach returned 60
iichb0: <Allwinner Integrated I2C Bus Controller> mem
0x1f02400-0x1f027ff irq 34 on simplebus0
iichb0: could not find clock
device_attach: iichb0 attach returned 2
aw_thermal0: <Allwinner Thermal Sensor Controller> mem
0x1c25000-0x1c253ff irq 35 on simplebus0
gpioled0: <GPIO LEDs> on ofwbus0
cryptosoft0: <software crypto>
Timecounters tick every 1.000 msec
usbus0: 480Mbps High Speed USB v2.0
usbus1: 12Mbps Full Speed USB v1.0
ugen0.1: <Allwinner EHCI root HUB> at usbus0
uhub0: <Allwinner EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus0
uhub_attach: getting USB 2.0 HUB descriptor failed,error=USB_ERR_SHORT_XFER
device_attach: uhub0 attach returned 6
usbus0: Root HUB problem, error=USB_ERR_NO_ROOT_HUB
ugen1.1: <Generic OHCI root HUB> at usbus1
uhub0: <Generic OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus1
uhub_attach: getting USB 2.0 HUB descriptor failed,error=USB_ERR_SHORT_XFER
device_attach: uhub0 attach returned 6
usbus1: Root HUB problem, error=USB_ERR_NO_ROOT_HUB
mmcsd0: 16GB <SDHC SL16G 3.0 SN DA315385 MFG 08/2016 by 3 PT> at mmc0
50.0MHz/4bit/65535-block
Release APs
WARNING: WITNESS option enabled, expect reduced performance.
arc4random: no preloaded entropy cache
Trying to mount root from ufs:/dev/mmcsd0s2a [rw,noatime]...
arc4random: no preloaded entropy cache
WARNING: / was not properly dismounted
arc4random: no preloaded entropy cache
Setting hostuuid: a76a4e01-f668-11de-88ec-1972d578a651.
Setting hostid: 0xdd9cc20e.
No suitable dump device was found.
Starting file system checks:
** SU+J Recovering /dev/mmcsd0s2a
** Reading 4194304 byte journal from inode 4.
** Building recovery table.
** Resolving unreferenced inode list.
** Processing journal entries.
** 4 journal records in 1024 bytes for 12.50% utilization
** Freed 4 inodes (0 dirs) 0 blocks, and 0 frags.

***** FILE SYSTEM MARKED CLEAN *****
Mounting local filesystems:.
rm: devd.pipe: Bad file descriptor
rm: devd.seqpacket.pipe: Bad file descriptor
rm: ld-elf-soft.so.hints: Bad file descriptor
rm: log: Bad file descriptor
rm: logpriv: Bad file descriptor
ELF ldconfig path: /lib /usr/lib /usr/lib/compat /usr/local/lib
random: unblocking device.
Soft Float compatibility ldconfig path:
ldconfig: Cannot stat "/var/run/ld-elf-soft.so.hints": Bad file descriptor
Setting hostname: partuallo.
Setting up harvesting:
[UMA],[FS_ATIME],SWI,INTERRUPT,NET_NG,NET_ETHER,NET_TUN,MOUSE,KEYBOARD,ATTACH,CACHED
Feeding entropy: .
Starting Network: lo0.
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
        inet 127.0.0.1 netmask 0xff000000
        groups: lo
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
Starting devd.
Starting pflog.
panic: softdep_setup_inomapdep: dependency 0xc309d700 for newinode
already exists
cpuid = 0
time = 1262304032
KDB: stack backtrace:
$a.4() at $a.4
         pc = 0xc06ece1c  lr = 0xc025a71c (db_trace_self_wrapper+0x30)
         sp = 0xde0ed720  fp = 0xde0ed838
db_trace_self_wrapper() at db_trace_self_wrapper+0x30
         pc = 0xc025a71c  lr = 0xc0410314 (vpanic+0x148)
         sp = 0xde0ed840  fp = 0xde0ed860
         r4 = 0x00000100  r5 = 0x00000001
         r6 = 0xc07a8d57  r7 = 0xc09b32c8
vpanic() at vpanic+0x148
         pc = 0xc0410314  lr = 0xc04103b0 (kproc_shutdown)
         sp = 0xde0ed868  fp = 0xde0ed86c
         r4 = 0xc2ba4e00  r5 = 0xc3133000
         r6 = 0x0001e91d  r7 = 0xc3132000
         r8 = 0xc31d2cb0  r9 = 0x00000000
        r10 = 0xc331b000
kproc_shutdown() at kproc_shutdown
         pc = 0xc04103b0  lr = 0xc067cf6c (softdep_setup_inomapdep+0x294)
         sp = 0xde0ed874  fp = 0xde0ed8b0
         r4 = 0xc04103b0  r5 = 0xde0ed874
softdep_setup_inomapdep() at softdep_setup_inomapdep+0x294
         pc = 0xc067cf6c  lr = 0xc066463c (ffs_nodealloccg+0x75c)
         sp = 0xde0ed8b8  fp = 0xde0ed918
         r4 = 0x0000141d  r5 = 0x00000002
         r6 = 0x000081a4  r7 = 0xcd430000
         r8 = 0xcd4300a8  r9 = 0xc3133000
        r10 = 0x00001580
ffs_nodealloccg() at ffs_nodealloccg+0x75c
         pc = 0xc066463c  lr = 0xc0660880 (ffs_hashalloc+0x7c)
         sp = 0xde0ed920  fp = 0xde0ed948
         r4 = 0xc31d2cb0  r5 = 0xc0663ee0
         r6 = 0x00000000  r7 = 0x0001d52a
         r8 = 0xc3133000  r9 = 0x00000002
        r10 = 0x000081a4
ffs_hashalloc() at ffs_hashalloc+0x7c
         pc = 0xc0660880  lr = 0xc06637c8 (ffs_valloc+0x130)
         sp = 0xde0ed950  fp = 0xde0ed9d0
         r4 = 0x00000000  r5 = 0xc31d2cb0
         r6 = 0x0001d52a  r7 = 0xc2ee8480
         r8 = 0xc3038d00  r9 = 0x000081a4
        r10 = 0xc3133000
ffs_valloc() at ffs_valloc+0x130
         pc = 0xc06637c8  lr = 0xc06abe0c (ufs_makeinode+0x98)
         sp = 0xde0ed9d8  fp = 0xde0edb28
         r4 = 0xc2ee8480  r5 = 0x000081a4
         r6 = 0xc0663698  r7 = 0xc31d2cb0
         r8 = 0x00020a00  r9 = 0xde0edcf0
        r10 = 0xde0edd08
ufs_makeinode() at ufs_makeinode+0x98
         pc = 0xc06abe0c  lr = 0xc06a7f78 (ufs_create+0x3c)
         sp = 0xde0edb30  fp = 0xde0edb40
         r4 = 0xde0edc24  r5 = 0xc06a7fbc
         r6 = 0xffffffff  r7 = 0xde0edc28
         r8 = 0x00020a00  r9 = 0x00000000
        r10 = 0x00000000
ufs_create() at ufs_create+0x3c
         pc = 0xc06a7f78  lr = 0xc07400e4 (VOP_CREATE_APV+0xfc)
         sp = 0xde0edb48  fp = 0xde0edb60
         r4 = 0xde0edc24  r5 = 0xc0897b68
VOP_CREATE_APV() at VOP_CREATE_APV+0xfc
         pc = 0xc07400e4  lr = 0xc04ec520 (vn_open_cred+0x284)
         sp = 0xde0edb68  fp = 0xde0edc58
         r4 = 0xde0edca0  r5 = 0xde0edcf0
         r6 = 0x00000000  r7 = 0x00000602
vn_open_cred() at vn_open_cred+0x284
         pc = 0xc04ec520  lr = 0xc04ec294 (vn_open+0x24)
         sp = 0xde0edc60  fp = 0xde0edc68
         r4 = 0xc3196a80  r5 = 0x00000012
         r6 = 0x000001b6  r7 = 0xde0edca0
         r8 = 0x00000000  r9 = 0x20611080
        r10 = 0xde0edc90
vn_open() at vn_open+0x24
         pc = 0xc04ec294  lr = 0xc04e5538 (kern_openat+0x204)
         sp = 0xde0edc70  fp = 0xde0edd70
kern_openat() at kern_openat+0x204
         pc = 0xc04e5538  lr = 0xc04e532c (sys_open+0x28)
         sp = 0xde0edd78  fp = 0xde0edd80
         r4 = 0xc0a2d8d8  r5 = 0xc317bac8
         r6 = 0x00000000  r7 = 0xc0a48880
         r8 = 0x00000000  r9 = 0xde0edda0
        r10 = 0xc3196a80
sys_open() at sys_open+0x28
         pc = 0xc04e532c  lr = 0xc070f0a0 ($a.6+0x1ac)
         sp = 0xde0edd88  fp = 0xde0ede40
$a.6() at $a.6+0x1ac
         pc = 0xc070f0a0  lr = 0xc06efad0 (swi_exit)
         sp = 0xde0ede48  fp = 0xbfbfeda8
         r4 = 0x202821c8  r5 = 0x00000008
         r6 = 0x00000000  r7 = 0x00000005
         r8 = 0x206129e3  r9 = 0x00014f94
        r10 = 0x00000007
swi_exit() at swi_exit
         pc = 0xc06efad0  lr = 0xc06efad0 (swi_exit)
         sp = 0xde0ede48  fp = 0xbfbfeda8
KDB: enter: panic
[ thread pid 246 tid 100070 ]
Stopped at      $d.8:   ldrb    r15, [r15, r15, ror r15]!
db>
======================================

Regards
Aggaz




Il 02/05/2017 13:23, Emmanuel Vadot ha scritto:
> On Tue, 2 May 2017 12:43:41 +0200
> aggaz <aggaz@paranoici.org> wrote:
> 
>> Dear Emmanuel,
>>
>> In the last days I found and tried the dts file you are referring to
>> (the one in sys/gnu/.../...).
>> I compiled it using crochet, and I can confirm that it boots, it
>> supports USB but not Ethernet.
>>
>> It also seems to me that it is less stable than the other two I tried
>> (the one for OrangePi Plus 2E and the one from NanoPi Neo).
> 
>  Less stable in what way ?
> 
>> Maybe it is not related to the dts, but I saw several random glitches
>> after boot that make me think that this Linux-imported dts is not 100%
>> compatible.
> 
>  Random glitches of what exactly ?
> 
>> I hope you find the dts with both ethernet and usb.
>>
>> A question: would it be possible to integrate the ethernet portion of
>> the dts for NanoPi to the dts for OrangePiPlus 2E?
> 
>  I don't think I have the Plus 2E so I won't be able to test, I think
> the only difference would be the regulator for the PHY (or the usage of
> internal PHY).
> 
>> I am trying to do so in the last days, but I do not really understand
>> how to write a DTS file...
>>
>> I am also looking for documentation, without so much luck, if you have
>> some link/book/manual you feel like sharing, please do.
> 
>  There is none afaik, just read the binding docs from the Linux kernel
> Documentation.
> 
>> Regards
>> Aggaz
> 
>  Cheers,
> 
>> Il 02/05/2017 10:55, Emmanuel Vadot ha scritto:
>>> On Sun, 30 Apr 2017 12:27:04 +0200
>>> aggaz <aggaz@paranoici.org> wrote:
>>>
>>>> Dear list,
>>>>
>>>> as I previously wrote, I am trying to use FreeBSD 12-CURRENT on OrangePi
>>>> One by using crochet.
>>>>
>>>> One problem is that there are no dtb files available specific for this
>>>> board.
>>>
>>>  There is one in sys/gnu/dts, I was sure that I added it to the list of
>>> DTS we compile but ...
>>>
>>>> Now I compared two dtb files for the same SoC (H3): one for NanoPi Neo
>>>> (/boot/dtb/nanopi-neo.dtb) and one for OrangePi Plus 2E
>>>> (/boot/dtb/orangepi-plus-2e.dtb).
>>>>
>>>> Both makes the board boot fine without issues, but:
>>>>
>>>> 1) dtb file for NanoPi Neo makes the network interface available and
>>>> working, but not the USB port.
>>>>
>>>> 2) dtb file for OrangePi Plus 2E makes the USB port available and
>>>> working, but not the network interface.
>>>
>>>  Please note that ethernet DTS bindings aren't standardized yet and
>>> since I don't want us to heavily patches the DTS or derive to much from
>>> the Linux one if I add the OrangePi One DTS to the build it will
>>> probably be without ethernet support.
>>>
>>>  Anyway, I have one somewhere with USB and ethernet support, I'll look
>>> to commit/share that soon.
>>>
>>>>
>>>> At this point I don't really know what I can do to make both interfaces
>>>> working at the same time, and I am writing this to ask you some suggestions.
>>>>
>>>> Any idea would be greatly appreciated.
>>>>
>>>> Regards
>>>> Aggaz
>>>> _______________________________________________
>>>> freebsd-arm@freebsd.org mailing list
>>>> https://lists.freebsd.org/mailman/listinfo/freebsd-arm
>>>> To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org"
>>>
>>>
> 
> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b4061d03-3fed-3ccf-2d04-15cdb3fdc1cc>