Hi, I have a question, if I want to adapt Libreelec to the H313 chip, then what do I need to modify in the project to get H313 support, or whether there is an official H313 support that is just not released
Allwinner H313 chip adaptation problem
-
linsz -
January 2, 2025 at 9:28 AM -
Thread is Unresolved
-
-
There's no special/secret repo that we're sandbagging support for that chip in .. support doesn't exist and you need to adapt Linux kernel drivers for H6 and H616 to the H313 hardware and/or author new drivers for anything missing. There is no guide for how things are done, only prior-art from the Allwinner BSP codebase as an example: mostly an example of how to write low-quality code that needs to be rewritten for upstream frameworks, standards, and acceptance.
We'll be happy to test anything you come up with.
-
First of all, I have a version of ubuntu that works on H313 hardware. Secondly, my understanding of libreelec lies in that it cross-compiled and packaged a bunch of packages into image package files through scripts. The most important problem is that maybe due to my ability, I still can't understand how libreelec runs, so I don't know how to modify it to effectively adapt it. So I was hoping you could give me some guidance. For example, replace certain files in certain directories or modify certain configuration files to fit.
-
Your Ubuntu image will be using the Allwinner (downstream) vendor codebase. It would be a good first-step to compile the latest Kodi for Ubuntu and understand if (and how) it runs there. These days LE is heavily oriented around a modern kernel and overall codebase that supports GBM/V4L2 graphics and this is often the opposite of what vendor codebases provide.
LE is not derived from any other OS and is loosely based on Linux from Scratch principles: https://www.linuxfromscratch.org
The wiki has basic buildsystem instructions on how to self-compile: https://wiki.libreelec.tv/development/build-basics
Our buildsystem is full of prior-art and acts as it's own instruction manual. One of the trueism's of the project is that people with the right skillsets/background to succeed with device bring-up/porting occasionally show up with esoteric questions on distro packaging or some compile issue, but they never show up asking how to approach the task as for them it's obvious and they're already neck-deep in the required changes. At the risk of being "Mr Negative" on the idea: I can tell from what and how you're asking that you're in the wrong camp (as I would also be .. it requires non-trivial effort).
-
If you want to play, here is my attempt: https://github.com/jernejsk/LibreELEC.tv/commits/h616/ but note that display driver is not there yet (problematic scaling of YUV formats). There is also no audio support. Using newer kernel would allow analog audio and if you use extra patches, also hdmi audio.