Jump to content


Photo

DM8000: Kernel modules split fails.


  • Please log in to reply
9 replies to this topic

#1 Beeker

  • PLi® Contributor
  • 1,616 posts

+204
Excellent

Posted 3 July 2016 - 10:54

Build environment with openembedded-core, meta-openembedded en bitbake pushed to master HEAD of today.

Problems with Samba, Enigma2-openplugins, faac, iperf, giflib etc solved.

But the last problem is the hardest one.

Kernel modules fails to split for dreambox since bitbake is switched to python 3 and utf-8 is the default and it is not allowed to mix it with other codecs.

Tested some other boxes like et1000.vudou2, ultimo, these build fine.

Error:

File: '/usr/lib/python3.5/codecs.py', lineno: 321, function: decode
     0317:
     0318:    def decode(self, input, final=False):
     0319:        # decode input (taking the buffer into account)
     0320:        data = self.buffer + input
 *** 0321:        (result, consumed) = self._buffer_decode(data, self.errors, final)
     0322:        # keep undecoded input until the next call
     0323:        self.buffer = data[consumed:]
     0324:        return result
     0325:
Exception: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf6 in position 21: invalid start byte

ERROR: linux-dreambox-3.2-r14.19.52 do_package: Function failed: split_kernel_module_packages
ERROR: Logfile of failure stored in: /home/hains/github/openpli-oe-core/build/tmp/work/dm8000-oe-linux/linux-dreambox/3.2-r14.19.52/temp/log.do_package.2781
ERROR: Task /home/hains/github/openpli-oe-core/meta-dream/recipes-bsp/linux/linux-dreambox_3.2.bb:do_package (/home/hains/github/openpli-oe-core/meta-dream/recipes-bsp/linux/linux-dreambox_3.2.bb:do_package) failed with exit code '1'

As workaround i apply a patch to openpli-oe-core/openembedded-core/meta-/classes/kernel-module-split.bbclass  line 53

      cmd = "%sobjcopy -j .modinfo -O binary %s %s" % (d.getVar("HOST_PREFIX", True) or "", file, tmpfile)
        subprocess.call(cmd, shell=True)
 -     f = open(tmpfile)
 +     f = open(tmpfile, encoding="ISO-8859-1")
       l = f.read().split("\000")
       f.close()
       os.close(tf[0])
       os.unlink(tmpfile)

Then image for DM8000 build fine and image is bootable and working as before. So far so good, but it isn't of course the real solution.
       
This patch doesn't break the build for the et10000 BTW.

I know this can be very complicated, but the workaround is quit simple. So perhaps the real solution also.

I tried a lot of things like adding utf-8 to the defconfigs file. But there are so many thus perhaps i missed the one...

Anyone an idea, hint,what's wrong ?

Attached Files


Dreambox dm920, Uclan Ustym4Kpro, Gigablue UHD TRIO 4K and Dreambox dm8000. Wavefrontier T55 13.0|19.2|23.5|28.2 + Ziggo.


Re: DM8000: Kernel modules split fails. #2 mx3L

  • Senior Member
  • 616 posts

+79
Good

Posted 3 July 2016 - 12:08

It looks like it deals with binary file, maybe just specify to open, that it should read it in binary mode:

f = open(tmpfile, 'rb')


Re: DM8000: Kernel modules split fails. #3 goldeneye

  • Senior Member
  • 1,030 posts

+14
Neutral

Posted 3 July 2016 - 12:24

Why bother? Dreamboxes are no longer actively supported. Builds are only made if possible... Now a perfect time to abandon Dreamboxes completely. Turn off support, adjust OpenPli homepage, remove the Dreambox feeds and done.... Problem solved...

Re: DM8000: Kernel modules split fails. #4 Beeker

  • PLi® Contributor
  • 1,616 posts

+204
Excellent

Posted 3 July 2016 - 12:29

 

It looks like it deals with binary file, maybe just specify to open, that it should read it in binary mode:

f = open(tmpfile, 'rb')

No.

0050:        tmpfile = tf[1]
     0051:        cmd = "%sobjcopy -j .modinfo -O binary %s %s" % (d.getVar("HOST_PREFIX", True) or "", file, tmpfile)
     0052:        subprocess.call(cmd, shell=True)
     0053:        f = open(tmpfile, 'rb')
 *** 0054:        l = f.read().split("\000")
     0055:        f.close()
     0056:        os.close(tf[0])
     0057:        os.unlink(tmpfile)
     0058:        vals = {}
