U-Boot and kernel 5.14

Hi, anyone knows if the U-Boot build from BPI-M5-bsp can boot Kernel 5.14 build? Kernel version is independent from U-Boot?

Imho it does not depend on uboot…you need a kernel 5.14 which supports your board. Afair m5 is not supported yet in mainline

thanks for the awesome information.

Hi, I cloned git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git and it comes with dtb file for bpi-m5. I build mainline kernel 5.14 and run with some issues. This is my boot log:LOG BOOT UBUNTU DESKTOP HIRSUTE.txt (61,8 KB)

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?