Message ID | 20240722140209.1431735-2-tymoteusz.burak@3mdeb.com |
---|---|
State | Accepted |
Headers | show |
Series | [meta-oe,v2] dediprog-flasher: Add recipe | expand |
On Mon, Jul 22, 2024 at 7:02 AM Tymoteusz Burak <tymoteusz.burak@3mdeb.com> wrote: > This patch adds the dpcmd utility recipe. It provides software for > Dediprog SF100 and SF600 SPI flash programmers. > > Signed-off-by: Tymoteusz Burak <tymoteusz.burak@3mdeb.com> > CC: Khem Raj <raj.khem@gmail.com> > --- > ...01-add-support-for-cross-compilation.patch | 21 ++++++++++ > ...2-Makefile-add-conditional-stripping.patch | 39 +++++++++++++++++++ > .../dediprog-flasher_1.14.20.bb | 29 ++++++++++++++ > 3 files changed, 89 insertions(+) > create mode 100644 > meta-oe/recipes-bsp/dediprog-flasher/dediprog-flasher/0001-add-support-for-cross-compilation.patch > create mode 100644 > meta-oe/recipes-bsp/dediprog-flasher/dediprog-flasher/0002-Makefile-add-conditional-stripping.patch > create mode 100644 meta-oe/recipes-bsp/dediprog-flasher/ > dediprog-flasher_1.14.20.bb > > diff --git > a/meta-oe/recipes-bsp/dediprog-flasher/dediprog-flasher/0001-add-support-for-cross-compilation.patch > b/meta-oe/recipes-bsp/dediprog-flasher/dediprog-flasher/0001-add-support-for-cross-compilation.patch > new file mode 100644 > index 000000000000..fbc0f5a18e1d > --- /dev/null > +++ > b/meta-oe/recipes-bsp/dediprog-flasher/dediprog-flasher/0001-add-support-for-cross-compilation.patch > @@ -0,0 +1,21 @@ > +Author: Maciej Pijanowski <maciej.pijanowski@3mdeb.com> > +Date: Fri Jul 5 16:39:13 2024 +0200 > +Upstream-Status: Submitted [ > https://github.com/DediProgSW/SF100Linux/pull/86] > + > + Makefile: allow overriding CC > + > + Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com> > + > +diff --git a/Makefile b/Makefile > +index 139e5c0c3c3c..226303a6921e 100644 > +--- a/Makefile > ++++ b/Makefile > +@@ -12,7 +12,7 @@ endif > + endif > + > + PROGRAM = dpcmd > +-CC = gcc > ++CC ?= gcc > + PREFIX ?= /usr/local > + > + PKG_CONFIG ?= pkg-config > diff --git > a/meta-oe/recipes-bsp/dediprog-flasher/dediprog-flasher/0002-Makefile-add-conditional-stripping.patch > b/meta-oe/recipes-bsp/dediprog-flasher/dediprog-flasher/0002-Makefile-add-conditional-stripping.patch > new file mode 100644 > index 000000000000..0fc8ac5bd2ef > --- /dev/null > +++ > b/meta-oe/recipes-bsp/dediprog-flasher/dediprog-flasher/0002-Makefile-add-conditional-stripping.patch > @@ -0,0 +1,39 @@ > +From dac9d0ea5c419049c9ab0a5ba90d15d77a3271b0 Mon Sep 17 00:00:00 2001 > +From: Tymoteusz Burak <tymoteusz.burak@3mdeb.com> > +Date: Mon, 22 Jul 2024 13:02:59 +0000 > +Subject: [PATCH] Makefile: add conditional stripping > +Upstream-Status: Submitted [ > https://github.com/DediProgSW/SF100Linux/pull/88] > + > +This patch introduces a `NOSTRIP` conditional flag to the `install` > +target in the Makefile. The purpose of this flag is to allow the > +disabling of binary stripping during installation. This is > +particularly useful in development environments, such as BitBake, > +which handle stripping internally. > + > +When `NOSTRIP` is set to `1`, the `strip` command will be skipped > +during the installation process, preventing potential conflicts or > +redundant operations. > + > +Signed-off-by: Tymoteusz Burak <tymoteusz.burak@3mdeb.com> > + > +--- > + Makefile | 2 ++ > + 1 file changed, 2 insertions(+) > + > +diff --git a/Makefile b/Makefile > +index 139e5c0..8b33320 100644 > +--- a/Makefile > ++++ b/Makefile > +@@ -58,7 +58,9 @@ install: $(PROGRAM) > + [ $(shell id -u) -eq 0 ] || (echo "Error: install needs root > privileges" && false) > + install -v -o 0 -g 0 -m 755 -d $(DESTDIR)$(PREFIX)/bin > $(DESTDIR)$(PREFIX)/share/DediProg > + echo -n "install: " && install -v -o 0 -g 0 -m 0755 $(PROGRAM) > $(DESTDIR)$(PREFIX)/bin/$(PROGRAM) > ++ifneq ($(NOSTRIP),1) > + strip $(DESTDIR)$(PREFIX)/bin/$(PROGRAM) > ++endif > + install -v -o 0 -g 0 -m 755 -d $(DESTDIR)$(PREFIX)/share/DediProg > + echo -n "install: " && install -v -o 0 -g 0 -m 0644 > ChipInfoDb.dedicfg $(DESTDIR)$(PREFIX)/share/DediProg/ChipInfoDb.dedicfg > + install -v -o 0 -g 0 -m 755 -d $(DESTDIR)/etc/udev/rules.d > +-- > +2.30.2 > + > diff --git a/meta-oe/recipes-bsp/dediprog-flasher/ > dediprog-flasher_1.14.20.bb b/meta-oe/recipes-bsp/dediprog-flasher/ > dediprog-flasher_1.14.20.bb > new file mode 100644 > index 000000000000..83a88ab75f42 > --- /dev/null > +++ b/meta-oe/recipes-bsp/dediprog-flasher/dediprog-flasher_1.14.20.bb > @@ -0,0 +1,29 @@ > +DESCRIPTION = "Linux software for Dediprog SF100 and SF600 SPI flash > programmers" > +SECTION = "devel" > +LICENSE = "GPL-2.0-or-later" > +LIC_FILES_CHKSUM = "file://LICENSE;md5=a23a74b3f4caf9616230789d94217acb" > + > +DEPENDS = "libusb" > + > +SRCREV = "e691f2d432144e3dbc82e9e0eea1ebaed4f3becf" > +SRC_URI = " \ > + git:// > github.com/DediProgSW/SF100Linux.git;protocol=https;branch=master \ > + file://0001-add-support-for-cross-compilation.patch \ > + file://0002-Makefile-add-conditional-stripping.patch \ > + " > + > +EXTRA_OEMAKE = "NOSTRIP=1" > + > +PV = "1.0+${SRCPV}" Replace Srcpv Variable with git > > + > +S = "${WORKDIR}/git" > + > +do_install () { > + oe_runmake DESTDIR=${D} PREFIX=/usr install Replace hard coding /usr > > +} > + > +FILES:${PN} += " \ > + ${datadir}/DediProg \ > +" > + > +inherit pkgconfig > -- > 2.45.1 > >
diff --git a/meta-oe/recipes-bsp/dediprog-flasher/dediprog-flasher/0001-add-support-for-cross-compilation.patch b/meta-oe/recipes-bsp/dediprog-flasher/dediprog-flasher/0001-add-support-for-cross-compilation.patch new file mode 100644 index 000000000000..fbc0f5a18e1d --- /dev/null +++ b/meta-oe/recipes-bsp/dediprog-flasher/dediprog-flasher/0001-add-support-for-cross-compilation.patch @@ -0,0 +1,21 @@ +Author: Maciej Pijanowski <maciej.pijanowski@3mdeb.com> +Date: Fri Jul 5 16:39:13 2024 +0200 +Upstream-Status: Submitted [https://github.com/DediProgSW/SF100Linux/pull/86] + + Makefile: allow overriding CC + + Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com> + +diff --git a/Makefile b/Makefile +index 139e5c0c3c3c..226303a6921e 100644 +--- a/Makefile ++++ b/Makefile +@@ -12,7 +12,7 @@ endif + endif + + PROGRAM = dpcmd +-CC = gcc ++CC ?= gcc + PREFIX ?= /usr/local + + PKG_CONFIG ?= pkg-config diff --git a/meta-oe/recipes-bsp/dediprog-flasher/dediprog-flasher/0002-Makefile-add-conditional-stripping.patch b/meta-oe/recipes-bsp/dediprog-flasher/dediprog-flasher/0002-Makefile-add-conditional-stripping.patch new file mode 100644 index 000000000000..0fc8ac5bd2ef --- /dev/null +++ b/meta-oe/recipes-bsp/dediprog-flasher/dediprog-flasher/0002-Makefile-add-conditional-stripping.patch @@ -0,0 +1,39 @@ +From dac9d0ea5c419049c9ab0a5ba90d15d77a3271b0 Mon Sep 17 00:00:00 2001 +From: Tymoteusz Burak <tymoteusz.burak@3mdeb.com> +Date: Mon, 22 Jul 2024 13:02:59 +0000 +Subject: [PATCH] Makefile: add conditional stripping +Upstream-Status: Submitted [https://github.com/DediProgSW/SF100Linux/pull/88] + +This patch introduces a `NOSTRIP` conditional flag to the `install` +target in the Makefile. The purpose of this flag is to allow the +disabling of binary stripping during installation. This is +particularly useful in development environments, such as BitBake, +which handle stripping internally. + +When `NOSTRIP` is set to `1`, the `strip` command will be skipped +during the installation process, preventing potential conflicts or +redundant operations. + +Signed-off-by: Tymoteusz Burak <tymoteusz.burak@3mdeb.com> + +--- + Makefile | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/Makefile b/Makefile +index 139e5c0..8b33320 100644 +--- a/Makefile ++++ b/Makefile +@@ -58,7 +58,9 @@ install: $(PROGRAM) + [ $(shell id -u) -eq 0 ] || (echo "Error: install needs root privileges" && false) + install -v -o 0 -g 0 -m 755 -d $(DESTDIR)$(PREFIX)/bin $(DESTDIR)$(PREFIX)/share/DediProg + echo -n "install: " && install -v -o 0 -g 0 -m 0755 $(PROGRAM) $(DESTDIR)$(PREFIX)/bin/$(PROGRAM) ++ifneq ($(NOSTRIP),1) + strip $(DESTDIR)$(PREFIX)/bin/$(PROGRAM) ++endif + install -v -o 0 -g 0 -m 755 -d $(DESTDIR)$(PREFIX)/share/DediProg + echo -n "install: " && install -v -o 0 -g 0 -m 0644 ChipInfoDb.dedicfg $(DESTDIR)$(PREFIX)/share/DediProg/ChipInfoDb.dedicfg + install -v -o 0 -g 0 -m 755 -d $(DESTDIR)/etc/udev/rules.d +-- +2.30.2 + diff --git a/meta-oe/recipes-bsp/dediprog-flasher/dediprog-flasher_1.14.20.bb b/meta-oe/recipes-bsp/dediprog-flasher/dediprog-flasher_1.14.20.bb new file mode 100644 index 000000000000..83a88ab75f42 --- /dev/null +++ b/meta-oe/recipes-bsp/dediprog-flasher/dediprog-flasher_1.14.20.bb @@ -0,0 +1,29 @@ +DESCRIPTION = "Linux software for Dediprog SF100 and SF600 SPI flash programmers" +SECTION = "devel" +LICENSE = "GPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://LICENSE;md5=a23a74b3f4caf9616230789d94217acb" + +DEPENDS = "libusb" + +SRCREV = "e691f2d432144e3dbc82e9e0eea1ebaed4f3becf" +SRC_URI = " \ + git://github.com/DediProgSW/SF100Linux.git;protocol=https;branch=master \ + file://0001-add-support-for-cross-compilation.patch \ + file://0002-Makefile-add-conditional-stripping.patch \ + " + +EXTRA_OEMAKE = "NOSTRIP=1" + +PV = "1.0+${SRCPV}" + +S = "${WORKDIR}/git" + +do_install () { + oe_runmake DESTDIR=${D} PREFIX=/usr install +} + +FILES:${PN} += " \ + ${datadir}/DediProg \ +" + +inherit pkgconfig
This patch adds the dpcmd utility recipe. It provides software for Dediprog SF100 and SF600 SPI flash programmers. Signed-off-by: Tymoteusz Burak <tymoteusz.burak@3mdeb.com> CC: Khem Raj <raj.khem@gmail.com> --- ...01-add-support-for-cross-compilation.patch | 21 ++++++++++ ...2-Makefile-add-conditional-stripping.patch | 39 +++++++++++++++++++ .../dediprog-flasher_1.14.20.bb | 29 ++++++++++++++ 3 files changed, 89 insertions(+) create mode 100644 meta-oe/recipes-bsp/dediprog-flasher/dediprog-flasher/0001-add-support-for-cross-compilation.patch create mode 100644 meta-oe/recipes-bsp/dediprog-flasher/dediprog-flasher/0002-Makefile-add-conditional-stripping.patch create mode 100644 meta-oe/recipes-bsp/dediprog-flasher/dediprog-flasher_1.14.20.bb