building kodi / LE kernel as a base for another distro

  • Hi,

    sorry this is a bit out of topic but i believe the most knowledgeable people to help me with this are on this forum, so i hope they can help me a bit.

    Before i go on i'll say that i've been using OE/LE for a long time on numerous devices so i know what it does and does not do as a linux system and i understand why it was designed that way.

    - short version :

    my goal is to build an "all in one" linux box that would run a headless server system (ubuntu/debian) with kodi standalone on top of it.


    - long version :

    could i use an LE source (meaning not heavily hacking my way into it), for example kszaq's git for amlogic s905, as a base to build another linux distro, debian/ubuntu for example.

    i'm not talking about a desktop system, a headless one with kodi standalone, much like LE but with a "real" server distro below it.
    The idea being to keep all kodi/kernel optimizations for a specific platform, most likely s905/s905x, from LE.

    I know that some of you will tell me that many "server" services (vpn, torrent..) can be installed on LE and i have done that but it is quite a painful process and will never match the ease of use of a fully fledged server system.
    At the moment i tweak OE/Kodi, so i can switch kodi on/off but leave the system on.


    I'm not quite used to manipulating whole systems like that and can't really anticipate what will or won't work, so that's mostly the kind of inputs i'm looking for.

    thx.

  • Yes in theory you can take the patches and various kernel bits but there is no nicely written wiki article to explain the entire process so in reality it's one of those "If you have to ask how it's done, you're not going to succeed at the task" cases. I don't mean to be arrogant in saying that, it's just that I have a load of experience with people trying to fiddle with the logical and well structured LE build-system, and that's how it plays out.

  • yes i know that LE is highly specialized and very different from regular "server/desktop" system configurations.

    But my idea is not really to modify LE's build system, more likely to extract the kernel source with patches if any, and build it along another rootfs.

    Let's say i'm used to building kernels / drivers with patches, at least i was for many years, before v4l got mature and could support my dvb hardware.

    What i have less experience with is a BSP kernel and i don't know what that implies in terms of limitations.
    And if dealing with the kernel is not really my main concern, i imagine it will be more difficult to get kodi outside of LE and keep a way to build it.

    Of course there are ugly alternatives that i would like to avoid.

  • If you wanted a specific kernel patch from LE, you could pick it from here and rebuild the Ubuntu kernel with it applied. Same goes for Kodi. I agree with Chewitt though, nobody is going to do this for you so if you don't know how to do it already then it won't get done. You think installing services on LE is painful, yet you think making some kind of LE/Ubuntu Frankenstein distro would be an easier route? Does not compute for me :) Your time would be better spent learning how to create packages for the services you need and integrating it into LE.


  • If you wanted a specific kernel patch from LE, you could pick it from here and rebuild the Ubuntu kernel with it applied. Same goes for Kodi. I agree with Chewitt though, nobody is going to do this for you so if you don't know how to do it already then it won't get done. You think installing services on LE is painful, yet you think making some kind of LE/Ubuntu Frankenstein distro would be an easier route? Does not compute for me :) Your time would be better spent learning how to create packages for the services you need and integrating it into LE.

    Interesting there's some kind of pattern here, although i'm not sure exactly how you figured out i was asking someone to do that for me.

    Anyways i will not use the current mainline kernel so i'm happy to stick with the same one LE is using on my devices (s805/s905), also doing some arm uboot/dtb stuff is quite a breeze of fresh air so i don't mind.

    As far as your frankenstein reference goes, one could say exactly the same of LE compared to almost anything else linux, yes ? :D

    As i mentioned above, i already have an OE image doing what i described initially and that involved making approx 60 packages/addons including dependencies, all of it not required by LE and becoming then completely unmanageable in a modern linux headless server sense.

    So yeah i know what kind of work adding packages/addons to LE is and i'd much rather spend my time moving away from LE while keeping what's best from my favorite LE fork (kernel / kodi hardware support), than turning LE into something it's not, on that we all agree i believe.
    Maybe that'll explain my motivation a little better.


    back to the topic, i imagine i should not forget to use patches and configurations from the projects directory for my device, right ?

    One thing i'm still looking at is how to generate a list of all the packages that would be included in a specific project build, for example following PKG_ARCH is certainly too wide..
    So that i can also make sure that critical packages are present in my target distro.

    thank you for your comments.