Skip to contentSkip to conversation

baremetal-helloworld: Fix install path since S doesnt have a trailing slash

PATCH In review Alejandro Hernandez Samaniego 4 participants 5 messages Oct 22, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 baremetal-helloworld: Fix install path since S doesnt have a trailing slash

---
 .../baremetal-examples/baremetal-helloworld_git.bb            | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta-skeleton/recipes-baremetal/baremetal-examples/baremetal-helloworld_git.bb +2 -2
index 7a580bd885..946a12d0a5 100644
@@ -40,8 +40,8 @@ EXTRA_OEMAKE_append = " QEMUARCH=${BAREMETAL_QEMUARCH} V=1"
 # Install binaries on the proper location for baremetal-image to fetch and deploy
 do_install(){
     install -d ${D}/${base_libdir}/firmware
-    install -m 755 ${B}build/hello_baremetal_${BAREMETAL_QEMUARCH}.bin ${D}/${base_libdir}/firmware/${BAREMETAL_BINNAME}.bin
-    install -m 755 ${B}build/hello_baremetal_${BAREMETAL_QEMUARCH}.elf ${D}/${base_libdir}/firmware/${BAREMETAL_BINNAME}.elf
+    install -m 755 ${B}/build/hello_baremetal_${BAREMETAL_QEMUARCH}.bin ${D}/${base_libdir}/firmware/${BAREMETAL_BINNAME}.bin
+    install -m 755 ${B}/build/hello_baremetal_${BAREMETAL_QEMUARCH}.elf ${D}/${base_libdir}/firmware/${BAREMETAL_BINNAME}.elf
 }
 
 FILES_${PN} += " \
Signature · 1 line
2.25.1
#1 lore raw

Hi Alejandro,

Quoted 10 lines · Alejandro Hernandez Samaniego
---
 .../baremetal-examples/baremetal-helloworld_git.bb            | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta-skeleton/recipes-baremetal/baremetal-examples/baremetal-helloworld_git.bb +0 -0
index 7a580bd885..946a12d0a5 100644

meta-skeleton/recipes-baremetal/baremetal-examples/baremetal-helloworld_git.bb EXTRA_OEMAKE_append = " QEMUARCH=${BAREMETAL_QEMUARCH} V=1" · line 44

Quoted 7 lines
meta-skeleton/recipes-baremetal/baremetal-examples/baremetal-helloworld_git.bb +2 -2
@@ -40,8 +40,8 @@ EXTRA_OEMAKE_append = " QEMUARCH=${BAREMETAL_QEMUARCH} V=1"
 # Install binaries on the proper location for baremetal-image to fetch and deploy
 do_install(){
     install -d ${D}/${base_libdir}/firmware
-    install -m 755 ${B}build/hello_baremetal_${BAREMETAL_QEMUARCH}.bin ${D}/${base_libdir}/firmware/${BAREMETAL_BINNAME}.bin
-    install -m 755 ${B}build/hello_baremetal_${BAREMETAL_QEMUARCH}.elf ${D}/${base_libdir}/firmware/${BAREMETAL_BINNAME}.elf
+    install -m 755 ${B}/build/hello_baremetal_${BAREMETAL_QEMUARCH}.bin ${D}/${base_libdir}/firmware/${BAREMETAL_BINNAME}.bin
+    install -m 755 ${B}/build/hello_baremetal_${BAREMETAL_QEMUARCH}.elf ${D}/${base_libdir}/firmware/${BAREMETAL_BINNAME}.elf

I'm almost certain do_install is being run under the ${B} directory by default:
https://docs.yoctoproject.org/ref-manual/ref-tasks.html#do-install

So I'd actually just remove ${B} (or ${B}/) from the path?

Quentin

#2 lore raw
Quoted 25 lines · Quentin Schulz

Hi Alejandro,

Quoted 10 lines · Alejandro Hernandez Samaniego
---
 .../baremetal-examples/baremetal-helloworld_git.bb            | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta-skeleton/recipes-baremetal/baremetal-examples/baremetal-helloworld_git.bb +0 -0
index 7a580bd885..946a12d0a5 100644

meta-skeleton/recipes-baremetal/baremetal-examples/baremetal-helloworld_git.bb EXTRA_OEMAKE_append = " QEMUARCH=${BAREMETAL_QEMUARCH} V=1" · line 44

Quoted 7 lines
meta-skeleton/recipes-baremetal/baremetal-examples/baremetal-helloworld_git.bb +2 -2
@@ -40,8 +40,8 @@ EXTRA_OEMAKE_append = " QEMUARCH=${BAREMETAL_QEMUARCH} V=1"
 # Install binaries on the proper location for baremetal-image to fetch and deploy
 do_install(){
     install -d ${D}/${base_libdir}/firmware
-    install -m 755 ${B}build/hello_baremetal_${BAREMETAL_QEMUARCH}.bin ${D}/${base_libdir}/firmware/${BAREMETAL_BINNAME}.bin
-    install -m 755 ${B}build/hello_baremetal_${BAREMETAL_QEMUARCH}.elf ${D}/${base_libdir}/firmware/${BAREMETAL_BINNAME}.elf
+    install -m 755 ${B}/build/hello_baremetal_${BAREMETAL_QEMUARCH}.bin ${D}/${base_libdir}/firmware/${BAREMETAL_BINNAME}.bin
+    install -m 755 ${B}/build/hello_baremetal_${BAREMETAL_QEMUARCH}.elf ${D}/${base_libdir}/firmware/${BAREMETAL_BINNAME}.elf

I'm almost certain do_install is being run under the ${B} directory by default:
https://docs.yoctoproject.org/ref-manual/ref-tasks.html#do-install

Quoted 1 line

So I'd actually just remove ${B} (or ${B}/) from the path?

Personally, I think it makes it more obvious what is going on...

Cheers,

Richard

#3 lore raw

Hey folks,

Quoted 40 lines · Richard Purdie
Quoted 3 lines · Quentin Schulz

Hi Alejandro,

On Thu, Oct 22, 2020 at 02:32:22AM -0600, Alejandro Hernandez Samaniego

Quoted 1 line · wrote:
Quoted 1 line
Signed-off-by Alejandro Enedino Hernandez Samaniego <

[email protected]>

Quoted 2 lines
Quoted 2 lines
---
 .../baremetal-examples/baremetal-helloworld_git.bb            | 4

++--

Quoted 3 lines

Review

Quoted 3 lines
 1 file changed, 2 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

baremetal-helloworld_git.bb b/meta-skeleton/recipes-baremetal/baremetal-examples/ baremetal-helloworld_git.bb

Quoted 2 lines
Quoted 2 lines

index 7a580bd885..946a12d0a5 100644
--- a/meta-skeleton/recipes-baremetal/baremetal-examples/

baremetal-helloworld_git.bb

Quoted 1 line
Quoted 1 line

+++ b/meta-skeleton/recipes-baremetal/baremetal-examples/

baremetal-helloworld_git.bb

Quoted 1 line

Review EXTRA_OEMAKE_append = "

Quoted 1 line
(quoted diff) +0 -0
@@ -40,8 +40,8 @@ EXTRA_OEMAKE_append = "

QEMUARCH=${BAREMETAL_QEMUARCH} V=1"

Quoted 1 line

Review EXTRA_OEMAKE_append = " · line 40

Quoted 1 line
(quoted diff) +0 -0
 # Install binaries on the proper location for baremetal-image to

fetch and deploy

Quoted 3 lines

meta-skeleton/recipes-baremetal/baremetal-examples/baremetal-helloworld_git.bb EXTRA_OEMAKE_append = " QEMUARCH=${BAREMETAL_QEMUARCH} V=1"

Quoted 3 lines
meta-skeleton/recipes-baremetal/baremetal-examples/baremetal-helloworld_git.bb +0 -1
 do_install(){
     install -d ${D}/${base_libdir}/firmware
-    install -m 755

${B}build/hello_baremetal_${BAREMETAL_QEMUARCH}.bin ${D}/${base_libdir}/firmware/${BAREMETAL_BINNAME}.bin

Quoted 1 line

Review EXTRA_OEMAKE_append = " · line 44

Quoted 1 line
(quoted diff) +0 -1
-    install -m 755

${B}build/hello_baremetal_${BAREMETAL_QEMUARCH}.elf ${D}/${base_libdir}/firmware/${BAREMETAL_BINNAME}.elf

Quoted 1 line

Review EXTRA_OEMAKE_append = " · line 43

Quoted 1 line
(quoted diff) +1 -0
+    install -m 755

${B}/build/hello_baremetal_${BAREMETAL_QEMUARCH}.bin ${D}/${base_libdir}/firmware/${BAREMETAL_BINNAME}.bin

Quoted 1 line

Review EXTRA_OEMAKE_append = " · line 44

Quoted 1 line
(quoted diff) +1 -0
+    install -m 755

${B}/build/hello_baremetal_${BAREMETAL_QEMUARCH}.elf ${D}/${base_libdir}/firmware/${BAREMETAL_BINNAME}.elf

Quoted 1 line
Quoted 8 lines
Quoted 5 lines

I'm almost certain do_install is being run under the ${B} directory by default:
https://docs.yoctoproject.org/ref-manual/ref-tasks.html#do-install

So I'd actually just remove ${B} (or ${B}/) from the path?

Personally, I think it makes it more obvious what is going on...

I think since this is in meta-skeleton and its meant to be instructive, I'd rather have it specifically call out what its doing.

Alejandro

Quoted 5 lines

Cheers,

Richard

#4 lore raw
In reply to Alejandro Hernandez Samaniego
Quoted 11 lines · Alejandro Hernandez Samaniego
---
 .../baremetal-examples/baremetal-helloworld_git.bb            | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta-skeleton/recipes-baremetal/baremetal-examples/baremetal-helloworld_git.bb +0 -0
index 7a580bd885..946a12d0a5 100644

meta-skeleton/recipes-baremetal/baremetal-examples/baremetal-helloworld_git.bb EXTRA_OEMAKE_append = " QEMUARCH=${BAREMETAL_QEMUARCH} V=1" · line 44

Quoted 7 lines
meta-skeleton/recipes-baremetal/baremetal-examples/baremetal-helloworld_git.bb +2 -2
@@ -40,8 +40,8 @@ EXTRA_OEMAKE_append = " QEMUARCH=${BAREMETAL_QEMUARCH} V=1"
 # Install binaries on the proper location for baremetal-image to fetch and deploy
 do_install(){
     install -d ${D}/${base_libdir}/firmware
-    install -m 755 ${B}build/hello_baremetal_${BAREMETAL_QEMUARCH}.bin ${D}/${base_libdir}/firmware/${BAREMETAL_BINNAME}.bin
-    install -m 755 ${B}build/hello_baremetal_${BAREMETAL_QEMUARCH}.elf ${D}/${base_libdir}/firmware/${BAREMETAL_BINNAME}.elf
+    install -m 755 ${B}/build/hello_baremetal_${BAREMETAL_QEMUARCH}.bin ${D}/${base_libdir}/firmware/${BAREMETAL_BINNAME}.bin
+    install -m 755 ${B}/build/hello_baremetal_${BAREMETAL_QEMUARCH}.elf ${D}/${base_libdir}/firmware/${BAREMETAL_BINNAME}.elf

The slashes between ${D} and ${base_libdir} could also be removed.

Quoted 9 lines
meta-skeleton/recipes-baremetal/baremetal-examples/baremetal-helloworld_git.bb +0 -1
 }
 
 FILES_${PN} += " \
--

2.25.1