ophub / amlogic-s9xxx-armbian

Support for Armbian in Amlogic, Rockchip and Allwinner boxes. Support a311d, s922x, s905x3, s905x2, s912, s905d, s905x, s905w, s905, s905l, rk3588, rk3568, rk3399, rk3328, h6, etc.
GNU General Public License v2.0
5.92k stars 1.9k forks source link

To Highlight A Potential Solution For GT King Pro (Rev_A) To Be Able To Boot On SD Card #631

Closed JFLim1 closed 1 year ago

JFLim1 commented 1 year ago

Hi @ophub,

I am having issue with booting your Bullesye or Jammy images/firmwares with kernel 5.10, 5.15 or 5.19 on SD Card. No issue booting on USB Flash.

I happened to see this article https://github.com/armbian/build/pull/4296 which seems to have potentially identify the problem that is preventing some Amlogic Devices from booting on SD Card.

There is one issue that needs some sort of resolution however. On the s905x2 box I have (H96 Max X2) the armbian build kernel (meson64) can't read the sd card. However an unpatched mainline kernel works on this box. I have tracked down the offending patch to be: general-meson-gx-mmc-set-core-clock-phase-to-270-degres.patch Without this patch the box boots fine, with it it fails to boot. I'm not sure how to work around that

The offending patch in the kernel could be "general-meson-gx-mmc-set-core-clock-phase-to-270-degres.patch" according to the author -- SteeManMI.

Is there a possibility to address this in your kernels and release firmwares. Keep up the great work.

Thank you.

ophub commented 1 year ago

Someone mentioned before, I asked unifreq about the SD card booting, the patch is available, but it may be other reasons, such as voltage, etc. This is not a common problem, my gtk-pro uses the SD card to run itself.

JFLim1 commented 1 year ago

This is not a common problem, my gtk-pro uses the SD card to run itself.

Hi @ophub, Apparently it affect certain Amlogic devices only, one of them is my GT King Pro (Rev_A). I can boot on SD Card with Armbian-UEFI linux-image-current/edge-arm64 so SteeManMi might/could be on the correct path.

I can boot on SD Card with your kernel 5.4 but kernel 5.4 is not suitable for DE on my device.

ophub commented 1 year ago

general-meson-gx-mmc-set-core-clock-phase-to-270-degres.patch

I didn't find this patch in armbian, do you have a link to this patch? I'll send it to unifreq to confirm it

The closed source practice of amlogic makes the armbian official very sad, and every time it is mentioned, it always makes the administrator very angry

JFLim1 commented 1 year ago

general-meson-gx-mmc-set-core-clock-phase-to-270-degres.patch

I didn't find this patch in armbian, do you have a link to this patch? I'll send it to unifreq to confirm it

Hi @ophub,

Unfortunately I don't have any link for the patch. From what I understand this patch is already in "linux-image-current-meson64" and "linux-image-edge-meson64" which might also mean already in Unifreq kernels (if the patch is causing it not booting on SD Card).

JFLim1 commented 1 year ago

Hi @ophub

For your info, the latest linux-image-edge-meson64 kernel (6.0.8-meson64 and 6.0.9-meson64) had the offending patch remove and now can boot up on SD Card on GT King Pro (Rev A) and also on other Amlogic TV Boxes.

Currently kernel-5.15.79-flippy-78+o cannot boot on SD Card (I/O Error) and cannot recognize SD Card. Could not test your kernel-6.0.9-flippy-78+ as it kernel panic on Boot Up with the chainloader u-boot.ext (reported https://github.com/ophub/amlogic-s9xxx-armbian/issues/707).

Hope you can look into this. Thank you.

ophub commented 1 year ago

Which patch was removed? Send me a link.

JFLim1 commented 1 year ago

Which patch was removed? Send me a link.

Hi @ophub

The offending patch seems to be: general-meson-gx-mmc-set-core-clock-phase-to-270-degres.patch

https://github.com/armbian/build/pull/4408 https://github.com/armbian/build/pull/4408/commits/f094d997d89e01e8b5d60f769eeb37cbe1e93532

With these changes kernel-6.0.8-meson64 and 6.0.9-meson64 can boot up on SD Card eventhough using dtb from your kernel-flippy-78+ not necessarily have to use dtb from kernel-meson64.

ophub commented 1 year ago

Thank you for sharing, I have forwarded the patch information to Mr. Unifreq, the maintainer of the kernel

JFLim1 commented 1 year ago

Thank you for sharing, I have forwarded the patch information to Mr. Unifreq, the maintainer of the kernel

Thank you for your great support and amazing work.

Edit: Looking forward to be able to boot your future Armbian_22.11.0_Aml_s922x-reva_jammy image on SD Card on GT King Pro (Rev A).

JFLim1 commented 1 year ago

Hi @ophub,

The new kernel-5.15.80-flippy-79+o now can recognize SD Card on my GT King Pro (Rev A) but it seems to have an issue. This kernel does NOT seems to have GPU Hardware Acceleration (Panfrost) activated in Gnome Desktop Environment.

$ uname -a
Linux opbu 5.15.80-flippy-79+o #193 SMP PREEMPT Sat Nov 26 20:38:02 CST 2022 aarch64 aarch64 aarch64 GNU/Linux

$ glmark2-es2-wayland
=======================================================
    glmark2 2021.02
=======================================================
    OpenGL Information
    GL_VENDOR:     Mesa/X.org
    GL_RENDERER:   llvmpipe (LLVM 15.0.2, 128 bits)
    GL_VERSION:    OpenGL ES 3.2 Mesa 22.2.1
=======================================================
[build] use-vbo=false: FPS: 55 FrameTime: 18.182 ms
[build] use-vbo=true:^C FPS: 51 FrameTime: 19.608 ms
=======================================================
                                  glmark2 Score: 53 
=======================================================
JFLim1 commented 1 year ago

Hi @ophub

Correction. Panfrost in Kernel-5.15.80-flippy-79+o works this morning. Must have done something wrong yesterday. My apologies.

Thank you.

~$ dmesg
[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 5.15.80-flippy-79+o (root@univm25) (Ubuntu clang version 14.0.0-1ubuntu1, Ubuntu LLD 14.0.0) #193 SMP PREEMPT Sat Nov 26 20:38:02 CST 2022
[    0.000000] Machine model: Beelink GT-King Pro

jlf@opbu:~$ glmark2-es2-wayland
=======================================================
    glmark2 2021.02
=======================================================
    OpenGL Information
    GL_VENDOR:     Panfrost
    GL_RENDERER:   Mali-G52 (Panfrost)
    GL_VERSION:    OpenGL ES 3.1 Mesa 22.2.1
=======================================================
[build] use-vbo=false: FPS: 802 FrameTime: 1.247 ms
[build] use-vbo=true:^C FPS: 1399 FrameTime: 0.715 ms