Banana Pi M3 (armv7/CortexA7) with head -339076 and u-boot 2018.09_3 from ports: what CPU clock speed is it using? More. . .

Mark Millard marklmi at yahoo.com
Thu Oct 4 16:47:37 UTC 2018


On 2018-Oct-4, at 6:26 AM, Emmanuel Vadot <manu at bidouilliste.com> wrote:


> Hi,
> 
> On Wed, 3 Oct 2018 12:59:13 -0700
> Mark Millard via freebsd-arm <freebsd-arm at freebsd.org> wrote:
> 
>> . . .
> 
>> 
>> With -r308125 the BPi-M3 would -j4 or -j5 buildworld buildkernel for the
>> src.conf settings that I use in about 9.5 hours. (From my 2016-Nov-05
>> list E-mail.)
>> 
>> [The BPi-M3 has heat sinks, a case, and a fan.]
>> 
>> I've not done such builds in a long time and I've not recorded times
>> when I have. But having updated to -r339076 based and the modern
>> 2018.09 u-boot context has the BPi-M3 just finished building
>> lib/clang/libclang/AST/ materials after about 19 hours. top
>> indicates swap has 1740M Total and Free. (My top modifications
>> indicate the Max Observed Active Mem as 922M so far.)

FYI on how long it took and what was built:

It took around 36 hours to complete the buildworld buildkernel --and
that was for:

make[1]: "/usr/src/Makefile.inc1" line 341: SYSTEM_COMPILER: Determined that CC=cc matches the source tree.  Not bootstrapping a cross-compiler.
make[1]: "/usr/src/Makefile.inc1" line 346: SYSTEM_LINKER: Determined that LD=ld matches the source tree.  Not bootstrapping a cross-linker.

but I currently build for cortexA53 based on WITH_CLANG_FULL=
WITH_CLANG_EXTRAS= but WITHOUT_LLDB= WITHOUT_BINUTILS_BOOTSTRAP=
WITHOUT_BINUTILS= and no GCC/GNUCXX. I'm implicitly using
WITH_LLVM_TARGET_ALL= so far.

>> . . .
> 
> There is two problem for cpufreq on BanapiM3
> 
> 1) The current DTS (from linux 4.18) doesn't have the regulator define
> for switching voltage, this is fixed in later version.
> 2) A83T is a multi cluster ARM cpu, and this cause problem when
> switching frequency, I don't know exactly what's happening but removing
> the other cluster from the dts and I don't have any problem switching
> frequency.
> 
> . . .
> In the meantime you can use
> https://people.freebsd.org/~manu/sun8i-a83t-bananapi-m3.dtb
> 
> This is the DTB from Linux 4.20 (or what 4.20 will be) with one of the
> cluster removed. Setting the freq with sysctl dev.cpu.0.freq=XXXX or
> using powerd works. Simply put it in the /dtb directory of the FAT
> partition.

That file seems to have helped when put in the ufs /boot/dtb/
directory. When /etc/rc.conf sets powerd_enable="YES" the boot
then cleanly reports:

Starting powerd.


Thanks.



FYI:

I had not looked at it at the time but prior to this change it
was reporting the following. It still is reporting this after
the change.

gpio1: <Allwinner GPIO/Pinmux controller> mem 0x1f02c00-0x1f02fff irq 33 on simplebus0
gpiobus1: <OFW GPIO bus> on gpio1
axp8xx_pmu0: <X-Powers AXP813 Power Management Unit> at addr 0x746 irq 35 on iicbus0
axp8xx_pmu0: regulator_parse_ofw_stdparam: Missing regulator name
axp8xx_pmu0: cannot attach regulator dldo2
axp8xx_pmu0: regulator_parse_ofw_stdparam: Missing regulator name
axp8xx_pmu0: cannot attach regulator dldo4
axp8xx_pmu0: regulator_parse_ofw_stdparam: Missing regulator name
axp8xx_pmu0: cannot attach regulator eldo1
axp8xx_pmu0: regulator_parse_ofw_stdparam: Missing regulator name
axp8xx_pmu0: cannot attach regulator eldo2
axp8xx_pmu0: regulator_parse_ofw_stdparam: Missing regulator name
axp8xx_pmu0: cannot attach regulator eldo3

Putting your sun8i-a83t-bananapi-m3.dtb on just the msdosfs
parition in a dtb directory and rebooting did not change the
behavior. For example there was no:

dev.cpu.0.freq_levels: 1200/-1 1128/-1 1008/-1 912/-1 864/-1 720/-1 600/-1 480/-1

But instead replacing the file in the ufs /boot/dtb/ did create
such on the next boot. That is consistent with the what the boot
text reports for where it gets the file:

Hit [Enter] to boot immediately, or any other key for command prompt.
Booting [/boot/kernel/kernel]...               
/boot/dtb/sun8i-a83t-bananapi-m3.dtb size=0x702a
Loaded DTB from file 'sun8i-a83t-bananapi-m3.dtb'.

(Not /boot/msdos/dtb/ .)

If some stage before the kernel needs that .dtb I still may
not have copies in all the correct places or other such issues.

I still do not find thermal/temperature material in
the sysctl -a output. (I'd guess that this is expected.)

Whatever the details, the BPi-M3 is operational and I
no longer have my old hacks involved (that were from the
transition period). It is nice to get rid of them.

Thanks again for the improvements.


===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)



More information about the freebsd-arm mailing list