Reinhard Russinger 1 vuosi sitten
vanhempi
commit
046eb4bac0

+ 8 - 2
board/GfA/Display001/rootfs/etc/profile

@@ -54,9 +54,15 @@ for i in /etc/profile.d/*.sh ; do
     fi
 done
 #=======
+BASEBOARD=`cat /tmp/BASEBOARD`
+
+if [ "$BASEBOARD" == "DISPLAY002_784"  -o "$BASEBOARD" == "DISPLAY002_784_ADC" ]; then
+	export QT_QPA_EGLFS_ROTATION=180
+else
+	export QT_QPA_EGLFS_HIDECURSOR=1
+fi
+
 ### Qt EGLFS Settings
 export QT_QPA_EGLFS_INTEGRATION=none
-export QT_QPA_EGLFS_HIDECURSOR=1
-
 export QT_QPA_EGLFS_PHYSICAL_WIDTH=`cat /sys/firmware/devicetree/base/vendorinfo/display_physical_width`
 export QT_QPA_EGLFS_PHYSICAL_HEIGHT=`cat /sys/firmware/devicetree/base/vendorinfo/display_physical_height`

+ 0 - 87
board/GfA/Display001/uboot_2013.10/uboot-010-gcc9.patch

@@ -1,87 +0,0 @@
-From 4de8e7a1fb120b4f6b4052e84c600eeb7969dc4d Mon Sep 17 00:00:00 2001
-From: Florin Sarbu <florin@resin.io>
-Date: Sat, 28 Feb 2018 11:50:33 +0100
-Subject: [PATCH] Add compiler-gcc9.h header file
-
-This file is derived from compiler-gcc5.h
-
-Upstream-Status: Inappropriate [upstream u-boot does not use compiler-gccX.h anymore]
-Signed-off-by: Florin Sarbu <florin@resin.io>
----
- include/linux/compiler-gcc9.h | 65 +++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 65 insertions(+)
- create mode 100644 include/linux/compiler-gcc9.h
-
-diff --git a/include/linux/compiler-gcc9.h b/include/linux/compiler-gcc9.h
-new file mode 100644
-index 0000000..622117b
---- /dev/null
-+++ b/include/linux/compiler-gcc9.h
-@@ -0,0 +1,65 @@
-+#ifndef __LINUX_COMPILER_H
-+#error "Please don't include <linux/compiler-gcc9.h> directly, include <linux/compiler.h> instead."
-+#endif
-+
-+#define __used				__attribute__((__used__))
-+#define __must_check			__attribute__((warn_unused_result))
-+#define __compiler_offsetof(a, b)	__builtin_offsetof(a, b)
-+
-+/* Mark functions as cold. gcc will assume any path leading to a call
-+   to them will be unlikely.  This means a lot of manual unlikely()s
-+   are unnecessary now for any paths leading to the usual suspects
-+   like BUG(), printk(), panic() etc. [but let's keep them for now for
-+   older compilers]
-+
-+   Early snapshots of gcc 4.3 don't support this and we can't detect this
-+   in the preprocessor, but we can live with this because they're unreleased.
-+   Maketime probing would be overkill here.
-+
-+   gcc also has a __attribute__((__hot__)) to move hot functions into
-+   a special section, but I don't see any sense in this right now in
-+   the kernel context */
-+#define __cold			__attribute__((__cold__))
-+
-+#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
-+
-+#ifndef __CHECKER__
-+# define __compiletime_warning(message) __attribute__((warning(message)))
-+# define __compiletime_error(message) __attribute__((error(message)))
-+#endif /* __CHECKER__ */
-+
-+/*
-+ * Mark a position in code as unreachable.  This can be used to
-+ * suppress control flow warnings after asm blocks that transfer
-+ * control elsewhere.
-+ *
-+ * Early snapshots of gcc 4.5 don't support this and we can't detect
-+ * this in the preprocessor, but we can live with this because they're
-+ * unreleased.  Really, we need to have autoconf for the kernel.
-+ */
-+#define unreachable() __builtin_unreachable()
-+
-+/* Mark a function definition as prohibited from being cloned. */
-+#define __noclone	__attribute__((__noclone__))
-+
-+/*
-+ * Tell the optimizer that something else uses this function or variable.
-+ */
-+#define __visible __attribute__((externally_visible))
-+
-+/*
-+ * GCC 'asm goto' miscompiles certain code sequences:
-+ *
-+ *   http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670
-+ *
-+ * Work it around via a compiler barrier quirk suggested by Jakub Jelinek.
-+ *
-+ * (asm goto is automatically volatile - the naming reflects this.)
-+ */
-+#define asm_volatile_goto(x...)	do { asm goto(x); asm (""); } while (0)
-+
-+#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP
-+#define __HAVE_BUILTIN_BSWAP32__
-+#define __HAVE_BUILTIN_BSWAP64__
-+#define __HAVE_BUILTIN_BSWAP16__
-+#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */
--- 
-2.7.4

