Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Sony Reader > Sony Reader Dev Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 08-21-2012, 10:34 AM   #1
altruizine
Senior Altruist
altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.
 
Posts: 82
Karma: 600554
Join Date: Jun 2012
Device: Onyx Boox C67ML, Onyx Boox Note Pro
Exclamation PRS-T2 New e-ink update algorithm missing from Linux source; Sony circumvents GPL

I was interested in how Sony implemented their improved eInk-screen update on the PRS-T2 display driver, to see whether it could possibly be backported to the PRS-T1. So I looked into the Linux source code they released.

To my surprise, I found that they have just added a few hooks that call into a proprietary extension kernel module (if present). The hook functions are simply named func1…func8, presumably to obfuscate their purpose. Here's the structure the extension needs to register with the video driver to have its hooks called:
Code:
struct mxc_epdc_fb_extension {
        struct module*  owner;
        struct mxc_epdc_fb_data *fb_data;

        int (*func1)(struct mxc_epdc_fb_data*, struct update_data_list*);
        int (*func2)(struct mxc_epdc_fb_data*, struct update_data_list*);
        int (*func3)(struct mxc_epdc_fb_data*, struct update_data_list*);
        int (*func4)(struct mxc_epdc_fb_data*);
        int (*func5)(struct mxc_epdc_fb_data*);
        int (*func6)(struct mxc_epdc_fb_data*);
        int (*func7)(struct mxc_epdc_fb_data*);
        int (*func8)(struct mxc_epdc_fb_data*);
};
This smells to me like a willful GPL circumvention that borders on a GPL violation. I know that Linus Torvalds tolerates proprietary kernel modules that use the exported module interface to implement Linux-independent functionality, but modifying other people's GPL code to call into proprietary modules is quite expressly forbidden:

I personally consider anything a "derived work" that needs special hooks in the kernel to function with Linux (i.e., it is not acceptable to make a small piece of GPL-code as a hook for the larger piece), as that obviously implies that the bigger module needs "help" from the main kernel.

I may look into possible further steps to encourage Sony to release the missing source code. Any suggestions?
altruizine is offline   Reply With Quote
Old 08-21-2012, 01:05 PM   #2
rkomar
Wizard
rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.
 
Posts: 2,978
Karma: 18343081
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
Keep in mind that Sony may not have the rights to distribute that source code if they are licensing it from someone else. It would be best to deal with them politely to find more out before letting the accusations fly. The problem may really be due to someone else.
rkomar is offline   Reply With Quote
Old 08-21-2012, 02:03 PM   #3
uboot
Evangelist
uboot seems famous, but is in fact legendary.uboot seems famous, but is in fact legendary.uboot seems famous, but is in fact legendary.uboot seems famous, but is in fact legendary.uboot seems famous, but is in fact legendary.uboot seems famous, but is in fact legendary.uboot seems famous, but is in fact legendary.uboot seems famous, but is in fact legendary.uboot seems famous, but is in fact legendary.uboot seems famous, but is in fact legendary.uboot seems famous, but is in fact legendary.
 
Posts: 425
Karma: 75216
Join Date: Nov 2011
Location: old europe
Device: Kobo Mini, Tolino Epos 2
The hardware platforms of the PRS-T1 and PRS-T2 are equal - at least according to http://www.ebouquin.fr/2012/08/17/te...euse-complete/

So we should be able to just plug T2 kernel binaries into the T1
uboot is offline   Reply With Quote
Old 08-21-2012, 03:12 PM   #4
altruizine
Senior Altruist
altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.
 
Posts: 82
Karma: 600554
Join Date: Jun 2012
Device: Onyx Boox C67ML, Onyx Boox Note Pro
Thanks for your comments, rkomar!
Quote:
Originally Posted by rkomar View Post
Keep in mind that Sony may not have the rights to distribute that source code if they are licensing it from someone else. It would be best to deal with them politely to find more out before letting the accusations fly. The problem may really be due to someone else.
IANAL, but according to my understanding of the GPL, if it were true that the missing kernel module is a Linux-derivative work (according to the definition I cited) and therefore falls under the GPL, and moreover if Sony were prohibited from distributing its source code, then Sony could not distribute the module at all (not even in binary form).

I'd love to get a clarification from Sony. Can you suggest a good avenue for having that discussion with Sony?
altruizine is offline   Reply With Quote
Old 08-21-2012, 03:22 PM   #5
altruizine
Senior Altruist
altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.
 
