N2+ Ubuntu + Kodi + VDR + hyperion.ng

beta2
Posts: 42
Joined: Sun Nov 28, 2021 8:05 pm
languages_spoken: english, german
ODROIDs: N2+
Has thanked: 2 times
Been thanked: 10 times
Contact:

Re: N2+ Ubuntu + Kodi + VDR + hyperion.ng

Post by beta2 »

@odroid: Could you also please add VDR to the title (http://www.tvdr.de). This output plugin (https://github.com/jojo61/vdr-plugin-softhdodroid) makes Odroid N2+ the best standalone TV box I have ever seen, even compared to Intel machines. Please refer to this thread (https://www.vdr-portal.de/forum/index.p ... /&pageNo=1) in German for further information.
mad_ady wrote:
Wed Dec 29, 2021 7:12 am
e.g. internet connection in chroot environment
Make sure /etc/resolv.conf inside the chroot has a valid nameserver 8.8.8.8 in it and internet should work. Regular networking should already work...
Thanks for the tip, @mad_ady. Google's nameserver is already in. I am not sure yet, why plugins do not install. Maybe it is even not the missing internet. However, I still have some dead links in my CoreElec directory in Ubuntu. I will figure this out.

User avatar
odroid
Site Admin
Posts: 38529
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 2211 times
Been thanked: 1295 times
Contact:

Re: N2+ Ubuntu + Kodi + VDR + hyperion.ng

Post by odroid »

Very impressive Germany forum :o I found many great things in that link via google translator.

Anyway, is this title fine for you?
N2+ Ubuntu + Kodi + VDR + hyperion.ng

beta2
Posts: 42
Joined: Sun Nov 28, 2021 8:05 pm
languages_spoken: english, german
ODROIDs: N2+
Has thanked: 2 times
Been thanked: 10 times
Contact:

Re: N2+ Ubuntu + Kodi + VDR + hyperion.ng

Post by beta2 »

Perfect. Thank you once again.

beta2
Posts: 42
Joined: Sun Nov 28, 2021 8:05 pm
languages_spoken: english, german
ODROIDs: N2+
Has thanked: 2 times
Been thanked: 10 times
Contact:

Re: N2+ Ubuntu + Kodi + VDR + hyperion.ng

Post by beta2 »

I solved the KODI internet problem. The problem was a missing certificate which was not linked correctly.
First addons are working, such as Amazon VOD or radio plugin.
I still have a few problems to solve. Some plugin start their own processes which is not yet working correctly. I will keep you updated and will post the howto soon...

beta2
Posts: 42
Joined: Sun Nov 28, 2021 8:05 pm
languages_spoken: english, german
ODROIDs: N2+
Has thanked: 2 times
Been thanked: 10 times
Contact:

Re: N2+ Ubuntu + Kodi + VDR + hyperion.ng

Post by beta2 »

Before publishing the KODIBUNTU tutorial I would like to publish a method of booting SD card from eMMC. My assumption is an UBUNTU on eMMC (e.g. using VDR) und CoreElec on SD card. I generated different scripts to save and restore the eMMC bootloader. If no valid boot signature on eMMC is found, Odroid N2+ will boot the SD card. Therefore, the idea is to save the bootloader and transfer it to SD card. Afterwards, boot signature on eMMC can be erased. At reboot, CoreElec on SD will be booted which will repair the boot signature of eMMC. Thus, on the next boot, eMMC will be booted again. In this way OS can be easily switched with any remote control from eMMC to SD and back. I know that Petitboot can be used with odroid remote control. However, this little tutorial may be helpful for those with different remote control or without any keyboard.

1. Boot to eMMC and save the bootloader (save_bootloader.sh):

Code: Select all

# Do not call this with defective bootloader!!!!
#!/bin/bash
dd if=/dev/mmcblk0 of=bootloader.bin bs=512 count=2047
Important: Do NOT call this script with an erased bootloader!

2. Transfer bootloader.bin to KODI

Code: Select all

sudo mount /dev/mmcblk1p2 /mnt
sudo cp bootloader.bin /mnt/.kodi/userdata
sudo cd /mnt/.kodi/userdata
sudo vi reboot_emmc.sh
Content of reboot_emmc.sh

Code: Select all

#!/bin/bash
dd if=./bootloader.bin of=/dev/mmcblk0 bs=512

Code: Select all

sudo chmod 775 reboot_emmc.sh
3. Repair defective boot signature on CoreElec autostart

Code: Select all

cd /mnt/.config
sudo vi autostart.sh
Content of autostart.sh

Code: Select all

#!/bin/bash
cd /storage/.kodi/userdata
/storage/.kodi/userdata/reboot_emmc.sh

Code: Select all

sudo chmod 775 autostart.sh
4. In UBUNTU generate a script reboot_kodi.sh with this content

Code: Select all

#!/bin/bash
dd if=/dev/zero of=/dev/mmcblk0 bs=512 count=3
sleep 1
reboot
This script will erase the boot signature of the eMMC and reboot to CoreElec SD card. On CoreElec the boot signature will automatically be restored. Thus, next boot will go to eMMC.

These scripts will allow you to easily switch between eMMC UBUNTU and SD CoreElec.
Important note: Please make a backup of your eMMC/SD card. Incorrect usage of dd command may turn eMMC into non-bootable state.
Last edited by beta2 on Mon Jan 03, 2022 5:55 pm, edited 1 time in total.
These users thanked the author beta2 for the post:
odroid (Fri Dec 31, 2021 10:04 am)

beta2
Posts: 42
Joined: Sun Nov 28, 2021 8:05 pm
languages_spoken: english, german
ODROIDs: N2+
Has thanked: 2 times
Been thanked: 10 times
Contact:

Re: N2+ Ubuntu + Kodi + VDR + hyperion.ng

Post by beta2 »

In this tutorial I would like to provide all steps required in order to make fully accelerated KODI run in Ubuntu 20.04.

1. You need to use my kernel located at https://github.com/beta68/linux. This kernel includes CoreElec's media and media_modules_branch. I back-ported the HDMI driver to get rid of several warnings. A .compile file is included. The kernel is up to date with odroid's kernel version. The Github WIKI provides some more hints on kernel compilation. This kernel also provides the amvideograb device which can be used with hyperion.ng for ambilight. Please do not forget to copy three overlay files (*n2*.dtb) to /media/boot/amlogic.

2. My /etc/rc.local includes the settings for my (4K) TV and double buffer mode for hyperion. Please adapt it to your screen resolution.

Code: Select all

echo 420,10bit > /sys/class/amhdmitx/amhdmitx0/attr
echo 2160p50hz420 > /sys/class/display/mode
echo 0 > /sys/class/video/blackout_policy

echo 3 > /sys/module/amvdec_h265/parameters/double_write_mode
echo 3 > /sys/module/amvdec_vp9/parameters/double_write_mode
3. I installed CoreElec on an SD card while my Ubuntu is on eMMC. However, this guide should also work with SD card only systems. I booted CoreElec and configured it according to my requirements (language, add-ons, etc.). Afterwards used ssh to connect and changed into the root directory. From there I tared all single directories with the exception of /proc, /dev, /sys, and /run. I also tared libreelec and samba directories which are required later. I copied all the tar files to my UBUNTU partition and untared them in a coreelec directory which is located in my home directory. In my case this is /home/rudi/coreelec (please change username according to your username). My installation looks like this:

Code: Select all

lrwxrwxrwx  1 root root    8 Dez 28 07:49 bin -> /usr/bin
drwxr-xr-x  2 root root 4096 Dez 28 07:53 dev
drwxrwxr-x 23 root root 4096 Dez 29 13:54 etc
drwxr-xr-x  3 root root 4096 Dez 29 10:38 extras
drwxr-xr-x  2 root root 4096 Dez 28 19:18 flash
lrwxrwxrwx  1 root root    8 Dez 28 07:50 lib -> /usr/lib
lrwxrwxrwx  1 root root    9 Dez 28 08:09 media -> var/media
drwxr-xr-x  3 root root 4096 Dez 28 07:53 mnt
lrwxrwxrwx  1 root root    9 Dez 29 11:48 opt -> root/.opt
drwxr-xr-x  2 root root 4096 Dez 28 07:53 proc
-rw-r--r--  1 root root  622 Dez 30 11:04 readme
drwxr-xr-x 20 root root 4096 Dez 29 14:23 root
drwxr-xr-x  2 root root 4096 Dez 29 10:27 run
lrwxrwxrwx  1 root root    9 Dez 28 07:50 sbin -> /usr/sbin
drwxr-xr-x 18 root root 4096 Dez 28 08:06 storage
drwxr-xr-x  2 root root 4096 Dez 28 07:53 sys
drwxrwxr-x  3 root root 4096 Dez 28 07:50 system
drwxrwxrwt  9 root root 4096 Dez 28 07:50 tmp
drwxrwxr-x  8 root root 4096 Dez 28 07:50 usr
drwxr-xr-x 11 root root 4096 Dez 28 07:54 var
The root directory must contain a precise copy of the /storage directory. I guess storage can be later on replaced by a symbolic link to root.

4. All symbolic links in these directories are absolute links. They must be replaced by relative links. One example for coreelec/var/lib is given below:

Code: Select all

lrwxrwxrwx 1 root root   29 Dez 29 13:30 libcec.so.6 -> ../../usr/lib/libcec.so.6.0.2
lrwxrwxrwx 1 root root   31 Dez 29 13:30 libMali.so -> ../../usr/lib/libMali.gondul.so
Unfortunately, this is quite some work. However, I will discuss with @tobetter and @odroid, if we can supply an image ready for use or some scripts.

5. The directory extras contains a directory run in which I untared libreelec and samba directory of CoreElec distribution. These directories contain e.g. config files which will be later on pasted into running chroot environment. The libreelec directory contains the file hosts and resolv.conf. The file resolv.conf must be adapted to your requirements. Mine looks like this:

Code: Select all

# Generated by Connection Manager
search fritz.box 
nameserver 192.168.178.1
Please copy the hosts file to coreelec/root/.config and both files (hosts and resolv.conf) to coreelec/etc. This is important for network connection. Instead of your own router you can also use Google's nameserver, e.g. 8.8.4.4.

6. Please generate/edit a file called disp_cap in coreelec/root/.kodi/userdata and copy your favorite screen resolution in it. Mine looks like

Code: Select all

2160p50hz420
This value should correspond to the value set in rc.local. You can also insert more than one resolution separated by newlines.

7. The coreelec/mnt directory includes a sub-directory called emmc. I use this directory to later on mount my UBUNTU root file system (/) on eMMC to the chroot environment.

8. I generated the following script mount_kodi.sh (chmod 775) in my home directory:

Code: Select all

#Insert acceleration module
sudo modprobe amlvideodri

mkdir -p /home/rudi/coreelec/mnt/host
mount -t proc none /home/rudi/coreelec/proc/
mount -o bind /dev /home/rudi/coreelec/dev
mount -o bind /sys /home/rudi/coreelec/sys
mount -o bind / /home/rudi/coreelec/mnt/emmc

# copy some extras before mount
cp -R /home/rudi/coreelec/extras/run/* /run
mount -o bind /run /home/rudi/coreelec/run
The most important part is loading the module amlvideodri which takes care of video acceleration. You can also define a rule in /etc/modules for this. The copy command pastes config files into the mounted /run directory. Please make sure that you do not overwrite your UBUNTU settings (mine were OK). These are additional settings such as required certificates.

9. I also generated an unmount script called umount_kodi.sh (chmod 775) in my ome directory with the following content:

Code: Select all

umount /home/rudi/coreelec/proc/
umount /home/rudi/coreelec/dev
umount /home/rudi/coreelec/sys
umount /home/rudi/coreelec/run
umount /home/rudi/coreelec/mnt/emmc
Both scripts must be run as root.

10. WARNING: Please ALWAYS unmount your CoreElec-distribution in UBUNTU before applying any changes. The risk of damaging your UBUNTU filesystem is high in the mounted directories.

11. You can start KODI as follows:

Code: Select all

sudo chroot /home/rudi/coreelec /usr/lib/kodi/kodi.bin
12. In order to stop KODI I simply use ssh into UBUNTU and pgrep kodi and sudo kill -9 kodi-ID. You also can do this by scripts. I know this is not a smart way but it works.

13. In order to use your remote control within the chroot environment please make sure that lirc-uinput is up and running

Code: Select all

sudo systemctl enable lircd-uinput.service
14. You may want to add an exit button in CoreElec KODI in coreelec/usr/share/kodi/system/advancedsettings.xml

Code: Select all

<showexitbutton>true</showexitbutton>

Current status:
- KODI is running and shows accelerated videos without any problem. I tested this with different formates (UHD, FHD, mkv, ...). Search/skip is fully functional and I did not observe any crash. OSD is very smooth and there is no jitter or anything else.
- Most addons are working. I tested weather, Amazon VOD (you also need to copy libwidevine) for this, radio plugin, mediathek and so on.
- Currently tvheadend is not running. However, I guess I can figure this out.
- Hyperion is running well using hyperion.ng in UBUNTU environment.

As mentioned I will discuss with @tobetter and @odroid how we can ease installation life for others by providing scripts or a complete image or a tar-file for download.

I am already quite happy with the status achieved so far and will continue working on this. Any help is highly appreciated.
Please see this tutorial as a living document. I wrote it from my memory and I may have missed some steps.

Happy New Year to you all,
beta

Edit: Should KODI not show up at the first time, please switch the resolution back and forth using the command

Code: Select all

echo 1080p50hz > /sys/class/display/mode
The 1080p50hz is just an example. Set it to any resolution your TV supports. Afterwards, please switch back to a resolution you want.
Last edited by beta2 on Fri Jan 07, 2022 6:11 pm, edited 3 times in total.
These users thanked the author beta2 for the post (total 2):
istanbulls (Thu Dec 30, 2021 11:42 pm) • odroid (Fri Dec 31, 2021 10:04 am)

User avatar
rooted
Posts: 8985
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 744 times
Been thanked: 421 times
Contact:

Re: N2+ Ubuntu + Kodi + VDR + hyperion.ng

Post by rooted »

Amazing work @beta2, thank you for the excellent work and writeup.
These users thanked the author rooted for the post:
beta2 (Fri Dec 31, 2021 5:56 am)

User avatar
mad_ady
Posts: 10149
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 632 times
Been thanked: 815 times
Contact:

Re: N2+ Ubuntu + Kodi + VDR + hyperion.ng

Post by mad_ady »

Important: Do NOT call this script with an erased bootloader!
The script can dd to a temp file, then check if the file consists of zeros to know if it's a nuked bootloader.

Regarding distribution of kodi - I'm guessing that the modern, elegant way of doing it is a docker image. You can build it from an existing tar and would be self-contained and easy to distribute/update. But some docker build experience is needed.

User avatar
tobetter
Posts: 8845
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 516 times
Been thanked: 1410 times
Contact:

Re: N2+ Ubuntu + Kodi + VDR + hyperion.ng

Post by tobetter »

mad_ady wrote:
Fri Dec 31, 2021 5:12 pm
Important: Do NOT call this script with an erased bootloader!
The script can dd to a temp file, then check if the file consists of zeros to know if it's a nuked bootloader.

Regarding distribution of kodi - I'm guessing that the modern, elegant way of doing it is a docker image. You can build it from an existing tar and would be self-contained and easy to distribute/update. But some docker build experience is needed.
Same here, what I am trying is to build CoreELEC docker image... :)

beta2
Posts: 42
Joined: Sun Nov 28, 2021 8:05 pm
languages_spoken: english, german
ODROIDs: N2+
Has thanked: 2 times
Been thanked: 10 times
Contact:

Re: N2+ Ubuntu + Kodi + VDR + hyperion.ng

Post by beta2 »

Same here, what I am trying is to build CoreELEC docker image... :)
This is a real great idea, @tobetter. I am not sure, of docker image can access accelerated video through container. What do you think?
I also saw that I have no audio when plying Amazon VOD DD+ files. Let's share the work. I will look for audio (I guess that's kernel related) and you will continue with docker...
Last edited by beta2 on Fri Dec 31, 2021 8:25 pm, edited 1 time in total.

User avatar
mad_ady
Posts: 10149
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 632 times
Been thanked: 815 times
Contact:

Re: N2+ Ubuntu + Kodi + VDR + hyperion.ng

Post by mad_ady »

I am not sure, of docker image can access accelerated video through container.
You can expose devices in /dev into the container. You can mount branches of /sys into the container. You can use host-based network stack so you don't have to deal with nat or bridges. You can't load kernel modules from inside the container - you need to do that from host.

beta2
Posts: 42
Joined: Sun Nov 28, 2021 8:05 pm
languages_spoken: english, german
ODROIDs: N2+
Has thanked: 2 times
Been thanked: 10 times
Contact:

Re: N2+ Ubuntu + Kodi + VDR + hyperion.ng

Post by beta2 »

In the meantime there are only 2 problems left to be solved.

1. All addons run fine with the exception of service addons making use of systemd. These services cannot run in chroot environment. I read that this is also true for docker containers. One solution could be to change the service file (http://0pointer.de/blog/projects/changing-roots).

2. I am not able to play DD+ sound (e.g. using Amazon VOD). DD 5.1 play fine. I am not sure where the problem is. My kernel should be fine and support this (at least I guess so). I have no idea whether this is asound.conf related or if I need a patched alsa. If someone has an idea, I will be happy to hear this idea.

@tobetter: Have you thought about problem 1 for docker containers (I do not have any experience with docker).

beta2
Posts: 42
Joined: Sun Nov 28, 2021 8:05 pm
languages_spoken: english, german
ODROIDs: N2+
Has thanked: 2 times
Been thanked: 10 times
Contact:

Re: N2+ Ubuntu + Kodi + VDR + hyperion.ng

Post by beta2 »

I found a solution for the service addons. Because systemd is not working in chroot environment, these services can be started manually.

For tvheadend the following steps are required:

1. Check, if directory coreelec/root/.hts/tvheadend exists. If not, please make this directory.

Code: Select all

mkdir -p coreelec/root/.hts/tvheadend
2. Copy tvheadend configuration files into this directory.

Code: Select all

cp -R coreelec/root/.kodi/userdata/addon_data/service.tvheadend43/* coreelec/root/.hts/tvheadend
Instead of copy you can probably also set a symbolic link from service.tvheadend43 to tvheadend.

3. Start tvheadend service manually

Code: Select all

sudo chroot /home/rudi/coreelec /root/.kodi/addons/service.tvheadend43/bin/tvheadend
Please make sure to kill this service once you have quit KODI.

Others addon services can be started in a similar way.
These users thanked the author beta2 for the post:
odroid (Mon Jan 03, 2022 9:13 am)

beta2
Posts: 42
Joined: Sun Nov 28, 2021 8:05 pm
languages_spoken: english, german
ODROIDs: N2+
Has thanked: 2 times
Been thanked: 10 times
Contact:

Re: N2+ Ubuntu + Kodi + VDR + hyperion.ng

Post by beta2 »

I changed my start script for CoreElec Kodi slightly:

Code: Select all

service lircd-uinput start
chroot /home/rudi/coreelec /root/.kodi/addons/service.tvheadend43/bin/tvheadend &
chroot /home/rudi/coreelec /usr/lib/kodi/kodi.bin &
Script needs to be started as root (sudo).

lircd-uinput is not required for VDR as it will switch to visible terminal depending on keypress. Therefore, I switch it off in VDR start-script and reactivate it in KODI start script. Both, tvheadend and kodi are started in background. Info and error messages can be seen as terminal output. If you do not like this you may want to redirect output to /dev/null. Moreover, KODI can be closed by the EXIT button (please see my previous post regarding adding an exit button.

The only remaining problem is DD+ audio format. To my opinion it doesn't seem to be kernel related. I guess it's a ALSA configuration or a patched alsa-lib. I also tried @tobetters odroid-alsa package without success. Contrary to real CoreElec I do not see the output device "AML-AUGESOUND Multi Ch PCM" which is according to KODI source code related to "surround71" entry for ALSA.

@tobetter: Do you have any helpful idea? How are you progressing with docker CoreElec container?

So far I am quite happy with my KODIBUNTU.

beta2
Posts: 42
Joined: Sun Nov 28, 2021 8:05 pm
languages_spoken: english, german
ODROIDs: N2+
Has thanked: 2 times
Been thanked: 10 times
Contact:

Re: N2+ Ubuntu + Kodi + VDR + hyperion.ng

Post by beta2 »

I have another tutorial for those who want to use crazycat external drivers for USB TV sticks which are not supported by kernel internally.

You need to compile all V4L related kernel stuff as external modules. For my kernel (https://github.com/beta68/linux) you can use the attached config file (
config_external_v4l_drivers.gz
(39.29 KiB) Downloaded 5 times
).

With this config file you must load

Code: Select all

sudo modprobe amlcm
sudo modprobe videobuf-res
sudo modprobe amlvideodri
for KODI in chroot environment.

Important note: Crazycat drivers disable KODI in chroot due to 2 unresolved symbols in videobuf-res. However, those who do not need this can download crazycat's drivers:

Code: Select all

git clone -b extra https://github.com/crazycat69/media_build
Build and install these drivers (./build, sudo make install).

This will allow to use USB TV boxes such as TBS ones (e. g. TBS5580).

Edit: I forgot to mention that you need to comment out

Code: Select all

-Werror=incompatible-pointer-types
in kernel Makefile.

Have fun,
beta
These users thanked the author beta2 for the post:
odroid (Thu Jan 06, 2022 9:20 am)

beta2
Posts: 42
Joined: Sun Nov 28, 2021 8:05 pm
languages_spoken: english, german
ODROIDs: N2+
Has thanked: 2 times
Been thanked: 10 times
Contact:

Re: N2+ Ubuntu + Kodi + VDR + hyperion.ng

Post by beta2 »

I just would like to give you a short update. I am currently programming a shell script, which needs an CoreElec image (e.g. CoreELEC-Amlogic-ng.arm-19.4-Matrix_rc1-Odroid_N2.img) as an input and will build a complete CoreElec chroot environment fully automatically. This also includes mount-, umount- and start-scripts for KODI. The script simplifies the KODIBUNTU installation process a lot.

Screen resolution is read from kernel setting after boot (I only tested 4K so far). I only need to program a method to implement correct nameserver in some files.
Once I am ready I will host this script in my Github. It needs to be run as root and will not touch any of your files.

On my odroid this script is already running very well with the latest CoreElec image.

Please stay tuned. I will provide a step-by-step tutorial in the following days.

beta

User avatar
rooted
Posts: 8985
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 744 times
Been thanked: 421 times
Contact:

Re: N2+ Ubuntu + Kodi + VDR + hyperion.ng

Post by rooted »

Looking forward to seeing the next step.

beta2
Posts: 42
Joined: Sun Nov 28, 2021 8:05 pm
languages_spoken: english, german
ODROIDs: N2+
Has thanked: 2 times
Been thanked: 10 times
Contact:

Re: N2+ Ubuntu + Kodi + VDR + hyperion.ng

Post by beta2 »

Here is the tutorial for running accelerated KODI version from CoreElec (CE) in Ubuntu.

1. You need to install my kernel which you can find at https://github.com/beta68/linux

Code: Select all

git clone https://github.com/beta68/linux
cd linux
make -j6
sudo make modules_install
sudo cp arch/arm64/boot/Image.gz /media/boot
sudo su
cp arch/arm64/boot/dts/amlogic/*n2*.dtb media/boot/amlogic
You can also use the file

Code: Select all

config_external_v4l_drivers
as

Code: Select all

.config
This makes sense when using crazycat's drivers. However, installation of crazycat's drivers will disable video acceleration currently.

2. Please download the CE chroot installation script from https://github.com/beta68/ce_chroot

Code: Select all

git clone https://github.com/beta68/ce_chroot
3. Please download the CE installation image from https://coreelec.org
I used the N2(+) image (4GB). My script should also work with 2GB version, because overlay files are not used.

4. Copy this image to the directory from step 2. My directory is

Code: Select all

/home/rudi/ce_chroot
5. Make the script executable

Code: Select all

chmod 775 ./get_coreelec_chroot.sh
6. The directory should at least contain the files

Code: Select all

-rwxr--r-- 1 rudi rudi 575668224 Jan 13 21:38 CoreELEC-Amlogic-ng.arm-19.4-Matrix_rc1-Odroid_N2.img.gz
-rwxr-xr-x 1 rudi rudi    227940 Jan 13 21:19 get_coreelec_chroot.sh
7. Edit the script and edit nameserver/ip

Code: Select all

nameservername="fritz.box"
nameserverip="127.0.0.53"
nameserverip2="192.168.178.1"
You can find these settings in

Code: Select all

/etc/hosts
and

Code: Select all

/etc/resolv.conf
8. Execute the script as root:

Code: Select all

sudo ./get_coreelec_chroot.sh
9. Afterwards your directory will look like:

Code: Select all

drwxr-xr-x 14 root root      4096 Jan 13 22:05 ce
-rwxr--r--  1 rudi rudi 575668224 Jan 13 22:05 CoreELEC-Amlogic-ng.arm-19.4-Matrix_rc1-Odroid_N2.img
-rwxr-xr-x  1 rudi rudi    227940 Jan 13 21:19 get_coreelec_chroot.sh
-rwxrwxr-x  1 root root       477 Jan 13 22:05 mount_kodi.sh
-rwxrwxr-x  1 root root       158 Jan 13 22:05 start_kodi.sh
-rwxrwxr-x  1 root root       167 Jan 13 22:05 umount_kodi.sh
The sub-directory ce includes the complete CE chroot environment. At this point you can delete the CE image.

Important note: Please do not change the name of the script. It contains several certificates and name needs to be as is during installation.

10. Start KODI as follows:

Code: Select all

sudo ./mount_kodi.sh
sudo ./start_kodi.sh
11. Please configure CE KODI according to your requirements. Please do not change the name of the distribution (CoreElec), because otherwise name service may not work. Please disable samba (you can use samba of your UBUNTU). Start of tvheadend is commented out in start script. Please enable it, if required after installation of tvheadend service.

12. Please use umount script after quitting KODI.

Code: Select all

sudo ./umount_kodi.sh
VERY IMPORTANT NOTE: Please unmount KODI directories e.g. before deleting ce subdirectory. If your root fs is still mounted, a delete of ce directory as root will delete your root fs.

13. hyperion will work from UBUNTU host with my kernel. There is no need to install hyperion-addon in CE.

The script does not yet automatically detect nameserver and nameserver-ip. Please edit according to your requirements. Display resolution should be detected automatically. If not, please edit script and use your favorite resolution.

Have fun,
beta
Last edited by beta2 on Fri Jan 14, 2022 3:02 pm, edited 7 times in total.
These users thanked the author beta2 for the post:
odroid (Fri Jan 14, 2022 9:22 am)

User avatar
rooted
Posts: 8985
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 744 times
Been thanked: 421 times
Contact:

Re: N2+ Ubuntu + Kodi + VDR + hyperion.ng

Post by rooted »

Great instructions, your GitHub links both have a period at the end which breaks them.

beta2
Posts: 42
Joined: Sun Nov 28, 2021 8:05 pm
languages_spoken: english, german
ODROIDs: N2+
Has thanked: 2 times
Been thanked: 10 times
Contact:

Re: N2+ Ubuntu + Kodi + VDR + hyperion.ng

Post by beta2 »

I corrected the links. Thank you for letting me know.

User avatar
rooted
Posts: 8985
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 744 times
Been thanked: 421 times
Contact:

Re: N2+ Ubuntu + Kodi + VDR + hyperion.ng

Post by rooted »

Thank you for all this, I've got a ton of pressure on me currently so I'm unable to try it but I will.

Post Reply

Return to “Ubuntu”

Who is online

Users browsing this forum: No registered users and 1 guest