Move all to deprecated folder.

This commit is contained in:
2016-11-16 21:57:57 +01:00
parent 01738a7684
commit 05de7d6c04
9777 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
From 1d8cb0ad54099c3d7261aaa19a2c0786f16736d0 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Sat, 8 Aug 2015 22:42:39 +0200
Subject: [PATCH] Add missing header for musl compatibility
<linux/ioctl.h> is needed to get the definition of _IOC_SIZEBITS and
solve the following build failure:
src/spi.c: In function 'spi_transfer':
src/spi.c:100:24: error: '_IOC_SIZEBITS' undeclared (first use in this function)
if (ioctl(spi->fd, SPI_IOC_MESSAGE(1), &spi_xfer) < 1)
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
src/spi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/spi.c b/src/spi.c
index 52a8d3d..1a6b17c 100644
--- a/src/spi.c
+++ b/src/spi.c
@@ -16,6 +16,7 @@
#include <errno.h>
#include <sys/ioctl.h>
+#include <linux/ioctl.h>
#include <linux/spi/spidev.h>
#include "spi.h"
--
2.5.0

View File

@@ -0,0 +1,70 @@
From 295316c3f44c3e779e85d7453424496a3bb4bc48 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Sat, 8 Aug 2015 22:56:09 +0200
Subject: [PATCH] Fix build on SPARC
On SPARC, the definitions of B2500000, B3000000, B3500000 and B4000000
are not necessarily available, so use those values only if defined in
the kernel headers.
It fixes SPARC build failures such as:
src/serial.c: In function '_serial_baudrate_to_bits':
src/serial.c:73:30: error: 'B2500000' undeclared (first use in this function)
case 2500000: return B2500000;
^
src/serial.c:73:30: note: each undeclared identifier is reported only once for each function it appears in
src/serial.c:74:30: error: 'B3000000' undeclared (first use in this function)
case 3000000: return B3000000;
^
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
src/serial.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/src/serial.c b/src/serial.c
index e385309..efd425e 100644
--- a/src/serial.c
+++ b/src/serial.c
@@ -70,10 +70,18 @@ static int _serial_baudrate_to_bits(uint32_t baudrate) {
case 1152000: return B1152000;
case 1500000: return B1500000;
case 2000000: return B2000000;
+#ifdef B2500000
case 2500000: return B2500000;
+#endif
+#ifdef B3000000
case 3000000: return B3000000;
+#endif
+#ifdef B3500000
case 3500000: return B3500000;
+#endif
+#ifdef B4000000
case 4000000: return B4000000;
+#endif
default: return -1;
}
}
@@ -107,10 +115,18 @@ static int _serial_bits_to_baudrate(uint32_t bits) {
case B1152000: return 1152000;
case B1500000: return 1500000;
case B2000000: return 2000000;
+#ifdef B2500000
case B2500000: return 2500000;
+#endif
+#ifdef B3000000
case B3000000: return 3000000;
+#endif
+#ifdef B3500000
case B3500000: return 3500000;
+#endif
+#ifdef B4000000
case B4000000: return 4000000;
+#endif
default: return -1;
}
}
--
2.5.0

View File

@@ -0,0 +1,16 @@
config BR2_PACKAGE_C_PERIPHERY
bool "c-periphery"
help
c-periphery is a set of C wrapper functions for GPIO, SPI,
I2C, MMIO, and Serial peripheral I/O interface access in
userspace Linux. The c-periphery wrappers simplify and
consolidate the native Linux APIs to these
interfaces. c-periphery is useful in embedded Linux
environments (including BeagleBone, Raspberry Pi,
etc. platforms) for interfacing with external
peripherals. c-periphery is re-entrant, uses static
allocations, has no dependencies outside the standard C
library and Linux, compiles into a static library for easy
integration with other projects, and is MIT licensed.
https://github.com/vsergeev/c-periphery

View File

@@ -0,0 +1,27 @@
################################################################################
#
# c-periphery
#
################################################################################
C_PERIPHERY_VERSION = v1.0.3
C_PERIPHERY_SITE = $(call github,vsergeev,c-periphery,$(C_PERIPHERY_VERSION))
C_PERIPHERY_INSTALL_STAGING = YES
# only a static library
C_PERIPHERY_INSTALL_TARGET = NO
C_PERIPHERY_LICENSE = MIT
C_PERIPHERY_LICENSE_FILES = LICENSE
define C_PERIPHERY_BUILD_CMDS
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)
endef
# There is no 'install' rule in the Makefile, so we handle things
# manually.
define C_PERIPHERY_INSTALL_STAGING_CMDS
$(INSTALL) -D -m 0644 $(@D)/periphery.a $(STAGING_DIR)/usr/lib/libc-periphery.a
mkdir -p $(STAGING_DIR)/usr/include/c-periphery/
cp -dpfr $(@D)/src/*.h $(STAGING_DIR)/usr/include/c-periphery/
endef
$(eval $(generic-package))