mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-28 13:46:32 +00:00
raspberrypi2: fixed RPi.GPIO wrong base address
This commit is contained in:
parent
32b8d23ee0
commit
4dbeb3740b
13
package/python-rpi-gpio/bcm2836-base-address._patch
Normal file
13
package/python-rpi-gpio/bcm2836-base-address._patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff -uNr RPi.GPIO-0.5.11/source/c_gpio.c RPi.GPIO-0.5.11.new/source/c_gpio.c
|
||||
--- RPi.GPIO-0.5.11/source/c_gpio.c 2015-02-16 00:21:57.000000000 +0200
|
||||
+++ RPi.GPIO-0.5.11.new/source/c_gpio.c 2015-10-11 20:02:47.729468438 +0300
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <sys/mman.h>
|
||||
#include "c_gpio.h"
|
||||
|
||||
-#define BCM2708_PERI_BASE_DEFAULT 0x20000000
|
||||
+#define BCM2708_PERI_BASE_DEFAULT 0x3f000000
|
||||
#define GPIO_BASE_OFFSET 0x200000
|
||||
#define FSEL_OFFSET 0 // 0x0000
|
||||
#define SET_OFFSET 7 // 0x001c / 4
|
||||
|
@ -9,5 +9,16 @@ PYTHON_RPI_GPIO_SOURCE = RPi.GPIO-$(PYTHON_RPI_GPIO_VERSION).tar.gz
|
||||
PYTHON_RPI_GPIO_SITE = http://pypi.python.org/packages/source/R/RPi.GPIO
|
||||
PYTHON_RPI_GPIO_SETUP_TYPE = distutils
|
||||
|
||||
BOARD = $(shell basename $(BASE_DIR))
|
||||
PYTHON_RPI_GPIO_PKG_DIR = $(TOPDIR)/package/python-rpi-gpio
|
||||
|
||||
define RPI2_BASE_ADDRESS_PATCH
|
||||
cd $(@D) && patch -p1 < $(PYTHON_RPI_GPIO_PKG_DIR)/bcm2836-base-address._patch
|
||||
endef
|
||||
|
||||
ifeq ($(BOARD), raspberrypi2)
|
||||
PYTHON_RPI_GPIO_POST_PATCH_HOOKS += RPI2_BASE_ADDRESS_PATCH
|
||||
endif
|
||||
|
||||
$(eval $(python-package))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user