IMX6 compiling 8.2.5 with media_build

  • I have a defunct Cubox-i IMX-6 which works well with LE 8.2.5, however because this technology is limited in future releases I want to use this box to be my TVheadend server. I know that the 8.2.5 does not include media_build which is what I hope to do.

    I've run the "normal" media_build compilation on a number of machines and O/S with mixed results, including the Cubox-i on Armbian which worked - alas the tuner although recognised only found one MUX within tvheadend - even though the same H/W and aerial work on a RPi3

    I'm quite happy to cross compile - but I have no idea what I need to do it to include media_build.

    Is it a fairly easy procedure to add the media_build? .. and if so what steps are required.

  • Ok - I've been barking up the wrong tree.

    1. edit ../projects/imx6/options
    2. ADDITIONAL_DRIVERS="media_build"

    PROJECT=imx6 ARCH=arm make image

    Bwahh: Even without media_build, it fails to compile. Number of things I noticed - unsure if relevant.

    a) /home/iridium/ line 9807: /home/iridium/ No such file or directory.

    b) - U-Boot configuration: mx6_cubox-i_config matrix

    (Looks odd mx6 - I would have expected it to be imx6) Doesn't make a difference if I change it though.

    Then fails at:

    make[3]: Entering directory '/home/iridium/'
    /usr/bin/gcc -O2 -Wall -pipe -I/home/iridium/ -Wno-format-security -Wl,--export-dynamic -Wl,-rpath,/home/iridium/ -L/home/iridium/ -o make ar.o arscan.o commands.o default.o dir.o expand.o file.o function.o getopt.o getopt1.o guile.o implicit.o job.o load.o loadapi.o main.o misc.o posixos.o output.o read.o remake.o rule.o signame.o strcache.o variable.o version.o vpath.o hash.o remote-stub.o glob/libglob.a -ldl
    glob/libglob.a(glob.o): In function `glob_in_dir':
    glob.c:(.text+0x2c1): undefined reference to `__alloca'
    glob.c:(.text+0x43e): undefined reference to `__alloca'
    glob.c:(.text+0x5f8): undefined reference to `__alloca'
    glob.c:(.text+0x658): undefined reference to `__alloca'
    glob/libglob.a(glob.o): In function `glob':
    glob.c:(.text+0x95b): undefined reference to `__alloca'
    glob/libglob.a(glob.o):glob.c:(.text+0x101a): more undefined references to `__alloca' follow
    collect2: error: ld returned 1 exit status
    Makefile:655: recipe for target 'make' failed


    Log: pastebin

  • On 16.04 it compiled, however on running, after resize and reboot, it fails with a kernel panic:

    [ 8.338680] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
    [ 8.338693] Modules linked in: uio_pdrv_genirq(+) gpio_ir_recv(O+) uio sch_fq_codel ipv6

    and just reboots on an endless loop.

    Rest of text Kernel Panic

    I'll compile without media_build and see if anything improves.

  • Compile works without the media_build.

    In packages/linux-drivers/media_build/

    PKG_VERSION="2017-04-17-rpi" ----------------------------- should this be RPi?
    PKG_SITE="" -------------------- This does not exist.

    Can I just replace with

    That didn't work:

    patch -s -f -N -p1 -i ../backports/linux-052-XBOX_remote_support.patch
    1 out of 1 hunk FAILED
    make[3]: *** [Makefile:139: apply_patches] Error 1
    make[3]: Leaving directory '/home/iridium/'
    make[2]: *** [Makefile:374: stagingconfig] Error 2
    make[2]: Leaving directory '/home/iridium/'
    make[1]: *** [Makefile:26: stagingconfig] Error 2
    make[1]: Leaving directory '/home/iridium/'
    Makefile:12: recipe for target 'image' failed
    make: *** [image] Error 2

  • Slowly slowly....

    Failed on

    patch -s -f -N -p1 -i ../backports/linux-057-Removed-MCE-customer-code-restriction-in-rc6-decode.patch
    1 out of 2 hunks FAILED

    So commented out.

    Now failed on:

    Which of course is the item I am most interested in.

  • hmm something is fishy, the patches are for the media_build not for the kernel so they should work as long you have still the version that we use at LE8.2

    you can ofc just disable every patch we have there and do an testrun if it is working

  • I'm using at dvb-drivers · CvH/ · GitHub as the original crazycat package doesn't exist.

    I'll push on and disable as each breaks and see what happens.

    Had to disable all of the entries but got a little bit further.