Skip to contentSkip to conversation

conf: omap-a15: Fix parsing when KERNEL_DEVICETREE is not set

PATCH In review Joshua Watt 2 participants 4 messages Nov 7, 2022 – Nov 10, 2022 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 conf: omap-a15: Fix parsing when KERNEL_DEVICETREE is not set

From: Zachary Booth <[email protected]>

Correctly handle parsing when KERNEL_DEVICETREE is not set.

---
 conf/machine/include/omap-a15.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
conf/machine/include/omap-a15.inc +1 -1
index 02225a4e..4f57e6d1 100644
@@ -19,7 +19,7 @@ UBOOT_ARCH = "arm"
 UBOOT_ENTRYPOINT = "0x80008000"
 UBOOT_LOADADDRESS = "0x80008000"
 
-DEVICETREE_FILE = "${@d.getVar('KERNEL_DEVICETREE').replace("ti/","")}"
+DEVICETREE_FILE = "${@(d.getVar('KERNEL_DEVICETREE') or "").replace("ti/","")}"
 
 # Generate an extlinux.conf file
 UBOOT_EXTLINUX = "1"
Signature · 1 line
2.33.0
#1 lore raw

I forgot to include it in the subject, but this is for the "dunfell" branch

Quoted 24 lines · Joshua Watt

From: Zachary Booth <[email protected]>

Correctly handle parsing when KERNEL_DEVICETREE is not set.

---
  conf/machine/include/omap-a15.inc | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
conf/machine/include/omap-a15.inc +1 -1
index 02225a4e..4f57e6d1 100644
@@ -19,7 +19,7 @@ UBOOT_ARCH = "arm"
  UBOOT_ENTRYPOINT = "0x80008000"
  UBOOT_LOADADDRESS = "0x80008000"
 
-DEVICETREE_FILE = "${@d.getVar('KERNEL_DEVICETREE').replace("ti/","")}"
+DEVICETREE_FILE = "${@(d.getVar('KERNEL_DEVICETREE') or "").replace("ti/","")}"
 
  # Generate an extlinux.conf file
  UBOOT_EXTLINUX = "1"
#2 lore raw
In reply to Joshua Watt
Quoted 16 lines · Joshua Watt

From: Zachary Booth <[email protected]>

Correctly handle parsing when KERNEL_DEVICETREE is not set.

---
  conf/machine/include/omap-a15.inc | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
conf/machine/include/omap-a15.inc +0 -0
index 02225a4e..4f57e6d1 100644

conf/machine/include/omap-a15.inc UBOOT_ARCH = "arm" · line 22

Quoted 5 lines
conf/machine/include/omap-a15.inc +1 -1
@@ -19,7 +19,7 @@ UBOOT_ARCH = "arm"
  UBOOT_ENTRYPOINT = "0x80008000"
  UBOOT_LOADADDRESS = "0x80008000"
 
-DEVICETREE_FILE = "${@d.getVar('KERNEL_DEVICETREE').replace("ti/","")}"
+DEVICETREE_FILE = "${@(d.getVar('KERNEL_DEVICETREE') or "").replace("ti/","")}"

What is the scenario that results in KERNEL_DEVICETREE not being set? I just checked all of the files in meta-ti that include omap-a15.inc and they all have the variable set.

Quoted 13 lines
conf/machine/include/omap-a15.inc +0 -1
  # Generate an extlinux.conf file
  UBOOT_EXTLINUX = "1"
 
 
 
-=-=-=-=-=-=-=-=-=-=-=-

Links: You receive all messages sent to this group.
View/Reply Online (#15332): https://lists.yoctoproject.org/g/meta-ti/message/15332
Mute This Topic: https://lists.yoctoproject.org/mt/94875941/6551054
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-ti/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 3 lines
Ryan Eatmon                [email protected]
-----------------------------------------
Texas Instruments, Inc.  -  LCPD  -  MGTS
#4 lore raw
In reply to a message not in the archive
Quoted 31 lines · Zachary
Quoted 23 lines · Ryan Eatmon

CAUTION - EXTERNAL EMAIL: Do not click any links or open any attachments unless you trust the sender and know the content is safe.

Quoted 19 lines · Joshua Watt

From: Zachary Booth <[email protected]>

Correctly handle parsing when KERNEL_DEVICETREE is not set.

---
   conf/machine/include/omap-a15.inc | 2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)
conf/machine/include/omap-a15.inc +0 -0
index 02225a4e..4f57e6d1 100644
@@ -19,7 +19,7 @@ UBOOT_ARCH = "arm"
   UBOOT_ENTRYPOINT = "0x80008000"
   UBOOT_LOADADDRESS = "0x80008000"
 
Quoted 6 lines

conf/machine/include/omap-a15.inc UBOOT_ARCH = "arm" · line 22

Quoted 2 lines
conf/machine/include/omap-a15.inc +1 -1
-DEVICETREE_FILE = "${@d.getVar('KERNEL_DEVICETREE').replace("ti/","")}"
+DEVICETREE_FILE = "${@(d.getVar('KERNEL_DEVICETREE') or "").replace("ti/","")}"

What is the scenario that results in KERNEL_DEVICETREE not being set? I just checked all of the files in meta-ti that include omap-a15.inc and they all have the variable set.

Quoted 4 lines

We have a custom machine inheriting omap-a15.inc that uses a separate provider for virtual/dtb. The dtb recipe is a thin wrapper around devicetree.bbclass and uses a custom variable instead of KERNEL_DEVICETREE.

This scenario doesn't use DEVICETREE_FILE, but fails parsing during variable expansion with .replace().

Thanks for explaining that. I'm working through the backlog and will disposition this soon.

Quoted 25 lines
Quoted 25 lines
Quoted 16 lines
conf/machine/include/omap-a15.inc +0 -1
   # Generate an extlinux.conf file
   UBOOT_EXTLINUX = "1"
 
 
 
-=-=-=-=-=-=-=-=-=-=-=-

Links: You receive all messages sent to this group. View/Reply Online (#15332):
https://urldefense.com/v3/__https://lists.yoctoproject.org/g/meta-ti/message/15332__;!!EJc4YC3iFmQ!SdpzhPqTkZXzwPNri5y_Eg83qQTCVgsStIOOUn2B5I073BB1z5daCsySyGG4_N4a7dChqDYuP5zz12ae$
Mute This Topic:
https://urldefense.com/v3/__https://lists.yoctoproject.org/mt/94875941/6551054__;!!EJc4YC3iFmQ!SdpzhPqTkZXzwPNri5y_Eg83qQTCVgsStIOOUn2B5I073BB1z5daCsySyGG4_N4a7dChqDYuP7GfleXS$
Group Owner: [email protected] Unsubscribe:

Quoted 4 lines
https://urldefense.com/v3/__https://lists.yoctoproject.org/g/meta-ti/unsub__;!!EJc4YC3iFmQ!SdpzhPqTkZXzwPNri5y_Eg83qQTCVgsStIOOUn2B5I073BB1z5daCsySyGG4_N4a7dChqDYuP-QKB7KP$  [r
[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

--
Ryan Eatmon [email protected]
-----------------------------------------
Texas Instruments, Inc. - LCPD - MGTS

Signature · 3 lines
Ryan Eatmon                [email protected]
-----------------------------------------
Texas Instruments, Inc.  -  LCPD  -  MGTS