dediprog-flasher: enable native builds
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
@@ -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
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.
Signed-off-by Denis Mukhin <[email protected]>--- .../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@@ -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
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.
Signed-off-by Denis Mukhin <[email protected]>--- .../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@@ -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
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.
Signed-off-by Denis Mukhin <[email protected]>--- .../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@@ -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/udevshould 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