media build problem - linux headers?

Post Reply
User avatar
JimmyS
Posts: 54
Joined: Sun Apr 22, 2018 9:37 pm
languages_spoken: english
ODROIDs: C2
Contact:

media build problem - linux headers?

Unread post by JimmyS » Mon Dec 03, 2018 3:58 pm

Hello,

I cant compile media build (because DVB Tuner) on Odroid C2. I think, its because some problem with linux headers - version (which is needed for https://www.linuxtv.org/wiki/index.php/ ... ce_Drivers)

- Minimal image: Ubuntu 16.04 wget https://odroid.in/ubuntu_16.04lts/ubunt ... 005.img.xz]
- apt-get update && apt-get dist-upgrade
- reboot now
- uname -a: Linux odroid64 3.14.79-116 #1 SMP PREEMPT Tue Sep 26 01:19:06 BRT 2017 aarch64 aarch64 aarch64 GNU/Linux
- apt-get install linux-headers-$(uname -r)
- apt-get git install patch patchutils libproc-processtable-perl
- git clone --depth=1 http://linuxtv.org/media_build.git

Code: Select all

make[2]: Leaving directory '/root/media_build/linux'
./scripts/make_kconfig.pl /lib/modules/3.14.79-116/build /lib/modules/3.14.79-116/build 1
Preparing to compile for kernel version 3.14.79
File not found: /lib/modules/3.14.79-116/build/.config at ./scripts/make_kconfig.pl line 33, <IN> line 4.
Makefile:378: recipe for target 'allyesconfig' failed
make[1]: *** [allyesconfig] Error 2
make[1]: Leaving directory '/root/media_build/v4l'
Makefile:26: recipe for target 'allyesconfig' failed
make: *** [allyesconfig] Error 2
can't select all drivers at ./build line 525

Code: Select all

root@odroid64:~/media_build# ls /lib/modules/3.14.79-116/
kernel         modules.alias.bin  modules.builtin.bin  modules.dep.bin  modules.order    modules.symbols
modules.alias  modules.builtin    modules.dep          modules.devname  modules.softdep  modules.symbols.bin
Odroid C2 + ??? - proof of concept, trying to find out best ELEC version supporting: GPIO IR, Mysql(for Kodi library), DVB-T2 drivers, TVHeadend. Not sucessfull yet.

6x RPi2 + Various TV's + LE 7.0.3, 2x Win7 Kodi 16.1 + MySQL from vPeter's LAMP plugin as Library DB + .zip patch + EAC3 patch .

User avatar
odroid
Site Admin
Posts: 29380
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Contact:

Re: media build problem - linux headers?

Unread post by odroid » Mon Dec 03, 2018 4:23 pm

Try Ubuntu 18.04 image. It comes with a manged Linux headers.

User avatar
JimmyS
Posts: 54
Joined: Sun Apr 22, 2018 9:37 pm
languages_spoken: english
ODROIDs: C2
Contact:

Re: media build problem - linux headers?

Unread post by JimmyS » Mon Dec 03, 2018 7:48 pm

Thank you. I will try it. I want to compile both TV Headend and media build there :)

P.S.: Is it possible to test there (18.04) GPIO IR RX as well? according one finding there could be some hickups? But I see that official guide uses both modules, so I just reassuring..
Odroid C2 + ??? - proof of concept, trying to find out best ELEC version supporting: GPIO IR, Mysql(for Kodi library), DVB-T2 drivers, TVHeadend. Not sucessfull yet.

6x RPi2 + Various TV's + LE 7.0.3, 2x Win7 Kodi 16.1 + MySQL from vPeter's LAMP plugin as Library DB + .zip patch + EAC3 patch .

User avatar
JimmyS
Posts: 54
Joined: Sun Apr 22, 2018 9:37 pm
languages_spoken: english
ODROIDs: C2
Contact:

Re: media build problem - linux headers?

Unread post by JimmyS » Tue Dec 04, 2018 3:22 am

