Posts by PJBrs

    i have a RPI4B but it Was broken 2 day ago :(

    i want to use my previous board (nano pi m1) :/

    can you help me?

    can you clone libreElec repo (9.2.1 kodi18.6) in github and fix u-boot error?

    i can test it and write down the result

    I'll give you a couple of pointers to help you out. I've just uploaded my patches to github, they're four patches to add support for BananaPi M2 Zero. One of the patches reverts to an older u-boot. But please note that you have to adapt it to your own device. While technically my device is identical to H3, it is branded H2. You should be working on the H3 device, and change the u-boot patches for H3. And perhaps add your device to u-boot scripts (see another of my patches). My LibreELEC branch (only the last four patches):

    Commits · PJBrs/LibreELEC.tv · GitHub

    For u-boot patches, please see Armbian:

    build/patch/u-boot/u-boot-sunxi at master · armbian/build · GitHub

    If you use u-boot version 19.10 and add all above patches, then I'm pretty sure your device will boot. Barring, of course, kernel patches for NanoPi... But that's another story (to which, again, Armbian might have many answers).

    if we want the last release of LibreElec (9.2.1) that use kodi 18.6 where we find?

    i tried to compile it but u-boot error

    i want it for NanoPi M1

    I tried to compile LE master branch for BananaPi M2 Zero, which also is a 512MB board, should be very similar. u-boot didn't work, so I downgraded u-boot to the latest version used in Armbian instead, and applied all patches that Armbian uses. (And then I removed most of the ones that didn't relate to my device, many with *nanopi* in their name.) And that worked very well. I now have a LibreELEC image that boots fine, with lima graphics. If you want, I can upload my changes. Adding nanopi-related u-boot patches from Armbian to my changes should be trivial.

    By the way, problem for me was that video playback doesn't seem to work. (I also tried with libmali, but then I got unaccelerated video playback.) I synced with master yesterday, so maybe a new build will fix that as well. Anyway, please share your experiences, would love to hear how another *unsupported* 512MB H3 device fares.

    I did build after doing make distclean. Still the same result:

    Code
    $ find build.LibreELEC-H2.arm-9.80-devel/image -name *gbm*so* -exec file {} \;
    build.LibreELEC-H2.arm-9.80-devel/image/system/usr/lib/libmali-utgard-400-r7p0-gbm.so: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[sha1]=f56d0ce5a4ff4d39df6963e01a0a84d8a0905c25, stripped
    build.LibreELEC-H2.arm-9.80-devel/image/system/usr/lib/libgbm.so: symbolic link to libmali.so
    
    $ find build.LibreELEC-H2.arm-9.80-devel/image -name libmali.so -exec file {} \;
    build.LibreELEC-H2.arm-9.80-devel/image/system/usr/lib/libmali.so: symbolic link to libmali-utgard-400-r7p0-gbm.so

    Clearly, the gbm wrapper library isn't built... Is this also happening for other projects? There still seem to be a number that use the mali binary blobs. It would seem to me that something's missing in the makefile for libmali...

    In the meantime, I could use mesa, but my previous experiences were not so good... Although, perhaps that was because of missing wireless and bluetooth firmware.

    *** EDIT ***

    ... maybe someone can point me to how to clean up / build a single package? That way at least I could start doing some experiments :)

    I'm trying to build libreelec for the Bananapi M2 Zero, an Allwinner H2-plus device with 512 MB RAM and mali-400 gpu. I know, unsupported. I managed to get the device booting by downgrading to older u-boot, and with some firmware changes wifi and bluetooth seem fine too. I think I have enough kernel patches for the device tree to get kodi supported with mesa. However, mesa / limadriver appears to be too slow, so I changed my build to use libmali instead. Here's where I run into problems. Kodi never starts. If I log into my device over ssh and start kodi from there, it complains that libgbm.so.1 is missing. So I linked /usr/lib/libgbm.so to /storage/libgbm.so.1 and started kodi with LD_LIBRARY_PATH=/storage. It complained of a missing symbol: gbm_surface_create_with_modifiers.

    Now, when I look through the libmali sources in the libreelec git repo, it appears that they include sources for a libgbm.so that wraps the binary libmali blobs and adds a couple of recent gbm symbols, such as gbm_surface_create_with_modifiers. However, the build just includes /usr/lib/libgbm.so as a symlink to the binary libmali, without the wrapper. I don't know how to work cmake and ninja to make them build that libgbm.so.1 wrapper library. Does anyone here have any suggestions?

    Dear Jernej, thanks for your reactions!

    Boards with less than 1 GiB of RAM are not supported as stated in OP

    I read that. I'm running LibreELEC on my RPi Zero, and it performs very well. So I took "unsupported" to mean that developers don't fix bugs for it. I take it that you mean that I'm mostly on my own with this one? Would you take any patches if I succeed? Anyway, you could really help me out with a couple of suggestions, I hope :)

    Quote

    and it seems that there is an issue with current U-Boot on such boards and they don't boot. Not 100% sure, but that seems to be the pattern.

    I'm not too sure whether it is the current U-Boot or something else... I built LibreELEC with an older u-boot that I know works with Armbian. It built fine but it didn't run. It might be the u-boot config, which appears a very little bit different. Might have some success that way...

    Anyway, I copied all the LibreELEC boot files to the root of my Armbian install, added the kernel to the Armbian /boot/ directory and linked it to zImage, changed the partition UUIDs in /extlinux/extlinux.conf, copied the dtb from the LibreELEC tree to my Armbian root and then it booted. In other words, it appears that the H3 kernel is fine. Boots all the way to starting Kodi media centre, and then the device hangs and gets very hot. Which probably has something to do with:

    Quote

    Always use LibreELEC master branch.

    Really? 'Cause what I would like to use is the tree with the best support for Mali-400 + cedrus. If you could give me a pointer to the best supported github branch for that, that would be very very helpful! Because the other device specifics (u-boot, kernel, firmware) I can manage myself.

    Or maybe can I just copy a system.img from a similar H3 device, now that I have a kernel and devicetree that boot?

    (I know you suggested to create a H2 device, but as far as I know H2 and H3 are actually fully compatible and the same, so I was wondering what difference that would make.)

    jernej, I own a BananaPi M2 Zero (Allwinner H2+). I would like to run Kodi on it. It is quit well-supported on Armbian right now, but I failed in getting cedrus working. I did recompile ffmpeg from kwiboo's repo, but that did not seem to work. Do you think it would be possible to add the BP M2-Zero to your nightly builds for Libreelec? I think it is mainline-kernel supported, barring a couple of changes to the devicetree, but I've got some patches for that, such as the last six or seven over here:

    Commits · PJBrs/linux_kernel · GitHub

    A subset of these are in Armbian now as well.

    In fact, I did download one of your images for H3 (I think a BananaPi one) and replaced kernel and devicetree. Didn't boot though, probably because I should have recompiled the bootloader, but I didn't know how to do that in the case of Libreelec. Anyway, it would be great if you could add the BP-M2 Zero. Otherwise it would also be great if you could give me a couple of pointers.

    *** EDIT ***

    I tried to build it myself, as follows. I checked out the cedrus_update branch. Then I patched the source as follows:

    ... and did

    Code
    PROJECT=Allwinner ARCH=arm DEVICE=H3 UBOOT_SYSTEM=bananapi-m2-zero make image

    That resulted in an image that I then transferred to my sd card. Which seemed to go alright, but when I start up the device, nothing shows, not even the bootloader. One thing I did notice is the absence of the dtb file in the LIBREELEC partition. Is that correct? Anyway, suggestions more than welcome!