Skip to contentSkip to conversation

utils/genrandconfig: add DTS cuimage fixup

PATCH Applied James Hilliard 2 participants 6 messages May 3, 2022 – May 4, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 utils/genrandconfig: add DTS cuimage fixup

If we don't have a DTS name or path we need to also disable cuimage to disable DTS support as BR2_LINUX_KERNEL_CUIMAGE requires DTS support.

Fixes:
linux/linux.mk:591: *** No kernel device tree source specified, check your BR2_LINUX_KERNEL_INTREE_DTS_NAME / BR2_LINUX_KERNEL_CUSTOM_DTS_PATH settings. Stop.

---
 utils/genrandconfig | 3 +++
 1 file changed, 3 insertions(+)
utils/genrandconfig +3 -0
index 70af84f002..b821e60114 100755
@@ -381,6 +381,9 @@ def fixup_config(sysinfo, configfile):
         if 'BR2_LINUX_KERNEL_APPENDED_ZIMAGE=y\n' in configlines:
             configlines.remove('BR2_LINUX_KERNEL_APPENDED_ZIMAGE=y\n')
             configlines.append('BR2_LINUX_KERNEL_ZIMAGE=y\n')
+        if 'BR2_LINUX_KERNEL_CUIMAGE=y\n' in configlines:
+            configlines.remove('BR2_LINUX_KERNEL_CUIMAGE=y\n')
+            configlines.append('BR2_LINUX_KERNEL_UIMAGE=y\n')
         if 'BR2_LINUX_KERNEL_SIMPLEIMAGE=y\n' in configlines:
             configlines.remove('BR2_LINUX_KERNEL_SIMPLEIMAGE=y\n')
             configlines.append('BR2_LINUX_KERNEL_VMLINUX=y\n')
Signature · 6 lines
2.25.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 17 lines · James Hilliard

If we don't have a DTS name or path we need to also disable cuimage to disable DTS support as BR2_LINUX_KERNEL_CUIMAGE requires DTS support.

Fixes:
linux/linux.mk:591: *** No kernel device tree source specified, check your BR2_LINUX_KERNEL_INTREE_DTS_NAME / BR2_LINUX_KERNEL_CUSTOM_DTS_PATH settings. Stop.

---
  utils/genrandconfig | 3 +++
  1 file changed, 3 insertions(+)
utils/genrandconfig +0 -0
index 70af84f002..b821e60114 100755

utils/genrandconfig def fixup_config(sysinfo, configfile): · line 384

Quoted 4 lines
utils/genrandconfig +1 -0
@@ -381,6 +381,9 @@ def fixup_config(sysinfo, configfile):
          if 'BR2_LINUX_KERNEL_APPENDED_ZIMAGE=y\n' in configlines:
              configlines.remove('BR2_LINUX_KERNEL_APPENDED_ZIMAGE=y\n')
              configlines.append('BR2_LINUX_KERNEL_ZIMAGE=y\n')
+        if 'BR2_LINUX_KERNEL_CUIMAGE=y\n' in configlines:

Similar to the previous patch (only fixup host uboot tools ...), should this
be done only if no DTS is given? I.e.:

if 'BR2_LINUX_KERNEL_CUIMAGE=y\n' in configlines and \
('BR2_LINUX_KERNEL_INTREE_DTS_NAME=""\n' in configlines or \
'BR2_LINUX_KERNEL_CUSTOM_DTS_PATH=""\n' in configlines):

Regards,
Arnout

utils/genrandconfig def fixup_config(sysinfo, configfile): · line 389

Quoted 5 lines
utils/genrandconfig +2 -0
+            configlines.remove('BR2_LINUX_KERNEL_CUIMAGE=y\n')
+            configlines.append('BR2_LINUX_KERNEL_UIMAGE=y\n')
          if 'BR2_LINUX_KERNEL_SIMPLEIMAGE=y\n' in configlines:
              configlines.remove('BR2_LINUX_KERNEL_SIMPLEIMAGE=y\n')
              configlines.append('BR2_LINUX_KERNEL_VMLINUX=y\n')

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#2 lore raw
Quoted 29 lines · Arnout Vandecappelle
Quoted 17 lines · James Hilliard

