From 402558b1fe604baaa4aa4b3e1c72a65692861f2a Mon Sep 17 00:00:00 2001 From: Wasim Khan Date: Thu, 4 Feb 2021 15:44:04 +0100 Subject: cmd: fdt: skip board specific fixup using env variable Sometimes it is useful to boot OS with already fixed-up device tree. Check for env variable 'skip_board_fixup' before calling ft_board_setup(). Current behaviour is unchanged, additionally user can set skip_board_fixup to 1 to skip the fixup. Signed-off-by: Wasim Khan --- scripts/checkpatch.pl | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'scripts') diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 01ab570a168..755f4802a46 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2383,6 +2383,12 @@ sub u_boot_line { "fdt or initrd relocation disabled at boot time\n" . $herecurr); } + # make sure 'skip_board_fixup' is not + if ($rawline =~ /.*skip_board_fixup.*/) { + ERROR("SKIP_BOARD_FIXUP", + "Avoid setting skip_board_fixup env variable\n" . $herecurr); + } + # Do not use CONFIG_ prefix in CONFIG_IS_ENABLED() calls if ($line =~ /^\+.*CONFIG_IS_ENABLED\(CONFIG_\w*\).*/) { ERROR("CONFIG_IS_ENABLED_CONFIG", -- cgit v1.2.3 From 99078472455b8bb69ce57237bcc68ea9ac88ae38 Mon Sep 17 00:00:00 2001 From: Roger Pau Monne Date: Sat, 13 Feb 2021 11:06:31 +0100 Subject: scripts/check-config.sh: fix to be compatible with BSD sed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fist use extended regexp in order to drop the '\' around the parentheses which is not supported by BSD sed in regular mode. Secondly use [[:blank:]] instead of \s, as the later is a GNU extension. No functional change intended. Signed-off-by: Roger Pau Monné Reviewed-by: Simon Glass --- scripts/check-config.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/check-config.sh b/scripts/check-config.sh index 583f7d0963c..cc1c9a54d95 100755 --- a/scripts/check-config.sh +++ b/scripts/check-config.sh @@ -39,14 +39,14 @@ new_adhoc="${path}.adhoc" export LC_ALL=C export LC_COLLATE=C -cat ${path} |sed -n 's/^#define \(CONFIG_[A-Za-z0-9_]*\).*/\1/p' |sort |uniq \ +cat ${path} |sed -nr 's/^#define (CONFIG_[A-Za-z0-9_]*).*/\1/p' |sort |uniq \ >${configs} comm -23 ${configs} ${whitelist} > ${suspects} -cat `find ${srctree} -name "Kconfig*"` |sed -n \ - -e 's/^\s*config *\([A-Za-z0-9_]*\).*$/CONFIG_\1/p' \ - -e 's/^\s*menuconfig \([A-Za-z0-9_]*\).*$/CONFIG_\1/p' \ +cat `find ${srctree} -name "Kconfig*"` |sed -nr \ + -e 's/^[[:blank:]]*config *([A-Za-z0-9_]*).*$/CONFIG_\1/p' \ + -e 's/^[[:blank:]]*menuconfig ([A-Za-z0-9_]*).*$/CONFIG_\1/p' \ |sort |uniq > ${ok} comm -23 ${suspects} ${ok} >${new_adhoc} if [ -s ${new_adhoc} ]; then -- cgit v1.2.3 From e420a38fa69b2d528466a4b6d40deb1fb58ea352 Mon Sep 17 00:00:00 2001 From: Roger Pau Monne Date: Sat, 13 Feb 2021 11:06:32 +0100 Subject: build/DTC: fix sed usage in DTC command MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Current sed usage in the DTC command relies on GNU sed specific -i option which has a slightly different syntax for BSD sed and always expects an extension to be provided in order to create a backup file. Instead drop the cat concatenation done before the sed call and use sed itself to edit and concatenate the files. No functional change intended. Signed-off-by: Roger Pau Monné --- scripts/Makefile.lib | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 56e9d542429..78543c6dd10 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -326,8 +326,7 @@ cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \ -d $(depfile).dtc.tmp $(dtc-tmp) || \ (echo "Check $(shell pwd)/$(pre-tmp) for errors" && false) \ ; \ - cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile) ; \ - sed -i "s:$(pre-tmp):$(<):" $(depfile) + sed "s:$(pre-tmp):$(<):" $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile) $(obj)/%.dtb: $(src)/%.dts FORCE $(call if_changed_dep,dtc) -- cgit v1.2.3