Exception: TypeError: a bytes-like object is required, not 'str'

 

It has something to do with the antique kernel of dreamboxes.

 

ET8500 for example has kernel 3.8.7 and that is no problem.

 

Something in the source of the kernel must be adapted..but what?


Dreambox dm920, Uclan Ustym4Kpro, Gigablue UHD TRIO 4K and Dreambox dm8000. Wavefrontier T55 13.0|19.2|23.5|28.2 + Ziggo.


Re: DM8000: Kernel modules split fails. #5 Beeker

  • PLi® Contributor
  • 1,616 posts

+204
Excellent

Posted 3 July 2016 - 12:32

Why bother? Dreamboxes are no longer actively supported. Builds are only made if possible... Now a perfect time to abandon Dreamboxes completely. Turn off support, adjust OpenPli homepage, remove the Dreambox feeds and done.... Problem solved...

 

Yes it's partytime for  dreambox haters.

 

Just wait. When openpli-dev's update OE-core it's game over..

 

Well i think it's game over for dreamboxes anyway..This problem solved or not..


Edited by Beeker, 3 July 2016 - 12:34.

Dreambox dm920, Uclan Ustym4Kpro, Gigablue UHD TRIO 4K and Dreambox dm8000. Wavefrontier T55 13.0|19.2|23.5|28.2 + Ziggo.


Re: DM8000: Kernel modules split fails. #6 betacentauri

  • PLi® Core member
  • 7,185 posts

+323
Excellent

Posted 3 July 2016 - 13:00

Does Python part of enigma2 work with python3??
I think I heard years ago that eg "print a" is not working any longer in Python 3. You need to call "print(a)". Is that right?
Xtrend ET-9200, ET-8000, ET-10000, OpenPliPC on Ubuntu 12.04

Re: DM8000: Kernel modules split fails. #7 Beeker

  • PLi® Contributor
  • 1,616 posts

+204
Excellent

Posted 3 July 2016 - 13:06

Python 2.7.11 is still present in image.

 

All plugins still working.

 

I far as i know. only bitbake has moved to python 3 and some other packages in build environment.

 

But no problem with E2 so far.


Edited by Beeker, 3 July 2016 - 13:09.

Dreambox dm920, Uclan Ustym4Kpro, Gigablue UHD TRIO 4K and Dreambox dm8000. Wavefrontier T55 13.0|19.2|23.5|28.2 + Ziggo.


Re: DM8000: Kernel modules split fails. #8 zeros

  • PLi® Contributor
  • 1,635 posts

+61
Good

Posted 3 July 2016 - 13:27

For utf-8 support is needed newer Python version than the existing 2.7.3
Python-3.5.1 - it would be OK.

DM920UHD DVB-S2X TRIPLE tuner + Triple M.S tuner DVB-S2X, DVB-T2/T, QboxHD, QboxHD Mini, Icecrypt T2300HD,
Qviart Lunix3 4K, Raspberry Pi 4 Model B 4GB & 8GB

Vertex 4K60 4:4:4 600MHz


Re: DM8000: Kernel modules split fails. #9 Beeker

  • PLi® Contributor
  • 1,616 posts

+204
Excellent

Posted 3 July 2016 - 13:36

Bitbake is now python 3.5.1. That's the problem. At least for dreambox. Other boxes(not all tested) build fine without local changes in openembedded-core.

 

Kernel is too old (3.2)... :(

 

Thus it needs a backport patch or something else is wrong.


Edited by Beeker, 3 July 2016 - 13:41.

Dreambox dm920, Uclan Ustym4Kpro, Gigablue UHD TRIO 4K and Dreambox dm8000. Wavefrontier T55 13.0|19.2|23.5|28.2 + Ziggo.


Re: DM8000: Kernel modules split fails. #10 Erik Slagter

  • PLi® Core member
  • 46,969 posts

+542
Excellent

Posted 7 July 2016 - 16:35

I don't think this has anything to do with either kernels, dreambox drivers, python versions. "Something" is splitting "something" (apparently something that should be interpreted as text). This "something" contains non-UTF-8 encoded characters (probably latin-1, but who knows). But the "something" that is splitting the "something" assumes UTF-8 encoding, and yes, UTF-8 tokens can never start with bit 7 set, they're always a continuation of a string of tokens that started earlier (or an explicit start token).

 

So, the solution is simply to use the correct encoding, either in the "something" text or in the "something" that processes the "something".


* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.



2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users