fenix icon indicating copy to clipboard operation
fenix copied to clipboard

[WIP] Add support for native build, enable perf and bpf

Open jeanlego opened this issue 5 years ago • 10 comments

I don't expect this to be mergeable yet.

This PR:

  • [x] multi-distro support (ish)
    • [x] Don't check distro
    • [x] Jump over the host preparation if host does not use the apt package manager
    • [x] print the required packages from debian for them to install if host is not apt based then keep building.
  • [x] let JOBS be overridden from the environment variables, using all kills resource constraint boards
  • [x] add support for native build
  • [x] cleanup some of the bashism to use arrays rather than concat.
  • [x] use a single toolchain since we don't need to download different ones, it works with just the one.
  • [x] use mkimage from the distro packages you are running on. (u-boot-tools on debian)[https://packages.debian.org/buster/arm64/u-boot-tools] or on (ubuntu)[]
  • [x] remove everything doing with Xenial (it has fallen out of support, no reason to continue and it simplifies things)
  • [ ] ~~use the ARM official toolchain~~
  • [ ] package linux-tools.deb alongside the kernel (no idea how if someone can help)
  • [ ] build the bootloader amloader binary from source to be compatible with the hardware we are running on (Others have gotten a hold of the source, I.E (ODROID)[https://github.com/hardkernel/u-boot/issues/23

jeanlego avatar Apr 05 '20 07:04 jeanlego

I don't expect this to be mergeable yet. ;) ;) ;) many good ideas !!

hyphop avatar Apr 20 '20 14:04 hyphop

native build linux is fine, to add perf and bpf. but we can use debian's kernel build framework, instead to start a new "maybe not compact with debian original" build framework. see my post on Armbian forum: https://forum.armbian.com/topic/13495-howto-build-debian-flavor-kernel-packages-for-armbian-with-module-signed-and-with-debian-featured-kernel-config/

zhangn1985 avatar May 12 '20 01:05 zhangn1985

@jeanlego if you want to use pref, you can use my build: https://packagecloud.io/zhangn1985/armbian my build supports amlogic and rk3399 in one kernel image. btw: bpf build from linux source is disabled by debian kernel team, please use: https://github.com/sudipm-mukherjee/libbpf

zhangn1985 avatar May 12 '20 03:05 zhangn1985

@jeanlego if you want to use pref, you can use my build: https://packagecloud.io/zhangn1985/armbian my build supports amlogic and rk3399 in one kernel image.

Thanks I'll check this out!

btw: bpf build from linux source is disabled by debian kernel team, please use: https://github.com/sudipm-mukherjee/libbpf

good to know! was not aware of this. thank you!

I will be honest, I finished the work I needed with this so I won't be tending to this PR anymore. You can feel free to close/scavenge things you like from it if you want.

Side note, anyone has anything onto why this board would be doing so bad on this benchmark? https://math.nist.gov/scimark2/download_c.html

more specifically Monte Carlo's performance is abysmal on this board with the mainline kernel.

I will post more details once I have the go-ahead to release them

jeanlego avatar May 27 '20 04:05 jeanlego

result of VIM1 pro

**                                                              **
** SciMark4 Numeric Benchmark, see http://math.nist.gov/scimark **
** for details. (Results can be submitted to [email protected])     **
**                                                              **
Using       2.00 seconds min time per kenel.

FFT             Mflops:   158.57    (N=1024) 
SOR             Mflops:   301.07    (100 x 100) 
MonteCarlo:     Mflops:    93.07  
Sparse matmult  Mflops:   148.00    (N=1000, nz=5000)  
LU              Mflops:   332.41    (M=100, N=100) 

************************************
Composite Score:         206.62
************************************

FFT reps:              8192
SOR reps:              16384
Montel Carlo reps:     67108864
Sparse MatMult repss:  32768
LU reps:               1024

checksum:              1.3583831696347605e+04
**                                                              **
** SciMark2 Numeric Benchmark, see http://math.nist.gov/scimark **
** for details. (Results can be submitted to [email protected])     **
**                                                              **
Using       2.00 seconds min time per kenel.
Composite Score:           49.92
FFT             Mflops:    31.96    (N=1024)
SOR             Mflops:    94.28    (100 x 100)
MonteCarlo:     Mflops:    22.36
Sparse matmult  Mflops:    42.48    (N=1000, nz=5000)
LU              Mflops:    58.50    (M=100, N=100)

zhangn1985 avatar May 28 '20 00:05 zhangn1985

result of VIM1 pro

I'll release the VIM3 ones in a bit to compare :) thanks

jeanlego avatar May 28 '20 14:05 jeanlego

@zhangn1985 do you have a board with the rk3399 chipset to use the same kernel for comparison?

jeanlego avatar May 28 '20 14:05 jeanlego

yes, but I just flash it with khadas released image, it need to take time to rebuild system.

zhangn1985 avatar May 28 '20 14:05 zhangn1985

yes, but I just flash it with khadas released image, it need to take time to rebuild system.

I don't want to bother either! I have some comparison made with a rock64 (rk3328 4gb ddr3) and it seems to outperform the VIM3 by a good margin on monte carlo. Which is confusing.

jeanlego avatar May 28 '20 15:05 jeanlego

maybe you need to check which core the benchmark runs, big or small core.

zhangn1985 avatar May 30 '20 13:05 zhangn1985