diff mbox series

Make BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT public

Message ID 20181116154501.14961-1-lists@philipp-wagner.com
State Accepted
Headers show
Series Make BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT public | expand

Commit Message

Philipp Wagner Nov. 16, 2018, 3:45 p.m. UTC
From: Philipp Wagner <philipp.wagner@tum.de>

Currently the BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT option is only
available as dependency. This option controls if the Linux build system
should build the DTB itself, or if buildroot explicitly calls the Linux
Makefile like "make something.dtb".

My use case: I want to build an OpenRISC image with a custom device tree
file. OpenRISC does not support appended DTBs, and I'm not using a
bootloader, but link everything into a single kernel (vmlinux) image.

The kernel option CONFIG_OPENRISC_BUILTIN_DTB allows me to specify a dtb
file, which is typically located in the kernel source tree in
arch/openrisc/boot/dts/NAME.dts.

Since my dts file is not part of the upstream kernel, I have two
options: either patch the kernel to include the DTS file, and then
specify it using the CONFIG_OPENRISC_BUILTIN_DTB option.

Or use buildroot's BR2_LINUX_KERNEL_CUSTOM_DTS_PATH config option to
copy any DTS file to the kernel source tree, and then specify this file
with CONFIG_OPENRISC_BUILTIN_DTB as before.

However, the second option also requries the buildroot option
BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT to be set, otherwise I end up with a
"make -C kerneldir NAME.dts" call, which doesn't work (no such target
exists).

Currently the BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT option exists, but it's
not visible/available. Simply making it available solves the problem for
me nicely.
---
 linux/Config.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Philipp Wagner Nov. 26, 2018, 8:24 a.m. UTC | #1
Hi,

How can we move forward with this patch?

I also noticed that I missed my signed off tag, adding it in this mail
as well. (Let me know if you prefer the patch to be re-sent.)

Am 16.11.18 um 16:45 schrieb lists@philipp-wagner.com:
> From: Philipp Wagner <philipp.wagner@tum.de>
> 
> Currently the BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT option is only
> available as dependency. This option controls if the Linux build system
> should build the DTB itself, or if buildroot explicitly calls the Linux
> Makefile like "make something.dtb".
> 
> My use case: I want to build an OpenRISC image with a custom device tree
> file. OpenRISC does not support appended DTBs, and I'm not using a
> bootloader, but link everything into a single kernel (vmlinux) image.
> 
> The kernel option CONFIG_OPENRISC_BUILTIN_DTB allows me to specify a dtb
> file, which is typically located in the kernel source tree in
> arch/openrisc/boot/dts/NAME.dts.
> 
> Since my dts file is not part of the upstream kernel, I have two
> options: either patch the kernel to include the DTS file, and then
> specify it using the CONFIG_OPENRISC_BUILTIN_DTB option.
> 
> Or use buildroot's BR2_LINUX_KERNEL_CUSTOM_DTS_PATH config option to
> copy any DTS file to the kernel source tree, and then specify this file
> with CONFIG_OPENRISC_BUILTIN_DTB as before.
> 
> However, the second option also requries the buildroot option
> BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT to be set, otherwise I end up with a
> "make -C kerneldir NAME.dts" call, which doesn't work (no such target
> exists).
> 
> Currently the BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT option exists, but it's
> not visible/available. Simply making it available solves the problem for
> me nicely.

Signed-off-by: Philipp Wagner <mail@philipp-wagner.com>

> ---
>  linux/Config.in | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/linux/Config.in b/linux/Config.in
> index ecb12d0b16..1f02ee6e3b 100644
> --- a/linux/Config.in
> +++ b/linux/Config.in
> @@ -373,7 +373,7 @@ if BR2_LINUX_KERNEL_DTS_SUPPORT
>  # The variable below address the second case, were you only want
>  # limited actions from buildroot.
>  config BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT
> -	bool
> +	bool "DTB is built by kernel itself"
>  
>  config BR2_LINUX_KERNEL_APPENDED_DTB
>  	bool
>
Arnout Vandecappelle Aug. 1, 2019, 2:11 p.m. UTC | #2
Hi Philipp,

On 16/11/2018 16:45, lists@philipp-wagner.com wrote:
> From: Philipp Wagner <philipp.wagner@tum.de>
> 
> Currently the BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT option is only
> available as dependency. This option controls if the Linux build system
> should build the DTB itself, or if buildroot explicitly calls the Linux
> Makefile like "make something.dtb".
> 
> My use case: I want to build an OpenRISC image with a custom device tree

 Please don't use first-person language in the commit message. Use something
more neutral, e.g. "A typical use case" instead of "My use case".

 I was too lazy to change this though, so it's just for the future :-)

> file. OpenRISC does not support appended DTBs, and I'm not using a
> bootloader, but link everything into a single kernel (vmlinux) image.
> 
> The kernel option CONFIG_OPENRISC_BUILTIN_DTB allows me to specify a dtb
> file, which is typically located in the kernel source tree in
> arch/openrisc/boot/dts/NAME.dts.
> 
> Since my dts file is not part of the upstream kernel, I have two
> options: either patch the kernel to include the DTS file, and then
> specify it using the CONFIG_OPENRISC_BUILTIN_DTB option.
> 
> Or use buildroot's BR2_LINUX_KERNEL_CUSTOM_DTS_PATH config option to
> copy any DTS file to the kernel source tree, and then specify this file
> with CONFIG_OPENRISC_BUILTIN_DTB as before.
> 
> However, the second option also requries the buildroot option
> BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT to be set, otherwise I end up with a
> "make -C kerneldir NAME.dts" call, which doesn't work (no such target
> exists).
> 
> Currently the BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT option exists, but it's
> not visible/available. Simply making it available solves the problem for
> me nicely.
> ---
>  linux/Config.in | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/linux/Config.in b/linux/Config.in
> index ecb12d0b16..1f02ee6e3b 100644
> --- a/linux/Config.in
> +++ b/linux/Config.in
> @@ -373,7 +373,7 @@ if BR2_LINUX_KERNEL_DTS_SUPPORT
>  # The variable below address the second case, were you only want
>  # limited actions from buildroot.
>  config BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT
> -	bool
> +	bool "DTB is built by kernel itself"

 If it is a public option, it must have a help text. So I've added one and
applied to master, thanks.

 Sorry it took so long.

 Regards,
 Arnout

>  
>  config BR2_LINUX_KERNEL_APPENDED_DTB
>  	bool
>
diff mbox series

Patch

diff --git a/linux/Config.in b/linux/Config.in
index ecb12d0b16..1f02ee6e3b 100644
--- a/linux/Config.in
+++ b/linux/Config.in
@@ -373,7 +373,7 @@  if BR2_LINUX_KERNEL_DTS_SUPPORT
 # The variable below address the second case, were you only want
 # limited actions from buildroot.
 config BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT
-	bool
+	bool "DTB is built by kernel itself"
 
 config BR2_LINUX_KERNEL_APPENDED_DTB
 	bool