License cleanup: add SPDX GPL-2.0 license identifier to files with no license
Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.
By default all files without license information are under the default
license of the kernel, which is GPL version 2.
Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier. The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.
This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.
How this work was done:
Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
- file had no licensing information it it.
- file was a */uapi/* one with no licensing information in it,
- file was a */uapi/* one with existing licensing information,
Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.
The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne. Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.
The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed. Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.
Criteria used to select files for SPDX license identifier tagging was:
- Files considered eligible had to be source code files.
- Make and config files were included as candidates if they contained >5
lines of source
- File already had some variant of a license header in it (even if <5
lines).
All documentation files were explicitly excluded.
The following heuristics were used to determine which SPDX license
identifiers to apply.
- when both scanners couldn't find any license traces, file was
considered to have no license information in it, and the top level
COPYING file license applied.
For non */uapi/* files that summary was:
SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 11139
and resulted in the first patch in this series.
If that file was a */uapi/* path one, it was "GPL-2.0 WITH
Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was:
SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 WITH Linux-syscall-note 930
and resulted in the second patch in this series.
- if a file had some form of licensing information in it, and was one
of the */uapi/* ones, it was denoted with the Linux-syscall-note if
any GPL family license was found in the file or had no licensing in
it (per prior point). Results summary:
SPDX license identifier # files
---------------------------------------------------|------
GPL-2.0 WITH Linux-syscall-note 270
GPL-2.0+ WITH Linux-syscall-note 169
((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21
((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17
LGPL-2.1+ WITH Linux-syscall-note 15
GPL-1.0+ WITH Linux-syscall-note 14
((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5
LGPL-2.0+ WITH Linux-syscall-note 4
LGPL-2.1 WITH Linux-syscall-note 3
((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3
((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1
and that resulted in the third patch in this series.
- when the two scanners agreed on the detected license(s), that became
the concluded license(s).
- when there was disagreement between the two scanners (one detected a
license but the other didn't, or they both detected different
licenses) a manual inspection of the file occurred.
- In most cases a manual inspection of the information in the file
resulted in a clear resolution of the license that should apply (and
which scanner probably needed to revisit its heuristics).
- When it was not immediately clear, the license identifier was
confirmed with lawyers working with the Linux Foundation.
- If there was any question as to the appropriate license identifier,
the file was flagged for further research and to be revisited later
in time.
In total, over 70 hours of logged manual review was done on the
spreadsheet to determine the SPDX license identifiers to apply to the
source files by Kate, Philippe, Thomas and, in some cases, confirmation
by lawyers working with the Linux Foundation.
Kate also obtained a third independent scan of the 4.13 code base from
FOSSology, and compared selected files where the other two scanners
disagreed against that SPDX file, to see if there was new insights. The
Windriver scanner is based on an older version of FOSSology in part, so
they are related.
Thomas did random spot checks in about 500 files from the spreadsheets
for the uapi headers and agreed with SPDX license identifier in the
files he inspected. For the non-uapi files Thomas did random spot checks
in about 15000 files.
In initial set of patches against 4.14-rc6, 3 files were found to have
copy/paste license identifier errors, and have been fixed to reflect the
correct identifier.
Additionally Philippe spent 10 hours this week doing a detailed manual
inspection and review of the 12,461 patched files from the initial patch
version early this week with:
- a full scancode scan run, collecting the matched texts, detected
license ids and scores
- reviewing anything where there was a license detected (about 500+
files) to ensure that the applied SPDX license was correct
- reviewing anything where there was no detection but the patch license
was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
SPDX license was correct
This produced a worksheet with 20 files needing minor correction. This
worksheet was then exported into 3 different .csv files for the
different types of files to be modified.
These .csv files were then reviewed by Greg. Thomas wrote a script to
parse the csv files and add the proper SPDX tag to the file, in the
format that the file expected. This script was further refined by Greg
based on the output to detect more types of files automatically and to
distinguish between header and source .c files (which need different
comment types.) Finally Greg ran the script using the .csv files to
generate the patches.
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-01 15:07:57 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-08-25 13:51:47 +10:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-05-29 15:37:12 +10:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-09-27 22:47:03 +10:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2018-05-30 22:19:20 +10:00
|
|
|
|
2020-11-20 14:40:33 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-05-30 22:19:20 +10:00
|
|
|
|
2020-11-20 14:40:33 -08:00
|
|
|
|
2018-05-30 22:19:20 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-04-24 09:23:39 +02:00
|
|
|
|
2023-06-06 16:46:54 +10:00
|
|
|
|
|
|
|
|
|
2023-02-15 11:41:15 -07:00
|
|
|
|
2023-06-06 16:46:54 +10:00
|
|
|
|
2023-02-15 11:41:15 -07:00
|
|
|
|
powerpc/boot: Fix 64-bit boot wrapper build with non-biarch compiler
Historically the boot wrapper was always built 32-bit big endian, even
for 64-bit kernels. That was because old firmwares didn't necessarily
support booting a 64-bit image. Because of that arch/powerpc/boot/Makefile
uses CROSS32CC for compilation.
However when we added 64-bit little endian support, we also added
support for building the boot wrapper 64-bit. However we kept using
CROSS32CC, because in most cases it is just CC and everything works.
However if the user doesn't specify CROSS32_COMPILE (which no one ever
does AFAIK), and CC is *not* biarch (32/64-bit capable), then CROSS32CC
becomes just "gcc". On native systems that is probably OK, but if we're
cross building it definitely isn't, leading to eg:
gcc ... -m64 -mlittle-endian -mabi=elfv2 ... arch/powerpc/boot/cpm-serial.c
gcc: error: unrecognized argument in option ‘-mabi=elfv2’
gcc: error: unrecognized command line option ‘-mlittle-endian’
make: *** [zImage] Error 2
To fix it, stop using CROSS32CC, because we may or may not be building
32-bit. Instead setup a BOOTCC, which defaults to CC, and only use
CROSS32_COMPILE if it's set and we're building for 32-bit.
Fixes: 147c05168fc8 ("powerpc/boot: Add support for 64bit little endian wrapper")
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Cyril Bur <cyrilbur@gmail.com>
2017-07-26 23:19:04 +10:00
|
|
|
|
2023-06-06 16:46:54 +10:00
|
|
|
|
powerpc/boot: Build wrapper for an appropriate CPU
Currently the boot wrapper lacks a -mcpu option, so it will be built for
the toolchain's default cpu. This is a problem if the toolchain defaults
to a cpu with newer instructions.
We could wire in TARGET_CPU but instead use the oldest supported option
so the wrapper runs anywhere.
The GCC documentation stays that -mcpu=powerpc64le will give us a
generic 64 bit powerpc machine:
-mcpu=powerpc, -mcpu=powerpc64, and -mcpu=powerpc64le specify pure
32-bit PowerPC (either endian), 64-bit big endian PowerPC and 64-bit
little endian PowerPC architecture machine types, with an appropriate,
generic processor model assumed for scheduling purposes.
So do that for each of the three machines.
This bug was found when building the kernel with a toolchain that
defaulted to powre10, resulting in a pcrel enabled wrapper which fails
to link:
arch/powerpc/boot/wrapper.a(crt0.o): in function `p_base':
(.text+0x150): call to `platform_init' lacks nop, can't restore toc; (toc save/adjust stub)
(.text+0x154): call to `start' lacks nop, can't restore toc; (toc save/adjust stub)
powerpc64le-buildroot-linux-gnu-ld: final link failed: bad value
Even with tha bug worked around the resulting kernel would crash on a
power9 box:
$ qemu-system-ppc64 -nographic -nodefaults -M powernv9 -kernel arch/powerpc/boot/zImage.epapr -serial mon:stdio
[ 7.069331356,5] INIT: Starting kernel at 0x20010020, fdt at 0x3068c628 25694 bytes
[ 7.130374661,3] ***********************************************
[ 7.131072886,3] Fatal Exception 0xe40 at 00000000200101e4 MSR 9000000000000001
[ 7.131290613,3] CFAR : 000000002001027c MSR : 9000000000000001
[ 7.131433759,3] SRR0 : 0000000020010050 SRR1 : 9000000000000001
[ 7.131577775,3] HSRR0: 00000000200101e4 HSRR1: 9000000000000001
[ 7.131733687,3] DSISR: 00000000 DAR : 0000000000000000
[ 7.131905162,3] LR : 0000000020010280 CTR : 0000000000000000
[ 7.132068356,3] CR : 44002004 XER : 00000000
Signed-off-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Murilo Opsfelder Araujo <muriloo@linux.ibm.com>
Reviewed-by: Segher Boessenkool <segher@kernel.crashing.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
BugLink: https://github.com/linuxppc/issues/issues/400
Link: https://lore.kernel.org/r/20220330112437.540214-1-joel@jms.id.au
2022-03-30 21:54:37 +10:30
|
|
|
|
2023-01-25 08:39:00 +01:00
|
|
|
|
|
|
|
|
|
2023-06-06 16:46:54 +10:00
|
|
|
|
2023-01-25 08:39:00 +01:00
|
|
|
|
|
|
|
|
|
2023-06-06 16:46:54 +10:00
|
|
|
|
powerpc/boot: Build wrapper for an appropriate CPU
Currently the boot wrapper lacks a -mcpu option, so it will be built for
the toolchain's default cpu. This is a problem if the toolchain defaults
to a cpu with newer instructions.
We could wire in TARGET_CPU but instead use the oldest supported option
so the wrapper runs anywhere.
The GCC documentation stays that -mcpu=powerpc64le will give us a
generic 64 bit powerpc machine:
-mcpu=powerpc, -mcpu=powerpc64, and -mcpu=powerpc64le specify pure
32-bit PowerPC (either endian), 64-bit big endian PowerPC and 64-bit
little endian PowerPC architecture machine types, with an appropriate,
generic processor model assumed for scheduling purposes.
So do that for each of the three machines.
This bug was found when building the kernel with a toolchain that
defaulted to powre10, resulting in a pcrel enabled wrapper which fails
to link:
arch/powerpc/boot/wrapper.a(crt0.o): in function `p_base':
(.text+0x150): call to `platform_init' lacks nop, can't restore toc; (toc save/adjust stub)
(.text+0x154): call to `start' lacks nop, can't restore toc; (toc save/adjust stub)
powerpc64le-buildroot-linux-gnu-ld: final link failed: bad value
Even with tha bug worked around the resulting kernel would crash on a
power9 box:
$ qemu-system-ppc64 -nographic -nodefaults -M powernv9 -kernel arch/powerpc/boot/zImage.epapr -serial mon:stdio
[ 7.069331356,5] INIT: Starting kernel at 0x20010020, fdt at 0x3068c628 25694 bytes
[ 7.130374661,3] ***********************************************
[ 7.131072886,3] Fatal Exception 0xe40 at 00000000200101e4 MSR 9000000000000001
[ 7.131290613,3] CFAR : 000000002001027c MSR : 9000000000000001
[ 7.131433759,3] SRR0 : 0000000020010050 SRR1 : 9000000000000001
[ 7.131577775,3] HSRR0: 00000000200101e4 HSRR1: 9000000000000001
[ 7.131733687,3] DSISR: 00000000 DAR : 0000000000000000
[ 7.131905162,3] LR : 0000000020010280 CTR : 0000000000000000
[ 7.132068356,3] CR : 44002004 XER : 00000000
Signed-off-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Murilo Opsfelder Araujo <muriloo@linux.ibm.com>
Reviewed-by: Segher Boessenkool <segher@kernel.crashing.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
BugLink: https://github.com/linuxppc/issues/issues/400
Link: https://lore.kernel.org/r/20220330112437.540214-1-joel@jms.id.au
2022-03-30 21:54:37 +10:30
|
|
|
|
2023-06-06 16:46:54 +10:00
|
|
|
|
2023-01-25 08:39:00 +01:00
|
|
|
|
powerpc/boot: Fix 64-bit boot wrapper build with non-biarch compiler
Historically the boot wrapper was always built 32-bit big endian, even
for 64-bit kernels. That was because old firmwares didn't necessarily
support booting a 64-bit image. Because of that arch/powerpc/boot/Makefile
uses CROSS32CC for compilation.
However when we added 64-bit little endian support, we also added
support for building the boot wrapper 64-bit. However we kept using
CROSS32CC, because in most cases it is just CC and everything works.
However if the user doesn't specify CROSS32_COMPILE (which no one ever
does AFAIK), and CC is *not* biarch (32/64-bit capable), then CROSS32CC
becomes just "gcc". On native systems that is probably OK, but if we're
cross building it definitely isn't, leading to eg:
gcc ... -m64 -mlittle-endian -mabi=elfv2 ... arch/powerpc/boot/cpm-serial.c
gcc: error: unrecognized argument in option ‘-mabi=elfv2’
gcc: error: unrecognized command line option ‘-mlittle-endian’
make: *** [zImage] Error 2
To fix it, stop using CROSS32CC, because we may or may not be building
32-bit. Instead setup a BOOTCC, which defaults to CC, and only use
CROSS32_COMPILE if it's set and we're building for 32-bit.
Fixes: 147c05168fc8 ("powerpc/boot: Add support for 64bit little endian wrapper")
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Cyril Bur <cyrilbur@gmail.com>
2017-07-26 23:19:04 +10:00
|
|
|
|
|
|
|
|
|
2023-06-06 16:46:54 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-04-24 09:23:39 +02:00
|
|
|
|
2023-06-06 16:46:54 +10:00
|
|
|
|
2015-09-15 11:24:17 +10:00
|
|
|
|
2023-06-06 16:46:54 +10:00
|
|
|
|
2022-05-09 07:36:06 +02:00
|
|
|
|
2014-04-24 09:23:39 +02:00
|
|
|
|
2023-06-06 16:46:57 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-06-06 16:48:30 +10:00
|
|
|
|
2023-06-06 16:46:57 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-06-06 16:48:30 +10:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2019-09-21 15:49:54 +09:00
|
|
|
|
2018-05-30 22:19:20 +10:00
|
|
|
|
2018-11-12 14:51:16 +10:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-10-04 14:05:01 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-07-02 13:02:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-09-14 22:17:23 +10:00
|
|
|
|
2016-06-15 17:45:46 +02:00
|
|
|
|
2005-10-28 17:46:38 -07:00
|
|
|
|
2010-12-22 11:57:28 -08:00
|
|
|
|
2008-06-26 18:58:11 +10:00
|
|
|
|
2016-09-22 16:54:31 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-01-03 17:16:04 -06:00
|
|
|
|
|
|
|
|
|
2016-09-22 16:54:31 +10:00
|
|
|
|
|
|
|
|
|
2016-09-22 16:54:30 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-12-21 15:39:28 +11:00
|
|
|
|
2016-09-22 16:54:31 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-09-22 16:54:30 +10:00
|
|
|
|
|
|
|
|
|
2006-09-27 22:47:03 +10:00
|
|
|
|
2009-04-30 15:25:53 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-02-23 12:55:59 -08:00
|
|
|
|
|
|
|
|
|
2009-04-30 15:25:53 +10:00
|
|
|
|
|
|
|
|
|
2017-05-12 01:56:50 +10:00
|
|
|
|
2009-04-30 15:25:53 +10:00
|
|
|
|
2007-03-05 14:24:52 +11:00
|
|
|
|
2016-09-22 16:54:31 +10:00
|
|
|
|
2017-11-08 22:05:29 +11:00
|
|
|
|
2017-11-08 22:05:28 +11:00
|
|
|
|
2020-07-24 23:17:26 +10:00
|
|
|
|
2021-10-11 09:03:56 +02:00
|
|
|
|
2017-05-12 01:56:50 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-03 15:00:39 +00:00
|
|
|
|
2017-08-08 13:58:54 +02:00
|
|
|
|
2012-04-03 15:00:39 +00:00
|
|
|
|
2018-04-05 18:17:19 -07:00
|
|
|
|
2017-11-08 22:05:29 +11:00
|
|
|
|
2012-04-03 15:00:39 +00:00
|
|
|
|
2013-09-24 16:10:38 +10:00
|
|
|
|
2012-04-03 15:00:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-03-06 14:52:27 +11:00
|
|
|
|
2020-05-21 16:55:52 +00:00
|
|
|
|
2017-08-08 13:58:54 +02:00
|
|
|
|
2012-04-03 15:00:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-02-25 15:13:16 -05:00
|
|
|
|
2018-04-05 18:17:16 -07:00
|
|
|
|
|
|
|
|
|
2014-02-05 20:35:13 -05:00
|
|
|
|
2012-04-03 15:00:39 +00:00
|
|
|
|
|
|
|
|
|
2013-09-24 16:10:38 +10:00
|
|
|
|
2014-04-24 09:23:38 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-30 11:47:16 +02:00
|
|
|
|
2012-04-03 15:00:39 +00:00
|
|
|
|
2021-06-18 13:49:43 +10:00
|
|
|
|
|
|
|
|
|
2012-04-03 15:00:39 +00:00
|
|
|
|
|
|
|
|
|
[POWERPC] zImage: Cleanup and improve zImage entry point
This patch re-organises the way the zImage wrapper code is entered, to
allow more flexibility on platforms with unusual entry conditions.
After this patch, a platform .o file has two options:
1) It can define a _zimage_start, in which case the platform code gets
control from the very beginning of execution. In this case the
platform code is responsible for relocating the zImage if necessary,
clearing the BSS, performing any platform specific initialization, and
finally calling start() to load and enter the kernel.
2) It can define platform_init(). In this case the generic crt0.S
handles initial entry, and calls platform_init() before calling
start(). The signature of platform_init() is changed, however, to
take up to 5 parameters (in r3..r7) as they come from the platform's
initial loader, instead of a fixed set of parameters based on OF's
usage.
When using the generic crt0.S, the platform .o can optionally
supply a custom stack to use, using the BSS_STACK() macro. If this
is not supplied, the crt0.S will assume that the loader has
supplied a usable stack.
In either case, the platform code communicates information to the
generic code (specifically, a PROM pointer for OF systems, and/or an
initrd image address supplied by the bootloader) via a global
structure "loader_info".
In addition the wrapper script is rearranged to ensure that the
platform .o is always linked first. This means that platforms where
the zImage entry point is at a fixed address or offset, rather than
being encoded in the binary header can be supported using option (1).
Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-03-05 14:24:52 +11:00
|
|
|
|
2006-09-27 22:47:03 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-09-06 08:48:54 +00:00
|
|
|
|
2006-09-27 22:47:03 +10:00
|
|
|
|
2016-09-22 16:54:29 +10:00
|
|
|
|
|
|
|
|
|
2005-10-28 17:46:38 -07:00
|
|
|
|
2016-09-22 16:54:30 +10:00
|
|
|
|
2016-09-22 16:54:29 +10:00
|
|
|
|
2005-10-28 17:46:38 -07:00
|
|
|
|
2016-09-22 16:54:30 +10:00
|
|
|
|
2016-09-22 16:54:29 +10:00
|
|
|
|
2005-10-28 17:46:38 -07:00
|
|
|
|
2016-09-22 16:54:30 +10:00
|
|
|
|
2016-09-22 16:54:29 +10:00
|
|
|
|
2005-10-28 17:46:38 -07:00
|
|
|
|
2016-09-22 16:54:31 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-04-30 15:25:53 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-09-27 22:47:03 +10:00
|
|
|
|
2016-08-11 16:03:13 +10:00
|
|
|
|
2005-10-28 17:46:38 -07:00
|
|
|
|
kbuild: use $(src) instead of $(srctree)/$(src) for source directory
Kbuild conventionally uses $(obj)/ for generated files, and $(src)/ for
checked-in source files. It is merely a convention without any functional
difference. In fact, $(obj) and $(src) are exactly the same, as defined
in scripts/Makefile.build:
src := $(obj)
When the kernel is built in a separate output directory, $(src) does
not accurately reflect the source directory location. While Kbuild
resolves this discrepancy by specifying VPATH=$(srctree) to search for
source files, it does not cover all cases. For example, when adding a
header search path for local headers, -I$(srctree)/$(src) is typically
passed to the compiler.
This introduces inconsistency between upstream and downstream Makefiles
because $(src) is used instead of $(srctree)/$(src) for the latter.
To address this inconsistency, this commit changes the semantics of
$(src) so that it always points to the directory in the source tree.
Going forward, the variables used in Makefiles will have the following
meanings:
$(obj) - directory in the object tree
$(src) - directory in the source tree (changed by this commit)
$(objtree) - the top of the kernel object tree
$(srctree) - the top of the kernel source tree
Consequently, $(srctree)/$(src) in upstream Makefiles need to be replaced
with $(src).
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
2024-04-27 23:55:02 +09:00
|
|
|
|
2016-08-11 16:03:13 +10:00
|
|
|
|
2006-09-27 22:47:03 +10:00
|
|
|
|
2016-09-22 16:54:30 +10:00
|
|
|
|
2016-09-22 16:54:31 +10:00
|
|
|
|
2019-07-05 19:01:44 +09:00
|
|
|
|
2005-10-28 17:46:38 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2023-06-06 16:46:55 +10:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2023-06-06 16:46:55 +10:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-09-27 22:47:03 +10:00
|
|
|
|
2019-01-17 19:02:43 +09:00
|
|
|
|
2005-08-15 13:59:13 -07:00
|
|
|
|
2009-04-30 15:25:53 +10:00
|
|
|
|
|
|
|
|
|
2007-03-21 09:02:37 -06:00
|
|
|
|
2007-12-10 14:28:39 +11:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-03-21 09:02:37 -06:00
|
|
|
|
2007-12-10 14:28:39 +11:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2007-03-21 09:02:37 -06:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2020-02-02 01:49:24 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2021-06-11 21:11:04 +10:00
|
|
|
|
[POWERPC] zImage: Cleanup and improve zImage entry point
This patch re-organises the way the zImage wrapper code is entered, to
allow more flexibility on platforms with unusual entry conditions.
After this patch, a platform .o file has two options:
1) It can define a _zimage_start, in which case the platform code gets
control from the very beginning of execution. In this case the
platform code is responsible for relocating the zImage if necessary,
clearing the BSS, performing any platform specific initialization, and
finally calling start() to load and enter the kernel.
2) It can define platform_init(). In this case the generic crt0.S
handles initial entry, and calls platform_init() before calling
start(). The signature of platform_init() is changed, however, to
take up to 5 parameters (in r3..r7) as they come from the platform's
initial loader, instead of a fixed set of parameters based on OF's
usage.
When using the generic crt0.S, the platform .o can optionally
supply a custom stack to use, using the BSS_STACK() macro. If this
is not supplied, the crt0.S will assume that the loader has
supplied a usable stack.
In either case, the platform code communicates information to the
generic code (specifically, a PROM pointer for OF systems, and/or an
initrd image address supplied by the bootloader) via a global
structure "loader_info".
In addition the wrapper script is rearranged to ensure that the
platform .o is always linked first. This means that platforms where
the zImage entry point is at a fixed address or offset, rather than
being encoded in the binary header can be supported using option (1).
Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-03-05 14:24:52 +11:00
|
|
|
|
2007-07-04 09:07:18 +10:00
|
|
|
|
2006-01-14 15:04:06 +11:00
|
|
|
|
kbuild: use $(src) instead of $(srctree)/$(src) for source directory
Kbuild conventionally uses $(obj)/ for generated files, and $(src)/ for
checked-in source files. It is merely a convention without any functional
difference. In fact, $(obj) and $(src) are exactly the same, as defined
in scripts/Makefile.build:
src := $(obj)
When the kernel is built in a separate output directory, $(src) does
not accurately reflect the source directory location. While Kbuild
resolves this discrepancy by specifying VPATH=$(srctree) to search for
source files, it does not cover all cases. For example, when adding a
header search path for local headers, -I$(srctree)/$(src) is typically
passed to the compiler.
This introduces inconsistency between upstream and downstream Makefiles
because $(src) is used instead of $(srctree)/$(src) for the latter.
To address this inconsistency, this commit changes the semantics of
$(src) so that it always points to the directory in the source tree.
Going forward, the variables used in Makefiles will have the following
meanings:
$(obj) - directory in the object tree
$(src) - directory in the source tree (changed by this commit)
$(objtree) - the top of the kernel object tree
$(srctree) - the top of the kernel source tree
Consequently, $(srctree)/$(src) in upstream Makefiles need to be replaced
with $(src).
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
2024-04-27 23:55:02 +09:00
|
|
|
|
2008-02-07 05:18:34 +11:00
|
|
|
|
kbuild: use $(src) instead of $(srctree)/$(src) for source directory
Kbuild conventionally uses $(obj)/ for generated files, and $(src)/ for
checked-in source files. It is merely a convention without any functional
difference. In fact, $(obj) and $(src) are exactly the same, as defined
in scripts/Makefile.build:
src := $(obj)
When the kernel is built in a separate output directory, $(src) does
not accurately reflect the source directory location. While Kbuild
resolves this discrepancy by specifying VPATH=$(srctree) to search for
source files, it does not cover all cases. For example, when adding a
header search path for local headers, -I$(srctree)/$(src) is typically
passed to the compiler.
This introduces inconsistency between upstream and downstream Makefiles
because $(src) is used instead of $(srctree)/$(src) for the latter.
To address this inconsistency, this commit changes the semantics of
$(src) so that it always points to the directory in the source tree.
Going forward, the variables used in Makefiles will have the following
meanings:
$(obj) - directory in the object tree
$(src) - directory in the source tree (changed by this commit)
$(objtree) - the top of the kernel object tree
$(srctree) - the top of the kernel source tree
Consequently, $(srctree)/$(src) in upstream Makefiles need to be replaced
with $(src).
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
2024-04-27 23:55:02 +09:00
|
|
|
|
2009-04-30 15:25:53 +10:00
|
|
|
|
2007-03-21 09:02:37 -06:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-09-27 22:47:03 +10:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-09-27 22:47:03 +10:00
|
|
|
|
2006-09-30 11:54:09 +10:00
|
|
|
|
2006-09-27 22:47:03 +10:00
|
|
|
|
|
|
|
|
|
2006-09-30 11:54:09 +10:00
|
|
|
|
2006-09-27 22:47:03 +10:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2016-09-22 16:54:33 +10:00
|
|
|
|
2016-09-22 16:54:34 +10:00
|
|
|
|
2019-06-14 10:16:24 +00:00
|
|
|
|
2019-06-14 10:16:25 +00:00
|
|
|
|
2016-09-22 16:54:33 +10:00
|
|
|
|
2007-03-21 09:03:23 -06:00
|
|
|
|
2006-09-27 22:47:03 +10:00
|
|
|
|
2016-09-22 16:54:33 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-09-27 22:47:03 +10:00
|
|
|
|
2006-10-07 15:33:53 -07:00
|
|
|
|
2011-09-19 17:44:52 +00:00
|
|
|
|
2006-10-07 15:33:53 -07:00
|
|
|
|
2008-02-22 05:57:07 +11:00
|
|
|
|
2006-10-07 15:33:53 -07:00
|
|
|
|
2006-11-17 17:08:37 +01:00
|
|
|
|
2006-10-07 15:33:53 -07:00
|
|
|
|
2008-09-09 04:00:28 +00:00
|
|
|
|
2007-05-03 04:00:00 +10:00
|
|
|
|
2011-04-14 18:29:16 +00:00
|
|
|
|
2007-05-03 04:00:00 +10:00
|
|
|
|
2008-02-07 05:18:34 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-01-03 18:59:37 +11:00
|
|
|
|
2008-02-07 05:18:34 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-05-08 14:10:01 +10:00
|
|
|
|
2007-09-15 04:54:11 +10:00
|
|
|
|
2008-05-20 01:20:47 +10:00
|
|
|
|
2007-08-29 17:38:30 +04:00
|
|
|
|
2007-10-31 03:56:06 +11:00
|
|
|
|
2007-12-21 15:39:28 +11:00
|
|
|
|
2007-12-21 15:39:34 +11:00
|
|
|
|
2008-01-11 17:17:51 +11:00
|
|
|
|
2008-03-06 21:15:52 -06:00
|
|
|
|
2010-03-05 10:45:54 +00:00
|
|
|
|
|
|
|
|
|
2011-11-30 21:39:24 +00:00
|
|
|
|
2014-03-06 14:52:27 +11:00
|
|
|
|
2005-08-15 13:59:13 -07:00
|
|
|
|
2008-02-07 05:18:34 +11:00
|
|
|
|
2008-05-22 03:38:28 +10:00
|
|
|
|
|
|
|
|
|
2008-02-22 05:57:07 +11:00
|
|
|
|
2008-02-07 05:18:34 +11:00
|
|
|
|
2008-02-22 05:57:07 +11:00
|
|
|
|
2008-02-07 05:18:34 +11:00
|
|
|
|
|
|
|
|
|
2015-10-13 13:24:16 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-02-07 05:18:34 +11:00
|
|
|
|
|
|
|
|
|
2008-02-22 05:57:07 +11:00
|
|
|
|
2008-02-07 05:18:34 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-05-08 13:47:00 +01:00
|
|
|
|
2008-02-07 05:18:34 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-06-06 13:50:04 +02:00
|
|
|
|
2008-02-07 05:18:34 +11:00
|
|
|
|
|
|
|
|
|
2008-03-04 19:34:26 +03:00
|
|
|
|
2008-02-07 05:18:34 +11:00
|
|
|
|
2016-05-30 11:47:16 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-02-07 05:18:34 +11:00
|
|
|
|
|
|
|
|
|
2009-12-12 06:31:36 +00:00
|
|
|
|
2009-12-12 06:31:45 +00:00
|
|
|
|
2014-01-09 13:01:22 +11:00
|
|
|
|
2008-01-17 16:31:40 -06:00
|
|
|
|
2009-02-10 12:26:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-06-18 13:49:43 +10:00
|
|
|
|
|
|
|
|
|
2006-01-15 13:00:08 +11:00
|
|
|
|
|
|
|
|
|
2018-08-06 13:42:03 -03:00
|
|
|
|
2006-09-27 22:47:03 +10:00
|
|
|
|
|
|
|
|
|
2006-01-14 15:04:06 +11:00
|
|
|
|
2008-07-09 09:41:52 -06:00
|
|
|
|
kbuild: do not quote string values in include/config/auto.conf
The previous commit fixed up all shell scripts to not include
include/config/auto.conf.
Now that include/config/auto.conf is only included by Makefiles,
we can change it into a more Make-friendly form.
Previously, Kconfig output string values enclosed with double-quotes
(both in the .config and include/config/auto.conf):
CONFIG_X="foo bar"
Unlike shell, Make handles double-quotes (and single-quotes as well)
verbatim. We must rip them off when used.
There are some patterns:
[1] $(patsubst "%",%,$(CONFIG_X))
[2] $(CONFIG_X:"%"=%)
[3] $(subst ",,$(CONFIG_X))
[4] $(shell echo $(CONFIG_X))
These are not only ugly, but also fragile.
[1] and [2] do not work if the value contains spaces, like
CONFIG_X=" foo bar "
[3] does not work correctly if the value contains double-quotes like
CONFIG_X="foo\"bar"
[4] seems to work better, but has a cost of forking a process.
Anyway, quoted strings were always PITA for our Makefiles.
This commit changes Kconfig to stop quoting in include/config/auto.conf.
These are the string type symbols referenced in Makefiles or scripts:
ACPI_CUSTOM_DSDT_FILE
ARC_BUILTIN_DTB_NAME
ARC_TUNE_MCPU
BUILTIN_DTB_SOURCE
CC_IMPLICIT_FALLTHROUGH
CC_VERSION_TEXT
CFG80211_EXTRA_REGDB_KEYDIR
EXTRA_FIRMWARE
EXTRA_FIRMWARE_DIR
EXTRA_TARGETS
H8300_BUILTIN_DTB
INITRAMFS_SOURCE
LOCALVERSION
MODULE_SIG_HASH
MODULE_SIG_KEY
NDS32_BUILTIN_DTB
NIOS2_DTB_SOURCE
OPENRISC_BUILTIN_DTB
SOC_CANAAN_K210_DTB_SOURCE
SYSTEM_BLACKLIST_HASH_LIST
SYSTEM_REVOCATION_KEYS
SYSTEM_TRUSTED_KEYS
TARGET_CPU
UNUSED_KSYMS_WHITELIST
XILINX_MICROBLAZE0_FAMILY
XILINX_MICROBLAZE0_HW_VER
XTENSA_VARIANT_NAME
I checked them one by one, and fixed up the code where necessary.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2021-12-14 11:53:53 +09:00
|
|
|
|
2008-07-09 09:41:52 -06:00
|
|
|
|
2014-10-02 15:49:15 +02:00
|
|
|
|
2007-05-08 14:10:01 +10:00
|
|
|
|
2008-02-22 05:57:07 +11:00
|
|
|
|
2008-07-01 14:17:18 -06:00
|
|
|
|
|
|
|
|
|
2007-03-21 09:03:23 -06:00
|
|
|
|
2007-03-21 09:02:37 -06:00
|
|
|
|
2020-07-13 16:56:28 +09:00
|
|
|
|
|
|
|
|
|
2020-12-15 14:29:06 +11:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-03-21 09:03:23 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-11-21 21:14:34 +11:00
|
|
|
|
2008-02-07 05:18:34 +11:00
|
|
|
|
2007-03-21 09:03:23 -06:00
|
|
|
|
2016-11-21 21:14:34 +11:00
|
|
|
|
2014-06-11 13:53:48 +02:00
|
|
|
|
2008-02-07 05:18:34 +11:00
|
|
|
|
2008-02-22 05:57:07 +11:00
|
|
|
|
2015-10-13 13:24:16 -05:00
|
|
|
|
|
|
|
|
|
2008-02-07 05:18:34 +11:00
|
|
|
|
2015-10-13 13:24:16 -05:00
|
|
|
|
|
|
|
|
|
2007-03-21 09:03:23 -06:00
|
|
|
|
2007-07-04 14:04:31 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-11-21 21:14:34 +11:00
|
|
|
|
2007-03-21 09:03:23 -06:00
|
|
|
|
|
|
|
|
|
2015-10-13 13:24:16 -05:00
|
|
|
|
|
|
|
|
|
2011-12-01 19:35:08 +00:00
|
|
|
|
2015-10-13 13:24:16 -05:00
|
|
|
|
|
|
|
|
|
2011-12-01 19:35:08 +00:00
|
|
|
|
2015-10-13 13:24:16 -05:00
|
|
|
|
|
|
|
|
|
2008-10-17 19:12:07 +00:00
|
|
|
|
2015-10-13 13:24:16 -05:00
|
|
|
|
|
|
|
|
|
2007-04-17 09:25:50 +10:00
|
|
|
|
2015-10-13 13:24:16 -05:00
|
|
|
|
|
|
|
|
|
2008-03-19 04:07:43 +11:00
|
|
|
|
2015-10-13 13:24:16 -05:00
|
|
|
|
|
|
|
|
|
2008-03-19 04:07:43 +11:00
|
|
|
|
2015-10-13 13:24:16 -05:00
|
|
|
|
|
|
|
|
|
2007-05-08 14:10:01 +10:00
|
|
|
|
2015-10-13 13:24:16 -05:00
|
|
|
|
|
|
|
|
|
2008-03-25 09:52:46 +11:00
|
|
|
|
2015-10-13 13:24:16 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-18 08:36:19 +02:00
|
|
|
|
2007-07-04 14:04:31 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-09-27 22:47:03 +10:00
|
|
|
|
2016-08-11 16:03:13 +10:00
|
|
|
|
2006-09-27 22:47:03 +10:00
|
|
|
|
2016-08-11 16:03:13 +10:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-03-28 02:21:04 -06:00
|
|
|
|
2008-05-18 13:23:03 -05:00
|
|
|
|
|
|
|
|
|
2012-03-15 18:20:13 +00:00
|
|
|
|
2024-10-13 21:29:57 +11:00
|
|
|
|
2007-03-28 02:21:04 -06:00
|
|
|
|
|
|
|
|
|
2016-09-22 16:54:31 +10:00
|
|
|
|
|
|
|
|
|
2016-09-22 16:54:34 +10:00
|
|
|
|
2022-04-30 20:04:09 +09:00
|
|
|
|
|
|
|
|
|
2007-12-03 13:56:58 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-02-02 01:49:24 +09:00
|
|
|
|
2007-12-03 13:56:58 +11:00
|
|
|
|
2011-01-08 14:24:01 +00:00
|
|
|
|
2007-12-03 13:56:58 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|