mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-01-17 23:34:07 +00:00
Merge pull request #1145 from larsch/libbcm2835-1.42
libbcm2835 1.42, RPi2 support
This commit is contained in:
commit
57253a5801
2 changed files with 40 additions and 5 deletions
|
@ -1,18 +1,24 @@
|
|||
# Maintainer: <nico.nell@gmail.com>
|
||||
|
||||
buildarch=16
|
||||
buildarch=20
|
||||
|
||||
_pkgbasename=bcm2835
|
||||
pkgname=libbcm2835
|
||||
pkgver=1.37
|
||||
pkgver=1.42
|
||||
pkgrel=1
|
||||
pkgdesc="C library for Broadcom BCM 2835 as used in Raspberry Pi"
|
||||
url="http://www.airspayce.com/mikem/bcm2835/"
|
||||
arch=('armv6h')
|
||||
arch=('armv6h' 'armv7h')
|
||||
license=('GPL')
|
||||
options=('staticlibs')
|
||||
source=(http://www.airspayce.com/mikem/${_pkgbasename}/${_pkgbasename}-${pkgver}.tar.gz)
|
||||
md5sums=('2314bcbd2e1c6a164dbeda58abfb9c04')
|
||||
source=(http://www.airspayce.com/mikem/${_pkgbasename}/${_pkgbasename}-${pkgver}.tar.gz bcm2835.patch)
|
||||
md5sums=('3f60ac30ada6b8f7036243f13da441ba'
|
||||
'f38a6a1b15598d03c6e882b08c082afa')
|
||||
|
||||
prepare() {
|
||||
cd ${srcdir}/${_pkgbasename}-${pkgver}
|
||||
patch -p1 -i "$srcdir/bcm2835.patch"
|
||||
}
|
||||
|
||||
build() {
|
||||
cd ${srcdir}/${_pkgbasename}-${pkgver}
|
||||
|
|
29
alarm/libbcm2835/bcm2835.patch
Normal file
29
alarm/libbcm2835/bcm2835.patch
Normal file
|
@ -0,0 +1,29 @@
|
|||
diff -u -r bcm2835-1.42-orig/src/bcm2835.c bcm2835-1.42/src/bcm2835.c
|
||||
--- bcm2835-1.42-orig/src/bcm2835.c 2015-03-09 06:00:44.000000000 +0100
|
||||
+++ bcm2835-1.42/src/bcm2835.c 2015-03-22 19:29:37.531488655 +0100
|
||||
@@ -122,9 +122,9 @@
|
||||
uint32_t ret;
|
||||
#ifdef BCM2835_HAVE_DMB
|
||||
__asm__( "\
|
||||
- dmb \
|
||||
- ldr %[ret], [%[paddr]] \
|
||||
- dmb \
|
||||
+ dmb \n\
|
||||
+ ldr %[ret], [%[paddr]]\n\
|
||||
+ dmb \n\
|
||||
" : [ret] "=r" (ret) : [paddr] "r" (paddr) : "memory" );
|
||||
#else
|
||||
__asm__( "\
|
||||
@@ -176,9 +176,9 @@
|
||||
/* Following code provides memory barriers before and after the write */
|
||||
#ifdef BCM2835_HAVE_DMB
|
||||
__asm__( "\
|
||||
- dmb \
|
||||
- str %[value], [%[paddr]] \
|
||||
- dmb \
|
||||
+ dmb \n\
|
||||
+ str %[value], [%[paddr]]\n\
|
||||
+ dmb \n\
|
||||
" : : [paddr] "r" (paddr), [value] "r" (value) : "memory" );
|
||||
#else
|
||||
__asm__( "\
|
Loading…
Reference in a new issue