+ 0 - 87
board/GfA/Display001/uboot_2013.10/uboot-012-gcc10.patch

@@ -1,87 +0,0 @@
-From 4de8e7a1fb120b4f6b4052e84c600eeb7969dc4d Mon Sep 17 00:00:00 2001
-From: Florin Sarbu <florin@resin.io>
-Date: Sat, 28 Feb 2018 11:50:33 +0100
-Subject: [PATCH] Add compiler-gcc10.h header file
-
-This file is derived from compiler-gcc5.h
-
-Upstream-Status: Inappropriate [upstream u-boot does not use compiler-gccX.h anymore]
-Signed-off-by: Florin Sarbu <florin@resin.io>
----
- include/linux/compiler-gcc10.h | 65 +++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 65 insertions(+)
- create mode 100644 include/linux/compiler-gcc10.h
-
-diff --git a/include/linux/compiler-gcc10.h b/include/linux/compiler-gcc10.h
-new file mode 100644
-index 0000000..622117b
---- /dev/null
-+++ b/include/linux/compiler-gcc10.h
-@@ -0,0 +1,65 @@
-+#ifndef __LINUX_COMPILER_H
-+#error "Please don't include <linux/compiler-gcc10.h> directly, include <linux/compiler.h> instead."
-+#endif
-+
-+#define __used				__attribute__((__used__))
-+#define __must_check			__attribute__((warn_unused_result))
-+#define __compiler_offsetof(a, b)	__builtin_offsetof(a, b)
-+
-+/* Mark functions as cold. gcc will assume any path leading to a call
-+   to them will be unlikely.  This means a lot of manual unlikely()s
-+   are unnecessary now for any paths leading to the usual suspects
-+   like BUG(), printk(), panic() etc. [but let's keep them for now for
-+   older compilers]
-+
-+   Early snapshots of gcc 4.3 don't support this and we can't detect this
-+   in the preprocessor, but we can live with this because they're unreleased.
-+   Maketime probing would be overkill here.
-+
-+   gcc also has a __attribute__((__hot__)) to move hot functions into
-+   a special section, but I don't see any sense in this right now in
-+   the kernel context */
-+#define __cold			__attribute__((__cold__))
-+
-+#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
-+
-+#ifndef __CHECKER__
-+# define __compiletime_warning(message) __attribute__((warning(message)))
-+# define __compiletime_error(message) __attribute__((error(message)))
-+#endif /* __CHECKER__ */
-+
-+/*
-+ * Mark a position in code as unreachable.  This can be used to
-+ * suppress control flow warnings after asm blocks that transfer
-+ * control elsewhere.
-+ *
-+ * Early snapshots of gcc 4.5 don't support this and we can't detect
-+ * this in the preprocessor, but we can live with this because they're
-+ * unreleased.  Really, we need to have autoconf for the kernel.
-+ */
-+#define unreachable() __builtin_unreachable()
-+
-+/* Mark a function definition as prohibited from being cloned. */
-+#define __noclone	__attribute__((__noclone__))
-+
-+/*
-+ * Tell the optimizer that something else uses this function or variable.
-+ */
-+#define __visible __attribute__((externally_visible))
-+
-+/*
-+ * GCC 'asm goto' miscompiles certain code sequences:
-+ *
-+ *   http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670
-+ *
-+ * Work it around via a compiler barrier quirk suggested by Jakub Jelinek.
-+ *
-+ * (asm goto is automatically volatile - the naming reflects this.)
-+ */
-+#define asm_volatile_goto(x...)	do { asm goto(x); asm (""); } while (0)
-+
-+#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP
-+#define __HAVE_BUILTIN_BSWAP32__
-+#define __HAVE_BUILTIN_BSWAP64__
-+#define __HAVE_BUILTIN_BSWAP16__
-+#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */
--- 
-2.7.4

+ 193 - 0
patches/0119-update-rootfs.patch