Damn :( ubuntu-18.04-3.16-minimal-odroid-c2-20180626.img.xz

Code: Select all

root@odroid:~# modprobe gpioplug-ir-recv
modprobe: FATAL: Module gpioplug-ir-recv not found in directory /lib/modules/3.16.57-20
and media build fails anyway :(

Code: Select all

make[2]: Entering directory '/usr/src/linux-3.16.57-20'
  CC [M]  /root/media_build/v4l/altera-lpt.o
In file included from <command-line>:0:0:
/root/media_build/v4l/compat.h:1674:0: warning: "writel_relaxed" redefined
 #define writel_relaxed writel

In file included from include/linux/clocksource.h:19:0,
                 from include/clocksource/arm_arch_timer.h:19,
                 from ./arch/arm64/include/asm/arch_timer.h:27,
                 from ./arch/arm64/include/asm/timex.h:19,
                 from include/linux/timex.h:65,
                 from include/linux/sched.h:19,
                 from ./arch/arm64/include/asm/compat.h:25,
                 from ./arch/arm64/include/asm/stat.h:23,
                 from include/linux/stat.h:5,
                 from include/linux/sysfs.h:21,
                 from include/linux/kobject.h:21,
                 from include/linux/device.h:17,
                 from include/linux/input.h:22,
                 from /root/media_build/v4l/compat.h:57,
                 from <command-line>:0:
./arch/arm64/include/asm/io.h:103:0: note: this is the location of the previous definition
 #define writel_relaxed(v,c) ((void)__raw_writel((__force u32)cpu_to_le32(v),(c)))

In file included from <command-line>:0:0:
/root/media_build/v4l/compat.h: In function 'pm_runtime_get_if_in_use':
/root/media_build/v4l/compat.h:2162:21: error: 'struct dev_pm_info' has no member named 'disable_depth'
  retval = dev->power.disable_depth > 0 ? -EINVAL :
                     ^
/root/media_build/v4l/compat.h:2163:13: error: 'struct dev_pm_info' has no member named 'runtime_status'
   dev->power.runtime_status == RPM_ACTIVE
             ^
In file included from include/linux/spinlock.h:402:0,
                 from include/linux/seqlock.h:35,
                 from include/linux/time.h:5,
                 from include/linux/input.h:11,
                 from /root/media_build/v4l/compat.h:57,
                 from <command-line>:0:
/root/media_build/v4l/compat.h:2164:38: error: 'struct dev_pm_info' has no member named 'usage_count'
    && atomic_inc_not_zero(&dev->power.usage_count);
                                      ^
include/linux/atomic.h:64:52: note: in definition of macro 'atomic_inc_not_zero'
 #define atomic_inc_not_zero(v)  atomic_add_unless((v), 1, 0)
                                                    ^
In file included from <command-line>:0:0:
/root/media_build/v4l/compat.h: At top level:
/root/media_build/v4l/compat.h:2369:0: warning: "__pfn_to_phys" redefined
 #define __pfn_to_phys(pfn)  PFN_PHYS(pfn)

In file included from ./arch/arm64/include/asm/page.h:66:0,
                 from ./arch/arm64/include/asm/proc-fns.h:26,
                 from ./arch/arm64/include/asm/pgtable.h:19,
                 from ./arch/arm64/include/asm/io.h:29,
                 from include/linux/clocksource.h:19,
                 from include/clocksource/arm_arch_timer.h:19,
                 from ./arch/arm64/include/asm/arch_timer.h:27,
                 from ./arch/arm64/include/asm/timex.h:19,
                 from include/linux/timex.h:65,
                 from include/linux/sched.h:19,
                 from ./arch/arm64/include/asm/compat.h:25,
                 from ./arch/arm64/include/asm/stat.h:23,
                 from include/linux/stat.h:5,
                 from include/linux/sysfs.h:21,
                 from include/linux/kobject.h:21,
                 from include/linux/device.h:17,
                 from include/linux/input.h:22,
                 from /root/media_build/v4l/compat.h:57,
                 from <command-line>:0:
./arch/arm64/include/asm/memory.h:83:0: note: this is the location of the previous definition
 #define __pfn_to_phys(pfn) ((phys_addr_t)(pfn) << PAGE_SHIFT)

scripts/Makefile.build:257: recipe for target '/root/media_build/v4l/altera-lpt.o' failed
make[3]: *** [/root/media_build/v4l/altera-lpt.o] Error 1
Makefile:1358: recipe for target '_module_/root/media_build/v4l' failed
Odroid C2 + ??? - proof of concept, trying to find out best ELEC version supporting: GPIO IR, Mysql(for Kodi library), DVB-T2 drivers, TVHeadend. Not sucessfull yet.

6x RPi2 + Various TV's + LE 7.0.3, 2x Win7 Kodi 16.1 + MySQL from vPeter's LAMP plugin as Library DB + .zip patch + EAC3 patch .

User avatar
odroid
Site Admin
Posts: 29380
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Contact:

Re: media build problem - linux headers?

Unread post by odroid » Tue Dec 04, 2018 9:39 am

Try this guide for your IR remote controller.
https://wiki.odroid.com/odroid-c2/appli ... buntu18.04
or
https://wiki.odroid.com/odroid-c2/appli ... buntu18.04

When I tried to build a few different USB WiFi drivers, the Linux header was fine to build them.
Since I have no experience of media device driver development, I hope other people can help you.

User avatar
JimmyS
Posts: 54
Joined: Sun Apr 22, 2018 9:37 pm
languages_spoken: english
ODROIDs: C2
Contact:

Re: media build problem - linux headers?

Unread post by JimmyS » Tue Dec 04, 2018 2:19 pm

Yes, meson_ir driver works well with lirc / onboard IR diode, but I would like to get IR working through GPIO pin(s), and for that I would need gpioplug-ir-recv + gpio-ir-recv :( Because I dont know, how to tell meson that it should listen on some GPIO PIN instead C3 IR diode..

Please, dont forgot to include those to the new Ubuntu builds, because AFAIK without them, we wont be able get IR Rx through GPIO at all.

I am not experience on device driver at all also, its should be just:

Code: Select all

git clone --depth=1 git://linuxtv.org/media_build.git
cd media_build 
./build
Lets hope.. I know that someone from this forum already build V4l media build on one of previous Ubuntu I think.
Odroid C2 + ??? - proof of concept, trying to find out best ELEC version supporting: GPIO IR, Mysql(for Kodi library), DVB-T2 drivers, TVHeadend. Not sucessfull yet.

6x RPi2 + Various TV's + LE 7.0.3, 2x Win7 Kodi 16.1 + MySQL from vPeter's LAMP plugin as Library DB + .zip patch + EAC3 patch .

joy
Posts: 611
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Contact:

Re: media build problem - linux headers?

Unread post by joy » Fri Dec 21, 2018 2:56 pm

JimmyS wrote:
Tue Dec 04, 2018 2:19 pm
Yes, meson_ir driver works well with lirc / onboard IR diode, but I would like to get IR working through GPIO pin(s), and for that I would need gpioplug-ir-recv + gpio-ir-recv :( Because I dont know, how to tell meson that it should listen on some GPIO PIN instead C3 IR diode..

Please, dont forgot to include those to the new Ubuntu builds, because AFAIK without them, we wont be able get IR Rx through GPIO at all.
I will check the gpio ir rx again with ubuntu-18.04-3.16-minimal-odroid-c2-20180626.img.xz.
As I checked before, it should work normally.

joy
Posts: 611
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Contact:

Re: media build problem - linux headers?

Unread post by joy » Fri Dec 21, 2018 3:36 pm

Hello, JimmyS.
I found the configuration to activate gpioplug-ir-recv is missing in the latest kernel 3.16.y.
I will let you know soon once a new version including gpioplut-ir-recv.
Sorry for making the convenience.

joy
Posts: 611
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Contact:

Re: media build problem - linux headers?

Unread post by joy » Mon Dec 24, 2018 10:23 am

Hi, JimmyS.
A new version has been released including gpioplug-ir-recv module with this commit.
https://github.com/hardkernel/linux/com ... c64b3a9f36

Please update kernel package.

Code: Select all

$ sudo apt-get update -y && sudo apt-get upgrade -y
The version is 3.16.61-34.

Code: Select all

root@odroid:~# uname -a
Linux odroid 3.16.61-34 #1 SMP PREEMPT Fri Dec 21 13:51:02 -02 2018 aarch64 aarch64 aarch64 GNU/Linux
I've confirmed it works with the commit.

Could you try GPIO IR RX with the version?
Last edited by joy on Wed Dec 26, 2018 10:50 am, edited 1 time in total.

User avatar
JimmyS
Posts: 54
Joined: Sun Apr 22, 2018 9:37 pm
languages_spoken: english
ODROIDs: C2
Contact:

Re: media build problem - linux headers?

Unread post by JimmyS » Tue Dec 25, 2018 4:17 am

Hello,

thats great to hear. I am out of my home through holiday, but I will look on it later. It works in 16.04 so I believe it will work also on 18.04 :)

Thank you!
Odroid C2 + ??? - proof of concept, trying to find out best ELEC version supporting: GPIO IR, Mysql(for Kodi library), DVB-T2 drivers, TVHeadend. Not sucessfull yet.

6x RPi2 + Various TV's + LE 7.0.3, 2x Win7 Kodi 16.1 + MySQL from vPeter's LAMP plugin as Library DB + .zip patch + EAC3 patch .

Post Reply

Return to “Ubuntu”

Who is online

Users browsing this forum: No registered users and 0 guests