Posts: 82
Karma: 600554
Join Date: Jun 2012
Device: Onyx Boox C67ML, Onyx Boox Note Pro
Quote:
Originally Posted by uboot View Post
The hardware platforms of the PRS-T1 and PRS-T2 are equal - at least according to http://www.ebouquin.fr/2012/08/17/te...euse-complete/

So we should be able to just plug T2 kernel binaries into the T1
Yes, the hardware platform seems to be very similar, but I'm less optimistic that a PRS-T2 kernel module would load on the PRS-T1 (aside from the legal ramifications of getting hold of that module):

The PRS-T2 kernel Sony distributes has the same version number as the PRS-T1 kernel, but it has evolved a bit, which may lead to a modversion mismatch. Also, if the kernel config files in the Sony tarball are any indication, there may be minor SoC or platform differences and slight configuration mismatches between the platforms. For example, some of the config files select different platform clocks and timers.

(BTW, one of the config files hints at a future HD version of the Reader with a 1200x1600 eInk display. )
altruizine is offline   Reply With Quote
Old 08-21-2012, 05:26 PM   #6
Kolenka
<Insert Wit Here>
Kolenka ought to be getting tired of karma fortunes by now.Kolenka ought to be getting tired of karma fortunes by now.Kolenka ought to be getting tired of karma fortunes by now.Kolenka ought to be getting tired of karma fortunes by now.Kolenka ought to be getting tired of karma fortunes by now.Kolenka ought to be getting tired of karma fortunes by now.Kolenka ought to be getting tired of karma fortunes by now.Kolenka ought to be getting tired of karma fortunes by now.Kolenka ought to be getting tired of karma fortunes by now.Kolenka ought to be getting tired of karma fortunes by now.Kolenka ought to be getting tired of karma fortunes by now.
 
Kolenka's Avatar
 
Posts: 1,017
Karma: 1275899
Join Date: Jan 2008
Location: Puget Sound
Device: Kindle Oasis, Kobo Forma
Quote:
Originally Posted by altruizine View Post
Thanks for your comments, rkomar!

IANAL, but according to my understanding of the GPL, if it were true that the missing kernel module is a Linux-derivative work (according to the definition I cited) and therefore falls under the GPL, and moreover if Sony were prohibited from distributing its source code, then Sony could not distribute the module at all (not even in binary form).

I'd love to get a clarification from Sony. Can you suggest a good avenue for having that discussion with Sony?
Unfortunately, the most useful folks in such a discussion are likely in Japan. So you will be dealing with a language barrier, and the service folks for the US won't have a clue as to what you are trying to do. If you can get them to reach out to the engineering department, it might help get something started. Something this complicated will likely wind up including engineers, lawyers, and a few other folks.

And I will note that while Linus may interpret the GPL one way, lawyers and judges may interpret it slightly differently if this went to court. While Linus' interpretation is important from a "I want to do right by the original creator" point of view, it is utterly irrelevant from a legal point of view, unless it is in the license.

If those extensions are indeed in a modified kernel, then that's sloppy on their part either way. The smart thing to do, if the kernel did indeed need to be modified, would have been to extend/modify existing interfaces in a way that it was useful on its own. Then plug the proprietary driver blob they get from eInk into that. This smacks of being lazy, and getting a company lawyer to sign off on it.
Kolenka is offline   Reply With Quote
Old 08-22-2012, 01:15 AM   #7
rkomar
Wizard
rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.
 
Posts: 2,978
Karma: 18343081
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
What sources are you comparing to when the only difference you see is the new struct added? Is there some Freescale patch for the stock linux-2.6.35.3 kernel that produces most of what Sony is using?
rkomar is offline   Reply With Quote
Old 08-22-2012, 03:41 AM   #8
altruizine
Senior Altruist
altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.
 
Posts: 82
Karma: 600554
Join Date: Jun 2012
Device: Onyx Boox C67ML, Onyx Boox Note Pro
Quote:
Originally Posted by rkomar View Post
What sources are you comparing to when the only difference you see is the new struct added?
I've compared the Linux trees Sony distributes for the Sony PRS-T1 the PRS-T2, respectively:The new extension interface is in these files: drivers/video/mxc/mxc_epdc_fb.c, include/linux/mxcfb_epdc_kernel.h

The video-driver extension interface is by far not the only change; there's tons of minor bug fixes, platform updates, power-management enhancements, minor quirks stuff, plus a few security fixes thrown in for good measure.

Quote:
Originally Posted by rkomar View Post
Is there some Freescale patch for the stock linux-2.6.35.3 kernel that produces most of what Sony is using?
There surely is. But that's not what I've been looking at, and I don't know off-hand where to find it.
altruizine is offline   Reply With Quote
Old 08-22-2012, 12:07 PM   #9
rkomar
Wizard
rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.
 
