Banana Pi BPI-M2 Zero new image : Ubuntu 19.10 Eoan Ermine Kernel 5.3.5

Today i released an Image with Kernel 5.3.5 for testing. In case of anyone interested the 8GB Image is here:

This is not suitable for those who want to just install and fire a ready Desktop.

It is a bare minimum Image (CLI - Command line Interface) and for those who want to test the cutting edge of Ubuntu 19.10.

Feel free to test and I hope it works for you. Enjoy.

1 Like

thank you share this image.

Hello, can this be used in BPI P2 Zero ? I put the image on a SD card but it does not boot ? I desperately need 19.10 to run KEA with a Web Interface…

Luiz

All I get is a blinking led, two times a second and a black screen.

it’s called heart-beat and it means kernel is up and running.

From there you have two choices:

  • give ENTER twice and type in ubuntu / ubuntu (user / password)
  • or use ssh to log in and do a dmesg to try to find about your screen Monitor

Update: Sometimes the screen enter a sleeping mode, pressing ENTER twice or just type in user and password awake the blank screen.

500MB ram, not recommended for BananaPi. Try making an image of Lubuntu instead, with lighter desktop.

Hi @avaf, thanks for your great work of posting images with mainline kernels!

I just bought my bananapi m2 zero a couple of days back. I would like to use a mainline kernel and have a hardware accelerated graphical desktop. In the end, I want to use the bananapi as a dvd player.

Can you give me any pointers of how to procede with the graphics? I notice that the mali.ko driver is loaded, and I tried various combinations of the mali blobs from bootlin in /usr/lib, but xorg only uses llvmpipe and wayland just crashes. I’m probably doing something wrong, but I have no idea what. Especially since there seem to be so many ways to get mali graphics running…

Anyway, if anybody has some ideas for this, I’d be very happy!

hardware accelerated graphical desktop

I did not go that further. My goal was to have minimal Image, not a Desktop for this board (512 Mbytes d ram).

I want to use the bananapi as a dvd player.

Mali is for 3D Graphics (2D glamour if you want to draw beautiful graphics on Desktop) and Cedrus is for Hardware Decoding (if you want to decode media content in the hardware portion and not by software, i mean CPU).

