https://redmine.replicant.us/https://redmine.replicant.us/favicon.ico?15984615062018-08-03T05:09:59ZReplicantReplicant - Issue #1885: Touch key firmware binary in kernel source code (smdk4412)https://redmine.replicant.us/issues/1885?journal_id=71092018-08-03T05:09:59ZJoonas Kylmälä
<ul></ul><p><a class="user active" href="https://redmine.replicant.us/users/9724">Simon Shields</a> on IRC said the firmware is not needed (at least with mainline I guess) so it might be possible just to remove it also from this legacy kernel source.</p> Replicant - Issue #1885: Touch key firmware binary in kernel source code (smdk4412)https://redmine.replicant.us/issues/1885?journal_id=72892019-01-07T11:52:17ZFil Bergamofil.bergamo@riseup.net
<ul></ul><p>Joonas Kylmälä wrote:</p>
<blockquote>
<p><a class="user active" href="https://redmine.replicant.us/users/9724">Simon Shields</a> on IRC said the firmware is not needed (at least with mainline I guess) so it might be possible just to remove it also from this legacy kernel source.</p>
</blockquote>
<p>Is it just enough to remove the file itself?<br />Do we need to update any reference in other source files?</p>
<p>I can test a build without this firmware for i9100, i9300, n7100 and then send a patch, if the removal is that simple.</p>
<p>Also, I noticed that other firmware files in the same directory that seem to be in binary form only:</p>
<p>- touchkey_fw_NAATT.h<br />- touchkey_fw_NTT.h<br />- touchkey_fw_Q1.h<br />- touchkey_fw_T0.h <br />- touchkey_fw_U1.h</p>
<p>Furthermore, all source files in this directory seem to have a copyright header that references a seemingly non-free license:</p>
<blockquote>
<p>(...)<br />Use may be limited by and subject to the applicable Cypress software license agreement.<br />(...)</p>
</blockquote>
<p>A quick search on cypress.com didn't get me anything meaningful regarding any general "Cypress software agreement".<br />There are some generic <a href="http://www.cypress.com/terms-conditions" class="external">terms and conditions</a> that apply to software obtained via cypress.com, and they explicitly prohibit copying and redistributing sofware..</p>
<p>The only file that clearly states it's free software is <code>cypress-touchkey.c</code><br />Though, this one free-licensed file does reference all other files that are seemingly-non-free.</p>
<p>The same applies to files in <a class="external" href="https://git.replicant.us/replicant/kernel_samsung_smdk4412/tree/drivers/input/keyboard/cypressbln">https://git.replicant.us/replicant/kernel_samsung_smdk4412/tree/drivers/input/keyboard/cypressbln</a></p>
<p>While we are at it..<br />I took a sample look at <a class="external" href="https://git.replicant.us/replicant/kernel_samsung_smdk4412/tree/drivers/input/touchscreen">https://git.replicant.us/replicant/kernel_samsung_smdk4412/tree/drivers/input/touchscreen</a> <br />and it's full of binary-only files without a license..</p>
<p>What should we do about all this?</p>
<a name="----EDIT"></a>
<h3 >--- EDIT:<a href="#----EDIT" class="wiki-anchor">¶</a></h3>
<p>I tried to simply remove both directories: <code>drivers/input/keyboard/cypressbln</code> <strong>and</strong> <code>drivers/input/keyboard/cypress</code><br />It does build, after removing references to those directories in <code>drivers/input/keyboard/Kconfig</code>, but, as expected, the "simulated hardware keys" on i9100 don't work.<br />I will try a less dramatic approach, by looking at specific references and try to cherry-pick files that can be safely removed..</p> Replicant - Issue #1885: Touch key firmware binary in kernel source code (smdk4412)https://redmine.replicant.us/issues/1885?journal_id=72982019-01-14T22:27:51ZFil Bergamofil.bergamo@riseup.net
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>In Progress</i></li><li><strong>Assignee</strong> set to <i>Fil Bergamo</i></li></ul> Replicant - Issue #1885: Touch key firmware binary in kernel source code (smdk4412)https://redmine.replicant.us/issues/1885?journal_id=72992019-01-15T23:09:30ZFil Bergamofil.bergamo@riseup.net
<ul><li><strong>File</strong> <a href="/attachments/1588">0001-Remove-nonfree-binary-firmware-data.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/1588/0001-Remove-nonfree-binary-firmware-data.patch">0001-Remove-nonfree-binary-firmware-data.patch</a> added</li><li><strong>Status</strong> changed from <i>In Progress</i> to <i>Feedback</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>50</i></li></ul><p>I carefully removed all references to binary firmware data inside source files, rebuilt the whole tree from scratch, and tested for i9100 and i9300: touch keys still seem to work flawlessly, even with those binary firmwares removed.</p>
<p>In facts, the only place where <code>firmware_data</code> is used is in function <code>LoadProgramData</code>, defined at <code>issp_driver_routines.c</code><br />Reading the comments above this function's definition suggests that it is only used for testing purposes, and is irrelevant for regular operation:</p>
<blockquote>
<p>// The final application should load program data from HEX file generated by<br />// PSoC Designer into a 64 byte host ram buffer.<br />(...)<br />// This demo program will, instead, load predetermined data into each block.</p>
</blockquote>
<p>So, it seems like we can do without these binary-only files:<br /><code>touchkey_fw_Q1.h</code><br /><code>touchkey_fw_NTT.h</code><br /><code>touchkey_fw_NA.h</code><br /><code>touchkey_fw_NAATT.h</code><br /><code>touchkey_fw_U1.h</code></p>
<p>Attached is a patch that removes those files and all related references in the cypress source code.<br />It is quite big because it lists the whole content of deleted files. I'm sorry but my knowledge of git is very limited and I wasn't able to prevent this, no matter how hard I tried...</p>
<ul>
<li>Warning (1): I only tested it for i9100 and i9300 and only for brief operations, there's no guarantee over long-time side effects, even if they seem unlikely*</li>
</ul>
<ul>
<li>Warning (2): this patch does NOT solve the problem with the ambiguous copyright statement found in the other cypress source files, which must be still discussed*<br />What shall we do about them?</li>
</ul> Replicant - Issue #1885: Touch key firmware binary in kernel source code (smdk4412)https://redmine.replicant.us/issues/1885?journal_id=73022019-01-16T00:30:56ZFil Bergamofil.bergamo@riseup.net
<ul><li><strong>Target version</strong> changed from <i>Replicant 6.0</i> to <i>Replicant 6.0 0004</i></li></ul> Replicant - Issue #1885: Touch key firmware binary in kernel source code (smdk4412)https://redmine.replicant.us/issues/1885?journal_id=73092019-01-19T23:24:13ZKurtis HannaKurtis@riseup.net
<ul></ul><p>I saw these links posted in the IRC from user PabloPL and figured I'd post them here since I think they are related:</p>
<p><a class="external" href="https://patchwork.kernel.org/patch/10744537/">https://patchwork.kernel.org/patch/10744537/</a><br /><a class="external" href="https://patchwork.kernel.org/patch/10751097/">https://patchwork.kernel.org/patch/10751097/</a></p>
<p>PabloPL also said" probably needs change in midas dts (but there should be already patch for it on forkbomb github repo)"</p> Replicant - Issue #1885: Touch key firmware binary in kernel source code (smdk4412)https://redmine.replicant.us/issues/1885?journal_id=74622019-05-21T13:22:14ZDenis 'GNUtoo' CarikliGNUtoo@cyberdimension.org
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>In Progress</i></li></ul> Replicant - Issue #1885: Touch key firmware binary in kernel source code (smdk4412)https://redmine.replicant.us/issues/1885?journal_id=74732019-05-21T13:47:10ZDenis 'GNUtoo' CarikliGNUtoo@cyberdimension.org
<ul><li><strong>Assignee</strong> changed from <i>Fil Bergamo</i> to <i>Denis 'GNUtoo' Carikli</i></li></ul> Replicant - Issue #1885: Touch key firmware binary in kernel source code (smdk4412)https://redmine.replicant.us/issues/1885?journal_id=76062019-10-08T22:25:09ZJoonas Kylmälä
<ul><li><strong>Status</strong> changed from <i>In Progress</i> to <i>Resolved</i></li><li><strong>% Done</strong> changed from <i>50</i> to <i>100</i></li></ul><p>I believe this is fixed with <a class="external" href="https://git.replicant.us/replicant/kernel_samsung_smdk4412/commit/?id=160424ba716cde87e4ff213972a03388e90bf75e">https://git.replicant.us/replicant/kernel_samsung_smdk4412/commit/?id=160424ba716cde87e4ff213972a03388e90bf75e</a>.</p> Replicant - Issue #1885: Touch key firmware binary in kernel source code (smdk4412)https://redmine.replicant.us/issues/1885?journal_id=79932020-04-17T15:06:00ZKurtis HannaKurtis@riseup.net
<ul></ul><p>Should the stuff in the "verdict" column at these two wiki links be removed or changed since this Issue is closed?</p>
<p><a class="external" href="https://redmine.replicant.us/projects/replicant/wiki/Upstream#Replicant-supported-Samsung-Exynos-devices">https://redmine.replicant.us/projects/replicant/wiki/Upstream#Replicant-supported-Samsung-Exynos-devices</a><br /><a class="external" href="https://redmine.replicant.us/projects/replicant/wiki/Upstream#Other-devices-with-some-upstream-support">https://redmine.replicant.us/projects/replicant/wiki/Upstream#Other-devices-with-some-upstream-support</a></p> Replicant - Issue #1885: Touch key firmware binary in kernel source code (smdk4412)https://redmine.replicant.us/issues/1885?journal_id=82362020-08-06T16:04:37ZKurtis HannaKurtis@riseup.net
<ul></ul><p>Perhaps I was mistaken with my last question. Maybe this commit is the reason why the "verdict" column should be updated: <a class="external" href="https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/arch/arm/boot/dts/exynos4412-n710x.dts?id=d4ec0cb050644febad4daf3d379969583f745296">https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/arch/arm/boot/dts/exynos4412-n710x.dts?id=d4ec0cb050644febad4daf3d379969583f745296</a></p>