summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartchus2018-12-24 14:57:49 +0100
committerMartchus2018-12-24 14:57:49 +0100
commite3c929ce90c2886c3f2e3c13538be96304f60e43 (patch)
tree78d5bfdabcc2be45b2ed32f332e36eb35b997d03
parent9ce3e872c10c81a070f6a76ea4d03908606cb52c (diff)
downloadaur-e3c929ce90c2886c3f2e3c13538be96304f60e43.tar.gz
Rebase patches
-rw-r--r--.SRCINFO14
-rw-r--r--0001-Allow-to-adjust-build-directory.patch6
-rw-r--r--0002-Cast-pointer-to-uintptr_t-instead-of-uint32_t.patch51
-rw-r--r--0002-Update-help-text-for-default-DMA.patch (renamed from 0003-Update-help-text-for-default-DMA.patch)6
-rw-r--r--0003-Adjust-LED-defs.patch27
-rw-r--r--0004-Read-CPU-revision-from-proc-device-tree-on-arm64-clo.patch79
-rw-r--r--PKGBUILD16
7 files changed, 46 insertions, 153 deletions
diff --git a/.SRCINFO b/.SRCINFO
index bc86c8a949c7..3d026dd31d8f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = rpi_ws281x-git
pkgdesc = Userspace Raspberry Pi PWM library for WS281X LEDs
- pkgver = 173.e4a05d6
+ pkgver = 182.14aacad
pkgrel = 1
url = https://github.com/jgarff/rpi_ws281x
arch = armv6h
@@ -13,14 +13,12 @@ pkgbase = rpi_ws281x-git
conflicts = rpi_ws281x
source = rpi_ws281x::git://github.com/jgarff/rpi_ws281x.git
source = 0001-Allow-to-adjust-build-directory.patch
- source = 0002-Cast-pointer-to-uintptr_t-instead-of-uint32_t.patch
- source = 0003-Update-help-text-for-default-DMA.patch
- source = 0004-Read-CPU-revision-from-proc-device-tree-on-arm64-clo.patch
+ source = 0002-Update-help-text-for-default-DMA.patch
+ source = 0003-Adjust-LED-defs.patch
sha256sums = SKIP
- sha256sums = d98ae1d48bc78e78da9488e1519b3751c1a91311fa4f054714f199aa82084436
- sha256sums = 3013ee02539e3d6120ae8c66db6dfff88ddf79ef38bc7badd11ff87ec2015ef7
- sha256sums = 4b14dceb422e48036367db0bbcb5fe8152e2b58b2fc213c31775c160512ee45b
- sha256sums = f1fac8430be31860324cb14b047182f88d4ab59b7bc186d16c0a782a68b54966
+ sha256sums = 26119114589fc5aef067fd1de99b532c27416642aeab9ad1150dcc5badc95b59
+ sha256sums = 2ca78207da848ac22d7c791c564988c9a0a0c407c710fe9540ac57a580c5df1c
+ sha256sums = daaa7f46c988b7b37f5528361648ff2d830d3b929f0be032a9fdc4a751b9829e
pkgname = rpi_ws281x-git
diff --git a/0001-Allow-to-adjust-build-directory.patch b/0001-Allow-to-adjust-build-directory.patch
index e37acdf434d7..f18116c2ff0b 100644
--- a/0001-Allow-to-adjust-build-directory.patch
+++ b/0001-Allow-to-adjust-build-directory.patch
@@ -1,7 +1,7 @@
-From 5291f6a3694f8622c5548a93b4e3ce65261fd9fc Mon Sep 17 00:00:00 2001
+From 4f4d7b74391db1cdec6b32d085090a9c6a8d4cad Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Thu, 1 Nov 2018 04:58:01 +0000
-Subject: [PATCH 1/5] Allow to adjust build directory
+Subject: [PATCH 1/3] Allow to adjust build directory
---
SConstruct | 3 ++-
@@ -20,5 +20,5 @@ index 64c14c7..16ac279 100644
+SConscript('SConscript', variant_dir=GetOption('build'), duplicate=0);
--
-2.19.1
+2.20.1
diff --git a/0002-Cast-pointer-to-uintptr_t-instead-of-uint32_t.patch b/0002-Cast-pointer-to-uintptr_t-instead-of-uint32_t.patch
deleted file mode 100644
index 515673aa08ba..000000000000
--- a/0002-Cast-pointer-to-uintptr_t-instead-of-uint32_t.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From a4c6fc90385b6be5cab7d9b70d234ebeef87a8cf Mon Sep 17 00:00:00 2001
-From: Martchus <martchus@gmx.net>
-Date: Thu, 1 Nov 2018 04:59:59 +0000
-Subject: [PATCH 2/5] Cast pointer to uintptr_t instead of uint32_t
-
-For compatibility with aarch64
----
- mailbox.c | 4 ++--
- ws2811.c | 4 ++--
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/mailbox.c b/mailbox.c
-index f42e04a..23f7d5a 100644
---- a/mailbox.c
-+++ b/mailbox.c
-@@ -67,8 +67,8 @@ void *mapmem(uint32_t base, uint32_t size, const char *mem_dev) {
- }
-
- void *unmapmem(void *addr, uint32_t size) {
-- uint32_t pagemask = ~0UL ^ (getpagesize() - 1);
-- uint32_t baseaddr = (uint32_t)addr & pagemask;
-+ uintptr_t pagemask = ~0UL ^ (getpagesize() - 1);
-+ uintptr_t baseaddr = (uintptr_t)addr & pagemask;
- int s;
-
- s = munmap((void *)baseaddr, size);
-diff --git a/ws2811.c b/ws2811.c
-index 6ac82bf..63e50fe 100644
---- a/ws2811.c
-+++ b/ws2811.c
-@@ -392,7 +392,7 @@ static int setup_pwm(ws2811_t *ws2811)
-
- dma_cb->source_ad = addr_to_bus(device, device->pxl_raw);
-
-- dma_cb->dest_ad = (uint32_t)&((pwm_t *)PWM_PERIPH_PHYS)->fif1;
-+ dma_cb->dest_ad = (uintptr_t)&((pwm_t *)PWM_PERIPH_PHYS)->fif1;
- dma_cb->txfr_len = byte_count;
- dma_cb->stride = 0;
- dma_cb->nextconbk = 0;
-@@ -457,7 +457,7 @@ static int setup_pcm(ws2811_t *ws2811)
- RPI_DMA_TI_SRC_INC; // Increment src addr
-
- dma_cb->source_ad = addr_to_bus(device, device->pxl_raw);
-- dma_cb->dest_ad = (uint32_t)&((pcm_t *)PCM_PERIPH_PHYS)->fifo;
-+ dma_cb->dest_ad = (uintptr_t)&((pcm_t *)PCM_PERIPH_PHYS)->fifo;
- dma_cb->txfr_len = byte_count;
- dma_cb->stride = 0;
- dma_cb->nextconbk = 0;
---
-2.19.1
-
diff --git a/0003-Update-help-text-for-default-DMA.patch b/0002-Update-help-text-for-default-DMA.patch
index 8a418ce59ef6..e9ddbe7dd840 100644
--- a/0003-Update-help-text-for-default-DMA.patch
+++ b/0002-Update-help-text-for-default-DMA.patch
@@ -1,7 +1,7 @@
-From aef253cb667e4cc7352a3a8be8caafb8d4afd25e Mon Sep 17 00:00:00 2001
+From 4bba7f43328617ae742ed342e16d9fc5d8f1e0fe Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Thu, 1 Nov 2018 05:02:52 +0000
-Subject: [PATCH 3/5] Update help text for default DMA
+Subject: [PATCH 2/3] Update help text for default DMA
---
main.c | 2 +-
@@ -21,5 +21,5 @@ index 85ecd67..f88414a 100644
" If omitted, default is 18 (PWM0)\n"
"-i (--invert) - invert pin output (pulse LOW)\n"
--
-2.19.1
+2.20.1
diff --git a/0003-Adjust-LED-defs.patch b/0003-Adjust-LED-defs.patch
new file mode 100644
index 000000000000..b5222ba622e1
--- /dev/null
+++ b/0003-Adjust-LED-defs.patch
@@ -0,0 +1,27 @@
+From c5f98979c69d1bfbe1bba5349103d8872499dee8 Mon Sep 17 00:00:00 2001
+From: Martchus <martchus@gmx.net>
+Date: Thu, 1 Nov 2018 05:05:06 +0000
+Subject: [PATCH 3/3] Adjust LED defs
+
+---
+ main.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/main.c b/main.c
+index f88414a..d15a06c 100644
+--- a/main.c
++++ b/main.c
+@@ -63,8 +63,8 @@ static char VERSION[] = "XX.YY.ZZ";
+ #define STRIP_TYPE WS2811_STRIP_GBR // WS2812/SK6812RGB integrated chip+leds
+ //#define STRIP_TYPE SK6812_STRIP_RGBW // SK6812RGBW (NOT SK6812RGB)
+
+-#define WIDTH 8
+-#define HEIGHT 8
++#define WIDTH (24 + 16 + 6 + 1)
++#define HEIGHT 1
+ #define LED_COUNT (WIDTH * HEIGHT)
+
+ int width = WIDTH;
+--
+2.20.1
+
diff --git a/0004-Read-CPU-revision-from-proc-device-tree-on-arm64-clo.patch b/0004-Read-CPU-revision-from-proc-device-tree-on-arm64-clo.patch
deleted file mode 100644
index aa6b24e8bbff..000000000000
--- a/0004-Read-CPU-revision-from-proc-device-tree-on-arm64-clo.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-From 8863b65325b1669dcf46310d5d4e8a57fa9d0823 Mon Sep 17 00:00:00 2001
-From: James Lu <james@overdrivenetworks.com>
-Date: Sun, 26 Aug 2018 19:38:53 -0700
-Subject: [PATCH 4/5] Read CPU revision from /proc/device-tree on arm64 (closes
- #289)
-
----
- rpihw.c | 32 +++++++++++++++++++++++++++++---
- 1 file changed, 29 insertions(+), 3 deletions(-)
-
-diff --git a/rpihw.c b/rpihw.c
-index a0df569..d825970 100644
---- a/rpihw.c
-+++ b/rpihw.c
-@@ -33,6 +33,7 @@
- #include <string.h>
- #include <stdlib.h>
- #include <errno.h>
-+#include <byteswap.h>
-
- #include "rpihw.h"
-
-@@ -324,9 +325,34 @@ static const rpi_hw_t rpi_hw_info[] = {
-
- const rpi_hw_t *rpi_hw_detect(void)
- {
-+ const rpi_hw_t *result = NULL;
-+#ifdef __aarch64__
-+ // On ARM64, read revision from /proc/device-tree as it is not shown in
-+ // /proc/cpuinfo
-+ FILE *f = fopen("/proc/device-tree/system/linux,revision", "r");
-+ if (!f)
-+ {
-+ return NULL;
-+ }
-+ uint32_t rev;
-+ fread(&rev, sizeof(uint32_t), 1, f);
-+ #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
-+ rev = bswap_32(rev); // linux,revision appears to be in big endian
-+ #endif
-+
-+ for (unsigned i = 0; i < (sizeof(rpi_hw_info) / sizeof(rpi_hw_info[0])); i++)
-+ {
-+ uint32_t hwver = rpi_hw_info[i].hwver;
-+ if (rev == hwver)
-+ {
-+ result = &rpi_hw_info[i];
-+
-+ goto done;
-+ }
-+ }
-+#else
- FILE *f = fopen("/proc/cpuinfo", "r");
- char line[LINE_WIDTH_MAX];
-- const rpi_hw_t *result = NULL;
-
- if (!f)
- {
-@@ -361,7 +387,7 @@ const rpi_hw_t *rpi_hw_detect(void)
- // Take out warranty and manufacturer bits
- hwver &= ~(RPI_WARRANTY_MASK | RPI_MANUFACTURER_MASK);
- rev &= ~(RPI_WARRANTY_MASK | RPI_MANUFACTURER_MASK);
--
-+
- if (rev == hwver)
- {
- result = &rpi_hw_info[i];
-@@ -371,7 +397,7 @@ const rpi_hw_t *rpi_hw_detect(void)
- }
- }
- }
--
-+#endif
- done:
- fclose(f);
-
---
-2.19.1
-
diff --git a/PKGBUILD b/PKGBUILD
index 06a3145ba4f1..f1ae7313b643 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,7 +6,7 @@
_reponame=rpi_ws281x
pkgname=rpi_ws281x-git
_name=${pkgname%-git}
-pkgver=173.e4a05d6
+pkgver=182.14aacad
pkgrel=1
arch=('armv6h' 'armv7h' 'aarch64')
pkgdesc='Userspace Raspberry Pi PWM library for WS281X LEDs'
@@ -17,15 +17,13 @@ provides=("${_name}")
conflicts=("${_name}")
url="https://github.com/jgarff/${_reponame}"
source=("${_reponame}::git://github.com/jgarff/${_reponame}.git"
- 0001-Allow-to-adjust-build-directory.patch
- 0002-Cast-pointer-to-uintptr_t-instead-of-uint32_t.patch
- 0003-Update-help-text-for-default-DMA.patch
- 0004-Read-CPU-revision-from-proc-device-tree-on-arm64-clo.patch)
+ '0001-Allow-to-adjust-build-directory.patch'
+ '0002-Update-help-text-for-default-DMA.patch'
+ '0003-Adjust-LED-defs.patch')
sha256sums=('SKIP'
- 'd98ae1d48bc78e78da9488e1519b3751c1a91311fa4f054714f199aa82084436'
- '3013ee02539e3d6120ae8c66db6dfff88ddf79ef38bc7badd11ff87ec2015ef7'
- '4b14dceb422e48036367db0bbcb5fe8152e2b58b2fc213c31775c160512ee45b'
- 'f1fac8430be31860324cb14b047182f88d4ab59b7bc186d16c0a782a68b54966')
+ '26119114589fc5aef067fd1de99b532c27416642aeab9ad1150dcc5badc95b59'
+ '2ca78207da848ac22d7c791c564988c9a0a0c407c710fe9540ac57a580c5df1c'
+ 'daaa7f46c988b7b37f5528361648ff2d830d3b929f0be032a9fdc4a751b9829e')
prepare() {
cd "$srcdir/$_reponame"