Odroid C2 with kernel 3.16?

Moderators: mdrjr, odroid

Odroid C2 with kernel 3.16?

Unread postby mh-g » Thu Sep 28, 2017 12:29 am

Are there any plans to release an Ubuntu image based on kernel 3.16 or later? I want to use it with a TechnoTrend TVStick CT2-4400, which requires kernel 3.16 or newer.
mh-g
 
Posts: 16
Joined: Wed Sep 27, 2017 3:01 am
languages_spoken: english,german

Re: Odroid C2 with kernel 3.16?

Unread postby mad_ady » Thu Sep 28, 2017 1:59 am

You can try running kernel 3.14 with media_build which pulls tv tuner drivers from mainline kernels, or you can use kernel 4.14, but without HDMI, GPU, VPU.
User avatar
mad_ady
 
Posts: 3240
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2

Re: Odroid C2 with kernel 3.16?

Unread postby igorpec » Thu Sep 28, 2017 5:44 am

Armbian with 4.13.x (https://dl.armbian.com/odroidc2/nightly/) has HDMI out, the desktop works fine but USB does not show up, must be some misconfiguration in DT ... Logs: http://sprunge.us/SYEb

There are a bunch of patches on top of the mainline kernel: https://github.com/armbian/build/tree/m ... oidc2-next Some other things are also missing but it should be good enough for this particular case (when/if USB is enabled).
ARMBIAN - follow on Twitter
linux for ARM development boards with user friendly development tools
User avatar
igorpec
 
Posts: 132
Joined: Sat Dec 12, 2015 4:34 pm
languages_spoken: english,german,slovene
ODROIDs: XU4, HC1, C2, C1+

Re: Odroid C2 with kernel 3.16?

Unread postby igorpec » Fri Sep 29, 2017 3:14 am

but USB does not show up


Actually, USB also works. http://sprunge.us/NNSF
ARMBIAN - follow on Twitter
linux for ARM development boards with user friendly development tools
User avatar
igorpec
 
Posts: 132
Joined: Sat Dec 12, 2015 4:34 pm
languages_spoken: english,german,slovene
ODROIDs: XU4, HC1, C2, C1+

Re: Odroid C2 with kernel 3.16?

Unread postby mh-g » Fri Sep 29, 2017 3:25 am

Thanks for the suggestions. The intended use would be to run a DVB-T2 (German HEVC-variant) receiver/player. Thus, I need to get the TVStick CT2-4400 up and running (it connects via USB), HDMI working (video and audio), and the HEVC hardware decoder used by the video players.

Has anyone tried to do this or similar stuff? I am a little hesitant to start this from scratch, having lost a lot of hair and time trying to do this with a BananaPi M2+. (SW support for the Bananas really sucks ... media_build was a hopeless case without kernel sources ...)
mh-g
 
Posts: 16
Joined: Wed Sep 27, 2017 3:01 am
languages_spoken: english,german

Re: Odroid C2 with kernel 3.16?

Unread postby igorpec » Fri Sep 29, 2017 3:42 am

HEVC hardware decoder used by the video players.


This will be the problem. It's not developed: http://linux-meson.com/doku.php and even current functions are not really on production level so thinking on anything else than server/light desktop is a waste of time at the moment.

trying to do this with a BananaPi M2+


Armbian desktop with video acceleration works decently, there is Openelec which is in better shape for playing video (ofc no HEVC). Mainline kernel support for H3 chip is in many areas further than Amlogic, there is working opensource video decoding and 3D (MALI) support was just announced. It's not that bad, except company who makes those boards. Their support sucks. I agree on that.
ARMBIAN - follow on Twitter
linux for ARM development boards with user friendly development tools
User avatar
igorpec
 
Posts: 132
Joined: Sat Dec 12, 2015 4:34 pm
languages_spoken: english,german,slovene
ODROIDs: XU4, HC1, C2, C1+

Re: Odroid C2 with kernel 3.16?

Unread postby mh-g » Sat Sep 30, 2017 1:09 pm

@mad_ady: The media_build process is explicitly referenced on the LinuxTV site (https://www.linuxtv.org/wiki/index.php/ ... k_CT2-4400), so I may give it a try. Kernel sources for the "* Ubuntu 16.04 or Android 6.0 Marshmallow based on Kernel 3.14LTS" as mentioned on the Odroid C2 product page are available for Ubuntu?
mh-g
 
Posts: 16
Joined: Wed Sep 27, 2017 3:01 am
languages_spoken: english,german

Re: Odroid C2 with kernel 3.16?

Unread postby mad_ady » Sat Sep 30, 2017 1:13 pm

You can get them either from github (hardkernel/linux repo, odroidc2-3.14.x branch), or by installing the kernel-source-c2 package (if I remember correctly). There's also a media_build thread for c2 if you look around
User avatar
mad_ady
 
Posts: 3240
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2

Re: Odroid C2 with kernel 3.16?

Unread postby mh-g » Fri Dec 29, 2017 8:45 pm

All I found is a LibreELEC for C2 with media_build (by wrxtasy), but it is unfortunately only 32 bit.

I am currently trying to compile media_build for the C2, but the patches don't work all the way back to 3.14.
mh-g
 
Posts: 16
Joined: Wed Sep 27, 2017 3:01 am
languages_spoken: english,german

media_build 64bit for Odroid C2

Unread postby mh-g » Sat Dec 30, 2017 3:54 pm

I got a little bit ahead. Seems like just the day before someone modified the directory structure of some code. I went back two days and everything was OK: Instead of using LATEST in linux/Makefile, I manually fixed this to linux-media-2017-12-22-9eb124fe796c.tar.bz2.

Furthermore I installed linux-headers-3.14.79-116 via synaptic and did
Code: Select all
$ sudo mkdir /lib/modules/3.14.79-116/build
$ sudo ln -s /usr/src/linux-headers-3.14.79-116/.config /lib/modules/3.14.79-116/build/
$ sudo ln -s /usr/src/linux-headers-3.14.79-116/include/ /lib/modules/3.14.79-116/build/include


Right now I am stuck at making the modules target:
Code: Select all
make -C /lib/modules/3.14.79-116/build SUBDIRS=/home/odroid/ct2-4400/media_build/v4l  modules
make[2]: Entering directory '/lib/modules/3.14.79-116/build'
make[2]: *** No rule to make target 'modules'.  Stop.


Any ideas what may be wrong? Reading Makefiles is not really my strength ...

All this happened directly on the Odroid C2. I have another machine (Ubuntu 17.10 amd64) that I can use to cross-compile for the Odroid, but cancelled my tries because of not knowing how to tell the media_build package to do a cross compile. I do not have enough space to do a full kernel compile on the Odroid C2 itself (could be fixed though).
mh-g
 
Posts: 16
Joined: Wed Sep 27, 2017 3:01 am
languages_spoken: english,german

Re: Odroid C2 with kernel 3.16?

Unread postby mad_ady » Sat Dec 30, 2017 4:56 pm

Not sure if media_build has a modules target. I remember you could run make menuconfig in the media_build directory and run make/make install afterwards. Haven;t played with it in ~2years though.
User avatar
mad_ady
 
Posts: 3240
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2

Re: Odroid C2 with kernel 3.16?

Unread postby crashoverride » Sat Dec 30, 2017 6:50 pm

mh-g wrote:Any ideas what may be wrong?

See also viewtopic.php?t=20302&p=144848
crashoverride
 
Posts: 3254
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Odroid C2 with kernel 3.16?

Unread postby mh-g » Sat Dec 30, 2017 11:59 pm

Thanks for the suggestions. However, make menuconfig does not work in my media_build directory. Are there special locations on where to put media_build and the Kernel sources? Currently, I have them in separate places (/home/odroid/ct2-4400/media_build and /mnt/qnap-odroid/linux), and manually added some symlinks to /lib/modules/3.14.79-116/ as mentioned above. The exact nature of /lib/modules/3.14.79-116/ is unclear to me. Looks more like source than libs. But many things are missing, like Makefile:

Code: Select all
odroid@media:~/ct2-4400/media_build$ make menuconfig
make -C /home/odroid/ct2-4400/media_build/v4l menuconfig
make[1]: Entering directory '/home/odroid/ct2-4400/media_build/v4l'
make -C /lib/modules/3.14.79-116/build -f /home/odroid/ct2-4400/media_build/v4l/Makefile.kernel config-targets=1 mixed-targets=0 dot-config=0 SRCDIR=/lib/modules/3.14.79-116/build v4l-mconf
make[2]: Entering directory '/lib/modules/3.14.79-116/build'
/home/odroid/ct2-4400/media_build/v4l/Makefile.kernel:23: /lib/modules/3.14.79-116/build/Makefile: No such file or directory
make[2]: *** No rule to make target '/lib/modules/3.14.79-116/build/Makefile'.  Stop.

What else do I need to link into there?
mh-g
 
Posts: 16
Joined: Wed Sep 27, 2017 3:01 am
languages_spoken: english,german

Re: Odroid C2 with kernel 3.16?

Unread postby crashoverride » Sun Dec 31, 2017 9:07 am

Start with a clean, freshly flashed Ubuntu 16.04 image on a spare SD card/eMMC (this ensures a state where others can provide assistance).

After the image is updated to current (apt update; apt upgrade), clone, compile and install the kernel (copy the kernel to /media/boot and 'sudo make modules_install'). Note the required changes to V4L from the link I posted. This is mandatory. Without this step, media_build will not work. This also sets up the required links in /lib/modules.

Follow the procedure in the link I provided ensuring you are using the commit mentioned in the post. Newer commits are known to fail.

[edit]
I forgot to mention that you must reboot after you install the newly compiled kernel. The media_build scripts use 'uname' to determine kernel version and, thus, lib/modules path information. Without rebooting, this information will be incorrect.
crashoverride
 
Posts: 3254
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Odroid C2 with kernel 3.16?

Unread postby mh-g » Tue Jan 02, 2018 4:39 am

This is what I did and it still fails:

Flash https://dn.odroid.com/S905/Ubuntu/ubunt ... 927.img.xz to a 16 GB SD card

Update system to up-to-date status and reboot:

Code: Select all
odroid@odroid64:~$ sudo apt-get update
odroid@odroid64:~$ sudo apt-get upgrade
odroid@odroid64:~$ sudo reboot -f now

Check for dependencies to VIDEO_V4L2:

Code: Select all
odroid@odroid64:/lib/modules/3.14.79-116/kernel$ grep -r "select VIDEO_V4L2" *
odroid@odroid64:/lib/modules/3.14.79-116/kernel$


No dependencies?!

Continue at contains of posting from Dec 18, 2016 4:50 pm
Clone and compile: https://wiki.odroid.com/odroid-c2/softw ... ing_kernel

Code: Select all
odroid@odroid64:~/linux$ sudo apt-get install libncurses5-dev
odroid@odroid64:~/linux$ make menuconfig


Continue at contains of posting from Dec 18, 2016 4:50 pm
Clone and compile: https://wiki.odroid.com/odroid-c2/softw ... ing_kernel

Modified config according to Step 2a)

Build kernel, install and reboot
Code: Select all
odroid@odroid64:~/linux$ make -j4
odroid@odroid64:~/linux$ sudo cp -f arch/arm64/boot/Image arch/arm64/boot/dts/meson64_odroidc2.dtb /media/boot/
odroid@odroid64:~/linux$ sudo reboot -f now


Clone media_build, but with patched linux/Makefile (linux-media-2017-12-22-9eb124fe796c.tar.bz2 instead of LATEST)
Code: Select all
odroid@odroid64:~$ git clone git://linuxtv.org/media_build.git
odroid@odroid64:~$ cd media_build/


Build fails:
Code: Select all
[...]
Patched drivers/media/rc/rc-main.c
make[2]: Leaving directory '/home/odroid/media_build/linux'
./scripts/make_kconfig.pl /lib/modules/3.14.79+/build /lib/modules/3.14.79+/build 1
Preparing to compile for kernel version 3.14.79
File not found: /lib/modules/3.14.79+/build/.config at ./scripts/make_kconfig.pl line 33, <IN> line 4.
Makefile:374: recipe for target 'allyesconfig' failed
make[1]: *** [allyesconfig] Error 2
make[1]: Leaving directory '/home/odroid/media_build/v4l'
Makefile:26: recipe for target 'allyesconfig' failed
make: *** [allyesconfig] Error 2
can't select all drivers at ./build line 525


I also tried the specific commit from git checkout a9c762b78433ab5aecb8131b3905d11a906d1ae8, but it did not work either.

Should I try an older image?
mh-g
 
Posts: 16
Joined: Wed Sep 27, 2017 3:01 am
languages_spoken: english,german

Re: Odroid C2 with kernel 3.16?

Unread postby crashoverride » Tue Jan 02, 2018 6:39 am

After the kernel is cloned and configured, you need to run "make menuconfig". Then disable the Amlogic modules that depend on V4L:
The Amlogic camera driver, video capture driver, and ION video driver need to be disabled.


After the modules are disabled, then V4L can be set to "module":
This will allow you to set the V4L module to 'm' to make it a module.


Then compile and install the new kernel:
Code: Select all
sudo cp -f arch/arm64/boot/Image arch/arm64/boot/dts/meson64_odroidc2.dtb /media/boot/

The above command only copies the device tree. You also need to copy the kernel file and install modules (sudo make modules_install).
crashoverride
 
Posts: 3254
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Odroid C2 with kernel 3.16?

Unread postby mh-g » Tue Jan 02, 2018 7:01 pm

Thanks, crashoverride for all the help and good suggestions. Unfortunately, they did not lead me to a success. After some further tweaking, I got a compiled module, installed it, loaded it, but it did not recognize my CT2-4400 DVB-T stick. I spent way, way too much time on this topic and just decided to stop it. :-(

If somebody ever gets media_build compiled with the Odroid 64 bit kernel, I would really like to know and download that image.
mh-g
 
Posts: 16
Joined: Wed Sep 27, 2017 3:01 am
languages_spoken: english,german

Re: Odroid C2 with kernel 3.16?

Unread postby mad_ady » Tue Jan 02, 2018 7:36 pm

Are you sure the module loads correctly? Do you get any messages in dmesg about it? It might need either a firmware file, or maybe adding your card's vid:pid to the driver code.
User avatar
mad_ady
 
Posts: 3240
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2

Re: Odroid C2 with kernel 3.16?

Unread postby meveric » Tue Jan 02, 2018 7:58 pm

mh-g wrote:If somebody ever gets media_build compiled with the Odroid 64 bit kernel, I would really like to know and download that image.

It's available on my Debian images. viewtopic.php?p=195974#p195974
If your driver is included I can't tell, as I'm only using Kernel 3.14 and that one does not support all DVB devices included in the media-build (but most of em).
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.
User avatar
meveric
 
Posts: 8220
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1


Return to Issues

Who is online

Users browsing this forum: No registered users and 5 guests