If we don't have a DTS name or path we need to also disable cuimage to disable DTS support as BR2_LINUX_KERNEL_CUIMAGE requires DTS support.

Fixes:
linux/linux.mk:591: *** No kernel device tree source specified, check your BR2_LINUX_KERNEL_INTREE_DTS_NAME / BR2_LINUX_KERNEL_CUSTOM_DTS_PATH settings. Stop.

---
  utils/genrandconfig | 3 +++
  1 file changed, 3 insertions(+)
utils/genrandconfig +0 -0
index 70af84f002..b821e60114 100755

utils/genrandconfig def fixup_config(sysinfo, configfile): · line 384

Quoted 4 lines
utils/genrandconfig +1 -0
@@ -381,6 +381,9 @@ def fixup_config(sysinfo, configfile):
          if 'BR2_LINUX_KERNEL_APPENDED_ZIMAGE=y\n' in configlines:
              configlines.remove('BR2_LINUX_KERNEL_APPENDED_ZIMAGE=y\n')
              configlines.append('BR2_LINUX_KERNEL_ZIMAGE=y\n')
+        if 'BR2_LINUX_KERNEL_CUIMAGE=y\n' in configlines:

Similar to the previous patch (only fixup host uboot tools ...), should this
be done only if no DTS is given? I.e.:

Quoted 3 lines

if 'BR2_LINUX_KERNEL_CUIMAGE=y\n' in configlines and \
('BR2_LINUX_KERNEL_INTREE_DTS_NAME=""\n' in configlines or \
'BR2_LINUX_KERNEL_CUSTOM_DTS_PATH=""\n' in configlines):

Should be ok already due to parent match conditions covering the invalid case.

Quoted 10 lines

Regards,
Arnout

Quoted 5 lines
utils/genrandconfig +2 -0
+            configlines.remove('BR2_LINUX_KERNEL_CUIMAGE=y\n')
+            configlines.append('BR2_LINUX_KERNEL_UIMAGE=y\n')
          if 'BR2_LINUX_KERNEL_SIMPLEIMAGE=y\n' in configlines:
              configlines.remove('BR2_LINUX_KERNEL_SIMPLEIMAGE=y\n')
              configlines.append('BR2_LINUX_KERNEL_VMLINUX=y\n')

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#3 lore raw
Quoted 30 lines · James Hilliard
Quoted 29 lines · Arnout Vandecappelle
Quoted 17 lines · James Hilliard

If we don't have a DTS name or path we need to also disable cuimage to disable DTS support as BR2_LINUX_KERNEL_CUIMAGE requires DTS support.

Fixes:
linux/linux.mk:591: *** No kernel device tree source specified, check your BR2_LINUX_KERNEL_INTREE_DTS_NAME / BR2_LINUX_KERNEL_CUSTOM_DTS_PATH settings. Stop.

---
   utils/genrandconfig | 3 +++
   1 file changed, 3 insertions(+)
utils/genrandconfig +0 -0
index 70af84f002..b821e60114 100755

utils/genrandconfig def fixup_config(sysinfo, configfile): · line 384

Quoted 4 lines
utils/genrandconfig +1 -0
@@ -381,6 +381,9 @@ def fixup_config(sysinfo, configfile):
           if 'BR2_LINUX_KERNEL_APPENDED_ZIMAGE=y\n' in configlines:
               configlines.remove('BR2_LINUX_KERNEL_APPENDED_ZIMAGE=y\n')
               configlines.append('BR2_LINUX_KERNEL_ZIMAGE=y\n')
+        if 'BR2_LINUX_KERNEL_CUIMAGE=y\n' in configlines:

Similar to the previous patch (only fixup host uboot tools ...), should this
be done only if no DTS is given? I.e.:

Quoted 5 lines
Quoted 3 lines

