From f12465ce91ea487b64afbdcd26147c723301b792 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 19 Nov 2023 08:36:02 -0700 Subject: tools: Keep test_util and patman test files in the pip release The test_util module is actually imported by some tools, e.g. binman so include it in the pip release. The patman tool uses its test code when starting up, so keep that too. Show a list of deleted files so it is clear what is happening. Signed-off-by: Simon Glass --- scripts/make_pip.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/make_pip.sh b/scripts/make_pip.sh index 4602dcf61c8..25a4049271c 100755 --- a/scripts/make_pip.sh +++ b/scripts/make_pip.sh @@ -29,6 +29,9 @@ repo="--repository testpypi" # Non-empty to do the actual upload upload=1 +# Non-empty to delete files used for testing +delete_testfiles=1 + tool="$1" shift flags="$*" @@ -58,6 +61,11 @@ if [ -n "${upload}" ]; then fi fi +if [[ "${tool}" =~ ^(patman|u_boot_pylib)$ ]]; then + # Leave test_util.py and patman test files alone + delete_testfiles= +fi + # Create a temp dir to work in dir=$(mktemp -d) @@ -91,7 +99,9 @@ find ${dest} -name __pycache__ -type f -exec rm {} \; find ${dest} -depth -name __pycache__ -exec rmdir 112 \; # Remove test files -rm -rf ${dest}/*test* +if [ -n "${delete_testfiles}" ]; then + rm -rfv ${dest}/*test* +fi mkdir ${dir}/tests cd ${dir} -- cgit v1.2.3 From 01feeec559858b6935f57b3d0fb26ac329118917 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 19 Nov 2023 08:36:04 -0700 Subject: tools/make_pip: Add mention of u_boot_pylib in tool list This is not a tool but it is handled by the script, so update the help to include it. Signed-off-by: Simon Glass --- scripts/make_pip.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/make_pip.sh b/scripts/make_pip.sh index 25a4049271c..d2639ffd6e4 100755 --- a/scripts/make_pip.sh +++ b/scripts/make_pip.sh @@ -39,7 +39,7 @@ flags="$*" if [[ "${tool}" =~ ^(patman|buildman|dtoc|binman|u_boot_pylib)$ ]]; then echo "Building dist package for tool ${tool}" else - echo "Unknown tool ${tool}: use patman, buildman, dtoc or binman" + echo "Unknown tool ${tool}: use u_boot_pylib, patman, buildman, dtoc or binman" exit 1 fi -- cgit v1.2.3 From 0b2e47be2c6b37e6026e36ed3a8656a7ed598ce1 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 17 Dec 2023 09:36:21 -0700 Subject: sandbox: Correct SPL condition for building devicetree With sandbox, CONFIG_SANDBOX is y so the current rule ends up building the devicetree for only those SPL builds where it is unwanted. Correct the condition. This allows sandbox_vpl to produce a u-boot-vpl.dtb file. Fixes: e7fb789612e ("sandbox: Remove OF_HOSTFILE") Signed-off-by: Simon Glass --- scripts/Makefile.spl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl index e450ffd5d5e..407fc52376a 100644 --- a/scripts/Makefile.spl +++ b/scripts/Makefile.spl @@ -314,7 +314,7 @@ endif # - we have either OF_SEPARATE or OF_HOSTFILE build_dtb := ifneq ($(CONFIG_$(SPL_TPL_)OF_REAL),) -ifeq ($(CONFIG_OF_SEPARATE)$(CONFIG_SANDBOX),y) +ifneq ($(CONFIG_OF_SEPARATE)$(CONFIG_SANDBOX),) build_dtb := y endif endif -- cgit v1.2.3 From aca95282c1b72c41d8e72984b1dceb15f396b2f8 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Tue, 19 Dec 2023 07:21:25 -0700 Subject: Makefile: Use the fdtgrep -u flag Use this flag so that the bootph binding is obeyed correctly. Add a comment about what is going on. Signed-off-by: Simon Glass Fixes: https://source.denx.de/u-boot/custodians/u-boot-dm/-/issues/12 Reviewed-by: Tom Rini --- scripts/Makefile.lib | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 16bbc277a9f..1ca84195c99 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -635,8 +635,19 @@ else fdtgrep_props := -b bootph-all -b bootph-pre-ram $(migrate_spl) endif endif + +# This rule produces the .dtb for an SPL build. +# +# The first fdtgrep keeps nodes with the above properties (with -u ensuring that +# the properties are implied in all parents of a matching node). The root node +# is always included, along with /chosen and /config nodes. Referenced aliases +# (i.e. properties in /aliases which point to an incldued node) are also +# included. +# +# The second fdtgrep removes all bootph properties along with unused strings +# and any properties in CONFIG_OF_SPL_REMOVE_PROPS quiet_cmd_fdtgrep = FDTGREP $@ - cmd_fdtgrep = $(objtree)/tools/fdtgrep $(fdtgrep_props) -RT $< \ + cmd_fdtgrep = $(objtree)/tools/fdtgrep $(fdtgrep_props) -u -RT $< \ -n /chosen -n /config -O dtb | \ $(objtree)/tools/fdtgrep -r -O dtb - -o $@ \ -P bootph-all -P bootph-pre-ram -P bootph-pre-sram \ -- cgit v1.2.3