From eb6551740bf521bc0c5aa187324a5c23d7b48df2 Mon Sep 17 00:00:00 2001 From: Denis 'GNUtoo' Carikli Date: Sat, 15 Apr 2023 13:17:32 +0200 Subject: [PATCH v1] arduino-avr-core: Add arduino-ft232r support Signed-off-by: Denis 'GNUtoo' Carikli --- arduino-avr-core/trunk/PKGBUILD | 9 ++++++--- .../trunk/add-arduino_ft232r.patch | 19 +++++++++++++++++++ 2 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 arduino-avr-core/trunk/add-arduino_ft232r.patch diff --git a/arduino-avr-core/trunk/PKGBUILD b/arduino-avr-core/trunk/PKGBUILD index 8b0fc0acbe2c..52f07b3c5909 100644 --- a/arduino-avr-core/trunk/PKGBUILD +++ b/arduino-avr-core/trunk/PKGBUILD @@ -3,7 +3,7 @@ pkgname=arduino-avr-core pkgver=1.8.3 -pkgrel=2 +pkgrel=3 pkgdesc="Arduino AVR core with upstream avr-gcc and avrdude" arch=('any') url="https://github.com/arduino/ArduinoCore-avr" @@ -12,10 +12,12 @@ depends=('avrdude' 'avr-gcc' 'avr-libc') options=(!strip !emptydirs) source=("https://downloads.arduino.cc/cores/avr-${pkgver}.tar.bz2" "https://downloads.arduino.cc/cores/avr-${pkgver}.tar.bz2.asc" - "platform.patch") + "platform.patch" + "add-arduino_ft232r.patch") sha512sums=('c8a63ad79f16c380def83b1215762f5cbddfc51480d658853370c3210724bb04627272f3affc0ad01af4463a68980665a4e1c37cc8fabcec16e97c4550d1bb03' 'SKIP' - '916d76a1313fa9372e141eb132eb3d5d4db32e27f695d3b6b0e2894111bfdacd54feec2ba6ea89b10918b9ef904f9b3d4c105c37d5a6851ac92c5c1758679f00') + '916d76a1313fa9372e141eb132eb3d5d4db32e27f695d3b6b0e2894111bfdacd54feec2ba6ea89b10918b9ef904f9b3d4c105c37d5a6851ac92c5c1758679f00' + '18c5708c730b2f060533225b32cdbe263aa33d4868ec6495944b3899966c526f4421b8c5423e5d21852bc7f0c5968f451b541c27c92ce70ce530f254c6fa0289') validpgpkeys=('326567C1C6B288DF32CB061A95FA6F43E21188C4') # Arduino Packages prepare() @@ -26,6 +28,7 @@ prepare() # Update version in patchfile, then apply it sed -i "s/^ version=.*/ version=${pkgver}/" "${srcdir}/platform.patch" patch -Np1 -i "${srcdir}/platform.patch" + patch -Np1 -i "${srcdir}/add-arduino_ft232r.patch" # Remove elf files find . -name "*.elf" -type f -exec rm -f {} \; diff --git a/arduino-avr-core/trunk/add-arduino_ft232r.patch b/arduino-avr-core/trunk/add-arduino_ft232r.patch new file mode 100644 index 000000000000..8c2fe8a7055e --- /dev/null +++ b/arduino-avr-core/trunk/add-arduino_ft232r.patch @@ -0,0 +1,19 @@ +Index: avr/programmers.txt +=================================================================== +--- avr.orig/programmers.txt ++++ avr/programmers.txt +@@ -113,3 +113,14 @@ atmel_ice.protocol=atmelice_isp + atmel_ice.program.protocol=atmelice_isp + atmel_ice.program.tool=avrdude + atmel_ice.program.extra_params=-Pusb ++ ++# On some arduinos like the Arduino Duemillanove, there is an FT232R and an ++# unpopulated header connector on the PCB that can be used to reprogram the ++# atmega with a special cable that is easy to make, but in the upstream ++# arduino-avr-core, avrdude is compiled without libftdi support. ++arduino_ft232r.name=Arduino FT232R ++arduino_ft232r.communication=usb ++arduino_ft232r.protocol=arduino-ft232r ++arduino_ft232r.program.protocol=arduino-ft232r ++arduino_ft232r.program.tool=avrdude ++arduino_ft232r.program.extra_params= base-commit: 98e4e8df638e39f41816f3ca15feb974685ef1c0 -- 2.39.1