LICENSES: Add the Apache-2.0 license for standalone files Add the full text of the Apache-2.0 license to the OpenOCD tree. It has the same content from: https://spdx.org/licenses/Apache-2.0.html#licenseText but reformatted as in the Linux kernel document and added the required tags for reference and tooling. While this commit is specific for standalone files, it already reports the information for dual licensing. Change-Id: I1fd427256c310ab733fb5d50f344ac52c64a56f5 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8005 Tested-by: jenkins Reviewed-by: Erhan Kurubas <erhan.kurubas@espressif.com>
LICENSES: Add the CC0-1.0 license Add the full text of the CC0-1.0 license to the OpenOCD tree. It was copied directly from: https://spdx.org/licenses/CC0-1.0.html#licenseText Add the required tags for reference and tooling. Change-Id: Iae9c1431b6ffdd68ad5780deb78a257edb0b67f3 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7994 Tested-by: jenkins Reviewed-by: Karl Palsson <karlp@tweak.au>
LICENSES: Add the LGPL-2.1 license Add the full text of the LGPL 2.1 license to OpenOCD. It was copied directly from: https://spdx.org/licenses/LGPL-2.1.html#licenseText Add the required tags for reference and tooling. Checkpatch-ignore: FSF_MAILING_ADDRESS Change-Id: I081f2197fb3c60e17cd6e3353d38194c720ee8a3 Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7743 Tested-by: jenkins Reviewed-by: ahmed BOUDJELIDA <aboudjelida@nanoxplore.com>
build: fix distcheck for jimtcl The issues have been highlighted while integrated jimtcl 0.82, but were already present. While building jimtcl as submodule, OpenOCD generates the file jimtcl/configure.gnu to pass specific configure flags. Issue 1: this file is not included in the distribution. This causes the rebuild from the distribution to have a jimtcl built with different (the default) configure flags. With jimtcl 0.82 the new default is to enable all the features, but a bug causes the build to fail when openssl is not installed in the build system (the bug is already fixed but after 0.82 [1]). All these together cause OpenOCD Jenkins to fail the build for target 'distcheck' with jimtcl 0.82. Add jimtcl/configure.gnu to OpenOCD distribution's file list. The build system considers jimtcl/configure.gnu as a temporarily file that should be removed during 'distclean'. Issue 2: 'distcheck' set read-only permission to the source files, including jimtcl/configure.gnu, so 'distclean' fails removing it. Add a leading '-' to ignore errors while trying to remove the file. Issue 3: Now that 'distcheck' properly configures and builds jimtcl, 'distcheck' still fails because we have enabled jimtcl json support in [2] and jimtcl 'distclean' fails to properly remove one object file (fixed after 0.82 [3]). Make OpenOCD removing the file jimtcl/jsmn/jsmn.o to complete the execution of 'distcheck'. Add a comment specifying which of the jimtcl versions are affected. Change-Id: I2f9153c5a41ba66b989b27c7bc57b38d1744cc29 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Link: [1] https://github.com/msteveb/jimtcl/commit/22277943a19c Link: [2] 0a36acbf6ac6 ("configure: build jimtcl with json extension") Link: [3] https://github.com/msteveb/jimtcl/commit/32a488587a3e Reviewed-on: https://review.openocd.org/c/openocd/+/7527 Tested-by: jenkins Reviewed-by: zapb <dev@zapb.de>
openocd: src: replace the GPL and BSD-Source-Code license tags Add the new license text in the license pool. Replace the GPL and BSD boilerplates with the SPDX tag. Add the copyright owner of Atmel, as it was explicitly listed in the BSD boilerplate text. The SPDX tag on files *.c is incorrect, as it should use the C99 single line comment using '//'. But current checkpatch doesn't allow C99 comments, so keep using standard C comments, by now. Change-Id: Ibb117dbf8402269be3e5ba4f4c472162494d813f Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7062 Tested-by: jenkins
openocd: src: replace the GPL with eCos exception 2.0 license tag Add the license exception text in the license pool. Add the exception chapter in license-rules.txt Replace the boilerplate with the SPDX tag. The SPDX tag on files *.c is incorrect, as it should use the C99 single line comment using '//'. But current checkpatch doesn't allow C99 comments, so keep using standard C comments, by now. Change-Id: Ied513b7c9c0722ed2a9c11dbdff3fbf59f1b41ce Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7061 Tested-by: jenkins
openocd: src: replace the BSD-2-Clause-Views license tag Add the license text in the license pool. Replace the BSD boilerplate with the SPDX tag. Add the copyright owner of Jim Project, as it was explicitly listed in the boilerplate text. The SPDX tag on files *.c is incorrect, as it should use the C99 single line comment using '//'. But current checkpatch doesn't allow C99 comments, so keep using standard C comments, by now. Change-Id: I6dd004b1945773c10539016ce733d1fbfe776a9d Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7060 Tested-by: jenkins
openocd: build: add SPDX tag Add the SPDX tag to makefiles, configuration scripts and tcl files present in the folders under src/ Change-Id: I1e4552aafe46ef4893d510da9d732c5f181784a4 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7051 Tested-by: jenkins
Makefile: remove workaround for jimtcl 0.80 Commit 266a945ad3e8 ("jimtcl: update to version 0.80 (2020-10-29)") adds a workaround to permit 'make distcheck' with jimtcl 0.80. This has been fixed in jimtcl with commit d224c9a2b7b2 ("Makefile: remove examples.api/Makefile while 'distclean'"). By using jimtcl from latest master branch, the workaround is not required anymore. Remove the workaround. Change-Id: I10d91371b5a89d2a3c8599bce766f97eac44f0d9 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6227 Tested-by: jenkins Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
helper: Remove src/helper from include dirs The header files under src/helper/ can currently be included with either #include <bits.h> or #include <helper/bits.h> This is because we specify both "src/" and "src/helper/" directories as include directories. Some files name under "src/helper/", such as types.h, log.h, and util.h are too generic and could be ambiguous depending on the search path. This commit remove "src/helper/" from our include dir and make C files include explicitly. Change-Id: I38fc9b96ba01a513d4a72757d40007e21b502f25 Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6507 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Makefile: add special target .DELETE_ON_ERROR The special .DELETE_ON_ERROR deletes the target file on recipe error. Otherwise, an incomplete output file may be considered up to date the next time around. .DELETE_ON_ERROR provides reasonable protection at virtually no cost. Signed-off-by: R. Diez <rdiezmail-openocd@yahoo.de> Change-Id: I67dca47ae5ddf3786993c87b9991b3046a85f00b Reviewed-on: http://openocd.zylin.com/6235 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
LICENSES: Add the MIT license Add the full text of the MIT license to the kernel tree. It was copied directly from: https://spdx.org/licenses/MIT.html#licenseText Add the required tags for reference and tooling. Change-Id: I94a5dea5ced6421809ea2a3448f8dda19a93f5c9 Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/6219 Tested-by: jenkins
LICENSES: add 'license-rules.txt' Add a file to the LICENSES directory to describe how file licenses should be described in all the OpenOCD files, using the SPDX identifier, as well as where all licenses should be in the source tree for people to refer to (LICENSES/). This file is mainly copied from the Linux kernel file in Documentation/process/license-rules.rst originally written by Thomas Gleixner <tglx@linutronix.de>, with specific adaptations for OpenOCD. Change-Id: I7a98fc756df90dc86dbc6e0c47c009a610a0318d Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5973 Tested-by: jenkins Reviewed-by: Tim Newsome <tim@sifive.com>
LICENSES: add the BSD 1-clause license Add the full text of the BSD 1-clause license. It was copied directly from: https://spdx.org/licenses/BSD-1-Clause.html#licenseText Add the required tags for reference and tooling. Change-Id: I71444e6a45d0e77fc57220cf1d579c010a27fdf3 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5972 Tested-by: jenkins
LICENSES: add the BSD 3-clause "New" or "Revised" License Add the full text of the BSD 3-clause "New" or "Revised" License to OpenOCD tree. It was copied directly from: https://spdx.org/licenses/BSD-3-Clause.html#licenseText Add the required tags for reference and tooling. Change-Id: I0e7977ed92af9d58a4a72152dd792045b237f2f0 Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5971 Tested-by: jenkins
LICENSES: add the BSD 2-clause "Simplified" license Add the full text of the BSD 2-clause "Simplified" license to OpenOCD tree. It was copied directly from: https://spdx.org/licenses/BSD-2-Clause.html#licenseText Add the required tags for reference and tooling. Change-Id: I1c2fb8ad7510ddd0d745308c0a9acc2764c31f4e Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5970 Tested-by: jenkins
LICENSES: add the GFDL-1.2 license The documentation of OpenOCD is released under the GNU Free Documentation License, version 1.2, with embedded some part of OpenOCD code released under the GNU GPL-2.0-or-later. Update doc/fdl.texi with latest minor fixes as in https://www.gnu.org/licenses/old-licenses/fdl-1.2.texi Update doc/openocd.texi and move here the license chapter title Add license file LICENSES/preferred/GFDL-1.2 from https://www.gnu.org/licenses/old-licenses/fdl-1.2.txt and add the required tags for reference and tooling, coping mostly from the Linux kernel license file in the 'deprecated' folder. Add a readme file to link to the existing texinfo copy of the license. Change-Id: Ief96e0686257be7a70d4eeec442848bd6494763d Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5969 Tested-by: jenkins
LICENSES: add the GPL-3.0 license for stand-alone code The stand-alone application "contrib/itmdump.c" is released as GPL-3.0-or-later. Add GPL-3.0 license in the licenses list. Copy in subfolder stand-alone the GPL-3.0 from https://www.gnu.org/licenses/gpl-3.0.txt adding the header required by spdxcheck.py. Change-Id: I238efc411e07ed6bc1eba23edbc91b3825c3d2c7 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5968 Tested-by: jenkins
LICENSES: move the GPL-2.0 license as required by checkpatch The script spdxcheck.py (used by checkpatch.pl) searches for the license files in a dedicated folder, split in the subfolders: "preferred", "dual", "deprecated", "exceptions". Move the GPL-2.0 license from COPYING to the subfolder preferred, adding the header required by spdxcheck.py. The header is copied from equivalent file in the Linux kernel, made by Thomas Gleixner <tglx@linutronix.de>. Note: the license in COPYING matches exactly https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt Add a minimalist COPYING in the top directory, as required by automake, pointing to the files in LICENSES. Change-Id: I1fd0abc57b554d74f0b00fabd6c8c822b2c4acb5 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5967 Tested-by: jenkins
jimtcl: update to version 0.80 (2020-10-29) Update jimtcl to version 0.80. Add a workaround in Makefile.am to allow 'make distcheck' with the new jimtcl. A fix is already merged upstream but will be part of the future release 0.81 of jimtcl. Change-Id: I1cebfb9c17179114960dc771e0b31836b4b9b058 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5949 Tested-by: jenkins