Issue #1885
closedTouch key firmware binary in kernel source code (smdk4412)
100%
Description
I noticed that the smdk4412 kernel used by Midas devices has some firmware in binary form: https://git.replicant.us/replicant/kernel_samsung_smdk4412/tree/drivers/input/keyboard/cypress/touchkey_fw_M0.h. This should be removed as there doesn't seem to be source code for it, therefore making it non-free.
Files
Updated by Joonas Kylmälä over 6 years ago
Simon Shields 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.
Updated by Fil Bergamo almost 6 years ago
Joonas Kylmälä wrote:
Simon Shields 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.
Is it just enough to remove the file itself?
Do we need to update any reference in other source files?
I can test a build without this firmware for i9100, i9300, n7100 and then send a patch, if the removal is that simple.
Also, I noticed that other firmware files in the same directory that seem to be in binary form only:
- touchkey_fw_NAATT.h
- touchkey_fw_NTT.h
- touchkey_fw_Q1.h
- touchkey_fw_T0.h
- touchkey_fw_U1.h
Furthermore, all source files in this directory seem to have a copyright header that references a seemingly non-free license:
(...)
Use may be limited by and subject to the applicable Cypress software license agreement.
(...)
A quick search on cypress.com didn't get me anything meaningful regarding any general "Cypress software agreement".
There are some generic terms and conditions that apply to software obtained via cypress.com, and they explicitly prohibit copying and redistributing sofware..
The only file that clearly states it's free software is cypress-touchkey.c
Though, this one free-licensed file does reference all other files that are seemingly-non-free.
The same applies to files in https://git.replicant.us/replicant/kernel_samsung_smdk4412/tree/drivers/input/keyboard/cypressbln
While we are at it..
I took a sample look at https://git.replicant.us/replicant/kernel_samsung_smdk4412/tree/drivers/input/touchscreen
and it's full of binary-only files without a license..
What should we do about all this?
--- EDIT:¶
I tried to simply remove both directories: drivers/input/keyboard/cypressbln
and drivers/input/keyboard/cypress
It does build, after removing references to those directories in drivers/input/keyboard/Kconfig
, but, as expected, the "simulated hardware keys" on i9100 don't work.
I will try a less dramatic approach, by looking at specific references and try to cherry-pick files that can be safely removed..
Updated by Fil Bergamo almost 6 years ago
- Status changed from New to In Progress
- Assignee set to Fil Bergamo
Updated by Fil Bergamo almost 6 years ago
- File 0001-Remove-nonfree-binary-firmware-data.patch 0001-Remove-nonfree-binary-firmware-data.patch added
- Status changed from In Progress to Feedback
- % Done changed from 0 to 50
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.
In facts, the only place where firmware_data
is used is in function LoadProgramData
, defined at issp_driver_routines.c
Reading the comments above this function's definition suggests that it is only used for testing purposes, and is irrelevant for regular operation:
// The final application should load program data from HEX file generated by
// PSoC Designer into a 64 byte host ram buffer.
(...)
// This demo program will, instead, load predetermined data into each block.
So, it seems like we can do without these binary-only files:touchkey_fw_Q1.h
touchkey_fw_NTT.h
touchkey_fw_NA.h
touchkey_fw_NAATT.h
touchkey_fw_U1.h
Attached is a patch that removes those files and all related references in the cypress source code.
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...
- 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*
- 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*
What shall we do about them?
Updated by Fil Bergamo almost 6 years ago
- Target version changed from Replicant 6.0 to Replicant 6.0 0004
Updated by Kurtis Hanna almost 6 years ago
I saw these links posted in the IRC from user PabloPL and figured I'd post them here since I think they are related:
https://patchwork.kernel.org/patch/10744537/
https://patchwork.kernel.org/patch/10751097/
PabloPL also said" probably needs change in midas dts (but there should be already patch for it on forkbomb github repo)"
Updated by Denis 'GNUtoo' Carikli over 5 years ago
- Status changed from Feedback to In Progress
Updated by Denis 'GNUtoo' Carikli over 5 years ago
- Assignee changed from Fil Bergamo to Denis 'GNUtoo' Carikli
Updated by Joonas Kylmälä about 5 years ago
- Status changed from In Progress to Resolved
- % Done changed from 50 to 100
I believe this is fixed with https://git.replicant.us/replicant/kernel_samsung_smdk4412/commit/?id=160424ba716cde87e4ff213972a03388e90bf75e.
Updated by Kurtis Hanna over 4 years ago
Should the stuff in the "verdict" column at these two wiki links be removed or changed since this Issue is closed?
https://redmine.replicant.us/projects/replicant/wiki/Upstream#Replicant-supported-Samsung-Exynos-devices
https://redmine.replicant.us/projects/replicant/wiki/Upstream#Other-devices-with-some-upstream-support
Updated by Kurtis Hanna over 4 years ago
Perhaps I was mistaken with my last question. Maybe this commit is the reason why the "verdict" column should be updated: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/arch/arm/boot/dts/exynos4412-n710x.dts?id=d4ec0cb050644febad4daf3d379969583f745296