All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/5] Move board specific files to board directory
@ 2021-12-17 23:01 Troy Kisky
  2021-12-17 23:01 ` [PATCH v1 1/5] kconfig: allow defconfigs to live in " Troy Kisky
                   ` (5 more replies)
  0 siblings, 6 replies; 26+ messages in thread
From: Troy Kisky @ 2021-12-17 23:01 UTC (permalink / raw)
  To: sjg, trini; +Cc: fabio.estevam, u-boot, Troy Kisky

This series intends to let board specific files live in the boards
directory. The last patch moves files for nitrogen6x.
I have tested it with buildman

./tools/buildman/buildman boundary -b denx_master

But it is likely the more scripts then just tools/genboardscfg.py would
need to be updated.

Troy Kisky (5):
  kconfig: allow defconfigs to live in board directory
  dts: allow dts files in board directory
  scripts: Makefile.autoconf: allow CONFIG_SYS_CONFIG_NAME file to live
    in board directory
  genboardcfg: allow defconfigs in board directory
  nitrogen6x: move board specific files to nitrogen6x directory

 arch/arm/dts/Makefile                         |  3 --
 board/boundary/nitrogen6x/MAINTAINERS         | 13 -------
 board/boundary/nitrogen6x/Makefile            | 13 +++++++
 .../nitrogen6x}/imx6dl-nitrogen6x.dts         |  0
 .../boundary/nitrogen6x}/imx6q-nitrogen6x.dts |  0
 .../boundary/nitrogen6x}/imx6q-sabrelite.dts  |  0
 .../nitrogen6x}/imx6qdl-nitrogen6x.dtsi       |  0
 .../nitrogen6x}/imx6qdl-sabrelite.dtsi        |  0
 .../nitrogen6x}/mx6qsabrelite_defconfig       |  0
 .../nitrogen6x}/nitrogen6dl2g_defconfig       |  0
 .../nitrogen6x}/nitrogen6dl_defconfig         |  0
 .../nitrogen6x}/nitrogen6q2g_defconfig        |  0
 .../boundary/nitrogen6x}/nitrogen6q_defconfig |  0
 .../nitrogen6x}/nitrogen6s1g_defconfig        |  0
 .../boundary/nitrogen6x}/nitrogen6s_defconfig |  0
 .../boundary/nitrogen6x}/nitrogen6x.h         |  2 +-
 dts/Makefile                                  | 11 +++++-
 scripts/Makefile.autoconf                     |  9 ++++-
 scripts/Makefile.lib                          |  1 +
 scripts/kconfig/Makefile                      |  9 ++++-
 tools/genboardscfg.py                         | 37 ++++++++++++++++++-
 21 files changed, 75 insertions(+), 23 deletions(-)
 rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6dl-nitrogen6x.dts (100%)
 rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6q-nitrogen6x.dts (100%)
 rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6q-sabrelite.dts (100%)
 rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6qdl-nitrogen6x.dtsi (100%)
 rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6qdl-sabrelite.dtsi (100%)
 rename {configs => board/boundary/nitrogen6x}/mx6qsabrelite_defconfig (100%)
 rename {configs => board/boundary/nitrogen6x}/nitrogen6dl2g_defconfig (100%)
 rename {configs => board/boundary/nitrogen6x}/nitrogen6dl_defconfig (100%)
 rename {configs => board/boundary/nitrogen6x}/nitrogen6q2g_defconfig (100%)
 rename {configs => board/boundary/nitrogen6x}/nitrogen6q_defconfig (100%)
 rename {configs => board/boundary/nitrogen6x}/nitrogen6s1g_defconfig (100%)
 rename {configs => board/boundary/nitrogen6x}/nitrogen6s_defconfig (100%)
 rename {include/configs => board/boundary/nitrogen6x}/nitrogen6x.h (98%)

-- 
2.32.0


^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCH v1 1/5] kconfig: allow defconfigs to live in board directory
  2021-12-17 23:01 [PATCH v1 0/5] Move board specific files to board directory Troy Kisky
@ 2021-12-17 23:01 ` Troy Kisky
  2021-12-28  8:33   ` Simon Glass
  2021-12-17 23:01 ` [PATCH v1 2/5] dts: allow dts files " Troy Kisky
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 26+ messages in thread
From: Troy Kisky @ 2021-12-17 23:01 UTC (permalink / raw)
  To: sjg, trini; +Cc: fabio.estevam, u-boot, Troy Kisky

This will reduce the size of the configs directory, and
make it more clear which board directory uses the defconfig
file.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
---
 scripts/kconfig/Makefile | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index 12e525ee31f..307262e00de 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -92,8 +92,15 @@ else
 endif
 endif
 
+%_defconfig: SHELL:=/bin/bash
 %_defconfig: $(obj)/conf
-	$(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig)
+	$(Q)readarray -d '' names < <(find $(srctree)/configs $(srctree)/board -type f -name $@ -print0); \
+	if (test $${#names[*]} -eq 1); then \
+		$< $(silent) --defconfig="$${names[0]}" $(Kconfig); \
+	else \
+		echo "$@" not found or ambiguous error; \
+		echo "$${names[@]}"; exit 1; \
+	fi
 
 # Added for U-Boot (backward compatibility)
 %_config: %_defconfig
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v1 2/5] dts: allow dts files in board directory
  2021-12-17 23:01 [PATCH v1 0/5] Move board specific files to board directory Troy Kisky
  2021-12-17 23:01 ` [PATCH v1 1/5] kconfig: allow defconfigs to live in " Troy Kisky
@ 2021-12-17 23:01 ` Troy Kisky
  2021-12-28  8:33   ` Simon Glass
  2021-12-17 23:01 ` [PATCH v1 3/5] scripts: Makefile.autoconf: allow CONFIG_SYS_CONFIG_NAME file to live " Troy Kisky
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 26+ messages in thread
From: Troy Kisky @ 2021-12-17 23:01 UTC (permalink / raw)
  To: sjg, trini; +Cc: fabio.estevam, u-boot, Troy Kisky

Let the board specific dts files live in the board directory.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
---
 dts/Makefile         | 11 +++++++++--
 scripts/Makefile.lib |  1 +
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/dts/Makefile b/dts/Makefile
index cb311138295..09b46f9fcfd 100644
--- a/dts/Makefile
+++ b/dts/Makefile
@@ -13,7 +13,9 @@ endif
 ifneq ($(EXT_DTB),)
 DTB := $(EXT_DTB)
 else
-DTB := arch/$(ARCH)/dts/$(DEVICE_TREE).dtb
+ifneq "$(ARCH)" "arm64"
+DTB := $(patsubst $(srctree)/%.dts,%.dtb,$(shell find "$(srctree)/board/$(BOARDDIR)" $(srctree)/arch/$(ARCH)/dts/ -type f -name $(DEVICE_TREE).dts))
+endif
 endif
 
 $(obj)/dt-$(SPL_NAME).dtb: dts/dt.dtb $(objtree)/tools/fdtgrep FORCE
@@ -40,8 +42,13 @@ $(DTB): arch-dtbs
 	/bin/false)
 
 PHONY += arch-dtbs
+ifneq "$(patsubst board/$(BOARDDIR)/%,,$(DTB))" ""
 arch-dtbs:
 	$(Q)$(MAKE) $(build)=arch/$(ARCH)/dts dtbs
+else
+arch-dtbs:
+	$(Q)$(MAKE) $(build)="board/$(BOARDDIR)" dtbs
+endif
 
 ifeq ($(CONFIG_SPL_BUILD),y)
 obj-$(CONFIG_OF_EMBED) := dt-spl.dtb.o
@@ -63,4 +70,4 @@ spl_dtbs: $(obj)/dt-$(SPL_NAME).dtb
 clean-files := dt.dtb.S
 
 # Let clean descend into dts directories
-subdir- += ../arch/arm/dts ../arch/microblaze/dts ../arch/mips/dts ../arch/sandbox/dts ../arch/x86/dts ../arch/powerpc/dts ../arch/riscv/dts
+subdir- += ../arch/arm/dts ../arch/microblaze/dts ../arch/mips/dts ../arch/sandbox/dts ../arch/x86/dts ../arch/powerpc/dts ../arch/riscv/dts ../$(patsubst $(srctree)/%/,%,$(dir $(shell find $(srctree)/board -type f -name "*.dtb")))
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 39f03398ed8..18fe42f378f 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -183,6 +183,7 @@ u_boot_dtsi = $(strip $(u_boot_dtsi_options_debug) \
 
 # Modified for U-Boot
 dtc_cpp_flags  = -Wp,-MD,$(depfile).pre.tmp -nostdinc                    \
+		 -I$(srctree)/board/$(BOARDDIR)                          \
 		 -I$(srctree)/arch/$(ARCH)/dts                           \
 		 -I$(srctree)/arch/$(ARCH)/dts/include                   \
 		 -Iinclude                                               \
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v1 3/5] scripts: Makefile.autoconf: allow CONFIG_SYS_CONFIG_NAME file to live in board directory
  2021-12-17 23:01 [PATCH v1 0/5] Move board specific files to board directory Troy Kisky
  2021-12-17 23:01 ` [PATCH v1 1/5] kconfig: allow defconfigs to live in " Troy Kisky
  2021-12-17 23:01 ` [PATCH v1 2/5] dts: allow dts files " Troy Kisky
@ 2021-12-17 23:01 ` Troy Kisky
  2021-12-28  8:33   ` Simon Glass
  2021-12-17 23:01 ` [PATCH v1 4/5] genboardcfg: allow defconfigs " Troy Kisky
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 26+ messages in thread
From: Troy Kisky @ 2021-12-17 23:01 UTC (permalink / raw)
  To: sjg, trini; +Cc: fabio.estevam, u-boot, Troy Kisky

Let the board specific include file live in the board directory.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
---
 scripts/Makefile.autoconf | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/scripts/Makefile.autoconf b/scripts/Makefile.autoconf
index 8a3efdb2db0..6a725a3e2ff 100644
--- a/scripts/Makefile.autoconf
+++ b/scripts/Makefile.autoconf
@@ -103,9 +103,14 @@ define filechk_config_h
 		echo \#define CONFIG_$$i				\
 		| sed '/=/ {s/=/	/;q; } ; { s/$$/	1/; }'; \
 	done;								\
-	echo \#define CONFIG_BOARDDIR board/$(if $(VENDOR),$(VENDOR)/)$(BOARD);\
+	config_boarddir=board/$(if $(VENDOR),$(VENDOR)/)$(BOARD);	\
+	echo \#define CONFIG_BOARDDIR $$config_boarddir;		\
 	echo \#include \<config_uncmd_spl.h\>;				\
-	echo \#include \<configs/$(CONFIG_SYS_CONFIG_NAME).h\>;		\
+	if [ -f $(srctree)/$$config_boarddir/$(CONFIG_SYS_CONFIG_NAME).h ] ; then	\
+		echo \#include \"../$$config_boarddir/$(CONFIG_SYS_CONFIG_NAME).h\"; \
+	else								\
+		echo \#include \<configs/$(CONFIG_SYS_CONFIG_NAME).h\>;	\
+	fi;								\
 	echo \#include \<asm/config.h\>;				\
 	echo \#include \<linux/kconfig.h\>;				\
 	echo \#include \<config_fallbacks.h\>;)
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v1 4/5] genboardcfg: allow defconfigs in board directory
  2021-12-17 23:01 [PATCH v1 0/5] Move board specific files to board directory Troy Kisky
                   ` (2 preceding siblings ...)
  2021-12-17 23:01 ` [PATCH v1 3/5] scripts: Makefile.autoconf: allow CONFIG_SYS_CONFIG_NAME file to live " Troy Kisky
@ 2021-12-17 23:01 ` Troy Kisky
  2021-12-28  8:33   ` Simon Glass
  2021-12-17 23:01 ` [PATCH v1 5/5] nitrogen6x: move board specific files to nitrogen6x directory Troy Kisky
  2021-12-28  8:33 ` [PATCH v1 0/5] Move board specific files to board directory Simon Glass
  5 siblings, 1 reply; 26+ messages in thread
From: Troy Kisky @ 2021-12-17 23:01 UTC (permalink / raw)
  To: sjg, trini; +Cc: fabio.estevam, u-boot, Troy Kisky

The adds boards whose defconfigs are in the board's directory.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
---
 tools/genboardscfg.py | 37 ++++++++++++++++++++++++++++++++++++-
 1 file changed, 36 insertions(+), 1 deletion(-)

diff --git a/tools/genboardscfg.py b/tools/genboardscfg.py
index 4ee7aa1f891..60e2fe5cf3e 100755
--- a/tools/genboardscfg.py
+++ b/tools/genboardscfg.py
@@ -37,6 +37,13 @@ COMMENT_BLOCK = '''#
 ''' % __file__
 
 ### helper functions ###
+def find_defconfig_in_board_subdir(f):
+    for (dirpath, dirnames, filenames) in os.walk('board'):
+        for filename in filenames:
+            if filename == f:
+                    return True
+    return False
+
 def try_remove(f):
     """Remove a file ignoring 'No such file or directory' error."""
     try:
@@ -76,6 +83,14 @@ def output_is_new(output):
             if ctime < os.path.getctime(filepath):
                 return False
 
+    for (dirpath, dirnames, filenames) in os.walk('board'):
+        for filename in fnmatch.filter(filenames, '*'):
+            if fnmatch.fnmatch(filename, '.*'):
+                continue
+            filepath = os.path.join(dirpath, filename)
+            if ctime < os.path.getctime(filepath):
+                return False
+
     for (dirpath, dirnames, filenames) in os.walk('.'):
         for filename in filenames:
             if (fnmatch.fnmatch(filename, '*~') or
@@ -94,7 +109,8 @@ def output_is_new(output):
                 continue
             defconfig = line.split()[6] + '_defconfig'
             if not os.path.exists(os.path.join(CONFIG_DIR, defconfig)):
-                return False
+                if not find_defconfig_in_board_subdir(defconfig):
+                    return False
 
     return True
 
@@ -231,6 +247,12 @@ def scan_defconfigs(jobs=1):
                 continue
             all_defconfigs.append(os.path.join(dirpath, filename))
 
+    for (dirpath, dirnames, filenames) in os.walk('board'):
+        for filename in fnmatch.filter(filenames, '*_defconfig'):
+            if fnmatch.fnmatch(filename, '.*'):
+                continue
+            all_defconfigs.append(os.path.join(dirpath, filename))
+
     total_boards = len(all_defconfigs)
     processes = []
     queues = []
@@ -346,6 +368,19 @@ class MaintainersDatabase:
                 targets = []
                 maintainers = []
                 status = '-'
+
+        front, match, rear = file.partition('board/')
+        if match:
+            front, match, rear = file.partition('/MAINTAINERS')
+            if front:
+                for (dirpath, dirnames, filenames) in os.walk(front):
+                    for filename in fnmatch.filter(filenames, '*_defconfig'):
+                        if fnmatch.fnmatch(filename, '.*'):
+                            continue
+                        front, match, rear = filename.rpartition('_defconfig')
+                        if match and not rear:
+                            targets.append(front)
+
         if targets:
             for target in targets:
                 self.database[target] = (status, maintainers)
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v1 5/5] nitrogen6x: move board specific files to nitrogen6x directory
  2021-12-17 23:01 [PATCH v1 0/5] Move board specific files to board directory Troy Kisky
                   ` (3 preceding siblings ...)
  2021-12-17 23:01 ` [PATCH v1 4/5] genboardcfg: allow defconfigs " Troy Kisky