if 'BR2_LINUX_KERNEL_CUIMAGE=y\n' in configlines and \
('BR2_LINUX_KERNEL_INTREE_DTS_NAME=""\n' in configlines or \
'BR2_LINUX_KERNEL_CUSTOM_DTS_PATH=""\n' in configlines):

Should be ok already due to parent match conditions covering the invalid case.

No, what I mean is: it is only needed to remove the line if DTS is not set. If
either DTS_NAME or DTS_PATH is set, there's no need to remove the CUIMAGE config.

This is similar to the patch you submitted for
BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE and _SCRIPT: they only need to be removed if the corresponding _SOURCE config is not set.

Regards,
Arnout

Quoted 11 lines
Quoted 11 lines

Regards,
Arnout

Quoted 5 lines
utils/genrandconfig +2 -0
+            configlines.remove('BR2_LINUX_KERNEL_CUIMAGE=y\n')
+            configlines.append('BR2_LINUX_KERNEL_UIMAGE=y\n')
           if 'BR2_LINUX_KERNEL_SIMPLEIMAGE=y\n' in configlines:
               configlines.remove('BR2_LINUX_KERNEL_SIMPLEIMAGE=y\n')
               configlines.append('BR2_LINUX_KERNEL_VMLINUX=y\n')

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#4 lore raw
Quoted 34 lines · Arnout Vandecappelle
Quoted 30 lines · James Hilliard
Quoted 29 lines · Arnout Vandecappelle
Quoted 17 lines · James Hilliard

If we don't have a DTS name or path we need to also disable cuimage to disable DTS support as BR2_LINUX_KERNEL_CUIMAGE requires DTS support.

Fixes:
linux/linux.mk:591: *** No kernel device tree source specified, check your BR2_LINUX_KERNEL_INTREE_DTS_NAME / BR2_LINUX_KERNEL_CUSTOM_DTS_PATH settings. Stop.

---
   utils/genrandconfig | 3 +++
   1 file changed, 3 insertions(+)
utils/genrandconfig +0 -0
index 70af84f002..b821e60114 100755

utils/genrandconfig def fixup_config(sysinfo, configfile): · line 384

Quoted 4 lines
utils/genrandconfig +1 -0
@@ -381,6 +381,9 @@ def fixup_config(sysinfo, configfile):
           if 'BR2_LINUX_KERNEL_APPENDED_ZIMAGE=y\n' in configlines:
               configlines.remove('BR2_LINUX_KERNEL_APPENDED_ZIMAGE=y\n')
               configlines.append('BR2_LINUX_KERNEL_ZIMAGE=y\n')
+        if 'BR2_LINUX_KERNEL_CUIMAGE=y\n' in configlines:

Similar to the previous patch (only fixup host uboot tools ...), should this
be done only if no DTS is given? I.e.:

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

if 'BR2_LINUX_KERNEL_CUIMAGE=y\n' in configlines and \
('BR2_LINUX_KERNEL_INTREE_DTS_NAME=""\n' in configlines or \
'BR2_LINUX_KERNEL_CUSTOM_DTS_PATH=""\n' in configlines):

Should be ok already due to parent match conditions covering the invalid case.

No, what I mean is: it is only needed to remove the line if DTS is not set. If
either DTS_NAME or DTS_PATH is set, there's no need to remove the CUIMAGE config.

Yes, that's exactly what this patch does AFAIU, see parent match conditions here:
https://github.com/buildroot/buildroot/blob/49f9a08223005584ca28c6f243ee5cb1d1e64f57/utils/genrandconfig#L377-L378

The BR2_LINUX_KERNEL_CUIMAGE removal only happens if both BR2_LINUX_KERNEL_INTREE_DTS_NAME and BR2_LINUX_KERNEL_CUSTOM_DTS_PATH are empty.

Quoted 19 lines

This is similar to the patch you submitted for
BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE and _SCRIPT: they only need to be removed if the corresponding _SOURCE config is not set.

Regards,
Arnout

Quoted 11 lines
Quoted 11 lines

Regards,
Arnout

