payloads: Replace GPL boilerplate with SPDX headers
Used commands:
perl -i -p0e 's|\/\*[\s*]*.*is free software[:;][\s*]*you[\s*]*can[\s*]*redistribute[\s*]*it[\s*]*and\/or[\s*]*modify[\s*]*it[\s*]*under[\s*]*the[\s*]*terms[\s*]*of[\s*]*the[\s*]*GNU[\s*]*General[\s*]*Public[\s*]*License[\s*]*as[\s*]*published[\s*]*by[\s*]*the[\s*]*Free[\s*]*Software[\s*]*Foundation[;,][\s*]*version[\s*]*2[\s*]*of[\s*]*the[\s*]*License.[\s*]*This[\s*]*program[\s*]*is[\s*]*distributed[\s*]*in[\s*]*the[\s*]*hope[\s*]*that[\s*]*it[\s*]*will[\s*]*be[\s*]*useful,[\s*]*but[\s*]*WITHOUT[\s*]*ANY[\s*]*WARRANTY;[\s*]*without[\s*]*even[\s*]*the[\s*]*implied[\s*]*warranty[\s*]*of[\s*]*MERCHANTABILITY[\s*]*or[\s*]*FITNESS[\s*]*FOR[\s*]*A[\s*]*PARTICULAR[\s*]*PURPOSE.[\s*]*See[\s*]*the[\s*]*GNU[\s*]*General[\s*]*Public[\s*]*License[\s*]*for[\s*]*more[\s*]*details.[\s*]*\*\/|/* SPDX-License-Identifier: GPL-2.0-only */|' $(cat filelist)
perl -i -p0e 's|\/\*[\s*]*.*is[\s*]*free[\s*]*software[:;][\s*]*you[\s*]*can[\s*]*redistribute[\s*]*it[\s*]*and/or[\s*]*modify[\s*]*it[\s*]*under[\s*]*the[\s*]*terms[\s*]*of[\s*]*the[\s*]*GNU[\s*]*General[\s*]*Public[\s*]*License[\s*]*as[\s*]*published[\s*]*by[\s*]*the[\s*]*Free[\s*]*Software[\s*]*Foundation[;,][\s*]*either[\s*]*version[\s*]*2[\s*]*of[\s*]*the[\s*]*License,[\s*]*or[\s*]*.at[\s*]*your[\s*]*option.*[\s*]*any[\s*]*later[\s*]*version.[\s*]*This[\s*]*program[\s*]*is[\s*]*distributed[\s*]*in[\s*]*the[\s*]*hope[\s*]*that[\s*]*it[\s*]*will[\s*]*be[\s*]*useful,[\s*]*but[\s*]*WITHOUT[\s*]*ANY[\s*]*WARRANTY;[\s*]*without[\s*]*even[\s*]*the[\s*]*implied[\s*]*warranty[\s*]*of[\s*]*MERCHANTABILITY[\s*]*or[\s*]*FITNESS[\s*]*FOR[\s*]*A[\s*]*PARTICULAR[\s*]*PURPOSE.[\s*]*See[\s*]*the[\s*]*GNU[\s*]*General[\s*]*Public[\s*]*License[\s*]*for[\s*]*more[\s*]*details.[\s*]*\*\/|/* SPDX-License-Identifier: GPL-2.0-or-later */|' $(cat filelist)
perl -i -p0e 's|\/\*[\s*]*.*is[\s*#]*free[\s*#]*software[;:,][\s*#]*you[\s*#]*can[\s*#]*redistribute[\s*#]*it[\s*#]*and/or[\s*#]*modify[\s*#]*it[\s*#]*under[\s*#]*the[\s*#]*terms[\s*#]*of[\s*#]*the[\s*#]*GNU[\s*#]*General[\s*#]*Public[\s*#]*License[\s*#]*as[\s*#]*published[\s*#]*by[\s*#]*the[\s*#]*Free[\s*#]*Software[\s*#]*Foundation[;:,][\s*#]*either[\s*#]*version[\s*#]*3[\s*#]*of[\s*#]*the[\s*#]*License[;:,][\s*#]*or[\s*#]*.at[\s*#]*your[\s*#]*option.*[\s*#]*any[\s*#]*later[\s*#]*version.[\s*#]*This[\s*#]*program[\s*#]*is[\s*#]*distributed[\s*#]*in[\s*#]*the[\s*#]*hope[\s*#]*that[\s*#]*it[\s*#]*will[\s*#]*be[\s*#]*useful[;:,][\s*#]*but[\s*#]*WITHOUT[\s*#]*ANY[\s*#]*WARRANTY[;:,][\s*#]*without[\s*#]*even[\s*#]*the[\s*#]*implied[\s*#]*warranty[\s*#]*of[\s*#]*MERCHANTABILITY[\s*#]*or[\s*#]*FITNESS[\s*#]*FOR[\s*#]*A[\s*#]*PARTICULAR[\s*#]*PURPOSE.[\s*#]*See[\s*#]*the[\s*#]*GNU[\s*#]*General[\s*#]*Public[\s*#]*License[\s*#]*for[\s*#]*more[\s*#]*details.[\s*]*\*\/|/* SPDX-License-Identifier: GPL-3.0-or-later */|' $(cat filelist)
perl -i -p0e 's|(\#\#*)[\w]*.*is free software[:;][\#\s]*you[\#\s]*can[\#\s]*redistribute[\#\s]*it[\#\s]*and\/or[\#\s]*modify[\#\s]*it[\s\#]*under[\s \#]*the[\s\#]*terms[\s\#]*of[\s\#]*the[\s\#]*GNU[\s\#]*General[\s\#]*Public[\s\#]*License[\s\#]*as[\s\#]*published[\s\#]*by[\s\#]*the[\s\#]*Free[\s\#]*Software[\s\#]*Foundation[;,][\s\#]*version[\s\#]*2[\s\#]*of[\s\#]*the[\s\#]*License.*[\s\#]*This[\s\#]*program[\s\#]*is[\s\#]*distributed[\s\#]*in[\s\#]*the[\s\#]*hope[\s\#]*that[\s\#]*it[\s\#]*will[\#\s]*be[\#\s]*useful,[\#\s]*but[\#\s]*WITHOUT[\#\s]*ANY[\#\s]*WARRANTY;[\#\s]*without[\#\s]*even[\#\s]*the[\#\s]*implied[\#\s]*warranty[\#\s]*of[\#\s]*MERCHANTABILITY[\#\s]*or[\#\s]*FITNESS[\#\s]*FOR[\#\s]*A[\#\s]*PARTICULAR[\#\s]*PURPOSE.[\#\s]*See[\#\s]*the[\#\s]*GNU[\#\s]*General[\#\s]*Public[\#\s]*License[\#\s]*for[\#\s]*more[\#\s]*details.\s(#* *\n)*|\1 SPDX-License-Identifier: GPL-2.0-only\n\n|' $(cat filelist)
perl -i -p0e 's|(\#\#*)[\w*]*.*is free software[:;][\s*]*you[\s*]*can[\s*]*redistribute[\s*]*it[\s*]*and\/or[\s*]*modify[\s*]*it[\s*]*under[\s*]*the[\s*]*terms[\s*]*of[\s*]*the[\s*]*GNU[\s*]*General[\s*]*Public[\s*]*License[\s*]*as[\s*]*published[\s*]*by[\s*]*the[\s*]*Free[\s*]*Software[\s*]*Foundation[;,][\s*]*version[\s*]*2[\s*]*of[\s*]*the[\s*]*License.[\s*]*This[\s*]*program[\s*]*is[\s*]*distributed[\s*]*in[\s*]*the[\s*]*hope[\s*]*that[\s*]*it[\s*]*will[\s*]*be[\s*]*useful,[\s*]*but[\s*]*WITHOUT[\s*]*ANY[\s*]*WARRANTY;[\s*]*without[\s*]*even[\s*]*the[\s*]*implied[\s*]*warranty[\s*]*of[\s*]*MERCHANTABILITY[\s*]*or[\s*]*FITNESS[\s*]*FOR[\s*]*A[\s*]*PARTICULAR[\s*]*PURPOSE.[\s*]*See[\s*]*the[\s*]*GNU[\s*]*General[\s*]*Public[\s*]*License[\s*]*for[\s*]*more[\s*]*details.\s(#* *\n)*|\1 SPDX-License-Identifier: GPL-2.0-only\n\n|' $(cat filelist)
Change-Id: I9f74ed19257bc4234465b8f912deff1b485173f9
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41179
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-05-08 22:50:46 +02:00
|
|
|
## SPDX-License-Identifier: GPL-2.0-only
|
2016-02-29 00:56:27 +01:00
|
|
|
|
2022-11-07 19:33:58 +01:00
|
|
|
project_name=Memtest86+
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_MEMTEST86PLUS_V6),y)
|
|
|
|
project_dir=$(CURDIR)/memtest86plus_v6
|
|
|
|
|
|
|
|
ifeq ($(MEMTEST86PLUS_ARCH_64),y)
|
|
|
|
build_dir=$(project_dir)/build64
|
|
|
|
else
|
|
|
|
build_dir=$(project_dir)/build32
|
|
|
|
endif
|
|
|
|
project_git_repo=https://github.com/memtest86plus/memtest86plus.git
|
2023-06-25 17:54:00 +02:00
|
|
|
TAG-$(CONFIG_MEMTEST_MAIN)=origin/main
|
|
|
|
NAME-$(CONFIG_MEMTEST_MAIN)=Main
|
2022-11-07 19:33:58 +01:00
|
|
|
TAG-$(CONFIG_MEMTEST_STABLE)=v6.20
|
2016-04-26 17:51:41 +02:00
|
|
|
NAME-$(CONFIG_MEMTEST_STABLE)=Stable
|
2018-08-19 17:48:53 +02:00
|
|
|
TAG-$(CONFIG_MEMTEST_REVISION)=$(CONFIG_MEMTEST_REVISION_ID)
|
2022-11-07 19:33:58 +01:00
|
|
|
else
|
|
|
|
project_dir=$(CURDIR)/memtest86plus_v5
|
2016-03-16 22:00:37 +01:00
|
|
|
|
2022-11-07 19:33:58 +01:00
|
|
|
build_dir=$(project_dir)
|
2016-03-16 22:00:37 +01:00
|
|
|
project_git_repo=https://review.coreboot.org/memtest86plus.git
|
2022-11-07 19:33:58 +01:00
|
|
|
TAG-$(CONFIG_MEMTEST_MAIN)=origin/main
|
|
|
|
NAME-$(CONFIG_MEMTEST_MAIN)=Main
|
|
|
|
TAG-$(CONFIG_MEMTEST_STABLE)=0bd34c22604660e4283316331f3e7bf8a3863753
|
|
|
|
NAME-$(CONFIG_MEMTEST_STABLE)=Stable
|
|
|
|
TAG-$(CONFIG_MEMTEST_REVISION)=$(CONFIG_MEMTEST_REVISION_ID)
|
|
|
|
endif
|
2016-02-29 00:56:27 +01:00
|
|
|
|
|
|
|
all: build
|
|
|
|
|
|
|
|
$(project_dir):
|
|
|
|
echo " Cloning $(project_name) from Git"
|
|
|
|
git clone $(project_git_repo) $(project_dir)
|
|
|
|
|
|
|
|
fetch: $(project_dir)
|
2018-08-19 17:48:53 +02:00
|
|
|
ifeq ($(TAG-y),)
|
|
|
|
echo "Error: The specified tag is invalid"
|
|
|
|
ifeq ($(CONFIG_MEMTEST_REVISION),y)
|
|
|
|
echo "Error: There is no revision specified for $(project_name)"
|
|
|
|
false
|
|
|
|
endif
|
|
|
|
false
|
|
|
|
endif
|
2022-11-07 19:33:58 +01:00
|
|
|
-cd $(project_dir) 2>/dev/null; git show $(TAG-y) >/dev/null 2>&1 ; \
|
2023-06-25 17:54:00 +02:00
|
|
|
if [ $$? -ne 0 ] || [ "$(TAG-y)" = "origin/main" ]; then \
|
2016-03-16 22:00:37 +01:00
|
|
|
echo " Fetching new commits from the $(project_name) git repo"; \
|
|
|
|
git fetch; fi
|
|
|
|
|
|
|
|
checkout: fetch
|
2016-04-26 17:51:41 +02:00
|
|
|
echo " Checking out $(project_name) revision $(NAME-y) ($(TAG-y))"
|
2016-02-29 00:56:27 +01:00
|
|
|
cd $(project_dir); \
|
2023-06-25 17:54:00 +02:00
|
|
|
git checkout main; \
|
2016-03-16 22:00:37 +01:00
|
|
|
git branch -D coreboot 2>/dev/null; \
|
|
|
|
git checkout -b coreboot $(TAG-y)
|
2016-02-29 00:56:27 +01:00
|
|
|
|
2016-03-16 22:00:37 +01:00
|
|
|
build: checkout
|
|
|
|
echo " MAKE $(project_name) $(NAME-y)"
|
2022-11-07 19:33:58 +01:00
|
|
|
$(MAKE) -C $(build_dir) all
|
|
|
|
ifeq ($(CONFIG_MEMTEST86PLUS_V6),y)
|
|
|
|
cp $(build_dir)/memtest.bin $(project_dir)/memtest
|
|
|
|
endif
|
2016-02-29 00:56:27 +01:00
|
|
|
|
|
|
|
clean:
|
2022-11-07 19:33:58 +01:00
|
|
|
test -d $(build_dir) && $(MAKE) -C $(build_dir) clean || exit 0
|
2016-02-29 00:56:27 +01:00
|
|
|
|
|
|
|
distclean:
|
|
|
|
rm -rf $(project_dir)
|
|
|
|
|
2016-03-16 19:42:05 +01:00
|
|
|
print-repo-info:
|
|
|
|
echo "$(project_git_repo) $(project_dir)"
|
|
|
|
|
2022-11-07 19:33:58 +01:00
|
|
|
.PHONY: all build checkout check_version clean distclean fetch print-repo-info
|