Skip to content

drivers/hal/platform/rtos: add SPDX identifier #8690

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

Merged
merged 7 commits into from
Nov 30, 2018

Conversation

0xc0170
Copy link
Contributor

@0xc0170 0xc0170 commented Nov 9, 2018

Description

We have been missing SPDX identifier in the files (one file even did not have license header file). This covers most of files in drivers/hal/platform/rtos that have apache license.

This follows our recommendation in the license docs:

In all cases, whatever license you use, please use an SPDX license identifier in every source file following the recommendations to make it easier for users to understand and review licenses.

This is a good start to consolidate licenses (many of us do copy-paste of license headers) - I noticed SPDX is missing there so better to start now to be checking for SPDX in the new files and point them to these common files for examples (lot of feature files already have it 👍 ).

Remaining folders to do: features/components and test folders (will be done separately if that is OK)

Pull request type

[X] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

@0xc0170 0xc0170 requested review from AnotherButler, melwee01 and a team November 9, 2018 12:20
@melwee01
Copy link
Contributor

LGTM, but what about copyright year?

@0xc0170
Copy link
Contributor Author

0xc0170 commented Nov 12, 2018

LGTM, but what about copyright year?

I haven't touched them as it would require more time (check when was it last changed and update the year). I believe this step should be separate - can be automated via a script to update all files. Also people should be reminded to update the year in files (we can see from here that lot of copyright years were not touched for years even though files were) .

I can send an email to all teams regarding this (using SPDX in files and updating copyright year) - from now on we start checking these 2 details more carefully.

@0xc0170
Copy link
Contributor Author

0xc0170 commented Nov 16, 2018

Waiting for approvals

Copy link
Contributor

@cmonr cmonr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a question.
Copyright year decreased?