Quoted 5 lines
utils/genrandconfig +2 -0
+            configlines.remove('BR2_LINUX_KERNEL_CUIMAGE=y\n')
+            configlines.append('BR2_LINUX_KERNEL_UIMAGE=y\n')
           if 'BR2_LINUX_KERNEL_SIMPLEIMAGE=y\n' in configlines:
               configlines.remove('BR2_LINUX_KERNEL_SIMPLEIMAGE=y\n')
               configlines.append('BR2_LINUX_KERNEL_VMLINUX=y\n')

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#5 lore raw
Quoted 39 lines · James Hilliard
Quoted 38 lines · Arnout Vandecappelle
Quoted 34 lines · James Hilliard
Quoted 32 lines · Arnout Vandecappelle
Quoted 17 lines · James Hilliard

If we don't have a DTS name or path we need to also disable cuimage to disable DTS support as BR2_LINUX_KERNEL_CUIMAGE requires DTS support.

Fixes:
linux/linux.mk:591: *** No kernel device tree source specified, check your BR2_LINUX_KERNEL_INTREE_DTS_NAME / BR2_LINUX_KERNEL_CUSTOM_DTS_PATH settings. Stop.

---
    utils/genrandconfig | 3 +++
    1 file changed, 3 insertions(+)
utils/genrandconfig +0 -0
index 70af84f002..b821e60114 100755

utils/genrandconfig def fixup_config(sysinfo, configfile): · line 384

Quoted 4 lines
utils/genrandconfig +1 -0
@@ -381,6 +381,9 @@ def fixup_config(sysinfo, configfile):
            if 'BR2_LINUX_KERNEL_APPENDED_ZIMAGE=y\n' in configlines:
                configlines.remove('BR2_LINUX_KERNEL_APPENDED_ZIMAGE=y\n')
                configlines.append('BR2_LINUX_KERNEL_ZIMAGE=y\n')
+        if 'BR2_LINUX_KERNEL_CUIMAGE=y\n' in configlines:

Similar to the previous patch (only fixup host uboot tools ...), should this
be done only if no DTS is given? I.e.:

if 'BR2_LINUX_KERNEL_CUIMAGE=y\n' in configlines and \
('BR2_LINUX_KERNEL_INTREE_DTS_NAME=""\n' in configlines or \
'BR2_LINUX_KERNEL_CUSTOM_DTS_PATH=""\n' in configlines):

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

Should be ok already due to parent match conditions covering the invalid case.

No, what I mean is: it is only needed to remove the line if DTS is not set. If
either DTS_NAME or DTS_PATH is set, there's no need to remove the CUIMAGE config.

Yes, that's exactly what this patch does AFAIU, see parent match conditions here:
https://github.com/buildroot/buildroot/blob/49f9a08223005584ca28c6f243ee5cb1d1e64f57/utils/genrandconfig#L377-L378

Argh, I just should believe you instead of thinking I know better...

Applied to master, thanks.

Regards,
Arnout

Quoted 24 lines

The BR2_LINUX_KERNEL_CUIMAGE removal only happens if both BR2_LINUX_KERNEL_INTREE_DTS_NAME and BR2_LINUX_KERNEL_CUSTOM_DTS_PATH are empty.

Quoted 19 lines

This is similar to the patch you submitted for
BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE and _SCRIPT: they only need to be removed if the corresponding _SOURCE config is not set.

Regards,
Arnout

Quoted 11 lines
Quoted 11 lines

Regards,
Arnout

Quoted 5 lines
utils/genrandconfig +2 -0
+            configlines.remove('BR2_LINUX_KERNEL_CUIMAGE=y\n')
+            configlines.append('BR2_LINUX_KERNEL_UIMAGE=y\n')
            if 'BR2_LINUX_KERNEL_SIMPLEIMAGE=y\n' in configlines:
                configlines.remove('BR2_LINUX_KERNEL_SIMPLEIMAGE=y\n')
                configlines.append('BR2_LINUX_KERNEL_VMLINUX=y\n')

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot