package/linux: fix custom dts files handling
PATCH 1/1 package/linux: fix custom dts files handling
Custom dts files are still conditionally copied based on non existing boolean. So it is currently not possible to use custom dts file(s) at all.
List of dts files is now iterated and files are copied into dedicated kernel arch dir.
--- linux/linux.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
linux/linux.mk +2 -2
@@ -370,8 +370,8 @@ endif # Compilation. We make sure the kernel gets rebuilt when the # configuration has changed. define LINUX_BUILD_CMDS - $(if $(BR2_LINUX_KERNEL_USE_CUSTOM_DTS), - cp -f $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH)) $(KERNEL_ARCH_PATH)/boot/dts/) + $(foreach dts, $(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH), + cp -f $(call qstrip,$(dts)) $(KERNEL_ARCH_PATH)/boot/dts/) $(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) $(LINUX_TARGET_NAME) @if grep -q "CONFIG_MODULES=y" $(@D)/.config; then \ $(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) modules ; \
Signature · 1 line
2.16.1
PATCH 1/1 package/linux: fix custom dts files handling
Custom dts files are still conditionally copied based on non existing boolean. So it is currently not possible to use custom dts file(s) at all.
List of dts files is now iterated and files are copied into dedicated kernel arch dir.
--- linux/linux.mk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
linux/linux.mk +3 -2
@@ -370,8 +370,9 @@ endif # Compilation. We make sure the kernel gets rebuilt when the # configuration has changed. define LINUX_BUILD_CMDS - $(if $(BR2_LINUX_KERNEL_USE_CUSTOM_DTS), - cp -f $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH)) $(KERNEL_ARCH_PATH)/boot/dts/) + @for dts in $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH)); do \ + cp -f $${dts} $(KERNEL_ARCH_PATH)/boot/dts/ ; \ + done $(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) $(LINUX_TARGET_NAME) @if grep -q "CONFIG_MODULES=y" $(@D)/.config; then \ $(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) modules ; \
Signature · 1 line
2.16.1
PATCH 1/1 package/linux: fix custom dts files handling
Hi Rafal,
Quoted 15 lines · Rafal Susz
Custom dts files are still conditionally copied based on non existing boolean. So it is currently not possible to use custom dts file(s) at all.
List of dts files is now iterated and files are copied into dedicated kernel arch dir.
Signed-off-by Rafal Susz <[email protected]>--- linux/linux.mk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)linux/linux.mk +0
-0
linux/linux.mk endif · line 374
Quoted 5 lines
linux/linux.mk +0
-2@@ -370,8 +370,9 @@ endif # Compilation. We make sure the kernel gets rebuilt when the # configuration has changed. define LINUX_BUILD_CMDS - $(if $(BR2_LINUX_KERNEL_USE_CUSTOM_DTS), - cp -f $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH)) $(KERNEL_ARCH_PATH)/boot/dts/)
Commit f142f23ecf9ee (package/linux: drop useless intermediate DTS booleans) should have removed BR2_LINUX_KERNEL_USE_CUSTOM_DTS. There is another reference to this symbol below.
linux/linux.mk endif · line 378
Quoted 6 lines
linux/linux.mk +3
-0+ @for dts in $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH)); do \ + cp -f $${dts} $(KERNEL_ARCH_PATH)/boot/dts/ ; \ + done $(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) $(LINUX_TARGET_NAME) @if grep -q "CONFIG_MODULES=y" $(@D)/.config; then \ $(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) modules ; \
baruch
Signature · 3 lines
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -PATCH 1/1 package/linux: fix custom dts files handling
Hello Baruch,
could you point where is "another reference" to this bool. I grepped br and did not find any other files.
In general it was good idea to drop these booleans and basing on user-entered strings take do some action or not.
best regards,
Rafal
2018-03-13 12:49 GMT+01:00 Baruch Siach <[email protected]>:
Quoted 42 lines
Hi Rafal,
Quoted 2 lines · Rafal Susz
Custom dts files are still conditionally copied based on non existing boolean. So it is currently not possible to use custom dts file(s) at
all.
Quoted 2 lines
List of dts files is now iterated and files are copied into dedicated
kernel arch dir.
Quoted 11 lines
Signed-off-by Rafal Susz <[email protected]>--- linux/linux.mk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)linux/linux.mk +0
-0linux/linux.mk endif · line 374
Quoted 5 lines
linux/linux.mk +0
-2@@ -370,8 +370,9 @@ endif # Compilation. We make sure the kernel gets rebuilt when the # configuration has changed. define LINUX_BUILD_CMDS - $(if $(BR2_LINUX_KERNEL_USE_CUSTOM_DTS), - cp -f $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH))$(KERNEL_ARCH_PATH)/boot/dts/)
Commit
f142f23ecf9ee(package/linux: drop useless intermediate DTS booleans)
should have removedBR2_LINUX_KERNEL_USE_CUSTOM_DTS. There is another reference to this symbol below.linux/linux.mk endif · line 373
Quoted 1 line
linux/linux.mk +1
-0+ @for dts in $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH));do \
linux/linux.mk endif
Quoted 3 lines
linux/linux.mk +2
-0+ cp -f $${dts} $(KERNEL_ARCH_PATH)/boot/dts/ ; \ + done $(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D)$(LINUX_TARGET_NAME)
linux/linux.mk endif · line 378
Quoted 2 lines
linux/linux.mk +0
-0@if grep -q "CONFIG_MODULES=y" $(@D)/.config; then \ $(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D)modules ; \
Quoted 9 lines
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open
Systems =}------------------------------------------------ooO--U-- Ooo------------{=
- baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20180313/ebb09479/attachment.html>
PATCH 1/1 package/linux: fix custom dts files handling
Hi Rafa?,
Quoted 4 lines · Rafa? Susz
could you point where is "another reference" to this bool. I grepped br and did not find any other files.
In general it was good idea to drop these booleans and basing on user-entered strings take do some action or not.
Here is what I get for current git master:
$ git grep KERNEL_USE_CUSTOM_DTS origin/master origin/master:configs/s6lx9_microboard_defconfig:BR2_LINUX_KERNEL_USE_CUSTOM_DTS=y origin/master:linux/linux.mk: $(if $(BR2_LINUX_KERNEL_USE_CUSTOM_DTS), origin/master:linux/linux.mk:BR2_LINUX_KERNEL_USE_INTREE_DTS / BR2_LINUX_KERNEL_USE_CUSTOM_DTS settings)
Your patch only removes the second reference. There a two more to be converted/removed.
baruch
Quoted 42 lines
2018-03-13 12:49 GMT+01:00 Baruch Siach <[email protected]>:
Quoted 41 lines · Rafal Susz
Quoted 2 lines
Custom dts files are still conditionally copied based on non existing boolean. So it is currently not possible to use custom dts file(s) at
all.
Quoted 2 lines
List of dts files is now iterated and files are copied into dedicated
kernel arch dir.
Quoted 11 lines
Signed-off-by Rafal Susz <[email protected]>--- linux/linux.mk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)linux/linux.mk +0
-0linux/linux.mk endif · line 374
Quoted 5 lines
linux/linux.mk +0
-2@@ -370,8 +370,9 @@ endif # Compilation. We make sure the kernel gets rebuilt when the # configuration has changed. define LINUX_BUILD_CMDS - $(if $(BR2_LINUX_KERNEL_USE_CUSTOM_DTS), - cp -f $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH))$(KERNEL_ARCH_PATH)/boot/dts/)
Commit
f142f23ecf9ee(package/linux: drop useless intermediate DTS booleans)
should have removedBR2_LINUX_KERNEL_USE_CUSTOM_DTS. There is another reference to this symbol below.linux/linux.mk endif · line 373
Quoted 1 line
linux/linux.mk +1
-0+ @for dts in $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH));do \
linux/linux.mk endif
Quoted 3 lines
linux/linux.mk +2
-0+ cp -f $${dts} $(KERNEL_ARCH_PATH)/boot/dts/ ; \ + done $(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D)$(LINUX_TARGET_NAME)
linux/linux.mk endif · line 378
Quoted 2 lines
linux/linux.mk +0
-0@if grep -q "CONFIG_MODULES=y" $(@D)/.config; then \ $(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D)modules ; \
baruch
Signature · 3 lines
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -PATCH 1/1 package/linux: fix custom dts files handling
In reply to Rafal SuszCustom dts files are still conditionally copied based on non existing boolean. So it is currently not possible to use custom dts file(s) at all.
List of dts files is now iterated and files are copied into dedicated kernel arch dir.
--- configs/s6lx9_microboard_defconfig | 1 - linux/linux.mk | 9 +++++---- 2 files changed, 5 insertions(+), 5 deletions(-)
configs/s6lx9_microboard_defconfig +0 -1
@@ -10,5 +10,4 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION=y BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.4.7" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/avnet/s6lx9_microboard/lx9_mmu_defconfig" -BR2_LINUX_KERNEL_USE_CUSTOM_DTS=y BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="board/avnet/s6lx9_microboard/lx9_mmu.dts"
linux/linux.mk +5 -4
@@ -370,8 +370,9 @@ endif # Compilation. We make sure the kernel gets rebuilt when the # configuration has changed. define LINUX_BUILD_CMDS - $(if $(BR2_LINUX_KERNEL_USE_CUSTOM_DTS), - cp -f $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH)) $(KERNEL_ARCH_PATH)/boot/dts/) + @for dts in $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH)); do \ + cp -f $${dts} $(KERNEL_ARCH_PATH)/boot/dts/ ; \ + done $(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) $(LINUX_TARGET_NAME) @if grep -q "CONFIG_MODULES=y" $(@D)/.config; then \ $(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) modules ; \
@@ -482,9 +483,9 @@ $(error No kernel configuration file specified, check your BR2_LINUX_KERNEL_CUST endif endif -ifeq ($(BR2_LINUX_KERNEL_DTS_SUPPORT)$(KERNEL_DTS_NAME),y) +ifeq ($(strip $(BR2_LINUX_KERNEL_DTS_SUPPORT)$(KERNEL_DTS_NAME)),y) $(error No kernel device tree source specified, check your \ -BR2_LINUX_KERNEL_USE_INTREE_DTS / BR2_LINUX_KERNEL_USE_CUSTOM_DTS settings) +BR2_LINUX_KERNEL_INTREE_DTS_NAME / BR2_LINUX_KERNEL_CUSTOM_DTS_PATH settings) endif endif # BR_BUILDING
Signature · 1 line
2.16.1
PATCH 1/1 package/linux: fix custom dts files handling
Rafal, All,
On 2018-03-13 15:26 +0100, Rafal Susz spake thusly:
Quoted 16 lines
Custom dts files are still conditionally copied based on non existing boolean. So it is currently not possible to use custom dts file(s) at all.
List of dts files is now iterated and files are copied into dedicated kernel arch dir.
Signed-off-by Rafal Susz <[email protected]>--- configs/s6lx9_microboard_defconfig | 1 - linux/linux.mk | 9 +++++---- 2 files changed, 5 insertions(+), 5 deletions(-)configs/s6lx9_microboard_defconfig +0
-0
configs/s6lx9_microboard_defconfig BR2_LINUX_KERNEL_CUSTOM_VERSION=y · line 13
Quoted 5 lines
configs/s6lx9_microboard_defconfig +0
-1@@ -10,5 +10,4 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION=y BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.4.7" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/avnet/s6lx9_microboard/lx9_mmu_defconfig" -BR2_LINUX_KERNEL_USE_CUSTOM_DTS=y BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="board/avnet/s6lx9_microboard/lx9_mmu.dts"
I would prefer if it were two patches:
- one to fix linux.mk
- another to fix the defconfig
Quoted 17 lines
linux/linux.mk +3
-2@@ -370,8 +370,9 @@ endif # Compilation. We make sure the kernel gets rebuilt when the # configuration has changed. define LINUX_BUILD_CMDS - $(if $(BR2_LINUX_KERNEL_USE_CUSTOM_DTS), - cp -f $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH)) $(KERNEL_ARCH_PATH)/boot/dts/) + @for dts in $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH)); do \ + cp -f $${dts} $(KERNEL_ARCH_PATH)/boot/dts/ ; \ + done $(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) $(LINUX_TARGET_NAME) @if grep -q "CONFIG_MODULES=y" $(@D)/.config; then \ $(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) modules ; \
linux/linux.mk $(error No kernel configuration file specified, check your BR2_LINUX_KERNEL_CUST · line 486
Quoted 5 lines
linux/linux.mk +1
-1@@ -482,9 +483,9 @@ $(error No kernel configuration file specified, check your BR2_LINUX_KERNEL_CUST endif endif -ifeq ($(BR2_LINUX_KERNEL_DTS_SUPPORT)$(KERNEL_DTS_NAME),y) +ifeq ($(strip $(BR2_LINUX_KERNEL_DTS_SUPPORT)$(KERNEL_DTS_NAME)),y)
Only $(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH) should be stripped, while the boolean $(BR2_LINUX_KERNEL_DTS_SUPPORT) needs not. Also, I'd prefer if there was a separator between the boolean and the free-form string:
ifeq ($(BR2_LINUX_KERNEL_DTS_SUPPORT):$(strip $(KERNEL_DTS_NAME)),y:)
Regards,
Yann E. MORIN.
Quoted 6 lines
linux/linux.mk +0
-0endif endif # BR_BUILDINGSignature · 1 line
2.16.1
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 1/2 package/linux: fix custom dts files handling
In reply to Rafal SuszCustom dts files are still conditionally copied based on non existing boolean. So it is currently not possible to use custom dts file(s) at all.
List of dts files is now iterated and files are copied into dedicated kernel arch dir.
--- linux/linux.mk | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
linux/linux.mk +5 -4
@@ -370,8 +370,9 @@ endif # Compilation. We make sure the kernel gets rebuilt when the # configuration has changed. define LINUX_BUILD_CMDS - $(if $(BR2_LINUX_KERNEL_USE_CUSTOM_DTS), - cp -f $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH)) $(KERNEL_ARCH_PATH)/boot/dts/) + @for dts in $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH)); do \ + cp -f $${dts} $(KERNEL_ARCH_PATH)/boot/dts/ ; \ + done $(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) $(LINUX_TARGET_NAME) @if grep -q "CONFIG_MODULES=y" $(@D)/.config; then \ $(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) modules ; \
@@ -482,9 +483,9 @@ $(error No kernel configuration file specified, check your BR2_LINUX_KERNEL_CUST endif endif -ifeq ($(BR2_LINUX_KERNEL_DTS_SUPPORT)$(KERNEL_DTS_NAME),y) +ifeq ($(BR2_LINUX_KERNEL_DTS_SUPPORT):$(strip $(KERNEL_DTS_NAME)),y:) $(error No kernel device tree source specified, check your \ -BR2_LINUX_KERNEL_USE_INTREE_DTS / BR2_LINUX_KERNEL_USE_CUSTOM_DTS settings) +BR2_LINUX_KERNEL_INTREE_DTS_NAME / BR2_LINUX_KERNEL_CUSTOM_DTS_PATH settings) endif endif # BR_BUILDING
Signature · 1 line
2.16.1
PATCH 2/2 configs/s6lx9_microboard_defconfig: purge custom dts boolean
Since custom dts files are unconditionally handled *KERNEL_USE_CUSTOM_DTS is no longer available/needed.
--- configs/s6lx9_microboard_defconfig | 1 - 1 file changed, 1 deletion(-)
configs/s6lx9_microboard_defconfig +0 -1
@@ -10,5 +10,4 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION=y BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.4.7" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/avnet/s6lx9_microboard/lx9_mmu_defconfig" -BR2_LINUX_KERNEL_USE_CUSTOM_DTS=y BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="board/avnet/s6lx9_microboard/lx9_mmu.dts"
Signature · 1 line
2.16.1
PATCH 2/2 configs/s6lx9_microboard_defconfig: purge custom dts boolean
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Rafal" == Rafal Susz <[email protected]> writes:
Since custom dts files are unconditionally handled
*KERNEL_USE_CUSTOM_DTSis no longer available/needed.Signed-off-by Rafal Susz <[email protected]>
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/2 package/linux: fix custom dts files handling
In reply to Rafal SuszQuoted 7 lines · Rafal Susz
Custom dts files are still conditionally copied based on non existing boolean. So it is currently not possible to use custom dts file(s) at all.
List of dts files is now iterated and files are copied into dedicated kernel arch dir.
Signed-off-by Rafal Susz <[email protected]>
Tested on a config which uses two out-of-tree DTS files. Without this patch, the current master fails.
With kind regards,
Jan
PATCH 1/2 package/linux: fix custom dts files handling
In reply to Rafal SuszQuoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Rafal" == Rafal Susz <[email protected]> writes:
Custom dts files are still conditionally copied based on non existing boolean. So it is currently not possible to use custom dts file(s) at all.
List of dts files is now iterated and files are copied into dedicated kernel arch dir.
Signed-off-by Rafal Susz <[email protected]>
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard