Hammerill Posted December 29, 2023 Posted December 29, 2023 Hello everyone, I've recently started migrating a project for Banana Pi M5 from Debian 10 Buster to Armbian, because I've found that the latest versions of it now support the GPU, Mali G31, and come with Panfrost OpenGL driver, which is crucial for this project. Everything was perfect until I had to implement two features: operating with TV via CEC and showing boot logo. Quickly about the last one - as I've understood, we have to use Plymouth, but I didn't really get how to do it, I've tried to activate it but had no success (how exactly see under paragraph). However, it doesn't work on Server Images (even on those that were compiled with build tools and activated option BOOT_LOGO in kernel conf), but in GUI Images everything is fine with it. Also I've tried using uBoot logo (boot-logo.bmp.gz), but also no success. # Adding "splash quiet loglevel=0 logo.nologo" to extraargs in "/boot/armbianEnv.txt" # Activating bootlogo in "/boot/boot.cmd" (am I even supposed to edit this file?) sudo plymouth-set-default-theme -R customtheme # It contains our logo # sudo update-initramfs -c -u # In fact, it runs automatically sudo reboot # ... sudo plymouthd sudo plymouth --show-splash Now about CEC. I've made some observations: CEC Under Debian # Sorry, there is no support for Shell syntax highlighting apparently. pi@TEST:~$ uname -a Linux TEST 4.9.312-BPI-M5 #1 SMP PREEMPT Wed Mar 1 01:44:35 UTC 2023 aarch64 GNU/Linux pi@TEST:~$ cec-client -l libCEC version: 4.0.4, compiled on Linux-4.9.0-8-arm64 ... , features: P8_USB, DRM, P8_detect, randr, Exynos, AOCEC Found devices: 1 device: 1 com port: AOCEC vendor id: 0000 product id: 0000 firmware version: 5 type: unknown pi@TEST:~$ ls -l /dev/*cec* crw-rw-rw- 1 root root 503, 0 Feb 14 2019 /dev/aocec pi@TEST:~$ echo 'standby 0' | cec-client -s -d 1 opening a connection to the CEC adapter... pi@TEST:~$ # Works fine. pi@TEST:~$ echo 'on 0' | cec-client -s -d 1 opening a connection to the CEC adapter... pi@TEST:~$ # Works fine. pi@TEST:~$ sudo lsmod | grep cec pi@TEST:~$ sudo find /lib/modules/ -name "*cec*" pi@TEST:~$ # No CEC module in lsmod or modules overall, but works fine. pi@TEST:~$ It uses AOCEC on 4.9 Linux kernel. Works flawlessly. All the parts in "/boot/boot.ini" concerning CEC: ... ### voutmode : hdmi or dvi setenv voutmode "hdmi" # setenv voutmode "dvi" # HPD enable/disable option setenv disablehpd "false" # Enable/Disable CEC setenv cec "true" ... ### Normal HDMI Monitors if test "${display_autodetect}" = "true"; then hdmitx edid; fi if test "${hdmimode}" = "custombuilt"; then setenv cmode "modeline=${modeline}"; fi if test "${cec}" = "true"; then setenv cec_enable "hdmitx=cec3f"; fi ... # Boot Args setenv bootargs "...${cec_enable} sdrmode=${sdrmode}" ... If I set cec "false" this happens: pi@TEST:~$ cec-client -l libCEC version: 4.0.4, compiled on Linux-4.9.0-8-arm64 ... , features: P8_USB, DRM, P8_detect, randr, Exynos, AOCEC Found devices: 1 device: 1 com port: AOCEC vendor id: 0000 product id: 0000 firmware version: 5 type: unknown pi@TEST:~$ ls -l /dev/*cec* crw-rw-rw- 1 root root 503, 0 Feb 14 2019 /dev/aocec pi@TEST:~$ echo 'standby 0' | cec-client -s -d 1 opening a connection to the CEC adapter... unable to open the device on port AOCEC ERROR: [ 2233] AllocateLogicalAddresses - failed to allocate device '0', type 'recording device' ERROR: [ 2233] failed to find a free logical address for the client ERROR: [ 2233] failed to register the new CEC client - cannot allocate the requested device types ERROR: [ 2233] failed to register a CEC client pi@TEST:~$ # Doesn't work pi@TEST:~$ Here, "/dev/aocec" doesn't sweep away when setting CEC to false. It just becomes unaccesible. CEC Under Armbian pi@TEST:~$ uname -a Linux TEST 6.6.8-edge-meson64 #1 SMP PREEMPT Wed Dec 20 16:02:07 UTC 2023 aarch64 GNU/Linux pi@TEST:~$ cec-client -l libCEC version: 6.0.2, compiled on Linux ... , features: P8_USB, DRM, P8_detect, randr, Exynos, Linux, AOCEC Found devices: NONE pi@TEST:~$ ls -l /dev/*cec* ls: cannot access '/dev/*cec*': No such file or directory pi@TEST:~$ echo 'standby 0' | cec-client -s -d 1 autodetect FAILED pi@TEST:~$ echo 'on 0' | cec-client -s -d 1 autodetect FAILED pi@TEST:~$ sudo lsmod | grep cec pi@TEST:~$ sudo find /lib/modules/ -name "*cec*" /lib/modules/6.6.8-edge-meson64/kernel/drivers/media/cec /lib/modules/6.6.8-edge-meson64/kernel/drivers/media/cec/usb/pulse8/pulse8-cec.ko /lib/modules/6.6.8-edge-meson64/kernel/drivers/media/cec/usb/rainshadow/rainshadow-cec.ko /lib/modules/6.6.8-edge-meson64/kernel/drivers/media/cec/platform/cec-gpio /lib/modules/6.6.8-edge-meson64/kernel/drivers/media/cec/platform/cec-gpio/cec-gpio.ko /lib/modules/6.6.8-edge-meson64/kernel/drivers/media/cec/platform/meson/ao-cec.ko /lib/modules/6.6.8-edge-meson64/kernel/drivers/media/cec/platform/meson/ao-cec-g12a.ko /lib/modules/6.6.8-edge-meson64/kernel/drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.ko pi@TEST:~$ sudo modprobe cec pi@TEST:~$ sudo modprobe cec-gpio pi@TEST:~$ sudo modprobe ao-cec pi@TEST:~$ sudo modprobe ao-cec-g12a pi@TEST:~$ sudo modprobe dw-hdmi-cec pi@TEST:~$ sudo modprobe pulse8-cec pi@TEST:~$ sudo modprobe rainshadow-cec pi@TEST:~$ sudo lsmod | grep cec rainshadow_cec 16384 0 pulse8_cec 24576 0 dw_hdmi_cec 12288 0 ao_cec_g12a 12288 0 ao_cec 16384 0 cec_gpio 12288 0 pi@TEST:~$ # cec.ko isn't in libs so in lsmod there is no such module, but why "modprobe cec" gives no error? pi@TEST:~$ ls -l /dev/*cec* ls: cannot access '/dev/*cec*': No such file or directory pi@TEST:~$ # And activating modules just doesn't help, there is still no any "/dev/*cec*" device pi@TEST:~$ It doesn't use any of CEC on 6.6.8 Bleeding Edge Linux kernel (I've tested it before on stable 6.1 kernel, but it didn't work as well, I've activated some modules concerning CEC in kernel config and built using the latest possible kernel, thinking it will change something). Just doesn't work. AOCEC module is compiled and launched though, but it doesn't use it at all since there is no "/dev/*cec*" device. All the parts in "/boot/boot.cmd" concerning CEC: ... setenv sdrmode "auto" setenv voutmode "hdmi" setenv disablehpd "false" setenv cec "false" ... if test -e ${devtype} ${devnum} ${prefix}zImage; then ... setenv bootargs "...${cec_enable} sdrmode=${sdrmode}" ... Somehow, it misses the part where we should set "cec_enable" variable. What if I restore it and set to true? But I don't really think it will change something, as "/dev/aocec" existed on Debian even when CEC was disabled. That didn't work, as well as adding "hdmitx=cec3f" to extraargs in "/boot/armbianEnv.txt". There is just no CEC device in "/dev/", I don't know which type of problem is that - module, overlay, kernel?? Yes, I've used v4l, and it also fails because it doesn't find any "/dev/*cec*". Anyway, I hope this problem can be resolved and thanks to everyone for attention, have a happy new 2024 year! 0 Quote
Hammerill Posted January 2 Author Posted January 2 Well, issue with boot logo was resolved. I didn't see the end of `/boot/boot.cmd` file, it told me to run `mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr` to compile it. Now setting Plymouth theme works flawlessly. But issue with CEC stays the same. 0 Quote
RES Posted February 24 Posted February 24 Maybe you have to enable CEC in the device tree? # cd /boot/firmware/ # fdtput -t s meson64_bananapi_m5.dtb /aocec status enabled # reboot 0 Quote
Hammerill Posted April 11 Author Posted April 11 (edited) Hello, thank you for trying to help, but this didn't work for me. First, I suppose you wanted to write about the `/boot/dtb/amlogic/` directory, since the `/boot/firmware/` doesn't exist at least on my system. Then, the file we are looking for is probably named `meson-sm1-bananapi-m5.dtb`, so the full command would be `fdtput -t s meson-sm1-bananapi-m5.dtb /aocec status enabled`. But I get this output: $ cd /boot/dtb/amlogic $ fdtput -t s meson-sm1-bananapi-m5.dtb /aocec status enabled Error at '/aocec': FDT_ERR_NOTFOUND `/aocec` is not found. I've even tried to do that on a compiled kernel where I explicitly added all the available CEC modules (AOCEC as a kernel module `*`, all the others are normal modules `M`). Doesn't work. Edited April 11 by Hammerill expicitly => explicitly 0 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.