Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite of flashloader source files (BSD license) #915

Closed
Nightwalker-87 opened this issue Apr 9, 2020 · 11 comments · Fixed by #932
Closed

Rewrite of flashloader source files (BSD license) #915

Nightwalker-87 opened this issue Apr 9, 2020 · 11 comments · Fixed by #932

Comments

@Nightwalker-87
Copy link
Member

Pick up of an issue mentioned before by @xor-gate in #682:

we need to update LICENSE and add the GPL part also for those files. I had some discussion in an email with the original authors which seemed to be copied from the OpenOCD project into stlink project. So we have a mix of GPL van BSD licensed code. If something is unclear please post a comment.

@Nightwalker-87 Nightwalker-87 added this to the v1.6.1 milestone Apr 9, 2020
@Nightwalker-87 Nightwalker-87 self-assigned this Apr 9, 2020
@Nightwalker-87 Nightwalker-87 changed the title License of some flashloaders source files are still missing License files of some flashloaders source files are still missing Apr 9, 2020
@Nightwalker-87
Copy link
Member Author

I'm going to look at this now.
Generally speaking I would not add such additional notes on licensing to the LICENSE file because that may possibly break the correct license recognition and display in git-header bar of the project, (text does not match the template any more) - not definitely sure, but have seen something similar in another project before. Thus this should better go into our README, but somewhere in the header part, that it is easy to spot.

@Nightwalker-87
Copy link
Member Author

@xor-gate: Did you only mean the two flashloaders for which the source files have a header, or did you have in mind that (in addition to these) there were also others (without any header) copied from openocd, but without any reference? If the latter is the case, one would have to compare line by line to identify. Regarding the former ones: These were indeed correctly declared - but somewhere at the very bottom of our README file. I'll move this important note to the top.

@chenguokai
Copy link
Collaborator

Maybe we can just clean room the source code to make a pure BSD one.
I checked to confirm that these assemblies are small enough that a clean room can be finished in a short time. May need a volunteer who has not read the GPL ones to do the actual coding part.

@Nightwalker-87
Copy link
Member Author

Good idea. Indeed it would be nice to have an independent solution for this project.

@Nightwalker-87 Nightwalker-87 changed the title License files of some flashloaders source files are still missing Rewrite of flashloader source files (BSD license) Apr 15, 2020
@chenguokai
Copy link
Collaborator

Volunteer found.

I will take part in this process.
Before that, I wonder which file(s) will need a clean room.
The one for F0 and lx seems to be more complex and may be not from the same source. Should all the assemblies be rewritten? A complete list of files that need a clean room would be appreciated.

@Nightwalker-87
Copy link
Member Author

Well at first I'd suggest to review what is currently there and whether there are any redundant files or sections. Here are the related references in git history, when the loader files appeared:

8151bf5 F2/F4
e8b15c0 F0
94c7ac8 Lx
44c645b L0x
7153510 F4lv
0419b8b L4
bc48e99 F7/F7lv

Some don't have any documentation within the file. I would find it desirable to have a header in each which explains the file content or at least holds a reference to an official STMicroelectronics document.

You may also join https://hackaday.io with your github-login, to consult on details, if you like.

@chenguokai
Copy link
Collaborator

The src for F0 seems to be verbose. I will try optimize it in a unified way that others are mostly taken.
The others are mostly doing a copy and paste work in a clear way that is not so realistic to be more optimized.

The common problem is indeed the lack of references. Should be easy to solve thanks to commit 44c645b and 7153510.

@Nightwalker-87
Copy link
Member Author

@chenguokai: I am currently updating the deb packaging, including all required additional files, following official Debian policies. Taking this issue already into account, I'll update the license file to BSD-3 only. This would imply that there are no old flashloader source files present with incompatible licensing by the time of merging the enhanced cmake packaging stuff.

@Nightwalker-87
Copy link
Member Author

If it is not too much effort one may have a look at some of the older flash loader issues, which have been grouped in two separate milestones. It is possible that some issues have resolved with this rewrite as well, either due to an alternative implementation or fixes within the order of command calls.

@chenguokai
Copy link
Collaborator

One problem makes nearly all reported error logs of flashloader related ones useless: No device dump of the error state.

Currently no info is dumped from device, no register values, no RAM datas, etc. Thus we cannot identify what has gone wrong in the underlying process.

I am going to be busy recently and I may not have time to implement a more detailed error log, while in my view, it would be essential for solving any flashloader related issues.

@Nightwalker-87
Copy link
Member Author

Ok, so I'd suggest to address that at a later point in time, and by then close all flash loader issues, which can no longer be investigated, to have a clean reference there. In the meanwhile I will check, if some of the original issuers are still active and available for any further feedback (but I doubt this will be the case).

@stlink-org stlink-org locked as resolved and limited conversation to collaborators May 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants