Board compiles nice your 5.4-main (gcc7.3) and build.sh install things.
During compile heatsinked cpu temp rise to 63C. (make -j4)
I’ll test your git line. Thank you (maybe include it in your wiki?)
btw: “build uImage without appended DTB…” but I think it is bogus because board boots nice.
I need also add CONFIG_BRCMSMAC=m and CONFIG_F2FS_FS=y because minipci wlancard and my rootfs is f2fs (it is more gentle for flash, should be in default kernel…?)
But wan interface is not functional. It can’t get dhcp ip (4.19 works fine). Is there any tricks to bring it up?
And there is not any mali lines in dmesg and not /dev/mali so I think mali is not working…?
Edit:
There is some wrong in build.sh:
~/src/frank/BPI-R2-4.14-4.20-lima$ ./build.sh importconfig
./build.sh: line 33: dpkg: command not found
please install u-boot-tools
./build.sh: line 33: dpkg: command not found
please install bc
./build.sh: line 33: dpkg: command not found
please install make
./build.sh: line 33: dpkg: command not found
please install gcc
./build.sh: line 33: dpkg: command not found
please install libc6-dev
./build.sh: line 33: dpkg: command not found
please install libncurses5-dev
./build.sh: line 33: dpkg: command not found
please install libssl-dev
./build.sh: line 33: dpkg: command not found
please install fakeroot
./build.sh: line 33: dpkg: command not found
please install ccache
Need to do by hand, it take some time…
Edit2:
cp …/BPI-R2-4.14-5.4-main/.config .
make -j4 oldconfig
some Yes/No
time make -j4 UIMAGE_LOADADDR=0x80008000 uImage dtbs
here?
src/frank/BPI-R2-4.14-5.4-main/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
->done. CPU is busy currently. I’ll try when 4.20-lima is compiled & booted
Is make enough or is make clean needed?
You need no make clean…if only dts is changed it is compiled on change and the other compiles faster. But if you switch between kernelversions (in same folder) you need to compile all…why using 4.20? 5.3+ contains basic lima,just take changes from 5.3-lima and port to 5.4
Because there reads 4.20-lima. Anyway no single line in 4.20 dmesg that say mali/lima, no /dev/mali. I think 450 chip dosn’t detect. If rgmii fix 5.4.12 net then I use it and try arm mali driver. It is binary but if it works I can get functional wayland (X support is dropped somewhere 2016)
Is there any lima debug bootparams to try, maybe find why chip dosn’t detect?
btw 4.20-lima changes wan mac address to 7e:d2:65:22:b7:a6 is that correct?
Edit: next boot: 4.20-lima changed wan mac to 32:e8:59:bd:bb:6a. This randomize every boot?? not good in dhcp enviroment.
Well… No lima in 4.20 so back to 5.4.12 where is not lima but newer kernel. trgmii fix seems to work and brings wan and lanX’s up. But bogus eth1 is missing and it give some startup broblems (4.4.70-bpi is eth0+eth1 only) backwards compatibility is removed when say rc-update del net.eth1 …
5.4.12 get wan mac 0e:04:21:1f:4e:aa. I hope this is permanent or need to hardcode something. Maybe reboot test and now it is 92:76:ca:b9:2f:4f. Random MAC is really bad. Many times worse than hardcoded. My ISP offer only one mac at time, next is ok when previous expire. They offer public ip but only one per house. During board reboots wan mac needs to keep same. So need to hardcode something in udev rules… brr
Anyway I have not found functional udev rules yet and need to stop tests until my test enviroment dhcp server run out ips. So I fixed it gentoo way /etc/conf.d/net line mac_wan=“92:76:ca:b9:2f:4f”. It is not so general than udev rules but works temporal solution…
Yes Yes, it works now, but eth1 is missing (minor broblem)
Edit: and no. I started my laptop and tested bridge it dosn’t work. It take long until link indicators rise up and no ping. Indicators blink when pinging but no response…
So wan interface works but no br0 (lan0-lan3). Any ideas?
I experieced a problem when directly connect clients (without switch). Here remote side does not detect link (ethtool). local on r2 link is detected. if i reset remote side (by setting mdix which is reported as unsupported on setting it) the link goes up. If i put switch on lan-ports there is no problem…i guess it is caused by phylink-conversion and related to link-mode detection
Yes I think they are up. It worked in 4.19. Atleast ifconfig show br0 have static ip and dmesg show lan0-lan3 entered promiscouis mode.
I take laptop wire (lan0) out and replugged but now it dosn’t do link at all. So I plugged laptop to “fresh” lan1 and it thinked long but rise link indicators up. Compiled ethtool and it show link in laptop but R2 “Link detected: no”. I make replug in lan1 until indicators go off then plug in. Indicators rise fast - like normal plug in. R2 ethtool say no link, laptop ethtool say link present.
Then plug to lan0 and suprise link indicators on fast. R2 ethtool say no link laptop ethtool say link present. Then plugged lan3, link fast on, laptop ethtool say link on, R2 ethtool say no link. Still no ping.
Edit: ip link set lan3 up
Then R2 ethtool show link on and ping starts to rock. This is new “feature” in 5.4.12 vs. 4.19 so it needs some pre up tweaking in br0. Doable but not good. I tested to replug lan3 and ping still ok. So ip up once is maybe enough.
Gentoo fix in /etc/conf.d/net is not functional. For some reason ip link set up needs time before it works. So I put it local.d/ so executed late. Hope it is enough delay. Atleast it seems to work after testboot…
brr… forum max reply count, need to wait 1hr… Put to think if I put new forum online only for R2 talk but maybe later…
Tryed:
commented out crosscompiles but it dosn’t compile:
/home/eros/src/DX910-SW-99002-r10p0-00rel0/driver/src/devicedrv/mali/linux/mali_memory.c:186:11: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.fault = mali_mem_vma_fault,
^~~~~~~~~~~~~~~~~~
/home/eros/src/DX910-SW-99002-r10p0-00rel0/driver/src/devicedrv/mali/linux/mali_memory.c:186:11: note: (near initialization for ‘mali_kernel_vm_ops.fault’)
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:266: /home/eros/src/DX910-SW-99002-r10p0-00rel0/driver/src/devicedrv/mali/linux/mali_memory.o] Error 1
make[1]: *** [Makefile:1652: /home/eros/src/DX910-SW-99002-r10p0-00rel0/driver/src/devicedrv/mali] Error 2
make[1]: Leaving directory ‘/home/eros/src/frank/BPI-R2-4.14-5.4-main’
make: *** [Makefile:207: all] Error 2
This stuff dosn’t look binary driver. Maybe it compiles against older kernels. Lets try:
KDIR=/home/eros/src/frank/BPI-R2-4.14-4.19-main/ USING_UMP=0 BUILD=release make
And success:
modinfo mali.ko
filename: /home/eros/src/DX910-SW-99002-r10p0-00rel0/driver/src/devicedrv/mali/mali.ko
version: r10p0-00rel0
author: ARM Ltd.
license: GPL
srcversion: E66DA6AC5CB69B428450DFA
depends:
name: mali
vermagic: 4.19.92-bpi-r2 SMP mod_unload ARMv7 p2v8
parm: mali_debug_level:Higher number, more dmesg output (int)
parm: mali_max_job_runtime:Maximum allowed job runtime in msecs.
Jobs will be killed after this no matter what (int)
parm: mali_l2_max_reads:Maximum reads for Mali L2 cache (int)
parm: mali_dedicated_mem_start:Physical start address of dedicated Mali GPU memory. (uint)
parm: mali_dedicated_mem_size:Size of dedicated Mali GPU memory. (uint)
parm: mali_shared_mem_size:Size of shared Mali GPU memory. (uint)
parm: mali_boot_profiling:Start profiling as a part of Mali driver initialization (int)
parm: mali_max_pp_cores_group_1:Limit the number of PP cores to use from first PP group. (int)
parm: mali_max_pp_cores_group_2:Limit the number of PP cores to use from second PP group (Mali-450 only). (int)
parm: mali_mem_swap_out_threshold_value:Threshold value used to limit how much swappable memory cached in Mali driver. (uint)
parm: mali_max_system_fps:Max system fps the same as display VSYNC. (int)
parm: mali_desired_fps:A bit lower than max_system_fps which user desired fps (int)
So need to boot back to 4.19 and test… Still 20min to wait freeing comments…
In 4.19 strange thing is that wan dosn’t bring up. I tryed poweroff 5min but it dosn’t help. So if use 5.4.12 once then there is no back to 4.19 tree?
ip link set wan up give error: RTNETLINK answers: Network is down
And mali dmesg
[ 311.563765] mali: loading out-of-tree module taints kernel.
[ 311.577179] Mali:
[ 311.577183] Mali device driver loaded
No /dev/mali. So there is something wrong in mt7623 mali450. Maybe some special parameters? Some more to dts?
I found this in drivers/thermal/mtk_thermal.c . Commented out returnvalue, then recompile modules and cputemps works. Hmm, 5.4.12 run hotter (50C) than 4.19.
Noticed also hdparm -Tt /dev/sda
/dev/sda:
Timing cached reads: 1442 MB in 2.00 seconds = 721.12 MB/sec
Timing buffered disk reads: 640 MB in 3.00 seconds = 213.19 MB/sec
Oh, forgot that I say rc-update del net.eth1 because it was incompatible with 5.4.12. I’ll test it now.
Yes. It works…!
So I should test 5.3-lima first to see how it works…? Taking patch and putting them in newer kernel is something I not yet have skills to do(…?)
Based 4.19 mali/lima, 4.20-lima, 5.4.12 mali/lima, and Arm mali 450 drivers + 4.19, there is no mali chip found. So I think something is wrong. Maybe mt7623 need some special init before mali starts to work…?
I’ll try compile ARM mali driver with debug mode. Maybe it gives some hints… Well it is not very helpful:
There is these lines in readme:
The kernel needs to be provided with a platform_device struct for the Mali GPU
device. See the mali_utgard.h header file for how to set up the Mali GPU
resources.
In that file is so much defines to addresses that I can’t do anything. Need some mt7623 mali manual to check everything is correct…?
That will be a start…if it detects mali-chip you can try patches from my previous post on top of 5.4-main…i only skipped documentation patch because it is incompatible (moved from txt to yaml). I don’t know how to include it the right way
It works in 4.19 and 5.4. I can do by hand where it don’t work. Ofcourse it is posible to “emerge” dpkg to system or copy newer build.sh from 5.4… I’m quite new with R2 and gentoo. Moustly used dpkg based systems… For R2 gentoo is good to take all optimizations from hardware…
Back to lima, so it seems that @JohnnyWednesday have not shared codes yet…?
ARM offical driver fail to compile in 5.3:
driver/src/devicedrv/mali/linux/mali_osk_time.c:57:2: error: implicit declaration of function ‘get_monotonic_boottime’; did you mean ‘getboottime’? [-Werror=implicit-function-declaration]
get_monotonic_boottime(&tsval);
Maybe easy to fix but don’t know enough from kernel functions so don’t know is suggested substitution ok…?
Edit: Substitution seems to be ok, but there rises more errors so this driver is for 4.19 etc. kernels only /or someone needs to hack needed fixes. Maybe ARM people in future?
So lima is near to functional only some inits is missing…?