Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] utils/genrandconfig: handle BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
@ 2024-09-15 12:37 Thomas Petazzoni via buildroot
  2024-09-15 12:37 ` [Buildroot] [PATCH 2/2] linux: handle empty BR2_LINUX_KERNEL_IMAGE_TARGET_NAME situation Thomas Petazzoni via buildroot
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-09-15 12:37 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Petazzoni

When BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y,
BR2_LINUX_KERNEL_IMAGE_TARGET_NAME is supposed to be non-empty. But in
the context of genraconfig, we don't know to what value
BR2_LINUX_KERNEL_IMAGE_TARGET_NAME can be set, so let's avoid cases
where BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y. By dropping this option,
kconfig will revert back to the default image format for the selected
architecture.

Fixes:

  http://autobuild.buildroot.net/results/1d104a051c83bb31e98565369a2ec7badfa21eca/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 utils/genrandconfig | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/utils/genrandconfig b/utils/genrandconfig
index 282a9ebdea..0698cc5ff0 100755
--- a/utils/genrandconfig
+++ b/utils/genrandconfig
@@ -248,6 +248,10 @@ async def fixup_config(sysinfo, configfile):
             configlines.remove('BR2_LINUX_KERNEL_SIMPLEIMAGE=y\n')
             configlines.append('BR2_LINUX_KERNEL_VMLINUX=y\n')
 
+    if 'BR2_LINUX_KERNEL=y\n' in configlines and \
+       'BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y\n' in configlines:
+        configlines.remove('BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y')
+
     if 'BR2_LINUX_KERNEL_EXT_AUFS=y\n' in configlines and \
        'BR2_LINUX_KERNEL_EXT_AUFS_VERSION=""\n' in configlines:
         configlines.remove('BR2_LINUX_KERNEL_EXT_AUFS=y\n')
-- 
2.46.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 2/2] linux: handle empty BR2_LINUX_KERNEL_IMAGE_TARGET_NAME situation
  2024-09-15 12:37 [Buildroot] [PATCH 1/2] utils/genrandconfig: handle BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y Thomas Petazzoni via buildroot
@ 2024-09-15 12:37 ` Thomas Petazzoni via buildroot
  2024-11-12 21:45   ` Peter Korsgaard
  2024-10-27 18:48 ` [Buildroot] [PATCH 1/2] utils/genrandconfig: handle BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y Thomas Petazzoni via buildroot
  2024-11-12 21:45 ` Peter Korsgaard
  2 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-09-15 12:37 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Petazzoni

When BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y,
BR2_LINUX_KERNEL_IMAGE_TARGET_NAME should be set or the build will
fail. Instead of miserably failing the build, let's catch this earlier
and warn the user in a more informative way.

Related to:

  http://autobuild.buildroot.net/results/1d104a051c83bb31e98565369a2ec7badfa21eca/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 linux/linux.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/linux/linux.mk b/linux/linux.mk
index 16d9f19470..b52f07a0cc 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -644,6 +644,10 @@ $(error No kernel device tree source specified, check your \
 	BR2_LINUX_KERNEL_INTREE_DTS_NAME / BR2_LINUX_KERNEL_CUSTOM_DTS_PATH settings)
 endif
 
+ifeq ($(BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM):$(call qstrip,$(BR2_LINUX_KERNEL_IMAGE_TARGET_NAME)),y:)
+$(error No image name specified in BR2_LINUX_KERNEL_IMAGE_TARGET_NAME despite BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y)
+endif
+
 endif # BR_BUILDING
 
 $(eval $(kconfig-package))
-- 
2.46.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/2] utils/genrandconfig: handle BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
  2024-09-15 12:37 [Buildroot] [PATCH 1/2] utils/genrandconfig: handle BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y Thomas Petazzoni via buildroot
  2024-09-15 12:37 ` [Buildroot] [PATCH 2/2] linux: handle empty BR2_LINUX_KERNEL_IMAGE_TARGET_NAME situation Thomas Petazzoni via buildroot
