diff options
3 files changed, 89 insertions, 0 deletions
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 0000000000..fbc0f5a18e --- /dev/null +++ b/meta-oe/recipes-bsp/dediprog-flasher/dediprog-flasher/0001-add-support-for-cross-compilation.patch | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | Author: Maciej Pijanowski <maciej.pijanowski@3mdeb.com> | ||
| 2 | Date: Fri Jul 5 16:39:13 2024 +0200 | ||
| 3 | Upstream-Status: Submitted [https://github.com/DediProgSW/SF100Linux/pull/86] | ||
| 4 | |||
| 5 | Makefile: allow overriding CC | ||
| 6 | |||
| 7 | Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com> | ||
| 8 | |||
| 9 | diff --git a/Makefile b/Makefile | ||
| 10 | index 139e5c0c3c3c..226303a6921e 100644 | ||
| 11 | --- a/Makefile | ||
| 12 | +++ b/Makefile | ||
| 13 | @@ -12,7 +12,7 @@ endif | ||
| 14 | endif | ||
| 15 | |||
| 16 | PROGRAM = dpcmd | ||
| 17 | -CC = gcc | ||
| 18 | +CC ?= gcc | ||
| 19 | PREFIX ?= /usr/local | ||
| 20 | |||
| 21 | 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 0000000000..0fc8ac5bd2 --- /dev/null +++ b/meta-oe/recipes-bsp/dediprog-flasher/dediprog-flasher/0002-Makefile-add-conditional-stripping.patch | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | From dac9d0ea5c419049c9ab0a5ba90d15d77a3271b0 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Tymoteusz Burak <tymoteusz.burak@3mdeb.com> | ||
| 3 | Date: Mon, 22 Jul 2024 13:02:59 +0000 | ||
| 4 | Subject: [PATCH] Makefile: add conditional stripping | ||
| 5 | Upstream-Status: Submitted [https://github.com/DediProgSW/SF100Linux/pull/88] | ||
| 6 | |||
| 7 | This patch introduces a `NOSTRIP` conditional flag to the `install` | ||
| 8 | target in the Makefile. The purpose of this flag is to allow the | ||
| 9 | disabling of binary stripping during installation. This is | ||
| 10 | particularly useful in development environments, such as BitBake, | ||
| 11 | which handle stripping internally. | ||
| 12 | |||
| 13 | When `NOSTRIP` is set to `1`, the `strip` command will be skipped | ||
| 14 | during the installation process, preventing potential conflicts or | ||
| 15 | redundant operations. | ||
| 16 | |||
| 17 | Signed-off-by: Tymoteusz Burak <tymoteusz.burak@3mdeb.com> | ||
| 18 | |||
| 19 | --- | ||
| 20 | Makefile | 2 ++ | ||
| 21 | 1 file changed, 2 insertions(+) | ||
| 22 | |||
| 23 | diff --git a/Makefile b/Makefile | ||
| 24 | index 139e5c0..8b33320 100644 | ||
| 25 | --- a/Makefile | ||
| 26 | +++ b/Makefile | ||
| 27 | @@ -58,7 +58,9 @@ install: $(PROGRAM) | ||
| 28 | [ $(shell id -u) -eq 0 ] || (echo "Error: install needs root privileges" && false) | ||
| 29 | install -v -o 0 -g 0 -m 755 -d $(DESTDIR)$(PREFIX)/bin $(DESTDIR)$(PREFIX)/share/DediProg | ||
| 30 | echo -n "install: " && install -v -o 0 -g 0 -m 0755 $(PROGRAM) $(DESTDIR)$(PREFIX)/bin/$(PROGRAM) | ||
| 31 | +ifneq ($(NOSTRIP),1) | ||
| 32 | strip $(DESTDIR)$(PREFIX)/bin/$(PROGRAM) | ||
| 33 | +endif | ||
| 34 | install -v -o 0 -g 0 -m 755 -d $(DESTDIR)$(PREFIX)/share/DediProg | ||
| 35 | echo -n "install: " && install -v -o 0 -g 0 -m 0644 ChipInfoDb.dedicfg $(DESTDIR)$(PREFIX)/share/DediProg/ChipInfoDb.dedicfg | ||
| 36 | install -v -o 0 -g 0 -m 755 -d $(DESTDIR)/etc/udev/rules.d | ||
| 37 | -- | ||
| 38 | 2.30.2 | ||
| 39 | |||
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 0000000000..83a88ab75f --- /dev/null +++ b/meta-oe/recipes-bsp/dediprog-flasher/dediprog-flasher_1.14.20.bb | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | DESCRIPTION = "Linux software for Dediprog SF100 and SF600 SPI flash programmers" | ||
| 2 | SECTION = "devel" | ||
| 3 | LICENSE = "GPL-2.0-or-later" | ||
| 4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=a23a74b3f4caf9616230789d94217acb" | ||
| 5 | |||
| 6 | DEPENDS = "libusb" | ||
| 7 | |||
| 8 | SRCREV = "e691f2d432144e3dbc82e9e0eea1ebaed4f3becf" | ||
| 9 | SRC_URI = " \ | ||
| 10 | git://github.com/DediProgSW/SF100Linux.git;protocol=https;branch=master \ | ||
| 11 | file://0001-add-support-for-cross-compilation.patch \ | ||
| 12 | file://0002-Makefile-add-conditional-stripping.patch \ | ||
| 13 | " | ||
| 14 | |||
| 15 | EXTRA_OEMAKE = "NOSTRIP=1" | ||
| 16 | |||
| 17 | PV = "1.0+${SRCPV}" | ||
| 18 | |||
| 19 | S = "${WORKDIR}/git" | ||
| 20 | |||
| 21 | do_install () { | ||
| 22 | oe_runmake DESTDIR=${D} PREFIX=/usr install | ||
| 23 | } | ||
| 24 | |||
| 25 | FILES:${PN} += " \ | ||
| 26 | ${datadir}/DediProg \ | ||
| 27 | " | ||
| 28 | |||
| 29 | inherit pkgconfig | ||
