U-Boot and kernel 5.14

linux boots up, it’s good… you bootlog is bit short between “booting kernel” and your login-prompt

the errors are only sound-related, maybe driver does not yet support m5, so you can disable it for now

Yes I’ve read about the audio and you are right, I build again with audio disabled but what do you think about de IRQ 39 issue?

Would be great if Sinovoip help with this matters but they don’t give any answers.

The overlays files are kernel independent too?

dts & overlays only describing hardware and make a mapping to the drivers…if the keywords/options are the same the could be used for different kernel-versions. But for now you should use the dts which is compiled with your kernel (maybe original dts is not compatible with mainline)

have no idea about irq39…which dts/dtb do you use from mainline? maybe there is the irq defined…it looks it is defined to be triggered but not used by any driver.

you can try to make a cat /proc/interrupts…maybe this gives a clue

You need to set the userspace mixer controls, see:

M5 has upstream Linux kernel support since Linux 5.14, and upstream u-boot support is queued for the 2022.01 release (it missed the merge window for 2021.10). M2 and M2S should be trivial to add support for, but if Sinovoip don’t proactively send samples out when they release new boards nobody will look at them.

1 Like

Audio errors were about missing dai driver…if it is available in mainline it was not compiled in. Irq39 is unclear,but it looks like related to any phy (usb,sata,…)

I have still not found the mainline dts to check drivers needed

edit: ok, found the arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts but no hint to IRQ39…seems it is dynamically assigned…so look in /proc/interrupts

Hi Christian, do you know why I get this Kernel message?

[ 3.337808] panfrost ffe40000.gpu: dev_pm_opp_set_regulators: no regulator (mali) found: -19

This is harmless and can be ignored. It comes from generic code and is technically correct: Amlogic does not have regulators on the mali supply so there are none to be found.

1 Like

If you get the error the drivers are present in the kernel and hardware probed. You need to set the audio routing via mixer settings. In a generic distro which needs to support many different boards this is best done with a script that runs early in boot (as pre the script I linked). Some vendors who only support a couple of specific packages have .deb packages that restore alsactl state to set the routing correctly.

Thanks for your help Christian, I get this kernel message after install mate desktop on ubuntu hirsute:

fe.dai-link-0: ASoC: no backend DAIs enabled for fe.dai-link-0

I’m not an expert on building kernel, so I apreciate if you can helpme to solve this issue. I’m using mainline kernel 5.14 from here:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/snapshot/linux-5.14.tar.gz

By the way, thanks for share the u-boot for BPI-M5. I’d like to kown how you done that to build my own ou-boot for BPI-M5. I tried to doit from here:

With this steps:

https://u-boot.readthedocs.io/en/latest/board/amlogic/odroid-c4.html

but it don’t work.

Amlogic u-boot instructions (almost) always follow the same sequence:

  • build vendor u-boot to compile the FIP sources used for signing
  • import the FIP sources to the mainline u-boot build folder
  • build mainline u-boot for the board
  • sign the u-boot binary with the FIPs and tools you imported

https://github.com/LibreELEC/amlogic-boot-fip has pre-compiled/pre-extracted FIP sources for most SBC boards (including M5) and some TV box devices. You can use them to skip the first bit. So just build mainline u-boot using the M5 defconfig, download the M5 FIPs, and sign.

The audio issue is simple and has nothing to do with kernel configuration or device-tree. The audio card has three sets of inputs and outputs; and unless you configure the audio mixer (amixer) with a mapping of input to output (an audio route) there is no back end digital-audio-interface (DAI) visible and the driver complains (continuously). So you need to run the amixer commands I flagged several posts ago and the errors will instantly stop, and if you want the config to be persistent, either put the amixer commands in a startup script or use alsactl to save the configuraion to a persistent location.

1 Like

Thanks for your instructions and the fip files Christian, but ¿How I sign the u-boot.bin builded from mainline?

Follow the C4 recipe https://u-boot.readthedocs.io/en/latest/board/amlogic/odroid-c4.html … it uses the same files and tools.

Hi Christian, I follow the instructions to sign but it doesn’t work. Here is my console output:

consoleoutput.txt (3,5 KB)

I’m doing something wrong?

Thanks Christian, I changed the settings using alsa-utils and works properly. There’s a way to change those parameters before building kernel?

Hi Christian, I get this kernel message:

bpim5 login: [ 60.405123] irq 39: nobody cared (try booting with the “irqpoll” option) [ 60.406336] handlers: [ 60.408436] [<0000000076cdcc06>] irq_default_primary_handler threaded [<00000 000c1ea32d7>] phy_interrupt [ 60.417836] Disabling IRQ #39 bpim5 login: [ 60.405123] irq 39: nobody cared (try booting with the “irqpoll” option)

Ubuntu 21.04 bpim5 ttyAML0

bpim5 login:

Do you know why it could be?

The blx_fix.sh script requires bash, but your Ubuntu VM links /bin/bash to /bin/dash which does not support declare so the script errors. Switch the VM to bash … Google the problem, it’s a common issue with Ubuntu.

No you cannot fix userspace routing via kernel configuration. Go read previous comments on how to make it persistent (alsactl is probably easiest).

No idea about the IRQ issue, I never boot generic kernels or use desktop distros.

Have you tried adding this to your bootopts in uboot (to be passed as cmdline to kernel)?

Btw do you used script above or did you call the commands alone (have used 0 as card)?

Hi Christian, I want to thank you for all your support with this matter. I find out that the IRQ 39 issue is only with Kernel 5.13 and 5.14, I builded Kernel 5.10 and works well. By now, for testing, I’m using a simple boot commands but I have to research to improveit. I’m newbe buildig linux OS so I have many other questions. I don’t know how to get the initrd and vmlinuz from builded linux mainline folder. When I boot debian or ubuntu distros, I just put the headers on include folder and module on lib folder and works well but I see that many other use initrd file or vmlinux. I appreciate if you giveme some ideas to how do that. The other thing is that I can’t do change manually the screen resolution on boot commands.