Hi all,
since I found, that Debian chroot on OpenELEC is not the best solution, I tried to do it vice-versa. This is what I needed to do.
Compile mali modules
In case you are running following kernel, you can download precompiled modules here and skip this chapter (if you trust me :).
Linux armbian 3.4.113-sun8i #28 SMP PREEMPT Thu Feb 2 02:01:28 CET 2017 armv7l armv7l armv7l GNU/Linux
Otherwise:
- Clone jernejs H3 linux source
git clone --depth=1 https://github.com/jernejsk/linux jernejsk-linux Cloning into 'jernejsk-linux'... remote: Counting objects: 44430, done. remote: Compressing objects: 100% (39536/39536), done. remote: Total 44430 (delta 4436), reused 44091 (delta 4364), pack-reused 0 Receiving objects: 100% (44430/44430), 126.04 MiB | 2.76 MiB/s, done. Resolving deltas: 100% (4436/4436), done. Checking connectivity... done. Checking out files: 100% (42891/42891), done.
- cd to ump folder
cd jernejsk-linux/drivers/gpu/mali/ump/
- comment out CROSS_COMPILE in Makefile
#export CROSS_COMPILE ?= $(call check_cc2, arm-linux-gnueabi-gcc, arm-linux-gnueabi-, arm-none-linux-gnueabi-)
- make
KDIR=/lib/modules/$(uname -r)/build BUILD=release make make -C /lib/modules/3.4.113-sun8i/build M=/mnt/backup/jernejsk-linux/drivers/gpu/mali/ump modules make[1]: Entering directory '/usr/src/linux-headers-3.4.113-sun8i' CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/ump/common/ump_kernel_common.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/ump/common/ump_kernel_descriptor_mapping.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/ump/common/ump_kernel_api.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/ump/common/ump_kernel_ref_drv.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/ump/linux/ump_kernel_linux.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/ump/linux/ump_kernel_memory_backend_os.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/ump/linux/ump_kernel_memory_backend_dedicated.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/ump/linux/ump_memory_backend.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/ump/linux/ump_ukk_wrappers.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/ump/linux/ump_ukk_ref_wrappers.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/ump/linux/ump_osk_atomics.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/ump/linux/ump_osk_low_level_mem.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/ump/linux/ump_osk_misc.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/ump/linux/ump_kernel_random_mapping.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/ump/../mali/linux/mali_osk_atomics.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/ump/../mali/linux/mali_osk_locks.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/ump/../mali/linux/mali_osk_memory.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/ump/../mali/linux/mali_osk_math.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/ump/../mali/linux/mali_osk_misc.o LD [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/ump/ump.o Building modules, stage 2. MODPOST 1 modules CC /mnt/backup/jernejsk-linux/drivers/gpu/mali/ump/ump.mod.o LD [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/ump/ump.ko make[1]: Leaving directory '/usr/src/linux-headers-3.4.113-sun8i'
- copy ump.ko to modules
cp ump.ko /lib/modules/$(uname -r)/kernel/drivers/gpu/mali/ump/ump.ko
- cd to mali
cd ../mali/
- comment out CROSS_COMPILE in Makefile
#export CROSS_COMPILE ?= $(call check_cc2, arm-linux-gnueabi-gcc, arm-linux-gnueabi-, arm-none-linux-gnueabi-)
- make
KDIR=/lib/modules/$(uname -r)/build USING_UMP=1 BUILD=release make Makefile:76: /mnt/backup/jernejsk-linux/drivers/gpu/mali/ump/Module.symvers make ARCH=arm -C /lib/modules/3.4.113-sun8i/build M=/mnt/backup/jernejsk-linux/drivers/gpu/mali/mali modules make[1]: Entering directory '/usr/src/linux-headers-3.4.113-sun8i' CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/linux/mali_osk_atomics.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/linux/mali_osk_irq.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/linux/mali_osk_wq.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/linux/mali_osk_locks.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/linux/mali_osk_wait_queue.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/linux/mali_osk_low_level_mem.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/linux/mali_osk_math.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/linux/mali_osk_memory.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/linux/mali_osk_misc.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/linux/mali_osk_mali.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/linux/mali_osk_notification.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/linux/mali_osk_time.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/linux/mali_osk_timers.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/linux/mali_memory.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/linux/mali_memory_os_alloc.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/linux/mali_memory_external.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/linux/mali_memory_block_alloc.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/linux/mali_ukk_mem.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/linux/mali_ukk_gp.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/linux/mali_ukk_pp.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/linux/mali_ukk_core.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/linux/mali_ukk_soft_job.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/linux/mali_ukk_timeline.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/linux/mali_platform.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/common/mali_kernel_core.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/linux/mali_kernel_linux.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/common/mali_kernel_descriptor_mapping.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/common/mali_session.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/linux/mali_device_pause_resume.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/common/mali_kernel_vsync.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/linux/mali_ukk_vsync.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/linux/mali_kernel_sysfs.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/common/mali_mmu.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/common/mali_mmu_page_directory.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/common/mali_mem_validation.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/common/mali_hw_core.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/common/mali_gp.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/common/mali_pp.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/common/mali_pp_job.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/common/mali_gp_job.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/common/mali_soft_job.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/common/mali_scheduler.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/common/mali_gp_scheduler.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/common/mali_pp_scheduler.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/common/mali_group.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/common/mali_dlbu.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/common/mali_broadcast.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/common/mali_pm.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/common/mali_pmu.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/common/mali_user_settings_db.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/common/mali_kernel_utilization.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/common/mali_l2_cache.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/common/mali_dma.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/common/mali_timeline.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/common/mali_timeline_fence_wait.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/common/mali_timeline_sync_fence.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/common/mali_spinlock_reentrant.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/common/mali_pm_domain.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/linux/mali_osk_pm.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/linux/mali_pmu_power_up_down.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/__malidrv_build_info.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/linux/mali_ukk_profiling.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/linux/mali_osk_profiling.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/linux/mali_memory_dma_buf.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/linux/mali_sync.o CC [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/linux/mali_memory_ump.o LD [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/mali.o Building modules, stage 2. MODPOST 1 modules CC /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/mali.mod.o LD [M] /mnt/backup/jernejsk-linux/drivers/gpu/mali/mali/mali.ko make[1]: Leaving directory '/usr/src/linux-headers-3.4.113-sun8i'
- copy mali.ko to modules
cp mali.ko /lib/modules/$(uname -r)/kernel/drivers/gpu/mali/mali/mali.ko
Installing OpenELEC
- If you haven’t compiled your own mali modules, download this zip and copy mali.ko and ump.ko to modules
cp mali.ko /lib/modules/$(uname -r)/kernel/drivers/gpu/mali/mali/mali.ko cp ump.ko /lib/modules/$(uname -r)/kernel/drivers/gpu/mali/ump/ump.ko
- Download and untar OpenELEC .tar upgrade file onto your device
root@orangepipc:~# wget https://down.nu/updates/OpenELEC-H3.arm-7.0-devel-20170221190834-r23330-g94644893c.tar --2017-03-04 12:44:48-- https://down.nu/updates/OpenELEC-H3.arm-7.0-devel-20170221190834-r23330-g94644893c.tar Resolving down.nu (down.nu)... 138.68.124.4, 2a03:b0c0:3:d0::1231:4001 Connecting to down.nu (down.nu)|138.68.124.4|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 144998400 (138M) [application/x-tar] Saving to: ‘OpenELEC-H3.arm-7.0-devel-20170221190834-r23330-g94644893c.tar’ OpenELEC-H3.arm-7.0-devel-20170221190834-r 100%[========================================================================================>] 138.28M 8.13MB/s in 22s 2017-03-04 12:45:11 (6.15 MB/s) - ‘OpenELEC-H3.arm-7.0-devel-20170221190834-r23330-g94644893c.tar’ saved [144998400/144998400] root@orangepipc:~# tar -xf OpenELEC-H3.arm-7.0-devel-*.tar
- Move OE root to /opt and create moutpoint
root@orangepipc:~# mv OpenELEC-H3.arm-7.0-devel-*/target/SYSTEM /opt/openelec-root root@orangepipc:~# mkdir /opt/openelec
- Set video resolution
root@orangepipc:~# h3disp -m 1080p60 Now trying to patch script.bin with your settings. Successfully finished. Please reboot for changes to take effect
- Install pulseaudio
root@orangepipc:~# apt install pulseaudio
- Create home for kodi
root@orangepipc:~# mkdir /storage
- Create chroot startup file /storage/start.sh
mount -t devtmpfs /dev /dev mount -t proc /proc /proc mount -t devtmpfs /dev /dev mount -t sysfs /sys /sys mkdir /run/connman/ echo "nameserver 8.8.8.8" > /run/connman/resolv.conf export HOME=/storage /usr/lib/kodi/kodi.sh --standalone -fs &
- Create chroot starter file /root/kodi-start.sh
mount -o loop /opt/openelec-root /opt/openelec mount -o bind /storage /opt/openelec/storage mount -o bind /var /opt/openelec/var mount -o bind /run /opt/openelec/run modprobe mali pulseaudio --system --daemonize chroot /opt/openelec/ /storage/start.sh
- Make them both executable
root@orangepipc:~# chmod +x /storage/start.sh root@orangepipc:~# chmod +x /root/kodi-start.sh
- Edit /etc/rc.local
# disable console cursor blinking echo 0 > /sys/class/graphics/fbcon/cursor_blink /root/kodi-start.sh & exit 0
- Disable kernel messages on screen (they sometimes mess with kodi output). Set console=serial into /boot/armbianEnv.txt
- Reboot
And that’s it. HW accelerated kodi should start after boot.
Enjoy!
i have no USB…
I have some…
no wifi either, had it working when installing Armbian
Please see updated howto. It no longer uses OpenELECs kernel.
Please write that this method works only on armbian desktop, on armbian server it hangs on kernel.
I use it with armbian server.
Thank you, very detailed instructions, works ok!
Some questions: is it safe to do upgrades via apt-get, even when there is a new Armbian kernel available?
And, how to enable Samba sharing?
You can always replace the kernel after upgrading.
apt install samba ?
Thanks, but what do you mean “replace the kernel after upgrading”?
And, after “apt install samba”, the setup/configuration is done in Openelec or in the native Armbian system?
* step 5 replaces kernel
* in native armbian, you can’t do anything in openelec since it’s mounted read-only
having a problem here. it shows “starting Kernel” than the screen goes black for a minute and than reboots. rinse and repeat.
Have tried many SDcards and redone the image many times.
boxes is a BX2(H3 board)
anyone have any ideas to fix this?
I’ve had something like that while trying to install openelec on a Opi (A20)… kernel was not starting, machid error IIRC.
Please see updated howto. It no longer uses OpenELECs kernel.
Try your mali.ko, but:
# modprobe mali
modprobe: ERROR: could not insert ‘mali’: Exec format error
my system:
# uname -a
Linux armbian 3.4.113-sun8i #18 SMP PREEMPT Thu Jun 15 02:16:06 CEST 2017 armv7l armv7l armv7l GNU/Linux
Then you have to compile…
ok, can I do it on the Opi PC?
what packages do i need in order to compile?
Well, many thanks for GREAT help!!
how to start openelec??? /opt/openelec-root successfully mount on /opt/openelec but kodi unable start
Could you do an image setup instead? = Win32disk imager ..so downloan then install..and thats it
No, sorry, I’m not going to maintain this.
Zdravím, až nyní jsem si všiml, že můžu psát česky…Každopádně bylo by možné udělat již hotový image ke stažení. A instalace by se provedla klasicky přes etcher/win32disk imager. …