@@ -1,5 +1,6 @@
/* mbed Microcontroller Library
* Copyright (c) 2018-2018 ARM Limited
* Copyright (c) 2006-2016 ARM Limited
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this intended?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, will fix

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@cmonr
Copy link
Contributor

cmonr commented Nov 16, 2018

/morph build

@cmonr
Copy link
Contributor

cmonr commented Nov 16, 2018

Derp. Jumped the gun a bit there.

Copy link
Contributor

@NirSonnenschein NirSonnenschein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @0xc0170,
there were a few more year changes that are not fixed yet (see comments). Is this intentional?
Other than that looks fine

@@ -1,5 +1,6 @@
/* mbed Microcontroller Library
* Copyright (c) 2018-2018 ARM Limited
* Copyright (c) 2006-2016 ARM Limited
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

more copyright year decrease changes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bad find-replace run, will fix

@@ -1,5 +1,6 @@
/* mbed Microcontroller Library
* Copyright (c) 2018-2018 ARM Limited
* Copyright (c) 2006-2016 ARM Limited
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

more copyright year decrease changes

@@ -1,5 +1,6 @@
/* mbed Microcontroller Library
* Copyright (c) 2018-2018 ARM Limited
* Copyright (c) 2006-2016 ARM Limited
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

more copyright year decrease changes

@@ -1,5 +1,6 @@
/* mbed Microcontroller Library
* Copyright (c) 2018-2018 ARM Limited
* Copyright (c) 2006-2016 ARM Limited
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

more copyright year decrease changes

@@ -1,5 +1,6 @@
/* mbed Microcontroller Library
* Copyright (c) 2018-2018 ARM Limited
* Copyright (c) 2006-2016 ARM Limited
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

more copyright year decrease changes

@0xc0170
Copy link
Contributor Author

0xc0170 commented Nov 20, 2018

This can land as a patch anytime. I'll fix the changes and update this PR

@0xc0170
Copy link
Contributor Author

0xc0170 commented Nov 28, 2018

I fixed copyright years, ready for review

Found during editing copyright message
@0xc0170
Copy link
Contributor Author

0xc0170 commented Nov 29, 2018

I fixed one style error (I was going after this one to clean master. But as I edited the file here, it failed).

@0xc0170
Copy link
Contributor Author

0xc0170 commented Nov 29, 2018

@ARMmbed/mbed-os-maintainers Waiting for reviews

@cmonr
Copy link
Contributor

cmonr commented Nov 29, 2018

Rereviewed.
CI started.

@mbed-ci
Copy link

mbed-ci commented Nov 29, 2018

Test run: SUCCESS

Summary: 4 of 4 test jobs passed
Build number : 2
Build artifacts
Build logs

@cmonr
Copy link
Contributor

cmonr commented Nov 29, 2018

Cloud Client job failed:

Link: arm-none-eabi-gcc @./BUILD/K66F/GCC_ARM/.link_options.txt
[DEBUG] Return: 0
Elf2Bin: mbed-cloud-client-example_application
FromELF: arm-none-eabi-objcopy -O binary ./BUILD/K66F/GCC_ARM/mbed-cloud-client-example_application.elf ./BUILD/K66F/GCC_ARM/mbed-cloud-client-example_application.bin
[DEBUG] Return: 0
Merging Regions
  Filling region bootloader with /builds/ws/mbed-os-ci_cloud-client-test/mbed-cloud-client-example/mbed-os/features/FEATURE_BOOTLOADER/targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_K66F/TARGET_FRDM/mbed-bootloader-k66f-block_device-sotp-v3_4_0.bin
  Padding region bootloader with 0x6c4 bytes
Traceback (most recent call last):
  File "/builds/ws/mbed-os-ci_cloud-client-test/mbed-cloud-client-example/mbed-os/tools/make.py", line 73, in wrapped_build_project
    src_dir, build_dir, mcu, *args, **kwargs
  File "/builds/ws/mbed-os-ci_cloud-client-test/mbed-cloud-client-example/mbed-os/tools/build_api.py", line 551, in build_project
    merge_region_list(region_list, res, notify)
  File "/builds/ws/mbed-os-ci_cloud-client-test/mbed-cloud-client-example/mbed-os/tools/build_api.py", line 422, in merge_region_list
    _fill_header(region_list, region).tofile(header_filename, format='hex')
  File "/builds/ws/mbed-os-ci_cloud-client-test/mbed-cloud-client-example/mbed-os/tools/build_api.py", line 392, in _fill_header
    header.puts(start, struct.pack(fmt, zlib.crc32(ih.tobinarray())))
error: integer out of range for 'L' format code
[mbed] ERROR: "/usr/bin/python" returned error.
       Code: 1
       Path: "/builds/ws/mbed-os-ci_cloud-client-test/mbed-cloud-client-example"
       Command: "/usr/bin/python -u /builds/ws/mbed-os-ci_cloud-client-test/mbed-cloud-client-example/mbed-os/tools/make.py -t GCC_ARM -m K66F --source . --build ./BUILD/K66F/GCC_ARM -v"
       Tip: You could retry the last command with "-v" flag for verbose output
...

Exporter could probably be reran, but will hold off until Cloud Client build is looked at.

hudson.remoting.FastPipedInputStream$ClosedBy: The pipe was closed at...
	at hudson.remoting.FastPipedOutputStream.error(FastPipedOutputStream.java:100)
	at hudson.remoting.FastPipedOutputStream.close(FastPipedOutputStream.java:90)
	at com.google.common.io.Closeables.close(Closeables.java:80)
	at com.google.common.io.Closeables.closeQuietly(Closeables.java:99)
	at hudson.plugins.ec2.win.winrm.WindowsProcess$2.run(WindowsProcess.java:153)
Also:   <cycle to hudson.remoting.FastPipedInputStream$ClosedBy: The pipe was closed at...>
	Caused: java.io.IOException: Pipe is already closed
Also:   <cycle to hudson.remoting.FastPipedInputStream$ClosedBy: The pipe was closed at...>
	Caused: java.io.IOException: Pipe is already closed
Caused: java.io.IOException: Pipe is already closed
....

@0xc0170
Copy link
Contributor Author

0xc0170 commented Nov 30, 2018

This is an issue on master, shall be fixed today

@0xc0170
Copy link
Contributor Author

0xc0170 commented Nov 30, 2018

Restarted cloud + exporters

@0xc0170 0xc0170 merged commit eee6401 into ARMmbed:master Nov 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants