Przeglądaj źródła

Build 341

  Update:
	- /var/spool/cron/root aus Update entfernt

  Kernel:
	- Rs485 parameter für Wartezeit vor Übertragungsstart eingebaut
	- Devicetree o.g Wartezeit default auf 40 us gesetzt
Reinhard Russinger 8 lat temu
rodzic
commit
3a434ed399

+ 21 - 0
GfA-buildroot_bump_tinc_to_v_1_0_31.patch

@@ -0,0 +1,21 @@
+diff --git a/package/tinc/tinc.hash b/package/tinc/tinc.hash
+index 0cccbbf..ca0ff41 100644
+--- a/package/tinc/tinc.hash
++++ b/package/tinc/tinc.hash
+@@ -1,2 +1,2 @@
+ # Locally calculated after checking pgp signature
+-sha256	0b502699360f09ce2128a39cf02abca07bfc699fc02ce829b3a90cf5e1e8b344	tinc-1.0.28.tar.gz
++sha256	d3cbc82e6e07975a2ccc0b369d07e30fc3324e71e240dca8781ce9a4f629519b	tinc-1.0.31.tar.gz
+diff --git a/package/tinc/tinc.mk b/package/tinc/tinc.mk
+index fb15c34..3cc05fa 100644
+--- a/package/tinc/tinc.mk
++++ b/package/tinc/tinc.mk
+@@ -4,7 +4,7 @@
+ #
+ ################################################################################
+ 
+-TINC_VERSION = 1.0.28
++TINC_VERSION = 1.0.31
+ TINC_SITE = http://www.tinc-vpn.org/packages
+ TINC_DEPENDENCIES = lzo openssl zlib
+ TINC_LICENSE = GPLv2+ with OpenSSL exception

+ 18 - 0
GfA-buildroot_linux_headers_for_rs485.patch

@@ -0,0 +1,18 @@
+diff --git a/package/linux-headers/linux-017-omap_serial_for_rs485.patch b/package/linux-headers/linux-017-omap_serial_for_rs485.patch
+new file mode 100644
+index 0000000..38b7ffa
+--- /dev/null
++++ b/package/linux-headers/linux-017-omap_serial_for_rs485.patch
+@@ -0,0 +1,12 @@
++--- a/include/uapi/linux/serial.h	2016-11-08 16:38:32.000000000 +0100
+++++ b/include/uapi/linux/serial.h	2017-02-18 14:27:23.569732653 +0100
++@@ -119,7 +119,8 @@ struct serial_rs485 {
++ #define SER_RS485_RX_DURING_TX		(1 << 4)
++ 	__u32	delay_rts_before_send;	/* Delay before send (milliseconds) */
++ 	__u32	delay_rts_after_send;	/* Delay after send (milliseconds) */
++-	__u32	padding[5];		/* Memory is cheap, new structs
+++	__u32   udelay_before_enable_tx;/* Delay before switching to tx direction */
+++	__u32	padding[4];		/* Memory is cheap, new structs
++ 					   are a royal PITA .. */
++ };
++ 

+ 21 - 0
GfA-buildroot_remove_crontab_root_entry_from_update.patch

@@ -0,0 +1,21 @@
+diff --git a/UpdateRootfs.sh.in b/UpdateRootfs.sh.in
+index b2ede0c20..edd5cb2a1 100644
+--- a/UpdateRootfs.sh.in
++++ b/UpdateRootfs.sh.in
+@@ -53,7 +53,15 @@ cp $TMP_PATH/uImage /mnt
+ cp $TMP_PATH/*.dtb /mnt
+ 
+ #rootfs auspacken
+-tar -C / --exclude=./opt --exclude=./tmp --exclude=./etc/inittab --exclude=./etc/network/interfaces --exclude=./etc/hosts --exclude=./etc/hostname --exclude=./etc/passwd --exclude=./etc/shadow --exclude=./etc/vncpwd --exclude=./etc/init.d/S99tincd --exclude=./etc/init.d/M99tincd --exclude=./var/GfA/Display_GSM.ini -xzvf $TMP_PATH/rootfs.tar.gz
++tar -C / --exclude=./opt --exclude=./tmp --exclude=./etc/inittab \
++	--exclude=./etc/network/interfaces \
++	--exclude=./etc/hosts --exclude=./etc/hostname \
++	--exclude=./etc/passwd --exclude=./etc/shadow \
++	--exclude=./etc/vncpwd --exclude=./etc/init.d/S99tincd \
++	--exclude=./etc/init.d/M99tincd \
++	--exclude=./var/GfA/Display_GSM.ini \
++	--exclude=./var/cron/crontabs/root \
++	-xzvf $TMP_PATH/rootfs.tar.gz
+ 
+ echo "sync mmc be patient ...."
+ sync

+ 4 - 0
MakeBuildrootEnv.sh

@@ -10,6 +10,10 @@ patch -p1 < ../GfA/GfA-buildroot_revert_S80ti-gfx_frambuffersettings.patch
 patch -p1 < ../GfA/GfA-buildroot_MapImage_build_path.patch
 patch -p1 < ../GfA/GfA-buildroot_MapImage_build_path.patch
 patch -p1 < ../GfA/GfA-buildroot-LegalInfo_zip_in_separate_script.patch
 patch -p1 < ../GfA/GfA-buildroot-LegalInfo_zip_in_separate_script.patch
 patch -p1 < ../GfA/GfA-buildroot_mysql_posgres_update_fixes.patch
 patch -p1 < ../GfA/GfA-buildroot_mysql_posgres_update_fixes.patch
+patch -p1 < ../GfA/GfA-buildroot_remove_crontab_root_entry_from_update.patch
+patch -p1 < ../GfA/GfA-buildroot_bump_tinc_to_v_1_0_31.patch
+patch -p1 < ../GfA/GfA-buildroot_linux_headers_for_rs485.patch
+#
 chmod a+x *.sh
 chmod a+x *.sh
 cp ../GfA/configs/* ./configs
 cp ../GfA/configs/* ./configs
 git add .
 git add .

+ 1 - 1
board/GfA/Display001/BUILD

@@ -1 +1 @@
-338
+341

+ 1 - 1
board/GfA/Display001/Display001.dts

@@ -283,7 +283,7 @@
 
 
 	rts-gpio = <&gpio1 28 GPIO_ACTIVE_HIGH>;
 	rts-gpio = <&gpio1 28 GPIO_ACTIVE_HIGH>;
 	rs485-rts-active-high;
 	rs485-rts-active-high;
-	rs485-rts-delay = <0 0>;
+	rs485-rts-delay = <0 0 40>;
 	linux,rs485-enabled-at-boot-time;
 	linux,rs485-enabled-at-boot-time;
 	rs485-rx-during-tx;
 	rs485-rx-during-tx;
 };
 };

+ 1 - 1
board/GfA/Display001/Display001_10.dts

@@ -284,7 +284,7 @@
 
 
 	rts-gpio = <&gpio1 28 GPIO_ACTIVE_HIGH>;
 	rts-gpio = <&gpio1 28 GPIO_ACTIVE_HIGH>;
 	rs485-rts-active-high;
 	rs485-rts-active-high;
-	rs485-rts-delay = <0 0>;
+	rs485-rts-delay = <0 0 40>;
 	linux,rs485-enabled-at-boot-time;
 	linux,rs485-enabled-at-boot-time;
 	rs485-rx-during-tx;
 	rs485-rx-during-tx;
 };
 };

+ 1 - 1
board/GfA/Display001/Display001_4.dts

@@ -283,7 +283,7 @@
 
 
 	rts-gpio = <&gpio1 28 GPIO_ACTIVE_HIGH>;
 	rts-gpio = <&gpio1 28 GPIO_ACTIVE_HIGH>;
 	rs485-rts-active-high;
 	rs485-rts-active-high;
-	rs485-rts-delay = <0 0>;
+	rs485-rts-delay = <0 0 40>;
 	linux,rs485-enabled-at-boot-time;
 	linux,rs485-enabled-at-boot-time;
 	rs485-rx-during-tx;
 	rs485-rx-during-tx;
 };
 };

+ 1 - 1
board/GfA/Display001/Display001_7.dts

@@ -317,7 +317,7 @@ i2c@3 {
 
 
 	rts-gpio = <&gpio1 28 GPIO_ACTIVE_HIGH>;
 	rts-gpio = <&gpio1 28 GPIO_ACTIVE_HIGH>;
 	rs485-rts-active-high;
 	rs485-rts-active-high;
-	rs485-rts-delay = <0 0>;
+	rs485-rts-delay = <0 0 40>;
 	linux,rs485-enabled-at-boot-time;
 	linux,rs485-enabled-at-boot-time;
 	rs485-rx-during-tx;
 	rs485-rx-during-tx;
 };
 };

+ 143 - 0
board/GfA/Display001/linux_3.12.30/linux-017-omap_serial_for_rs485.patch

@@ -0,0 +1,143 @@
+--- a/drivers/tty/serial/omap-serial.c	2014-10-09 15:46:37.000000000 +0200
++++ b/drivers/tty/serial/omap-serial.c	2017-02-17 18:10:41.671674904 +0100
+@@ -283,21 +283,22 @@
+ static void serial_omap_stop_tx(struct uart_port *port)
+ {
+ 	struct uart_omap_port *up = to_uart_omap_port(port);
+-	struct circ_buf *xmit = &up->port.state->xmit;
+ 	int res;
+ 
+ 	pm_runtime_get_sync(up->dev);
+ 
+-	/* handle rs485 */
++	/* Handle RS-485 */
+ 	if (up->rs485.flags & SER_RS485_ENABLED) {
+-		/* do nothing if current tx not yet completed */
+-		res = serial_in(up, UART_LSR) & UART_LSR_TEMT;
+-		if (!res)
+-			return;
+-
+-		/* if there's no more data to send, turn off rts */
+-		if (uart_circ_empty(xmit)) {
+-			/* if rts not already disabled */
++		if (up->scr & OMAP_UART_SCR_TX_EMPTY) {
++			/* THR interrupt is fired when both TX FIFO and TX
++			 * shift register are empty. This means there's nothing
++			 * left to transmit now, so make sure the THR interrupt
++			 * is fired when TX FIFO is below the trigger level,
++			 * disable THR interrupts and toggle the RS-485 GPIO
++			 * data direction pin if needed.
++			 */
++			up->scr &= ~OMAP_UART_SCR_TX_EMPTY;
++			serial_out(up, UART_OMAP_SCR, up->scr);
+ 			res = (up->rs485.flags & SER_RS485_RTS_AFTER_SEND) ? 1 : 0;
+ 			if (gpio_get_value(up->rts_gpio) != res) {
+ 				if (up->rs485.delay_rts_after_send > 0) {
+@@ -305,6 +306,18 @@
+ 				}
+ 				gpio_set_value(up->rts_gpio, res);
+ 			}
++		} else {
++			/* We're asked to stop, but there's still stuff in the
++			 * UART FIFO, so make sure the THR interrupt is fired
++			 * when both TX FIFO and TX shift register are empty.
++			 * The next THR interrupt (if no transmission is started
++			 * in the meantime) will indicate the end of a
++			 * transmission. Therefore we _don't_ disable THR
++			 * interrupts in this situation.
++			 */
++			up->scr |= OMAP_UART_SCR_TX_EMPTY;
++			serial_out(up, UART_OMAP_SCR, up->scr);
++			return;
+ 		}
+ 	}
+ 
+@@ -384,11 +397,17 @@
+ 
+ 	pm_runtime_get_sync(up->dev);
+ 
+-	/* handle rs485 */
++	/* Handle RS-485 */
+ 	if (up->rs485.flags & SER_RS485_ENABLED) {
++		/* Fire THR interrupts when FIFO is below trigger level */
++		up->scr &= ~OMAP_UART_SCR_TX_EMPTY;
++		serial_out(up, UART_OMAP_SCR, up->scr);
++
+ 		/* if rts not already enabled */
+ 		res = (up->rs485.flags & SER_RS485_RTS_ON_SEND) ? 1 : 0;
+ 		if (gpio_get_value(up->rts_gpio) != res) {
++			if(up->rs485.udelay_before_enable_tx)
++				udelay(up->rs485.udelay_before_enable_tx);
+ 			gpio_set_value(up->rts_gpio, res);
+ 			if (up->rs485.delay_rts_before_send > 0) {
+ 				mdelay(up->rs485.delay_rts_before_send);
+@@ -938,7 +957,7 @@
+ 	 */
+ 
+ 	/* Set receive FIFO threshold to 16 characters and
+-	 * transmit FIFO threshold to 16 spaces
++	 * transmit FIFO threshold to 32 spaces
+ 	 */
+ 	up->fcr &= ~OMAP_UART_FCR_RX_FIFO_TRIG_MASK;
+ 	up->fcr &= ~OMAP_UART_FCR_TX_FIFO_TRIG_MASK;
+@@ -1353,6 +1372,15 @@
+ 	up->ier = mode;
+ 	serial_out(up, UART_IER, up->ier);
+ 
++	/* If RS-485 is disabled, make sure the THR interrupt is fired when
++	 * TX FIFO is below the trigger level.
++	 */
++	if (!(up->rs485.flags & SER_RS485_ENABLED) &&
++	    (up->scr & OMAP_UART_SCR_TX_EMPTY)) {
++		up->scr &= ~OMAP_UART_SCR_TX_EMPTY;
++		serial_out(up, UART_OMAP_SCR, up->scr);
++	}
++
+ 	spin_unlock_irqrestore(&up->port.lock, flags);
+ 	pm_runtime_mark_last_busy(up->dev);
+ 	pm_runtime_put_autosuspend(up->dev);
+@@ -1540,7 +1568,7 @@
+ 				   struct device_node *np)
+ {
+ 	struct serial_rs485 *rs485conf = &up->rs485;
+-	u32 rs485_delay[2];
++	u32 rs485_delay[3];
+ 	enum of_gpio_flags flags;
+ 	int ret;
+ 
+@@ -1569,9 +1597,10 @@
+ 		up->rts_gpio = -EINVAL;
+ 
+ 	if (of_property_read_u32_array(np, "rs485-rts-delay",
+-				    rs485_delay, 2) == 0) {
++				    rs485_delay, 3) == 0) {
+ 		rs485conf->delay_rts_before_send = rs485_delay[0];
+ 		rs485conf->delay_rts_after_send = rs485_delay[1];
++		rs485conf->udelay_before_enable_tx = rs485_delay[2];
+ 	}
+ 
+ 	if (of_property_read_bool(np, "rs485-rx-during-tx"))
+--- a/Documentation/serial/serial-rs485.txt	2014-10-09 15:46:37.000000000 +0200
++++ b/Documentation/serial/serial-rs485.txt	2017-02-18 10:42:18.940765385 +0100
+@@ -116,6 +116,9 @@
+ 	/* Set rts delay after send, if needed: */
+ 	rs485conf.delay_rts_after_send = ...;
+ 
++	/* Set udelay_before_enable_tx, if needed: */
++	rs485conf.udelay_before_enable_tx = ...;
++
+ 	/* Set this flag if you want to receive data even whilst sending data */
+ 	rs485conf.flags |= SER_RS485_RX_DURING_TX;
+ 
+--- a/include/uapi/linux/serial.h	2014-10-09 15:46:37.000000000 +0200
++++ b/include/uapi/linux/serial.h	2017-02-18 14:55:50.717958730 +0100
+@@ -119,7 +119,8 @@ struct serial_rs485 {
+ #define SER_RS485_RX_DURING_TX		(1 << 4)
+ 	__u32	delay_rts_before_send;	/* Delay before send (milliseconds) */
+ 	__u32	delay_rts_after_send;	/* Delay after send (milliseconds) */
+-	__u32	padding[5];		/* Memory is cheap, new structs
++	__u32   udelay_before_enable_tx;/* Delay before switching to tx direction */
++	__u32	padding[4];		/* Memory is cheap, new structs
+ 					   are a royal PITA .. */
+ };
+ 

+ 1 - 3
configs/Display001_3.12.30_defconfig

@@ -221,9 +221,6 @@ BR2_PACKAGE_CURL=y
 BR2_PACKAGE_LIBIDN=y
 BR2_PACKAGE_LIBIDN=y
 BR2_PACKAGE_LIBIDN_BINARY=y
 BR2_PACKAGE_LIBIDN_BINARY=y
 BR2_PACKAGE_LIBMBUS=y
 BR2_PACKAGE_LIBMBUS=y
-BR2_PACKAGE_LIBNETFILTER_CONNTRACK=y
-BR2_PACKAGE_LIBNETFILTER_CTHELPER=y
-BR2_PACKAGE_LIBNETFILTER_CTTIMEOUT=y
 BR2_PACKAGE_LIBPJSIP=y
 BR2_PACKAGE_LIBPJSIP=y
 BR2_PACKAGE_LIBRSYNC=y
 BR2_PACKAGE_LIBRSYNC=y
 BR2_PACKAGE_LIBSOUP=y
 BR2_PACKAGE_LIBSOUP=y
@@ -276,6 +273,7 @@ BR2_PACKAGE_BLUEZ_UTILS_USB=y
 BR2_PACKAGE_BLUEZ_UTILS_GATT=y
 BR2_PACKAGE_BLUEZ_UTILS_GATT=y
 BR2_PACKAGE_CIVETWEB=y
 BR2_PACKAGE_CIVETWEB=y
 BR2_PACKAGE_CIVETWEB_WITH_LUA=y
 BR2_PACKAGE_CIVETWEB_WITH_LUA=y
+BR2_PACKAGE_CONNTRACK_TOOLS=y
 BR2_PACKAGE_CRDA=y
 BR2_PACKAGE_CRDA=y
 BR2_PACKAGE_DHCP=y
 BR2_PACKAGE_DHCP=y
 BR2_PACKAGE_DHCP_SERVER=y
 BR2_PACKAGE_DHCP_SERVER=y