@ 2021-12-17 23:01 ` Troy Kisky
  2021-12-28  8:33   ` Simon Glass
  2021-12-28  8:33 ` [PATCH v1 0/5] Move board specific files to board directory Simon Glass
  5 siblings, 1 reply; 26+ messages in thread
From: Troy Kisky @ 2021-12-17 23:01 UTC (permalink / raw)
  To: sjg, trini; +Cc: fabio.estevam, u-boot, Troy Kisky

This makes it clearer which board uses a file.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
---
 arch/arm/dts/Makefile                               |  3 ---
 board/boundary/nitrogen6x/MAINTAINERS               | 13 -------------
 board/boundary/nitrogen6x/Makefile                  | 13 +++++++++++++
 .../boundary/nitrogen6x}/imx6dl-nitrogen6x.dts      |  0
 .../boundary/nitrogen6x}/imx6q-nitrogen6x.dts       |  0
 .../boundary/nitrogen6x}/imx6q-sabrelite.dts        |  0
 .../boundary/nitrogen6x}/imx6qdl-nitrogen6x.dtsi    |  0
 .../boundary/nitrogen6x}/imx6qdl-sabrelite.dtsi     |  0
 .../boundary/nitrogen6x}/mx6qsabrelite_defconfig    |  0
 .../boundary/nitrogen6x}/nitrogen6dl2g_defconfig    |  0
 .../boundary/nitrogen6x}/nitrogen6dl_defconfig      |  0
 .../boundary/nitrogen6x}/nitrogen6q2g_defconfig     |  0
 .../boundary/nitrogen6x}/nitrogen6q_defconfig       |  0
 .../boundary/nitrogen6x}/nitrogen6s1g_defconfig     |  0
 .../boundary/nitrogen6x}/nitrogen6s_defconfig       |  0
 .../boundary/nitrogen6x}/nitrogen6x.h               |  2 +-
 16 files changed, 14 insertions(+), 17 deletions(-)
 rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6dl-nitrogen6x.dts (100%)
 rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6q-nitrogen6x.dts (100%)
 rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6q-sabrelite.dts (100%)
 rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6qdl-nitrogen6x.dtsi (100%)
 rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6qdl-sabrelite.dtsi (100%)
 rename {configs => board/boundary/nitrogen6x}/mx6qsabrelite_defconfig (100%)
 rename {configs => board/boundary/nitrogen6x}/nitrogen6dl2g_defconfig (100%)
 rename {configs => board/boundary/nitrogen6x}/nitrogen6dl_defconfig (100%)
 rename {configs => board/boundary/nitrogen6x}/nitrogen6q2g_defconfig (100%)
 rename {configs => board/boundary/nitrogen6x}/nitrogen6q_defconfig (100%)
 rename {configs => board/boundary/nitrogen6x}/nitrogen6s1g_defconfig (100%)
 rename {configs => board/boundary/nitrogen6x}/nitrogen6s_defconfig (100%)
 rename {include/configs => board/boundary/nitrogen6x}/nitrogen6x.h (98%)

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 7f622fedbda..a864a6dd4b8 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -744,7 +744,6 @@ dtb-y += \
 	imx6dl-mba6a.dtb \
 	imx6dl-mba6b.dtb \
 	imx6dl-mamoj.dtb \
-	imx6dl-nitrogen6x.dtb \
 	imx6dl-pico.dtb \
 	imx6dl-udoo.dtb \
 	imx6dl-riotboard.dtb \
@@ -792,13 +791,11 @@ dtb-y += \
 	imx6q-mba6a.dtb \
 	imx6q-mba6b.dtb \
 	imx6q-mccmon6.dtb\
-	imx6q-nitrogen6x.dtb \
 	imx6q-novena.dtb \
 	imx6q-pico.dtb \
 	imx6q-phytec-mira-rdk-nand.dtb \
 	imx6q-udoo.dtb \
 	imx6q-sabreauto.dtb \
-	imx6q-sabrelite.dtb \
 	imx6q-sabresd.dtb \
 	imx6q-tbs2910.dtb \
 	imx6q-wandboard-revd1.dtb \
diff --git a/board/boundary/nitrogen6x/MAINTAINERS b/board/boundary/nitrogen6x/MAINTAINERS
index 17018d69f64..b11bc1f20d1 100644
--- a/board/boundary/nitrogen6x/MAINTAINERS
+++ b/board/boundary/nitrogen6x/MAINTAINERS
@@ -1,17 +1,4 @@
 NITROGEN6X BOARD
 M:	Troy Kisky <troy.kisky@boundarydevices.com>
 S:	Maintained
-F:	arch/arm/dts/imx6dl-nitrogen6x.dts
-F:	arch/arm/dts/imx6q-nitrogen6x.dts
-F:	arch/arm/dts/imx6q-sabrelite.dts
-F:	arch/arm/dts/imx6qdl-nitrogen6x.dtsi
-F:	arch/arm/dts/imx6qdl-sabrelite.dtsi
 F:	board/boundary/nitrogen6x/
-F:	include/configs/nitrogen6x.h
-F:	configs/mx6qsabrelite_defconfig
-F:	configs/nitrogen6dl_defconfig
-F:	configs/nitrogen6dl2g_defconfig
-F:	configs/nitrogen6q_defconfig
-F:	configs/nitrogen6q2g_defconfig
-F:	configs/nitrogen6s_defconfig
-F:	configs/nitrogen6s1g_defconfig
diff --git a/board/boundary/nitrogen6x/Makefile b/board/boundary/nitrogen6x/Makefile
index c8433bd7488..dd627411fa9 100644
--- a/board/boundary/nitrogen6x/Makefile
+++ b/board/boundary/nitrogen6x/Makefile
@@ -5,3 +5,16 @@
 # Copyright (C) 2013, Boundary Devices <info@boundarydevices.com>
 
 obj-y  := nitrogen6x.o
+
+dtb-y += imx6dl-nitrogen6x.dtb \
+	imx6q-nitrogen6x.dtb \
+	imx6q-sabrelite.dtb \
+
+# Add any required device tree compiler flags here
+DTC_FLAGS += -a 0x8
+
+PHONY += dtbs
+dtbs: $(addprefix $(obj)/, $(dtb-y))
+	@:
+
+clean-files := $(dtb-y)
diff --git a/arch/arm/dts/imx6dl-nitrogen6x.dts b/board/boundary/nitrogen6x/imx6dl-nitrogen6x.dts
similarity index 100%
rename from arch/arm/dts/imx6dl-nitrogen6x.dts
rename to board/boundary/nitrogen6x/imx6dl-nitrogen6x.dts
diff --git a/arch/arm/dts/imx6q-nitrogen6x.dts b/board/boundary/nitrogen6x/imx6q-nitrogen6x.dts
similarity index 100%
rename from arch/arm/dts/imx6q-nitrogen6x.dts
rename to board/boundary/nitrogen6x/imx6q-nitrogen6x.dts
diff --git a/arch/arm/dts/imx6q-sabrelite.dts b/board/boundary/nitrogen6x/imx6q-sabrelite.dts
similarity index 100%
rename from arch/arm/dts/imx6q-sabrelite.dts
rename to board/boundary/nitrogen6x/imx6q-sabrelite.dts
diff --git a/arch/arm/dts/imx6qdl-nitrogen6x.dtsi b/board/boundary/nitrogen6x/imx6qdl-nitrogen6x.dtsi
similarity index 100%
rename from arch/arm/dts/imx6qdl-nitrogen6x.dtsi
rename to board/boundary/nitrogen6x/imx6qdl-nitrogen6x.dtsi
diff --git a/arch/arm/dts/imx6qdl-sabrelite.dtsi b/board/boundary/nitrogen6x/imx6qdl-sabrelite.dtsi
similarity index 100%
rename from arch/arm/dts/imx6qdl-sabrelite.dtsi
rename to board/boundary/nitrogen6x/imx6qdl-sabrelite.dtsi
diff --git a/configs/mx6qsabrelite_defconfig b/board/boundary/nitrogen6x/mx6qsabrelite_defconfig
similarity index 100%
rename from configs/mx6qsabrelite_defconfig
rename to board/boundary/nitrogen6x/mx6qsabrelite_defconfig
diff --git a/configs/nitrogen6dl2g_defconfig b/board/boundary/nitrogen6x/nitrogen6dl2g_defconfig
similarity index 100%
rename from configs/nitrogen6dl2g_defconfig
rename to board/boundary/nitrogen6x/nitrogen6dl2g_defconfig
diff --git a/configs/nitrogen6dl_defconfig b/board/boundary/nitrogen6x/nitrogen6dl_defconfig
similarity index 100%
rename from configs/nitrogen6dl_defconfig
rename to board/boundary/nitrogen6x/nitrogen6dl_defconfig
diff --git a/configs/nitrogen6q2g_defconfig b/board/boundary/nitrogen6x/nitrogen6q2g_defconfig
similarity index 100%
rename from configs/nitrogen6q2g_defconfig
rename to board/boundary/nitrogen6x/nitrogen6q2g_defconfig
diff --git a/configs/nitrogen6q_defconfig b/board/boundary/nitrogen6x/nitrogen6q_defconfig
similarity index 100%
rename from configs/nitrogen6q_defconfig
rename to board/boundary/nitrogen6x/nitrogen6q_defconfig
diff --git a/configs/nitrogen6s1g_defconfig b/board/boundary/nitrogen6x/nitrogen6s1g_defconfig
similarity index 100%
rename from configs/nitrogen6s1g_defconfig
rename to board/boundary/nitrogen6x/nitrogen6s1g_defconfig
diff --git a/configs/nitrogen6s_defconfig b/board/boundary/nitrogen6x/nitrogen6s_defconfig
similarity index 100%
rename from configs/nitrogen6s_defconfig
rename to board/boundary/nitrogen6x/nitrogen6s_defconfig
diff --git a/include/configs/nitrogen6x.h b/board/boundary/nitrogen6x/nitrogen6x.h
similarity index 98%
rename from include/configs/nitrogen6x.h
rename to board/boundary/nitrogen6x/nitrogen6x.h
index 1a1c08bd308..2c86a2a99d0 100644
--- a/include/configs/nitrogen6x.h
+++ b/board/boundary/nitrogen6x/nitrogen6x.h
@@ -9,7 +9,7 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
-#include "mx6_common.h"
+#include <configs/mx6_common.h>
 
 #define CONFIG_USBD_HS
 
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 0/5] Move board specific files to board directory
  2021-12-17 23:01 [PATCH v1 0/5] Move board specific files to board directory Troy Kisky
                   ` (4 preceding siblings ...)
  2021-12-17 23:01 ` [PATCH v1 5/5] nitrogen6x: move board specific files to nitrogen6x directory Troy Kisky
@ 2021-12-28  8:33 ` Simon Glass
  2021-12-28 13:11   ` Tom Rini
  5 siblings, 1 reply; 26+ messages in thread
From: Simon Glass @ 2021-12-28  8:33 UTC (permalink / raw)
  To: Troy Kisky; +Cc: Tom Rini, Fabio Estevam, U-Boot Mailing List

Hi Troy,

On Fri, 17 Dec 2021 at 16:02, Troy Kisky <troy.kisky@boundarydevices.com> wrote:
>
> This series intends to let board specific files live in the boards
> directory. The last patch moves files for nitrogen6x.
> I have tested it with buildman
>
> ./tools/buildman/buildman boundary -b denx_master
>
> But it is likely the more scripts then just tools/genboardscfg.py would
> need to be updated.
>
> Troy Kisky (5):
>   kconfig: allow defconfigs to live in board directory
>   dts: allow dts files in board directory
>   scripts: Makefile.autoconf: allow CONFIG_SYS_CONFIG_NAME file to live
>     in board directory
>   genboardcfg: allow defconfigs in board directory
>   nitrogen6x: move board specific files to nitrogen6x directory
>
>  arch/arm/dts/Makefile                         |  3 --
>  board/boundary/nitrogen6x/MAINTAINERS         | 13 -------
>  board/boundary/nitrogen6x/Makefile            | 13 +++++++
>  .../nitrogen6x}/imx6dl-nitrogen6x.dts         |  0
>  .../boundary/nitrogen6x}/imx6q-nitrogen6x.dts |  0
>  .../boundary/nitrogen6x}/imx6q-sabrelite.dts  |  0
>  .../nitrogen6x}/imx6qdl-nitrogen6x.dtsi       |  0
>  .../nitrogen6x}/imx6qdl-sabrelite.dtsi        |  0
>  .../nitrogen6x}/mx6qsabrelite_defconfig       |  0
>  .../nitrogen6x}/nitrogen6dl2g_defconfig       |  0
>  .../nitrogen6x}/nitrogen6dl_defconfig         |  0
>  .../nitrogen6x}/nitrogen6q2g_defconfig        |  0
>  .../boundary/nitrogen6x}/nitrogen6q_defconfig |  0
>  .../nitrogen6x}/nitrogen6s1g_defconfig        |  0
>  .../boundary/nitrogen6x}/nitrogen6s_defconfig |  0
>  .../boundary/nitrogen6x}/nitrogen6x.h         |  2 +-
>  dts/Makefile                                  | 11 +++++-
>  scripts/Makefile.autoconf                     |  9 ++++-
>  scripts/Makefile.lib                          |  1 +
>  scripts/kconfig/Makefile                      |  9 ++++-
>  tools/genboardscfg.py                         | 37 ++++++++++++++++++-
>  21 files changed, 75 insertions(+), 23 deletions(-)
>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6dl-nitrogen6x.dts (100%)
>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6q-nitrogen6x.dts (100%)
>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6q-sabrelite.dts (100%)
>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6qdl-nitrogen6x.dtsi (100%)
>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6qdl-sabrelite.dtsi (100%)
>  rename {configs => board/boundary/nitrogen6x}/mx6qsabrelite_defconfig (100%)
>  rename {configs => board/boundary/nitrogen6x}/nitrogen6dl2g_defconfig (100%)
>  rename {configs => board/boundary/nitrogen6x}/nitrogen6dl_defconfig (100%)
>  rename {configs => board/boundary/nitrogen6x}/nitrogen6q2g_defconfig (100%)
>  rename {configs => board/boundary/nitrogen6x}/nitrogen6q_defconfig (100%)
>  rename {configs => board/boundary/nitrogen6x}/nitrogen6s1g_defconfig (100%)
>  rename {configs => board/boundary/nitrogen6x}/nitrogen6s_defconfig (100%)
>  rename {include/configs => board/boundary/nitrogen6x}/nitrogen6x.h (98%) I'm not about the goal.

Can you please add a few notes about the motivation for this change?

Regards,
Simon

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 1/5] kconfig: allow defconfigs to live in board directory
  2021-12-17 23:01 ` [PATCH v1 1/5] kconfig: allow defconfigs to live in " Troy Kisky