Posts: 2,978
Karma: 18343081
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
Quote:
Originally Posted by altruizine View Post
I've compared the Linux trees Sony distributes for the Sony PRS-T1 the PRS-T2, respectively:The new extension interface is in these files: drivers/video/mxc/mxc_epdc_fb.c, include/linux/mxcfb_epdc_kernel.h

The video-driver extension interface is by far not the only change; there's tons of minor bug fixes, platform updates, power-management enhancements, minor quirks stuff, plus a few security fixes thrown in for good measure.
Okay, thanks for clarifying. I had diffed those two source trees last night and saw thousands of differences, so I thought you might have been comparing something else. I'm amazed you were able to find that one change out of the vast number of others, like finding a needle in a haystack.
rkomar is offline   Reply With Quote
Old 08-22-2012, 03:49 PM   #10
m3l7d0wN
Zealot
m3l7d0wN juggles running chainsaws for a bit of light exercisem3l7d0wN juggles running chainsaws for a bit of light exercisem3l7d0wN juggles running chainsaws for a bit of light exercisem3l7d0wN juggles running chainsaws for a bit of light exercisem3l7d0wN juggles running chainsaws for a bit of light exercisem3l7d0wN juggles running chainsaws for a bit of light exercisem3l7d0wN juggles running chainsaws for a bit of light exercisem3l7d0wN juggles running chainsaws for a bit of light exercisem3l7d0wN juggles running chainsaws for a bit of light exercisem3l7d0wN juggles running chainsaws for a bit of light exercisem3l7d0wN juggles running chainsaws for a bit of light exercise
 
Posts: 102
Karma: 38810
Join Date: Apr 2011
Device: Sony PRS-T1
I was thinking of dumping the T2 reader and other android app to the T1... do you think it's possible? evernote and remote delivery would be nice..
they're not kernel dependent, right?
someone know if it ships android 2.1 like the T1?
m3l7d0wN is offline   Reply With Quote
Old 09-03-2012, 09:53 PM   #11
e-ink
partly refreshed
e-ink could sell banana peel slippers to a Deveel.e-ink could sell banana peel slippers to a Deveel.e-ink could sell banana peel slippers to a Deveel.e-ink could sell banana peel slippers to a Deveel.e-ink could sell banana peel slippers to a Deveel.e-ink could sell banana peel slippers to a Deveel.e-ink could sell banana peel slippers to a Deveel.e-ink could sell banana peel slippers to a Deveel.e-ink could sell banana peel slippers to a Deveel.e-ink could sell banana peel slippers to a Deveel.e-ink could sell banana peel slippers to a Deveel.
 
Posts: 36
Karma: 3026
Join Date: Aug 2012
Device: It's a Sony :P prs-t1
If I have understood correctly, the reported improvements are solely driver made while the Display itself hasn't changed at all?

Anything out there yet to insmod on the T1?
e-ink is offline   Reply With Quote
Old 09-04-2012, 06:07 AM   #12
altruizine
Senior Altruist
altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.
 
Posts: 82
Karma: 600554
Join Date: Jun 2012
Device: Onyx Boox C67ML, Onyx Boox Note Pro
Quote:
Originally Posted by e-ink View Post
If I have understood correctly, the reported improvements are solely driver made while the Display itself hasn't changed at all?
We don't really know yet, I suppose. The Linux display driver seems to be the very similar, at least (modulo the extension interface). But I don't know whether the closed-source extension module depends on new hardware; probably not.

Also, if the screen is indeed whiter than the T1's, that surely sounds like a hardware improvement. But the crispier text rendering some reviewers mention could be a result of improvements in the user-land Reader software (better fonts, modified antialiasing / hinting, better gamma correction).

Quote:
Originally Posted by e-ink View Post
Anything out there yet to insmod on the T1?
No. The new driver can be compiled as a module for the T1 kernel (I tried), but the regular T1 kernel has the original display driver (without the hooks) compiled in. Without the hooks, you couldn't load the proprietary module even if you had it (I don't).

