Skip to contentSkip to conversation

dediprog-flasher: enable native builds

PATCH Superseded [email protected] 2 participants 4 messages May 13, 2025

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dediprog-flasher: enable native builds

From: Denis Mukhin <[email protected]>

Update dediprog-flasher recipe to support native class variants.

---
 .../dediprog-flasher/dediprog-flasher_1.14.20.bb      | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
meta-oe/recipes-bsp/dediprog-flasher/dediprog-flasher_1.14.20.bb +8 -3
index 83a88ab75f..4c6d6bf6f1 100644
@@ -12,18 +12,23 @@ SRC_URI = " \
     file://0002-Makefile-add-conditional-stripping.patch \
     "
 
-EXTRA_OEMAKE = "NOSTRIP=1"
+EXTRA_OEMAKE = "NOSTRIP=1 DESTDIR=${D} PREFIX=${prefix}"
 
 PV = "1.0+${SRCPV}"
 
 S = "${WORKDIR}/git"
 
-do_install () {
-    oe_runmake DESTDIR=${D} PREFIX=/usr install
+do_install() {
+    oe_runmake install
 }
 
+# NB: /etc/udev/rules.d is packaged outside of ${prefix}
 FILES:${PN} += " \
+    /etc/udev \
+    ${bindir} \
     ${datadir}/DediProg \
 "
 
 inherit pkgconfig
+
+BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.34.1
#1 lore raw
Quoted 24 lines · On Mon, May 12, 2025 at 11:04 PM <[email protected]> wrote:

From: Denis Mukhin <[email protected]>

Update dediprog-flasher recipe to support native class variants.

---
 .../dediprog-flasher/dediprog-flasher_1.14.20.bb      | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
meta-oe/recipes-bsp/dediprog-flasher/dediprog-flasher_1.14.20.bb +1 -1
index 83a88ab75f..4c6d6bf6f1 100644
@@ -12,18 +12,23 @@ SRC_URI = " \
     file://0002-Makefile-add-conditional-stripping.patch \
     "
 
-EXTRA_OEMAKE = "NOSTRIP=1"
+EXTRA_OEMAKE = "NOSTRIP=1 DESTDIR=${D} PREFIX=${prefix}"
 
 PV = "1.0+${SRCPV}"
 
 S = "${WORKDIR}/git"

meta-oe/recipes-bsp/dediprog-flasher/dediprog-flasher_1.14.20.bb SRC_URI = " \ · line 27

Quoted 10 lines
meta-oe/recipes-bsp/dediprog-flasher/dediprog-flasher_1.14.20.bb +4 -2
 
-do_install () {
-    oe_runmake DESTDIR=${D} PREFIX=/usr install
+do_install() {
+    oe_runmake install
 }
 
+# NB: /etc/udev/rules.d is packaged outside of ${prefix}
 FILES:${PN} += " \
+    /etc/udev \

Please use ${sysconfdir} here instead of hardcoding /etc

Quoted 11 lines
meta-oe/recipes-bsp/dediprog-flasher/dediprog-flasher_1.14.20.bb +3 -1
+    ${bindir} \
     ${datadir}/DediProg \
 "
 
 inherit pkgconfig
+
+BBCLASSEXTEND = "native nativesdk"
--

2.34.1

#2 lore raw
Quoted 32 lines · Khem Raj
Quoted 31 lines · On Mon, May 12, 2025 at 11:04 PM <[email protected]> wrote:

From: Denis Mukhin <[email protected]>

Update dediprog-flasher recipe to support native class variants.

---
 .../dediprog-flasher/dediprog-flasher_1.14.20.bb      | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
meta-oe/recipes-bsp/dediprog-flasher/dediprog-flasher_1.14.20.bb +3 -3
index 83a88ab75f..4c6d6bf6f1 100644
@@ -12,18 +12,23 @@ SRC_URI = " \
     file://0002-Makefile-add-conditional-stripping.patch \
     "
 
-EXTRA_OEMAKE = "NOSTRIP=1"
+EXTRA_OEMAKE = "NOSTRIP=1 DESTDIR=${D} PREFIX=${prefix}"
 
 PV = "1.0+${SRCPV}"
 
 S = "${WORKDIR}/git"
 
-do_install () {
-    oe_runmake DESTDIR=${D} PREFIX=/usr install
+do_install() {
+    oe_runmake install
 }
 
Quoted 5 lines

meta-oe/recipes-bsp/dediprog-flasher/dediprog-flasher_1.14.20.bb SRC_URI = " \ · line 27

Quoted 3 lines
meta-oe/recipes-bsp/dediprog-flasher/dediprog-flasher_1.14.20.bb +2 -0
+# NB: /etc/udev/rules.d is packaged outside of ${prefix}
 FILES:${PN} += " \
+    /etc/udev \

Please use ${sysconfdir} here instead of hardcoding /etc

nativesdk variant of sysconfdir expands to something like:
sysconfdir="/usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-mysdk-linux/etc"
where
prefix="/usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-mysdk-linux"

dediprog build installs USB udev rules into the host's environment
/etc/udev/rules.d
i.e. packages udev rules outside of ${prefix}.
So in this case /etc/udev should be open-coded, which is not ideal.

I can expand the comment before FILES:${PN} to explain that better. Will that work?

Quoted 12 lines
Quoted 12 lines
meta-oe/recipes-bsp/dediprog-flasher/dediprog-flasher_1.14.20.bb +3 -1
+    ${bindir} \
     ${datadir}/DediProg \
 "
 
 inherit pkgconfig
+
+BBCLASSEXTEND = "native nativesdk"
--

2.34.1

#3 lore raw
Quoted 40 lines · On Tue, May 13, 2025 at 2:21 PM <[email protected]> wrote:
Quoted 32 lines · Khem Raj
Quoted 31 lines · On Mon, May 12, 2025 at 11:04 PM <[email protected]> wrote:

From: Denis Mukhin <[email protected]>

Update dediprog-flasher recipe to support native class variants.

---
 .../dediprog-flasher/dediprog-flasher_1.14.20.bb      | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
meta-oe/recipes-bsp/dediprog-flasher/dediprog-flasher_1.14.20.bb +3 -3
index 83a88ab75f..4c6d6bf6f1 100644
@@ -12,18 +12,23 @@ SRC_URI = " \
     file://0002-Makefile-add-conditional-stripping.patch \
     "
 
-EXTRA_OEMAKE = "NOSTRIP=1"
+EXTRA_OEMAKE = "NOSTRIP=1 DESTDIR=${D} PREFIX=${prefix}"
 
 PV = "1.0+${SRCPV}"
 
 S = "${WORKDIR}/git"
 
-do_install () {
-    oe_runmake DESTDIR=${D} PREFIX=/usr install
+do_install() {
+    oe_runmake install
 }
 
Quoted 5 lines

meta-oe/recipes-bsp/dediprog-flasher/dediprog-flasher_1.14.20.bb SRC_URI = " \ · line 27

Quoted 3 lines
meta-oe/recipes-bsp/dediprog-flasher/dediprog-flasher_1.14.20.bb +2 -0
+# NB: /etc/udev/rules.d is packaged outside of ${prefix}
 FILES:${PN} += " \
+    /etc/udev \

Please use ${sysconfdir} here instead of hardcoding /etc

Quoted 7 lines

nativesdk variant of sysconfdir expands to something like:
sysconfdir="/usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-mysdk-linux/etc"
where
prefix="/usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-mysdk-linux"

dediprog build installs USB udev rules into the host's environment
/etc/udev/rules.d

i think its not a good idea to inject things into the host environment. This can alter
the behaviour of SDK host which is not desired. Is there any other way for it to register with udev ?

Quoted 19 lines

i.e. packages udev rules outside of ${prefix}.
So in this case /etc/udev should be open-coded, which is not ideal.

I can expand the comment before FILES:${PN} to explain that better. Will that work?

Quoted 12 lines
Quoted 12 lines
meta-oe/recipes-bsp/dediprog-flasher/dediprog-flasher_1.14.20.bb +3 -1
+    ${bindir} \
     ${datadir}/DediProg \
 "
 
 inherit pkgconfig
+
+BBCLASSEXTEND = "native nativesdk"
--

2.34.1