@@ -0,0 +1,193 @@
+diff --git a/UpdateRootfs.sh.in b/UpdateRootfs.sh.in
+index af10b8a..19bece2 100644
+--- a/UpdateRootfs.sh.in
++++ b/UpdateRootfs.sh.in
+@@ -218,6 +218,21 @@ iface wlan0 inet dhcp
+ EOF
+ ) >> $GFA_PREFIX/etc/network/interfaces
+ 
++FIXINTERFACES=$(
++cat $GFA_PREFIX/etc/network/interfaces |
++awk '
++{
++# remove old version of resolv.conf filling
++if( ($1 == "post-up") && ($2 == "echo") && ($3 == "\"nameserver")) {
++    printf("\tdns-nameservers %s\n", substr($4,1,length($4) - 1));
++        } else {
++        printf("%s\n", $0);
++    }
++
++}'
++)
++echo  "$FIXINTERFACES" > $GFA_PREFIX/etc/network/interfaces
++
+ if [ -e $GFA_PREFIX/etc/init.d/S98usb_g_ether ]
+ then
+ 	cp $GFA_PREFIX/etc/init.d/S98usb_g_ether $GFA_PREFIX/etc/init.d/M98usb_g_ether
+@@ -390,6 +405,14 @@ else
+ fi
+ fi
+ 
++if [ "$XRES" == "416" -a "$YRES" == "1280" ]; then
++if [ "$BASEBOARD" == "DISPLAY002_784" ]; then
++  echo "4.7 x 7.5 Inch long Display 2"
++  sh /root/Display2To_784inch_rs485.sh
++  DONE=1
++fi
++fi
++
+ if [ "$DONE" == "0" ]; then
+   echo "Unknown Display Resolution"
+ fi
+@@ -404,6 +427,7 @@ echo "restart system !!!"
+ sleep 2
+ #-----------------
+ reboot
++exit 0
+ fi
+ fi
+ #======================  DoRealUpdate ==== Ende =====
+@@ -641,7 +665,13 @@ cat << XEOF
+ 
+ CALLDIR=\`pwd\`
+ WRKDIR=/opt/GfA/SDUpdateTool
+-  
++
++if [ -z "\$1" ]; then
++    CUSTOM_ROOT=\$WRKDIR/custom_root
++else
++    CUSTOM_ROOT=\$WRKDIR/\$1
++fi  
++
+ DESTDEV="/dev/mmcblk1"
+ 
+ EMMC_BOOTPATH="/tmp/EMMCBOOT"
+@@ -702,6 +732,14 @@ then
+         rm \$GFA_PREFIX/etc/wpa_supplicant/wpa_supplicant.conf
+ fi
+ 
++#=== execute custom_pre script =====
++GFA_NEWROOTFS=\$WRKDIR/_BootRoot
++if [ -x "\$WRKDIR/custom_pre.sh" ]; then
++  SAVEDIR=\`pwd\`
++  \$WRKDIR/custom_pre.sh \$EMMC_ROOTPATH \$GFA_NEWROOTFS
++  cd \$SAVEDIR
++fi
++
+ #=== copy ROOTFS
+ cd \$WRKDIR/_BootRoot
+ rsync -avR --exclude=/_GfABoot \\
+@@ -727,6 +765,7 @@ iface lo inet loopback
+ EOF
+ ) > \$GFA_PREFIX/etc/network/interfaces
+ 
++
+ awk -v par=\$INTERFACE '/^iface/ && \$2==par {f=1}/^iface/ && \$2!=par {f=0}f && !/^\s*#/d && !/^\s*\$/d  {print \$0 }' \$TMP_PATH/bu_cfg/interfaces \\
+ >> \$GFA_PREFIX/etc/network/interfaces
+   
+@@ -744,6 +783,21 @@ iface wlan0 inet dhcp
+ EOF
+ ) >> \$GFA_PREFIX/etc/network/interfaces
+ 
++FIXINTERFACES=\$(
++cat \$GFA_PREFIX/etc/network/interfaces |
++awk '
++{
++# remove old version of resolv.conf filling
++if( (\$1 == "post-up") && (\$2 == "echo") && (\$3 == "\"nameserver")) {
++    printf("\tdns-nameservers %s\n", substr(\$4,1,length(\$4) - 1));
++        } else {
++        printf("%s\n", \$0);
++    }
++
++}'
++)
++echo  "\$FIXINTERFACES" > \$GFA_PREFIX/etc/network/interfaces
++
+ if [ -e \$GFA_PREFIX/etc/init.d/S98usb_g_ether ]
+ then
+         cp \$GFA_PREFIX/etc/init.d/S98usb_g_ether \$GFA_PREFIX/etc/init.d/M98usb_g_ether
+@@ -794,7 +848,7 @@ then
+         sed -i 's/TSYNCCMD=rdate time.memod.de/TSYNCCMD=\/etc\/init.d\/S99rtc_GfA set/' \$GFA_PREFIX/var/GfA/Display_GSM.ini
+ fi
+ #================================
+-#--create mountable run folder insted of link
++#--create mountable run folder instead of link
+ RUNDIR=\$GFA_PREFIX/run
+ if [ -L \$RUNDIR ]; then
+   mv \$RUNDIR \$RUNDIR'_WRK'
+@@ -839,12 +893,18 @@ chown -Rv \${UID_PG}:\${GID_PG} \$GFA_PREFIX/var/lib/pgsql
+ 
+ chmod 700 \$GFA_PREFIX/root/.ssh
+ #===== copy custom_root files if folder exists
+-if [ -d "\$WRKDIR/custom_root" ]; then
+-  cd \$WRKDIR/custom_root
++if [ -d "\$CUSTOM_ROOT" ]; then
++  cd \$CUSTOM_ROOT
+   rsync -avR  \\
+    ./ \$EMMC_ROOTPATH/
+ fi
+ #==============================================================================
++#=== execute custom_post script =====
++if [ -x "\$WRKDIR/custom_post.sh" ]; then
++  SAVEDIR=\`pwd\`
++  \$WRKDIR/custom_post.sh \$EMMC_ROOTPATH \$GFA_NEWROOTFS
++  cd \$SAVEDIR
++fi
+ #=== copy BOOTFS
+ rm -rf \$EMMC_BOOTPATH/*
+ cd \$WRKDIR/_BootRoot/_GfABoot
+@@ -924,6 +984,14 @@ else
+ fi
+ fi
+   
++if [ "\$XRES" == "416" -a "\$YRES" == "1280" ]; then
++if [ "\$BASEBOARD" == "DISPLAY002_784" ]; then
++  echo "15 Inch Display 2"
++  cp \$EMMC_BOOTPATH/Display002_784_rs485.dtb \$EMMC_BOOTPATH/Display001.dtb
++  DONE=1
++fi
++fi
++
+ if [ "\$DONE" == "0" ]; then
+   echo "Unknown Display Resolution"
+ fi
+@@ -941,17 +1009,25 @@ fi
+ #===== MakeSDUpdateTool === End
+ 
+ #====== HELP on unknown Command =======
+-echo -e "Unknown Command :: $1"
+-echo -e "Usage: $0 \e[32m[Command]\e[0m"
+-echo -e "\t without command ... update to new system"
+-echo -e "\t \e[32mMakeBootableSD\e[0m ... create bootable SD card with factory defaults"
+-echo -e "\t \e[32mMakeBootableEMMC\e[0m ... create bootable EMMC with factory defaults"
+-echo -e "\t \e[32mMakeSDUpdateTool\e[0m ... create Folders and scripts for"
+-echo -e "\t\t updating system from SD Card in /opt/GfA/SDUpdateTool"
+-echo -e "\t\t To Do UpdateEMMC:"
+-echo -e "\t\t\t cd /opt/GfA/SDUpdateTool"
+-echo -e "\t\t\t ./UpdateEMMC.sh"
+-echo -e "\t\t\t if folder /opt/GfASDupdateTool/custom_root exists"
+-echo -e "\t\t\t whole tree will be copied to root filesystem as is"
+-
++if [ $# > 1 ]; then
++  echo -e "Unknown Command :: $1"
++  echo -e "Usage: $0 \e[32m[Command]\e[0m"
++  echo -e "\t without command ... update to new system"
++  echo -e "\t \e[32mMakeBootableSD\e[0m ... create bootable SD card with factory defaults"
++  echo -e "\t \e[32mMakeBootableEMMC\e[0m ... create bootable EMMC with factory defaults"
++  echo -e "\t \e[32mMakeSDUpdateTool\e[0m ... create Folders and scripts for"
++  echo -e "\t\t updating system from SD Card in /opt/GfA/SDUpdateTool"
++  echo -e "\t\t To Do UpdateEMMC:"
++  echo -e "\t\t\t cd /opt/GfA/SDUpdateTool"
++  echo -e "\t\t\t ./UpdateEMMC.sh [custom_root_path relative to /opt/GfA/SDUpdateTool]"
++  echo -e "\t\t\t 	default ... custom_root"
++  echo -e "\t\t\t if folder /opt/GfASDupdateTool/custom_root exists"
++  echo -e "\t\t\t whole tree will be copied to root filesystem as is"
++  echo -e "\t\t\t if script (+x) /opt/GfASDupdateTool/custom_pre.sh exists"
++  echo -e "\t\t\t script will be called with parameters \$1=PATH_TO_EXISTING_ROOTFS \$2=PATH_TO_NEW_ROOTFS"
++  echo -e "\t\t\t before copy to EMMC starts"
++  echo -e "\t\t\t if script (+x) /opt/GfASDupdateTool/custom_post. exists"
++  echo -e "\t\t\t script will be called with parameters \$1=PATH_TO_EXISTING_ROOTFS \$2=PATH_TO_NEW_ROOTFS"
++  echo -e "\t\t\t after copy to EMMC is finished"
++fi
+ exit 0