I don't have much experience swapping display drivers, but I think a linked driver cannot easily be replaced by loading a module. You'd probably have to compile and load a new kernel (to which, I understand, you are well on your way? ) or do some dirty redirection magic.
altruizine is offline   Reply With Quote
Old 09-04-2012, 11:45 AM   #13
e-ink
partly refreshed
e-ink could sell banana peel slippers to a Deveel.e-ink could sell banana peel slippers to a Deveel.e-ink could sell banana peel slippers to a Deveel.e-ink could sell banana peel slippers to a Deveel.e-ink could sell banana peel slippers to a Deveel.e-ink could sell banana peel slippers to a Deveel.e-ink could sell banana peel slippers to a Deveel.e-ink could sell banana peel slippers to a Deveel.e-ink could sell banana peel slippers to a Deveel.e-ink could sell banana peel slippers to a Deveel.e-ink could sell banana peel slippers to a Deveel.
 
Posts: 36
Karma: 3026
Join Date: Aug 2012
Device: It's a Sony :P prs-t1
Quote:
Originally Posted by altruizine View Post
Without the hooks, you couldn't load the proprietary module even if you had it (I don't)
Does that mean it's compiled into T2's kernel and therefore doesn't exist as a module? Or are the proprietary drivers not part of the kernel source? I mean in form of binaries of course
What general problems you might gonna run into if you compile the T2 kernel and run it on the T1?

Quote:
Originally Posted by altruizine View Post
compile and load a new kernel (to which, I understand, you are well on your way? )
Hehe, don't you encourage someone with zero experience! Let's see what comes first, finish reading the first book or bricking the device
e-ink is offline   Reply With Quote
Old 09-04-2012, 12:51 PM   #14
altruizine
Senior Altruist
altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.altruizine ought to be getting tired of karma fortunes by now.
 
Posts: 82
Karma: 600554
Join Date: Jun 2012
Device: Onyx Boox C67ML, Onyx Boox Note Pro
Quote:
Originally Posted by e-ink View Post
Does that mean it's compiled into T2's kernel and therefore doesn't exist as a module? Or are the proprietary drivers not part of the kernel source? I mean in form of binaries of course
Let me try to clarify: T2's display driver consists of two components: an updated mxc_epdc_fb driver (with extension hooks) that likely is compiled into the T2 kernel; and (probably – I haven't seen it yet) a proprietary extension using those hooks that likely comes as a kernel module. The latter does not work without the former, because the extension hooks are missing. (That's also why I think Sony might be violating the GPL.)

Quote:
Originally Posted by e-ink View Post
What general problems you might gonna run into if you compile the T2 kernel and run it on the T1?
It probably will not work at all?

I'd start by using the T1 kernel sources and replacing the T1 video driver with the T2 video driver (they're compatible). Alternatively, the T2 sources also appear to come with support for the T1 platform, so you could try compiling a T1 kernel from those.

With luck, the proprietary T2 module loads into the resulting kernel on the T1, but as I indicated in an earlier posting, there are various reasons why that might not work out.
altruizine is offline   Reply With Quote
Old 09-04-2012, 03:00 PM   #15
e-ink
partly refreshed
e-ink could sell banana peel slippers to a Deveel.e-ink could sell banana peel slippers to a Deveel.e-ink could sell banana peel slippers to a Deveel.e-ink could sell banana peel slippers to a Deveel.e-ink could sell banana peel slippers to a Deveel.e-ink could sell banana peel slippers to a Deveel.e-ink could sell banana peel slippers to a Deveel.e-ink could sell banana peel slippers to a Deveel.e-ink could sell banana peel slippers to a Deveel.e-ink could sell banana peel slippers to a Deveel.e-ink could sell banana peel slippers to a Deveel.
 
Posts: 36
Karma: 3026
Join Date: Aug 2012
Device: It's a Sony :P prs-t1
Sorry, I didn't make myself very clear. I was just wondering if Sony uses any proprietary drivers (lets assume legitimately) do those binaries need to be published with the kernel sources?

Can a proprietary driver btw legitimately be built into the kernel, or does it have to load as a module?
e-ink is offline   Reply With Quote
Reply

Tags
gpl violation, prs t2, sony

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PRS-T1 Sony publishes incomplete Linux kernel source code altruizine Sony Reader Dev Corner 4 08-17-2012 08:24 AM
Development GPL Dingo Source Dropbox 'public' links. Gunnerp245 enTourage eDGe 8 10-26-2011 08:55 PM
Onyx and GPL open source licence glin Onyx Boox 1 10-07-2010 09:24 AM
Development Dingo GPL Source Code is Posted dontpanic enTourage Archive 0 09-13-2010 10:58 AM
Is Cool-er GPL based? If so there may be hope to get the source code.... drcross Interead COOL-ER 2 06-10-2010 04:16 AM


All times are GMT -4. The time now is 07:50 PM.


MobileRead.com is a privately owned, operated and funded community.