@ 2021-12-28  8:33   ` Simon Glass
  2022-01-06 21:00     ` Troy Kisky
  0 siblings, 1 reply; 26+ messages in thread
From: Simon Glass @ 2021-12-28  8:33 UTC (permalink / raw)
  To: Troy Kisky; +Cc: Tom Rini, Fabio Estevam, U-Boot Mailing List

Hi Troy,

On Fri, 17 Dec 2021 at 16:02, Troy Kisky <troy.kisky@boundarydevices.com> wrote:
>
> This will reduce the size of the configs directory, and
> make it more clear which board directory uses the defconfig
> file.
>
> Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
> ---
>  scripts/kconfig/Makefile | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

>
> diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
> index 12e525ee31f..307262e00de 100644
> --- a/scripts/kconfig/Makefile
> +++ b/scripts/kconfig/Makefile
> @@ -92,8 +92,15 @@ else
>  endif
>  endif
>
> +%_defconfig: SHELL:=/bin/bash
>  %_defconfig: $(obj)/conf
> -       $(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig)
> +       $(Q)readarray -d '' names < <(find $(srctree)/configs $(srctree)/board -type f -name $@ -print0); \
> +       if (test $${#names[*]} -eq 1); then \
> +               $< $(silent) --defconfig="$${names[0]}" $(Kconfig); \
> +       else \
> +               echo "$@" not found or ambiguous error; \
> +               echo "$${names[@]}"; exit 1; \
> +       fi
>
>  # Added for U-Boot (backward compatibility)
>  %_config: %_defconfig
> --
> 2.32.0
>

How could this ever match more than one file?

Regards,
Simon

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 2/5] dts: allow dts files in board directory
  2021-12-17 23:01 ` [PATCH v1 2/5] dts: allow dts files " Troy Kisky
@ 2021-12-28  8:33   ` Simon Glass
  2022-01-06 21:01     ` Troy Kisky
  0 siblings, 1 reply; 26+ messages in thread
From: Simon Glass @ 2021-12-28  8:33 UTC (permalink / raw)
  To: Troy Kisky; +Cc: Tom Rini, Fabio Estevam, U-Boot Mailing List

Hi Troy,

On Fri, 17 Dec 2021 at 16:02, Troy Kisky <troy.kisky@boundarydevices.com> wrote:
>
> Let the board specific dts files live in the board directory.
>
> Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
> ---
>  dts/Makefile         | 11 +++++++++--
>  scripts/Makefile.lib |  1 +
>  2 files changed, 10 insertions(+), 2 deletions(-)

I think .dts files should be built at the SoC level, at the finest.
Otherwise we might change a .dtsi and break something without
knowing...and it is very hard to know what other builds to do. This
seems to be heading towards target-specific building.

Regards,
Simon

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 3/5] scripts: Makefile.autoconf: allow CONFIG_SYS_CONFIG_NAME file to live in board directory
  2021-12-17 23:01 ` [PATCH v1 3/5] scripts: Makefile.autoconf: allow CONFIG_SYS_CONFIG_NAME file to live " Troy Kisky
@ 2021-12-28  8:33   ` Simon Glass
  2022-01-06 21:09     ` Troy Kisky
  0 siblings, 1 reply; 26+ messages in thread
From: Simon Glass @ 2021-12-28  8:33 UTC (permalink / raw)
  To: Troy Kisky; +Cc: Tom Rini, Fabio Estevam, U-Boot Mailing List

Hi Troy,

On Fri, 17 Dec 2021 at 16:02, Troy Kisky <troy.kisky@boundarydevices.com> wrote:
>
> Let the board specific include file live in the board directory.
>
> Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
> ---
>  scripts/Makefile.autoconf | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)

We are actually working on deleting these. What is the benefit of
putting it here?

>
> diff --git a/scripts/Makefile.autoconf b/scripts/Makefile.autoconf
> index 8a3efdb2db0..6a725a3e2ff 100644
> --- a/scripts/Makefile.autoconf
> +++ b/scripts/Makefile.autoconf
> @@ -103,9 +103,14 @@ define filechk_config_h
>                 echo \#define CONFIG_$$i                                \
>                 | sed '/=/ {s/=/        /;q; } ; { s/$$/        1/; }'; \
>         done;                                                           \
> -       echo \#define CONFIG_BOARDDIR board/$(if $(VENDOR),$(VENDOR)/)$(BOARD);\
> +       config_boarddir=board/$(if $(VENDOR),$(VENDOR)/)$(BOARD);       \
> +       echo \#define CONFIG_BOARDDIR $$config_boarddir;                \
>         echo \#include \<config_uncmd_spl.h\>;                          \
> -       echo \#include \<configs/$(CONFIG_SYS_CONFIG_NAME).h\>;         \
> +       if [ -f $(srctree)/$$config_boarddir/$(CONFIG_SYS_CONFIG_NAME).h ] ; then       \
> +               echo \#include \"../$$config_boarddir/$(CONFIG_SYS_CONFIG_NAME).h\"; \
> +       else                                                            \
> +               echo \#include \<configs/$(CONFIG_SYS_CONFIG_NAME).h\>; \
> +       fi;                                                             \
>         echo \#include \<asm/config.h\>;                                \
>         echo \#include \<linux/kconfig.h\>;                             \
>         echo \#include \<config_fallbacks.h\>;)
> --
> 2.32.0
>

Regards,
Simon

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 4/5] genboardcfg: allow defconfigs in board directory
  2021-12-17 23:01 ` [PATCH v1 4/5] genboardcfg: allow defconfigs " Troy Kisky
@ 2021-12-28  8:33   ` Simon Glass
  0 siblings, 0 replies; 26+ messages in thread
From: Simon Glass @ 2021-12-28  8:33 UTC (permalink / raw)
  To: Troy Kisky; +Cc: Tom Rini, Fabio Estevam, U-Boot Mailing List

Hi Troy,

On Fri, 17 Dec 2021 at 16:02, Troy Kisky <troy.kisky@boundarydevices.com> wrote:
>
> The adds boards whose defconfigs are in the board's directory.
>
> Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
> ---
>  tools/genboardscfg.py | 37 ++++++++++++++++++++++++++++++++++++-
>  1 file changed, 36 insertions(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

Please see below

> diff --git a/tools/genboardscfg.py b/tools/genboardscfg.py
> index 4ee7aa1f891..60e2fe5cf3e 100755
> --- a/tools/genboardscfg.py
> +++ b/tools/genboardscfg.py
> @@ -37,6 +37,13 @@ COMMENT_BLOCK = '''#
>  ''' % __file__
>
>  ### helper functions ###
> +def find_defconfig_in_board_subdir(f):

Needs a comment as to what it does and what it returns

> +    for (dirpath, dirnames, filenames) in os.walk('board'):
> +        for filename in filenames:
> +            if filename == f:
> +                    return True
> +    return False
> +
>  def try_remove(f):
>      """Remove a file ignoring 'No such file or directory' error."""
>      try:
> @@ -76,6 +83,14 @@ def output_is_new(output):
>              if ctime < os.path.getctime(filepath):
>                  return False
>
> +    for (dirpath, dirnames, filenames) in os.walk('board'):
> +        for filename in fnmatch.filter(filenames, '*'):
> +            if fnmatch.fnmatch(filename, '.*'):
> +                continue
> +            filepath = os.path.join(dirpath, filename)
> +            if ctime < os.path.getctime(filepath):
> +                return False
> +
>      for (dirpath, dirnames, filenames) in os.walk('.'):
>          for filename in filenames:
>              if (fnmatch.fnmatch(filename, '*~') or
> @@ -94,7 +109,8 @@ def output_is_new(output):
>                  continue
>              defconfig = line.split()[6] + '_defconfig'
>              if not os.path.exists(os.path.join(CONFIG_DIR, defconfig)):
> -                return False
> +                if not find_defconfig_in_board_subdir(defconfig):
> +                    return False
>
>      return True
>
> @@ -231,6 +247,12 @@ def scan_defconfigs(jobs=1):
>                  continue
>              all_defconfigs.append(os.path.join(dirpath, filename))
>
> +    for (dirpath, dirnames, filenames) in os.walk('board'):
> +        for filename in fnmatch.filter(filenames, '*_defconfig'):
> +            if fnmatch.fnmatch(filename, '.*'):
> +                continue
> +            all_defconfigs.append(os.path.join(dirpath, filename))
> +
>      total_boards = len(all_defconfigs)
>      processes = []
>      queues = []
> @@ -346,6 +368,19 @@ class MaintainersDatabase:
>                  targets = []
>                  maintainers = []
>                  status = '-'
> +
> +        front, match, rear = file.partition('board/')

Please add a comment about what is going on here

> +        if match:
> +            front, match, rear = file.partition('/MAINTAINERS')
> +            if front:
> +                for (dirpath, dirnames, filenames) in os.walk(front):
> +                    for filename in fnmatch.filter(filenames, '*_defconfig'):
> +                        if fnmatch.fnmatch(filename, '.*'):
> +                            continue
> +                        front, match, rear = filename.rpartition('_defconfig')
> +                        if match and not rear:
> +                            targets.append(front)
> +
>          if targets:
>              for target in targets:
>                  self.database[target] = (status, maintainers)
> --
> 2.32.0
>

Regards,
Simon

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 5/5] nitrogen6x: move board specific files to nitrogen6x directory
  2021-12-17 23:01 ` [PATCH v1 5/5] nitrogen6x: move board specific files to nitrogen6x directory Troy Kisky
@ 2021-12-28  8:33   ` Simon Glass
  0 siblings, 0 replies; 26+ messages in thread
From: Simon Glass @ 2021-12-28  8:33 UTC (permalink / raw)
  To: Troy Kisky; +Cc: Tom Rini, Fabio Estevam, U-Boot Mailing List

Hi Troy,

On Fri, 17 Dec 2021 at 16:02, Troy Kisky <troy.kisky@boundarydevices.com> wrote:
>
> This makes it clearer which board uses a file.
>
> Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
> ---
>  arch/arm/dts/Makefile                               |  3 ---
>  board/boundary/nitrogen6x/MAINTAINERS               | 13 -------------
>  board/boundary/nitrogen6x/Makefile                  | 13 +++++++++++++
>  .../boundary/nitrogen6x}/imx6dl-nitrogen6x.dts      |  0
>  .../boundary/nitrogen6x}/imx6q-nitrogen6x.dts       |  0
>  .../boundary/nitrogen6x}/imx6q-sabrelite.dts        |  0
>  .../boundary/nitrogen6x}/imx6qdl-nitrogen6x.dtsi    |  0
>  .../boundary/nitrogen6x}/imx6qdl-sabrelite.dtsi     |  0
>  .../boundary/nitrogen6x}/mx6qsabrelite_defconfig    |  0
>  .../boundary/nitrogen6x}/nitrogen6dl2g_defconfig    |  0
>  .../boundary/nitrogen6x}/nitrogen6dl_defconfig      |  0
>  .../boundary/nitrogen6x}/nitrogen6q2g_defconfig     |  0
>  .../boundary/nitrogen6x}/nitrogen6q_defconfig       |  0
>  .../boundary/nitrogen6x}/nitrogen6s1g_defconfig     |  0
>  .../boundary/nitrogen6x}/nitrogen6s_defconfig       |  0
>  .../boundary/nitrogen6x}/nitrogen6x.h               |  2 +-
>  16 files changed, 14 insertions(+), 17 deletions(-)
>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6dl-nitrogen6x.dts (100%)
>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6q-nitrogen6x.dts (100%)
>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6q-sabrelite.dts (100%)
>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6qdl-nitrogen6x.dtsi (100%)
>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6qdl-sabrelite.dtsi (100%)
>  rename {configs => board/boundary/nitrogen6x}/mx6qsabrelite_defconfig (100%)
>  rename {configs => board/boundary/nitrogen6x}/nitrogen6dl2g_defconfig (100%)
>  rename {configs => board/boundary/nitrogen6x}/nitrogen6dl_defconfig (100%)
>  rename {configs => board/boundary/nitrogen6x}/nitrogen6q2g_defconfig (100%)
>  rename {configs => board/boundary/nitrogen6x}/nitrogen6q_defconfig (100%)
>  rename {configs => board/boundary/nitrogen6x}/nitrogen6s1g_defconfig (100%)
>  rename {configs => board/boundary/nitrogen6x}/nitrogen6s_defconfig (100%)
>  rename {include/configs => board/boundary/nitrogen6x}/nitrogen6x.h (98%)

As mentioned I really don't like the piecemeal building of .dts files
that results from this change.