@ 2024-10-27 18:48 ` Thomas Petazzoni via buildroot
  2024-11-12 21:45 ` Peter Korsgaard
  2 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-10-27 18:48 UTC (permalink / raw)
  To: Thomas Petazzoni via buildroot; +Cc: Thomas Petazzoni

On Sun, 15 Sep 2024 14:37:27 +0200
Thomas Petazzoni via buildroot <buildroot@buildroot.org> wrote:

> When BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y,
> BR2_LINUX_KERNEL_IMAGE_TARGET_NAME is supposed to be non-empty. But in
> the context of genraconfig, we don't know to what value
> BR2_LINUX_KERNEL_IMAGE_TARGET_NAME can be set, so let's avoid cases
> where BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y. By dropping this option,
> kconfig will revert back to the default image format for the selected
> architecture.
> 
> Fixes:
> 
>   http://autobuild.buildroot.net/results/1d104a051c83bb31e98565369a2ec7badfa21eca/
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> ---
>  utils/genrandconfig | 4 ++++
>  1 file changed, 4 insertions(+)

Both applied!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/2] utils/genrandconfig: handle BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
  2024-09-15 12:37 [Buildroot] [PATCH 1/2] utils/genrandconfig: handle BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y Thomas Petazzoni via buildroot
  2024-09-15 12:37 ` [Buildroot] [PATCH 2/2] linux: handle empty BR2_LINUX_KERNEL_IMAGE_TARGET_NAME situation Thomas Petazzoni via buildroot
  2024-10-27 18:48 ` [Buildroot] [PATCH 1/2] utils/genrandconfig: handle BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y Thomas Petazzoni via buildroot
@ 2024-11-12 21:45 ` Peter Korsgaard
  2 siblings, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2024-11-12 21:45 UTC (permalink / raw)
  To: Thomas Petazzoni via buildroot; +Cc: Thomas Petazzoni

>>>>> "Thomas" == Thomas Petazzoni via buildroot <buildroot@buildroot.org> writes:

 > When BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y,
 > BR2_LINUX_KERNEL_IMAGE_TARGET_NAME is supposed to be non-empty. But in
 > the context of genraconfig, we don't know to what value
 > BR2_LINUX_KERNEL_IMAGE_TARGET_NAME can be set, so let's avoid cases
 > where BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y. By dropping this option,
 > kconfig will revert back to the default image format for the selected
 > architecture.

 > Fixes:

 >   http://autobuild.buildroot.net/results/1d104a051c83bb31e98565369a2ec7badfa21eca/

 > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Committed to 2024.02.x and 2024.08.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 2/2] linux: handle empty BR2_LINUX_KERNEL_IMAGE_TARGET_NAME situation
  2024-09-15 12:37 ` [Buildroot] [PATCH 2/2] linux: handle empty BR2_LINUX_KERNEL_IMAGE_TARGET_NAME situation Thomas Petazzoni via buildroot
@ 2024-11-12 21:45   ` Peter Korsgaard
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2024-11-12 21:45 UTC (permalink / raw)
  To: Thomas Petazzoni via buildroot; +Cc: Thomas Petazzoni

>>>>> "Thomas" == Thomas Petazzoni via buildroot <buildroot@buildroot.org> writes:

 > When BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y,
 > BR2_LINUX_KERNEL_IMAGE_TARGET_NAME should be set or the build will
 > fail. Instead of miserably failing the build, let's catch this earlier
 > and warn the user in a more informative way.

 > Related to:

 >   http://autobuild.buildroot.net/results/1d104a051c83bb31e98565369a2ec7badfa21eca/

 > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Committed to 2024.02.x and 2024.08.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2024-11-12 21:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-15 12:37 [Buildroot] [PATCH 1/2] utils/genrandconfig: handle BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y Thomas Petazzoni via buildroot
2024-09-15 12:37 ` [Buildroot] [PATCH 2/2] linux: handle empty BR2_LINUX_KERNEL_IMAGE_TARGET_NAME situation Thomas Petazzoni via buildroot
2024-11-12 21:45   ` Peter Korsgaard
2024-10-27 18:48 ` [Buildroot] [PATCH 1/2] utils/genrandconfig: handle BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y Thomas Petazzoni via buildroot
2024-11-12 21:45 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox