Skip to contentSkip to conversation

u-boot: switch from SPL/MLO to "ais" image for omapl138 SOCs

PATCH In review Denys Dmytriyenko 3 participants 6 messages Jun 26, 2014 – Jul 2, 2014

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 u-boot: switch from SPL/MLO to "ais" image for omapl138 SOCs

From: Denys Dmytriyenko <[email protected]>

---
 conf/machine/am180x-evm.conf         | 4 +++-
 recipes-bsp/u-boot/u-boot-ti.inc     | 4 ++--
 recipes-bsp/u-boot/u-boot_2014.07.bb | 3 +++
 3 files changed, 8 insertions(+), 3 deletions(-)
conf/machine/am180x-evm.conf +3 -1
index 3182e8a..f83814e 100644
@@ -5,7 +5,9 @@
 require conf/machine/include/davinci.inc
 require conf/machine/include/omapl138.inc
 
-UBOOT_MACHINE = "da850evm_config"
+UBOOT_MACHINE = "da850_am18xxevm_config"
+UBOOT_SUFFIX = "ais"
+
 UBOOT_ENTRYPOINT = "0xc0008000"
 UBOOT_LOADADDRESS = "0xc0008000"
 
recipes-bsp/u-boot/u-boot-ti.inc +2 -2
index c024e96..0cb53ea 100644
@@ -1,3 +1,5 @@
+UBOOT_SUFFIX ?= "img"
+
 require ${COREBASE}/meta/recipes-bsp/u-boot/u-boot.inc
 
 FILESEXTRAPATHS_prepend := "${THISDIR}/u-boot:"
@@ -14,8 +16,6 @@ PKG_${PN}-dbg = "u-boot-dbg"
 
 S = "${WORKDIR}/git"
 
-UBOOT_SUFFIX = "img"
-
 # SPL (Second Program Loader) to be loaded over UART
 SPL_UART_BINARY ?= ""
 SPL_UART_IMAGE ?= "${SPL_UART_BINARY}-${MACHINE}-${PV}-${PR}"
recipes-bsp/u-boot/u-boot_2014.07.bb +3 -0
index b326aa1..9da6f7d 100644
@@ -25,3 +25,6 @@ SRCREV = "76b21026ceb5a6a83fc53b0ecdf425f240318022"
 
 SPL_BINARY = "MLO"
 SPL_UART_BINARY = "u-boot-spl.bin"
+
+SPL_BINARY_omapl138 = ""
+SPL_UART_BINARY_omapl138 = ""
Signature · 1 line
2.0.0
#1 lore raw
Quoted 15 lines · Denys Dmytriyenko

From: Denys Dmytriyenko <[email protected]>

---
 conf/machine/am180x-evm.conf         | 4 +++-
 recipes-bsp/u-boot/u-boot-ti.inc     | 4 ++--
 recipes-bsp/u-boot/u-boot_2014.07.bb | 3 +++
 3 files changed, 8 insertions(+), 3 deletions(-)
conf/machine/am180x-evm.conf +0 -0
index 3182e8a..f83814e 100644

conf/machine/am180x-evm.conf line 12

Quoted 9 lines
conf/machine/am180x-evm.conf +3 -1
@@ -5,7 +5,9 @@
 require conf/machine/include/davinci.inc
 require conf/machine/include/omapl138.inc
 
-UBOOT_MACHINE = "da850evm_config"
+UBOOT_MACHINE = "da850_am18xxevm_config"
+UBOOT_SUFFIX = "ais"
+
 UBOOT_ENTRYPOINT = "0xc0008000"
 UBOOT_LOADADDRESS = "0xc0008000"

Since we've got ENTRYPOINT/LOADADDRESS in here which also are omapl138 rather than am180x specific, that's OK with me.

recipes-bsp/u-boot/u-boot-ti.inc line 3

Quoted 8 lines
recipes-bsp/u-boot/u-boot-ti.inc +2 -0
index c024e96..0cb53ea 100644
@@ -1,3 +1,5 @@
+UBOOT_SUFFIX ?= "img"
+
 require ${COREBASE}/meta/recipes-bsp/u-boot/u-boot.inc

This isn't completely safe, is it? The COREBASE version also has ?= for UBOOT_SUFFIX too. We need to either convince oe-core to use ??= or just populate our machine.conf/soc.inc files with UBOOT_SUFFIX.

Signature · 1 line
Tom
#2 lore raw
Quoted 29 lines · Tom Rini
Quoted 15 lines · Denys Dmytriyenko

From: Denys Dmytriyenko <[email protected]>

---
 conf/machine/am180x-evm.conf         | 4 +++-
 recipes-bsp/u-boot/u-boot-ti.inc     | 4 ++--
 recipes-bsp/u-boot/u-boot_2014.07.bb | 3 +++
 3 files changed, 8 insertions(+), 3 deletions(-)
conf/machine/am180x-evm.conf +0 -0
index 3182e8a..f83814e 100644

conf/machine/am180x-evm.conf line 12

Quoted 9 lines
conf/machine/am180x-evm.conf +3 -1
@@ -5,7 +5,9 @@
 require conf/machine/include/davinci.inc
 require conf/machine/include/omapl138.inc
 
-UBOOT_MACHINE = "da850evm_config"
+UBOOT_MACHINE = "da850_am18xxevm_config"
+UBOOT_SUFFIX = "ais"
+
 UBOOT_ENTRYPOINT = "0xc0008000"
 UBOOT_LOADADDRESS = "0xc0008000"

Since we've got ENTRYPOINT/LOADADDRESS in here which also are omapl138 rather than am180x specific, that's OK with me.

Quoted 12 lines

recipes-bsp/u-boot/u-boot-ti.inc line 3

Quoted 8 lines
recipes-bsp/u-boot/u-boot-ti.inc +2 -0
index c024e96..0cb53ea 100644
@@ -1,3 +1,5 @@
+UBOOT_SUFFIX ?= "img"
+
 require ${COREBASE}/meta/recipes-bsp/u-boot/u-boot.inc

This isn't completely safe, is it? The COREBASE version also has ?= for UBOOT_SUFFIX too. We need to either convince oe-core to use ??= or just populate our machine.conf/soc.inc files with UBOOT_SUFFIX.

That's why I moved it before require COREBASE, as otherwise it will be set there...

So, if machine defines own UBOOT_SUFFIX, our .inc won't overwrite it and COREBASE version won't either. If machine doesn't define one, we set it to "img" here. And for recipes not using our version of .inc, it will be set to "bin" in COREBASE .inc

Signature · 1 line
Denys
#3 lore raw
Quoted 43 lines · Denys Dmytriyenko
Quoted 29 lines · Tom Rini
Quoted 15 lines · Denys Dmytriyenko

From: Denys Dmytriyenko <[email protected]>

---
 conf/machine/am180x-evm.conf         | 4 +++-
 recipes-bsp/u-boot/u-boot-ti.inc     | 4 ++--
 recipes-bsp/u-boot/u-boot_2014.07.bb | 3 +++
 3 files changed, 8 insertions(+), 3 deletions(-)
conf/machine/am180x-evm.conf +0 -0
index 3182e8a..f83814e 100644

conf/machine/am180x-evm.conf line 12

Quoted 9 lines
conf/machine/am180x-evm.conf +3 -1
@@ -5,7 +5,9 @@
 require conf/machine/include/davinci.inc
 require conf/machine/include/omapl138.inc
 
-UBOOT_MACHINE = "da850evm_config"
+UBOOT_MACHINE = "da850_am18xxevm_config"
+UBOOT_SUFFIX = "ais"
+
 UBOOT_ENTRYPOINT = "0xc0008000"
 UBOOT_LOADADDRESS = "0xc0008000"

Since we've got ENTRYPOINT/LOADADDRESS in here which also are omapl138 rather than am180x specific, that's OK with me.

Quoted 12 lines

recipes-bsp/u-boot/u-boot-ti.inc line 3

Quoted 8 lines
recipes-bsp/u-boot/u-boot-ti.inc +2 -0
index c024e96..0cb53ea 100644
@@ -1,3 +1,5 @@
+UBOOT_SUFFIX ?= "img"
+
 require ${COREBASE}/meta/recipes-bsp/u-boot/u-boot.inc

This isn't completely safe, is it? The COREBASE version also has ?= for UBOOT_SUFFIX too. We need to either convince oe-core to use ??= or just populate our machine.conf/soc.inc files with UBOOT_SUFFIX.

Quoted 7 lines

That's why I moved it before require COREBASE, as otherwise it will be set there...

So, if machine defines own UBOOT_SUFFIX, our .inc won't overwrite it and COREBASE version won't either. If machine doesn't define one, we set it to "img" here. And for recipes not using our version of .inc, it will be set to "bin" in COREBASE .inc

I would have sworn the reason ??= was added was that what you describe isn't always safe even if it looks like it should be, in all cases. If you're sure it's fine, OK.

Signature · 1 line
Tom
#4 lore raw
Quoted 47 lines · Tom Rini
Quoted 46 lines · Denys Dmytriyenko
Quoted 29 lines · Tom Rini
Quoted 15 lines · Denys Dmytriyenko

From: Denys Dmytriyenko <[email protected]>

---
 conf/machine/am180x-evm.conf         | 4 +++-
 recipes-bsp/u-boot/u-boot-ti.inc     | 4 ++--
 recipes-bsp/u-boot/u-boot_2014.07.bb | 3 +++
 3 files changed, 8 insertions(+), 3 deletions(-)
conf/machine/am180x-evm.conf +0 -0
index 3182e8a..f83814e 100644

