Building CoreElec with Kodi Build!

In this article I describe the steps for building a USB bootable Image with CoreElec (In my case I built a CoreElec USB stick for the GT King Pro).

You need:

  • USB stick to image (8Gbyte is fine)
  • Copy of Rufus to image the USB stick
  • Copy of the proper CoreElec image for your device (in my case for the GT King Pro). The following is also a listing  'here" showing which image is for your device.

Once you download the correct image for your target device, simply plug in your USB stick and run Rufus using the “SELECT” button to load the image file and build the USB partitions and bootable image.

Next you will need to copy the proper image file to the root of your USB stick. To do this you will need to mount the USB stick onto your computer. Windows does not automatically mount the USB stick when you plug it into your computer. You must manually add a drive mapping. To do this:

Run “Computer Management”

Select “Disk Management” and select the USB disk and add a drive letter manually

You can now see the USB disk on your computer

Now navigate to the USB stick and go into the "devicetree” directory and copy your device specific image to the root of the USB and rename it dtb.img.

Your USB stick is ready to use (Almost) cool

Black Screen of Death

The black screen of death is when you boot your newly created CoreElec USB stick. You think all is good as your device will boot and the CoreElec splash screens appear but when it launches / hands over to the Kodi installation, your TV goes “black” and a nasty HDMI error appears on your TV. The reason for this is that the default Kodi build attempts to poll the HDMI port to get a list of supported resolutions but if this fails (as it does on my Samsung TV), unfortunately the KODI build changes the display resolution to one that my TV HDMI port cannot handle (800x600p@60hz). There is a config.ini file on your USB stick that you can force the default resolution, timings, etc., but this only impacts your CoreElec operating system and will not solve this issue as the issue is with the Kodi build within CoreElec. Since I was not sure how to manipulate the default Kodi build, my work around was to simply hook up a computer monitor (or another TV via HDMI) that can handle the default resolution (that can handle 800x600p @ 60Hz) and boot to the Kodi build. From there, you can change the default resolution in Kodi to a resolution that your TV likes (e.g. 1080p @ 60Hz). Then switch back to your TV to complete your desired Kodi configuration.

Update:

When my Kodi box rebooted, it polled the HDMI port again for the correct resolutions (and failed) and defaulted back to the 800x600 @ 60Hz as it goes back to the default KODI build for a list of resolutions which my Samsung TV did not like and promptly provided the black screen of death. I attempted to add additional resolutions by creating a file named "disp_add" in .kodi/userdata with the following:

1280x720p60Hz

1920x1080p60Hz

While these added the additional resolutions as options, if selected, they do not work properly? I then connected a high resolution PC monitor (AOC Gaming Monitor) and the default list of resolutions (under System-System-Display-Resolution) included a long list of supported resolutions including 1920x1080p? I select this resolution and swap the HDMI cable from the Gaming Monitor back to the TV and it displays correctly at 1080p? I will have to determine the proper way to add this resolution as the default and/or be able to select it from the list... In the meantime this workaround will have to be used until a more permanent solution can be found.

Note - I may need to create the the "disp_cap" file with an entry as this file does not add but overwrites the default "supported" resolutions?

Update to the Update:

To avoid the rebooting issue, I placed a 1080p EZCap video capture device inline of the HDMI port for the Samsung TV. When I reboot my CoreElec, the Kodi build polls the EZCap and I get a large list of supported resolutions (including full 1080p). This is the current workaround... At least I can enjoy the Kodi GUI in full 1080p cool until the permanent solutions is found.

Final Update - Permanent Solution:

In order to force the resolution for the Samsung TV to one the TV will recognize without having to use an intermediate device, I had to force the resolutions by adding a "disp_cap" file in .kodi/userdata with entries that the TV recognizes (* for the default resolution - i.e. 1080p):

1080p60hz*

1024x768p60hz

Note - The "disp_cap" file gets copied to the master location of the Kodi build @ "/sys/class/amhdmitx/amhdmitx0/disp_cap". Also, I no longer require a "disp_add" file as I am planning to always use 1080p on the Samsung TV. No need to go beyond the 60hz as the GUI is fine at 60Hz and these settings do not impact playback...

How to Dual Boot on GT-King Pro:

CoreELEC Free switching

The user to switch freely between the Android AOSP system and the CoreELEC system when using dual systems, we have added the system option of switching to SD / TF card in the firmware of the GT-King series products. Just press and hold the power off button of the remote control, and the System switch option will appear as shown in the figure below. Select this option and confirm, the machine will restart into the CoreELEC system in the SD / TF card.

How to use dual systems

Start the second system

Insert the supplied SD / TF card into the card slot, connect the power and turn on the machine to boot to the second system automatically. When the SD / TF card is inserted, the first boot option is the second system in the SD / TF card.

Dual system (Android and CoreELEC) switching

Android AOSP — second system: Boot to Android, insert the attached SD / TF card, press and hold the shutdown button on the remote control, select the System switch option, and restart to the second system.

Comments powered by CComment