update buildroot to 2017.02.11
This commit is contained in:
@@ -0,0 +1,127 @@
|
||||
From 10d5bde8d628a93993dd7305dc9a406da69f65a9 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Seiderer <ps.report@gmx.net>
|
||||
Date: Wed, 2 Dec 2015 00:22:26 +0100
|
||||
Subject: [PATCH] Adjust for buildroot build.
|
||||
|
||||
- enable CC override
|
||||
- fix devLib/gpio include path for local build (without installing first)
|
||||
- change CFLAGS from '=' to '+=' to honour buildroot given flags
|
||||
- add linker name link for libwiringPiDev and libwiringPi for local linking
|
||||
(without installing first)
|
||||
- fix install linker name link (do not link with absolute path)
|
||||
- add gpio-static linking target
|
||||
|
||||
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
|
||||
---
|
||||
devLib/Makefile | 9 +++++----
|
||||
gpio/Makefile | 14 +++++++++-----
|
||||
wiringPi/Makefile | 7 ++++---
|
||||
3 files changed, 18 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/devLib/Makefile b/devLib/Makefile
|
||||
index 1b1ebe0..84b4d2a 100644
|
||||
--- a/devLib/Makefile
|
||||
+++ b/devLib/Makefile
|
||||
@@ -36,10 +36,10 @@ DYNAMIC=libwiringPiDev.so.$(VERSION)
|
||||
|
||||
#DEBUG = -g -O0
|
||||
DEBUG = -O2
|
||||
-CC = gcc
|
||||
-INCLUDE = -I.
|
||||
+CC ?= gcc
|
||||
+INCLUDE = -I../wiringPi
|
||||
DEFS = -D_GNU_SOURCE
|
||||
-CFLAGS = $(DEBUG) $(DEFS) -Wformat=2 -Wall -Winline $(INCLUDE) -pipe -fPIC
|
||||
+CFLAGS += $(DEBUG) $(DEFS) -Wformat=2 -Wall -Winline $(INCLUDE) -pipe -fPIC
|
||||
|
||||
LIBS =
|
||||
|
||||
@@ -69,6 +69,7 @@ $(STATIC): $(OBJ)
|
||||
$(DYNAMIC): $(OBJ)
|
||||
$Q echo "[Link (Dynamic)]"
|
||||
$Q $(CC) -shared -Wl,-soname,libwiringPiDev.so$(WIRINGPI_SONAME_SUFFIX) -o libwiringPiDev.so.$(VERSION) -lpthread $(OBJ)
|
||||
+ $Q ln -sf libwiringPiDev.so.$(VERSION) libwiringPiDev.so
|
||||
|
||||
.c.o:
|
||||
$Q echo [Compile] $<
|
||||
@@ -93,7 +94,7 @@ install: $(DYNAMIC)
|
||||
$Q echo "[Install Dynamic Lib]"
|
||||
$Q install -m 0755 -d $(DESTDIR)$(PREFIX)/lib
|
||||
$Q install -m 0755 libwiringPiDev.so.$(VERSION) $(DESTDIR)$(PREFIX)/lib/libwiringPiDev.so.$(VERSION)
|
||||
- $Q ln -sf $(DESTDIR)$(PREFIX)/lib/libwiringPiDev.so.$(VERSION) $(DESTDIR)/lib/libwiringPiDev.so
|
||||
+ $Q ln -sf libwiringPiDev.so.$(VERSION) $(DESTDIR)$(PREFIX)/lib/libwiringPiDev.so
|
||||
$Q $(LDCONFIG)
|
||||
|
||||
.PHONY: install-static
|
||||
diff --git a/gpio/Makefile b/gpio/Makefile
|
||||
index 7dcd090..dc4be72 100644
|
||||
--- a/gpio/Makefile
|
||||
+++ b/gpio/Makefile
|
||||
@@ -32,11 +32,11 @@ endif
|
||||
|
||||
#DEBUG = -g -O0
|
||||
DEBUG = -O2
|
||||
-CC = gcc
|
||||
-INCLUDE = -I$(DESTDIR)$(PREFIX)/include
|
||||
-CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
|
||||
+CC ?= gcc
|
||||
+INCLUDE = -I../wiringPi -I../devLib
|
||||
+CFLAGS += $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
|
||||
|
||||
-LDFLAGS = -L$(DESTDIR)$(PREFIX)/lib
|
||||
+LDFLAGS = -L../wiringPi -L../devLib
|
||||
LIBS = -lwiringPi -lwiringPiDev -lpthread
|
||||
|
||||
# May not need to alter anything below this line
|
||||
@@ -52,9 +52,13 @@ version.h: ../VERSION
|
||||
$Q echo Need to run newVersion above.
|
||||
|
||||
gpio: $(OBJ)
|
||||
- $Q echo [Link]
|
||||
+ $Q echo "[Link (Dynamic)]"
|
||||
$Q $(CC) -o $@ $(OBJ) $(LDFLAGS) $(LIBS)
|
||||
|
||||
+gpio-static: $(OBJ)
|
||||
+ $Q echo "[Link (Static)]"
|
||||
+ $Q $(CC) -static -o gpio $(OBJ) ../wiringPi/libwiringPi.a ../devLib/libwiringPiDev.a -lpthread
|
||||
+
|
||||
.c.o:
|
||||
$Q echo [Compile] $<
|
||||
$Q $(CC) -c $(CFLAGS) $< -o $@
|
||||
diff --git a/wiringPi/Makefile b/wiringPi/Makefile
|
||||
index acb6e58..8b84dc6 100644
|
||||
--- a/wiringPi/Makefile
|
||||
+++ b/wiringPi/Makefile
|
||||
@@ -36,10 +36,10 @@ DYNAMIC=libwiringPi.so.$(VERSION)
|
||||
|
||||
#DEBUG = -g -O0
|
||||
DEBUG = -O2
|
||||
-CC = gcc
|
||||
+CC ?= gcc
|
||||
INCLUDE = -I.
|
||||
DEFS = -D_GNU_SOURCE
|
||||
-CFLAGS = $(DEBUG) $(DEFS) -Wformat=2 -Wall -Winline $(INCLUDE) -pipe -fPIC
|
||||
+CFLAGS += $(DEBUG) $(DEFS) -Wformat=2 -Wall -Winline $(INCLUDE) -pipe -fPIC
|
||||
|
||||
LIBS =
|
||||
|
||||
@@ -90,6 +90,7 @@ $(STATIC): $(OBJ)
|
||||
$(DYNAMIC): $(OBJ)
|
||||
$Q echo "[Link (Dynamic)]"
|
||||
$Q $(CC) -shared -Wl,-soname,libwiringPi.so$(WIRINGPI_SONAME_SUFFIX) -o libwiringPi.so.$(VERSION) -lpthread $(OBJ)
|
||||
+ $Q ln -sf libwiringPi.so.$(VERSION) libwiringPi.so
|
||||
|
||||
.c.o:
|
||||
$Q echo [Compile] $<
|
||||
@@ -115,7 +116,7 @@ install: $(DYNAMIC)
|
||||
$Q echo "[Install Dynamic Lib]"
|
||||
$Q install -m 0755 -d $(DESTDIR)$(PREFIX)/lib
|
||||
$Q install -m 0755 libwiringPi.so.$(VERSION) $(DESTDIR)$(PREFIX)/lib/libwiringPi.so.$(VERSION)
|
||||
- $Q ln -sf $(DESTDIR)$(PREFIX)/lib/libwiringPi.so.$(VERSION) $(DESTDIR)/lib/libwiringPi.so
|
||||
+ $Q ln -sf libwiringPi.so.$(VERSION) $(DESTDIR)$(PREFIX)/lib/libwiringPi.so
|
||||
$Q $(LDCONFIG)
|
||||
|
||||
.PHONY: install-static
|
||||
--
|
||||
2.11.0
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
From 7f65eb37a82a6d9b095d9c8f262ad9dd205acd03 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sat, 30 Jan 2016 16:57:38 -0800
|
||||
Subject: [PATCH] include <asm/ioctl.h> directly for _IOC_SIZEBITS
|
||||
|
||||
Fixes errors like
|
||||
| wiringPiSPI.c: In function 'wiringPiSPIDataRW':
|
||||
| wiringPiSPI.c:89:35: error: '_IOC_SIZEBITS' undeclared (first use in
|
||||
this function)
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
[Patch from https://raw.githubusercontent.com/agherzan/meta-raspberrypi/master/recipes-devtools/wiringPi/wiringpi/0001-include-asm-ioctl.h-directly-for-_IOC_SIZEBITS.patch]
|
||||
Signed-off-by: Peter Seiderere <ps.report@gmx.net>
|
||||
---
|
||||
Upstream-Status: Submitted
|
||||
|
||||
wiringPi/wiringPi.c | 1 +
|
||||
wiringPi/wiringPiI2C.c | 1 +
|
||||
wiringPi/wiringPiSPI.c | 1 +
|
||||
3 files changed, 3 insertions(+)
|
||||
|
||||
diff --git a/wiringPi/wiringPi.c b/wiringPi/wiringPi.c
|
||||
index 32e5100..cb5db9d 100644
|
||||
--- a/wiringPi/wiringPi.c
|
||||
+++ b/wiringPi/wiringPi.c
|
||||
@@ -64,6 +64,7 @@
|
||||
#include <time.h>
|
||||
#include <fcntl.h>
|
||||
#include <pthread.h>
|
||||
+#include <asm/ioctl.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
diff --git a/wiringPi/wiringPiI2C.c b/wiringPi/wiringPiI2C.c
|
||||
index c787bce..efdf53c 100644
|
||||
--- a/wiringPi/wiringPiI2C.c
|
||||
+++ b/wiringPi/wiringPiI2C.c
|
||||
@@ -52,6 +52,7 @@
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/ioctl.h>
|
||||
+#include <asm/ioctl.h>
|
||||
|
||||
#include "wiringPi.h"
|
||||
#include "wiringPiI2C.h"
|
||||
diff --git a/wiringPi/wiringPiSPI.c b/wiringPi/wiringPiSPI.c
|
||||
index 453df31..ae3c7d9 100644
|
||||
--- a/wiringPi/wiringPiSPI.c
|
||||
+++ b/wiringPi/wiringPiSPI.c
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
+#include <asm/ioctl.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <linux/spi/spidev.h>
|
||||
|
||||
--
|
||||
2.7.0
|
||||
|
||||
12
bsp/buildroot-2017.02.11/package/wiringpi/Config.in
Normal file
12
bsp/buildroot-2017.02.11/package/wiringpi/Config.in
Normal file
@@ -0,0 +1,12 @@
|
||||
config BR2_PACKAGE_WIRINGPI
|
||||
bool "wiringpi"
|
||||
depends on BR2_USE_MMU # fork()
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
help
|
||||
wiringPi libraries (and gpio command)
|
||||
|
||||
http://wiringpi.com/
|
||||
|
||||
comment "wiringpi needs a toolchain w/ threads"
|
||||
depends on BR2_USE_MMU
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS
|
||||
2
bsp/buildroot-2017.02.11/package/wiringpi/wiringpi.hash
Normal file
2
bsp/buildroot-2017.02.11/package/wiringpi/wiringpi.hash
Normal file
@@ -0,0 +1,2 @@
|
||||
# locally computed
|
||||
sha256 0775e3bfa2df2131746c75d611ad354e5c884661be0d9de9fd786fc96f6ad918 wiringPi-2.32.tar.gz
|
||||
46
bsp/buildroot-2017.02.11/package/wiringpi/wiringpi.mk
Normal file
46
bsp/buildroot-2017.02.11/package/wiringpi/wiringpi.mk
Normal file
@@ -0,0 +1,46 @@
|
||||
################################################################################
|
||||
#
|
||||
# wiringpi
|
||||
#
|
||||
################################################################################
|
||||
|
||||
WIRINGPI_VERSION = 2.32
|
||||
WIRINGPI_SITE = git://git.drogon.net/wiringPi
|
||||
|
||||
WIRINGPI_LICENSE = LGPLv3+
|
||||
WIRINGPI_LICENSE_FILES = COPYING.LESSER
|
||||
WIRINGPI_INSTALL_STAGING = YES
|
||||
|
||||
ifeq ($(BR2_STATIC_LIBS),y)
|
||||
WIRINGPI_LIB_BUILD_TARGETS = static
|
||||
WIRINGPI_LIB_INSTALL_TARGETS = install-static
|
||||
WIRINGPI_BIN_BUILD_TARGETS = gpio-static
|
||||
else ifeq ($(BR2_SHARED_LIBS),y)
|
||||
WIRINGPI_LIB_BUILD_TARGETS = all
|
||||
WIRINGPI_LIB_INSTALL_TARGETS = install
|
||||
WIRINGPI_BIN_BUILD_TARGETS = all
|
||||
else
|
||||
WIRINGPI_LIB_BUILD_TARGETS = all static
|
||||
WIRINGPI_LIB_INSTALL_TARGETS = install install-static
|
||||
WIRINGPI_BIN_BUILD_TARGETS = all
|
||||
endif
|
||||
|
||||
define WIRINGPI_BUILD_CMDS
|
||||
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/wiringPi $(WIRINGPI_LIB_BUILD_TARGETS)
|
||||
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/devLib $(WIRINGPI_LIB_BUILD_TARGETS)
|
||||
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/gpio $(WIRINGPI_BIN_BUILD_TARGETS)
|
||||
endef
|
||||
|
||||
define WIRINGPI_INSTALL_STAGING_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/wiringPi $(WIRINGPI_LIB_INSTALL_TARGETS) DESTDIR=$(STAGING_DIR) PREFIX=/usr LDCONFIG=true
|
||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/devLib $(WIRINGPI_LIB_INSTALL_TARGETS) DESTDIR=$(STAGING_DIR) PREFIX=/usr LDCONFIG=true
|
||||
endef
|
||||
|
||||
define WIRINGPI_INSTALL_TARGET_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/wiringPi $(WIRINGPI_LIB_INSTALL_TARGETS) DESTDIR=$(TARGET_DIR) PREFIX=/usr LDCONFIG=true
|
||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/devLib $(WIRINGPI_LIB_INSTALL_TARGETS) DESTDIR=$(TARGET_DIR) PREFIX=/usr LDCONFIG=true
|
||||
$(INSTALL) -D -m 0755 $(@D)/gpio/gpio $(TARGET_DIR)/usr/bin/gpio
|
||||
$(INSTALL) -D -m 0755 $(@D)/gpio/pintest $(TARGET_DIR)/usr/bin/pintest
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
Reference in New Issue
Block a user