Can't get 11.0-RELEASE to boot on Banana PI M3
Mark Millard
markmi at dsl-only.net
Mon Dec 5 10:41:26 UTC 2016
[I've now gotten some of those
"soft reset timed out"/"awg0 attach returned 60"
notices.]
On 2016-Dec-3, at 1:01 PM, Mark Millard <markmi at dsl-only.net> wrote:
> On 2016-Dec-3, at 5:23 AM, Michael Sperber <sperber at deinprogramm.de> wrote:
>
>> Mark Millard <markmi at dsl-only.net> writes:
>>
>>> /dev/da0 is not the same as /dev/mmcsd0 . /dev/da0 is the
>>> interface to the SATA port. That hardware is accessed over
>>> USB on the BPi-M3.
>>
>> Ah, now I understand. Sorry for my being stupid about this!
>>
>> I finally noticed this:
>>
>> eval: cannot open /etc/fstab: No such file or directory
>>
>> And indeed /etc/fstab is not there - creating one fixed that problem.
>
> In . . ./crochet/board/BananaPi-M3/overlay/etc/ there should be:
>
> # ls
> fstab rc.conf rc.d
>
> When things work right these are simply copied.
>
> If one of these files was not copied over then it may be that
> some other(s) were not copied over as well.
>
>> (Shouldn't Crochet have created one?) So that leaves the Ethernet
>> problem. I get this:
>>
>> awg0: <Allwinner Gigabit Ethernet> mem 0x1c30000-0x1c300ff on simplebus0
>> awg0: soft reset timed out
>> device_attach: awg0 attach returned 60
I moved the BPi-M3 into a new environment and it now gets
this sequence much of the time --but not always.
It seems to help to have cut the power before rebooting:
"shutdown -p now" and then unplugging and re-plugging the
power when it is done. (So far anyway: I may be reading
too much into what I've seen so far.)
All this suggests that some environmental condition is
sufficient to lead to the notices and to the associated
lack of a normal Ethernet configuration when booting
completes.
Note: in the old context and the new one the rest of the
Ethernet-capable equipment around seems to be working fine.
>> Any ideas on that one? Broken hardware? I see the awg driver is fairly
>> new - is 11.0-RELEASE recent enough?
>
> awg Ethernet support was added about 2 months before head
> -r304406 was turned into stable/11 -r304408 based on the
> svn history: Ethernet added for A83T back on 2016-May-4
> ( -r299084 ).
>
>> --
>> Regards,
>> Mike
>
> While I do not know anything about the details I can find the
> source code for the "soft reset timed out":
>
> 1122 static int
> 1123 awg_reset(device_t dev)
> 1124 {
> 1125 struct awg_softc *sc;
> 1126 int retry;
> 1127
> 1128 sc = device_get_softc(dev);
> 1129
> 1130 /* Soft reset all registers and logic */
> 1131 WR4(sc, EMAC_BASIC_CTL_1, BASIC_CTL_SOFT_RST);
> 1132
> 1133 /* Wait for soft reset bit to self-clear */
> 1134 for (retry = SOFT_RST_RETRY; retry > 0; retry--) {
> 1135 if ((RD4(sc, EMAC_BASIC_CTL_1) & BASIC_CTL_SOFT_RST) == 0)
> 1136 break;
> 1137 DELAY(10);
> 1138 }
> 1139 if (retry == 0) {
> 1140 device_printf(dev, "soft reset timed out\n");
> 1141 #ifdef AWG_DEBUG
> 1142 awg_dump_regs(dev);
> 1143 #endif
> 1144 return (ETIMEDOUT);
> 1145 }
> 1146
> 1147 return (0);
> 1148 }
>
> I'd guess that the message indicates a hardware problem.
That is no longer my guess.
> As I've suggested before: you could see of an official
> Linux also fails to initialize the Ethernet interface.
> Once checked:
>
> A) If Linux did fail as well then blame the hardware.
Likely the wrong blame. . .
> B) If Linux worked then get the FreeBSD folks that work
> on the A83T/ALLWINNER support to look into the issue.
But this procedure is still useful: Linux might handle
a condition that FreeBSD does not well handle in this
case.
> My guess is the that FreeBSD folks would want a build
> with that AWG_DEBUG enabled and information from the
> "dump" that it makes if Linux worked.
Stil true.
If the issue persists in my context I might be able to
get such a awg register dump.
===
Mark Millard
markmi at dsl-only.net
More information about the freebsd-arm
mailing list