diff mbox series

[1/2] utils/genrandconfig: handle BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y

Message ID 20240915123729.800902-1-thomas.petazzoni@bootlin.com
State Accepted
Headers show
Series [1/2] utils/genrandconfig: handle BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y | expand

Commit Message

Thomas Petazzoni Sept. 15, 2024, 12:37 p.m. UTC
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(+)

Comments

Thomas Petazzoni Oct. 27, 2024, 6:48 p.m. UTC | #1
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
diff mbox series

Patch

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')