Regards,
Simon

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 0/5] Move board specific files to board directory
  2021-12-28  8:33 ` [PATCH v1 0/5] Move board specific files to board directory Simon Glass
@ 2021-12-28 13:11   ` Tom Rini
  2022-01-06 21:14     ` Troy Kisky
  0 siblings, 1 reply; 26+ messages in thread
From: Tom Rini @ 2021-12-28 13:11 UTC (permalink / raw)
  To: Simon Glass; +Cc: Troy Kisky, Fabio Estevam, U-Boot Mailing List

[-- Attachment #1: Type: text/plain, Size: 3795 bytes --]

On Tue, Dec 28, 2021 at 01:33:05AM -0700, Simon Glass wrote:
> Hi Troy,
> 
> On Fri, 17 Dec 2021 at 16:02, Troy Kisky <troy.kisky@boundarydevices.com> wrote:
> >
> > This series intends to let board specific files live in the boards
> > directory. The last patch moves files for nitrogen6x.
> > I have tested it with buildman
> >
> > ./tools/buildman/buildman boundary -b denx_master
> >
> > But it is likely the more scripts then just tools/genboardscfg.py would
> > need to be updated.
> >
> > Troy Kisky (5):
> >   kconfig: allow defconfigs to live in board directory
> >   dts: allow dts files in board directory
> >   scripts: Makefile.autoconf: allow CONFIG_SYS_CONFIG_NAME file to live
> >     in board directory
> >   genboardcfg: allow defconfigs in board directory
> >   nitrogen6x: move board specific files to nitrogen6x directory
> >
> >  arch/arm/dts/Makefile                         |  3 --
> >  board/boundary/nitrogen6x/MAINTAINERS         | 13 -------
> >  board/boundary/nitrogen6x/Makefile            | 13 +++++++
> >  .../nitrogen6x}/imx6dl-nitrogen6x.dts         |  0
> >  .../boundary/nitrogen6x}/imx6q-nitrogen6x.dts |  0
> >  .../boundary/nitrogen6x}/imx6q-sabrelite.dts  |  0
> >  .../nitrogen6x}/imx6qdl-nitrogen6x.dtsi       |  0
> >  .../nitrogen6x}/imx6qdl-sabrelite.dtsi        |  0
> >  .../nitrogen6x}/mx6qsabrelite_defconfig       |  0
> >  .../nitrogen6x}/nitrogen6dl2g_defconfig       |  0
> >  .../nitrogen6x}/nitrogen6dl_defconfig         |  0
> >  .../nitrogen6x}/nitrogen6q2g_defconfig        |  0
> >  .../boundary/nitrogen6x}/nitrogen6q_defconfig |  0
> >  .../nitrogen6x}/nitrogen6s1g_defconfig        |  0
> >  .../boundary/nitrogen6x}/nitrogen6s_defconfig |  0
> >  .../boundary/nitrogen6x}/nitrogen6x.h         |  2 +-
> >  dts/Makefile                                  | 11 +++++-
> >  scripts/Makefile.autoconf                     |  9 ++++-
> >  scripts/Makefile.lib                          |  1 +
> >  scripts/kconfig/Makefile                      |  9 ++++-
> >  tools/genboardscfg.py                         | 37 ++++++++++++++++++-
> >  21 files changed, 75 insertions(+), 23 deletions(-)
> >  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6dl-nitrogen6x.dts (100%)
> >  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6q-nitrogen6x.dts (100%)
> >  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6q-sabrelite.dts (100%)
> >  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6qdl-nitrogen6x.dtsi (100%)
> >  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6qdl-sabrelite.dtsi (100%)
> >  rename {configs => board/boundary/nitrogen6x}/mx6qsabrelite_defconfig (100%)
> >  rename {configs => board/boundary/nitrogen6x}/nitrogen6dl2g_defconfig (100%)
> >  rename {configs => board/boundary/nitrogen6x}/nitrogen6dl_defconfig (100%)
> >  rename {configs => board/boundary/nitrogen6x}/nitrogen6q2g_defconfig (100%)
> >  rename {configs => board/boundary/nitrogen6x}/nitrogen6q_defconfig (100%)
> >  rename {configs => board/boundary/nitrogen6x}/nitrogen6s1g_defconfig (100%)
> >  rename {configs => board/boundary/nitrogen6x}/nitrogen6s_defconfig (100%)
> >  rename {include/configs => board/boundary/nitrogen6x}/nitrogen6x.h (98%) I'm not about the goal.
> 
> Can you please add a few notes about the motivation for this change?

Sorry for the delayed reply here.  I'm also not entirely sure this is a
good idea.  Moving the defconfig files?  Maybe.  It does make checking
all configs a bit more tricky, but indeed the configs directory is
unwieldy.  Moving the dts files?  Those should be a direct cp from the
kernel, so that makes things less clear to me.  Especially since it will
need other common files that will still be elsewhere.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 1/5] kconfig: allow defconfigs to live in board directory
  2021-12-28  8:33   ` Simon Glass
@ 2022-01-06 21:00     ` Troy Kisky
  0 siblings, 0 replies; 26+ messages in thread
From: Troy Kisky @ 2022-01-06 21:00 UTC (permalink / raw)
  To: Simon Glass; +Cc: Tom Rini, U-Boot Mailing List

On 12/28/2021 12:33 AM, Simon Glass wrote:
> Hi Troy,
> 
> On Fri, 17 Dec 2021 at 16:02, Troy Kisky <troy.kisky@boundarydevices.com> wrote:
>>
>> This will reduce the size of the configs directory, and
>> make it more clear which board directory uses the defconfig
>> file.
>>
>> Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
>> ---
>>  scripts/kconfig/Makefile | 9 ++++++++-
>>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> Reviewed-by: Simon Glass <sjg@chromium.org>
> 
>>
>> diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
>> index 12e525ee31f..307262e00de 100644
>> --- a/scripts/kconfig/Makefile
>> +++ b/scripts/kconfig/Makefile
>> @@ -92,8 +92,15 @@ else
>>  endif
>>  endif
>>
>> +%_defconfig: SHELL:=/bin/bash
>>  %_defconfig: $(obj)/conf
>> -       $(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig)
>> +       $(Q)readarray -d '' names < <(find $(srctree)/configs $(srctree)/board -type f -name $@ -print0); \
>> +       if (test $${#names[*]} -eq 1); then \
>> +               $< $(silent) --defconfig="$${names[0]}" $(Kconfig); \
>> +       else \
>> +               echo "$@" not found or ambiguous error; \
>> +               echo "$${names[@]}"; exit 1; \
>> +       fi
>>
>>  # Added for U-Boot (backward compatibility)
>>  %_config: %_defconfig
>> --
>> 2.32.0
>>
> 
> How could this ever match more than one file?
> 
> Regards,
> Simon

If two different vendors decide to use the same defconfig file name, this will hit when the 2nd one
tries to merge it upstream.

BR
Troy

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 2/5] dts: allow dts files in board directory
  2021-12-28  8:33   ` Simon Glass
@ 2022-01-06 21:01     ` Troy Kisky
  0 siblings, 0 replies; 26+ messages in thread
From: Troy Kisky @ 2022-01-06 21:01 UTC (permalink / raw)
  To: Simon Glass; +Cc: Tom Rini, Fabio Estevam, U-Boot Mailing List

On 12/28/2021 12:33 AM, Simon Glass wrote:
> Hi Troy,
> 
> On Fri, 17 Dec 2021 at 16:02, Troy Kisky <troy.kisky@boundarydevices.com> wrote:
>>
>> Let the board specific dts files live in the board directory.
>>
>> Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
>> ---
>>  dts/Makefile         | 11 +++++++++--
>>  scripts/Makefile.lib |  1 +
>>  2 files changed, 10 insertions(+), 2 deletions(-)
> 
> I think .dts files should be built at the SoC level, at the finest.
> Otherwise we might change a .dtsi and break something without
> knowing...and it is very hard to know what other builds to do. This
> seems to be heading towards target-specific building.
> 
> Regards,
> Simon

I can try to address that in the next rev, if that is the only thing stopping it.

Thanks for the review.

Troy


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 3/5] scripts: Makefile.autoconf: allow CONFIG_SYS_CONFIG_NAME file to live in board directory
  2021-12-28  8:33   ` Simon Glass
@ 2022-01-06 21:09     ` Troy Kisky
  2022-01-30 23:14       ` Simon Glass
  0 siblings, 1 reply; 26+ messages in thread
From: Troy Kisky @ 2022-01-06 21:09 UTC (permalink / raw)
  To: Simon Glass; +Cc: Tom Rini, Fabio Estevam, U-Boot Mailing List

On 12/28/2021 12:33 AM, Simon Glass wrote:
> Hi Troy,
> 
> On Fri, 17 Dec 2021 at 16:02, Troy Kisky <troy.kisky@boundarydevices.com> wrote:
>>
>> Let the board specific include file live in the board directory.
>>
>> Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
>> ---
>>  scripts/Makefile.autoconf | 9 +++++++--
>>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> We are actually working on deleting these. What is the benefit of
> putting it here?
> 


Do you have an estimate on how long until the 1st one can be deleted?

The main benefit that I see is making it easier to clone or compare boards.
You just duplicate/diff everything in the board directory and rename files to taste.

My goal for this series is NOT to force everyone to update their board, but rather to allow new
boards to have all their board specific files in one directory.

BR
Troy

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 0/5] Move board specific files to board directory
  2021-12-28 13:11   ` Tom Rini
@ 2022-01-06 21:14     ` Troy Kisky
  2022-01-07 15:12       ` Tom Rini
  0 siblings, 1 reply; 26+ messages in thread
From: Troy Kisky @ 2022-01-06 21:14 UTC (permalink / raw)
  To: Tom Rini, Simon Glass; +Cc: U-Boot Mailing List

On 12/28/2021 5:11 AM, Tom Rini wrote:
> On Tue, Dec 28, 2021 at 01:33:05AM -0700, Simon Glass wrote:
>> Hi Troy,
>>
>> On Fri, 17 Dec 2021 at 16:02, Troy Kisky <troy.kisky@boundarydevices.com> wrote:
>>>
>>> This series intends to let board specific files live in the boards
>>> directory. The last patch moves files for nitrogen6x.
>>> I have tested it with buildman
>>>
>>> ./tools/buildman/buildman boundary -b denx_master
>>>
>>> But it is likely the more scripts then just tools/genboardscfg.py would
>>> need to be updated.
>>>
>>> Troy Kisky (5):
>>>   kconfig: allow defconfigs to live in board directory
>>>   dts: allow dts files in board directory
>>>   scripts: Makefile.autoconf: allow CONFIG_SYS_CONFIG_NAME file to live
>>>     in board directory
>>>   genboardcfg: allow defconfigs in board directory
>>>   nitrogen6x: move board specific files to nitrogen6x directory
>>>
>>>  arch/arm/dts/Makefile                         |  3 --
>>>  board/boundary/nitrogen6x/MAINTAINERS         | 13 -------
>>>  board/boundary/nitrogen6x/Makefile            | 13 +++++++
>>>  .../nitrogen6x}/imx6dl-nitrogen6x.dts         |  0
>>>  .../boundary/nitrogen6x}/imx6q-nitrogen6x.dts |  0
>>>  .../boundary/nitrogen6x}/imx6q-sabrelite.dts  |  0
>>>  .../nitrogen6x}/imx6qdl-nitrogen6x.dtsi       |  0
>>>  .../nitrogen6x}/imx6qdl-sabrelite.dtsi        |  0
>>>  .../nitrogen6x}/mx6qsabrelite_defconfig       |  0
>>>  .../nitrogen6x}/nitrogen6dl2g_defconfig       |  0
>>>  .../nitrogen6x}/nitrogen6dl_defconfig         |  0
>>>  .../nitrogen6x}/nitrogen6q2g_defconfig        |  0
>>>  .../boundary/nitrogen6x}/nitrogen6q_defconfig |  0
>>>  .../nitrogen6x}/nitrogen6s1g_defconfig        |  0
>>>  .../boundary/nitrogen6x}/nitrogen6s_defconfig |  0
>>>  .../boundary/nitrogen6x}/nitrogen6x.h         |  2 +-
>>>  dts/Makefile                                  | 11 +++++-
>>>  scripts/Makefile.autoconf                     |  9 ++++-
>>>  scripts/Makefile.lib                          |  1 +
>>>  scripts/kconfig/Makefile                      |  9 ++++-
>>>  tools/genboardscfg.py                         | 37 ++++++++++++++++++-
>>>  21 files changed, 75 insertions(+), 23 deletions(-)
>>>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6dl-nitrogen6x.dts (100%)
>>>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6q-nitrogen6x.dts (100%)
>>>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6q-sabrelite.dts (100%)
>>>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6qdl-nitrogen6x.dtsi (100%)
>>>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6qdl-sabrelite.dtsi (100%)
>>>  rename {configs => board/boundary/nitrogen6x}/mx6qsabrelite_defconfig (100%)
>>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6dl2g_defconfig (100%)
>>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6dl_defconfig (100%)
>>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6q2g_defconfig (100%)
>>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6q_defconfig (100%)
>>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6s1g_defconfig (100%)
>>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6s_defconfig (100%)
>>>  rename {include/configs => board/boundary/nitrogen6x}/nitrogen6x.h (98%) I'm not about the goal.
>>
>> Can you please add a few notes about the motivation for this change?
> 
> Sorry for the delayed reply here.  I'm also not entirely sure this is a
> good idea.  Moving the defconfig files?  Maybe.  It does make checking
> all configs a bit more tricky, but indeed the configs directory is
> unwieldy.  Moving the dts files?  Those should be a direct cp from the
> kernel, so that makes things less clear to me.  Especially since it will
> need other common files that will still be elsewhere.
> 

They will still be a direct copy. Notice the 100% rename. Common files still living in the dts
directory is less clear. I can try to address the "piecemeal building of .dts files" if this
still has a chance of being accepted.

Thanks
Troy


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 0/5] Move board specific files to board directory
  2022-01-06 21:14     ` Troy Kisky
@ 2022-01-07 15:12       ` Tom Rini
  2022-01-07 18:33         ` Troy Kisky
  0 siblings, 1 reply; 26+ messages in thread
From: Tom Rini @ 2022-01-07 15:12 UTC (permalink / raw)
  To: Troy Kisky; +Cc: Simon Glass, U-Boot Mailing List

