Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add: dfu-programmer #953

Merged
merged 4 commits into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions anda/system/dfu-programmer/anda.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
project pkg {
rpm {
spec = "dfu-programmer.spec"
}
}
16 changes: 16 additions & 0 deletions anda/system/dfu-programmer/dfu-programmer-c99.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Include <stdlib.h> for the malloc function.

Submitted upstream: <https://github.com/dfu-programmer/dfu-programmer/pull/76>

diff --git a/src/atmel.c b/src/atmel.c
index 4ea794d17f65d8d0..491bbb16706e65a8 100644
--- a/src/atmel.c
+++ b/src/atmel.c
@@ -19,6 +19,7 @@
*/

#include <stdio.h>
+#include <stdlib.h>
#include <stdarg.h>
#include <stdint.h>
#include <string.h>
37 changes: 37 additions & 0 deletions anda/system/dfu-programmer/dfu-programmer.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
Name: dfu-programmer
Version: 1.1.0
Release: 1%?dist
Summary: A Device Firmware Update based USB programmer for Atmel chips
License: GPL-2.0-or-later
URL: https://github.com/dfu-programmer/dfu-programmer
Source0: %url/archive/refs/tags/v%version.tar.gz
Patch0: dfu-programmer-c99.patch
BuildRequires: pkgconfig(libusb-1.0) >= 1.0.0
BuildRequires: make gcc autoconf automake

%description
A linux based command-line programmer for Atmel chips with a USB
bootloader supporting ISP. This is a mostly Device Firmware Update
(DFU) 1.0 compliant user-space application. Supports all DFU enabled
Atmel chips with USB support.

%prep
%autosetup -p1
touch ./ChangeLog
autoreconf -fiv

%build
%configure
%make_build

%install
%make_install

%files
%license COPYING
%doc AUTHORS ChangeLog NEWS README.md
%{_bindir}/%{name}
%{_mandir}/man1/%{name}.1*

%changelog
%autochangelog
1 change: 1 addition & 0 deletions anda/system/dfu-programmer/update.rhai
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rpm.version(gh("dfu-programmer/dfu-programmer"));
Loading