I believe you can build and run Kodi with mali GBM and cedrus ready on that Image (mali GBM blobs: https://github.com/bootlin/mali-blobs/tree/master/r6p2/arm - Wayland blobs) but is highly experimental. But i think you have to cross-compile or build it natively on M2Z using only one CPU due to memory constraint while using g++. ZRAM or swap will be needed.

You can have a look at lima here: https://gitlab.freedesktop.org/lima/web/-/wikis/home and Glamour here: https://www.freedesktop.org/wiki/Software/Glamor/

I think you will need kernel 5.5 with lima support, i don’t have experience with lima. Maybe you can search if Armbian kernel has lima support on kernel 5.5.

Wayland (Gnome??) should run with the mali GBM / Wayland, in theory.

@avaf thanks for the response. Seems I have quite a learning curve ahead. For now, I want to start with compiling my own kernels for this device. I understand that I should be able to just grab your dtb and such. Can you direct me to your kernel tree? Or do you use pure and vanilla mainline + mali.ko sources? (I thought I saw some dvfs patches as well).

The GBM stuff / sunxi-mali vs. lima will require further reading on my part, before I get anywhere.

If I understand correctly, your whole idea with your ubuntu image is mainly a POC for mainline + lima and cedrus? And your kernel might just as well work with any other distro (armbian, raspbian, arch, slackware, …)? Because maybe I just need to switch to a rootfs image that I understand just a bit better :slight_smile:

Armbian maintain its own kernel and doesn’t deal with userspace changes - its Debian on that end. Lima is in the armbian kernel since 4.19.y

1 Like

@avaf @igorpec So, as far as I understand with regards to graphics, I can either choose mali proprietary (which I couldn’t get to work) or I can try open source limadriver. In either case, I will need to address both kernel and userspace, correct?

To at least get going, I compiled kernel 5.5.2 with limadriver, 'cause I think I can follow the instructions for getting an accelerated desktop after that (although for me, that would be much easier on Slackware than on Ubuntu or Armbian, but beggars can’t be choosers :wink: ). I did get the kernel running, but not with the mainline 5.5.2 dtb (called sun8i-h2-plus-bananapi-m2-zero.dtb). It only booted with your dtb, @avaf. Perhaps because I used your config with the mainline device tree?

Also, I noticed that the thermal driver is not included in 5.5, which seems rather dangerous. So, it would be nice indeed to be able to see what patches you included in your kernel tree, and to see which various patches you applied to mainline.

@igorpec, of course it would also be nice to see armbian kernel sources, to compare device trees, but I couldn’t find them? Any pointers would be more than welcome!

We tried but failed to get it up: https://github.com/armbian/build/pull/1409

Slightly changed mainline 5.4.y + https://github.com/armbian/build/tree/master/patch/kernel/sunxi-current or 5.5.y + https://github.com/armbian/build/tree/master/patch/kernel/sunxi-dev

You can also download patched source packages from repository.

The sunxi-mali is the work done by bootlin and can be very tricky to set up, what i have working in 5.3.18 may not work in 5.5.y without minor changes.

You can refer to this: https://github.com/mripard/sunxi-mali/issues/54#issuecomment-583716509

If i understand lima correctly you don’t need to deal with userspace blobs, just rebuild mesa.

There are some discussions on Armbian forum about how to build / use panfrost (open source ‘mali’ for rockchip) that you can get some idea and see if it applies to lima in some way.

I think sunxi-mali blobs have support for fbdev, gbm and wayland and not X11. Highly likely the reason of the fail.

@igorpec Hi, just wanted to let you know that I managed to build Armbian buster. It just booted, very nice! Quite a hassle, by the way, to get everything built - I had to resort to making a bionic chroot on my Slackware system, haha!

Now I have absolute certainty about kernel source and such, and I might be able to get limadriver running. And to see whether I’ll be able to add a devicetree overlay for a remote control receiver. Thanks for the pointers!

Slackware 1.0 was my first :slight_smile:

Perhaps it would be easier to build with Docker?

IIRC Lima must work out of the box.

Wow! For me 10.2. It’s not so smooth as-is, but I find nothing easier to use when you want to, e.g., test new mesa or some such.

I’ve never used Docker and don’t know what it is. Anyway, my chroot (after I upgraded it from Xenial to Bionic) worked sufficiently.

Well, Xorg complains that it can’t find devices (although lima is loaded, and the mali platform device is detected), I’ll have to search a bit for config info. Also, eth0 appears to be missing, so that means I’ll probably need to change the kernel config and/or dtb. That’s for another day however, and I’m very happy that your kernel tree includes the thermal driver patches!

Glad to hear. It is probably most polished and most used kernel for/on Allwinner based devices. It’s a work of many people - I only do a small part in this.

Most likely. I don’t have this hw … don’t know. But it should not be difficulty to start from here.

@igorpec So, I’m no longer a device-tree virgin, after having decompiled @avaf 's devicetree, I enabled ethernet as follows:

diff --git a/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts
index d277d0430..cc63e6aa9 100644
--- a/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts
+++ b/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts
@@ -151,3 +151,10 @@
         */
        status = "okay";
 };
+
+&emac {
+       status = "okay";
+       phy-handle = <&int_mii_phy>;
+       phy-mode = "mii";
+       allwinner,leds-active-low;
+};

… is that how it is supposed to work? Are you looking for patches like these for armbian?

Something like that, yes.

You are welcome to submit the patch, preferable for current and dev kernel https://docs.armbian.com/Process_Contribute/ If you become an official maintainer, we can also build images …