conf/machine/am180x-evm.conf line 12

Quoted 9 lines
conf/machine/am180x-evm.conf +3 -1
@@ -5,7 +5,9 @@
 require conf/machine/include/davinci.inc
 require conf/machine/include/omapl138.inc
 
-UBOOT_MACHINE = "da850evm_config"
+UBOOT_MACHINE = "da850_am18xxevm_config"
+UBOOT_SUFFIX = "ais"
+
 UBOOT_ENTRYPOINT = "0xc0008000"
 UBOOT_LOADADDRESS = "0xc0008000"

Since we've got ENTRYPOINT/LOADADDRESS in here which also are omapl138 rather than am180x specific, that's OK with me.

Quoted 12 lines

recipes-bsp/u-boot/u-boot-ti.inc line 3

Quoted 8 lines
recipes-bsp/u-boot/u-boot-ti.inc +2 -0
index c024e96..0cb53ea 100644
@@ -1,3 +1,5 @@
+UBOOT_SUFFIX ?= "img"
+
 require ${COREBASE}/meta/recipes-bsp/u-boot/u-boot.inc

This isn't completely safe, is it? The COREBASE version also has ?= for UBOOT_SUFFIX too. We need to either convince oe-core to use ??= or just populate our machine.conf/soc.inc files with UBOOT_SUFFIX.

That's why I moved it before require COREBASE, as otherwise it will be set there...

Quoted 8 lines
Quoted 4 lines

So, if machine defines own UBOOT_SUFFIX, our .inc won't overwrite it and COREBASE version won't either. If machine doesn't define one, we set it to "img" here. And for recipes not using our version of .inc, it will be set to "bin" in COREBASE .inc

I would have sworn the reason ??= was added was that what you describe isn't always safe even if it looks like it should be, in all cases. If you're sure it's fine, OK.

Well, I think it may be unsafe when it cannot immediately evaluate the variable, which is not the case here. I did some more testing and seems to work. I guess long-term plan should be to populate all our machines with UBOOT_SUFFIX, then.

Signature · 1 line
Denys
#5 lore raw
Quoted 53 lines · Denys Dmytriyenko
Quoted 52 lines · Tom Rini
Quoted 50 lines · Denys Dmytriyenko
Quoted 29 lines · Tom Rini
Quoted 15 lines · Denys Dmytriyenko

From: Denys Dmytriyenko <[email protected]>

---
 conf/machine/am180x-evm.conf         | 4 +++-
 recipes-bsp/u-boot/u-boot-ti.inc     | 4 ++--
 recipes-bsp/u-boot/u-boot_2014.07.bb | 3 +++
 3 files changed, 8 insertions(+), 3 deletions(-)
conf/machine/am180x-evm.conf +0 -0
index 3182e8a..f83814e 100644

conf/machine/am180x-evm.conf line 12

Quoted 9 lines
conf/machine/am180x-evm.conf +3 -1
@@ -5,7 +5,9 @@
 require conf/machine/include/davinci.inc
 require conf/machine/include/omapl138.inc
 
-UBOOT_MACHINE = "da850evm_config"
+UBOOT_MACHINE = "da850_am18xxevm_config"
+UBOOT_SUFFIX = "ais"
+
 UBOOT_ENTRYPOINT = "0xc0008000"
 UBOOT_LOADADDRESS = "0xc0008000"

Since we've got ENTRYPOINT/LOADADDRESS in here which also are omapl138 rather than am180x specific, that's OK with me.

Quoted 12 lines

recipes-bsp/u-boot/u-boot-ti.inc line 3

Quoted 8 lines
recipes-bsp/u-boot/u-boot-ti.inc +2 -0
index c024e96..0cb53ea 100644
@@ -1,3 +1,5 @@
+UBOOT_SUFFIX ?= "img"
+
 require ${COREBASE}/meta/recipes-bsp/u-boot/u-boot.inc

This isn't completely safe, is it? The COREBASE version also has ?= for UBOOT_SUFFIX too. We need to either convince oe-core to use ??= or just populate our machine.conf/soc.inc files with UBOOT_SUFFIX.

That's why I moved it before require COREBASE, as otherwise it will be set there...

So, if machine defines own UBOOT_SUFFIX, our .inc won't overwrite it and COREBASE version won't either. If machine doesn't define one, we set it to "img" here. And for recipes not using our version of .inc, it will be set to "bin" in COREBASE .inc

Quoted 8 lines
Quoted 3 lines

I would have sworn the reason ??= was added was that what you describe isn't always safe even if it looks like it should be, in all cases. If you're sure it's fine, OK.

Well, I think it may be unsafe when it cannot immediately evaluate the variable, which is not the case here. I did some more testing and seems to work. I guess long-term plan should be to populate all our machines with UBOOT_SUFFIX, then.

Sounds good to me, thanks!

Signature · 1 line
Tom