[-- Attachment #1: Type: text/plain, Size: 5105 bytes --]

On Thu, Jan 06, 2022 at 01:14:40PM -0800, Troy Kisky wrote:
> On 12/28/2021 5:11 AM, Tom Rini wrote:
> > On Tue, Dec 28, 2021 at 01:33:05AM -0700, Simon Glass wrote:
> >> Hi Troy,
> >>
> >> On Fri, 17 Dec 2021 at 16:02, Troy Kisky <troy.kisky@boundarydevices.com> wrote:
> >>>
> >>> This series intends to let board specific files live in the boards
> >>> directory. The last patch moves files for nitrogen6x.
> >>> I have tested it with buildman
> >>>
> >>> ./tools/buildman/buildman boundary -b denx_master
> >>>
> >>> But it is likely the more scripts then just tools/genboardscfg.py would
> >>> need to be updated.
> >>>
> >>> Troy Kisky (5):
> >>>   kconfig: allow defconfigs to live in board directory
> >>>   dts: allow dts files in board directory
> >>>   scripts: Makefile.autoconf: allow CONFIG_SYS_CONFIG_NAME file to live
> >>>     in board directory
> >>>   genboardcfg: allow defconfigs in board directory
> >>>   nitrogen6x: move board specific files to nitrogen6x directory
> >>>
> >>>  arch/arm/dts/Makefile                         |  3 --
> >>>  board/boundary/nitrogen6x/MAINTAINERS         | 13 -------
> >>>  board/boundary/nitrogen6x/Makefile            | 13 +++++++
> >>>  .../nitrogen6x}/imx6dl-nitrogen6x.dts         |  0
> >>>  .../boundary/nitrogen6x}/imx6q-nitrogen6x.dts |  0
> >>>  .../boundary/nitrogen6x}/imx6q-sabrelite.dts  |  0
> >>>  .../nitrogen6x}/imx6qdl-nitrogen6x.dtsi       |  0
> >>>  .../nitrogen6x}/imx6qdl-sabrelite.dtsi        |  0
> >>>  .../nitrogen6x}/mx6qsabrelite_defconfig       |  0
> >>>  .../nitrogen6x}/nitrogen6dl2g_defconfig       |  0
> >>>  .../nitrogen6x}/nitrogen6dl_defconfig         |  0
> >>>  .../nitrogen6x}/nitrogen6q2g_defconfig        |  0
> >>>  .../boundary/nitrogen6x}/nitrogen6q_defconfig |  0
> >>>  .../nitrogen6x}/nitrogen6s1g_defconfig        |  0
> >>>  .../boundary/nitrogen6x}/nitrogen6s_defconfig |  0
> >>>  .../boundary/nitrogen6x}/nitrogen6x.h         |  2 +-
> >>>  dts/Makefile                                  | 11 +++++-
> >>>  scripts/Makefile.autoconf                     |  9 ++++-
> >>>  scripts/Makefile.lib                          |  1 +
> >>>  scripts/kconfig/Makefile                      |  9 ++++-
> >>>  tools/genboardscfg.py                         | 37 ++++++++++++++++++-
> >>>  21 files changed, 75 insertions(+), 23 deletions(-)
> >>>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6dl-nitrogen6x.dts (100%)
> >>>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6q-nitrogen6x.dts (100%)
> >>>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6q-sabrelite.dts (100%)
> >>>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6qdl-nitrogen6x.dtsi (100%)
> >>>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6qdl-sabrelite.dtsi (100%)
> >>>  rename {configs => board/boundary/nitrogen6x}/mx6qsabrelite_defconfig (100%)
> >>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6dl2g_defconfig (100%)
> >>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6dl_defconfig (100%)
> >>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6q2g_defconfig (100%)
> >>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6q_defconfig (100%)
> >>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6s1g_defconfig (100%)
> >>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6s_defconfig (100%)
> >>>  rename {include/configs => board/boundary/nitrogen6x}/nitrogen6x.h (98%) I'm not about the goal.
> >>
> >> Can you please add a few notes about the motivation for this change?
> > 
> > Sorry for the delayed reply here.  I'm also not entirely sure this is a
> > good idea.  Moving the defconfig files?  Maybe.  It does make checking
> > all configs a bit more tricky, but indeed the configs directory is
> > unwieldy.  Moving the dts files?  Those should be a direct cp from the
> > kernel, so that makes things less clear to me.  Especially since it will
> > need other common files that will still be elsewhere.
> > 
> 
> They will still be a direct copy. Notice the 100% rename. Common files still living in the dts
> directory is less clear. I can try to address the "piecemeal building of .dts files" if this
> still has a chance of being accepted.

