Closed NewbieOrange closed 2 years ago
Hello, can you release the installation method conveniently?
Because I found it didn't work when I installed it, I wrote the image on the MAC system.
It would be very nice if 5.12.19 kernel sources were released, as it is the only kernel that runs at 2.2Ghz on GT King. I am interested in porting the freq changes to 5.15 tree to make it run much faster. Thanks.
]
root@King:~# inxi -C CPU: Info: 6-Core (2-Die) model: N/A variant-1: cortex-a53 variant-2: cortex-a73 bits: 64 type: MCP MCM Speed: 1800 MHz min/max: 100/1992:1908 MHz Core speeds (MHz): 1: 1704 2: 1704 3: 1800 4: 1800 5: 1800 6: 1800
It seems there's a new tool and update here :+1: https://github.com/ophub/amlogic-s9xxx-armbian/tree/main/compile-kernel
I am trying to follow these steps to create a kernel now..
old amlogic-armbian tree :+1: amlogic-s9xxx build extract-kernel.sh LICENSE make README.cn.md README.md
new tree :+1: build-armbian compile-kernel LICENSE README.cn.md README.md rebuild recompile
Seems like kernel was compiled :+1: [SUCCESS] The modules is installed successfully. [STEPS] Install headers ... INSTALL /usr/local/include [SUCCESS] The headers is installed successfully. [STEPS] Install new image ... sh ./arch/arm64/boot/install.sh 5.15.4-meson64-beta \ arch/arm64/boot/Image System.map "/boot" run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 5.15.4-meson64-beta /boot/vmlinuz-5.15.4-meson64-beta run-parts: executing /etc/kernel/postinst.d/dkms 5.15.4-meson64-beta /boot/vmlinuz-5.15.4-meson64-beta
Building module:
cleaning build area...
make -j8 KERNELRELEASE=5.15.4-meson64-beta -C /lib/modules/5.15.4-meson64-beta/build M=/var/lib/dkms/virtualbox/6.1.26/build...(bad exit status: 2)
ERROR (dkms apport): kernel package linux-headers-5.15.4-meson64-beta is not supported
Error! Bad return status for module build on kernel: 5.15.4-meson64-beta (x86_64)
Consult /var/lib/dkms/virtualbox/6.1.26/build/make.log for more information.
[ OK ]
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 5.15.4-meson64-beta /boot/vmlinuz-5.15.4-meson64-beta
update-initramfs: Generating /boot/initrd.img-5.15.4-meson64-beta
I: The initramfs will attempt to resume from /dev/dm-2
I: (/dev/mapper/vgubuntu-swap_1)
I: Set the RESUME variable to override this.
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 5.15.4-meson64-beta /boot/vmlinuz-5.15.4-meson64-beta
run-parts: executing /etc/kernel/postinst.d/update-notifier 5.15.4-meson64-beta /boot/vmlinuz-5.15.4-meson64-beta
run-parts: executing /etc/kernel/postinst.d/xx-update-initrd-links 5.15.4-meson64-beta /boot/vmlinuz-5.15.4-meson64-beta
I: /boot/initrd.img.old is now a symlink to initrd.img-5.14.0-19.2-liquorix-amd64
I: /boot/initrd.img is now a symlink to initrd.img-5.15.4-meson64-beta
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 5.15.4-meson64-beta /boot/vmlinuz-5.15.4-meson64-beta
Sourcing file /etc/default/grub' Sourcing file
/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.15.4-meson64-beta
Found initrd image: /boot/initrd.img-5.15.4-meson64-beta
Found linux image: /boot/vmlinuz-5.14.0-19.2-liquorix-amd64
Found initrd image: /boot/initrd.img-5.14.0-19.2-liquorix-amd64
Found linux image: /boot/vmlinuz-5.14.0-18.1-liquorix-amd64
Found initrd image: /boot/initrd.img-5.14.0-18.1-liquorix-amd64
done
[SUCCESS] The new image is installed successfully.
[STEPS] Find the uInitrd file.
[WARNING] The uInitrd file does not exist, jump over (2).
[STEPS] Packing the linux-5.15.4 related 3 files ...
[WARNING] Use the backup uInitrd file instead.
'/usr/src/amlogic-s9xxx-armbian-main/compile-kernel/tools/uInitrd/uInitrd-5.15.3' -> 'uInitrd-5.15.4-meson64-beta'
[SUCCESS] The [ boot-5.15.4-meson64-beta.tar.gz ] file is packaged.
[SUCCESS] The [ dtb-allwinner-5.15.4-meson64-beta.tar.gz ] file is packaged.
[SUCCESS] The [ dtb-amlogic-5.15.4-meson64-beta.tar.gz ] file is packaged.
[SUCCESS] The [ dtb-rockchip-5.15.4-meson64-beta.tar.gz ] file is packaged.
[SUCCESS] The [ modules-5.15.4-meson64-beta.tar.gz ] file is packaged.
[SUCCESS] The [ header-5.15.4-meson64-beta.tar.gz ] file is packaged.
[INFO] Kernel series files are stored in [ /usr/src/amlogic-s9xxx-armbian-main/compile-kernel/output ].
[STEPS] Clear the space and update-grub.
[SUCCESS] Space cleared successfully.
[SUCCESS] All processes have been completed.
root@King:/usr/src/5.15.4# ls boot-5.15.4-meson64-beta.tar.gz dtb-amlogic-5.15.4-meson64-beta.tar.gz header-5.15.4-meson64-beta.tar.gz dtb-allwinner-5.15.4-meson64-beta.tar.gz dtb-rockchip-5.15.4-meson64-beta.tar.gz modules-5.15.4-meson64-beta.tar.gz root@King:/usr/src/5.15.4# armbian-up 5.15.4 Start update the armbian kernel. Kernel version: 5.15.4 Start downloading the kernel from github.com ... Update using [ boot-5.15.4-meson64-beta.tar.gz ] files. Please wait a moment ... Try to using this files to update the kernel: boot: boot-5.15.4-meson64-beta.tar.gz dtb: dtb-amlogic-5.15.4-meson64-beta.tar.gz modules: modules-5.15.4-meson64-beta.tar.gz flippy_version: 5.15.4-meson64-beta kernel_version: 5.15.4 K510: 1 Unpack [ 5.15.4-meson64-beta ] related files ... 02.01 Unpack [ boot-5.15.4-meson64-beta.tar.gz ] complete. 02.02 Unpack [ dtb-amlogic-5.15.4-meson64-beta.tar.gz ] complete. 02.03 Unpack [ modules-5.15.4-meson64-beta.tar.gz ] complete. Successfully updated, automatic restarting...
$ uname -a Linux King 5.15.4-meson64-beta #1 SMP PREEMPT Mon Nov 22 01:18:15 CET 2021 aarch64 aarch64 aarch64 GNU/Linux
When cross-compiling
the Armbian kernel in a system such as Ubuntu under the environment of x86_64
, the uInitrd
file cannot be generated. When the kernel file is packaged, the file of the same kernel series in the repository will be automatically used instead. At present, cross-compilation in the x86_64 environment cannot completely replace the kernel compilation in the real Armbian environment, and the produced kernel is unstable.
Compile under the armbian system of your box. After the compilation is completed, the newly compiled kernel file will be cleaned up without changing the current system.
I found the freq table here :+1: root@mac:/usr/src/amlogic-s9xxx-armbian-main/compile-kernel/kernel/linux-5.15.4# pico arch/arm64/boot/dts/amlogic/meson-g12b-s922x.dtsi
the missing freqs are added with patch from here https://github.com/armbian/build/pull/2629/commits/d0831a7ce191759011d8a0f23019acebc2348149
// SPDX-License-Identifier: (GPL-2.0+ OR MIT) /*
/ { cpu_opp_table_0: opp-table-0 { compatible = "operating-points-v2"; opp-shared;
opp-100000000 {
opp-hz = /bits/ 64 <100000000>;
opp-microvolt = <731000>;
};
opp-250000000 {
opp-hz = /bits/ 64 <250000000>;
opp-microvolt = <731000>;
};
opp-500000000 {
opp-hz = /bits/ 64 <500000000>;
opp-microvolt = <731000>;
};
opp-667000000 {
opp-hz = /bits/ 64 <667000000>;
opp-microvolt = <731000>;
};
opp-1000000000 {
opp-hz = /bits/ 64 <1000000000>;
opp-microvolt = <731000>;
};
opp-1200000000 {
opp-hz = /bits/ 64 <1200000000>;
opp-microvolt = <731000>;
};
opp-1398000000 {
opp-hz = /bits/ 64 <1398000000>;
opp-microvolt = <761000>;
};
opp-1512000000 {
opp-hz = /bits/ 64 <1512000000>;
opp-microvolt = <791000>;
};
opp-1608000000 {
opp-hz = /bits/ 64 <1608000000>;
opp-microvolt = <831000>;
};
opp-1704000000 {
opp-hz = /bits/ 64 <1704000000>;
opp-microvolt = <861000>;
};
opp-1896000000 {
opp-hz = /bits/ 64 <1896000000>;
opp-microvolt = <981000>;
};
opp-1992000000 {
opp-hz = /bits/ 64 <1992000000>;
opp-microvolt = <1001000>;
};
opp-1908000000 {
opp-hz = /bits/ 64 <1908000000>;
opp-microvolt = <1030000>;
};
opp-2016000000 {
opp-hz = /bits/ 64 <2016000000>;
opp-microvolt = <1040000>;
};
};
cpub_opp_table_1: opp-table-1 {
compatible = "operating-points-v2";
opp-shared;
opp-100000000 {
opp-hz = /bits/ 64 <100000000>;
opp-microvolt = <751000>;
};
opp-250000000 {
opp-hz = /bits/ 64 <250000000>;
opp-microvolt = <751000>;
};
opp-500000000 {
opp-hz = /bits/ 64 <500000000>;
opp-microvolt = <751000>;
};
opp-667000000 {
opp-hz = /bits/ 64 <667000000>;
opp-microvolt = <751000>;
};
opp-1000000000 {
opp-hz = /bits/ 64 <1000000000>;
opp-microvolt = <771000>;
};
opp-1200000000 {
opp-hz = /bits/ 64 <1200000000>;
opp-microvolt = <771000>;
};
opp-1398000000 {
opp-hz = /bits/ 64 <1398000000>;
opp-microvolt = <791000>;
};
opp-1512000000 {
opp-hz = /bits/ 64 <1512000000>;
opp-microvolt = <821000>;
};
opp-1608000000 {
opp-hz = /bits/ 64 <1608000000>;
opp-microvolt = <861000>;
};
opp-1704000000 {
opp-hz = /bits/ 64 <1704000000>;
opp-microvolt = <891000>;
};
opp-1800000000 {
opp-hz = /bits/ 64 <1800000000>;
opp-microvolt = <981000>;
};
opp-1908000000 {
opp-hz = /bits/ 64 <1908000000>;
opp-microvolt = <1022000>;
};
opp-2016000000 {
opp-hz = /bits/ 64 <2016000000>;
opp-microvolt = <911000>;
};
opp-2108000000 {
opp-hz = /bits/ 64 <2108000000>;
opp-microvolt = <951000>;
};
opp-2208000000 {
opp-hz = /bits/ 64 <2208000000>;
opp-microvolt = <1011000>;
};
opp-2304000000 {
opp-hz = /bits/ 64 <2304000000>;
opp-microvolt = <1030000>;
};
opp-2400000000 {
opp-hz = /bits/ 64 <2400000000>;
opp-microvolt = <1040000>;
};
};
};
Try to adjust and compile.
Well, it worked !
https://browser.geekbench.com/v5/cpu/11129236
and before the modification: https://browser.geekbench.com/v5/cpu/11128646
You can write a tutorial about your modification plan, and everyone can refer to it.
You can customize the signature of the compiled kernel. If you want to share it, you can publish it. I will put it in the kernel library for friends who need it.
i have uploaded the kernel here : https://vp5.net/king/
I also enabled 2.4Ghz support and 2Ghz on A53 cores, but I guess the -oc dtb file does not support those yet.
uname -a Linux King 5.14.21-pulp #5 ZEN SMP PREEMPT Mon Nov 22 04:40:39 CET 2021 aarch64 aarch64 aarch64 GNU/Linux
I compiled latest ZEN kernel with Freq patches, you can get it from https://vp5.net/king /
I am using Dell 2.5K monitor with native res of 2560x1440, it seems that these patches are also required to support it :+1: https://github.com/tobetter/linux/commit/248da29964751908c36e2c5558385ec09aed87ad
screenshot with patches applied, kernel is uploaded to same dir as above (zen-pulp)
linux-5.14.21.tjz is my patched kernel src. anybody can build it with required changes.
https://github.com/ophub/amlogic-s9xxx-armbian/commit/8ca50e02bb101dff77753faa3b29890875ea075b
Thanks for sharing, I have recorded to armbian pioneer list.
So, as we now have 2.2Ghz and its working properly..
Time to find out if this can be improved.
My kernel supports freq table from odroid n2+ (2.4Ghz)
But our dtb file only supports up to 2.2Ghz
To extract dts :
dtc -I dtb -o odroid.dts /boot/dtb/amlogic/meson-g12b-odroid-n2-plus.dtb
I have extracted dts from gtking-oc.gtb, and here are freq settings: A55: ` opp-table-0 { compatible = "operating-points-v2"; opp-shared; phandle = <0x4c>;
opp-100000000 {
opp-hz = <0x00 0x5f5e100>;
opp-microvolt = <0xb2778>;
};
opp-250000000 {
opp-hz = <0x00 0xee6b280>;
opp-microvolt = <0xb2778>;
};
opp-500000000 {
opp-hz = <0x00 0x1dcd6500>;
opp-microvolt = <0xb2778>;
};
opp-1992000000 {
opp-hz = <0x00 0x76bb8200>;
opp-microvolt = <0xf9448>;
};
};`
and for A73 :
` opp-table-1 { compatible = "operating-points-v2"; opp-shared; phandle = <0x4e>;
opp-100000000 {
opp-hz = <0x00 0x5f5e100>;
opp-microvolt = <0xb7598>;
};
opp-250000000 {
opp-hz = <0x00 0xee6b280>;
opp-microvolt = <0xb7598>;
};
opp-500000000 {
opp-hz = <0x00 0x1dcd6500>;
opp-microvolt = <0xb7598>;
};
opp-667000000 {
opp-hz = <0x00 0x27c19cc0>;
opp-microvolt = <0xb7598>;
};
opp-1992000000 {
opp-hz = <0x00 0x76bb8200>;
opp-microvolt = <0xf9448>;
};
};
` Obviously we can change them according to previously posted kernel freqs. The question is how to build dtb from modified dts file. This is what i could find : https://stackoverflow.com/questions/46469924/how-to-modify-kernel-dtb-file
dtc -I dtb -O dts /boot/dtb.img -o /boot/current.dts
nano /boot/current.dts
CONVERT (BACK) dts to dtb
dtc -I dts -O dtb /boot/current.dts -o /boot/dtb.img
reboot
So, i have rebuilt dtb file and it loads successfully now i see this in dmesg :+1: [ 1.117389] core: _opp_supported_by_regulators: OPP minuV: 1040000 maxuV: 1040000, not supported by regulator [ 1.124859] cpu cpu0: _opp_add: OPP not supported by regulators (2016000000) [ 1.131954] core: _opp_supported_by_regulators: OPP minuV: 1030000 maxuV: 1030000, not supported by regulator [ 1.141675] cpu cpu2: _opp_add: OPP not supported by regulators (2304000000) [ 1.148664] core: _opp_supported_by_regulators: OPP minuV: 1040000 maxuV: 1040000, not supported by regulator [ 1.158492] cpu cpu2: _opp_add: OPP not supported by regulators (2400000000)
I uploaded my modified dts and dtb file as gtking-current
for now still the same : root@King:/usr/src/Geekbench-5.4.0-LinuxARMPreview# freq 100000 250000 500000 667000 1000000 1200000 1398000 1512000 1608000 1704000 1800000 1908000 100000 250000 500000 667000 1000000 1200000 1398000 1512000 1608000 1704000 1800000 1908000 2016000 2100000 2208000
I also uploaded the kernel : -GT
I found these new values from odroid n2+ dtb :+1:
regulator-vddcpu-a {
compatible = "pwm-regulator";
regulator-name = "VDDCPU_A";
regulator-min-microvolt = <0xa6040>;
regulator-max-microvolt = <0xfde80>;
pwm-supply = <0x49>;
pwms = <0x4b 0x00 0x5dc 0x00>;
pwm-dutycycle-range = <0x64 0x00>;
regulator-boot-on;
regulator-always-on;
phandle = <0x46>;
};
regulator-vddcpu-b {
compatible = "pwm-regulator";
regulator-name = "VDDCPU_B";
regulator-min-microvolt = <0xa6040>;
regulator-max-microvolt = <0xfde80>;
pwm-supply = <0x49>;
pwms = <0x4c 0x01 0x5dc 0x00>;
pwm-dutycycle-range = <0x64 0x00>;
regulator-boot-on;
regulator-always-on;
phandle = <0x44>;
};
0xfde80 equals 1040000 :)
We are getting somewhere
100000 250000 500000 667000 1000000 1200000 1398000 1512000 1608000 1704000 1800000 1908000 2016000 100000 250000 500000 667000 1000000 1200000 1398000 1512000 1608000 1704000 1800000 1908000 2016000 2100000 2208000 2304000 2400000 pulp@King:~$
kernel : 5.15.5-low dtb.img
both files uploaded.
As regulator does not support 1.4v , it is currently undervolted and overclocked. will need to find how to properly raise voltage, until than it runs with 1.2v
Yes, it feels snappier!
sbc-bench v0.8.4
Installing needed tools. This may take some time. Done. Checking cpufreq OPP. Done. Executing tinymembench. This will take a long time. Done. Executing OpenSSL benchmark. This will take 3 minutes. Done. Executing 7-zip benchmark. This will take a long time. Done. Checking cpufreq OPP... Done.
Memory performance (big.LITTLE cores measured individually): memcpy: 2008.2 MB/s (0.3%) memset: 7670.3 MB/s memcpy: 3721.4 MB/s memset: 6805.4 MB/s
7-zip total scores (3 consecutive runs): 9641,9629,9617
OpenSSL results (big.LITTLE cores measured individually): type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes aes-128-cbc 175612.00k 522553.51k 1010934.10k 1356122.45k 1505957.21k 1514848.26k aes-128-cbc 421197.46k 1041959.30k 1583586.30k 1808756.74k 1902242.47k 1908894.38k aes-192-cbc 167370.47k 458932.10k 825348.44k 1045608.11k 1133819.22k 1139343.36k aes-192-cbc 391137.00k 926246.25k 1322970.88k 1519525.55k 1586981.55k 1591716.52k aes-256-cbc 162310.23k 427726.51k 715113.98k 874855.77k 935717.55k 938906.97k aes-256-cbc 377643.53k 846759.10k 1185863.00k 1311776.43k 1361529.51k 1364961.96k
Full results uploaded to http://ix.io/3G88. Please check the log for anomalies (e.g. swapping or throttling happenend) and otherwise share this URL.
In case this device is not already represented in official sbc-bench results list then please consider submitting it at https://github.com/ThomasKaiser/sbc-bench/issues with this line: | Beelink GT-King Pro | 2400/2016 MHz | 5.15 | Impish arm64 | 9630 | 298400 | 1151930 | 2013720 | 7676810 | - | http://ix.io/3G88 |
kernel src is uploaded : linux-5.15.5-low.src.zip
Ok funny enough, i could overclock further . https://browser.geekbench.com/v5/cpu/11326141
.
https://browser.geekbench.com/v5/cpu/11328304
5.15.5-oc.zip
pulp@King:~$ freq 100000 250000 500000 667000 1000000 1200000 1398000 1512000 1608000 1704000 1800000 1908000 2016000 2080000 2140000 100000 250000 500000 667000 1000000 1200000 1398000 1512000 1608000 1704000 1800000 1908000 2016000 2100000 2208000 2304000 2400000 2420000 2450000 2460000 2470000 2480000 2490000
The thermal protection is working well, freq dropped quickly if overheat :
arch/arm64/boot/dts/amlogic/meson-g12b-s922x.dtsi file is uploaded to vp5.net/king/
5.15.10-pulp.zip
@pulpoff I own a Beelink GtKing-Pro and wanted to know which u-boot.ext you used to boot your 5.15.y system on SD card ?
@pulpoff I own a Beelink GtKing-Pro and wanted to know which u-boot.ext you used to boot your 5.15.y system on SD card ?
i have used original armbian in this thread and installed on emmc, whatever u-boot this installs by default ..
Install Armbian to EMMC Login in to armbian (default user: root, default password: 1234) → input command:
armbian-install
sbc-bench v0.8.4
Installing needed tools. This may take some time. Done. Checking cpufreq OPP...ls: cannot access '/sys/devices/system/cpu/cpufreq/policy?/stats/time_in_state': No such file or directory Done. Executing tinymembench. This will take a long time. Done. Executing OpenSSL benchmark. This will take 3 minutes. Done. Executing 7-zip benchmark. This will take a long time...ls: cannot access '/sys/devices/system/cpu/cpufreq/policy?/stats/time_in_state': No such file or directory Done. Checking cpufreq OPP... Done.
ls: cannot access '/sys/devices/system/cpu/cpufreq/policy?/stats/time_in_state': No such file or directory Memory performance (big.LITTLE cores measured individually): memcpy: 1947.6 MB/s memset: 7927.2 MB/s memcpy: 3675.8 MB/s memset: 7109.9 MB/s
7-zip total scores (3 consecutive runs): 9840,9885,9913
OpenSSL results (big.LITTLE cores measured individually): type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes aes-128-cbc 191693.25k 570383.38k 1103535.87k 1480247.30k 1640966.83k 1651976.87k aes-128-cbc 459681.83k 1137583.21k 1728555.01k 1973924.52k 2076185.94k 2081805.65k aes-192-cbc 182706.59k 502783.77k 900973.91k 1141420.37k 1236088.15k 1241655.98k aes-192-cbc 426857.82k 1010069.14k 1441687.72k 1658283.69k 1731974.49k 1737321.13k aes-256-cbc 177151.89k 465943.25k 780609.88k 954859.18k 1019781.12k 1023584.94k aes-256-cbc 412141.13k 923912.00k 1294000.04k 1431674.88k 1485960.53k 1489851.73k
Full results uploaded to http://ix.io/3JaS. Please check the log for anomalies (e.g. swapping or throttling happenend) and otherwise share this URL.
你好,那个您可否方便发布一下安装方法?