Create a customised CoreELEC image

Hello,

My goal is to create a customised CoreELEC / Kodi into an .img so people can download and burn it to an SD card straight away and use the box out-of-the-box.

My target hardware is X96 Mini and there are already stable builds in it.

Customisations include:

Customised boot splash screen
Customised Kodi launch screen
Pre-configured network setting
Pre-configured remote .vcf
Pre-configured Kodi Skin
Pre-configured Kodi Addons
Pre-configured Kodi Libraries
Pre-configured Kodi customised menu

Ultimately I would also look into an easy way to pass Wi-Fi credentials to the build, either from before burning the image or some sort of turning the box into an AP mode in the first launch of the box so user can use their phone, connect to it’s Wi-Fi, then pass the Wi-Fi credentials to the box. (Or even better, via bluetooth)

I looked up in the forum / google and found more of cross compiling tutorials and references but I think in my case I don’t have to re-compile from source?

Any ideas or reference to read will be much appreciated.

Do you intend to eliminate all branding and any non-opensource code that might be included, or is it your intention to do a ‘community’ respin of CE for a particular device?

1 Like

I intend to do it all open-source - copyright all branding / credits while customising the look.
And have all codes available in Github.

Cross compiling makes your image maintainable. It takes much more setup, but you will then be able to rebuild quickly to update your image when CoreELEC updates.
If you just want a quick one-off image to distribute, you just need to make your image and then use dd to copy it- either to a file or another sd card.

  1. Configure your device as desired
  2. Clean up, especially zerofree the disk
  3. dd if=/dev/sdb of=custom_image.img bs=4M progress=status
  4. 7z a custom_image.img.7z custom_image.img
1 Like

Good advice - thanks!

On a side note - wouldn’t it be the same if I use the image in the box, update CoreELEC, and re-make the image?

But totally get the point of ease of maintenance

I just realise I may want to do a version with 2 things:

  • Some pre-compiled python binary libraries for an addon to view videos from a Peertube instance that need the python c binding binaries of libtorrent (not compulsory as I could import the python modules / libraries from an addon)

  • an netdata.cloud installation to monitor the performance of the tv box (needs apt-get), although I can get around it with installing and running netdata.cloud via a Docker container

Any pointers or reference to read on? Especially point 2 as I prefer to run it ‘natively’ instead of from a docker. But CoreELEC is a closed system.

This is very much going to depend on your experience level. If you are familiar with make and automake tools, it is not hard to use an existing package.mk files and adapting it to your needs. If someone else has set up the package you need, either in CoreELEC, LibreELEC, or a similarly packaged system, you can pretty directly steal it. Otherwise, you need to work from the native make system and crowbar it into place. The more external hooks you need, the more difficult it is.
apt-get is simply not available, the only packager you can use is Entware. Everything else has to be compiled for the kernel you are using.

Continuing the discussion from Create a customised CoreELEC image:

Hello, I’m create my customised img too, i want to Pre-configured docker in my img, could you give me some advice?

About | FAQ | Terms of Service | Privacy Policy | Legal Notice