aboutsummaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
Diffstat (limited to 'external')
-rw-r--r--external/Makefile.check1
-rw-r--r--external/common/arch_flash.h14
-rw-r--r--external/common/arch_flash_arm.c16
-rw-r--r--external/common/arch_flash_arm_io.h4
-rw-r--r--external/common/arch_flash_common.c22
-rw-r--r--external/common/arch_flash_powerpc.c16
-rw-r--r--external/common/arch_flash_x86.c16
-rwxr-xr-xexternal/common/get_arch.sh2
-rw-r--r--external/common/rules.mk2
-rw-r--r--external/devicetree/Makefile4
-rw-r--r--external/devicetree/p9-simics.dts5
-rw-r--r--external/devicetree/p9.dts5
-rw-r--r--external/ffspart/Makefile1
-rw-r--r--external/ffspart/config.h7
-rw-r--r--external/ffspart/ffspart.c17
-rw-r--r--external/ffspart/rules.mk1
-rwxr-xr-xexternal/fwts/generate-fwts-olog14
-rwxr-xr-xexternal/fwts/merge-fwts-olog14
-rw-r--r--external/gard/Makefile1
-rw-r--r--external/gard/Makefile.dist1
-rw-r--r--external/gard/config.h7
-rw-r--r--external/gard/gard.c17
-rw-r--r--external/gard/gard.h16
-rw-r--r--external/gard/rules.mk1
-rw-r--r--external/gard/units.c6
-rw-r--r--external/lpc/Makefile2
-rw-r--r--external/lpc/lpc.c17
-rw-r--r--external/mambo/Makefile2
-rw-r--r--external/mambo/mambo-socket-proxy.c18
-rw-r--r--external/mambo/mambo_utils.tcl3
-rw-r--r--external/mambo/qtrace_utils.tcl2
-rw-r--r--external/mambo/skiboot.tcl7
-rw-r--r--external/memboot/Makefile1
-rw-r--r--external/memboot/memboot.c19
-rwxr-xr-xexternal/npu/run_procedure.sh18
-rw-r--r--external/opal-prd/Makefile1
-rw-r--r--external/opal-prd/config.h7
-rw-r--r--external/opal-prd/hostboot-interface.h20
-rw-r--r--external/opal-prd/i2c.c17
-rw-r--r--external/opal-prd/i2c.h3
-rw-r--r--external/opal-prd/module.c17
-rw-r--r--external/opal-prd/module.h17
-rw-r--r--external/opal-prd/opal-prd.c18
-rw-r--r--external/opal-prd/opal-prd.h18
-rw-r--r--external/opal-prd/pnor.c17
-rw-r--r--external/opal-prd/pnor.h3
-rw-r--r--external/opal-prd/test/test_pnor.c17
-rw-r--r--external/opal-prd/test/test_pnor_ops.c3
-rw-r--r--external/opal-prd/thunk.S3
-rw-r--r--external/pflash/Makefile1
-rw-r--r--external/pflash/Makefile.dist1
-rwxr-xr-xexternal/pflash/build-all-arch.sh2
-rw-r--r--external/pflash/config.h7
-rw-r--r--external/pflash/pflash.c18
-rw-r--r--external/pflash/progress.c7
-rw-r--r--external/pflash/progress.h5
-rw-r--r--external/pflash/rules.mk2
-rw-r--r--external/pflash/test/tests/00-usage1
-rw-r--r--external/pflash/test/tests/01-info1
-rw-r--r--external/pflash/test/tests/02-erase1
-rw-r--r--external/pflash/test/tests/03-erase-parts1
-rw-r--r--external/pflash/test/tests/04-program-rand1
-rw-r--r--external/pflash/test/tests/05-bad-numbers1
-rw-r--r--external/pflash/test/tests/06-miscprint1
-rw-r--r--external/read_esel.sh15
-rw-r--r--external/shared/Makefile1
-rw-r--r--external/shared/config.h7
-rw-r--r--external/shared/rules.mk1
-rwxr-xr-xexternal/test/test.sh17
-rw-r--r--external/trace/Makefile1
-rw-r--r--external/trace/dump_trace.c17
-rw-r--r--external/trace/trace.c19
-rw-r--r--external/trace/trace.h17
-rw-r--r--external/xscom-utils/Makefile1
-rwxr-xr-xexternal/xscom-utils/adu_scoms.py16
-rw-r--r--external/xscom-utils/getscom.c17
-rw-r--r--external/xscom-utils/getsram.c17
-rw-r--r--external/xscom-utils/putscom.c17
-rw-r--r--external/xscom-utils/sram.c17
-rw-r--r--external/xscom-utils/sram.h17
-rw-r--r--external/xscom-utils/xscom.c17
-rw-r--r--external/xscom-utils/xscom.h16
82 files changed, 235 insertions, 505 deletions
diff --git a/external/Makefile.check b/external/Makefile.check
index b5266ae..46ff66e 100644
--- a/external/Makefile.check
+++ b/external/Makefile.check
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: Apache-2.0
# -*-Makefile-*-
TOOL=gard ffspart pflash
diff --git a/external/common/arch_flash.h b/external/common/arch_flash.h
index c1be706..4feed27 100644
--- a/external/common/arch_flash.h
+++ b/external/common/arch_flash.h
@@ -1,17 +1,5 @@
+// SPDX-License-Identifier: Apache-2.0
/* Copyright 2015 IBM Corp.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
#ifndef __EXTERNAL_ARCH_FLASH_H
diff --git a/external/common/arch_flash_arm.c b/external/common/arch_flash_arm.c
index 3cdd41d..5842fdd 100644
--- a/external/common/arch_flash_arm.c
+++ b/external/common/arch_flash_arm.c
@@ -1,17 +1,5 @@
-/* Copyright 2015 IBM Corp.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+// SPDX-License-Identifier: Apache-2.0
+/* Copyright 2015-2016 IBM Corp.
*/
#define _GNU_SOURCE
#include <stdlib.h>
diff --git a/external/common/arch_flash_arm_io.h b/external/common/arch_flash_arm_io.h
index a1ee1f3..bffcb53 100644
--- a/external/common/arch_flash_arm_io.h
+++ b/external/common/arch_flash_arm_io.h
@@ -1,3 +1,7 @@
+// SPDX-License-Identifier: Apache-2.0
+/*
+ * Copyright 2015 IBM Corp.
+ */
#ifndef __IO_H
#define __IO_H
diff --git a/external/common/arch_flash_common.c b/external/common/arch_flash_common.c
index 6bce7e1..d3e34fd 100644
--- a/external/common/arch_flash_common.c
+++ b/external/common/arch_flash_common.c
@@ -1,26 +1,14 @@
-/* Copyright 2015 IBM Corp.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+// SPDX-License-Identifier: Apache-2.0
+/*
+ * Default implementations
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright 2015-2017 IBM Corp.
*/
-#include <stdlib.h>
+#include <stdlib.h>
#include <libflash/blocklevel.h>
-
#include "arch_flash.h"
-/* Default implementations */
-
/*
* This just assumes that an erase from zero to total size is
* 'correct'.
diff --git a/external/common/arch_flash_powerpc.c b/external/common/arch_flash_powerpc.c
index 95402ee..9bd4ba2 100644
--- a/external/common/arch_flash_powerpc.c
+++ b/external/common/arch_flash_powerpc.c
@@ -1,17 +1,5 @@
-/* Copyright 2013-2015 IBM Corp.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+// SPDX-License-Identifier: Apache-2.0
+/* Copyright 2013-2017 IBM Corp.
*/
#define _GNU_SOURCE
diff --git a/external/common/arch_flash_x86.c b/external/common/arch_flash_x86.c
index 3638d73..00a3556 100644
--- a/external/common/arch_flash_x86.c
+++ b/external/common/arch_flash_x86.c
@@ -1,17 +1,5 @@
-/* Copyright 2013-2015 IBM Corp.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+// SPDX-License-Identifier: Apache-2.0
+/* Copyright 2013-2017 IBM Corp.
*/
#include <stdlib.h>
diff --git a/external/common/get_arch.sh b/external/common/get_arch.sh
index f4beb1d..b5e0867 100755
--- a/external/common/get_arch.sh
+++ b/external/common/get_arch.sh
@@ -1,4 +1,6 @@
#!/bin/sh
+# SPDX-License-Identifier: Apache-2.0
+
echo "#if defined(__powerpc__)
echo -n ARCH_POWERPC
#elif defined(__x86_64__) || defined(__i386__)
diff --git a/external/common/rules.mk b/external/common/rules.mk
index af8958b..05eb755 100644
--- a/external/common/rules.mk
+++ b/external/common/rules.mk
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
CC ?= $(CROSS_COMPILE)gcc
LD ?= $(CROSS_COMPILE)ld
ARCH := $(shell $(GET_ARCH) "$(CROSS_COMPILE)")
diff --git a/external/devicetree/Makefile b/external/devicetree/Makefile
index 2ce622b..02e7a17 100644
--- a/external/devicetree/Makefile
+++ b/external/devicetree/Makefile
@@ -1,3 +1,7 @@
+# SPDX-License-Identifier: Apache-2.0
+#
+# Copyright 2019 IBM Corp.
+
DTC=dtc
OUT=p9-simics.dtb
diff --git a/external/devicetree/p9-simics.dts b/external/devicetree/p9-simics.dts
index bd05d09..bc6747c 100644
--- a/external/devicetree/p9-simics.dts
+++ b/external/devicetree/p9-simics.dts
@@ -1,3 +1,8 @@
+// SPDX-License-Identifier: Apache-2.0
+/*
+ * POWER9 Simics Device Tree
+ */
+
/include/ "p9.dts"
/ {
diff --git a/external/devicetree/p9.dts b/external/devicetree/p9.dts
index 905e33d..fac348b 100644
--- a/external/devicetree/p9.dts
+++ b/external/devicetree/p9.dts
@@ -1,3 +1,8 @@
+// SPDX-License-Identifier: Apache-2.0
+/*
+ * base POWER9 device tree
+ */
+
/dts-v1/;
/ {
diff --git a/external/ffspart/Makefile b/external/ffspart/Makefile
index a9b8cfa..9814022 100644
--- a/external/ffspart/Makefile
+++ b/external/ffspart/Makefile
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: Apache-2.0
# Use make V=1 for a verbose build.
include rules.mk
GET_ARCH = ../../external/common/get_arch.sh
diff --git a/external/ffspart/config.h b/external/ffspart/config.h
index a132a01..4509837 100644
--- a/external/ffspart/config.h
+++ b/external/ffspart/config.h
@@ -1,4 +1,9 @@
-/* For CCAN */
+// SPDX-License-Identifier: Apache-2.0
+/*
+ * For CCAN
+ *
+ * Copyright 2017 IBM Corp.
+ */
#include <endian.h>
#include <byteswap.h>
diff --git a/external/ffspart/ffspart.c b/external/ffspart/ffspart.c
index 9fc015c..e0dd8d3 100644
--- a/external/ffspart/ffspart.c
+++ b/external/ffspart/ffspart.c
@@ -1,17 +1,8 @@
-/* Copyright 2013-2017 IBM Corp.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+// SPDX-License-Identifier: Apache-2.0
+/*
+ * Assemble a FFS Image (no, not that FFS, this FFS)
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright 2013-2019 IBM Corp.
*/
#include <ctype.h>
diff --git a/external/ffspart/rules.mk b/external/ffspart/rules.mk
index d0100a2..1c6a838 100644
--- a/external/ffspart/rules.mk
+++ b/external/ffspart/rules.mk
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: Apache-2.0
.DEFAULT_GOAL := all
override CFLAGS += -O2 -Wall -g -I.
diff --git a/external/fwts/generate-fwts-olog b/external/fwts/generate-fwts-olog
index d108823..3018965 100755
--- a/external/fwts/generate-fwts-olog
+++ b/external/fwts/generate-fwts-olog
@@ -1,19 +1,7 @@
#!/usr/bin/env python2
+# SPDX-License-Identifier: Apache-2.0
#
# Copyright 2016 Jeremy Kerr <jk@ozlabs.org>
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-# implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
import os.path
import re
diff --git a/external/fwts/merge-fwts-olog b/external/fwts/merge-fwts-olog
index 2a4b290..6b0befb 100755
--- a/external/fwts/merge-fwts-olog
+++ b/external/fwts/merge-fwts-olog
@@ -1,19 +1,7 @@
#!/usr/bin/env python2
+# SPDX-License-Identifier: Apache-2.0
#
# Copyright 2016 IBM Corp.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-# implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
import json
import sys
diff --git a/external/gard/Makefile b/external/gard/Makefile
index 50589cf..e249cf8 100644
--- a/external/gard/Makefile
+++ b/external/gard/Makefile
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: Apache-2.0
# This tool is a linux userland tool and should be completely stand alone
include rules.mk
GET_ARCH = ../../external/common/get_arch.sh
diff --git a/external/gard/Makefile.dist b/external/gard/Makefile.dist
index 759b3ea..4d44a04 100644
--- a/external/gard/Makefile.dist
+++ b/external/gard/Makefile.dist
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: Apache-2.0
#Prevent make from trying to remake arch links symlinks
#which are fixed files now
ARCH_LINKS :=
diff --git a/external/gard/config.h b/external/gard/config.h
index 2e0347f..d3edaea 100644
--- a/external/gard/config.h
+++ b/external/gard/config.h
@@ -1,4 +1,9 @@
-/* For CCAN */
+// SPDX-License-Identifier: Apache-2.0
+/*
+ * For CCAN
+ *
+ * Copyright 2015-2017 IBM Corp
+ */
#include <endian.h>
#include <byteswap.h>
diff --git a/external/gard/gard.c b/external/gard/gard.c
index ba15e87..f8c1032 100644
--- a/external/gard/gard.c
+++ b/external/gard/gard.c
@@ -1,17 +1,8 @@
-/* Copyright 2013-2017 IBM Corp.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+// SPDX-License-Identifier: Apache-2.0
+/*
+ * Manipulate GARD records in the GARD partition
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright 2013-2019 IBM Corp.
*/
#include <fcntl.h>
diff --git a/external/gard/gard.h b/external/gard/gard.h
index 191cbaf..5999cf9 100644
--- a/external/gard/gard.h
+++ b/external/gard/gard.h
@@ -1,17 +1,5 @@
-/* Copyright 2013-2014 IBM Corp.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+// SPDX-License-Identifier: Apache-2.0
+/* Copyright 2013-2017 IBM Corp.
*/
#include <stdint.h>
diff --git a/external/gard/rules.mk b/external/gard/rules.mk
index 9e8b581..8db66b8 100644
--- a/external/gard/rules.mk
+++ b/external/gard/rules.mk
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: Apache-2.0
.DEFAULT_GOAL := all
override CFLAGS += -O2 -Wall -Werror -Wno-stringop-truncation -I.
diff --git a/external/gard/units.c b/external/gard/units.c
index 554d85c..62033a1 100644
--- a/external/gard/units.c
+++ b/external/gard/units.c
@@ -1,5 +1,4 @@
-#include "gard.h"
-
+// SPDX-License-Identifier: Apache-2.0
/*
* Each chip has a set of "units" that are detailed by the System MRW. Granted
* they're pretty much fixed for a given chip generation so hardcoding them here
@@ -8,8 +7,11 @@
* These tables we generated from obj/genfiles/errl/errludtarget.H. Which is
* generated as a part of the hostboot build process. Yeah that's about as
* dumb as it sounds, but whatever.
+ *
+ * Copyright 2017 IBM Corp
*/
+#include "gard.h"
/*
* Notes:
diff --git a/external/lpc/Makefile b/external/lpc/Makefile
index 81e0b09..be71b5f 100644
--- a/external/lpc/Makefile
+++ b/external/lpc/Makefile
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
all: lpc
lpc: lpc.c
diff --git a/external/lpc/lpc.c b/external/lpc/lpc.c
index b8a4fa1..e8d87b8 100644
--- a/external/lpc/lpc.c
+++ b/external/lpc/lpc.c
@@ -1,17 +1,8 @@
-/* Copyright 2014-2016 IBM Corp.
+// SPDX-License-Identifier: Apache-2.0
+/*
+ * LPC operations through debugfs interface
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.
- * See the License for the specific language governing permissions and
- * imitations under the License.
+ * Copyright 2014-2018 IBM Corp.
*/
#include <stdio.h>
diff --git a/external/mambo/Makefile b/external/mambo/Makefile
index fbc696e..d750b98 100644
--- a/external/mambo/Makefile
+++ b/external/mambo/Makefile
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
CFLAGS=-O2 -m64 -pthread -Werror -Wall
CC=$(CROSS)gcc
diff --git a/external/mambo/mambo-socket-proxy.c b/external/mambo/mambo-socket-proxy.c
index f3a1a2f..16053e7 100644
--- a/external/mambo/mambo-socket-proxy.c
+++ b/external/mambo/mambo-socket-proxy.c
@@ -1,19 +1,5 @@
+// SPDX-License-Identifier: Apache-2.0
/*
- * Copyright (C) 2017 Michael Neuling <mikey@neuling.org>, IBM
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
* Compile with:
* gcc -static -O2 mambo-socket-proxy.c -o mambo-socket-proxy -pthread
* Run inside the simulator:
@@ -23,6 +9,8 @@
* ssh -p 10022 localhost
* - to allow http proxy access from inside the sim to local http proxy
* ./mambo-socket-proxy -b proxy.mynetwork -h 3128 -s 3128
+ *
+ * Copyright (C) 2017 Michael Neuling <mikey@neuling.org>, IBM
*/
#include <stdio.h>
diff --git a/external/mambo/mambo_utils.tcl b/external/mambo/mambo_utils.tcl
index 1defe95..8bde1e1 100644
--- a/external/mambo/mambo_utils.tcl
+++ b/external/mambo/mambo_utils.tcl
@@ -1,5 +1,6 @@
+# SPDX-License-Identifier: Apache-2.0
#
-# behave like gdb
+# Make Mambo behave a bit more like gdb
#
set target_t 0
set target_c 0
diff --git a/external/mambo/qtrace_utils.tcl b/external/mambo/qtrace_utils.tcl
index e12a4c5..3fbcd59 100644
--- a/external/mambo/qtrace_utils.tcl
+++ b/external/mambo/qtrace_utils.tcl
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
if { [file exists $env(LIB_DIR)/perf/qtrace.tcl] == 1} {
if { [catch {source $env(LIB_DIR)/perf/qtrace.tcl} issue ] } {
puts "QTrace not available: $issue"
diff --git a/external/mambo/skiboot.tcl b/external/mambo/skiboot.tcl
index 60a0f30..a16bd32 100644
--- a/external/mambo/skiboot.tcl
+++ b/external/mambo/skiboot.tcl
@@ -1,3 +1,10 @@
+# SPDX-License-Identifier: Apache-2.0
+#
+# scripts to run skiboot (and a payload) with Mambo (otherwise known as the
+# POWER[89] Functional Simulator)
+#
+# Copyright 2014-2019 IBM Corp.
+
# need to get images path defined early
source $env(LIB_DIR)/ppc/util.tcl
if { [file exists qtrace_utils.tcl] } then {
diff --git a/external/memboot/Makefile b/external/memboot/Makefile
index 9b526a3..85c0f58 100644
--- a/external/memboot/Makefile
+++ b/external/memboot/Makefile
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: Apache-2.0
all: memboot
CFLAGS=-O2 -Wall
diff --git a/external/memboot/memboot.c b/external/memboot/memboot.c
index 848c5fe..4d2b5f8 100644
--- a/external/memboot/memboot.c
+++ b/external/memboot/memboot.c
@@ -1,18 +1,11 @@
-/* Copyright 2013-2014 IBM Corp.
+// SPDX-License-Identifier: Apache-2.0
+/*
+ * The old way of booting a temporary f/w image.
+ * These days, use mboxd on a BMC.
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright 2013-2015 IBM Corp.
*/
+
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/external/npu/run_procedure.sh b/external/npu/run_procedure.sh
index f61ec8d..31a6c42 100755
--- a/external/npu/run_procedure.sh
+++ b/external/npu/run_procedure.sh
@@ -1,20 +1,10 @@
#!/bin/bash
-
-# Copyright 2016 IBM Corp.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+# SPDX-License-Identifier: Apache-2.0
#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-# implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Run an NPU Hardware procedure
#
+# Copyright 2016 IBM Corp.
+
function usage() {
echo -e "$0: run a NPU hardware procedure (requires root)\n"
diff --git a/external/opal-prd/Makefile b/external/opal-prd/Makefile
index ccd3401..fb9402f 100644
--- a/external/opal-prd/Makefile
+++ b/external/opal-prd/Makefile
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: Apache-2.0
CFLAGS += -m64 -Werror -Wall -g2 -ggdb
LDFLAGS += -m64
ASFLAGS = -m64
diff --git a/external/opal-prd/config.h b/external/opal-prd/config.h
index a132a01..5de618b 100644
--- a/external/opal-prd/config.h
+++ b/external/opal-prd/config.h
@@ -1,4 +1,9 @@
-/* For CCAN */
+// SPDX-License-Identifier: Apache-2.0
+/*
+ * For CCAN
+ *
+ * Copyright 2015 IBM Corp.
+ */
#include <endian.h>
#include <byteswap.h>
diff --git a/external/opal-prd/hostboot-interface.h b/external/opal-prd/hostboot-interface.h
index d571f63..60951fe 100644
--- a/external/opal-prd/hostboot-interface.h
+++ b/external/opal-prd/hostboot-interface.h
@@ -1,23 +1,13 @@
-/* Copyright 2013-2014 IBM Corp.
+// SPDX-License-Identifier: Apache-2.0
+/*
+ * Hostboot runtime interface
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Derived from src/include/runtime/interface.h in Hostboot
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright 2013-2018 IBM Corp.
*/
#include <stdint.h>
-/* Hostboot runtime interface */
-/* Derived from src/include/runtime/interface.h in Hostboot */
-
#define HOSTBOOT_RUNTIME_INTERFACE_VERSION 0x9002
/** Memory error types defined for memory_error() interface. */
diff --git a/external/opal-prd/i2c.c b/external/opal-prd/i2c.c
index 0c9947c..3cf8868 100644
--- a/external/opal-prd/i2c.c
+++ b/external/opal-prd/i2c.c
@@ -1,17 +1,8 @@
-/* Copyright 2013-2015 IBM Corp.
+// SPDX-License-Identifier: Apache-2.0
+/*
+ * I2C operations for opal-prd
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright 2013-2018 IBM Corp.
*/
#define _GNU_SOURCE /* for aspritnf */
diff --git a/external/opal-prd/i2c.h b/external/opal-prd/i2c.h
index d31bc0e..bdadec6 100644
--- a/external/opal-prd/i2c.h
+++ b/external/opal-prd/i2c.h
@@ -1,3 +1,6 @@
+// SPDX-License-Identifier: Apache-2.0
+/* Copyright 2015 IBM Corp */
+
#ifndef __I2C_H
#define __I2C_H
diff --git a/external/opal-prd/module.c b/external/opal-prd/module.c
index 12fc3f9..6797d4c 100644
--- a/external/opal-prd/module.c
+++ b/external/opal-prd/module.c
@@ -1,17 +1,8 @@
-/* Copyright 2015 IBM Corp.
+// SPDX-License-Identifier: Apache-2.0
+/*
+ * Load kernel modules needed for opal-prd
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.
- * See the License for the specific language governing permissions and
- * imitations under the License.
+ * Copyright 2015 IBM Corp.
*/
#include <stdlib.h>
diff --git a/external/opal-prd/module.h b/external/opal-prd/module.h
index 3a9e4aa..e55d321 100644
--- a/external/opal-prd/module.h
+++ b/external/opal-prd/module.h
@@ -1,18 +1,5 @@
-/* Copyright 2015 IBM Corp.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.
- * See the License for the specific language governing permissions and
- * imitations under the License.
- */
+// SPDX-License-Identifier: Apache-2.0
+/* Copyright 2015 IBM Corp. */
#ifndef MODULES_H
#define MODULES_H
diff --git a/external/opal-prd/opal-prd.c b/external/opal-prd/opal-prd.c
index d0a507c..b49d9ae 100644
--- a/external/opal-prd/opal-prd.c
+++ b/external/opal-prd/opal-prd.c
@@ -1,17 +1,11 @@
-/* Copyright 2014-2015 IBM Corp.
+// SPDX-License-Identifier: Apache-2.0
+/*
+ * OPAL Processor Runtime Diagnostics (PRD)
+ * Runs Hostboot RunTime (HBRT) code in a userspace wrapper
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Firmware in userspace? Brilliant!
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.
- * See the License for the specific language governing permissions and
- * imitations under the License.
+ * Copyright 2014-2019 IBM Corp.
*/
#define _GNU_SOURCE
diff --git a/external/opal-prd/opal-prd.h b/external/opal-prd/opal-prd.h
index f37b18b..17333d2 100644
--- a/external/opal-prd/opal-prd.h
+++ b/external/opal-prd/opal-prd.h
@@ -1,18 +1,6 @@
-/* Copyright 2015 IBM Corp.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.
- * See the License for the specific language governing permissions and
- * imitations under the License.
- */
+// SPDX-License-Identifier: Apache-2.0
+/* Copyright 2015 IBM Corp. */
+
#ifndef OPAL_PRD_H
#define OPAL_PRD_H
diff --git a/external/opal-prd/pnor.c b/external/opal-prd/pnor.c
index c032421..6ddc2b5 100644
--- a/external/opal-prd/pnor.c
+++ b/external/opal-prd/pnor.c
@@ -1,17 +1,8 @@
-/* Copyright 2013-2015 IBM Corp.
+// SPDX-License-Identifier: Apache-2.0
+/*
+ * PNOR Access (/dev/mtd) for opal-prd
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright 2013-2017 IBM Corp.
*/
#include <libflash/libffs.h>
diff --git a/external/opal-prd/pnor.h b/external/opal-prd/pnor.h
index 28571af..0d25325 100644
--- a/external/opal-prd/pnor.h
+++ b/external/opal-prd/pnor.h
@@ -1,3 +1,6 @@
+// SPDX-License-Identifier: Apache-2.0
+/* Copyright 2015-2017 IBM Corp */
+
#ifndef PNOR_H
#define PNOR_H
diff --git a/external/opal-prd/test/test_pnor.c b/external/opal-prd/test/test_pnor.c
index 84e4231..4e599e5 100644
--- a/external/opal-prd/test/test_pnor.c
+++ b/external/opal-prd/test/test_pnor.c
@@ -1,18 +1,5 @@
-/* Copyright 2013-2015 IBM Corp.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+// SPDX-License-Identifier: Apache-2.0
+/* Copyright 2013-2015 IBM Corp. */
#include <stdarg.h>
#include <stdio.h>
diff --git a/external/opal-prd/test/test_pnor_ops.c b/external/opal-prd/test/test_pnor_ops.c
index fd5e2c2..ab05930 100644
--- a/external/opal-prd/test/test_pnor_ops.c
+++ b/external/opal-prd/test/test_pnor_ops.c
@@ -1,3 +1,6 @@
+// SPDX-License-Identifier: Apache-2.0
+/* Copyright 2015-2016 IBM Corp */
+
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
diff --git a/external/opal-prd/thunk.S b/external/opal-prd/thunk.S
index d0ccd64..227607c 100644
--- a/external/opal-prd/thunk.S
+++ b/external/opal-prd/thunk.S
@@ -1,3 +1,6 @@
+// SPDX-License-Identifier: Apache-2.0
+/* Copyright 2015-2017 IBM Corp */
+
#include <endian.h>
#include <asm/unistd.h>
diff --git a/external/pflash/Makefile b/external/pflash/Makefile
index 243de6e..2918b7c 100644
--- a/external/pflash/Makefile
+++ b/external/pflash/Makefile
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: Apache-2.0
include rules.mk
GET_ARCH := ../../external/common/get_arch.sh
include ../../external/common/rules.mk
diff --git a/external/pflash/Makefile.dist b/external/pflash/Makefile.dist
index 46edcb1..b6183d7 100644
--- a/external/pflash/Makefile.dist
+++ b/external/pflash/Makefile.dist
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: Apache-2.0
include rules.mk
GET_ARCH = common/get_arch.sh
include common/rules.mk
diff --git a/external/pflash/build-all-arch.sh b/external/pflash/build-all-arch.sh
index 5974fbc..0af3a4d 100755
--- a/external/pflash/build-all-arch.sh
+++ b/external/pflash/build-all-arch.sh
@@ -1,9 +1,9 @@
#!/bin/bash
+# SPDX-License-Identifier: Apache-2.0
#
# Script to build all pflash backends
#
# Copyright 2015 IBM Corp.
-# Licensed under the Apache License, Version 2.0
#
# pflash has three different backends that are used on powerpc, arm (BMC) and
# x86 (file-backed). In order to test for regressions when touching shared code
diff --git a/external/pflash/config.h b/external/pflash/config.h
index a132a01..b55d13e 100644
--- a/external/pflash/config.h
+++ b/external/pflash/config.h
@@ -1,4 +1,9 @@
-/* For CCAN */
+// SPDX-License-Identifier: Apache-2.0
+/*
+ * For CCAN
+ *
+ * Copyright 2014 IBM Corp.
+ */
#include <endian.h>
#include <byteswap.h>
diff --git a/external/pflash/pflash.c b/external/pflash/pflash.c
index 14157e7..7bf0785 100644
--- a/external/pflash/pflash.c
+++ b/external/pflash/pflash.c
@@ -1,17 +1,9 @@
-/* Copyright 2013-2015 IBM Corp.
+// SPDX-License-Identifier: Apache-2.0
+/*
+ * Display progress bars, while also writing whole or part
+ * of flash.
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright 2013-2019 IBM Corp.
*/
#define _GNU_SOURCE
diff --git a/external/pflash/progress.c b/external/pflash/progress.c
index df8eb35..4140446 100644
--- a/external/pflash/progress.c
+++ b/external/pflash/progress.c
@@ -1,3 +1,10 @@
+// SPDX-License-Identifier: Apache-2.0
+/*
+ * The most important part of pflash, the progress bars
+ *
+ * Copyright 2014-2017 IBM Corp.
+ */
+
#include <inttypes.h>
#include <limits.h>
#include <stdint.h>
diff --git a/external/pflash/progress.h b/external/pflash/progress.h
index b073dbe..efe70c6 100644
--- a/external/pflash/progress.h
+++ b/external/pflash/progress.h
@@ -1,3 +1,8 @@
+// SPDX-License-Identifier: Apache-2.0
+/*
+ * Copyright 2014-2017 IBM Corp.
+ */
+
#ifndef __PROGRESS_H
#define __PROGRESS_H
diff --git a/external/pflash/rules.mk b/external/pflash/rules.mk
index ffc3242..ab9bf14 100644
--- a/external/pflash/rules.mk
+++ b/external/pflash/rules.mk
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
.DEFAULT_GOAL := all
override CFLAGS += -O2 -Wall -I.
diff --git a/external/pflash/test/tests/00-usage b/external/pflash/test/tests/00-usage
index b83bca8..809b995 100644
--- a/external/pflash/test/tests/00-usage
+++ b/external/pflash/test/tests/00-usage
@@ -1,4 +1,5 @@
#! /bin/sh
+# SPDX-License-Identifier: Apache-2.0
run_binary "./pflash" "-h"
if [ "$?" -ne 0 ] ; then
diff --git a/external/pflash/test/tests/01-info b/external/pflash/test/tests/01-info
index 3941461..2fc2755 100644
--- a/external/pflash/test/tests/01-info
+++ b/external/pflash/test/tests/01-info
@@ -1,4 +1,5 @@
#! /bin/sh
+# SPDX-License-Identifier: Apache-2.0
touch "$DATA_DIR/$CUR_TEST.pnor"
diff --git a/external/pflash/test/tests/02-erase b/external/pflash/test/tests/02-erase
index dd00f38..911728d 100644
--- a/external/pflash/test/tests/02-erase
+++ b/external/pflash/test/tests/02-erase
@@ -1,4 +1,5 @@
#! /bin/sh
+# SPDX-License-Identifier: Apache-2.0
touch "$DATA_DIR/$CUR_TEST.pnor"
diff --git a/external/pflash/test/tests/03-erase-parts b/external/pflash/test/tests/03-erase-parts
index 09421bb..74937fa 100644
--- a/external/pflash/test/tests/03-erase-parts
+++ b/external/pflash/test/tests/03-erase-parts
@@ -1,4 +1,5 @@
#! /bin/sh
+# SPDX-License-Identifier: Apache-2.0
touch "$DATA_DIR/$CUR_TEST.pnor"
diff --git a/external/pflash/test/tests/04-program-rand b/external/pflash/test/tests/04-program-rand
index 62f2f92..d732eab 100644
--- a/external/pflash/test/tests/04-program-rand
+++ b/external/pflash/test/tests/04-program-rand
@@ -1,4 +1,5 @@
#! /bin/sh
+# SPDX-License-Identifier: Apache-2.0
touch "$DATA_DIR/$CUR_TEST.pnor"
diff --git a/external/pflash/test/tests/05-bad-numbers b/external/pflash/test/tests/05-bad-numbers
index f84e799..6064090 100644
--- a/external/pflash/test/tests/05-bad-numbers
+++ b/external/pflash/test/tests/05-bad-numbers
@@ -1,4 +1,5 @@
#! /bin/sh
+# SPDX-License-Identifier: Apache-2.0
touch "$DATA_DIR/$CUR_TEST.pnor"
diff --git a/external/pflash/test/tests/06-miscprint b/external/pflash/test/tests/06-miscprint
index 2d94966..8b37cab 100644
--- a/external/pflash/test/tests/06-miscprint
+++ b/external/pflash/test/tests/06-miscprint
@@ -1,4 +1,5 @@
#! /bin/sh
+# SPDX-License-Identifier: Apache-2.0
touch "$DATA_DIR/$CUR_TEST.pnor"
diff --git a/external/read_esel.sh b/external/read_esel.sh
index 492fbce..3007092 100644
--- a/external/read_esel.sh
+++ b/external/read_esel.sh
@@ -1,18 +1,7 @@
#!/bin/bash
+# SPDX-License-Identifier: Apache-2.0
# Copyright 2013-2014 IBM Corp.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-# implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+
set -e
BMC_HOST=$1
diff --git a/external/shared/Makefile b/external/shared/Makefile
index 4baa6b4..9442954 100644
--- a/external/shared/Makefile
+++ b/external/shared/Makefile
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: Apache-2.0
.DEFAULT_GOAL := all
GET_ARCH := ../../external/common/get_arch.sh
include ../../external/common/rules.mk
diff --git a/external/shared/config.h b/external/shared/config.h
index a132a01..9ed42d2 100644
--- a/external/shared/config.h
+++ b/external/shared/config.h
@@ -1,4 +1,9 @@
-/* For CCAN */
+// SPDX-License-Identifier: Apache-2.0
+/*
+ * For CCAN
+ *
+ * Copyright 2016 IBM Corp.
+ */
#include <endian.h>
#include <byteswap.h>
diff --git a/external/shared/rules.mk b/external/shared/rules.mk
index 147c38f..632c62c 100644
--- a/external/shared/rules.mk
+++ b/external/shared/rules.mk
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: Apache-2.0
# NOTE: shared lib versioning has *NOTHING* to do with software package version
#
# If source code has changed, revision++
diff --git a/external/test/test.sh b/external/test/test.sh
index fd596b1..1ff534b 100755
--- a/external/test/test.sh
+++ b/external/test/test.sh
@@ -1,20 +1,7 @@
#! /bin/sh
-
-# Copyright 2013-2017 IBM Corp.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-# implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# SPDX-License-Identifier: Apache-2.0
#
+# Copyright 2013-2017 IBM Corp.
run_binary() {
if [ -x "$1" ] ; then
diff --git a/external/trace/Makefile b/external/trace/Makefile
index d806046..f18e5bc 100644
--- a/external/trace/Makefile
+++ b/external/trace/Makefile
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: Apache-2.0
HOSTEND=$(shell uname -m | sed -e 's/^i.*86$$/LITTLE/' -e 's/^x86.*/LITTLE/' -e 's/^ppc64le/LITTLE/' -e 's/^ppc.*/BIG/')
CFLAGS=-g -Wall -DHAVE_$(HOSTEND)_ENDIAN -I../../include -I../../
diff --git a/external/trace/dump_trace.c b/external/trace/dump_trace.c
index 502adcd..4a01bde 100644
--- a/external/trace/dump_trace.c
+++ b/external/trace/dump_trace.c
@@ -1,17 +1,8 @@
-/* Copyright 2013-2014 IBM Corp.
+// SPDX-License-Identifier: Apache-2.0
+/*
+ * Dump the content of an OPAL trace
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright 2013-2019 IBM Corp.
*/
#include <trace.h>
diff --git a/external/trace/trace.c b/external/trace/trace.c
index aa9fa15..f28630f 100644
--- a/external/trace/trace.c
+++ b/external/trace/trace.c
@@ -1,19 +1,10 @@
-/* Copyright 2013-2014 IBM Corp.
+// SPDX-License-Identifier: Apache-2.0
+/*
+ * This example code shows how to read from the trace buffer.
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright 2013-2019 IBM Corp.
*/
-/* This example code shows how to read from the trace buffer. */
+
#include <external/trace/trace.h>
#include "../ccan/endian/endian.h"
#include "../ccan/short_types/short_types.h"
diff --git a/external/trace/trace.h b/external/trace/trace.h
index 729c031..14b94d0 100644
--- a/external/trace/trace.h
+++ b/external/trace/trace.h
@@ -1,17 +1,6 @@
-/* Copyright 2013-2014 IBM Corp.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+// SPDX-License-Identifier: Apache-2.0
+/*
+ * Copyright 2013-2019 IBM Corp.
*/
#ifndef E_TRACE_H
#define E_TRACE_H
diff --git a/external/xscom-utils/Makefile b/external/xscom-utils/Makefile
index 2eda4ea..b0b1089 100644
--- a/external/xscom-utils/Makefile
+++ b/external/xscom-utils/Makefile
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: Apache-2.0
CC = $(CROSS_COMPILE)gcc
XSCOM_VERSION ?= $(shell ../../make_version.sh xscom-utils)
diff --git a/external/xscom-utils/adu_scoms.py b/external/xscom-utils/adu_scoms.py
index a1b7d89..4d1f3fa 100755
--- a/external/xscom-utils/adu_scoms.py
+++ b/external/xscom-utils/adu_scoms.py
@@ -1,22 +1,10 @@
#!/usr/bin/python
-
+# SPDX-License-Identifier: Apache-2.0
+#
# Python library for in-band SCom access
# (based on xscom-utils from OPAL firmware)
#
# Copyright 2018 IBM Corp.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-# implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
import os, sys, struct, getopt
diff --git a/external/xscom-utils/getscom.c b/external/xscom-utils/getscom.c
index dab4994..430a23e 100644
--- a/external/xscom-utils/getscom.c
+++ b/external/xscom-utils/getscom.c
@@ -1,17 +1,8 @@
-/* Copyright 2014-2016 IBM Corp.
+// SPDX-License-Identifier: Apache-2.0
+/*
+ * getscom
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.
- * See the License for the specific language governing permissions and
- * imitations under the License.
+ * Copyright 2014-2017 IBM Corp.
*/
#include <stdio.h>
diff --git a/external/xscom-utils/getsram.c b/external/xscom-utils/getsram.c
index 18c52c7..a3e53e1 100644
--- a/external/xscom-utils/getsram.c
+++ b/external/xscom-utils/getsram.c
@@ -1,17 +1,8 @@
-/* Copyright 2014-2016 IBM Corp.
+// SPDX-License-Identifier: Apache-2.0
+/*
+ * Read SRAM
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.
- * See the License for the specific language governing permissions and
- * imitations under the License.
+ * Copyright 2014-2018 IBM Corp.
*/
#include <stdio.h>
diff --git a/external/xscom-utils/putscom.c b/external/xscom-utils/putscom.c
index 84b6f89..ba575e0 100644
--- a/external/xscom-utils/putscom.c
+++ b/external/xscom-utils/putscom.c
@@ -1,17 +1,8 @@
-/* Copyright 2014-2016 IBM Corp.
+// SPDX-License-Identifier: Apache-2.0
+/*
+ * getscom
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.
- * See the License for the specific language governing permissions and
- * imitations under the License.
+ * Copyright 2014-2017 IBM Corp.
*/
#include <stdio.h>
diff --git a/external/xscom-utils/sram.c b/external/xscom-utils/sram.c
index 52f92b8..fd3fe8c 100644
--- a/external/xscom-utils/sram.c
+++ b/external/xscom-utils/sram.c
@@ -1,18 +1,5 @@
-/* Copyright 2014-2016 IBM Corp.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.
- * See the License for the specific language governing permissions and
- * imitations under the License.
- */
+// SPDX-License-Identifier: Apache-2.0
+/* Copyright 2014-2019 IBM Corp. */
#include <stdint.h>
#include <stdio.h>
diff --git a/external/xscom-utils/sram.h b/external/xscom-utils/sram.h
index 1db128c..92ab512 100644
--- a/external/xscom-utils/sram.h
+++ b/external/xscom-utils/sram.h
@@ -1,18 +1,5 @@
-/* Copyright 2014-2016 IBM Corp.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.
- * See the License for the specific language governing permissions and
- * imitations under the License.
- */
+// SPDX-License-Identifier: Apache-2.0
+/* Copyright 2014-2016 IBM Corp. */
#ifndef __SRAM_H
#define __SRAM_H
diff --git a/external/xscom-utils/xscom.c b/external/xscom-utils/xscom.c
index 2425730..f742336 100644
--- a/external/xscom-utils/xscom.c
+++ b/external/xscom-utils/xscom.c
@@ -1,17 +1,8 @@
-/* Copyright 2014-2016 IBM Corp.
+// SPDX-License-Identifier: Apache-2.0
+/*
+ * Do XSCOMs through linux debugfs interface
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.
- * See the License for the specific language governing permissions and
- * imitations under the License.
+ * Copyright 2014-2017 IBM Corp.
*/
#define _LARGEFILE64_SOURCE
diff --git a/external/xscom-utils/xscom.h b/external/xscom-utils/xscom.h
index 4932315..8929fb2 100644
--- a/external/xscom-utils/xscom.h
+++ b/external/xscom-utils/xscom.h
@@ -1,17 +1,5 @@
-/* Copyright 2014-2016 IBM Corp.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.
- * See the License for the specific language governing permissions and
- * imitations under the License.
+// SPDX-License-Identifier: Apache-2.0
+/* Copyright 2014-2017 IBM Corp.
*/
#ifndef __XSCOM_H