Reinhard Russinger 7 anni fa
parent
commit
bdd2c23c3d
3 ha cambiato i file con 265 aggiunte e 1 eliminazioni
  1. 263 0
      GfA-buildroot-MakeDTSupdate.patch
  2. 1 0
      Make-bb-kernel_Qt5.6.2.sh
  3. 1 1
      board/GfA/Display001/BUILD

+ 263 - 0
GfA-buildroot-MakeDTSupdate.patch

@@ -0,0 +1,263 @@
+diff --git a/MakeDTSUpdate.sh b/MakeDTSUpdate.sh
+new file mode 100755
+index 0000000000..f25b04b975
+--- /dev/null
++++ b/MakeDTSUpdate.sh
+@@ -0,0 +1,58 @@
++#!/bin/bash
++WRKDIR=/tmp/XXXUpdateDTS
++BUILD=`cat ../GfA/board/GfA/Display001/BUILD`
++UPDATE_BINARY=$WRKDIR/dest/UpdateDTS.tar.Z
++UPDATE_FILENAME="../UpdateDTS_$BUILD.sh"
++UPDATE_IN_SCRIPT="UpdateDTS.sh.in"
++
++rm -rf $WRKDIR
++mkdir -p $WRKDIR/dest
++
++cp ./output/images/*.dtb $WRKDIR
++
++tar -C $WRKDIR --exclude=./dest -czvf $UPDATE_BINARY ./
++
++# Check for payload format option (default is binary).
++binary=1
++uuencode=0
++
++if [[ "$1" == '--binary' ]]; then
++	binary=1
++	uuencode=0
++	shift
++fi
++if [[ "$1" == '--uuencode' ]]; then
++	binary=0
++	uuencode=1
++	shift
++fi
++
++if [[ ! -f $UPDATE_BINARY ]]; then
++	echo "       UPDATE_BINARY $UPDATE_BINARY doesn't exist!"
++	echo "Usage: $0 [--binary | --uuencode]"
++	exit 1
++fi
++
++
++if [[ $binary -ne 0 ]]; then
++	# Append binary data.
++	sed \
++		-e 's/uuencode=./uuencode=0/' \
++		-e 's/binary=./binary=1/' \
++			 $UPDATE_IN_SCRIPT > $UPDATE_FILENAME
++	echo "PAYLOAD:" >> $UPDATE_FILENAME
++
++	cat $UPDATE_BINARY >> $UPDATE_FILENAME
++fi
++if [[ $uuencode -ne 0 ]]; then
++	# Append uuencoded data.
++	sed \
++		-e 's/uuencode=./uuencode=1/' \
++		-e 's/binary=./binary=0/' \
++			 $UPDATE_IN_SCRIPT > $UPDATE_FILENAME
++	echo "PAYLOAD:" >> $UPDATE_FILENAME
++
++	cat $UPDATE_BINARY | uuencode - >> $UPDATE_FILENAME
++fi
++
++chmod a+x $UPDATE_FILENAME
+diff --git a/UpdateDTS.sh.in b/UpdateDTS.sh.in
+new file mode 100644
+index 0000000000..e123282a66
+--- /dev/null
++++ b/UpdateDTS.sh.in
+@@ -0,0 +1,120 @@
++#!/bin/sh
++
++uuencode=0
++binary=1
++
++##TAR_PARAMETERS="-C / --exclude=./opt --exclude=./etc/inittab -xzvf -"
++TMP_PATH="/__GfA_UpdateDTS"
++TAR_PARAMETERS="-C $TMP_PATH -xzvf -"
++
++untar_payload ()
++{
++
++	echo "remove $TMP_PATH : "
++	rm -rf $TMP_PATH
++	echo ">> $? "
++	mkdir -p $TMP_PATH
++
++	match=$(grep -n -m 1 '^PAYLOAD:$' $0 | cut -d ':' -f 1)
++	payload_start=$((match + 1))
++	if [[ $binary -ne 0 ]]; then
++		tail -n +$payload_start $0 | tar $TAR_PARAMETERS
++	fi
++	if [[ $uuencode -ne 0 ]]; then
++		tail -n +$payload_start $0 | uudecode | tar $TAR_PARAMETERS
++	fi
++}
++
++## --- Kommandos zum Installieren
++## -- get bootpartition
++such="root=/dev/mmcblk1"
++grep -q $such /proc/cmdline
++if [ $? == 0 ]
++then
++	bootpart="/dev/mmcblk1p1"
++else
++	bootpart="/dev/mmcblk0p1"
++fi	
++
++umount /mnt
++mount $bootpart /mnt
++
++#--- Kernel MLO und Rootfs-Tarball entpacken
++untar_payload
++# --- 
++
++cp $TMP_PATH/*.dtb /mnt
++
++echo "sync mmc be patient ...."
++sync
++sync
++
++# Get Graphics resolution and set dtb to the right resolution
++BASEBOARD=`cat /tmp/BASEBOARD`
++
++DONE=0
++YRES="$(fbset | awk '/geom/ {print $3}')"
++XRES="$(fbset | awk '/geom/ {print $2}')"
++
++echo "XRES $XRES, YRES $YRES"
++
++if [ "$XRES" == "480" -a "$YRES" == "272" ]; then
++if [ "$BASEBOARD" == "DISPLAY002_DI4" ]; then
++  echo "4.3 Inch Display 2"
++  sh /root/Display2To_4_3inch.sh
++  DONE=1
++else
++  echo "4.3 Inch"
++  sh /root/DisplayTo_4_3inch.sh
++  DONE=1
++fi
++fi
++
++if [ "$XRES" == "800" -a "$YRES" == "480" ]; then
++if [ "$BASEBOARD" == "DISPLAY002_DI4" ]; then
++  echo "7 Inch Display 2"
++  sh /root/Display2To_7inch.sh
++  DONE=1
++else
++  echo "7 Inch"
++  sh /root/DisplayTo_7inch.sh
++  DONE=1
++fi
++fi
++
++if [ "$XRES" == "1280" -a "$YRES" == "800" ]; then
++if [ "$BASEBOARD" == "DISPLAY002_DI4" ]; then
++  echo "10 Inch Display 2"
++  sh /root/Display2To_10inch.sh
++  DONE=1
++else
++  echo "10 Inch"
++  sh /root/DisplayTo_10inch.sh
++  DONE=1
++fi
++fi
++
++if [ "$XRES" == "1920" -a "$YRES" == "1080" ]; then
++if [ "$BASEBOARD" == "DISPLAY002_DI4" ]; then
++  echo "10 Inch Display 2"
++  sh /root/Display2To_15inch.sh
++  DONE=1
++else
++  echo "10 Inch"
++  sh /root/DisplayTo_15inch.sh
++  DONE=1
++fi
++fi
++
++if [ "$DONE" == "0" ]; then
++  echo "Unknown Display Resolution"
++fi
++
++
++
++
++#=================
++echo "Update Done, pls. reboot System"
++umount /mnt
++echo "."
++exit 0
+diff --git a/UpdateRootfs.sh.in b/UpdateRootfs.sh.in
+index e53210dbdb..76a75fb9b8 100644
+--- a/UpdateRootfs.sh.in
++++ b/UpdateRootfs.sh.in
+@@ -124,6 +124,7 @@ chown -Rv mysql:nogroup /var/mysql
+ chown -Rv postgres:postgres /var/lib/pgsql
+ #==============================================================================
+ # Get Graphics resolution and set dtb to the right resolution
++BASEBOARD=`cat /tmp/BASEBOARD`
+ 
+ DONE=0
+ YRES="$(fbset | awk '/geom/ {print $3}')"
+@@ -132,36 +133,57 @@ XRES="$(fbset | awk '/geom/ {print $2}')"
+ echo "XRES $XRES, YRES $YRES"
+ 
+ if [ "$XRES" == "480" -a "$YRES" == "272" ]; then
++if [ "$BASEBOARD" == "DISPLAY002_DI4" ]; then
++  echo "4.3 Inch Display 2"
++  sh /root/Display2To_4_3inch.sh
++  DONE=1
++else
+   echo "4.3 Inch"
+   sh /root/DisplayTo_4_3inch.sh
+   DONE=1
+ fi
++fi
+ 
+ if [ "$XRES" == "800" -a "$YRES" == "480" ]; then
++if [ "$BASEBOARD" == "DISPLAY002_DI4" ]; then
++  echo "7 Inch Display 2"
++  sh /root/Display2To_7inch.sh
++  DONE=1
++else
+   echo "7 Inch"
+   sh /root/DisplayTo_7inch.sh
+   DONE=1
+ fi
++fi
+ 
+ if [ "$XRES" == "1280" -a "$YRES" == "800" ]; then
++if [ "$BASEBOARD" == "DISPLAY002_DI4" ]; then
++  echo "10 Inch Display 2"
++  sh /root/Display2To_10inch.sh
++  DONE=1
++else
+   echo "10 Inch"
+   sh /root/DisplayTo_10inch.sh
+   DONE=1
+ fi
++fi
+ 
+ if [ "$XRES" == "1920" -a "$YRES" == "1080" ]; then
++if [ "$BASEBOARD" == "DISPLAY002_DI4" ]; then
++  echo "10 Inch Display 2"
++  sh /root/Display2To_15inch.sh
++  DONE=1
++else
+   echo "10 Inch"
+   sh /root/DisplayTo_15inch.sh
+   DONE=1
+ fi
++fi
+ 
+ if [ "$DONE" == "0" ]; then
+   echo "Unknown Display Resolution"
+ fi
+ 
+-
+-
+-
+ #=================
+ echo "Update Done, pls. reboot System"
+ umount /mnt

+ 1 - 0
Make-bb-kernel_Qt5.6.2.sh

@@ -40,6 +40,7 @@ patch -p1 < ../GfA/GfA-buildroot_SetRightDisplayResolution_OnUpdate_include_opt.
 patch -p1 < ../GfA/GfA-buildroot_include_inittab_on_update.patch
 patch -p1 < ../GfA/GfA-buildroot-libmodbus-GfA.patch
 patch -p1 < ../GfA/GfA-buildroot-update-add-fullhd.patch
+patch -p1 < ../GfA/GfA-buildroot-MakeDTSupdate.patch
 #
 chmod a+x *.sh
 cp ../GfA/configs/* ./configs

+ 1 - 1
board/GfA/Display001/BUILD

@@ -1 +1 @@
-458
+459