update buildroot to 2017.02.11
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
[PATCH] backend/qcam.c: fix build on !x86
|
||||
|
||||
inb/outb/ioperm are x86 specific interfaces, so replace with noops on
|
||||
!x86.
|
||||
|
||||
Inspired by similar patch in openwrt:
|
||||
https://dev.openwrt.org/ticket/5689
|
||||
|
||||
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
|
||||
---
|
||||
backend/qcam.c | 14 +++++++++++++-
|
||||
1 file changed, 13 insertions(+), 1 deletion(-)
|
||||
|
||||
Index: sane-backends-1.0.22/backend/qcam.c
|
||||
===================================================================
|
||||
--- sane-backends-1.0.22.orig/backend/qcam.c
|
||||
+++ sane-backends-1.0.22/backend/qcam.c
|
||||
@@ -205,12 +205,20 @@
|
||||
|
||||
#endif /* <sys/io.h> || <asm/io.h> || <sys/hw.h> */
|
||||
|
||||
+/* inb / outb only exist on x86 */
|
||||
+#if defined(__i386__) || defined(__x86_64__)
|
||||
#define read_lpdata(d) inb ((d)->port)
|
||||
#define read_lpstatus(d) inb ((d)->port + 1)
|
||||
#define read_lpcontrol(d) inb ((d)->port + 2)
|
||||
#define write_lpdata(d,v) outb ((v), (d)->port)
|
||||
#define write_lpcontrol(d,v) outb ((v), (d)->port + 2)
|
||||
-
|
||||
+#else
|
||||
+#define read_lpdata(d) 0
|
||||
+#define read_lpstatus(d) 0
|
||||
+#define read_lpcontrol(d) 0
|
||||
+#define write_lpdata(d,v)
|
||||
+#define write_lpcontrol(d,v)
|
||||
+#endif
|
||||
|
||||
static SANE_Status
|
||||
enable_ports (QC_Device * q)
|
||||
@@ -219,8 +227,10 @@
|
||||
if (q->port < 0x278 || q->port > 0x3bc)
|
||||
return SANE_STATUS_INVAL;
|
||||
|
||||
+#if defined(__i386__) || defined(__x86_64__)
|
||||
if (ioperm (q->port, 3, 1) < 0)
|
||||
return SANE_STATUS_INVAL;
|
||||
+#endif
|
||||
|
||||
return SANE_STATUS_GOOD;
|
||||
}
|
||||
@@ -228,8 +238,10 @@
|
||||
static SANE_Status
|
||||
disable_ports (QC_Device * q)
|
||||
{
|
||||
+#if defined(__i386__) || defined(__x86_64__)
|
||||
if (ioperm (q->port, 3, 0) < 0)
|
||||
return SANE_STATUS_INVAL;
|
||||
+#endif
|
||||
|
||||
return SANE_STATUS_GOOD;
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
From d33f16f463e888846d69ddfbeeb963d40972b654 Mon Sep 17 00:00:00 2001
|
||||
From: Luiz Angelo Daros de Luca <luizluca@gmail.com>
|
||||
Date: Thu, 15 Oct 2015 12:35:00 +0900
|
||||
Subject: [PATCH] Add missing <sys/types.h> includes
|
||||
|
||||
[Thomas: backport from upstream commit
|
||||
33495ef9b42a783c8f5f2c056ac5699481d3cc7e, allows to fix the build with
|
||||
the musl C library.]
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
---
|
||||
backend/epsonds-io.c | 3 +++
|
||||
backend/hp5400.c | 3 +++
|
||||
backend/hp5590.c | 3 +++
|
||||
backend/kvs20xx_cmd.h | 4 ++++
|
||||
backend/kvs40xx.h | 3 +++
|
||||
include/sane/sanei_udp.h | 3 +++
|
||||
6 files changed, 19 insertions(+)
|
||||
|
||||
diff --git a/backend/epsonds-io.c b/backend/epsonds-io.c
|
||||
index 28bacfc..512997d 100644
|
||||
--- a/backend/epsonds-io.c
|
||||
+++ b/backend/epsonds-io.c
|
||||
@@ -16,6 +16,9 @@
|
||||
#include "sane/config.h"
|
||||
#include <ctype.h>
|
||||
#include <unistd.h> /* sleep */
|
||||
+#ifdef HAVE_SYS_TYPES_H
|
||||
+#include <sys/types.h>
|
||||
+#endif
|
||||
|
||||
#include "epsonds.h"
|
||||
#include "epsonds-io.h"
|
||||
diff --git a/backend/hp5400.c b/backend/hp5400.c
|
||||
index 61de3db..cfa2dc9 100644
|
||||
--- a/backend/hp5400.c
|
||||
+++ b/backend/hp5400.c
|
||||
@@ -67,6 +67,9 @@
|
||||
#include <stdlib.h> /* malloc, free */
|
||||
#include <string.h> /* memcpy */
|
||||
#include <stdio.h>
|
||||
+#ifdef HAVE_SYS_TYPES_H
|
||||
+#include <sys/types.h>
|
||||
+#endif
|
||||
|
||||
|
||||
#define HP5400_CONFIG_FILE "hp5400.conf"
|
||||
diff --git a/backend/hp5590.c b/backend/hp5590.c
|
||||
index 7b1cd60..5422372 100644
|
||||
--- a/backend/hp5590.c
|
||||
+++ b/backend/hp5590.c
|
||||
@@ -48,6 +48,9 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
+#ifdef HAVE_SYS_TYPES_H
|
||||
+#include <sys/types.h>
|
||||
+#endif
|
||||
|
||||
#include "../include/sane/sane.h"
|
||||
#define BACKEND_NAME hp5590
|
||||
diff --git a/backend/kvs20xx_cmd.h b/backend/kvs20xx_cmd.h
|
||||
index c18b754..4acaf62 100644
|
||||
--- a/backend/kvs20xx_cmd.h
|
||||
+++ b/backend/kvs20xx_cmd.h
|
||||
@@ -9,6 +9,10 @@
|
||||
Panasonic KV-S20xx USB-SCSI scanners.
|
||||
*/
|
||||
|
||||
+#ifdef HAVE_SYS_TYPES_H
|
||||
+#include <sys/types.h>
|
||||
+#endif
|
||||
+
|
||||
#define COMMAND_BLOCK 1
|
||||
#define DATA_BLOCK 2
|
||||
#define RESPONSE_BLOCK 3
|
||||
diff --git a/backend/kvs40xx.h b/backend/kvs40xx.h
|
||||
index fa17163..02e0da6 100644
|
||||
--- a/backend/kvs40xx.h
|
||||
+++ b/backend/kvs40xx.h
|
||||
@@ -10,6 +10,9 @@
|
||||
|
||||
#include "../include/sane/config.h"
|
||||
#include <semaphore.h>
|
||||
+#ifdef HAVE_SYS_TYPES_H
|
||||
+#include <sys/types.h>
|
||||
+#endif
|
||||
|
||||
#undef BACKEND_NAME
|
||||
#define BACKEND_NAME kvs40xx
|
||||
diff --git a/include/sane/sanei_udp.h b/include/sane/sanei_udp.h
|
||||
index c44afdd..e32fc1a 100644
|
||||
--- a/include/sane/sanei_udp.h
|
||||
+++ b/include/sane/sanei_udp.h
|
||||
@@ -27,6 +27,9 @@
|
||||
#include <netinet/in.h>
|
||||
#include <netdb.h>
|
||||
#endif
|
||||
+#ifdef HAVE_SYS_TYPES_H
|
||||
+#include <sys/types.h>
|
||||
+#endif
|
||||
|
||||
extern SANE_Status sanei_udp_open(const char *host, int port, int *fdp);
|
||||
extern SANE_Status sanei_udp_open_broadcast(int *fdp);
|
||||
--
|
||||
2.7.4
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
From 13aadf79659dd238b618c8be7c1de44960bd5d50 Mon Sep 17 00:00:00 2001
|
||||
From: Romain Naour <romain.naour@gmail.com>
|
||||
Date: Fri, 11 Nov 2016 22:20:03 +0100
|
||||
Subject: [PATCH] sane_backend: add missing config.h
|
||||
|
||||
We should include config.h from sanei_backend.h in order to use the
|
||||
correct if/else HAVE_FOO.
|
||||
|
||||
For some reason with Glibc or uClibc there is no problem but with musl
|
||||
we have the following weird issue:
|
||||
|
||||
In file included from epsonds.h:41:0,
|
||||
from epsonds-jpeg.c:18:
|
||||
../include/sane/sanei_backend.h:99:33: error: expected ';', identifier or '(' before 'int'
|
||||
# define sigset_t int
|
||||
^
|
||||
../include/sane/sanei_backend.h:99:33: warning: useless type name in empty declaration
|
||||
|
||||
That's because HAVE_SIGPROCMASK is not defined although it's correctly
|
||||
detected by the configure script.
|
||||
|
||||
$ grep config.log
|
||||
config.log:#define HAVE_SIGPROCMASK 1
|
||||
|
||||
So, include config.h to avoid to redefine sigset_t.
|
||||
|
||||
Fixes:
|
||||
http://autobuild.buildroot.net/results/9f1/9f1f1cb727b5c5407e69172280a3dee880e55cdf
|
||||
|
||||
Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
||||
---
|
||||
include/sane/sanei_backend.h | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/include/sane/sanei_backend.h b/include/sane/sanei_backend.h
|
||||
index 1b5afe2..2a96532 100644
|
||||
--- a/include/sane/sanei_backend.h
|
||||
+++ b/include/sane/sanei_backend.h
|
||||
@@ -8,6 +8,7 @@
|
||||
* @sa sanei.h sanei_thread.h
|
||||
*/
|
||||
|
||||
+#include "../include/sane/config.h"
|
||||
|
||||
/*
|
||||
* Compiler related options
|
||||
--
|
||||
2.5.5
|
||||
|
||||
16
bsp/buildroot-2017.02.11/package/sane-backends/Config.in
Normal file
16
bsp/buildroot-2017.02.11/package/sane-backends/Config.in
Normal file
@@ -0,0 +1,16 @@
|
||||
config BR2_PACKAGE_SANE_BACKENDS
|
||||
bool "sane-backends"
|
||||
depends on BR2_USE_MMU # fork()
|
||||
depends on !BR2_STATIC_LIBS
|
||||
help
|
||||
SANE - Scanner Access Now Easy
|
||||
|
||||
http://www.sane-project.org
|
||||
|
||||
Backends are included automatically based on the libraries that have
|
||||
been selected: libusb, jpeg, tiff, avahi (with dbus and libglib2),
|
||||
and netsnmp.
|
||||
|
||||
comment "sane-backends needs a toolchain w/ dynamic library"
|
||||
depends on BR2_USE_MMU
|
||||
depends on BR2_STATIC_LIBS
|
||||
@@ -0,0 +1,2 @@
|
||||
# From http://www.sane-project.org/sane-md5sums.txt
|
||||
md5 f9ed5405b3c12f07c6ca51ee60225fe7 sane-backends-1.0.25.tar.gz
|
||||
@@ -0,0 +1,78 @@
|
||||
################################################################################
|
||||
#
|
||||
# sane-backends
|
||||
#
|
||||
################################################################################
|
||||
|
||||
SANE_BACKENDS_VERSION = 1.0.25
|
||||
SANE_BACKENDS_SITE = https://alioth.debian.org/frs/download.php/file/4146
|
||||
SANE_BACKENDS_CONFIG_SCRIPTS = sane-config
|
||||
SANE_BACKENDS_LICENSE = GPLv2+
|
||||
SANE_BACKENDS_LICENSE_FILES = COPYING
|
||||
SANE_BACKENDS_INSTALL_STAGING = YES
|
||||
|
||||
SANE_BACKENDS_CONF_OPTS = \
|
||||
$(if $(BR2_TOOLCHAIN_HAS_THREADS),--enable-pthread,--disable-pthread)
|
||||
|
||||
ifeq ($(BR2_INIT_SYSTEMD),y)
|
||||
SANE_BACKENDS_CONF_OPTS += --with-systemd
|
||||
SANE_BACKENDS_DEPENDENCIES += systemd
|
||||
else
|
||||
SANE_BACKENDS_CONF_OPTS += --without-systemd
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBUSB),y)
|
||||
SANE_BACKENDS_DEPENDENCIES += libusb
|
||||
SANE_BACKENDS_CONF_OPTS += --enable-libusb_1_0
|
||||
else
|
||||
SANE_BACKENDS_CONF_OPTS += --disable-libusb
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_JPEG),y)
|
||||
SANE_BACKENDS_DEPENDENCIES += jpeg
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_TIFF),y)
|
||||
SANE_BACKENDS_DEPENDENCIES += tiff
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBV4L),y)
|
||||
SANE_BACKENDS_DEPENDENCIES += libv4l
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_AVAHI)$(BR2_PACKAGE_DBUS)$(BR2_PACKAGE_LIBGLIB2),yyy)
|
||||
SANE_BACKENDS_DEPENDENCIES += avahi
|
||||
SANE_BACKENDS_CONF_OPTS += --enable-avahi
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_NETSNMP),y)
|
||||
SANE_BACKENDS_CONF_ENV += ac_cv_path_SNMP_CONFIG_PATH=$(STAGING_DIR)/usr/bin/net-snmp-config
|
||||
SANE_BACKENDS_DEPENDENCIES += netsnmp
|
||||
else
|
||||
SANE_BACKENDS_CONF_OPTS += --without-snmp
|
||||
endif
|
||||
|
||||
define SANE_BACKENDS_DISABLE_DOCS
|
||||
$(SED) 's/ doc//' $(@D)/Makefile
|
||||
endef
|
||||
|
||||
SANE_BACKENDS_POST_CONFIGURE_HOOKS += SANE_BACKENDS_DISABLE_DOCS
|
||||
|
||||
define SANE_BACKENDS_USERS
|
||||
saned -1 saned -1 * /etc/sane.d - - Saned User
|
||||
endef
|
||||
|
||||
define SANE_BACKENDS_INSTALL_INIT_SYSTEMD
|
||||
$(INSTALL) -m 0644 -D package/sane-backends/saned.socket \
|
||||
$(TARGET_DIR)/usr/lib/systemd/system/saned.socket
|
||||
mkdir -p $(TARGET_DIR)/etc/systemd/system/socket.target.wants
|
||||
ln -sf ../../../../usr/lib/systemd/system/saned.socket \
|
||||
$(TARGET_DIR)/etc/systemd/system/socket.target.wants/saned.socket
|
||||
$(INSTALL) -m 0644 -D package/sane-backends/saned@.service \
|
||||
$(TARGET_DIR)/usr/lib/systemd/system/saned@.service
|
||||
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
|
||||
ln -sf ../../../../usr/lib/systemd/system/saned@.service \
|
||||
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/saned@.service
|
||||
endef
|
||||
|
||||
$(eval $(autotools-package))
|
||||
10
bsp/buildroot-2017.02.11/package/sane-backends/saned.socket
Normal file
10
bsp/buildroot-2017.02.11/package/sane-backends/saned.socket
Normal file
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=saned incoming socket
|
||||
|
||||
[Socket]
|
||||
ListenStream=6566
|
||||
Accept=yes
|
||||
MaxConnections=1
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
||||
@@ -0,0 +1,18 @@
|
||||
[Unit]
|
||||
Description=Scanner Service
|
||||
Requires=saned.socket
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/sbin/saned
|
||||
User=saned
|
||||
Group=saned
|
||||
StandardInput=null
|
||||
StandardOutput=syslog
|
||||
StandardError=syslog
|
||||
Environment=SANE_CONFIG_DIR=/etc/sane.d
|
||||
# If you need to debug your configuration uncomment the next line and
|
||||
# change it as appropriate to set the desired debug options
|
||||
# Environment=SANE_DEBUG_DLL=255 SANE_DEBUG_BJNP=5
|
||||
|
||||
[Install]
|
||||
Also=saned.socket
|
||||
Reference in New Issue
Block a user