So, here's my worry.  Today, in an ideal world that we're not yet at, I
could do:
1. cd ~/src/linux; git checkout v5.16
2. cd ~/src/u-boot; for DTS in arch/arm/dts/*.dts*; do \
	[ -f ~/src/linux/$DTS ] && cp ~/src/linux/$DTS $DTS; done

And now we're resynced with v5.16.  That gets a lot more complex with
board/*/*/*.dts* too.  And since those files should be direct imports
I'm not sure how them residing in board/ helps.

But!  I can see how having board-u-boot.dtsi exist under board/ might
help.  Or at least, having those files reside somewhere that's NOT where
the unmodified imported dts files also live.  Long term I think we need
to move towards making it easier to import the dts files, and clearer
that they should be "read only" other than when being resynced, than it
is today.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 0/5] Move board specific files to board directory
  2022-01-07 15:12       ` Tom Rini
@ 2022-01-07 18:33         ` Troy Kisky
  2022-01-30 23:14           ` Simon Glass
  2022-02-08 14:30           ` Tom Rini
  0 siblings, 2 replies; 26+ messages in thread
From: Troy Kisky @ 2022-01-07 18:33 UTC (permalink / raw)
  To: Tom Rini; +Cc: Simon Glass, U-Boot Mailing List

On 1/7/2022 7:12 AM, Tom Rini wrote:
> On Thu, Jan 06, 2022 at 01:14:40PM -0800, Troy Kisky wrote:
>> On 12/28/2021 5:11 AM, Tom Rini wrote:
>>> On Tue, Dec 28, 2021 at 01:33:05AM -0700, Simon Glass wrote:
>>>> Hi Troy,
>>>>
>>>> On Fri, 17 Dec 2021 at 16:02, Troy Kisky <troy.kisky@boundarydevices.com> wrote:
>>>>>
>>>>> This series intends to let board specific files live in the boards
>>>>> directory. The last patch moves files for nitrogen6x.
>>>>> I have tested it with buildman
>>>>>
>>>>> ./tools/buildman/buildman boundary -b denx_master
>>>>>
>>>>> But it is likely the more scripts then just tools/genboardscfg.py would
>>>>> need to be updated.
>>>>>
>>>>> Troy Kisky (5):
>>>>>   kconfig: allow defconfigs to live in board directory
>>>>>   dts: allow dts files in board directory
>>>>>   scripts: Makefile.autoconf: allow CONFIG_SYS_CONFIG_NAME file to live
>>>>>     in board directory
>>>>>   genboardcfg: allow defconfigs in board directory
>>>>>   nitrogen6x: move board specific files to nitrogen6x directory
>>>>>
>>>>>  arch/arm/dts/Makefile                         |  3 --
>>>>>  board/boundary/nitrogen6x/MAINTAINERS         | 13 -------
>>>>>  board/boundary/nitrogen6x/Makefile            | 13 +++++++
>>>>>  .../nitrogen6x}/imx6dl-nitrogen6x.dts         |  0
>>>>>  .../boundary/nitrogen6x}/imx6q-nitrogen6x.dts |  0
>>>>>  .../boundary/nitrogen6x}/imx6q-sabrelite.dts  |  0
>>>>>  .../nitrogen6x}/imx6qdl-nitrogen6x.dtsi       |  0
>>>>>  .../nitrogen6x}/imx6qdl-sabrelite.dtsi        |  0
>>>>>  .../nitrogen6x}/mx6qsabrelite_defconfig       |  0
>>>>>  .../nitrogen6x}/nitrogen6dl2g_defconfig       |  0
>>>>>  .../nitrogen6x}/nitrogen6dl_defconfig         |  0
>>>>>  .../nitrogen6x}/nitrogen6q2g_defconfig        |  0
>>>>>  .../boundary/nitrogen6x}/nitrogen6q_defconfig |  0
>>>>>  .../nitrogen6x}/nitrogen6s1g_defconfig        |  0
>>>>>  .../boundary/nitrogen6x}/nitrogen6s_defconfig |  0
>>>>>  .../boundary/nitrogen6x}/nitrogen6x.h         |  2 +-
>>>>>  dts/Makefile                                  | 11 +++++-
>>>>>  scripts/Makefile.autoconf                     |  9 ++++-
>>>>>  scripts/Makefile.lib                          |  1 +
>>>>>  scripts/kconfig/Makefile                      |  9 ++++-
>>>>>  tools/genboardscfg.py                         | 37 ++++++++++++++++++-
>>>>>  21 files changed, 75 insertions(+), 23 deletions(-)
>>>>>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6dl-nitrogen6x.dts (100%)
>>>>>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6q-nitrogen6x.dts (100%)
>>>>>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6q-sabrelite.dts (100%)
>>>>>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6qdl-nitrogen6x.dtsi (100%)
>>>>>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6qdl-sabrelite.dtsi (100%)
>>>>>  rename {configs => board/boundary/nitrogen6x}/mx6qsabrelite_defconfig (100%)
>>>>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6dl2g_defconfig (100%)
>>>>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6dl_defconfig (100%)
>>>>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6q2g_defconfig (100%)
>>>>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6q_defconfig (100%)
>>>>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6s1g_defconfig (100%)
>>>>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6s_defconfig (100%)
>>>>>  rename {include/configs => board/boundary/nitrogen6x}/nitrogen6x.h (98%) I'm not about the goal.
>>>>
>>>> Can you please add a few notes about the motivation for this change?
>>>
>>> Sorry for the delayed reply here.  I'm also not entirely sure this is a
>>> good idea.  Moving the defconfig files?  Maybe.  It does make checking
>>> all configs a bit more tricky, but indeed the configs directory is
>>> unwieldy.  Moving the dts files?  Those should be a direct cp from the
>>> kernel, so that makes things less clear to me.  Especially since it will
>>> need other common files that will still be elsewhere.
>>>
>>
>> They will still be a direct copy. Notice the 100% rename. Common files still living in the dts
>> directory is less clear. I can try to address the "piecemeal building of .dts files" if this
>> still has a chance of being accepted.
> 
> So, here's my worry.  Today, in an ideal world that we're not yet at, I
> could do:
> 1. cd ~/src/linux; git checkout v5.16
> 2. cd ~/src/u-boot; for DTS in arch/arm/dts/*.dts*; do \
> 	[ -f ~/src/linux/$DTS ] && cp ~/src/linux/$DTS $DTS; done
> 

Still, a script could easily check that a dts file exists before overwriting it
and find the correct directory to put it in. A little more complicated, but not a lot.


> And now we're resynced with v5.16.  That gets a lot more complex with
> board/*/*/*.dts* too.  And since those files should be direct imports
> I'm not sure how them residing in board/ helps.

One thing that maybe be worth remembering, at one time, Linus was suggesting that dtb's would NOT be
a permanent part of Linux. That has probably changed, but maybe eventually, that master repo will be
vendor specific.


> 
> But!  I can see how having board-u-boot.dtsi exist under board/ might
> help.  Or at least, having those files reside somewhere that's NOT where
> the unmodified imported dts files also live.  Long term I think we need
> to move towards making it easier to import the dts files, and clearer
> that they should be "read only" other than when being resynced, than it
> is today.
> 

If you guys are OK with any of the patches, let me know, and I'll submit a restricted series.

Thanks
Troy

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 0/5] Move board specific files to board directory
  2022-01-07 18:33         ` Troy Kisky
@ 2022-01-30 23:14           ` Simon Glass
  2022-02-08 14:30           ` Tom Rini
  1 sibling, 0 replies; 26+ messages in thread
From: Simon Glass @ 2022-01-30 23:14 UTC (permalink / raw)
  To: Troy Kisky; +Cc: Tom Rini, U-Boot Mailing List

Hi Troy,

On Fri, 7 Jan 2022 at 11:33, Troy Kisky <troy.kisky@boundarydevices.com> wrote:
>
> On 1/7/2022 7:12 AM, Tom Rini wrote:
> > On Thu, Jan 06, 2022 at 01:14:40PM -0800, Troy Kisky wrote:
> >> On 12/28/2021 5:11 AM, Tom Rini wrote:
> >>> On Tue, Dec 28, 2021 at 01:33:05AM -0700, Simon Glass wrote:
> >>>> Hi Troy,
> >>>>
> >>>> On Fri, 17 Dec 2021 at 16:02, Troy Kisky <troy.kisky@boundarydevices.com> wrote:
> >>>>>
> >>>>> This series intends to let board specific files live in the boards
> >>>>> directory. The last patch moves files for nitrogen6x.
> >>>>> I have tested it with buildman
> >>>>>
> >>>>> ./tools/buildman/buildman boundary -b denx_master
> >>>>>
> >>>>> But it is likely the more scripts then just tools/genboardscfg.py would
> >>>>> need to be updated.
> >>>>>
> >>>>> Troy Kisky (5):
> >>>>>   kconfig: allow defconfigs to live in board directory
> >>>>>   dts: allow dts files in board directory
> >>>>>   scripts: Makefile.autoconf: allow CONFIG_SYS_CONFIG_NAME file to live
> >>>>>     in board directory
> >>>>>   genboardcfg: allow defconfigs in board directory
> >>>>>   nitrogen6x: move board specific files to nitrogen6x directory
> >>>>>
> >>>>>  arch/arm/dts/Makefile                         |  3 --
> >>>>>  board/boundary/nitrogen6x/MAINTAINERS         | 13 -------
> >>>>>  board/boundary/nitrogen6x/Makefile            | 13 +++++++
> >>>>>  .../nitrogen6x}/imx6dl-nitrogen6x.dts         |  0
> >>>>>  .../boundary/nitrogen6x}/imx6q-nitrogen6x.dts |  0
> >>>>>  .../boundary/nitrogen6x}/imx6q-sabrelite.dts  |  0
> >>>>>  .../nitrogen6x}/imx6qdl-nitrogen6x.dtsi       |  0
> >>>>>  .../nitrogen6x}/imx6qdl-sabrelite.dtsi        |  0
> >>>>>  .../nitrogen6x}/mx6qsabrelite_defconfig       |  0
> >>>>>  .../nitrogen6x}/nitrogen6dl2g_defconfig       |  0
> >>>>>  .../nitrogen6x}/nitrogen6dl_defconfig         |  0
> >>>>>  .../nitrogen6x}/nitrogen6q2g_defconfig        |  0
> >>>>>  .../boundary/nitrogen6x}/nitrogen6q_defconfig |  0
> >>>>>  .../nitrogen6x}/nitrogen6s1g_defconfig        |  0
> >>>>>  .../boundary/nitrogen6x}/nitrogen6s_defconfig |  0
> >>>>>  .../boundary/nitrogen6x}/nitrogen6x.h         |  2 +-
> >>>>>  dts/Makefile                                  | 11 +++++-
> >>>>>  scripts/Makefile.autoconf                     |  9 ++++-
> >>>>>  scripts/Makefile.lib                          |  1 +
> >>>>>  scripts/kconfig/Makefile                      |  9 ++++-
> >>>>>  tools/genboardscfg.py                         | 37 ++++++++++++++++++-
> >>>>>  21 files changed, 75 insertions(+), 23 deletions(-)
> >>>>>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6dl-nitrogen6x.dts (100%)
> >>>>>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6q-nitrogen6x.dts (100%)
> >>>>>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6q-sabrelite.dts (100%)
> >>>>>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6qdl-nitrogen6x.dtsi (100%)
> >>>>>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6qdl-sabrelite.dtsi (100%)
> >>>>>  rename {configs => board/boundary/nitrogen6x}/mx6qsabrelite_defconfig (100%)
> >>>>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6dl2g_defconfig (100%)
> >>>>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6dl_defconfig (100%)
> >>>>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6q2g_defconfig (100%)
> >>>>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6q_defconfig (100%)
> >>>>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6s1g_defconfig (100%)
> >>>>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6s_defconfig (100%)
> >>>>>  rename {include/configs => board/boundary/nitrogen6x}/nitrogen6x.h (98%) I'm not about the goal.
> >>>>
> >>>> Can you please add a few notes about the motivation for this change?
> >>>
> >>> Sorry for the delayed reply here.  I'm also not entirely sure this is a
> >>> good idea.  Moving the defconfig files?  Maybe.  It does make checking
> >>> all configs a bit more tricky, but indeed the configs directory is
> >>> unwieldy.  Moving the dts files?  Those should be a direct cp from the
> >>> kernel, so that makes things less clear to me.  Especially since it will
> >>> need other common files that will still be elsewhere.
> >>>
> >>
> >> They will still be a direct copy. Notice the 100% rename. Common files still living in the dts
> >> directory is less clear. I can try to address the "piecemeal building of .dts files" if this
> >> still has a chance of being accepted.
> >
> > So, here's my worry.  Today, in an ideal world that we're not yet at, I
> > could do:
> > 1. cd ~/src/linux; git checkout v5.16
> > 2. cd ~/src/u-boot; for DTS in arch/arm/dts/*.dts*; do \
> >       [ -f ~/src/linux/$DTS ] && cp ~/src/linux/$DTS $DTS; done
> >
>
> Still, a script could easily check that a dts file exists before overwriting it
> and find the correct directory to put it in. A little more complicated, but not a lot.
>
>
> > And now we're resynced with v5.16.  That gets a lot more complex with
> > board/*/*/*.dts* too.  And since those files should be direct imports
> > I'm not sure how them residing in board/ helps.
>
> One thing that maybe be worth remembering, at one time, Linus was suggesting that dtb's would NOT be
> a permanent part of Linux. That has probably changed, but maybe eventually, that master repo will be
> vendor specific.
>
>
> >
> > But!  I can see how having board-u-boot.dtsi exist under board/ might
> > help.  Or at least, having those files reside somewhere that's NOT where
> > the unmodified imported dts files also live.  Long term I think we need
> > to move towards making it easier to import the dts files, and clearer
> > that they should be "read only" other than when being resynced, than it
> > is today.
> >
>
> If you guys are OK with any of the patches, let me know, and I'll submit a restricted series.

From my side, on the defconfig side, I think it would be OK to allow
those in board directories. I'm not quite sure how much it helps, but
I don't think it would hurt anything, since it is almost as easy to
find *_defconfig as it is to look in the configs/ dir.

I think it would need changes to moveconfig though. Not sure about
anything else.

Regards,
Simon

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 3/5] scripts: Makefile.autoconf: allow CONFIG_SYS_CONFIG_NAME file to live in board directory
  2022-01-06 21:09     ` Troy Kisky
@ 2022-01-30 23:14       ` Simon Glass
  0 siblings, 0 replies; 26+ messages in thread
From: Simon Glass @ 2022-01-30 23:14 UTC (permalink / raw)
  To: Troy Kisky; +Cc: Tom Rini, Fabio Estevam, U-Boot Mailing List

Hi Troy,

On Thu, 6 Jan 2022 at 14:09, Troy Kisky <troy.kisky@boundarydevices.com> wrote:
>
> On 12/28/2021 12:33 AM, Simon Glass wrote:
> > Hi Troy,
> >
> > On Fri, 17 Dec 2021 at 16:02, Troy Kisky <troy.kisky@boundarydevices.com> wrote:
> >>
> >> Let the board specific include file live in the board directory.
> >>
> >> Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
> >> ---
> >>  scripts/Makefile.autoconf | 9 +++++++--
> >>  1 file changed, 7 insertions(+), 2 deletions(-)
> >
> > We are actually working on deleting these. What is the benefit of
> > putting it here?
> >
>
>
> Do you have an estimate on how long until the 1st one can be deleted?

If you look at sandbox.h it is fairly close, but still perhaps a
release or two away.

I'm not all that keen on adding the board directory as an include
directory, although I suppose it is OK. We need a way to know which
files are config.h headers so things like moveconfig can update them
easily and we can implement things like this:

https://patchwork.ozlabs.org/project/uboot/patch/20210918182122.1854781-1-sjg@chromium.org/

>
> The main benefit that I see is making it easier to clone or compare boards.
> You just duplicate/diff everything in the board directory and rename files to taste.

Yes I see that. Was that mentioned in the cover letter? I might have
missed it sorry.

>
> My goal for this series is NOT to force everyone to update their board, but rather to allow new
> boards to have all their board specific files in one directory.

OK.

Regards,
Simon

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 0/5] Move board specific files to board directory
  2022-01-07 18:33         ` Troy Kisky
  2022-01-30 23:14           ` Simon Glass
@ 2022-02-08 14:30           ` Tom Rini
  2022-03-15 19:08             ` Troy Kisky
  1 sibling, 1 reply; 26+ messages in thread
From: Tom Rini @ 2022-02-08 14:30 UTC (permalink / raw)
  To: Troy Kisky; +Cc: Simon Glass, U-Boot Mailing List

[-- Attachment #1: Type: text/plain, Size: 6245 bytes --]

On Fri, Jan 07, 2022 at 10:33:34AM -0800, Troy Kisky wrote:
> On 1/7/2022 7:12 AM, Tom Rini wrote:
> > On Thu, Jan 06, 2022 at 01:14:40PM -0800, Troy Kisky wrote:
> >> On 12/28/2021 5:11 AM, Tom Rini wrote:
> >>> On Tue, Dec 28, 2021 at 01:33:05AM -0700, Simon Glass wrote:
> >>>> Hi Troy,
> >>>>
> >>>> On Fri, 17 Dec 2021 at 16:02, Troy Kisky <troy.kisky@boundarydevices.com> wrote:
> >>>>>
> >>>>> This series intends to let board specific files live in the boards
> >>>>> directory. The last patch moves files for nitrogen6x.
> >>>>> I have tested it with buildman
> >>>>>
> >>>>> ./tools/buildman/buildman boundary -b denx_master
> >>>>>
> >>>>> But it is likely the more scripts then just tools/genboardscfg.py would
> >>>>> need to be updated.
> >>>>>
> >>>>> Troy Kisky (5):
> >>>>>   kconfig: allow defconfigs to live in board directory
> >>>>>   dts: allow dts files in board directory
> >>>>>   scripts: Makefile.autoconf: allow CONFIG_SYS_CONFIG_NAME file to live
> >>>>>     in board directory
> >>>>>   genboardcfg: allow defconfigs in board directory
> >>>>>   nitrogen6x: move board specific files to nitrogen6x directory
> >>>>>
> >>>>>  arch/arm/dts/Makefile                         |  3 --
> >>>>>  board/boundary/nitrogen6x/MAINTAINERS         | 13 -------
> >>>>>  board/boundary/nitrogen6x/Makefile            | 13 +++++++
> >>>>>  .../nitrogen6x}/imx6dl-nitrogen6x.dts         |  0
> >>>>>  .../boundary/nitrogen6x}/imx6q-nitrogen6x.dts |  0
> >>>>>  .../boundary/nitrogen6x}/imx6q-sabrelite.dts  |  0
> >>>>>  .../nitrogen6x}/imx6qdl-nitrogen6x.dtsi       |  0
> >>>>>  .../nitrogen6x}/imx6qdl-sabrelite.dtsi        |  0
> >>>>>  .../nitrogen6x}/mx6qsabrelite_defconfig       |  0
> >>>>>  .../nitrogen6x}/nitrogen6dl2g_defconfig       |  0
> >>>>>  .../nitrogen6x}/nitrogen6dl_defconfig         |  0
> >>>>>  .../nitrogen6x}/nitrogen6q2g_defconfig        |  0
> >>>>>  .../boundary/nitrogen6x}/nitrogen6q_defconfig |  0
> >>>>>  .../nitrogen6x}/nitrogen6s1g_defconfig        |  0
> >>>>>  .../boundary/nitrogen6x}/nitrogen6s_defconfig |  0
> >>>>>  .../boundary/nitrogen6x}/nitrogen6x.h         |  2 +-
> >>>>>  dts/Makefile                                  | 11 +++++-
> >>>>>  scripts/Makefile.autoconf                     |  9 ++++-
> >>>>>  scripts/Makefile.lib                          |  1 +
> >>>>>  scripts/kconfig/Makefile                      |  9 ++++-
> >>>>>  tools/genboardscfg.py                         | 37 ++++++++++++++++++-
> >>>>>  21 files changed, 75 insertions(+), 23 deletions(-)
> >>>>>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6dl-nitrogen6x.dts (100%)
> >>>>>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6q-nitrogen6x.dts (100%)
> >>>>>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6q-sabrelite.dts (100%)
> >>>>>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6qdl-nitrogen6x.dtsi (100%)
> >>>>>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6qdl-sabrelite.dtsi (100%)
> >>>>>  rename {configs => board/boundary/nitrogen6x}/mx6qsabrelite_defconfig (100%)
> >>>>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6dl2g_defconfig (100%)
> >>>>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6dl_defconfig (100%)
> >>>>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6q2g_defconfig (100%)
> >>>>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6q_defconfig (100%)
> >>>>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6s1g_defconfig (100%)
> >>>>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6s_defconfig (100%)
> >>>>>  rename {include/configs => board/boundary/nitrogen6x}/nitrogen6x.h (98%) I'm not about the goal.
> >>>>
> >>>> Can you please add a few notes about the motivation for this change?
> >>>
> >>> Sorry for the delayed reply here.  I'm also not entirely sure this is a
> >>> good idea.  Moving the defconfig files?  Maybe.  It does make checking
> >>> all configs a bit more tricky, but indeed the configs directory is
> >>> unwieldy.  Moving the dts files?  Those should be a direct cp from the
> >>> kernel, so that makes things less clear to me.  Especially since it will
> >>> need other common files that will still be elsewhere.
> >>>
> >>
> >> They will still be a direct copy. Notice the 100% rename. Common files still living in the dts
> >> directory is less clear. I can try to address the "piecemeal building of .dts files" if this
> >> still has a chance of being accepted.
> > 
> > So, here's my worry.  Today, in an ideal world that we're not yet at, I
> > could do:
> > 1. cd ~/src/linux; git checkout v5.16
> > 2. cd ~/src/u-boot; for DTS in arch/arm/dts/*.dts*; do \
> > 	[ -f ~/src/linux/$DTS ] && cp ~/src/linux/$DTS $DTS; done
> > 
> 
> Still, a script could easily check that a dts file exists before overwriting it
> and find the correct directory to put it in. A little more complicated, but not a lot.
> 
> 
> > And now we're resynced with v5.16.  That gets a lot more complex with
> > board/*/*/*.dts* too.  And since those files should be direct imports
> > I'm not sure how them residing in board/ helps.
> 
> One thing that maybe be worth remembering, at one time, Linus was suggesting that dtb's would NOT be
> a permanent part of Linux. That has probably changed, but maybe eventually, that master repo will be
> vendor specific.
> 
> 
> > 
> > But!  I can see how having board-u-boot.dtsi exist under board/ might
> > help.  Or at least, having those files reside somewhere that's NOT where
> > the unmodified imported dts files also live.  Long term I think we need
> > to move towards making it easier to import the dts files, and clearer
> > that they should be "read only" other than when being resynced, than it
> > is today.
> > 
> 
> If you guys are OK with any of the patches, let me know, and I'll submit a restricted series.

Again, sorry for the delay.  I just don't think right now these file
moves are the right path forward.  Maybe at some point further down the
road perhaps, once other cleanups are done and having
defconfig/u-boot.dtsi/etc in the board directory will be easier to
maintain long term.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 0/5] Move board specific files to board directory
  2022-02-08 14:30           ` Tom Rini
@ 2022-03-15 19:08             ` Troy Kisky
  2022-03-15 20:01               ` Tom Rini
  0 siblings, 1 reply; 26+ messages in thread
From: Troy Kisky @ 2022-03-15 19:08 UTC (permalink / raw)
  To: Tom Rini; +Cc: Simon Glass, U-Boot Mailing List

On 2/8/2022 6:30 AM, Tom Rini wrote:
> On Fri, Jan 07, 2022 at 10:33:34AM -0800, Troy Kisky wrote:
>> On 1/7/2022 7:12 AM, Tom Rini wrote:
>>> On Thu, Jan 06, 2022 at 01:14:40PM -0800, Troy Kisky wrote:
>>>> On 12/28/2021 5:11 AM, Tom Rini wrote:
>>>>> On Tue, Dec 28, 2021 at 01:33:05AM -0700, Simon Glass wrote:
>>>>>> Hi Troy,
>>>>>>
>>>>>> On Fri, 17 Dec 2021 at 16:02, Troy Kisky <troy.kisky@boundarydevices.com> wrote:
>>>>>>>
>>>>>>> This series intends to let board specific files live in the boards
>>>>>>> directory. The last patch moves files for nitrogen6x.
>>>>>>> I have tested it with buildman
>>>>>>>
>>>>>>> ./tools/buildman/buildman boundary -b denx_master
>>>>>>>
>>>>>>> But it is likely the more scripts then just tools/genboardscfg.py would
>>>>>>> need to be updated.
>>>>>>>
>>>>>>> Troy Kisky (5):
>>>>>>>   kconfig: allow defconfigs to live in board directory
>>>>>>>   dts: allow dts files in board directory
>>>>>>>   scripts: Makefile.autoconf: allow CONFIG_SYS_CONFIG_NAME file to live
>>>>>>>     in board directory
>>>>>>>   genboardcfg: allow defconfigs in board directory
>>>>>>>   nitrogen6x: move board specific files to nitrogen6x directory
>>>>>>>
>>>>>>>  arch/arm/dts/Makefile                         |  3 --
>>>>>>>  board/boundary/nitrogen6x/MAINTAINERS         | 13 -------
>>>>>>>  board/boundary/nitrogen6x/Makefile            | 13 +++++++
>>>>>>>  .../nitrogen6x}/imx6dl-nitrogen6x.dts         |  0
>>>>>>>  .../boundary/nitrogen6x}/imx6q-nitrogen6x.dts |  0
>>>>>>>  .../boundary/nitrogen6x}/imx6q-sabrelite.dts  |  0
>>>>>>>  .../nitrogen6x}/imx6qdl-nitrogen6x.dtsi       |  0
>>>>>>>  .../nitrogen6x}/imx6qdl-sabrelite.dtsi        |  0
>>>>>>>  .../nitrogen6x}/mx6qsabrelite_defconfig       |  0
>>>>>>>  .../nitrogen6x}/nitrogen6dl2g_defconfig       |  0
>>>>>>>  .../nitrogen6x}/nitrogen6dl_defconfig         |  0
>>>>>>>  .../nitrogen6x}/nitrogen6q2g_defconfig        |  0
>>>>>>>  .../boundary/nitrogen6x}/nitrogen6q_defconfig |  0
>>>>>>>  .../nitrogen6x}/nitrogen6s1g_defconfig        |  0
>>>>>>>  .../boundary/nitrogen6x}/nitrogen6s_defconfig |  0
>>>>>>>  .../boundary/nitrogen6x}/nitrogen6x.h         |  2 +-
>>>>>>>  dts/Makefile                                  | 11 +++++-
>>>>>>>  scripts/Makefile.autoconf                     |  9 ++++-
>>>>>>>  scripts/Makefile.lib                          |  1 +
>>>>>>>  scripts/kconfig/Makefile                      |  9 ++++-
>>>>>>>  tools/genboardscfg.py                         | 37 ++++++++++++++++++-
>>>>>>>  21 files changed, 75 insertions(+), 23 deletions(-)
>>>>>>>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6dl-nitrogen6x.dts (100%)
>>>>>>>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6q-nitrogen6x.dts (100%)
>>>>>>>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6q-sabrelite.dts (100%)
>>>>>>>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6qdl-nitrogen6x.dtsi (100%)
>>>>>>>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6qdl-sabrelite.dtsi (100%)
>>>>>>>  rename {configs => board/boundary/nitrogen6x}/mx6qsabrelite_defconfig (100%)
>>>>>>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6dl2g_defconfig (100%)
>>>>>>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6dl_defconfig (100%)
>>>>>>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6q2g_defconfig (100%)
>>>>>>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6q_defconfig (100%)
>>>>>>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6s1g_defconfig (100%)
>>>>>>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6s_defconfig (100%)
>>>>>>>  rename {include/configs => board/boundary/nitrogen6x}/nitrogen6x.h (98%) I'm not about the goal.
>>>>>>
>>>>>> Can you please add a few notes about the motivation for this change?
>>>>>
>>>>> Sorry for the delayed reply here.  I'm also not entirely sure this is a
>>>>> good idea.  Moving the defconfig files?  Maybe.  It does make checking
>>>>> all configs a bit more tricky, but indeed the configs directory is
>>>>> unwieldy.  Moving the dts files?  Those should be a direct cp from the
>>>>> kernel, so that makes things less clear to me.  Especially since it will
>>>>> need other common files that will still be elsewhere.
>>>>>
>>>>
>>>> They will still be a direct copy. Notice the 100% rename. Common files still living in the dts
>>>> directory is less clear. I can try to address the "piecemeal building of .dts files" if this
>>>> still has a chance of being accepted.
>>>
>>> So, here's my worry.  Today, in an ideal world that we're not yet at, I
>>> could do:
>>> 1. cd ~/src/linux; git checkout v5.16
>>> 2. cd ~/src/u-boot; for DTS in arch/arm/dts/*.dts*; do \
>>> 	[ -f ~/src/linux/$DTS ] && cp ~/src/linux/$DTS $DTS; done


Perhaps we can mimic Linux's arm/arm64 dts split and make the above work better?


>>>
>>
>> Still, a script could easily check that a dts file exists before overwriting it
>> and find the correct directory to put it in. A little more complicated, but not a lot.
>>
>>
>>> And now we're resynced with v5.16.  That gets a lot more complex with
>>> board/*/*/*.dts* too.  And since those files should be direct imports
>>> I'm not sure how them residing in board/ helps.
>>
>> One thing that maybe be worth remembering, at one time, Linus was suggesting that dtb's would NOT be
>> a permanent part of Linux. That has probably changed, but maybe eventually, that master repo will be
>> vendor specific.
>>
>>
>>>
>>> But!  I can see how having board-u-boot.dtsi exist under board/ might
>>> help.  Or at least, having those files reside somewhere that's NOT where
>>> the unmodified imported dts files also live.  Long term I think we need
>>> to move towards making it easier to import the dts files, and clearer
>>> that they should be "read only" other than when being resynced, than it
>>> is today.
>>>
>>
>> If you guys are OK with any of the patches, let me know, and I'll submit a restricted series.
> 
> Again, sorry for the delay.  I just don't think right now these file
> moves are the right path forward.  Maybe at some point further down the
> road perhaps, once other cleanups are done and having
> defconfig/u-boot.dtsi/etc in the board directory will be easier to
> maintain long term.
> 


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 0/5] Move board specific files to board directory
  2022-03-15 19:08             ` Troy Kisky
@ 2022-03-15 20:01               ` Tom Rini
  2022-03-15 20:23                 ` Troy Kisky
  0 siblings, 1 reply; 26+ messages in thread
From: Tom Rini @ 2022-03-15 20:01 UTC (permalink / raw)
  To: Troy Kisky; +Cc: Simon Glass, U-Boot Mailing List

[-- Attachment #1: Type: text/plain, Size: 5300 bytes --]

On Tue, Mar 15, 2022 at 12:08:02PM -0700, Troy Kisky wrote:
> On 2/8/2022 6:30 AM, Tom Rini wrote:
> > On Fri, Jan 07, 2022 at 10:33:34AM -0800, Troy Kisky wrote:
> >> On 1/7/2022 7:12 AM, Tom Rini wrote:
> >>> On Thu, Jan 06, 2022 at 01:14:40PM -0800, Troy Kisky wrote:
> >>>> On 12/28/2021 5:11 AM, Tom Rini wrote:
> >>>>> On Tue, Dec 28, 2021 at 01:33:05AM -0700, Simon Glass wrote:
> >>>>>> Hi Troy,
> >>>>>>
> >>>>>> On Fri, 17 Dec 2021 at 16:02, Troy Kisky <troy.kisky@boundarydevices.com> wrote:
> >>>>>>>
> >>>>>>> This series intends to let board specific files live in the boards
> >>>>>>> directory. The last patch moves files for nitrogen6x.
> >>>>>>> I have tested it with buildman
> >>>>>>>
> >>>>>>> ./tools/buildman/buildman boundary -b denx_master
> >>>>>>>
> >>>>>>> But it is likely the more scripts then just tools/genboardscfg.py would
> >>>>>>> need to be updated.
> >>>>>>>
> >>>>>>> Troy Kisky (5):
> >>>>>>>   kconfig: allow defconfigs to live in board directory
> >>>>>>>   dts: allow dts files in board directory
> >>>>>>>   scripts: Makefile.autoconf: allow CONFIG_SYS_CONFIG_NAME file to live
> >>>>>>>     in board directory
> >>>>>>>   genboardcfg: allow defconfigs in board directory
> >>>>>>>   nitrogen6x: move board specific files to nitrogen6x directory
> >>>>>>>
> >>>>>>>  arch/arm/dts/Makefile                         |  3 --
> >>>>>>>  board/boundary/nitrogen6x/MAINTAINERS         | 13 -------
> >>>>>>>  board/boundary/nitrogen6x/Makefile            | 13 +++++++
> >>>>>>>  .../nitrogen6x}/imx6dl-nitrogen6x.dts         |  0
> >>>>>>>  .../boundary/nitrogen6x}/imx6q-nitrogen6x.dts |  0
> >>>>>>>  .../boundary/nitrogen6x}/imx6q-sabrelite.dts  |  0
> >>>>>>>  .../nitrogen6x}/imx6qdl-nitrogen6x.dtsi       |  0
> >>>>>>>  .../nitrogen6x}/imx6qdl-sabrelite.dtsi        |  0
> >>>>>>>  .../nitrogen6x}/mx6qsabrelite_defconfig       |  0
> >>>>>>>  .../nitrogen6x}/nitrogen6dl2g_defconfig       |  0
> >>>>>>>  .../nitrogen6x}/nitrogen6dl_defconfig         |  0
> >>>>>>>  .../nitrogen6x}/nitrogen6q2g_defconfig        |  0
> >>>>>>>  .../boundary/nitrogen6x}/nitrogen6q_defconfig |  0
> >>>>>>>  .../nitrogen6x}/nitrogen6s1g_defconfig        |  0
> >>>>>>>  .../boundary/nitrogen6x}/nitrogen6s_defconfig |  0
> >>>>>>>  .../boundary/nitrogen6x}/nitrogen6x.h         |  2 +-
> >>>>>>>  dts/Makefile                                  | 11 +++++-
> >>>>>>>  scripts/Makefile.autoconf                     |  9 ++++-
> >>>>>>>  scripts/Makefile.lib                          |  1 +
> >>>>>>>  scripts/kconfig/Makefile                      |  9 ++++-
> >>>>>>>  tools/genboardscfg.py                         | 37 ++++++++++++++++++-
> >>>>>>>  21 files changed, 75 insertions(+), 23 deletions(-)
> >>>>>>>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6dl-nitrogen6x.dts (100%)
> >>>>>>>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6q-nitrogen6x.dts (100%)
> >>>>>>>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6q-sabrelite.dts (100%)
> >>>>>>>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6qdl-nitrogen6x.dtsi (100%)
> >>>>>>>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6qdl-sabrelite.dtsi (100%)
> >>>>>>>  rename {configs => board/boundary/nitrogen6x}/mx6qsabrelite_defconfig (100%)
> >>>>>>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6dl2g_defconfig (100%)
> >>>>>>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6dl_defconfig (100%)
> >>>>>>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6q2g_defconfig (100%)
> >>>>>>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6q_defconfig (100%)
> >>>>>>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6s1g_defconfig (100%)
> >>>>>>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6s_defconfig (100%)
> >>>>>>>  rename {include/configs => board/boundary/nitrogen6x}/nitrogen6x.h (98%) I'm not about the goal.
> >>>>>>
> >>>>>> Can you please add a few notes about the motivation for this change?
> >>>>>
> >>>>> Sorry for the delayed reply here.  I'm also not entirely sure this is a
> >>>>> good idea.  Moving the defconfig files?  Maybe.  It does make checking
> >>>>> all configs a bit more tricky, but indeed the configs directory is
> >>>>> unwieldy.  Moving the dts files?  Those should be a direct cp from the
> >>>>> kernel, so that makes things less clear to me.  Especially since it will
> >>>>> need other common files that will still be elsewhere.
> >>>>>
> >>>>
> >>>> They will still be a direct copy. Notice the 100% rename. Common files still living in the dts
> >>>> directory is less clear. I can try to address the "piecemeal building of .dts files" if this
> >>>> still has a chance of being accepted.
> >>>
> >>> So, here's my worry.  Today, in an ideal world that we're not yet at, I
> >>> could do:
> >>> 1. cd ~/src/linux; git checkout v5.16
> >>> 2. cd ~/src/u-boot; for DTS in arch/arm/dts/*.dts*; do \
> >>> 	[ -f ~/src/linux/$DTS ] && cp ~/src/linux/$DTS $DTS; done
> 
> Perhaps we can mimic Linux's arm/arm64 dts split and make the above work better?

Along with making the distinction between what we're mirroring and what
we're adding more clear yes, that would be viable I think.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 0/5] Move board specific files to board directory
  2022-03-15 20:01               ` Tom Rini
@ 2022-03-15 20:23                 ` Troy Kisky
  2022-03-16 14:48                   ` Tom Rini
  0 siblings, 1 reply; 26+ messages in thread
From: Troy Kisky @ 2022-03-15 20:23 UTC (permalink / raw)
  To: Tom Rini; +Cc: Simon Glass, U-Boot Mailing List

On 3/15/2022 1:01 PM, Tom Rini wrote:
> On Tue, Mar 15, 2022 at 12:08:02PM -0700, Troy Kisky wrote:
>> On 2/8/2022 6:30 AM, Tom Rini wrote:
>>> On Fri, Jan 07, 2022 at 10:33:34AM -0800, Troy Kisky wrote:
>>>> On 1/7/2022 7:12 AM, Tom Rini wrote:
>>>>> On Thu, Jan 06, 2022 at 01:14:40PM -0800, Troy Kisky wrote:
>>>>>> On 12/28/2021 5:11 AM, Tom Rini wrote:
>>>>>>> On Tue, Dec 28, 2021 at 01:33:05AM -0700, Simon Glass wrote:
>>>>>>>> Hi Troy,
>>>>>>>>
>>>>>>>> On Fri, 17 Dec 2021 at 16:02, Troy Kisky <troy.kisky@boundarydevices.com> wrote:
>>>>>>>>>
>>>>>>>>> This series intends to let board specific files live in the boards
>>>>>>>>> directory. The last patch moves files for nitrogen6x.
>>>>>>>>> I have tested it with buildman
>>>>>>>>>
>>>>>>>>> ./tools/buildman/buildman boundary -b denx_master
>>>>>>>>>
>>>>>>>>> But it is likely the more scripts then just tools/genboardscfg.py would
>>>>>>>>> need to be updated.
>>>>>>>>>
>>>>>>>>> Troy Kisky (5):
>>>>>>>>>   kconfig: allow defconfigs to live in board directory
>>>>>>>>>   dts: allow dts files in board directory
>>>>>>>>>   scripts: Makefile.autoconf: allow CONFIG_SYS_CONFIG_NAME file to live
>>>>>>>>>     in board directory
>>>>>>>>>   genboardcfg: allow defconfigs in board directory
>>>>>>>>>   nitrogen6x: move board specific files to nitrogen6x directory
>>>>>>>>>
>>>>>>>>>  arch/arm/dts/Makefile                         |  3 --
>>>>>>>>>  board/boundary/nitrogen6x/MAINTAINERS         | 13 -------
>>>>>>>>>  board/boundary/nitrogen6x/Makefile            | 13 +++++++
>>>>>>>>>  .../nitrogen6x}/imx6dl-nitrogen6x.dts         |  0
>>>>>>>>>  .../boundary/nitrogen6x}/imx6q-nitrogen6x.dts |  0
>>>>>>>>>  .../boundary/nitrogen6x}/imx6q-sabrelite.dts  |  0
>>>>>>>>>  .../nitrogen6x}/imx6qdl-nitrogen6x.dtsi       |  0
>>>>>>>>>  .../nitrogen6x}/imx6qdl-sabrelite.dtsi        |  0
>>>>>>>>>  .../nitrogen6x}/mx6qsabrelite_defconfig       |  0
>>>>>>>>>  .../nitrogen6x}/nitrogen6dl2g_defconfig       |  0
>>>>>>>>>  .../nitrogen6x}/nitrogen6dl_defconfig         |  0
>>>>>>>>>  .../nitrogen6x}/nitrogen6q2g_defconfig        |  0
>>>>>>>>>  .../boundary/nitrogen6x}/nitrogen6q_defconfig |  0
>>>>>>>>>  .../nitrogen6x}/nitrogen6s1g_defconfig        |  0
>>>>>>>>>  .../boundary/nitrogen6x}/nitrogen6s_defconfig |  0
>>>>>>>>>  .../boundary/nitrogen6x}/nitrogen6x.h         |  2 +-
>>>>>>>>>  dts/Makefile                                  | 11 +++++-
>>>>>>>>>  scripts/Makefile.autoconf                     |  9 ++++-
>>>>>>>>>  scripts/Makefile.lib                          |  1 +
>>>>>>>>>  scripts/kconfig/Makefile                      |  9 ++++-
>>>>>>>>>  tools/genboardscfg.py                         | 37 ++++++++++++++++++-
>>>>>>>>>  21 files changed, 75 insertions(+), 23 deletions(-)
>>>>>>>>>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6dl-nitrogen6x.dts (100%)
>>>>>>>>>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6q-nitrogen6x.dts (100%)
>>>>>>>>>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6q-sabrelite.dts (100%)
>>>>>>>>>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6qdl-nitrogen6x.dtsi (100%)
>>>>>>>>>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6qdl-sabrelite.dtsi (100%)
>>>>>>>>>  rename {configs => board/boundary/nitrogen6x}/mx6qsabrelite_defconfig (100%)
>>>>>>>>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6dl2g_defconfig (100%)
>>>>>>>>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6dl_defconfig (100%)
>>>>>>>>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6q2g_defconfig (100%)
>>>>>>>>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6q_defconfig (100%)
>>>>>>>>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6s1g_defconfig (100%)
>>>>>>>>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6s_defconfig (100%)
>>>>>>>>>  rename {include/configs => board/boundary/nitrogen6x}/nitrogen6x.h (98%) I'm not about the goal.
>>>>>>>>
>>>>>>>> Can you please add a few notes about the motivation for this change?
>>>>>>>
>>>>>>> Sorry for the delayed reply here.  I'm also not entirely sure this is a
>>>>>>> good idea.  Moving the defconfig files?  Maybe.  It does make checking
>>>>>>> all configs a bit more tricky, but indeed the configs directory is
>>>>>>> unwieldy.  Moving the dts files?  Those should be a direct cp from the
>>>>>>> kernel, so that makes things less clear to me.  Especially since it will
>>>>>>> need other common files that will still be elsewhere.
>>>>>>>
>>>>>>
>>>>>> They will still be a direct copy. Notice the 100% rename. Common files still living in the dts
>>>>>> directory is less clear. I can try to address the "piecemeal building of .dts files" if this
>>>>>> still has a chance of being accepted.
>>>>>
>>>>> So, here's my worry.  Today, in an ideal world that we're not yet at, I
>>>>> could do:
>>>>> 1. cd ~/src/linux; git checkout v5.16
>>>>> 2. cd ~/src/u-boot; for DTS in arch/arm/dts/*.dts*; do \
>>>>> 	[ -f ~/src/linux/$DTS ] && cp ~/src/linux/$DTS $DTS; done
>>
>> Perhaps we can mimic Linux's arm/arm64 dts split and make the above work better?
> 
> Along with making the distinction between what we're mirroring and what
> we're adding more clear yes, that would be viable I think.
> 

Do you envision the *u-boot.dts not moving with the other files ? Or moving to a directory with a
different name? i.e. arm-u-boot, arm64-u-boot, with the same sub-directory structure.




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 0/5] Move board specific files to board directory
  2022-03-15 20:23                 ` Troy Kisky
@ 2022-03-16 14:48                   ` Tom Rini
  0 siblings, 0 replies; 26+ messages in thread
From: Tom Rini @ 2022-03-16 14:48 UTC (permalink / raw)
  To: Troy Kisky; +Cc: Simon Glass, U-Boot Mailing List

[-- Attachment #1: Type: text/plain, Size: 6167 bytes --]

On Tue, Mar 15, 2022 at 01:23:42PM -0700, Troy Kisky wrote:
> On 3/15/2022 1:01 PM, Tom Rini wrote:
> > On Tue, Mar 15, 2022 at 12:08:02PM -0700, Troy Kisky wrote:
> >> On 2/8/2022 6:30 AM, Tom Rini wrote:
> >>> On Fri, Jan 07, 2022 at 10:33:34AM -0800, Troy Kisky wrote:
> >>>> On 1/7/2022 7:12 AM, Tom Rini wrote:
> >>>>> On Thu, Jan 06, 2022 at 01:14:40PM -0800, Troy Kisky wrote:
> >>>>>> On 12/28/2021 5:11 AM, Tom Rini wrote:
> >>>>>>> On Tue, Dec 28, 2021 at 01:33:05AM -0700, Simon Glass wrote:
> >>>>>>>> Hi Troy,
> >>>>>>>>
> >>>>>>>> On Fri, 17 Dec 2021 at 16:02, Troy Kisky <troy.kisky@boundarydevices.com> wrote:
> >>>>>>>>>
> >>>>>>>>> This series intends to let board specific files live in the boards
> >>>>>>>>> directory. The last patch moves files for nitrogen6x.
> >>>>>>>>> I have tested it with buildman
> >>>>>>>>>
> >>>>>>>>> ./tools/buildman/buildman boundary -b denx_master
> >>>>>>>>>
> >>>>>>>>> But it is likely the more scripts then just tools/genboardscfg.py would
> >>>>>>>>> need to be updated.
> >>>>>>>>>
> >>>>>>>>> Troy Kisky (5):
> >>>>>>>>>   kconfig: allow defconfigs to live in board directory
> >>>>>>>>>   dts: allow dts files in board directory
> >>>>>>>>>   scripts: Makefile.autoconf: allow CONFIG_SYS_CONFIG_NAME file to live
> >>>>>>>>>     in board directory
> >>>>>>>>>   genboardcfg: allow defconfigs in board directory
> >>>>>>>>>   nitrogen6x: move board specific files to nitrogen6x directory
> >>>>>>>>>
> >>>>>>>>>  arch/arm/dts/Makefile                         |  3 --
> >>>>>>>>>  board/boundary/nitrogen6x/MAINTAINERS         | 13 -------
> >>>>>>>>>  board/boundary/nitrogen6x/Makefile            | 13 +++++++
> >>>>>>>>>  .../nitrogen6x}/imx6dl-nitrogen6x.dts         |  0
> >>>>>>>>>  .../boundary/nitrogen6x}/imx6q-nitrogen6x.dts |  0
> >>>>>>>>>  .../boundary/nitrogen6x}/imx6q-sabrelite.dts  |  0
> >>>>>>>>>  .../nitrogen6x}/imx6qdl-nitrogen6x.dtsi       |  0
> >>>>>>>>>  .../nitrogen6x}/imx6qdl-sabrelite.dtsi        |  0
> >>>>>>>>>  .../nitrogen6x}/mx6qsabrelite_defconfig       |  0
> >>>>>>>>>  .../nitrogen6x}/nitrogen6dl2g_defconfig       |  0
> >>>>>>>>>  .../nitrogen6x}/nitrogen6dl_defconfig         |  0
> >>>>>>>>>  .../nitrogen6x}/nitrogen6q2g_defconfig        |  0
> >>>>>>>>>  .../boundary/nitrogen6x}/nitrogen6q_defconfig |  0
> >>>>>>>>>  .../nitrogen6x}/nitrogen6s1g_defconfig        |  0
> >>>>>>>>>  .../boundary/nitrogen6x}/nitrogen6s_defconfig |  0
> >>>>>>>>>  .../boundary/nitrogen6x}/nitrogen6x.h         |  2 +-
> >>>>>>>>>  dts/Makefile                                  | 11 +++++-
> >>>>>>>>>  scripts/Makefile.autoconf                     |  9 ++++-
> >>>>>>>>>  scripts/Makefile.lib                          |  1 +
> >>>>>>>>>  scripts/kconfig/Makefile                      |  9 ++++-
> >>>>>>>>>  tools/genboardscfg.py                         | 37 ++++++++++++++++++-
> >>>>>>>>>  21 files changed, 75 insertions(+), 23 deletions(-)
> >>>>>>>>>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6dl-nitrogen6x.dts (100%)
> >>>>>>>>>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6q-nitrogen6x.dts (100%)
> >>>>>>>>>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6q-sabrelite.dts (100%)
> >>>>>>>>>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6qdl-nitrogen6x.dtsi (100%)
> >>>>>>>>>  rename {arch/arm/dts => board/boundary/nitrogen6x}/imx6qdl-sabrelite.dtsi (100%)
> >>>>>>>>>  rename {configs => board/boundary/nitrogen6x}/mx6qsabrelite_defconfig (100%)
> >>>>>>>>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6dl2g_defconfig (100%)
> >>>>>>>>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6dl_defconfig (100%)
> >>>>>>>>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6q2g_defconfig (100%)
> >>>>>>>>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6q_defconfig (100%)
> >>>>>>>>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6s1g_defconfig (100%)
> >>>>>>>>>  rename {configs => board/boundary/nitrogen6x}/nitrogen6s_defconfig (100%)
> >>>>>>>>>  rename {include/configs => board/boundary/nitrogen6x}/nitrogen6x.h (98%) I'm not about the goal.
> >>>>>>>>
> >>>>>>>> Can you please add a few notes about the motivation for this change?
> >>>>>>>
> >>>>>>> Sorry for the delayed reply here.  I'm also not entirely sure this is a
> >>>>>>> good idea.  Moving the defconfig files?  Maybe.  It does make checking
> >>>>>>> all configs a bit more tricky, but indeed the configs directory is
> >>>>>>> unwieldy.  Moving the dts files?  Those should be a direct cp from the
> >>>>>>> kernel, so that makes things less clear to me.  Especially since it will
> >>>>>>> need other common files that will still be elsewhere.
> >>>>>>>
> >>>>>>
> >>>>>> They will still be a direct copy. Notice the 100% rename. Common files still living in the dts
> >>>>>> directory is less clear. I can try to address the "piecemeal building of .dts files" if this
> >>>>>> still has a chance of being accepted.
> >>>>>
> >>>>> So, here's my worry.  Today, in an ideal world that we're not yet at, I
> >>>>> could do:
> >>>>> 1. cd ~/src/linux; git checkout v5.16
> >>>>> 2. cd ~/src/u-boot; for DTS in arch/arm/dts/*.dts*; do \
> >>>>> 	[ -f ~/src/linux/$DTS ] && cp ~/src/linux/$DTS $DTS; done
> >>
> >> Perhaps we can mimic Linux's arm/arm64 dts split and make the above work better?
> > 
> > Along with making the distinction between what we're mirroring and what
> > we're adding more clear yes, that would be viable I think.
> > 
> 
> Do you envision the *u-boot.dts not moving with the other files ? Or moving to a directory with a
> different name? i.e. arm-u-boot, arm64-u-boot, with the same sub-directory structure.

I'd like to see our -u-boot.dtsi stuff separate, to help with enforcing
the notion that dts files go upstream and come back to us unmodified.
Then we have our own files to update them as needed, but the core dtses
aren't to be changed.  Directory structure really comes down to how to
easily implement the build rules I guess, so likely needing to follow
arm64/dts, etc.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2022-03-16 14:49 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-17 23:01 [PATCH v1 0/5] Move board specific files to board directory Troy Kisky
2021-12-17 23:01 ` [PATCH v1 1/5] kconfig: allow defconfigs to live in " Troy Kisky
2021-12-28  8:33   ` Simon Glass
2022-01-06 21:00     ` Troy Kisky
2021-12-17 23:01 ` [PATCH v1 2/5] dts: allow dts files " Troy Kisky
2021-12-28  8:33   ` Simon Glass
2022-01-06 21:01     ` Troy Kisky
2021-12-17 23:01 ` [PATCH v1 3/5] scripts: Makefile.autoconf: allow CONFIG_SYS_CONFIG_NAME file to live " Troy Kisky
2021-12-28  8:33   ` Simon Glass
2022-01-06 21:09     ` Troy Kisky
2022-01-30 23:14       ` Simon Glass
2021-12-17 23:01 ` [PATCH v1 4/5] genboardcfg: allow defconfigs " Troy Kisky
2021-12-28  8:33   ` Simon Glass
2021-12-17 23:01 ` [PATCH v1 5/5] nitrogen6x: move board specific files to nitrogen6x directory Troy Kisky
2021-12-28  8:33   ` Simon Glass
2021-12-28  8:33 ` [PATCH v1 0/5] Move board specific files to board directory Simon Glass
2021-12-28 13:11   ` Tom Rini
2022-01-06 21:14     ` Troy Kisky
2022-01-07 15:12       ` Tom Rini
2022-01-07 18:33         ` Troy Kisky
2022-01-30 23:14           ` Simon Glass
2022-02-08 14:30           ` Tom Rini
2022-03-15 19:08             ` Troy Kisky
2022-03-15 20:01               ` Tom Rini
2022-03-15 20:23                 ` Troy Kisky
2022-03-16 14:48                   ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.