├── extra └── file ├── tools ├── README ├── libts-bin_1.0-11_armhf.deb ├── xinput-calibrator_0.7.5-1_armhf.deb ├── mon0down ├── mon0up ├── compile_overlays.sh └── dtc.sh ├── nexmon ├── armel │ └── nexutil ├── armhf │ └── nexutil ├── tools │ ├── mon0down │ └── mon0up └── nexmon.txt ├── firmware ├── BCM43430A1.hcd ├── 50-bluetooth-hci-auto-poweron.rules └── 99-com.rules ├── Logo-Kali-Pi └── Archive │ ├── Kali-Pi.png │ ├── Kali-Pi.xcf │ ├── index.png │ ├── Kali-Pi-1.xcf │ ├── kali-linux.png │ ├── Kali-Pi-Large.png │ ├── Kali-Pi-Large.xcf │ ├── dragons_linux_backtrack_5_hd-wallpaper-3027368.jpg │ └── logo_linux_clut224.ppm ├── docs ├── 3-2_Zoll_DisplayV2_032016.pdf └── INSTALL ├── repo ├── bluez-firmware_1.2-3_all.deb ├── libreadline6_6.3-8+b3_armel.deb ├── libreadline6_6.3-8+b3_armhf.deb ├── pi-bluetooth+re4son_2.2_all.deb ├── bluez_5.39-1+rpi1+re4son_armel.deb ├── bluez_5.39-1+rpi3+re4son_armhf.deb └── pi-bluetooth_0.1.4+re4son_all.deb ├── patches ├── 0002-add-28c-to-overlay-makefile.patch ├── 0001-add-u32-mntr_flags-for-wifi-injection-patch.patch ├── 0007-remove-mach-platform-include-from-rpi_power_switch.patch ├── 0008-power-switch-add-PERI_BASE-define.patch ├── 0001-wireless-carl9170-Enable-sniffer-mode-promisc-flag-t.patch ├── 0001-add-pitft28c-overlay.patch ├── wifi-injection-4.14.patch ├── wifi-injection-4.9.patch ├── wifi-injection-4.19.patch ├── 0003-update-touchscreen-STMPE-driver.patch ├── 0005-add-28c-28r-35r-overlays.patch ├── 0006-structure-changed-now-in-a-reset-directory.patch └── 0004-add-ft6x06_ts-support.patch ├── dts ├── elecfreaks22-overlay.dts ├── waveshare32b-overlay.dts ├── sainsmart32-overlay.dts ├── pitft22-overlay.dts ├── jbtek-overlay.dts ├── waveshare35a-overlay.dts ├── pitft28c-overlay.dts ├── pitft35r-overlay.dts └── pitft28r-overlay.dts ├── setup.sh ├── srv-tools └── sdcard │ ├── write-sdcard │ └── read-sdcard ├── README.md └── install.sh /extra/file: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tools/README: -------------------------------------------------------------------------------- 1 | ### Place additional tools here ### 2 | -------------------------------------------------------------------------------- /nexmon/armel/nexutil: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Re4son/re4son-kernel-builder/HEAD/nexmon/armel/nexutil -------------------------------------------------------------------------------- /nexmon/armhf/nexutil: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Re4son/re4son-kernel-builder/HEAD/nexmon/armhf/nexutil -------------------------------------------------------------------------------- /firmware/BCM43430A1.hcd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Re4son/re4son-kernel-builder/HEAD/firmware/BCM43430A1.hcd -------------------------------------------------------------------------------- /Logo-Kali-Pi/Archive/Kali-Pi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Re4son/re4son-kernel-builder/HEAD/Logo-Kali-Pi/Archive/Kali-Pi.png -------------------------------------------------------------------------------- /Logo-Kali-Pi/Archive/Kali-Pi.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Re4son/re4son-kernel-builder/HEAD/Logo-Kali-Pi/Archive/Kali-Pi.xcf -------------------------------------------------------------------------------- /Logo-Kali-Pi/Archive/index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Re4son/re4son-kernel-builder/HEAD/Logo-Kali-Pi/Archive/index.png -------------------------------------------------------------------------------- /tools/libts-bin_1.0-11_armhf.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Re4son/re4son-kernel-builder/HEAD/tools/libts-bin_1.0-11_armhf.deb -------------------------------------------------------------------------------- /Logo-Kali-Pi/Archive/Kali-Pi-1.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Re4son/re4son-kernel-builder/HEAD/Logo-Kali-Pi/Archive/Kali-Pi-1.xcf -------------------------------------------------------------------------------- /docs/3-2_Zoll_DisplayV2_032016.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Re4son/re4son-kernel-builder/HEAD/docs/3-2_Zoll_DisplayV2_032016.pdf -------------------------------------------------------------------------------- /repo/bluez-firmware_1.2-3_all.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Re4son/re4son-kernel-builder/HEAD/repo/bluez-firmware_1.2-3_all.deb -------------------------------------------------------------------------------- /Logo-Kali-Pi/Archive/kali-linux.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Re4son/re4son-kernel-builder/HEAD/Logo-Kali-Pi/Archive/kali-linux.png -------------------------------------------------------------------------------- /repo/libreadline6_6.3-8+b3_armel.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Re4son/re4son-kernel-builder/HEAD/repo/libreadline6_6.3-8+b3_armel.deb -------------------------------------------------------------------------------- /repo/libreadline6_6.3-8+b3_armhf.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Re4son/re4son-kernel-builder/HEAD/repo/libreadline6_6.3-8+b3_armhf.deb -------------------------------------------------------------------------------- /repo/pi-bluetooth+re4son_2.2_all.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Re4son/re4son-kernel-builder/HEAD/repo/pi-bluetooth+re4son_2.2_all.deb -------------------------------------------------------------------------------- /Logo-Kali-Pi/Archive/Kali-Pi-Large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Re4son/re4son-kernel-builder/HEAD/Logo-Kali-Pi/Archive/Kali-Pi-Large.png -------------------------------------------------------------------------------- /Logo-Kali-Pi/Archive/Kali-Pi-Large.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Re4son/re4son-kernel-builder/HEAD/Logo-Kali-Pi/Archive/Kali-Pi-Large.xcf -------------------------------------------------------------------------------- /repo/bluez_5.39-1+rpi1+re4son_armel.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Re4son/re4son-kernel-builder/HEAD/repo/bluez_5.39-1+rpi1+re4son_armel.deb -------------------------------------------------------------------------------- /repo/bluez_5.39-1+rpi3+re4son_armhf.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Re4son/re4son-kernel-builder/HEAD/repo/bluez_5.39-1+rpi3+re4son_armhf.deb -------------------------------------------------------------------------------- /repo/pi-bluetooth_0.1.4+re4son_all.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Re4son/re4son-kernel-builder/HEAD/repo/pi-bluetooth_0.1.4+re4son_all.deb -------------------------------------------------------------------------------- /tools/xinput-calibrator_0.7.5-1_armhf.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Re4son/re4son-kernel-builder/HEAD/tools/xinput-calibrator_0.7.5-1_armhf.deb -------------------------------------------------------------------------------- /firmware/50-bluetooth-hci-auto-poweron.rules: -------------------------------------------------------------------------------- 1 | # Set bluetooth power up 2 | ACTION=="add", SUBSYSTEM=="bluetooth", KERNEL=="hci[0-9]*", RUN+="/bin/hciconfig %k up" 3 | -------------------------------------------------------------------------------- /tools/mon0down: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "++ Shutting mon0 down" 3 | ifconfig mon0 down && iw dev mon0 del 4 | echo "++ mon0 should no longer exist:" 5 | ip link show dev mon0 6 | -------------------------------------------------------------------------------- /nexmon/tools/mon0down: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "++ Shutting mon0 down" 3 | ifconfig mon0 down && iw dev mon0 del 4 | echo "++ mon0 should no longer exist:" 5 | ip link show dev mon0 6 | -------------------------------------------------------------------------------- /tools/mon0up: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "++ Bringing mon0 up" 3 | iw phy phy0 interface add mon0 type monitor && ifconfig mon0 up 4 | echo "++ mon0 should be up:" 5 | ip link show dev mon0 6 | -------------------------------------------------------------------------------- /nexmon/tools/mon0up: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "++ Bringing mon0 up" 3 | iw phy phy0 interface add mon0 type monitor && ifconfig mon0 up 4 | echo "++ mon0 should be up:" 5 | ip link show dev mon0 6 | -------------------------------------------------------------------------------- /Logo-Kali-Pi/Archive/dragons_linux_backtrack_5_hd-wallpaper-3027368.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Re4son/re4son-kernel-builder/HEAD/Logo-Kali-Pi/Archive/dragons_linux_backtrack_5_hd-wallpaper-3027368.jpg -------------------------------------------------------------------------------- /nexmon/nexmon.txt: -------------------------------------------------------------------------------- 1 | To install drivers: 2 | ------------------- 3 | Nexmon drivers and firmware can be installed using the re4son kernel installer. 4 | The drivers are installed for the running kernel. 5 | Please reboot after installing a new kernel, before installing these drivers. 6 | 7 | 8 | To install the drivers: 9 | ----------------------- 10 | cd into the re4son-kernel install directory and run 11 | 12 | ./install.sh -x 13 | 14 | 15 | To remove the drivers: 16 | ---------------------- 17 | cd into the re4son-kernel install directory and run 18 | 19 | ./install.sh -o 20 | 21 | 22 | Example use: 23 | ------------ 24 | nexutil -m2 25 | 26 | tcpdump -i wlan0 -s0 27 | 28 | nexutil -m0 29 | -------------------------------------------------------------------------------- /patches/0002-add-28c-to-overlay-makefile.patch: -------------------------------------------------------------------------------- 1 | From 8e09501a41ed3fe3fd98d0285dfdcabada013639 Mon Sep 17 00:00:00 2001 2 | From: Todd Treece 3 | Date: Tue, 16 May 2017 20:45:59 +0000 4 | Subject: [PATCH 2/8] add 28c to overlay makefile 5 | 6 | --- 7 | arch/arm/boot/dts/overlays/Makefile | 1 + 8 | 1 file changed, 1 insertion(+) 9 | 10 | diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile 11 | index e2f66a55dc5a..8d052cf22f85 100644 12 | --- a/arch/arm/boot/dts/overlays/Makefile 13 | +++ b/arch/arm/boot/dts/overlays/Makefile 14 | @@ -67,6 +67,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ 15 | pisound.dtbo \ 16 | pitft22.dtbo \ 17 | pitft28-capacitive.dtbo \ 18 | + pitft28c.dtbo \ 19 | pitft28-resistive.dtbo \ 20 | pitft35-resistive.dtbo \ 21 | pps-gpio.dtbo \ 22 | -- 23 | 2.11.0 24 | 25 | -------------------------------------------------------------------------------- /patches/0001-add-u32-mntr_flags-for-wifi-injection-patch.patch: -------------------------------------------------------------------------------- 1 | From 29fcebec80c3b5534d8317a5a4fbdd6e2b4bd790 Mon Sep 17 00:00:00 2001 2 | From: Re4son Protagonist 3 | Date: Wed, 7 Jun 2017 12:13:07 +1000 4 | Subject: [PATCH] add u32 mntr_flags for wifi injection patch 5 | 6 | --- 7 | net/mac80211/ieee80211_i.h | 1 + 8 | 1 file changed, 1 insertion(+) 9 | 10 | diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h 11 | index 34c2add2c455..bbd855dfeabc 100644 12 | --- a/net/mac80211/ieee80211_i.h 13 | +++ b/net/mac80211/ieee80211_i.h 14 | @@ -948,6 +948,7 @@ struct ieee80211_sub_if_data { 15 | struct ieee80211_if_ocb ocb; 16 | struct ieee80211_if_mntr mntr; 17 | struct ieee80211_if_nan nan; 18 | + u32 mntr_flags; 19 | } u; 20 | 21 | #ifdef CONFIG_MAC80211_DEBUGFS 22 | -- 23 | 2.11.0 24 | 25 | -------------------------------------------------------------------------------- /patches/0007-remove-mach-platform-include-from-rpi_power_switch.patch: -------------------------------------------------------------------------------- 1 | From e44c7319617571eeb2bf3c8cde097dfea94e2759 Mon Sep 17 00:00:00 2001 2 | From: Todd Treece 3 | Date: Wed, 17 May 2017 12:47:17 +0000 4 | Subject: [PATCH 7/8] remove mach/platform include from rpi_power_switch 5 | 6 | --- 7 | drivers/power/reset/rpi_power_switch.c | 1 - 8 | 1 file changed, 1 deletion(-) 9 | 10 | diff --git a/drivers/power/reset/rpi_power_switch.c b/drivers/power/reset/rpi_power_switch.c 11 | index a6a9e70d6039..049af002122a 100644 12 | --- a/drivers/power/reset/rpi_power_switch.c 13 | +++ b/drivers/power/reset/rpi_power_switch.c 14 | @@ -22,7 +22,6 @@ 15 | #include 16 | #include 17 | #include 18 | -#include 19 | 20 | 21 | /* the BCM2709 redefines this for us right! 22 | -- 23 | 2.11.0 24 | 25 | -------------------------------------------------------------------------------- /firmware/99-com.rules: -------------------------------------------------------------------------------- 1 | SUBSYSTEM=="input", GROUP="input", MODE="0660" 2 | SUBSYSTEM=="i2c-dev", GROUP="i2c", MODE="0660" 3 | SUBSYSTEM=="spidev", GROUP="spi", MODE="0660" 4 | SUBSYSTEM=="bcm2835-gpiomem", GROUP="gpio", MODE="0660" 5 | 6 | SUBSYSTEM=="gpio*", PROGRAM="/bin/sh -c '\ 7 | chown -R root:gpio /sys/class/gpio && chmod -R 770 /sys/class/gpio;\ 8 | chown -R root:gpio /sys/devices/virtual/gpio && chmod -R 770 /sys/devices/virtual/gpio;\ 9 | chown -R root:gpio /sys$devpath && chmod -R 770 /sys$devpath\ 10 | '" 11 | 12 | KERNEL=="ttyAMA[01]", PROGRAM="/bin/sh -c '\ 13 | ALIASES=/proc/device-tree/aliases; \ 14 | if cmp -s $ALIASES/uart0 $ALIASES/serial0; then \ 15 | echo 0;\ 16 | elif cmp -s $ALIASES/uart0 $ALIASES/serial1; then \ 17 | echo 1; \ 18 | else \ 19 | exit 1; \ 20 | fi\ 21 | '", SYMLINK+="serial%c" 22 | 23 | KERNEL=="ttyS0", PROGRAM="/bin/sh -c '\ 24 | ALIASES=/proc/device-tree/aliases; \ 25 | if cmp -s $ALIASES/uart1 $ALIASES/serial0; then \ 26 | echo 0; \ 27 | elif cmp -s $ALIASES/uart1 $ALIASES/serial1; then \ 28 | echo 1; \ 29 | else \ 30 | exit 1; \ 31 | fi \ 32 | '", SYMLINK+="serial%c" 33 | -------------------------------------------------------------------------------- /patches/0008-power-switch-add-PERI_BASE-define.patch: -------------------------------------------------------------------------------- 1 | From 1418a05a5d81ef829418767bf53e3cd93fc38a55 Mon Sep 17 00:00:00 2001 2 | From: Todd Treece 3 | Date: Wed, 17 May 2017 13:17:03 +0000 4 | Subject: [PATCH 8/8] power switch: add PERI_BASE define 5 | 6 | --- 7 | drivers/power/reset/rpi_power_switch.c | 11 +++++++---- 8 | 1 file changed, 7 insertions(+), 4 deletions(-) 9 | 10 | diff --git a/drivers/power/reset/rpi_power_switch.c b/drivers/power/reset/rpi_power_switch.c 11 | index 049af002122a..84fe66a87937 100644 12 | --- a/drivers/power/reset/rpi_power_switch.c 13 | +++ b/drivers/power/reset/rpi_power_switch.c 14 | @@ -24,10 +24,13 @@ 15 | #include 16 | 17 | 18 | -/* the BCM2709 redefines this for us right! 19 | -#define BCM2708_PERI_BASE 0x20000000 20 | -*/ 21 | -#define GPIO_BASE (BCM2708_PERI_BASE + 0x200000) 22 | +#ifdef RPI2 23 | +#define PERI_BASE 0x3F000000 24 | +#else 25 | +#define PERI_BASE 0x20000000 26 | +#endif 27 | + 28 | +#define GPIO_BASE (PERI_BASE + 0x200000) 29 | 30 | #define GPPUD (gpio_reg+0x94) 31 | #define GPPUDCLK0 (gpio_reg+0x98) 32 | -- 33 | 2.11.0 34 | 35 | -------------------------------------------------------------------------------- /dts/elecfreaks22-overlay.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Device Tree overlay for 2.2" SPI TFT from Elecfreaks 3 | * 4 | */ 5 | 6 | /dts-v1/; 7 | /plugin/; 8 | 9 | / { 10 | compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709"; 11 | 12 | fragment@0 { 13 | target = <&spi0>; 14 | __overlay__ { 15 | status = "okay"; 16 | 17 | spidev@0{ 18 | status = "disabled"; 19 | }; 20 | 21 | spidev@1{ 22 | status = "disabled"; 23 | }; 24 | }; 25 | }; 26 | 27 | fragment@1 { 28 | target = <&gpio>; 29 | __overlay__ { 30 | rpi_display_pins: rpi_display_pins { 31 | brcm,pins = <18 23 24>; 32 | brcm,function = <1 1 1>; /* out out out in */ 33 | }; 34 | }; 35 | }; 36 | 37 | fragment@2 { 38 | target = <&spi0>; 39 | __overlay__ { 40 | /* needed to avoid dtc warning */ 41 | #address-cells = <1>; 42 | #size-cells = <0>; 43 | 44 | rpidisplay: rpi-display@0{ 45 | compatible = "ilitek,ili9341"; 46 | reg = <0>; 47 | pinctrl-names = "default"; 48 | pinctrl-0 = <&rpi_display_pins>; 49 | 50 | spi-max-frequency = <32000000>; 51 | rotate = <270>; 52 | bgr; 53 | fps = <30>; 54 | buswidth = <8>; 55 | reset-gpios = <&gpio 23 0>; 56 | dc-gpios = <&gpio 24 0>; 57 | led-gpios = <&gpio 18 1>; 58 | debug = <0>; 59 | }; 60 | }; 61 | }; 62 | __overrides__ { 63 | speed = <&rpidisplay>,"spi-max-frequency:0"; 64 | rotate = <&rpidisplay>,"rotate:0"; 65 | fps = <&rpidisplay>,"fps:0"; 66 | debug = <&rpidisplay>,"debug:0"; 67 | }; 68 | }; 69 | -------------------------------------------------------------------------------- /tools/compile_overlays.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # The MIT License (MIT) 4 | # 5 | # Copyright (c) 2015 Adafruit 6 | # Copyright (c) 2016 Re4son, added support for dtbo required after linux 7 | # kernel version 4.4 8 | # Permission is hereby granted, free of charge, to any person obtaining a copy 9 | # of this software and associated documentation files (the "Software"), to deal 10 | # in the Software without restriction, including without limitation the rights 11 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | # copies of the Software, and to permit persons to whom the Software is 13 | # furnished to do so, subject to the following conditions: 14 | # 15 | # The above copyright notice and this permission notice shall be included in 16 | # all copies or substantial portions of the Software. 17 | # 18 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | # THE SOFTWARE. 25 | 26 | 27 | for f in ../dts/*.dts; do 28 | dtb=${f#../dts/} 29 | dtb=${dtb%.*} 30 | dtbo=${dtb%-overlay} 31 | echo "compiling ${dtb}.dtb" 32 | dtc -@ -I dts -O dtb -o ../boot/overlays/${dtb}.dtb $f 33 | echo "compiling ${dtbo}.dtbo" 34 | dtc -@ -O dtb -o ../boot/overlays/${dtbo}.dtbo -b 0 $f 35 | chmod +x ../boot/overlays/${dtb}.dtb 36 | chmod +x ../boot/overlays/${dtbo}.dtbo 37 | done 38 | 39 | -------------------------------------------------------------------------------- /tools/dtc.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | check_dpkg () { 4 | LC_ALL=C dpkg --list | awk '{print $2}' | grep "^${pkg}" >/dev/null || deb_pkgs="${deb_pkgs}${pkg} " 5 | } 6 | 7 | unset deb_pkgs 8 | pkg="bison" 9 | check_dpkg 10 | pkg="build-essential" 11 | check_dpkg 12 | pkg="flex" 13 | check_dpkg 14 | pkg="git-core" 15 | check_dpkg 16 | 17 | if [ "${deb_pkgs}" ] ; then 18 | echo "Installing: ${deb_pkgs}" 19 | sudo apt-get update 20 | sudo apt-get -y install ${deb_pkgs} 21 | sudo apt-get clean 22 | fi 23 | 24 | #git_sha="origin/master" 25 | #git_sha="27cdc1b16f86f970c3c049795d4e71ad531cca3d" 26 | #git_sha="fdc7387845420168ee5dd479fbe4391ff93bddab" 27 | git_sha="65cc4d2748a2c2e6f27f1cf39e07a5dbabd80ebf" 28 | project="dtc" 29 | server="git://git.kernel.org/pub/scm/linux/kernel/git/jdl" 30 | 31 | if [ ! -f ${HOME}/git/${project}/.git/config ] ; then 32 | git clone ${server}/${project}.git ${HOME}/git/${project}/ 33 | fi 34 | 35 | if [ ! -f ${HOME}/git/${project}/.git/config ] ; then 36 | rm -rf ${HOME}/git/${project}/ || true 37 | echo "error: git failure, try re-runing" 38 | exit 39 | fi 40 | 41 | unset old_address 42 | old_address=$(cat ${HOME}/git/${project}/.git/config | grep "jdl.com" || true) 43 | if [ ! "x${old_address}" = "x" ] ; then 44 | sed -i -e 's:git.jdl.com/software:git.kernel.org/pub/scm/linux/kernel/git/jdl:g' ${HOME}/git/${project}/.git/config 45 | fi 46 | 47 | cd ${HOME}/git/${project}/ 48 | make clean 49 | git checkout master -f 50 | git pull || true 51 | 52 | test_for_branch=$(git branch --list ${git_sha}-build) 53 | if [ "x${test_for_branch}" != "x" ] ; then 54 | git branch ${git_sha}-build -D 55 | fi 56 | 57 | git checkout ${git_sha} -b ${git_sha}-build 58 | git pull git://github.com/RobertCNelson/dtc.git dtc-fixup-65cc4d2 59 | 60 | make clean 61 | make PREFIX=/usr/local/ CC=gcc CROSS_COMPILE= all 62 | echo "Installing into: /usr/local/bin/" 63 | sudo make PREFIX=/usr/local/ install 64 | -------------------------------------------------------------------------------- /dts/waveshare32b-overlay.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Device Tree overlay for waveshare 3.2inch TFT LCD 3 | * 4 | */ 5 | 6 | /dts-v1/; 7 | /plugin/; 8 | 9 | / { 10 | compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709"; 11 | 12 | fragment@0 { 13 | target = <&spi0>; 14 | __overlay__ { 15 | status = "okay"; 16 | 17 | spidev@0{ 18 | status = "disabled"; 19 | }; 20 | 21 | spidev@1{ 22 | status = "disabled"; 23 | }; 24 | }; 25 | }; 26 | 27 | fragment@1 { 28 | target = <&gpio>; 29 | __overlay__ { 30 | waveshare32b_pins: waveshare32b_pins { 31 | brcm,pins = <17 27 22>; 32 | brcm,function = <0 0 0>; /* in in in */ 33 | }; 34 | }; 35 | }; 36 | 37 | fragment@2 { 38 | target = <&spi0>; 39 | __overlay__ { 40 | /* needed to avoid dtc warning */ 41 | #address-cells = <1>; 42 | #size-cells = <0>; 43 | 44 | waveshare32b: waveshare32b@0{ 45 | compatible = "ilitek,ili9340"; 46 | reg = <0>; 47 | pinctrl-names = "default"; 48 | pinctrl-0 = <&waveshare32b_pins>; 49 | 50 | spi-max-frequency = <16000000>; 51 | rotate = <90>; 52 | fps = <25>; 53 | bgr; 54 | buswidth = <8>; 55 | reset-gpios = <&gpio 27 0>; 56 | dc-gpios = <&gpio 22 0>; 57 | debug = <0>; 58 | }; 59 | 60 | waveshare32b_ts: waveshare32b-ts@1 { 61 | compatible = "ti,ads7846"; 62 | reg = <1>; 63 | 64 | spi-max-frequency = <2000000>; 65 | interrupts = <17 2>; /* high-to-low edge triggered */ 66 | interrupt-parent = <&gpio>; 67 | pendown-gpio = <&gpio 17 0>; 68 | ti,x-plate-ohms = /bits/ 16 <60>; 69 | ti,pressure-max = /bits/ 16 <255>; 70 | }; 71 | }; 72 | }; 73 | 74 | __overrides__ { 75 | speed = <&waveshare32b>,"spi-max-frequency:0"; 76 | rotate = <&waveshare32b>,"rotate:0"; 77 | fps = <&waveshare32b>,"fps:0"; 78 | debug = <&waveshare32b>,"debug:0"; 79 | swapxy = <&waveshare32b_ts>,"swap-xy?"; 80 | }; 81 | }; 82 | -------------------------------------------------------------------------------- /setup.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # The MIT License (MIT) 4 | # 5 | # Copyright (c) 2015 Adafruit 6 | # Copyright (c) 2016 Re4son, redesigned for standalone use, latest toolchain, 7 | # firmware and kernel versions 8 | # 9 | # Permission is hereby granted, free of charge, to any person obtaining a copy 10 | # of this software and associated documentation files (the "Software"), to deal 11 | # in the Software without restriction, including without limitation the rights 12 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | # copies of the Software, and to permit persons to whom the Software is 14 | # furnished to do so, subject to the following conditions: 15 | # 16 | # The above copyright notice and this permission notice shall be included in 17 | # all copies or substantial portions of the Software. 18 | # 19 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | # THE SOFTWARE. 26 | 27 | apt-get update 28 | apt-get install -y git rsync bc unzip build-essential libncurses5-dev debhelper quilt devscripts emacs vim 29 | 30 | ## Download calibration tool to be included in kernel packages 31 | wget -P ./tools/ http://whitedome.com.au/download/xinput-calibrator_0.7.5-1_armhf.deb 32 | 33 | if [ -L /usr/sbin/re4sonbuild ]; then 34 | rm /usr/sbin/re4sonbuild 35 | fi 36 | 37 | ## Adjust this: 38 | ln -s /opt/re4son-kernel-builder/build.sh /usr/sbin/re4sonbuild 39 | chmod +x /opt/re4son-kernel-builder/build.sh 40 | 41 | if ! grep -Fq "Re4son" ~/.bashrc; then 42 | echo 'export EMAIL="re4son@users.noreply.github.com"' >> ~/.bashrc 43 | echo 'export DEBFULLNAME="Re4son"' >> ~/.bashrc 44 | fi 45 | -------------------------------------------------------------------------------- /dts/sainsmart32-overlay.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Device Tree overlay for Sainsmart 3.2" Display by Alexander Lehmann 3 | * 4 | */ 5 | 6 | /dts-v1/; 7 | /plugin/; 8 | 9 | / { 10 | compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709"; 11 | 12 | fragment@0 { 13 | target = <&spi0>; 14 | __overlay__ { 15 | status = "okay"; 16 | 17 | spidev@0{ 18 | status = "disabled"; 19 | }; 20 | 21 | spidev@1{ 22 | status = "disabled"; 23 | }; 24 | }; 25 | }; 26 | 27 | fragment@1 { 28 | target = <&gpio>; 29 | __overlay__ { 30 | disp_pins: disp_pins { 31 | brcm,pins = <17 24 25>; 32 | brcm,function = <0 1 1>; /* in out out */ 33 | }; 34 | }; 35 | }; 36 | 37 | fragment@2 { 38 | target = <&spi0>; 39 | __overlay__ { 40 | /* needed to avoid dtc warning */ 41 | #address-cells = <1>; 42 | #size-cells = <0>; 43 | 44 | disp: disp@0{ 45 | compatible = "solomon,ssd1289"; 46 | reg = <0>; 47 | 48 | pinctrl-names = "default"; 49 | pinctrl-0 = <&disp_pins>; 50 | buswidth = <8>; 51 | bgr; 52 | 53 | spi-max-frequency = <16000000>; 54 | rotate = <90>; 55 | reset-gpios = <&gpio 25 0>; 56 | dc-gpios = <&gpio 24 1>; 57 | debug = <3>; 58 | }; 59 | 60 | touch: touch@1 { 61 | compatible = "ti,ads7846"; 62 | reg = <1>; 63 | 64 | spi-max-frequency = <2000000>; 65 | interrupts = <17 2>; 66 | interrupt-parent = <&gpio>; 67 | pendown-gpio = <&gpio 17 0>; 68 | 69 | ti,x-min = /bits/ 16 <300>; 70 | ti,x-max = /bits/ 16 <3800>; 71 | ti,y-min = /bits/ 16 <700>; 72 | ti,y-max = /bits/ 16 <3400>; 73 | 74 | ti,keep-vref-on; 75 | ti,swap-xy; 76 | ti,x-plate-ohms = /bits/ 16 <60>; 77 | ti,pressure-max = /bits/ 16 <255>; 78 | }; 79 | }; 80 | }; 81 | __overrides__ { 82 | speed = <&disp>,"spi-max-frequency:0"; 83 | rotate = <&disp>,"rotate:0"; 84 | debug = <&disp>,"debug:0"; 85 | xohms = <&touch>,"ti,x-plate-ohms;0"; 86 | resetgpio = <&disp>,"reset-gpios:4", 87 | <&disp_pins>, "brcm,pins:1"; 88 | dcgpio = <&disp>,"dc-gpios:4", 89 | <&disp_pins>, "brcm,pins:2"; 90 | }; 91 | }; 92 | -------------------------------------------------------------------------------- /docs/INSTALL: -------------------------------------------------------------------------------- 1 | # Installation 2 | 3 | Copy the custom kernel tar.gz archive to your Raspberry Pi, and use 4 | the `tar` command to extract the archive. In the example, the archive 5 | we will be using is called `re4son_pi-tft_kali-kernel_1.20150207-1.tar.gz`. Replace 6 | the name of the example archive with the name of the pitft kernel 7 | tar.gz archive. 8 | 9 | ``` 10 | $ tar xf re4son_kali-pi-tft_kernel_1.20160513-1.tar.gz 11 | ``` 12 | 13 | You can now `cd` into the extracted folder. The extracted 14 | folder will have the same name as the archive, minus the 15 | .tar.gz suffix. 16 | 17 | ``` 18 | $ cd re4son_kali-pi-tft_kernel_1.20160513-1 19 | ``` 20 | 21 | Now you are ready to run the install script. **Warning!** *Installing 22 | a broken kernel can render your Raspberry Pi unusable. Please backup 23 | your SD card before continuing.* 24 | 25 | ``` 26 | $ sudo ./install.sh 27 | ``` 28 | 29 | If you see an error message, the kernel install failed. If everything goes 30 | well, you will see this message: **Kernel install complete!**. You will 31 | need to reboot for the changes to take effect but you can continue with the 32 | setup of your screen and reboot later. 33 | 34 | Just press "N" when prompted to reboot and continue with the setup of your TFT screen. 35 | 36 | You can now run the Re4son Universal TFT Setup Tool to configure the system for your TFT screen. 37 | The command syntax is: 38 | 39 | ``` 40 | $ sudo ./re4son-pi-tft-setup -t 41 | ``` 42 | 43 | The following types are supported: 44 | 45 | '28r' (Adafruit 2.8" PID 1601) 46 | '28c' (Adafruit 2.8" PID 1983) 47 | '35r' (Adafruit 3.5") 48 | '22' (Adafruit 2.2") 49 | 'elec22' (Elecfreak 2.2") 50 | 'jb35' (JBTek 3.5") 51 | 'sain32' (Sainsmart 3.2") 52 | 'wave32' (Waveshare 3.2") 53 | 'wave35' (Waveshare 3.5") 54 | 55 | Example command for setting up an Adafruit PiTFT 3.5" on a typical Kali Linux system: 56 | 57 | ``` 58 | ./re4son-pi-tft-setup -t 35r -u /root 59 | ``` 60 | 61 | Press 'Y' when prompted to reboot. 62 | 63 | If you have any problems with the kernel, please file an issue on GitHub: 64 | https://github.com/Re4son/re4son-raspberrypi-linux/issues 65 | 66 | For any other feedback or questions, please join the discussions in our forum: 67 | https://whitedome.com.au/re4son/forums/ 68 | -------------------------------------------------------------------------------- /dts/pitft22-overlay.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Device Tree overlay for pitft by Adafruit 3 | * 4 | */ 5 | 6 | /dts-v1/; 7 | /plugin/; 8 | 9 | / { 10 | compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709"; 11 | 12 | fragment@0 { 13 | target = <&spi0>; 14 | __overlay__ { 15 | status = "okay"; 16 | 17 | spidev@0{ 18 | status = "disabled"; 19 | }; 20 | 21 | spidev@1{ 22 | status = "disabled"; 23 | }; 24 | }; 25 | }; 26 | 27 | fragment@1 { 28 | target = <&gpio>; 29 | __overlay__ { 30 | pitft_pins: pitft_pins { 31 | brcm,pins = <25>; 32 | brcm,function = <1>; /* out */ 33 | brcm,pull = <0>; /* none */ 34 | }; 35 | }; 36 | }; 37 | 38 | fragment@2 { 39 | target = <&spi0>; 40 | __overlay__ { 41 | /* needed to avoid dtc warning */ 42 | #address-cells = <1>; 43 | #size-cells = <0>; 44 | 45 | pitft: pitft@0{ 46 | compatible = "ilitek,ili9340"; 47 | reg = <0>; 48 | pinctrl-names = "default"; 49 | pinctrl-0 = <&pitft_pins>; 50 | 51 | spi-max-frequency = <32000000>; 52 | rotate = <90>; 53 | fps = <25>; 54 | bgr; 55 | buswidth = <8>; 56 | dc-gpios = <&gpio 25 0>; 57 | debug = <0>; 58 | }; 59 | 60 | }; 61 | }; 62 | 63 | __overrides__ { 64 | speed = <&pitft>,"spi-max-frequency:0"; 65 | rotate = <&pitft>,"rotate:0"; 66 | fps = <&pitft>,"fps:0"; 67 | debug = <&pitft>,"debug:0"; 68 | }; 69 | }; 70 | -------------------------------------------------------------------------------- /dts/jbtek-overlay.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Device Tree overlay for PiScreen 3.5" display shield by Ozzmaker 3 | * 4 | */ 5 | 6 | /dts-v1/; 7 | /plugin/; 8 | 9 | / { 10 | compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709"; 11 | 12 | fragment@0 { 13 | target = <&spi0>; 14 | __overlay__ { 15 | status = "okay"; 16 | 17 | spidev@0{ 18 | status = "disabled"; 19 | }; 20 | 21 | spidev@1{ 22 | status = "disabled"; 23 | }; 24 | }; 25 | }; 26 | 27 | fragment@1 { 28 | target = <&gpio>; 29 | __overlay__ { 30 | jbtek_pins: jbtek_pins { 31 | brcm,pins = <17 25 24 22>; 32 | brcm,function = <0 1 1 1>; /* in out out out */ 33 | }; 34 | }; 35 | }; 36 | 37 | fragment@2 { 38 | target = <&spi0>; 39 | __overlay__ { 40 | /* needed to avoid dtc warning */ 41 | #address-cells = <1>; 42 | #size-cells = <0>; 43 | 44 | jbtek: jbtek@0{ 45 | compatible = "ilitek,ili9486"; 46 | reg = <0>; 47 | pinctrl-names = "default"; 48 | pinctrl-0 = <&jbtek_pins>; 49 | 50 | spi-max-frequency = <16000000>; 51 | rotate = <90>; 52 | bgr; 53 | fps = <30>; 54 | buswidth = <8>; 55 | regwidth = <16>; 56 | reset-gpios = <&gpio 25 0>; 57 | dc-gpios = <&gpio 24 0>; 58 | led-gpios = <&gpio 22 1>; 59 | debug = <0>; 60 | 61 | init = <0x10000b0 0x00 62 | 0x1000011 63 | 0x20000ff 64 | 0x100003a 0x55 65 | 0x1000036 0x28 66 | 0x10000c2 0x44 67 | 0x10000c5 0x00 0x00 0x00 0x00 68 | 0x10000e0 0x0f 0x1f 0x1c 0x0c 0x0f 0x08 0x48 0x98 0x37 0x0a 0x13 0x04 0x11 0x0d 0x00 69 | 0x10000e1 0x0f 0x32 0x2e 0x0b 0x0d 0x05 0x47 0x75 0x37 0x06 0x10 0x03 0x24 0x20 0x00 70 | 0x10000e2 0x0f 0x32 0x2e 0x0b 0x0d 0x05 0x47 0x75 0x37 0x06 0x10 0x03 0x24 0x20 0x00 71 | /* piscreen -> jbtek */ 72 | 0x1000036 0x28 73 | 0x1000011 74 | 0x1000029>; 75 | }; 76 | 77 | jbtek-ts@1 { 78 | compatible = "ti,ads7846"; 79 | reg = <1>; 80 | 81 | spi-max-frequency = <2000000>; 82 | interrupts = <17 2>; /* high-to-low edge triggered */ 83 | interrupt-parent = <&gpio>; 84 | pendown-gpio = <&gpio 17 0>; 85 | ti,x-plate-ohms = /bits/ 16 <60>; 86 | ti,pressure-max = /bits/ 16 <255>; 87 | }; 88 | }; 89 | }; 90 | __overrides__ { 91 | speed = <&jbtek>,"spi-max-frequency:0"; 92 | rotate = <&jbtek>,"rotate:0"; 93 | fps = <&jbtek>,"fps:0"; 94 | debug = <&jbtek>,"debug:0"; 95 | }; 96 | }; 97 | -------------------------------------------------------------------------------- /srv-tools/sdcard/write-sdcard: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | if [[ $EUID -ne 0 ]]; then 3 | printf "\n\t\t$(basename $0) must be run as root.\n\t\ttry: sudo $(basename $0) \n\n" 4 | exit 1 5 | fi 6 | 7 | if [ -z "$1" ] 8 | then 9 | printf "\n\t\tError: Missing file name\n" 10 | printf "\t\tUsage: sudo $(basename $0) \n\n" 11 | exit 1 12 | fi 13 | 14 | if [ ! -f "$1" ] 15 | then 16 | printf "\n\t\tError: File does not exist\n" 17 | printf "\t\tUsage: sudo $(basename $0) \n\n" 18 | exit 1 19 | fi 20 | 21 | DEST="/dev/mmcblk0" 22 | BS="32MB" 23 | IMG_FILE=$1 24 | EXTENSION="${IMG_FILE##*.}" 25 | 26 | function ask() { 27 | # http://djm.me/ask 28 | while true; do 29 | 30 | if [ "${2:-}" = "Y" ]; then 31 | prompt="Y/n" 32 | default=Y 33 | elif [ "${2:-}" = "N" ]; then 34 | prompt="y/N" 35 | default=N 36 | else 37 | prompt="y/n" 38 | default= 39 | fi 40 | 41 | # Ask the question 42 | read -p "$1 [$prompt] " REPLY 43 | 44 | # Default? 45 | if [ -z "$REPLY" ]; then 46 | REPLY=$default 47 | fi 48 | 49 | # Check if the reply is valid 50 | case "$REPLY" in 51 | Y*|y*) return 0 ;; 52 | N*|n*) return 1 ;; 53 | esac 54 | done 55 | } 56 | 57 | 58 | printf "\n\nSource image:\n" 59 | printf "=================\n" 60 | ls -lh $IMG_FILE 61 | printf "Compression: " 62 | if [ $EXTENSION = "xz" ]; then 63 | printf "xz\n" 64 | elif [ $EXTENSION = "img" ]; then 65 | printf "none\n" 66 | else 67 | printf "not sure\n" 68 | fi 69 | printf "\n\nDestination SD-Card:\n" 70 | printf "========================\n" 71 | fdisk -l $DEST 72 | 73 | if ask "Continue?" "N"; then 74 | printf "*** Start writing to SD-Card at `date +%H:%M:%S`\n" 75 | SECONDS=0 76 | if [ $EXTENSION = "xz" ]; then 77 | xzcat -T 0 $IMG_FILE | dd of=$DEST bs=$BS status=progress;sync 78 | elif [ $EXTENSION = "img" ]; then 79 | dd if=$IMG_FILE of=$DEST bs=$BS status=progress;sync 80 | else 81 | printf "\n\t\t!!! Unknown file type, aborting !!!\n\n" 82 | exit 1 83 | fi 84 | duration=$SECONDS 85 | printf "*** Finish writing to SD-Card at `date +%H:%M:%S`, after $(($duration / 60)) minutes and $(($duration % 60)) seconds\n\n" 86 | 87 | else 88 | exit 1 89 | fi 90 | 91 | exit 0 92 | -------------------------------------------------------------------------------- /dts/waveshare35a-overlay.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Device Tree overlay for waveshare 3.5inch TFT LCD 3 | * 4 | */ 5 | 6 | /dts-v1/; 7 | /plugin/; 8 | 9 | / { 10 | compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709"; 11 | 12 | fragment@0 { 13 | target = <&spi0>; 14 | __overlay__ { 15 | status = "okay"; 16 | 17 | spidev@0{ 18 | status = "disabled"; 19 | }; 20 | 21 | spidev@1{ 22 | status = "disabled"; 23 | }; 24 | }; 25 | }; 26 | 27 | fragment@1 { 28 | target = <&gpio>; 29 | __overlay__ { 30 | waveshare35a_pins: waveshare35a_pins { 31 | brcm,pins = <17 25 24>; 32 | brcm,function = <0 0 0>; /* in in in */ 33 | }; 34 | }; 35 | }; 36 | 37 | fragment@2 { 38 | target = <&spi0>; 39 | __overlay__ { 40 | /* needed to avoid dtc warning */ 41 | #address-cells = <1>; 42 | #size-cells = <0>; 43 | 44 | waveshare35a: waveshare35a@0{ 45 | compatible = "ilitek,ili9486"; 46 | reg = <0>; 47 | pinctrl-names = "default"; 48 | pinctrl-0 = <&waveshare35a_pins>; 49 | 50 | spi-max-frequency = <16000000>; 51 | rotate = <90>; 52 | bgr; 53 | fps = <30>; 54 | buswidth = <8>; 55 | regwidth = <16>; 56 | reset-gpios = <&gpio 25 0>; 57 | dc-gpios = <&gpio 24 0>; 58 | debug = <0>; 59 | 60 | init = <0x10000b0 0x00 61 | 0x1000011 62 | 0x20000ff 63 | 0x100003a 0x55 64 | 0x1000036 0x28 65 | 0x10000c2 0x44 66 | 0x10000c5 0x00 0x00 0x00 0x00 67 | 0x10000e0 0x0f 0x1f 0x1c 0x0c 0x0f 0x08 0x48 0x98 0x37 0x0a 0x13 0x04 0x11 0x0d 0x00 68 | 0x10000e1 0x0f 0x32 0x2e 0x0b 0x0d 0x05 0x47 0x75 0x37 0x06 0x10 0x03 0x24 0x20 0x00 69 | 0x10000e2 0x0f 0x32 0x2e 0x0b 0x0d 0x05 0x47 0x75 0x37 0x06 0x10 0x03 0x24 0x20 0x00 70 | /* piscreen -> waveshare35a */ 71 | 0x1000036 0x28 72 | 0x1000011 73 | 0x1000029>; 74 | }; 75 | 76 | waveshare35a_ts: waveshare35a-ts@1 { 77 | compatible = "ti,ads7846"; 78 | reg = <1>; 79 | 80 | spi-max-frequency = <2000000>; 81 | interrupts = <17 2>; /* high-to-low edge triggered */ 82 | interrupt-parent = <&gpio>; 83 | pendown-gpio = <&gpio 17 0>; 84 | ti,x-plate-ohms = /bits/ 16 <60>; 85 | ti,pressure-max = /bits/ 16 <255>; 86 | }; 87 | }; 88 | }; 89 | __overrides__ { 90 | speed = <&waveshare35a>,"spi-max-frequency:0"; 91 | rotate = <&waveshare35a>,"rotate:0"; 92 | fps = <&waveshare35a>,"fps:0"; 93 | debug = <&waveshare35a>,"debug:0"; 94 | swapxy = <&waveshare35a_ts>,"ti,swap-xy?"; 95 | }; 96 | }; 97 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Re4son's Kernel Builder for Raspbery Pi 2 | ###### V 2.0.0 3 | ###### Created for kernel version 4.4 and newer 4 | ###### raspberry toolchain published 17-May-2016 and later 5 | ###### raspberry firmware released 4-May-2016 and later 6 | 7 | 8 | 9 | ## Compiling The Raspberry Pi Kernel 10 | 11 | Clone the git repo to /opt/kernel-builder 12 | 13 | ``` 14 | $ sudo git clone https://github.com/Re4son/re4son-kernel-builder.git /opt/kernel-builder 15 | $ cd kernel-builder 16 | ``` 17 | 18 | If running on a 64bit architecture, install additional 32bit packages required by the toolchain 19 | 20 | ``` 21 | $ sudo apt-get install lib32z1 lib32ncurses5 libc6-i386 lib32stdc++6 22 | ``` 23 | 24 | Setup the kernel-builder 25 | 26 | ``` 27 | $ ./setup.sh 28 | ``` 29 | edit build.sh and set the variable KERNEL-BUILDER_DIR= to the kernel builder directory. 30 | default is "/opt/kernel-builder" 31 | 32 | ``` 33 | ~$ sudo re4sonbuild -h 34 | usage: re4sonbuild [options] 35 | This will build the Raspberry Pi Kernel. 36 | OPTIONS: 37 | -h Show this message 38 | -r The remote github kernel repo to clone in user/repo format 39 | Default: raspberrypi/linux 40 | -b The git branch to use 41 | Default: Default git branch of repo 42 | -c Set up the environment and clean the source tree 43 | -6 The config file to use when compiling for Raspi v6 (ARMEL) 44 | Default: arch/arm/configs/bcmrpi_defconfig 45 | -7 The config file to use when compiling for Raspi v7 (ARMHF) 46 | Default: arch/arm/configs/bcm2709_defconfig 47 | -7 The config file to use when compiling for Raspi v8 (ARM64) 48 | Default: arch/arm/configs/bcm2709_defconfig 49 | ``` 50 | 51 | Reset the ebvironment for a fresh build: 52 | 53 | ``` 54 | ~$ sudo re4sonbuild -c 55 | ``` 56 | Compile with default options: 57 | 58 | ``` 59 | ~$ sudo re4sonbuild 60 | ``` 61 | Compile with default options: 62 | 63 | ``` 64 | ~$ sudo re4sonbuild 65 | ``` 66 | 67 | Compile [re4son-raspberrypi-linux][1] using the `rpi-4.4.y-re4son` branch: 68 | 69 | ``` 70 | ~$ sudo re4son -r https://github.com/Re4son/re4son-raspberrypi-linux -b rpi-4.1.y-re4son 71 | ``` 72 | 73 | A `tar.xz` archive will be available in the kernel-builder folder 74 | after the custom kernel has been built. Copy the archive to your Pi and extact the 75 | contents. Installation instructions are included in the archive. 76 | 77 | 78 | [1]: https://github.com/Re4son/re4son-raspberrypi-linux 79 | 80 | -------------------------------------------------------------------------------- /patches/0001-wireless-carl9170-Enable-sniffer-mode-promisc-flag-t.patch: -------------------------------------------------------------------------------- 1 | From c46a994dd78befbe94e66771db41c18351be2aae Mon Sep 17 00:00:00 2001 2 | From: Steve deRosier 3 | Date: Fri, 29 Sep 2017 10:48:19 -0700 4 | Subject: [PATCH] wireless: carl9170: Enable sniffer mode promisc flag to fix 5 | injection 6 | 7 | The removal of the AR9170_MAC_SNIFFER_ENABLE_PROMISC flag to fix an issue 8 | many years ago caused the AR9170 to not be able to pass probe response 9 | packets with different MAC addresses back up to the driver. In general 10 | operation, this doesn't matter, but in the case of packet injection with 11 | aireplay-ng it is important. aireplay-ng specifically injects packets with 12 | spoofed MAC addresses on the probe requests and looks for probe responses 13 | back to those addresses. No other combination of filter flags seem to fix 14 | this issue and so AR9170_MAC_SNIFFER_ENABLE is required to get these packets. 15 | 16 | This was originally caused by commit e0509d3bdd7365d06c9bf570bf9f11 which 17 | removed this flag in order to avoid spurious ack noise from the hardware. 18 | In testing for this issue, keeping this flag but not restoring the 19 | AR9170_MAC_RX_CTRL_ACK_IN_SNIFFER flag on the rc_ctrl seems to solve this 20 | issue, at least with the most current firmware v1.9.9. 21 | 22 | Signed-off-by: Steve deRosier 23 | --- 24 | drivers/net/wireless/ath/carl9170/mac.c | 5 +++++ 25 | 1 file changed, 5 insertions(+) 26 | 27 | diff --git a/drivers/net/wireless/ath/carl9170/mac.c b/drivers/net/wireless/ath/carl9170/mac.c 28 | index 7d4a72dc98db..c617e883f47a 100644 29 | --- a/drivers/net/wireless/ath/carl9170/mac.c 30 | +++ b/drivers/net/wireless/ath/carl9170/mac.c 31 | @@ -309,6 +309,7 @@ int carl9170_set_operating_mode(struct ar9170 *ar) 32 | u32 rx_ctrl = AR9170_MAC_RX_CTRL_DEAGG | 33 | AR9170_MAC_RX_CTRL_SHORT_FILTER; 34 | u32 sniffer = AR9170_MAC_SNIFFER_DEFAULTS; 35 | + u32 mac_ftf = AR9170_MAC_FTF_DEFAULTS; 36 | int err = 0; 37 | 38 | rcu_read_lock(); 39 | @@ -373,6 +374,9 @@ int carl9170_set_operating_mode(struct ar9170 *ar) 40 | 41 | if (ar->sniffer_enabled) { 42 | enc_mode |= AR9170_MAC_ENCRYPTION_RX_SOFTWARE; 43 | + mac_ftf = AR9170_MAC_FTF_MONITOR; 44 | + sniffer |= AR9170_MAC_SNIFFER_ENABLE_PROMISC; 45 | + mac_addr = NULL; 46 | } 47 | 48 | err = carl9170_set_mac_reg(ar, AR9170_MAC_REG_MAC_ADDR_L, mac_addr); 49 | @@ -384,6 +388,7 @@ int carl9170_set_operating_mode(struct ar9170 *ar) 50 | return err; 51 | 52 | carl9170_regwrite_begin(ar); 53 | + carl9170_regwrite(AR9170_MAC_REG_FRAMETYPE_FILTER, mac_ftf); 54 | carl9170_regwrite(AR9170_MAC_REG_SNIFFER, sniffer); 55 | carl9170_regwrite(AR9170_MAC_REG_CAM_MODE, cam_mode); 56 | carl9170_regwrite(AR9170_MAC_REG_ENCRYPTION, enc_mode); 57 | -- 58 | 2.14.1 59 | 60 | -------------------------------------------------------------------------------- /dts/pitft28c-overlay.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Device Tree overlay for pitft by Adafruit 3 | * 4 | */ 5 | 6 | /dts-v1/; 7 | /plugin/; 8 | 9 | / { 10 | compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709"; 11 | 12 | fragment@0 { 13 | target = <&spi0>; 14 | __overlay__ { 15 | status = "okay"; 16 | 17 | spidev@0{ 18 | status = "disabled"; 19 | }; 20 | 21 | spidev@1{ 22 | status = "disabled"; 23 | }; 24 | }; 25 | }; 26 | 27 | fragment@1 { 28 | target = <&gpio>; 29 | __overlay__ { 30 | pitft_pins: pitft_pins { 31 | brcm,pins = <24 25>; 32 | brcm,function = <0 1>; /* in out */ 33 | brcm,pull = <2 0>; /* pullup none */ 34 | }; 35 | }; 36 | }; 37 | 38 | fragment@2 { 39 | target = <&spi0>; 40 | __overlay__ { 41 | /* needed to avoid dtc warning */ 42 | #address-cells = <1>; 43 | #size-cells = <0>; 44 | 45 | pitft: pitft@0{ 46 | compatible = "ilitek,ili9340"; 47 | reg = <0>; 48 | pinctrl-names = "default"; 49 | pinctrl-0 = <&pitft_pins>; 50 | 51 | spi-max-frequency = <32000000>; 52 | rotate = <90>; 53 | fps = <25>; 54 | bgr; 55 | buswidth = <8>; 56 | dc-gpios = <&gpio 25 0>; 57 | debug = <0>; 58 | }; 59 | 60 | }; 61 | }; 62 | 63 | fragment@3 { 64 | target = <&i2c1>; 65 | __overlay__ { 66 | /* needed to avoid dtc warning */ 67 | #address-cells = <1>; 68 | #size-cells = <0>; 69 | pitft_ctp { 70 | compatible = "focaltech,ft6x06"; 71 | reg = <0x38>; 72 | irq-gpio = <&gpio 24 2>; 73 | interrupts = <24 2>; 74 | interrupt-parent = <&gpio>; 75 | }; 76 | }; 77 | }; 78 | 79 | __overrides__ { 80 | speed = <&pitft>,"spi-max-frequency:0"; 81 | rotate = <&pitft>,"rotate:0"; 82 | fps = <&pitft>,"fps:0"; 83 | debug = <&pitft>,"debug:0"; 84 | }; 85 | }; 86 | -------------------------------------------------------------------------------- /srv-tools/sdcard/read-sdcard: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | if [[ $EUID -ne 0 ]]; then 3 | printf "\n\t\t$(basename $0) must be run as root.\n\t\ttry: sudo $(basename $0) \n\n" 4 | exit 1 5 | fi 6 | 7 | if [ -z "$1" ] 8 | then 9 | printf "\n\t\tMissing file name\n" 10 | printf "\t\tUsage: sudo $(basename $0) \n\n" 11 | exit 1 12 | fi 13 | 14 | SOURCE="/dev/mmcblk0" 15 | IMG_FILE=$1-`date +%y%m%d`.img.xz 16 | SHA_FILE=$IMG_FILE.sha1 17 | 18 | ## Get the total size of both partitions rather than the total size of the card 19 | ## This allows to create 8gB images using 16GB cards 20 | #size=`fdisk -l $SOURCE | grep "Disk $SOURCE" | sed -e 's/[^ ]* [^ ]* [^ ]* [^ ]* \([0-9]*\).*/\1/g'` 21 | last_sector=`fdisk -l $SOURCE | grep "/dev/mmcblk0p2" | sed -e 's/[^ ]* *[^ ]* *\([0-9]*\).*/\1/g'` 22 | sectors=$((last_sector + 1)) 23 | size=$((sectors / 2 / 1024)) 24 | 25 | function ask() { 26 | # http://djm.me/ask 27 | while true; do 28 | 29 | if [ "${2:-}" = "Y" ]; then 30 | prompt="Y/n" 31 | default=Y 32 | elif [ "${2:-}" = "N" ]; then 33 | prompt="y/N" 34 | default=N 35 | else 36 | prompt="y/n" 37 | default= 38 | fi 39 | 40 | # Ask the question 41 | read -p "$1 [$prompt] " REPLY 42 | 43 | # Default? 44 | if [ -z "$REPLY" ]; then 45 | REPLY=$default 46 | fi 47 | 48 | # Check if the reply is valid 49 | case "$REPLY" in 50 | Y*|y*) return 0 ;; 51 | N*|n*) return 1 ;; 52 | esac 53 | done 54 | } 55 | 56 | printf "\nPreparing backup:\n" 57 | printf "===================\n" 58 | if [ -f $IMG_FILE ]; then 59 | if [ ! -d ../archive ]; then 60 | sudo mkdir ../archive 61 | fi 62 | echo "Moving $IMG_FILE to ../archive" 63 | mv $IMG_FILE ../archive/ 64 | fi 65 | 66 | if [ -f $SHA_FILE ]; then 67 | if [ ! -d ../archive ]; then 68 | sudo mkdir ../archive 69 | fi 70 | echo "Moving $SHA_FILE to ../archive" 71 | mv $SHA_FILE ../archive/ 72 | fi 73 | 74 | printf "\nSource SD-Card:\n" 75 | printf "=================\n" 76 | fdisk -l $SOURCE 77 | printf "\nBackup parameters:\n" 78 | printf "==================\n" 79 | printf "Reading $sectors sectors @ 512 bytes each / 2 / 1024 = $size MB\n" 80 | printf "Writing image to $IMG_FILE\n" 81 | printf "Writing SHA256 sum to $SHA_FILE\n\n" 82 | printf "\n" 83 | 84 | if ask "Continue?" "N"; then 85 | printf "*** Start creating image at `date +%H:%M:%S`\n" 86 | SECONDS=0 87 | dd if=$SOURCE bs=1M count=$size status=progress | xz -T 0 >$IMG_FILE 88 | duration=$SECONDS 89 | printf "*** Finish creating image at `date +%H:%M:%S`, after $(($duration / 60)) minutes and $(($duration % 60)) seconds\n\n" 90 | SECONDS=0 91 | printf "*** Start creating SHA256SUM at `date +%H:%M:%S`\n" 92 | sha256sum $IMG_FILE>$SHA_FILE 93 | duration=$SECONDS 94 | printf "*** Finish creating SHA256SUM: `date +%H:%M:%S`, after $(($duration / 60)) minutes and $(($duration % 60)) seconds\n\n" 95 | 96 | else 97 | exit 1 98 | fi 99 | 100 | exit 0 101 | -------------------------------------------------------------------------------- /patches/0001-add-pitft28c-overlay.patch: -------------------------------------------------------------------------------- 1 | From db8a4dcc02e0d97bb58b15ea59977d416bf6dbb4 Mon Sep 17 00:00:00 2001 2 | From: Todd Treece 3 | Date: Tue, 16 May 2017 20:45:35 +0000 4 | Subject: [PATCH 1/8] add pitft28c overlay 5 | 6 | --- 7 | arch/arm/boot/dts/overlays/pitft28c-overlay.dts | 85 +++++++++++++++++++++++++ 8 | 1 file changed, 85 insertions(+) 9 | create mode 100644 arch/arm/boot/dts/overlays/pitft28c-overlay.dts 10 | 11 | diff --git a/arch/arm/boot/dts/overlays/pitft28c-overlay.dts b/arch/arm/boot/dts/overlays/pitft28c-overlay.dts 12 | new file mode 100644 13 | index 000000000000..f540c8cb7ef7 14 | --- /dev/null 15 | +++ b/arch/arm/boot/dts/overlays/pitft28c-overlay.dts 16 | @@ -0,0 +1,85 @@ 17 | +/* 18 | + * Device Tree overlay for pitft by Adafruit 19 | + * 20 | + */ 21 | + 22 | +/dts-v1/; 23 | +/plugin/; 24 | + 25 | +/ { 26 | + compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709"; 27 | + 28 | + fragment@0 { 29 | + target = <&spi0>; 30 | + __overlay__ { 31 | + status = "okay"; 32 | + 33 | + spidev@0{ 34 | + status = "disabled"; 35 | + }; 36 | + 37 | + spidev@1{ 38 | + status = "disabled"; 39 | + }; 40 | + }; 41 | + }; 42 | + 43 | + fragment@1 { 44 | + target = <&gpio>; 45 | + __overlay__ { 46 | + pitft_pins: pitft_pins { 47 | + brcm,pins = <24 25>; 48 | + brcm,function = <0 1>; /* in out */ 49 | + brcm,pull = <2 0>; /* pullup none */ 50 | + }; 51 | + }; 52 | + }; 53 | + 54 | + fragment@2 { 55 | + target = <&spi0>; 56 | + __overlay__ { 57 | + /* needed to avoid dtc warning */ 58 | + #address-cells = <1>; 59 | + #size-cells = <0>; 60 | + 61 | + pitft: pitft@0{ 62 | + compatible = "ilitek,ili9340"; 63 | + reg = <0>; 64 | + pinctrl-names = "default"; 65 | + pinctrl-0 = <&pitft_pins>; 66 | + 67 | + spi-max-frequency = <32000000>; 68 | + rotate = <90>; 69 | + fps = <25>; 70 | + bgr; 71 | + buswidth = <8>; 72 | + dc-gpios = <&gpio 25 0>; 73 | + debug = <0>; 74 | + }; 75 | + 76 | + }; 77 | + }; 78 | + 79 | + fragment@3 { 80 | + target = <&i2c1>; 81 | + __overlay__ { 82 | + /* needed to avoid dtc warning */ 83 | + #address-cells = <1>; 84 | + #size-cells = <0>; 85 | + pitft_ctp { 86 | + compatible = "focaltech,ft6x06"; 87 | + reg = <0x38>; 88 | + irq-gpio = <&gpio 24 2>; 89 | + interrupts = <24 2>; 90 | + interrupt-parent = <&gpio>; 91 | + }; 92 | + }; 93 | + }; 94 | + 95 | + __overrides__ { 96 | + speed = <&pitft>,"spi-max-frequency:0"; 97 | + rotate = <&pitft>,"rotate:0"; 98 | + fps = <&pitft>,"fps:0"; 99 | + debug = <&pitft>,"debug:0"; 100 | + }; 101 | +}; 102 | -- 103 | 2.11.0 104 | 105 | -------------------------------------------------------------------------------- /dts/pitft35r-overlay.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Device Tree overlay for pitft by Adafruit 3 | * 4 | */ 5 | 6 | /dts-v1/; 7 | /plugin/; 8 | 9 | / { 10 | compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709"; 11 | 12 | fragment@0 { 13 | target = <&spi0>; 14 | __overlay__ { 15 | status = "okay"; 16 | 17 | spidev@0{ 18 | status = "disabled"; 19 | }; 20 | 21 | spidev@1{ 22 | status = "disabled"; 23 | }; 24 | }; 25 | }; 26 | 27 | fragment@1 { 28 | target = <&gpio>; 29 | __overlay__ { 30 | pitft_pins: pitft_pins { 31 | brcm,pins = <24 25>; 32 | brcm,function = <0 1>; /* in out */ 33 | brcm,pull = <2 0>; /* pullup none */ 34 | }; 35 | }; 36 | }; 37 | 38 | fragment@2 { 39 | target = <&spi0>; 40 | __overlay__ { 41 | /* needed to avoid dtc warning */ 42 | #address-cells = <1>; 43 | #size-cells = <0>; 44 | 45 | pitft: pitft@0{ 46 | compatible = "himax,hx8357d"; 47 | reg = <0>; 48 | pinctrl-names = "default"; 49 | pinctrl-0 = <&pitft_pins>; 50 | 51 | spi-max-frequency = <32000000>; 52 | rotate = <90>; 53 | fps = <25>; 54 | bgr; 55 | buswidth = <8>; 56 | dc-gpios = <&gpio 25 0>; 57 | debug = <0>; 58 | }; 59 | 60 | pitft_ts@1 { 61 | #address-cells = <1>; 62 | #size-cells = <0>; 63 | compatible = "st,stmpe610"; 64 | reg = <1>; 65 | 66 | spi-max-frequency = <500000>; 67 | irq-gpio = <&gpio 24 0x2>; /* IRQF_TRIGGER_FALLING */ 68 | interrupts = <24 2>; /* high-to-low edge triggered */ 69 | interrupt-parent = <&gpio>; 70 | interrupt-controller; 71 | 72 | stmpe_touchscreen { 73 | compatible = "st,stmpe-ts"; 74 | st,sample-time = <4>; 75 | st,mod-12b = <1>; 76 | st,ref-sel = <0>; 77 | st,adc-freq = <2>; 78 | st,ave-ctrl = <3>; 79 | st,touch-det-delay = <4>; 80 | st,settling = <2>; 81 | st,fraction-z = <7>; 82 | st,i-drive = <0>; 83 | }; 84 | 85 | stmpe_gpio: stmpe_gpio { 86 | #gpio-cells = <2>; 87 | compatible = "st,stmpe-gpio"; 88 | /* 89 | * only GPIO2 is wired/available 90 | * and it is wired to the backlight 91 | */ 92 | st,norequest-mask = <0x7b>; 93 | }; 94 | }; 95 | }; 96 | }; 97 | 98 | fragment@3 { 99 | target-path = "/soc"; 100 | __overlay__ { 101 | backlight { 102 | compatible = "gpio-backlight"; 103 | gpios = <&stmpe_gpio 2 0>; 104 | default-on; 105 | }; 106 | }; 107 | }; 108 | 109 | __overrides__ { 110 | speed = <&pitft>,"spi-max-frequency:0"; 111 | rotate = <&pitft>,"rotate:0"; 112 | fps = <&pitft>,"fps:0"; 113 | debug = <&pitft>,"debug:0"; 114 | }; 115 | }; 116 | -------------------------------------------------------------------------------- /dts/pitft28r-overlay.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Device Tree overlay for pitft by Adafruit 3 | * 4 | */ 5 | 6 | /dts-v1/; 7 | /plugin/; 8 | 9 | / { 10 | compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709"; 11 | 12 | fragment@0 { 13 | target = <&spi0>; 14 | __overlay__ { 15 | status = "okay"; 16 | 17 | spidev@0{ 18 | status = "disabled"; 19 | }; 20 | 21 | spidev@1{ 22 | status = "disabled"; 23 | }; 24 | }; 25 | }; 26 | 27 | fragment@1 { 28 | target = <&gpio>; 29 | __overlay__ { 30 | pitft_pins: pitft_pins { 31 | brcm,pins = <24 25>; 32 | brcm,function = <0 1>; /* in out */ 33 | brcm,pull = <2 0>; /* pullup none */ 34 | }; 35 | }; 36 | }; 37 | 38 | fragment@2 { 39 | target = <&spi0>; 40 | __overlay__ { 41 | /* needed to avoid dtc warning */ 42 | #address-cells = <1>; 43 | #size-cells = <0>; 44 | 45 | pitft: pitft@0{ 46 | compatible = "ilitek,ili9340"; 47 | reg = <0>; 48 | pinctrl-names = "default"; 49 | pinctrl-0 = <&pitft_pins>; 50 | 51 | spi-max-frequency = <32000000>; 52 | rotate = <90>; 53 | fps = <25>; 54 | bgr; 55 | buswidth = <8>; 56 | dc-gpios = <&gpio 25 0>; 57 | debug = <0>; 58 | }; 59 | 60 | pitft_ts@1 { 61 | #address-cells = <1>; 62 | #size-cells = <0>; 63 | compatible = "st,stmpe610"; 64 | reg = <1>; 65 | 66 | spi-max-frequency = <500000>; 67 | irq-gpio = <&gpio 24 0x2>; /* IRQF_TRIGGER_FALLING */ 68 | interrupts = <24 2>; /* high-to-low edge triggered */ 69 | interrupt-parent = <&gpio>; 70 | interrupt-controller; 71 | 72 | stmpe_touchscreen { 73 | compatible = "st,stmpe-ts"; 74 | st,sample-time = <4>; 75 | st,mod-12b = <1>; 76 | st,ref-sel = <0>; 77 | st,adc-freq = <2>; 78 | st,ave-ctrl = <3>; 79 | st,touch-det-delay = <4>; 80 | st,settling = <2>; 81 | st,fraction-z = <7>; 82 | st,i-drive = <0>; 83 | st,rotation = <90>; 84 | st,min-x = <250>; 85 | st,min-y = <200>; 86 | st,max-x = <3800>; 87 | st,max-y = <3750>; 88 | }; 89 | 90 | stmpe_gpio: stmpe_gpio { 91 | #gpio-cells = <2>; 92 | compatible = "st,stmpe-gpio"; 93 | /* 94 | * only GPIO2 is wired/available 95 | * and it is wired to the backlight 96 | */ 97 | st,norequest-mask = <0x7b>; 98 | }; 99 | }; 100 | }; 101 | }; 102 | 103 | fragment@3 { 104 | target-path = "/soc"; 105 | __overlay__ { 106 | backlight { 107 | compatible = "gpio-backlight"; 108 | gpios = <&stmpe_gpio 2 0>; 109 | default-on; 110 | }; 111 | }; 112 | }; 113 | 114 | __overrides__ { 115 | speed = <&pitft>,"spi-max-frequency:0"; 116 | rotate = <&pitft>,"rotate:0"; 117 | fps = <&pitft>,"fps:0"; 118 | debug = <&pitft>,"debug:0"; 119 | }; 120 | }; 121 | -------------------------------------------------------------------------------- /patches/wifi-injection-4.14.patch: -------------------------------------------------------------------------------- 1 | --- a/net/mac80211/cfg.c 2 | +++ b/net/mac80211/cfg.c 3 | @@ -580,7 +580,8 @@ static int ieee80211_set_monitor_channel 4 | ret = ieee80211_vif_use_channel(sdata, chandef, 5 | IEEE80211_CHANCTX_EXCLUSIVE); 6 | } 7 | - } else if (local->open_count == local->monitors) { 8 | + // Patch: Always allow channel change, even if a normal virtual interface is present 9 | + } else /*if (local->open_count == local->monitors)*/ { 10 | local->_oper_chandef = *chandef; 11 | ieee80211_hw_config(local, 0); 12 | } 13 | --- a/net/mac80211/tx.c 14 | +++ b/net/mac80211/tx.c 15 | @@ -795,11 +795,19 @@ ieee80211_tx_h_sequence(struct ieee80211 16 | 17 | /* 18 | * Packet injection may want to control the sequence 19 | - * number, if we have no matching interface then we 20 | - * neither assign one ourselves nor ask the driver to. 21 | + * number, so if an injected packet is found, skip 22 | + * renumbering it. Also make the packet NO_ACK to avoid 23 | + * excessive retries (ACKing and retrying should be 24 | + * handled by the injecting application). 25 | + * FIXME This may break hostapd and some other injectors. 26 | + * This should be done using a radiotap flag. 27 | */ 28 | - if (unlikely(info->control.vif->type == NL80211_IFTYPE_MONITOR)) 29 | + if (unlikely((info->flags & IEEE80211_TX_CTL_INJECTED) && 30 | + !(tx->sdata->u.mntr.flags & MONITOR_FLAG_COOK_FRAMES))) { 31 | + if (!ieee80211_has_morefrags(hdr->frame_control)) 32 | + info->flags |= IEEE80211_TX_CTL_NO_ACK; 33 | return TX_CONTINUE; 34 | + } 35 | 36 | if (unlikely(ieee80211_is_ctl(hdr->frame_control))) 37 | return TX_CONTINUE; 38 | @@ -1659,7 +1667,10 @@ void ieee80211_xmit(struct ieee80211_sub 39 | } 40 | } 41 | 42 | - ieee80211_set_qos_hdr(sdata, skb); 43 | + // Don't overwrite QoS header in monitor mode 44 | + if (likely(info->control.vif->type != NL80211_IFTYPE_MONITOR)) { 45 | + ieee80211_set_qos_hdr(sdata, skb); 46 | + } 47 | ieee80211_tx(sdata, sta, skb, false); 48 | } 49 | 50 | --- a/net/wireless/chan.c 51 | +++ b/net/wireless/chan.c 52 | @@ -857,8 +857,10 @@ int cfg80211_set_monitor_channel(struct 53 | { 54 | if (!rdev->ops->set_monitor_channel) 55 | return -EOPNOTSUPP; 56 | - if (!cfg80211_has_monitors_only(rdev)) 57 | - return -EBUSY; 58 | + // Always allow user to change channel, even if there is another normal 59 | + // virtual interface using the device. 60 | + //if (!cfg80211_has_monitors_only(rdev)) 61 | + // return -EBUSY; 62 | 63 | return rdev_set_monitor_channel(rdev, chandef); 64 | } 65 | --- a/drivers/net/wireless/zydas/zd1211rw/zd_mac.c 66 | +++ b/drivers/net/wireless/zydas/zd1211rw/zd_mac.c 67 | @@ -242,14 +242,19 @@ void zd_mac_clear(struct zd_mac *mac) 68 | static int set_rx_filter(struct zd_mac *mac) 69 | { 70 | unsigned long flags; 71 | - u32 filter = STA_RX_FILTER; 72 | + struct zd_ioreq32 ioreqs[] = { 73 | + {CR_RX_FILTER, STA_RX_FILTER}, 74 | + { CR_SNIFFER_ON, 0U }, 75 | + }; 76 | 77 | spin_lock_irqsave(&mac->lock, flags); 78 | - if (mac->pass_ctrl) 79 | - filter |= RX_FILTER_CTRL; 80 | + if (mac->pass_ctrl) { 81 | + ioreqs[0].value |= 0xFFFFFFFF; 82 | + ioreqs[1].value = 0x1; 83 | + } 84 | spin_unlock_irqrestore(&mac->lock, flags); 85 | 86 | - return zd_iowrite32(&mac->chip, CR_RX_FILTER, filter); 87 | + return zd_iowrite32a(&mac->chip, ioreqs, ARRAY_SIZE(ioreqs)); 88 | } 89 | 90 | static int set_mac_and_bssid(struct zd_mac *mac) 91 | @@ -1057,7 +1062,8 @@ int zd_mac_rx(struct ieee80211_hw *hw, c 92 | /* Caller has to ensure that length >= sizeof(struct rx_status). */ 93 | status = (struct rx_status *) 94 | (buffer + (length - sizeof(struct rx_status))); 95 | - if (status->frame_status & ZD_RX_ERROR) { 96 | + if ((status->frame_status & ZD_RX_ERROR) || 97 | + (status->frame_status & ~0x21)) { 98 | if (mac->pass_failed_fcs && 99 | (status->frame_status & ZD_RX_CRC32_ERROR)) { 100 | stats.flag |= RX_FLAG_FAILED_FCS_CRC; 101 | @@ -1400,7 +1406,7 @@ struct ieee80211_hw *zd_mac_alloc_hw(str 102 | ieee80211_hw_set(hw, MFP_CAPABLE); 103 | ieee80211_hw_set(hw, HOST_BROADCAST_PS_BUFFERING); 104 | ieee80211_hw_set(hw, RX_INCLUDES_FCS); 105 | - ieee80211_hw_set(hw, SIGNAL_UNSPEC); 106 | + ieee80211_hw_set(hw, SIGNAL_DBM); 107 | 108 | hw->wiphy->interface_modes = 109 | BIT(NL80211_IFTYPE_MESH_POINT) | 110 | --- a/drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c 111 | +++ b/drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c 112 | @@ -251,8 +251,17 @@ static void rtl8187_tx(struct ieee80211_ 113 | flags |= RTL818X_TX_DESC_FLAG_NO_ENC; 114 | 115 | flags |= ieee80211_get_tx_rate(dev, info)->hw_value << 24; 116 | + 117 | + // When this flag is set the firmware waits untill ALL fragments have 118 | + // reached the USB device. Then it sends the first fragment and waits 119 | + // for ACKS's. Of course in monitor mode it won't detect these ACK's. 120 | if (ieee80211_has_morefrags(tx_hdr->frame_control)) 121 | - flags |= RTL818X_TX_DESC_FLAG_MOREFRAG; 122 | + { 123 | + // If info->control.vif is NULL it's most likely in monitor mode 124 | + if (likely(info->control.vif != NULL && info->control.vif->type != NL80211_IFTYPE_MONITOR)) { 125 | + flags |= RTL818X_TX_DESC_FLAG_MOREFRAG; 126 | + } 127 | + } 128 | 129 | /* HW will perform RTS-CTS when only RTS flags is set. 130 | * HW will perform CTS-to-self when both RTS and CTS flags are set. 131 | -------------------------------------------------------------------------------- /patches/wifi-injection-4.9.patch: -------------------------------------------------------------------------------- 1 | --- a/net/mac80211/cfg.c 2 | +++ b/net/mac80211/cfg.c 3 | @@ -540,7 +540,8 @@ static int ieee80211_set_monitor_channel(struct wiphy *wiphy, 4 | ret = ieee80211_vif_use_channel(sdata, chandef, 5 | IEEE80211_CHANCTX_EXCLUSIVE); 6 | } 7 | - } else if (local->open_count == local->monitors) { 8 | + // Patch: Always allow channel change, even if a normal virtual interface is present 9 | + } else /*if (local->open_count == local->monitors)*/ { 10 | local->_oper_chandef = *chandef; 11 | ieee80211_hw_config(local, 0); 12 | } 13 | --- a/net/mac80211/tx.c 14 | +++ b/net/mac80211/tx.c 15 | @@ -795,11 +795,19 @@ ieee80211_tx_h_sequence(struct ieee80211 16 | 17 | /* 18 | * Packet injection may want to control the sequence 19 | - * number, if we have no matching interface then we 20 | - * neither assign one ourselves nor ask the driver to. 21 | + * number, so if an injected packet is found, skip 22 | + * renumbering it. Also make the packet NO_ACK to avoid 23 | + * excessive retries (ACKing and retrying should be 24 | + * handled by the injecting application). 25 | + * FIXME This may break hostapd and some other injectors. 26 | + * This should be done using a radiotap flag. 27 | */ 28 | - if (unlikely(info->control.vif->type == NL80211_IFTYPE_MONITOR)) 29 | + if (unlikely((info->flags & IEEE80211_TX_CTL_INJECTED) && 30 | + !(tx->sdata->u.mntr_flags & MONITOR_FLAG_COOK_FRAMES))) { 31 | + if (!ieee80211_has_morefrags(hdr->frame_control)) 32 | + info->flags |= IEEE80211_TX_CTL_NO_ACK; 33 | return TX_CONTINUE; 34 | + } 35 | 36 | if (unlikely(ieee80211_is_ctl(hdr->frame_control))) 37 | return TX_CONTINUE; 38 | @@ -1659,7 +1667,10 @@ void ieee80211_xmit(struct ieee80211_sub 39 | } 40 | } 41 | 42 | - ieee80211_set_qos_hdr(sdata, skb); 43 | + // Don't overwrite QoS header in monitor mode 44 | + if (likely(info->control.vif->type != NL80211_IFTYPE_MONITOR)) { 45 | + ieee80211_set_qos_hdr(sdata, skb); 46 | + } 47 | ieee80211_tx(sdata, sta, skb, false); 48 | } 49 | 50 | --- a/net/wireless/chan.c 51 | +++ b/net/wireless/chan.c 52 | @@ -857,8 +857,10 @@ int cfg80211_set_monitor_channel(struct 53 | { 54 | if (!rdev->ops->set_monitor_channel) 55 | return -EOPNOTSUPP; 56 | - if (!cfg80211_has_monitors_only(rdev)) 57 | - return -EBUSY; 58 | + // Always allow user to change channel, even if there is another normal 59 | + // virtual interface using the device. 60 | + //if (!cfg80211_has_monitors_only(rdev)) 61 | + // return -EBUSY; 62 | 63 | return rdev_set_monitor_channel(rdev, chandef); 64 | } 65 | --- a/drivers/net/wireless/zd1211rw/zd_mac.c 66 | +++ b/drivers/net/wireless/zd1211rw/zd_mac.c 67 | @@ -242,14 +242,19 @@ void zd_mac_clear(struct zd_mac *mac) 68 | static int set_rx_filter(struct zd_mac *mac) 69 | { 70 | unsigned long flags; 71 | - u32 filter = STA_RX_FILTER; 72 | + struct zd_ioreq32 ioreqs[] = { 73 | + {CR_RX_FILTER, STA_RX_FILTER}, 74 | + { CR_SNIFFER_ON, 0U }, 75 | + }; 76 | 77 | spin_lock_irqsave(&mac->lock, flags); 78 | - if (mac->pass_ctrl) 79 | - filter |= RX_FILTER_CTRL; 80 | + if (mac->pass_ctrl) { 81 | + ioreqs[0].value |= 0xFFFFFFFF; 82 | + ioreqs[1].value = 0x1; 83 | + } 84 | spin_unlock_irqrestore(&mac->lock, flags); 85 | 86 | - return zd_iowrite32(&mac->chip, CR_RX_FILTER, filter); 87 | + return zd_iowrite32a(&mac->chip, ioreqs, ARRAY_SIZE(ioreqs)); 88 | } 89 | 90 | static int set_mac_and_bssid(struct zd_mac *mac) 91 | @@ -1057,7 +1062,8 @@ int zd_mac_rx(struct ieee80211_hw *hw, c 92 | /* Caller has to ensure that length >= sizeof(struct rx_status). */ 93 | status = (struct rx_status *) 94 | (buffer + (length - sizeof(struct rx_status))); 95 | - if (status->frame_status & ZD_RX_ERROR) { 96 | + if ((status->frame_status & ZD_RX_ERROR) || 97 | + (status->frame_status & ~0x21)) { 98 | if (mac->pass_failed_fcs && 99 | (status->frame_status & ZD_RX_CRC32_ERROR)) { 100 | stats.flag |= RX_FLAG_FAILED_FCS_CRC; 101 | @@ -1400,7 +1406,7 @@ struct ieee80211_hw *zd_mac_alloc_hw(str 102 | ieee80211_hw_set(hw, MFP_CAPABLE); 103 | ieee80211_hw_set(hw, HOST_BROADCAST_PS_BUFFERING); 104 | ieee80211_hw_set(hw, RX_INCLUDES_FCS); 105 | - ieee80211_hw_set(hw, SIGNAL_UNSPEC); 106 | + ieee80211_hw_set(hw, SIGNAL_DBM); 107 | 108 | hw->wiphy->interface_modes = 109 | BIT(NL80211_IFTYPE_MESH_POINT) | 110 | --- a/drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c 111 | +++ b/drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c 112 | @@ -251,8 +251,17 @@ static void rtl8187_tx(struct ieee80211_ 113 | flags |= RTL818X_TX_DESC_FLAG_NO_ENC; 114 | 115 | flags |= ieee80211_get_tx_rate(dev, info)->hw_value << 24; 116 | + 117 | + // When this flag is set the firmware waits untill ALL fragments have 118 | + // reached the USB device. Then it sends the first fragment and waits 119 | + // for ACKS's. Of course in monitor mode it won't detect these ACK's. 120 | if (ieee80211_has_morefrags(tx_hdr->frame_control)) 121 | - flags |= RTL818X_TX_DESC_FLAG_MOREFRAG; 122 | + { 123 | + // If info->control.vif is NULL it's most likely in monitor mode 124 | + if (likely(info->control.vif != NULL && info->control.vif->type != NL80211_IFTYPE_MONITOR)) { 125 | + flags |= RTL818X_TX_DESC_FLAG_MOREFRAG; 126 | + } 127 | + } 128 | 129 | /* HW will perform RTS-CTS when only RTS flags is set. 130 | * HW will perform CTS-to-self when both RTS and CTS flags are set. 131 | -------------------------------------------------------------------------------- /patches/wifi-injection-4.19.patch: -------------------------------------------------------------------------------- 1 | --- a/drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c 2 | +++ b/drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c 3 | @@ -251,8 +251,17 @@ static void rtl8187_tx(struct ieee80211_hw *dev, 4 | flags |= RTL818X_TX_DESC_FLAG_NO_ENC; 5 | 6 | flags |= ieee80211_get_tx_rate(dev, info)->hw_value << 24; 7 | + 8 | + // When this flag is set the firmware waits untill ALL fragments have 9 | + // reached the USB device. Then it sends the first fragment and waits 10 | + // for ACKS's. Of course in monitor mode it won't detect these ACK's. 11 | if (ieee80211_has_morefrags(tx_hdr->frame_control)) 12 | - flags |= RTL818X_TX_DESC_FLAG_MOREFRAG; 13 | + { 14 | + // If info->control.vif is NULL it's most likely in monitor mode 15 | + if (likely(info->control.vif != NULL && info->control.vif->type != NL80211_IFTYPE_MONITOR)) { 16 | + flags |= RTL818X_TX_DESC_FLAG_MOREFRAG; 17 | + } 18 | + } 19 | 20 | /* HW will perform RTS-CTS when only RTS flags is set. 21 | * HW will perform CTS-to-self when both RTS and CTS flags are set. 22 | --- a/drivers/net/wireless/zydas/zd1211rw/zd_mac.c 23 | +++ b/drivers/net/wireless/zydas/zd1211rw/zd_mac.c 24 | @@ -242,14 +242,19 @@ void zd_mac_clear(struct zd_mac *mac) 25 | static int set_rx_filter(struct zd_mac *mac) 26 | { 27 | unsigned long flags; 28 | - u32 filter = STA_RX_FILTER; 29 | + struct zd_ioreq32 ioreqs[] = { 30 | + {CR_RX_FILTER, STA_RX_FILTER}, 31 | + { CR_SNIFFER_ON, 0U }, 32 | + }; 33 | 34 | spin_lock_irqsave(&mac->lock, flags); 35 | - if (mac->pass_ctrl) 36 | - filter |= RX_FILTER_CTRL; 37 | + if (mac->pass_ctrl) { 38 | + ioreqs[0].value |= 0xFFFFFFFF; 39 | + ioreqs[1].value = 0x1; 40 | + } 41 | spin_unlock_irqrestore(&mac->lock, flags); 42 | 43 | - return zd_iowrite32(&mac->chip, CR_RX_FILTER, filter); 44 | + return zd_iowrite32a(&mac->chip, ioreqs, ARRAY_SIZE(ioreqs)); 45 | } 46 | 47 | static int set_mac_and_bssid(struct zd_mac *mac) 48 | @@ -1056,7 +1061,8 @@ int zd_mac_rx(struct ieee80211_hw *hw, const u8 *buffer, unsigned int length) 49 | /* Caller has to ensure that length >= sizeof(struct rx_status). */ 50 | status = (struct rx_status *) 51 | (buffer + (length - sizeof(struct rx_status))); 52 | - if (status->frame_status & ZD_RX_ERROR) { 53 | + if ((status->frame_status & ZD_RX_ERROR) || 54 | + (status->frame_status & ~0x21)) { 55 | if (mac->pass_failed_fcs && 56 | (status->frame_status & ZD_RX_CRC32_ERROR)) { 57 | stats.flag |= RX_FLAG_FAILED_FCS_CRC; 58 | @@ -1399,7 +1405,7 @@ struct ieee80211_hw *zd_mac_alloc_hw(struct usb_interface *intf) 59 | ieee80211_hw_set(hw, MFP_CAPABLE); 60 | ieee80211_hw_set(hw, HOST_BROADCAST_PS_BUFFERING); 61 | ieee80211_hw_set(hw, RX_INCLUDES_FCS); 62 | - ieee80211_hw_set(hw, SIGNAL_UNSPEC); 63 | + ieee80211_hw_set(hw, SIGNAL_DBM); 64 | 65 | hw->wiphy->interface_modes = 66 | BIT(NL80211_IFTYPE_MESH_POINT) | 67 | --- a/net/mac80211/cfg.c 68 | +++ b/net/mac80211/cfg.c 69 | @@ -750,7 +750,8 @@ static int ieee80211_set_monitor_channel(struct wiphy *wiphy, 70 | ret = ieee80211_vif_use_channel(sdata, chandef, 71 | IEEE80211_CHANCTX_EXCLUSIVE); 72 | } 73 | - } else if (local->open_count == local->monitors) { 74 | + // Patch: Always allow channel change, even if a normal virtual interface is present 75 | + } else /*if (local->open_count == local->monitors)*/ { 76 | local->_oper_chandef = *chandef; 77 | ieee80211_hw_config(local, 0); 78 | } 79 | --- a/net/mac80211/tx.c 80 | +++ b/net/mac80211/tx.c 81 | @@ -806,11 +806,19 @@ ieee80211_tx_h_sequence(struct ieee80211_tx_data *tx) 82 | 83 | /* 84 | * Packet injection may want to control the sequence 85 | - * number, if we have no matching interface then we 86 | - * neither assign one ourselves nor ask the driver to. 87 | + * number, so if an injected packet is found, skip 88 | + * renumbering it. Also make the packet NO_ACK to avoid 89 | + * excessive retries (ACKing and retrying should be 90 | + * handled by the injecting application). 91 | + * FIXME This may break hostapd and some other injectors. 92 | + * This should be done using a radiotap flag. 93 | */ 94 | - if (unlikely(info->control.vif->type == NL80211_IFTYPE_MONITOR)) 95 | + if (unlikely((info->flags & IEEE80211_TX_CTL_INJECTED) && 96 | + !(tx->sdata->u.mntr.flags & MONITOR_FLAG_COOK_FRAMES))) { 97 | + if (!ieee80211_has_morefrags(hdr->frame_control)) 98 | + info->flags |= IEEE80211_TX_CTL_NO_ACK; 99 | return TX_CONTINUE; 100 | + } 101 | 102 | if (unlikely(ieee80211_is_ctl(hdr->frame_control))) 103 | return TX_CONTINUE; 104 | @@ -1975,8 +1983,10 @@ void ieee80211_xmit(struct ieee80211_sub_if_data *sdata 105 | struct sta_info *sta, struct sk_buff *skb) 106 | } 107 | } 108 | - 109 | - ieee80211_set_qos_hdr(sdata, skb); 110 | + // Don't overwrite QoS header in monitor mode 111 | + if (likely(info->control.vif->type != NL80211_IFTYPE_MONITOR)) { 112 | + ieee80211_set_qos_hdr(sdata, skb); 113 | + } 114 | ieee80211_tx(sdata, sta, skb, false); 115 | } 116 | 117 | --- a/net/wireless/chan.c 118 | +++ b/net/wireless/chan.c 119 | @@ -980,8 +980,10 @@ int cfg80211_set_monitor_channel(struct cfg80211_registered_device *rdev, 120 | { 121 | if (!rdev->ops->set_monitor_channel) 122 | return -EOPNOTSUPP; 123 | - if (!cfg80211_has_monitors_only(rdev)) 124 | - return -EBUSY; 125 | + // Always allow user to change channel, even if there is another normal 126 | + // virtual interface using the device. 127 | + //if (!cfg80211_has_monitors_only(rdev)) 128 | + // return -EBUSY; 129 | 130 | return rdev_set_monitor_channel(rdev, chandef); 131 | } 132 | -------------------------------------------------------------------------------- /patches/0003-update-touchscreen-STMPE-driver.patch: -------------------------------------------------------------------------------- 1 | From c93f21cac1eb0f5f7dd2b2d1a6744f454464e178 Mon Sep 17 00:00:00 2001 2 | From: "limor@ladyada.net" 3 | Date: Tue, 16 May 2017 21:09:04 +0000 4 | Subject: [PATCH 3/8] update touchscreen STMPE driver 5 | 6 | --- 7 | drivers/input/touchscreen/stmpe-ts.c | 85 +++++++++++++++++++++--------------- 8 | 1 file changed, 49 insertions(+), 36 deletions(-) 9 | 10 | diff --git a/drivers/input/touchscreen/stmpe-ts.c b/drivers/input/touchscreen/stmpe-ts.c 11 | index 2a78e27b4495..409b81fd70e5 100644 12 | --- a/drivers/input/touchscreen/stmpe-ts.c 13 | +++ b/drivers/input/touchscreen/stmpe-ts.c 14 | @@ -48,6 +48,7 @@ 15 | #define STMPE_FIFO_STA_RESET (1<<0) 16 | 17 | #define STMPE_IRQ_TOUCH_DET 0 18 | +#define STMPE_IRQ_FIFO_TH 1 19 | 20 | #define SAMPLE_TIME(x) ((x & 0xf) << 4) 21 | #define MOD_12B(x) ((x & 0x1) << 3) 22 | @@ -63,37 +64,6 @@ 23 | #define STMPE_TS_NAME "stmpe-ts" 24 | #define XY_MASK 0xfff 25 | 26 | -/** 27 | - * struct stmpe_touch - stmpe811 touch screen controller state 28 | - * @stmpe: pointer back to STMPE MFD container 29 | - * @idev: registered input device 30 | - * @work: a work item used to scan the device 31 | - * @dev: a pointer back to the MFD cell struct device* 32 | - * @sample_time: ADC converstion time in number of clock. 33 | - * (0 -> 36 clocks, 1 -> 44 clocks, 2 -> 56 clocks, 3 -> 64 clocks, 34 | - * 4 -> 80 clocks, 5 -> 96 clocks, 6 -> 144 clocks), 35 | - * recommended is 4. 36 | - * @mod_12b: ADC Bit mode (0 -> 10bit ADC, 1 -> 12bit ADC) 37 | - * @ref_sel: ADC reference source 38 | - * (0 -> internal reference, 1 -> external reference) 39 | - * @adc_freq: ADC Clock speed 40 | - * (0 -> 1.625 MHz, 1 -> 3.25 MHz, 2 || 3 -> 6.5 MHz) 41 | - * @ave_ctrl: Sample average control 42 | - * (0 -> 1 sample, 1 -> 2 samples, 2 -> 4 samples, 3 -> 8 samples) 43 | - * @touch_det_delay: Touch detect interrupt delay 44 | - * (0 -> 10 us, 1 -> 50 us, 2 -> 100 us, 3 -> 500 us, 45 | - * 4-> 1 ms, 5 -> 5 ms, 6 -> 10 ms, 7 -> 50 ms) 46 | - * recommended is 3 47 | - * @settling: Panel driver settling time 48 | - * (0 -> 10 us, 1 -> 100 us, 2 -> 500 us, 3 -> 1 ms, 49 | - * 4 -> 5 ms, 5 -> 10 ms, 6 for 50 ms, 7 -> 100 ms) 50 | - * recommended is 2 51 | - * @fraction_z: Length of the fractional part in z 52 | - * (fraction_z ([0..7]) = Count of the fractional part) 53 | - * recommended is 7 54 | - * @i_drive: current limit value of the touchscreen drivers 55 | - * (0 -> 20 mA typical 35 mA max, 1 -> 50 mA typical 80 mA max) 56 | - */ 57 | struct stmpe_touch { 58 | struct stmpe *stmpe; 59 | struct input_dev *idev; 60 | @@ -110,6 +80,9 @@ struct stmpe_touch { 61 | u8 i_drive; 62 | }; 63 | 64 | +static unsigned debug; 65 | +module_param(debug, uint, 0); 66 | + 67 | static int __stmpe_reset_fifo(struct stmpe *stmpe) 68 | { 69 | int ret; 70 | @@ -131,6 +104,9 @@ static void stmpe_work(struct work_struct *work) 71 | struct stmpe_touch *ts = 72 | container_of(work, struct stmpe_touch, work.work); 73 | 74 | + if (debug > 1) 75 | + printk("%s()\n", __func__); 76 | + 77 | int_sta = stmpe_reg_read(ts->stmpe, STMPE_REG_INT_STA); 78 | 79 | /* 80 | @@ -146,12 +122,36 @@ static void stmpe_work(struct work_struct *work) 81 | udelay(100); 82 | } 83 | 84 | + if (debug > 1) 85 | + printk(" timeout=%u, INT_STA=0x%02X\n", timeout, int_sta); 86 | + 87 | /* reset the FIFO before we report release event */ 88 | __stmpe_reset_fifo(ts->stmpe); 89 | 90 | input_report_abs(ts->idev, ABS_PRESSURE, 0); 91 | input_report_key(ts->idev, BTN_TOUCH, 0); 92 | input_sync(ts->idev); 93 | + 94 | + /* 95 | + * Sometimes the FIFO_TH interrupt flag is not cleared. 96 | + * This prevents the controller from generating a new interrupt. 97 | + * Clear the flag and re-enable the touchscreen controller to be 98 | + * sure it's in working order again. 99 | + * If a touch IRQ happens while in this function, FIFO_TH will be set, 100 | + * but it doesn't indicate a hang. We reset anyway since the 101 | + * consequence is loosing just one data point. 102 | + */ 103 | + if (int_sta & (1 << STMPE_IRQ_FIFO_TH)) { 104 | + stmpe_set_bits(ts->stmpe, STMPE_REG_TSC_CTRL, 105 | + STMPE_TSC_CTRL_TSC_EN, 0); 106 | + stmpe_reg_write(ts->stmpe, STMPE_REG_INT_STA, (1 << STMPE_IRQ_FIFO_TH)); 107 | + __stmpe_reset_fifo(ts->stmpe); 108 | + stmpe_set_bits(ts->stmpe, STMPE_REG_TSC_CTRL, 109 | + STMPE_TSC_CTRL_TSC_EN, STMPE_TSC_CTRL_TSC_EN); 110 | + if (debug) 111 | + printk(" cleared interrupt flag FIFO_TH, INT_STA: 0x%02X -> 0x%02X\n", 112 | + int_sta, stmpe_reg_read(ts->stmpe, STMPE_REG_INT_STA)); 113 | + } 114 | } 115 | 116 | static irqreturn_t stmpe_ts_handler(int irq, void *data) 117 | @@ -160,6 +160,9 @@ static irqreturn_t stmpe_ts_handler(int irq, void *data) 118 | int x, y, z; 119 | struct stmpe_touch *ts = data; 120 | 121 | + if (debug > 1) 122 | + printk("%s()\n", __func__); 123 | + 124 | /* 125 | * Cancel scheduled polling for release if we have new value 126 | * available. Wait if the polling is already running. 127 | @@ -181,11 +184,19 @@ static irqreturn_t stmpe_ts_handler(int irq, void *data) 128 | y = ((data_set[1] & 0xf) << 8) | data_set[2]; 129 | z = data_set[3]; 130 | 131 | - input_report_abs(ts->idev, ABS_X, x); 132 | - input_report_abs(ts->idev, ABS_Y, y); 133 | - input_report_abs(ts->idev, ABS_PRESSURE, z); 134 | - input_report_key(ts->idev, BTN_TOUCH, 1); 135 | - input_sync(ts->idev); 136 | + /* 137 | + * Skip empty datasets 138 | + * If stmpe_ts_handler() interrupts stmpe_work(), and stmpe_work 139 | + * hasn't reset the FIFO yet, the FIFO will be empty here. 140 | + * This is because stmpe_ts_handler waits for stmpe_work to finish 141 | + */ 142 | + if (x && y && z) { 143 | + input_report_abs(ts->idev, ABS_X, x); 144 | + input_report_abs(ts->idev, ABS_Y, y); 145 | + input_report_abs(ts->idev, ABS_PRESSURE, 0xff - z); 146 | + input_report_key(ts->idev, BTN_TOUCH, 1); 147 | + input_sync(ts->idev); 148 | + } 149 | 150 | /* flush the FIFO after we have read out our values. */ 151 | __stmpe_reset_fifo(ts->stmpe); 152 | @@ -377,6 +388,8 @@ static int stmpe_input_probe(struct platform_device *pdev) 153 | input_set_abs_params(idev, ABS_X, 0, XY_MASK, 0, 0); 154 | input_set_abs_params(idev, ABS_Y, 0, XY_MASK, 0, 0); 155 | input_set_abs_params(idev, ABS_PRESSURE, 0x0, 0xff, 0, 0); 156 | + set_bit(ABS_PRESSURE, idev->absbit); 157 | + set_bit(BTN_TOUCH, idev->keybit); 158 | 159 | error = input_register_device(idev); 160 | if (error) { 161 | -- 162 | 2.11.0 163 | 164 | -------------------------------------------------------------------------------- /patches/0005-add-28c-28r-35r-overlays.patch: -------------------------------------------------------------------------------- 1 | From 80e37dab791674f464d53c0eb69540068675f9af Mon Sep 17 00:00:00 2001 2 | From: Todd Treece 3 | Date: Tue, 16 May 2017 21:33:52 +0000 4 | Subject: [PATCH 5/8] add 28c, 28r, & 35r overlays 5 | 6 | --- 7 | arch/arm/boot/dts/overlays/Makefile | 2 + 8 | arch/arm/boot/dts/overlays/pitft28c-overlay.dts | 0 9 | arch/arm/boot/dts/overlays/pitft28r-overlay.dts | 120 ++++++++++++++++++++++++ 10 | arch/arm/boot/dts/overlays/pitft35r-overlay.dts | 115 +++++++++++++++++++++++ 11 | 4 files changed, 237 insertions(+) 12 | mode change 100644 => 100755 arch/arm/boot/dts/overlays/pitft28c-overlay.dts 13 | create mode 100644 arch/arm/boot/dts/overlays/pitft28r-overlay.dts 14 | create mode 100755 arch/arm/boot/dts/overlays/pitft35r-overlay.dts 15 | 16 | diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile 17 | index 8d052cf22f85..d2c39203a545 100644 18 | --- a/arch/arm/boot/dts/overlays/Makefile 19 | +++ b/arch/arm/boot/dts/overlays/Makefile 20 | @@ -68,6 +68,8 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ 21 | pitft22.dtbo \ 22 | pitft28-capacitive.dtbo \ 23 | pitft28c.dtbo \ 24 | + pitft28r.dtbo \ 25 | + pitft35r.dtbo \ 26 | pitft28-resistive.dtbo \ 27 | pitft35-resistive.dtbo \ 28 | pps-gpio.dtbo \ 29 | diff --git a/arch/arm/boot/dts/overlays/pitft28c-overlay.dts b/arch/arm/boot/dts/overlays/pitft28c-overlay.dts 30 | old mode 100644 31 | new mode 100755 32 | diff --git a/arch/arm/boot/dts/overlays/pitft28r-overlay.dts b/arch/arm/boot/dts/overlays/pitft28r-overlay.dts 33 | new file mode 100644 34 | index 000000000000..3e2ebe760fe4 35 | --- /dev/null 36 | +++ b/arch/arm/boot/dts/overlays/pitft28r-overlay.dts 37 | @@ -0,0 +1,120 @@ 38 | +/* 39 | + * Device Tree overlay for pitft by Adafruit 40 | + * 41 | + */ 42 | + 43 | +/dts-v1/; 44 | +/plugin/; 45 | + 46 | +/ { 47 | + compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709"; 48 | + 49 | + fragment@0 { 50 | + target = <&spi0>; 51 | + __overlay__ { 52 | + status = "okay"; 53 | + 54 | + spidev@0{ 55 | + status = "disabled"; 56 | + }; 57 | + 58 | + spidev@1{ 59 | + status = "disabled"; 60 | + }; 61 | + }; 62 | + }; 63 | + 64 | + fragment@1 { 65 | + target = <&gpio>; 66 | + __overlay__ { 67 | + pitft_pins: pitft_pins { 68 | + brcm,pins = <24 25>; 69 | + brcm,function = <0 1>; /* in out */ 70 | + brcm,pull = <2 0>; /* pullup none */ 71 | + }; 72 | + }; 73 | + }; 74 | + 75 | + fragment@2 { 76 | + target = <&spi0>; 77 | + __overlay__ { 78 | + /* needed to avoid dtc warning */ 79 | + #address-cells = <1>; 80 | + #size-cells = <0>; 81 | + 82 | + pitft: pitft@0{ 83 | + compatible = "ilitek,ili9340"; 84 | + reg = <0>; 85 | + pinctrl-names = "default"; 86 | + pinctrl-0 = <&pitft_pins>; 87 | + 88 | + spi-max-frequency = <32000000>; 89 | + rotate = <90>; 90 | + fps = <25>; 91 | + bgr; 92 | + buswidth = <8>; 93 | + dc-gpios = <&gpio 25 0>; 94 | + debug = <0>; 95 | + }; 96 | + 97 | + pitft_ts@1 { 98 | + #address-cells = <1>; 99 | + #size-cells = <0>; 100 | + compatible = "st,stmpe610"; 101 | + reg = <1>; 102 | + 103 | + spi-max-frequency = <500000>; 104 | + irq-gpio = <&gpio 24 0x2>; /* IRQF_TRIGGER_FALLING */ 105 | + interrupts = <24 2>; /* high-to-low edge triggered */ 106 | + interrupt-parent = <&gpio>; 107 | + interrupt-controller; 108 | + 109 | + stmpe_touchscreen { 110 | + compatible = "st,stmpe-ts"; 111 | + st,sample-time = <4>; 112 | + st,mod-12b = <1>; 113 | + st,ref-sel = <0>; 114 | + st,adc-freq = <2>; 115 | + st,ave-ctrl = <3>; 116 | + st,touch-det-delay = <4>; 117 | + st,settling = <2>; 118 | + st,fraction-z = <7>; 119 | + st,i-drive = <0>; 120 | + st,rotation = <90>; 121 | + st,min-x = <250>; 122 | + st,min-y = <200>; 123 | + st,max-x = <3800>; 124 | + st,max-y = <3750>; 125 | + }; 126 | + 127 | + stmpe_gpio: stmpe_gpio { 128 | + #gpio-cells = <2>; 129 | + compatible = "st,stmpe-gpio"; 130 | + /* 131 | + * only GPIO2 is wired/available 132 | + * and it is wired to the backlight 133 | + */ 134 | + st,norequest-mask = <0x7b>; 135 | + }; 136 | + }; 137 | + }; 138 | + }; 139 | + 140 | + fragment@3 { 141 | + target-path = "/soc"; 142 | + __overlay__ { 143 | + backlight { 144 | + compatible = "gpio-backlight"; 145 | + gpios = <&stmpe_gpio 2 0>; 146 | + default-on; 147 | + }; 148 | + }; 149 | + }; 150 | + 151 | + __overrides__ { 152 | + speed = <&pitft>,"spi-max-frequency:0"; 153 | + rotate = <&pitft>,"rotate:0"; 154 | + fps = <&pitft>,"fps:0"; 155 | + debug = <&pitft>,"debug:0"; 156 | + }; 157 | +}; 158 | diff --git a/arch/arm/boot/dts/overlays/pitft35r-overlay.dts b/arch/arm/boot/dts/overlays/pitft35r-overlay.dts 159 | new file mode 100755 160 | index 000000000000..87183f5b66b1 161 | --- /dev/null 162 | +++ b/arch/arm/boot/dts/overlays/pitft35r-overlay.dts 163 | @@ -0,0 +1,115 @@ 164 | +/* 165 | + * Device Tree overlay for pitft by Adafruit 166 | + * 167 | + */ 168 | + 169 | +/dts-v1/; 170 | +/plugin/; 171 | + 172 | +/ { 173 | + compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709"; 174 | + 175 | + fragment@0 { 176 | + target = <&spi0>; 177 | + __overlay__ { 178 | + status = "okay"; 179 | + 180 | + spidev@0{ 181 | + status = "disabled"; 182 | + }; 183 | + 184 | + spidev@1{ 185 | + status = "disabled"; 186 | + }; 187 | + }; 188 | + }; 189 | + 190 | + fragment@1 { 191 | + target = <&gpio>; 192 | + __overlay__ { 193 | + pitft_pins: pitft_pins { 194 | + brcm,pins = <24 25>; 195 | + brcm,function = <0 1>; /* in out */ 196 | + brcm,pull = <2 0>; /* pullup none */ 197 | + }; 198 | + }; 199 | + }; 200 | + 201 | + fragment@2 { 202 | + target = <&spi0>; 203 | + __overlay__ { 204 | + /* needed to avoid dtc warning */ 205 | + #address-cells = <1>; 206 | + #size-cells = <0>; 207 | + 208 | + pitft: pitft@0{ 209 | + compatible = "himax,hx8357d"; 210 | + reg = <0>; 211 | + pinctrl-names = "default"; 212 | + pinctrl-0 = <&pitft_pins>; 213 | + 214 | + spi-max-frequency = <32000000>; 215 | + rotate = <90>; 216 | + fps = <25>; 217 | + bgr; 218 | + buswidth = <8>; 219 | + dc-gpios = <&gpio 25 0>; 220 | + debug = <0>; 221 | + }; 222 | + 223 | + pitft_ts@1 { 224 | + #address-cells = <1>; 225 | + #size-cells = <0>; 226 | + compatible = "st,stmpe610"; 227 | + reg = <1>; 228 | + 229 | + spi-max-frequency = <500000>; 230 | + irq-gpio = <&gpio 24 0x2>; /* IRQF_TRIGGER_FALLING */ 231 | + interrupts = <24 2>; /* high-to-low edge triggered */ 232 | + interrupt-parent = <&gpio>; 233 | + interrupt-controller; 234 | + 235 | + stmpe_touchscreen { 236 | + compatible = "st,stmpe-ts"; 237 | + st,sample-time = <4>; 238 | + st,mod-12b = <1>; 239 | + st,ref-sel = <0>; 240 | + st,adc-freq = <2>; 241 | + st,ave-ctrl = <3>; 242 | + st,touch-det-delay = <4>; 243 | + st,settling = <2>; 244 | + st,fraction-z = <7>; 245 | + st,i-drive = <0>; 246 | + }; 247 | + 248 | + stmpe_gpio: stmpe_gpio { 249 | + #gpio-cells = <2>; 250 | + compatible = "st,stmpe-gpio"; 251 | + /* 252 | + * only GPIO2 is wired/available 253 | + * and it is wired to the backlight 254 | + */ 255 | + st,norequest-mask = <0x7b>; 256 | + }; 257 | + }; 258 | + }; 259 | + }; 260 | + 261 | + fragment@3 { 262 | + target-path = "/soc"; 263 | + __overlay__ { 264 | + backlight { 265 | + compatible = "gpio-backlight"; 266 | + gpios = <&stmpe_gpio 2 0>; 267 | + default-on; 268 | + }; 269 | + }; 270 | + }; 271 | + 272 | + __overrides__ { 273 | + speed = <&pitft>,"spi-max-frequency:0"; 274 | + rotate = <&pitft>,"rotate:0"; 275 | + fps = <&pitft>,"fps:0"; 276 | + debug = <&pitft>,"debug:0"; 277 | + }; 278 | +}; 279 | -- 280 | 2.11.0 281 | 282 | -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | PROG_NAME="$(basename $0)" 4 | ARGS="$@" 5 | VERSION="4.19-1.1.0" 6 | 7 | function print_version() { 8 | printf "\tRe4son-Kernel Installer: $PROG_NAME $VERSION\n\n" 9 | exit 0 10 | } 11 | 12 | function print_help() { 13 | printf "\n\tUsage: ${PROG_NAME} [option]\n" 14 | printf "\t\t\t (No option)\tInstall Re4son-Kernel and ask to install tools & Re4son Bluetooth support\n" 15 | printf "\t\t\t\t-h\tPrint this help\n" 16 | printf "\t\t\t\t-a\tInstall everything without asking\n" 17 | printf "\t\t\t\t-v\tPrint version of this installer\n" 18 | printf "\t\t\t\t-e\tOnly install Re4son-Kernel headers\n" 19 | printf "\t\t\t\t-b\tOnly install Re4son Bluetooth support for RPi 3 B(+) & RPi Zero W\n" 20 | printf "\t\t\t\t-t\tOnly install Kali-Pi tools\n" 21 | printf "\t\t\t\t-r\tOnly remove Re4son Bluetooth support\n" 22 | printf "\t\t\t\t-u\tUpdate Re4son-Kernel Installer\n\n" 23 | exit 1 24 | } 25 | 26 | function ask() { 27 | # http://djm.me/ask 28 | while true; do 29 | 30 | if [ "${2:-}" = "Y" ]; then 31 | prompt="Y/n" 32 | default=Y 33 | elif [ "${2:-}" = "N" ]; then 34 | prompt="y/N" 35 | default=N 36 | else 37 | prompt="y/n" 38 | default= 39 | fi 40 | 41 | # Ask the question 42 | printf "\t++++ " 43 | read -p "$1 [$prompt] " REPLY 44 | 45 | # Default? 46 | if [ -z "$REPLY" ]; then 47 | REPLY=$default 48 | fi 49 | 50 | # Check if the reply is valid 51 | case "$REPLY" in 52 | Y*|y*) return 0 ;; 53 | N*|n*) return 1 ;; 54 | esac 55 | done 56 | } 57 | 58 | function exitonerr { 59 | # via: http://stackoverflow.com/a/5196108 60 | "$@" 61 | local status=$? 62 | 63 | if [ $status -ne 0 ]; then 64 | echo "Error completing: $1" >&2 65 | exit 1 66 | fi 67 | 68 | return $status 69 | } 70 | 71 | function check_update() { 72 | TEMP_FILE="/tmp/install.sh" 73 | printf "\n\t*** Downloading update ***\n" 74 | wget -O ${TEMP_FILE} https://github.com/Re4son/re4son-kernel-builder/raw/build-4.14.n/install.sh 75 | cp $TEMP_FILE $PROG_NAME 76 | chmod +x $PROG_NAME 77 | rm -f $TEMP_FILE 78 | printf "\tReplaced old version:\tRe4son-Kernel Installer: ${PROG_NAME} ${VERSION}\n" 79 | printf "\tWith new version:" 80 | source "$PROG_NAME" -v 81 | exit 0 82 | } 83 | 84 | function install_bluetooth { 85 | printf "\n\t**** Installing bluetooth packages for Raspberry Pi 3 & Zero W ****\n" 86 | apt update 87 | apt install -y ./repo/pi-bluetooth_0.1.4+re4son_all.deb 88 | systemctl enable hciuart && systemctl enable bluetooth 89 | printf "\t**** Bluetooth services installed\n\n" 90 | return 0 91 | } 92 | 93 | function install_firmware { 94 | printf "\n\t**** Installing firmware for Raspberry Pi 3 B(+) & Zero W wifi & bluetooth chips ****\n" 95 | #Raspberry Pi 3 & Zero W 96 | if [ ! -f /lib/firmware/brcm/BCM43430A1.hcd ]; then 97 | cp firmware/BCM43430A1.hcd /lib/firmware/brcm/BCM43430A1.hcd 98 | fi 99 | if [ ! -f /etc/udev/rules.d/99-com.rules ]; then 100 | cp firmware/99-com.rules /etc/udev/rules.d/99-com.rules 101 | fi 102 | 103 | return 0 104 | } 105 | 106 | function install_kernel(){ 107 | printf "\n\t**** Installing custom Re4son kernel with kali wifi injection patch and TFT support ****\n" 108 | if grep -q boot /proc/mounts; then 109 | printf "\n\t**** /boot is mounted ****\n" 110 | else 111 | if ask "Cannot find /boot. Maybe it is not mounted. Shall I try mounting it?" "Y"; then 112 | printf "\n\t**** Mounting /boot ****\n" 113 | mount /dev/mmcblk0p1 /boot 114 | fi 115 | if grep -q boot /proc/mounts; then 116 | printf "\n\t**** /boot is mounted ****\n" 117 | else 118 | printf "\n\t#### /boot must be mounted. If you think it's not, quit here and try: ####\n" 119 | printf "\t#### sudo mount /dev/mmcblk0p1 /boot ####\n\n" 120 | if ask "Continue?" "N"; then 121 | printf "\n\t*** Proceeding... ****\n\n" 122 | else 123 | printf "\n\t#### Aborting... ####\n\n" 124 | exit 1 125 | fi 126 | fi 127 | fi 128 | 129 | ## Install device-tree-compiler 130 | printf "\n\t**** Installing device tree overlays for various screens ****\n" 131 | PKG_STATUS=$(dpkg-query -W --showformat='${Status}\n' device-tree-compiler|grep "ok installed") 132 | printf "\t**** Checking for device-tree-compiler: ${PKG_STATUS} ****\n" 133 | if [ "" == "$PKG_STATUS" ]; then 134 | printf "\tNo device-tree-compiler. Installing it now.\n" 135 | apt update 136 | apt install device-tree-compiler 137 | fi 138 | ## Reserved 139 | ## cp src dest 140 | 141 | ## 142 | ## Fix for spelling error in postrm script of package raspberrypi-re4son-firmware 143 | ## so we can replace it ith the new package kalipi-re4son-firmware 144 | if [ -f /var/lib/dpkg/info/raspberrypi-re4son-firmware.postrm ]; then 145 | sed -i 's/for files in/for file in/g' "/var/lib/dpkg/info/raspberrypi-re4son-firmware.postrm" 146 | fi 147 | printf "\n\t**** Device tree overlays installed ****\n" 148 | ## raspberrypi-re4son-firmware had a spelling mistake in postrm which we have to fix 149 | ## prior to upgrading it 150 | if [ -f /var/lib/dpkg/info/raspberrypi-re4son-firmware.postrm ]; then 151 | sed -i 's/for files in/for file in/g' "/var/lib/dpkg/info/raspberrypi-re4son-firmware.postrm" 152 | fi 153 | exitonerr apt install -y --allow-downgrades -o Dpkg::Options::="--force-architecture" ./kalipi-bootloader_* 154 | exitonerr apt install -y --allow-downgrades -o Dpkg::Options::="--force-architecture" ./kalipi-kernel_* 155 | exitonerr apt install -y --allow-downgrades -o Dpkg::Options::="--force-architecture" ./libraspberrypi0_* 156 | exitonerr apt install -y --allow-downgrades -o Dpkg::Options::="--force-architecture" ./libraspberrypi-dev_* 157 | exitonerr apt install -y --allow-downgrades -o Dpkg::Options::="--force-architecture" ./libraspberrypi-doc_* 158 | exitonerr apt install -y --allow-downgrades -o Dpkg::Options::="--force-architecture" ./libraspberrypi-bin_* 159 | exitonerr apt install -y --allow-downgrades -o Dpkg::Options::="--force-architecture" ./kalipi-re4son-firmware_* 160 | ## Nexmon is not yet working with this kernel so we don't have a firmware package. R-enable when nexmon is available: 161 | ##exitonerr apt install -y --allow-downgrades -o Dpkg::Options::="--force-architecture" ./kalipi-re4son-firmware_* 162 | 163 | ARCH=`dpkg --print-architecture` 164 | ## Kernel8.img is build as kernel8-alt so that the bootloader on armhf systems wont pick it over kernel7.img 165 | ## To use this kernel, just load it via config.txt (kernel=kernel8-alt.img) or rename it 166 | ## Let's check if a kernel8.img has been created previously 167 | if [ -f /boot/kernel8.img ]; then 168 | ## On arm64 installations, we'll copy kernel8-alt.img across to kernel8.img as FAT doesn't support links 169 | if [ "$ARCH" == "arm64" ]; then 170 | cp -f /boot/kernel8-alt.img /boot/kernel8.img 171 | else 172 | ## On armhf and armel we'll avoid problems by getting rid of it but we'll ask the usera in case they have other plans 173 | if ask "A 64bit kernel image called kernel8.img is found on your system but can cause problems on $ARCH platforms. Shall I delete it?" "Y"; then 174 | rm -f /boot/kernel8.img 175 | else 176 | ## OK - let's update it then 177 | cp -f /boot/kernel8-alt.img /boot/kernel8.img 178 | fi 179 | fi 180 | fi 181 | ## Install nexmon firmware 182 | printf "\n\t**** Installing nexutil ****\n" 183 | # Install nexutil 184 | if [ -f ./nexmon/${ARCH}/nexutil ]; then 185 | cp -f ./nexmon/${ARCH}/nexutil /usr/bin/ 186 | fi 187 | printf "\n\t**** Nexutil installed ****\n" 188 | 189 | printf "\n\t**** Fixing unmet dependencies in Kali Linux ****\n" 190 | mkdir -p /etc/kbd 191 | touch /etc/kbd/config 192 | printf "\t**** Unmet dependencies in Kali Linux fixed ****\n\n" 193 | printf "\t**** Installation completed ****\n" 194 | printf "\t**** Documentation and help can be found in Sticky Finger's Kali-Pi forums at ****\n" 195 | printf "\t**** https://whitedome.com.au/forums ****\n\n" 196 | 197 | return 0 198 | } 199 | 200 | function remove_bluetooth { 201 | printf "\n" 202 | if ask "Remove Re4son-Kernel Bluetooth support?"; then 203 | printf "\n\t**** Stopping bluetooth Services ****\n" 204 | 205 | systemctl stop bluetooth 206 | systemctl stop hciuart 207 | 208 | printf "\t**** Removing bluetooth packages for Raspberry Pi 3 & Zero W ****\n" 209 | apt purge -y pi-bluetooth bluez bluez-firmware 210 | printf "\t**** Bluetooth packages for Raspberry Pi 3 & Zero W removed ****\n\n" 211 | 212 | if ask "Reboot to apply changes?"; then 213 | reboot 214 | fi 215 | fi 216 | printf "\n" 217 | return 0 218 | } 219 | 220 | function install_headers() { 221 | 222 | printf "\n\t**** Installing Re4son-Kernel headers ****\n" 223 | apt install -y -o Dpkg::Options::="--force-architecture" ./kalipi-kernel-headers_* 224 | printf "\t**** Installation completed ****\n\n" 225 | return 0 226 | } 227 | 228 | function install_tools() { 229 | printf "\n\t**** Installing Kali-Pi tools ****\n" 230 | if [ -f /usr/bin/kalipi-config ]; then 231 | VER=`tools/kalipi-config --version` 232 | VER1=${VER##* } 233 | VER=`/usr/bin/kalipi-config --version` 234 | VER2=${VER##* } 235 | if [ $VER1 \> $VER2 ]; then 236 | cp -f tools/kalipi-config /usr/bin 237 | chmod 755 /usr/bin/kalipi-config 238 | fi 239 | else 240 | cp -f tools/kalipi-config /usr/bin 241 | chmod 755 /usr/bin/kalipi-config 242 | fi 243 | if [ ! -f /usr/bin/kalipi-tft-config ]; then 244 | cp -f tools/kalipi-tft-config /usr/bin 245 | chmod 755 /usr/bin/kalipi-tft-config 246 | fi 247 | if [ -f /usr/bin/kalipi-tft-config ]; then 248 | VER=`tools/kalipi-tft-config -v` 249 | VER1=${VER##* } 250 | VER=`/usr/bin/kalipi-tft-config -v` 251 | VER2=${VER##* } 252 | if [ $VER1 \> $VER2 ]; then 253 | cp -f tools/kalipi-tft-config /usr/bin 254 | chmod 755 /usr/bin/kalipi-tft-config 255 | fi 256 | else 257 | cp -f tools/kalipi-tft-config /usr/bin 258 | chmod 755 /usr/bin/kalipi-tft-config 259 | fi 260 | printf "\t**** Installation completed ****\n\n" 261 | return 0 262 | } 263 | 264 | 265 | ############ 266 | ## ## 267 | ## MAIN ## 268 | 269 | if [[ $EUID -ne 0 ]]; then 270 | printf "\n\t${PROG_NAME} must be run as root. try: sudo install.sh\n\n" 271 | exit 1 272 | fi 273 | 274 | args=$(getopt -uo 'ahevbrtpu' -- $*) 275 | 276 | set -- $args 277 | 278 | for i 279 | do 280 | case "$i" 281 | in 282 | -h) 283 | print_help 284 | exit 0 285 | ;; 286 | -v) 287 | print_version 288 | exit 0 289 | ;; 290 | -a) 291 | install_kernel 292 | install_firmware 293 | install_headers 294 | install_tools 295 | exit 0 296 | ;; 297 | -e) 298 | install_headers 299 | exit 0 300 | ;; 301 | -b) 302 | install_firmware 303 | install_bluetooth 304 | if ask "Reboot to apply changes?" "Y"; then 305 | reboot 306 | fi 307 | exit 0 308 | ;; 309 | -r) 310 | remove_bluetooth 311 | exit 0 312 | ;; 313 | -t) 314 | install_tools 315 | exit 0 316 | ;; 317 | -u) 318 | check_update 319 | exit 0 320 | ;; 321 | esac 322 | done 323 | 324 | printf "\n" 325 | if ask "Install Re4son-Kernel?" "Y"; then 326 | install_kernel 327 | install_firmware 328 | fi 329 | ##if ask "Install support for RasPi 3 & Zero W built-in wifi & bluetooth adapters?" "Y"; then 330 | ## install_bluetooth 331 | ##fi 332 | if ask "Install kernel headers?" "Y"; then 333 | install_headers 334 | fi 335 | if ask "Install kali-pi tools (kalipi-config, kalipi-tft-config)?" "Y"; then 336 | install_tools 337 | fi 338 | if ask "Reboot to apply changes?" "Y"; then 339 | reboot 340 | fi 341 | printf "\n" 342 | -------------------------------------------------------------------------------- /patches/0006-structure-changed-now-in-a-reset-directory.patch: -------------------------------------------------------------------------------- 1 | From c34e3c19fc612fbdc3d78f3d0b75df136b39c032 Mon Sep 17 00:00:00 2001 2 | From: "limor@ladyada.net" 3 | Date: Tue, 16 May 2017 21:34:37 +0000 4 | Subject: [PATCH 6/8] structure changed, now in a reset directory! 5 | 6 | --- 7 | drivers/power/reset/Kconfig | 6 + 8 | drivers/power/reset/Makefile | 2 + 9 | drivers/power/reset/rpi_power_switch.c | 450 +++++++++++++++++++++++++++++++++ 10 | 3 files changed, 458 insertions(+) 11 | create mode 100644 drivers/power/reset/rpi_power_switch.c 12 | 13 | diff --git a/drivers/power/reset/Kconfig b/drivers/power/reset/Kconfig 14 | index 02e46bbcf45d..b7ff8b6b5c9d 100644 15 | --- a/drivers/power/reset/Kconfig 16 | +++ b/drivers/power/reset/Kconfig 17 | @@ -208,5 +208,11 @@ config SYSCON_REBOOT_MODE 18 | register, then the bootloader can read it to take different 19 | action according to the mode. 20 | 21 | +config RPI_POWER_SWITCH 22 | + tristate "Raspberry Pi GPIO power switch" 23 | + help 24 | + Use a GPIO as a pseudo power switch. 25 | + 26 | + 27 | endif 28 | 29 | diff --git a/drivers/power/reset/Makefile b/drivers/power/reset/Makefile 30 | index 1be307c7fc25..847e57bea6a4 100644 31 | --- a/drivers/power/reset/Makefile 32 | +++ b/drivers/power/reset/Makefile 33 | @@ -24,3 +24,5 @@ obj-$(CONFIG_POWER_RESET_RMOBILE) += rmobile-reset.o 34 | obj-$(CONFIG_POWER_RESET_ZX) += zx-reboot.o 35 | obj-$(CONFIG_REBOOT_MODE) += reboot-mode.o 36 | obj-$(CONFIG_SYSCON_REBOOT_MODE) += syscon-reboot-mode.o 37 | +obj-$(CONFIG_RPI_POWER_SWITCH) += rpi_power_switch.o 38 | + 39 | diff --git a/drivers/power/reset/rpi_power_switch.c b/drivers/power/reset/rpi_power_switch.c 40 | new file mode 100644 41 | index 000000000000..a6a9e70d6039 42 | --- /dev/null 43 | +++ b/drivers/power/reset/rpi_power_switch.c 44 | @@ -0,0 +1,450 @@ 45 | +/* 46 | + * Adafruit power switch driver for Raspberry Pi 47 | + * 48 | + * Simulated power switch / button, using the GPIO banks. 49 | + * 50 | + * - Written by Sean Cross for Adafruit Industries (www.adafruit.com) 51 | + */ 52 | + 53 | +#define RPI_POWER_SWITCH_VERSION "1.7" 54 | +#define POWER_SWITCH_CLASS_NAME "rpi-power-switch" 55 | + 56 | +#include 57 | + 58 | +#include 59 | +#include 60 | +#include 61 | +#include 62 | +#include 63 | +#include 64 | +#include 65 | +#include 66 | +#include 67 | +#include 68 | +#include 69 | +#include 70 | + 71 | + 72 | +/* the BCM2709 redefines this for us right! 73 | +#define BCM2708_PERI_BASE 0x20000000 74 | +*/ 75 | +#define GPIO_BASE (BCM2708_PERI_BASE + 0x200000) 76 | + 77 | +#define GPPUD (gpio_reg+0x94) 78 | +#define GPPUDCLK0 (gpio_reg+0x98) 79 | +#define GPPUDCLK1 (gpio_reg+0x9C) 80 | +#define GPSET0 (gpio_reg+0x1c) 81 | +#define GPSET1 (gpio_reg+0x20) 82 | +#define GPCLR0 (gpio_reg+0x28) 83 | +#define GPCLR1 (gpio_reg+0x2c) 84 | + 85 | +#define GPIO_REG(g) (gpio_reg+((g/10)*4)) 86 | +#define SET_GPIO_OUTPUT(g) \ 87 | + __raw_writel( \ 88 | + (1<<(((g)%10)*3)) \ 89 | + | (__raw_readl(GPIO_REG(g)) & (~(7<<(((g)%10)*3)))), \ 90 | + GPIO_REG(g)) 91 | +#define SET_GPIO_INPUT(g) \ 92 | + __raw_writel( \ 93 | + 0 \ 94 | + | (__raw_readl(GPIO_REG(g)) & (~(7<<(((g)%10)*3)))), \ 95 | + GPIO_REG(g)) 96 | +#define SET_GPIO_ALT(g,a) \ 97 | + __raw_writel( \ 98 | + (((a)<=3?(a)+4:(a)==4?3:2)<<(((g)%10)*3)) \ 99 | + | (__raw_readl(GPIO_REG(g)) & (~(7<<(((g)%10)*3)))), \ 100 | + GPIO_REG(g)) 101 | + 102 | +enum button_mode { 103 | + MODE_BUTTON = 0, 104 | + MODE_SWITCH = 1, 105 | +}; 106 | + 107 | + 108 | +enum gpio_pull_direction { 109 | + GPIO_PULL_NONE = 0, 110 | + GPIO_PULL_DOWN = 1, 111 | + GPIO_PULL_UP = 2, 112 | +}; 113 | + 114 | + 115 | +/* Module Parameters */ 116 | +static int gpio_pin = 22; 117 | +static int mode = MODE_SWITCH; 118 | +static int led_pin = 16; 119 | + 120 | +/* This is the base state. When this changes, do a shutdown. */ 121 | +static int gpio_pol; 122 | + 123 | +static void __iomem *gpio_reg; 124 | +static void (*old_pm_power_off)(void); 125 | +static struct device *switch_dev; 126 | +static int raw_gpio = 0; 127 | + 128 | + 129 | +/* Attach either a pull up or pull down to the specified GPIO pin. Or 130 | + * clear any pull on the pin, if requested. 131 | + */ 132 | +static int set_gpio_pull(int gpio, enum gpio_pull_direction direction) { 133 | + long *bank; 134 | + int pin; 135 | + 136 | + bank = ((gpio&(~31))?GPPUDCLK1:GPPUDCLK0); 137 | + pin = gpio & 31; 138 | + 139 | + /* Set the direction (involves two writes and a clock wait) */ 140 | + __raw_writel(direction, GPPUD); 141 | + udelay(20); 142 | + __raw_writel(1< 63) 159 | + return -1; 160 | + else if (gpio < 32) 161 | + __raw_writel(1< 100) 232 | + duty = 100; 233 | + low = duty; 234 | + high = 100-duty; 235 | + 236 | + if (raw_gpio) 237 | + raw_gpio_set(gpio, 0); 238 | + else 239 | + gpio_set_value(gpio, 0); 240 | + udelay(RATE*low); 241 | + 242 | + if (raw_gpio) 243 | + raw_gpio_set(gpio, 1); 244 | + else 245 | + gpio_set_value(gpio, 1); 246 | + udelay(RATE*high); 247 | + 248 | + return (RATE*low)+(RATE*high); 249 | +} 250 | + 251 | + 252 | + 253 | +/* Give an indication that it's safe to turn off the board. Pulse the LED 254 | + * in a kind of "breathing" pattern, so the user knows that it's 255 | + * "powered down". 256 | + */ 257 | +static int do_breathing_forever(int gpio) { 258 | + int err; 259 | + err = gpio_request(gpio, "LED light"); 260 | + if (err < 0) { 261 | + pr_err("Unable to request GPIO, switching to raw access"); 262 | + raw_gpio = 1; 263 | + } 264 | + SET_GPIO_OUTPUT(gpio); 265 | + 266 | + while (1) { 267 | + int usecs; 268 | + /* We want four seconds: 269 | + * - One second of ramp-up 270 | + * - One second of ramp-down 271 | + * - Two seconds of low 272 | + */ 273 | + for (usecs=0; usecs < 800000; ) 274 | + usecs += gpio_pulse(gpio, ((usecs*9)/80000)+10); 275 | + 276 | + for (usecs=0; usecs < 800000; ) 277 | + usecs += gpio_pulse(gpio, 100-((usecs*9)/80000)); 278 | + 279 | + for (usecs=0; usecs < 800000; ) 280 | + usecs += gpio_pulse(gpio, 10); 281 | + 282 | + for (usecs=0; usecs < 800000; ) 283 | + usecs += gpio_pulse(gpio, 10); 284 | + } 285 | + return 0; 286 | +} 287 | + 288 | + 289 | + 290 | +/* Our shutdown function. Execution will stay here until the switch is 291 | + * flipped. 292 | + * NOTE: The default power_off function sends a message to the GPU via 293 | + * a mailbox message to shut down most parts of the core. Since we don't 294 | + * have any documentation on the mailbox message formats, we will leave 295 | + * the CPU powered up here but not executing any code in order to simulate 296 | + * an "off" state. 297 | + */ 298 | +static void rpi_power_switch_power_off(void) { 299 | + int ret; 300 | + pr_info("Waiting for the switch to be flipped back...\n"); 301 | + if (mode == MODE_SWITCH) 302 | + gpio_pol = !gpio_pol; 303 | + ret = request_irq(gpio_to_irq(gpio_pin), reboot_isr, 304 | + gpio_pol?IRQF_TRIGGER_RISING:IRQF_TRIGGER_FALLING, 305 | + "Reboot ISR", NULL); 306 | + 307 | + /* If it's taken us so long to reboot that the switch was flipped, 308 | + * immediately reboot. 309 | + */ 310 | + if (gpio_pol == gpio_get_value(gpio_pin)) 311 | + reboot_isr(0, NULL); 312 | + 313 | + do_breathing_forever(led_pin); 314 | + return; 315 | +} 316 | + 317 | + 318 | +static irqreturn_t power_isr(int irqno, void *param) { 319 | + schedule_delayed_work(&initiate_shutdown_work, msecs_to_jiffies(100)); 320 | + return IRQ_HANDLED; 321 | +} 322 | + 323 | + 324 | + 325 | +/* Sysfs entry */ 326 | + 327 | +static ssize_t do_shutdown_show(struct device *d, 328 | + struct device_attribute *attr, char *buf) 329 | +{ 330 | + ssize_t ret; 331 | + ret = sprintf(buf, "Write into this file to initiate a shutdown\n"); 332 | + return ret; 333 | +} 334 | + 335 | +static ssize_t do_shutdown_store(struct device *d, 336 | + struct device_attribute *attr, const char *buf, size_t count) 337 | +{ 338 | + if (mode == MODE_SWITCH) 339 | + gpio_pol = !gpio_pol; 340 | + schedule_delayed_work(&initiate_shutdown_work, msecs_to_jiffies(10)); 341 | + return count; 342 | +} 343 | +static DEVICE_ATTR(do_shutdown, 0660, do_shutdown_show, do_shutdown_store); 344 | + 345 | +static struct attribute *rpi_power_switch_sysfs_entries[] = { 346 | + &dev_attr_do_shutdown.attr, 347 | + NULL, 348 | +}; 349 | + 350 | +static struct attribute_group rpi_power_switch_attribute_group = { 351 | + .name = NULL, 352 | + .attrs = rpi_power_switch_sysfs_entries, 353 | +}; 354 | + 355 | +static struct class power_switch_class = { 356 | + .name = POWER_SWITCH_CLASS_NAME, 357 | + .owner = THIS_MODULE, 358 | +}; 359 | + 360 | + 361 | + 362 | + 363 | +/* Main module entry point */ 364 | + 365 | +int __init rpi_power_switch_init(void) 366 | +{ 367 | + int ret = 0; 368 | + 369 | + old_pm_power_off = pm_power_off; 370 | + pm_power_off = rpi_power_switch_power_off; 371 | + 372 | + pr_info("Adafruit Industries' power switch driver v%s\n", 373 | + RPI_POWER_SWITCH_VERSION); 374 | + 375 | + INIT_DELAYED_WORK(&initiate_shutdown_work, initiate_shutdown); 376 | + 377 | +//printk(KERN_ALERT "DEBUG: Passed %s %d \n",__FUNCTION__,__LINE__); 378 | + 379 | + /* Register our own class for the power switch */ 380 | + ret = class_register(&power_switch_class); 381 | + if (ret < 0) { 382 | + pr_err("%s: Unable to register class\n", power_switch_class.name); 383 | + goto out0; 384 | + } 385 | + 386 | + 387 | +//printk(KERN_ALERT "DEBUG: Passed %s %d \n",__FUNCTION__,__LINE__); 388 | + 389 | + /* Create devices for each PWM present */ 390 | + switch_dev = device_create(&power_switch_class, &platform_bus, 391 | + MKDEV(0, 0), NULL, "pswitch%u", 0); 392 | + if (IS_ERR(switch_dev)) { 393 | + pr_err("%s: device_create failed\n", power_switch_class.name); 394 | + ret = PTR_ERR(switch_dev); 395 | + goto out1; 396 | + } 397 | + 398 | +//printk(KERN_ALERT "DEBUG: Passed %s %d \n",__FUNCTION__,__LINE__); 399 | + 400 | + ret = sysfs_create_group(&switch_dev->kobj, 401 | + &rpi_power_switch_attribute_group); 402 | + if (ret < 0) { 403 | + pr_err("%s: create_group failed\n", power_switch_class.name); 404 | + goto out2; 405 | + } 406 | + 407 | +//printk(KERN_ALERT "DEBUG: Passed %s %d \n",__FUNCTION__,__LINE__); 408 | + 409 | + /* GPIO register memory must be mapped before doing any direct 410 | + * accesses such as changing GPIO alt functions or changing GPIO 411 | + * pull ups or pull downs. 412 | + */ 413 | + gpio_reg = ioremap(GPIO_BASE, 1024); 414 | + 415 | + /* Set the specified pin as a GPIO input */ 416 | + SET_GPIO_INPUT(gpio_pin); 417 | + 418 | + /* Set the pin as a pulldown. Most pins should default to having 419 | + * pulldowns, and this seems most intuitive. 420 | + */ 421 | + set_gpio_pull(gpio_pin, GPIO_PULL_UP); 422 | + 423 | + ret = gpio_request(gpio_pin, "Power switch"); 424 | + if (ret) { 425 | + printk(KERN_ALERT "GPIO request failure: %d\n", ret); 426 | + goto out3; 427 | + } 428 | + 429 | +//printk(KERN_ALERT "DEBUG: Passed %s %d \n",__FUNCTION__,__LINE__); 430 | + 431 | + gpio_direction_input(gpio_pin); 432 | + 433 | + /* The targeted polarity should be the opposite of the current value. 434 | + * I.e. we want the pin to transition to this state in order to 435 | + * initiate a shutdown. 436 | + */ 437 | + gpio_pol = !gpio_get_value(gpio_pin); 438 | + 439 | + /* Request an interrupt to fire when the pin transitions to our 440 | + * desired state. 441 | + */ 442 | + ret = request_irq(__gpio_to_irq(gpio_pin), power_isr, 443 | + gpio_pol?IRQF_TRIGGER_RISING:IRQF_TRIGGER_FALLING, 444 | + "Power button", NULL); 445 | + if (ret) { 446 | + pr_err("Unable to request IRQ\n"); 447 | + goto out3; 448 | + } 449 | + 450 | +//printk(KERN_ALERT "DEBUG: Passed %s %d \n",__FUNCTION__,__LINE__); 451 | + 452 | + return 0; 453 | + 454 | + 455 | + /* Error handling */ 456 | +out3: 457 | + sysfs_remove_group(&switch_dev->kobj,&rpi_power_switch_attribute_group); 458 | +out2: 459 | + device_unregister(switch_dev); 460 | +out1: 461 | + class_unregister(&power_switch_class); 462 | +out0: 463 | + iounmap(gpio_reg); 464 | + pm_power_off = old_pm_power_off; 465 | + return ret; 466 | +} 467 | + 468 | + 469 | +/* Main module exit point (called at unload) */ 470 | + 471 | +void __exit rpi_power_switch_cleanup(void) 472 | +{ 473 | + 474 | +//printk(KERN_ALERT "DEBUG: Passed %s %d \n",__FUNCTION__,__LINE__); 475 | + sysfs_remove_group(&switch_dev->kobj,&rpi_power_switch_attribute_group); 476 | + device_unregister(switch_dev); 477 | + free_irq(__gpio_to_irq(gpio_pin), NULL); 478 | +//printk(KERN_ALERT "DEBUG: Passed %s %d \n",__FUNCTION__,__LINE__); 479 | + gpio_free(gpio_pin); 480 | + pm_power_off = old_pm_power_off; 481 | + class_unregister(&power_switch_class); 482 | + iounmap(gpio_reg); 483 | +//printk(KERN_ALERT "DEBUG: Passed %s %d \n",__FUNCTION__,__LINE__); 484 | + 485 | +} 486 | + 487 | +module_init(rpi_power_switch_init); 488 | +module_exit(rpi_power_switch_cleanup); 489 | +MODULE_LICENSE("GPL"); 490 | +MODULE_AUTHOR("Sean Cross for Adafruit Industries "); 491 | +MODULE_ALIAS("platform:bcm2708_power_switch"); 492 | +module_param(gpio_pin, int, 0); 493 | +module_param(led_pin, int, 0); 494 | +module_param(mode, int, 0); 495 | -- 496 | 2.11.0 497 | -------------------------------------------------------------------------------- /patches/0004-add-ft6x06_ts-support.patch: -------------------------------------------------------------------------------- 1 | From 24b2bd0ab9d321d4024e90b65cbb90068a72c499 Mon Sep 17 00:00:00 2001 2 | From: Todd Treece 3 | Date: Tue, 16 May 2017 21:15:10 +0000 4 | Subject: [PATCH 4/8] add ft6x06_ts support 5 | 6 | --- 7 | drivers/input/touchscreen/Kconfig | 7 + 8 | drivers/input/touchscreen/Makefile | 1 + 9 | drivers/input/touchscreen/ft6x06_ts.c | 500 ++++++++++++++++++++++++++++++++++ 10 | include/linux/input/ft6x06_ts.h | 31 +++ 11 | 4 files changed, 539 insertions(+) 12 | create mode 100644 drivers/input/touchscreen/ft6x06_ts.c 13 | create mode 100644 include/linux/input/ft6x06_ts.h 14 | 15 | diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig 16 | index 0bf78ff1ae88..546d6874ad52 100644 17 | --- a/drivers/input/touchscreen/Kconfig 18 | +++ b/drivers/input/touchscreen/Kconfig 19 | @@ -314,6 +314,13 @@ config TOUCHSCREEN_EGALAX_SERIAL 20 | To compile this driver as a module, choose M here: the 21 | module will be called egalax_ts_serial. 22 | 23 | +config TOUCHSCREEN_FT6X06 24 | + tristate "FT6x06 I2C toucscreen" 25 | + depends on I2C 26 | + help 27 | + Say Y here to enable support for the I2C connected FT6x06 family 28 | + of capacitive touchscreen drivers. 29 | + 30 | config TOUCHSCREEN_FUJITSU 31 | tristate "Fujitsu serial touchscreen" 32 | select SERIO 33 | diff --git a/drivers/input/touchscreen/Makefile b/drivers/input/touchscreen/Makefile 34 | index f720bc30ada9..5c516116d158 100644 35 | --- a/drivers/input/touchscreen/Makefile 36 | +++ b/drivers/input/touchscreen/Makefile 37 | @@ -38,6 +38,7 @@ obj-$(CONFIG_TOUCHSCREEN_ELAN) += elants_i2c.o 38 | obj-$(CONFIG_TOUCHSCREEN_ELO) += elo.o 39 | obj-$(CONFIG_TOUCHSCREEN_EGALAX) += egalax_ts.o 40 | obj-$(CONFIG_TOUCHSCREEN_EGALAX_SERIAL) += egalax_ts_serial.o 41 | +obj-$(CONFIG_TOUCHSCREEN_FT6X06) += ft6x06_ts.o 42 | obj-$(CONFIG_TOUCHSCREEN_FUJITSU) += fujitsu_ts.o 43 | obj-$(CONFIG_TOUCHSCREEN_GOODIX) += goodix.o 44 | obj-$(CONFIG_TOUCHSCREEN_ILI210X) += ili210x.o 45 | diff --git a/drivers/input/touchscreen/ft6x06_ts.c b/drivers/input/touchscreen/ft6x06_ts.c 46 | new file mode 100644 47 | index 000000000000..b9721bd2a2b9 48 | --- /dev/null 49 | +++ b/drivers/input/touchscreen/ft6x06_ts.c 50 | @@ -0,0 +1,500 @@ 51 | +/* drivers/input/touchscreen/ft6x06_ts.c 52 | + * 53 | + * FocalTech ft6x06 TouchScreen driver. 54 | + * 55 | + * Copyright (c) 2010 Focal tech Ltd. 56 | + * 57 | + * This software is licensed under the terms of the GNU General Public 58 | + * License version 2, as published by the Free Software Foundation, and 59 | + * may be copied, distributed, and modified under those terms. 60 | + * 61 | + * This program is distributed in the hope that it will be useful, 62 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of 63 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 64 | + * GNU General Public License for more details. 65 | + * 66 | + */ 67 | + 68 | +#include 69 | +#include 70 | +#include 71 | +#include 72 | +#include 73 | +#include 74 | +#include 75 | +#include 76 | +#include 77 | +#include 78 | +#include 79 | +#include 80 | +#include 81 | +#include 82 | +#include 83 | +#include 84 | +#include 85 | +#include 86 | +#include 87 | + 88 | +#include 89 | + 90 | +struct ts_event { 91 | + u16 x; 92 | + u16 y; 93 | + u8 event; /* 0 -- down; 1-- contact; 2 -- contact */ 94 | + u8 id; 95 | + u16 pressure; 96 | +}; 97 | + 98 | +/* ts_event values */ 99 | +#define FTS_POINT_UP 0x01 100 | +#define FTS_POINT_DOWN 0x00 101 | +#define FTS_POINT_CONTACT 0x02 102 | + 103 | + 104 | +struct ft6x06_ts_data { 105 | + unsigned int irq; 106 | + unsigned int x_max; 107 | + unsigned int y_max; 108 | + struct i2c_client *client; 109 | + struct input_dev *input_dev; 110 | + struct ts_event events[CFG_MAX_TOUCH_POINTS]; 111 | + int touch_points; 112 | + struct ft6x06_platform_data *pdata; 113 | +}; 114 | + 115 | +/* 116 | + * This struct is a touchpoint as stored in hardware. Note that the id, 117 | + * as well as the event, are stored in the upper nybble of the hi byte. 118 | + */ 119 | +struct ft6x06_touchpoint { 120 | + union { 121 | + u8 xhi; 122 | + u8 event; 123 | + }; 124 | + u8 xlo; 125 | + union { 126 | + u8 yhi; 127 | + u8 id; 128 | + }; 129 | + u8 ylo; 130 | + u8 unk0; 131 | + u8 unk1; 132 | +} __attribute__((__packed__)); 133 | + 134 | +/* This packet represents the register map as read from offset 0 */ 135 | +struct ft6x06_packet { 136 | + u8 unk0; 137 | + u8 unk1; 138 | + u8 touches; 139 | + struct ft6x06_touchpoint points[CFG_MAX_TOUCH_POINTS]; 140 | +} __attribute__((__packed__)); 141 | + 142 | + 143 | +static int ft6x06_read(struct i2c_client *client, u8 reg, u8 len, void *data) 144 | +{ 145 | + return i2c_smbus_read_i2c_block_data(client, reg, len, data); 146 | +} 147 | + 148 | +static int ft6x06_read_touchdata(struct ft6x06_ts_data *data) 149 | +{ 150 | + struct ts_event *event = data->events; 151 | + struct ft6x06_packet buf; 152 | + int ret; 153 | + int i; 154 | + 155 | + ret = ft6x06_read(data->client, 0, sizeof(buf), &buf); 156 | + if (ret < 0) { 157 | + dev_err(&data->client->dev, "%s read touchdata failed.\n", 158 | + __func__); 159 | + return ret; 160 | + } 161 | + 162 | + dev_dbg(&data->input_dev->dev, "detected %d touch events\n", 163 | + buf.touches); 164 | + 165 | + data->touch_points = buf.touches; 166 | + if (data->touch_points > CFG_MAX_TOUCH_POINTS) { 167 | + dev_err(&data->input_dev->dev, 168 | + "touchscreen reports %d points, %d are supported\n", 169 | + data->touch_points, CFG_MAX_TOUCH_POINTS); 170 | + data->touch_points = CFG_MAX_TOUCH_POINTS; 171 | + } 172 | + 173 | + for (i = 0; i < CFG_MAX_TOUCH_POINTS; i++) { 174 | + event[i].x = ((buf.points[i].xhi & 0xf) << 8); 175 | + event[i].x |= buf.points[i].xlo; 176 | + event[i].y = ((buf.points[i].yhi & 0xf) << 8); 177 | + event[i].y |= buf.points[i].ylo; 178 | + event[i].event = buf.points[i].event >> 6; 179 | + event[i].id = buf.points[i].id >> 4; 180 | + event[i].pressure = FT_PRESS; 181 | + } 182 | + 183 | + return 0; 184 | +} 185 | + 186 | +static void ft6x06_report_values(struct ft6x06_ts_data *data) 187 | +{ 188 | + struct ts_event *event = data->events; 189 | + int i = 0; 190 | + 191 | + for (i = 0; i < data->touch_points; i++) { 192 | + input_report_abs(data->input_dev, ABS_MT_POSITION_X, 193 | + event[i].x); 194 | + input_report_abs(data->input_dev, ABS_MT_POSITION_Y, 195 | + event[i].y); 196 | + input_report_abs(data->input_dev, ABS_MT_PRESSURE, 197 | + event[i].pressure); 198 | + input_report_abs(data->input_dev, ABS_MT_TRACKING_ID, 199 | + event[i].id); 200 | + if (event[i].event == FTS_POINT_DOWN 201 | + || event[i].event == FTS_POINT_CONTACT) 202 | + input_report_abs(data->input_dev, ABS_MT_TOUCH_MAJOR, 203 | + event[i].pressure); 204 | + else 205 | + input_report_abs(data->input_dev, ABS_MT_TOUCH_MAJOR, 206 | + 0); 207 | + input_mt_sync(data->input_dev); 208 | + } 209 | + 210 | + /* Legacy touchscreen emulation */ 211 | + if (data->touch_points > 0) { 212 | + input_report_abs(data->input_dev, ABS_X, event[0].x); 213 | + input_report_abs(data->input_dev, ABS_Y, event[0].y); 214 | + input_report_abs(data->input_dev, ABS_PRESSURE, event[0].pressure); 215 | + input_report_key(data->input_dev, BTN_TOUCH, 1); 216 | + input_sync(data->input_dev); 217 | + } 218 | + 219 | + else if (data->touch_points == 0) { 220 | + input_report_abs(data->input_dev, ABS_MT_TOUCH_MAJOR, 0); 221 | + input_report_abs(data->input_dev, ABS_PRESSURE, 0); 222 | + input_report_key(data->input_dev, BTN_TOUCH, 0); 223 | + input_sync(data->input_dev); 224 | + } 225 | +} 226 | + 227 | +static irqreturn_t ft6x06_ts_interrupt(int irq, void *dev_id) 228 | +{ 229 | + struct ft6x06_ts_data *ft6x06_ts = dev_id; 230 | + int ret = 0; 231 | + 232 | + ret = ft6x06_read_touchdata(ft6x06_ts); 233 | + if (ret == 0) 234 | + ft6x06_report_values(ft6x06_ts); 235 | + 236 | + return IRQ_HANDLED; 237 | +} 238 | + 239 | + 240 | + 241 | +#ifdef CONFIG_OF 242 | + 243 | +static int request_one_gpio(struct device *dev, 244 | + const char *name, int index, int *gpiop) 245 | +{ 246 | + struct device_node *node = dev->of_node; 247 | + int gpio, flags, ret = 0; 248 | + enum of_gpio_flags of_flags; 249 | + if (of_find_property(node, name, NULL)) { 250 | + gpio = of_get_named_gpio_flags(node, name, index, &of_flags); 251 | + 252 | + if (gpio == -ENOENT) 253 | + return 0; 254 | + if (gpio == -EPROBE_DEFER) 255 | + return gpio; 256 | + if (gpio < 0) { 257 | + dev_err(dev, "failed to get '%s' from DT\n", name); 258 | + return gpio; 259 | + } 260 | + /* active low translates to initially low */ 261 | + flags = (of_flags & OF_GPIO_ACTIVE_LOW) ? GPIOF_OUT_INIT_LOW : GPIOF_OUT_INIT_HIGH; 262 | + ret = devm_gpio_request_one(dev, gpio, flags, 263 | + dev->driver->name); 264 | + if (ret) { 265 | + dev_err(dev, "gpio_request_one('%s'=%d) failed with %d\n", name, gpio, ret); 266 | + return ret; 267 | + } 268 | + if (gpiop) 269 | + *gpiop = gpio; 270 | + } 271 | + return ret; 272 | +} 273 | + 274 | + 275 | +static int ft6x06_parse_dt(struct device *dev, 276 | + struct ft6x06_platform_data *pdata) 277 | +{ 278 | + struct device_node *np = dev->of_node; 279 | + 280 | +/* 281 | + pdata->reset_gpio = request_one_gpio(dev, "reset-gpio", 282 | + 0, &pdata->reset_gpio); 283 | +*/ 284 | + /* reset, irq gpio info */ 285 | + pdata->reset_gpio = of_get_named_gpio_flags(np, "reset-gpio", 286 | + 0, &pdata->reset_gpio); 287 | + 288 | +// printk(KERN_ALERT "RST GPIO = %d\n", pdata->reset_gpio); 289 | + 290 | +// if (pdata->reset_gpio < 0) 291 | +// return pdata->reset_gpio; 292 | + 293 | + pdata->irq_gpio = of_get_named_gpio_flags(np, "irq-gpio", 294 | + 0, &pdata->irq_gpio); 295 | + 296 | +/* 297 | + pdata->irq_gpio = request_one_gpio(dev, "irq-gpio", 298 | + 0, &pdata->irq_gpio); 299 | +*/ 300 | + 301 | + if (pdata->irq_gpio < 0) 302 | + return pdata->irq_gpio; 303 | + 304 | + 305 | + return 0; 306 | +} 307 | +#else 308 | +static int ft6x06_parse_dt(struct device *dev, 309 | + struct ft6x06_ts_platform_data *pdata) 310 | +{ 311 | + return -ENODEV; 312 | +} 313 | +#endif 314 | + 315 | +static int ft6x06_ts_probe(struct i2c_client *client, 316 | + const struct i2c_device_id *id) 317 | +{ 318 | + struct ft6x06_platform_data *pdata; 319 | + struct ft6x06_ts_data *ft6x06_ts; 320 | + struct input_dev *input_dev; 321 | + int err = 0; 322 | + 323 | + if (client->dev.of_node) { 324 | + pdata = devm_kzalloc(&client->dev, 325 | + sizeof(struct ft6x06_platform_data), GFP_KERNEL); 326 | + if (!pdata) { 327 | + dev_err(&client->dev, "Failed to allocate memory\n"); 328 | + return -ENOMEM; 329 | + } 330 | + err = ft6x06_parse_dt(&client->dev, pdata); 331 | + if (err) 332 | + return err; 333 | + } else { 334 | + pdata = (struct ft6x06_platform_data *)client->dev.platform_data; 335 | + } 336 | + 337 | + if (!pdata) { 338 | + dev_err(&client->dev, "Invalid pdata\n"); 339 | + return -EINVAL; 340 | + } 341 | + 342 | + if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { 343 | + err = -ENODEV; 344 | + goto exit_check_functionality_failed; 345 | + } 346 | + 347 | + ft6x06_ts = kzalloc(sizeof(struct ft6x06_ts_data), GFP_KERNEL); 348 | + 349 | + if (!ft6x06_ts) { 350 | + err = -ENOMEM; 351 | + goto exit_alloc_data_failed; 352 | + } 353 | + 354 | + i2c_set_clientdata(client, ft6x06_ts); 355 | + ft6x06_ts->client = client; 356 | + ft6x06_ts->pdata = pdata; 357 | + ft6x06_ts->x_max = 4095; 358 | + ft6x06_ts->y_max = 4095; 359 | + 360 | +#ifdef CONFIG_PM 361 | + if (gpio_is_valid(pdata->reset_gpio)) { 362 | + err = devm_gpio_request(&client->dev, pdata->reset_gpio, 363 | + "ft6x06 reset"); 364 | + if (err < 0) { 365 | + dev_err(&client->dev, "%s: failed to set gpio reset.\n", 366 | + __func__); 367 | + goto exit_request_reset; 368 | + } 369 | + } 370 | +#endif 371 | + 372 | +/* ??? 373 | + err = devm_gpio_request_one(&client->dev, pdata->irq_gpio, 374 | + GPIOF_DIR_IN, "ft6x06 irq"); 375 | + if (err) { 376 | + dev_err(&client->dev, "failed to request IRQ GPIO: %d\n", err); 377 | + goto exit_request_reset; 378 | + } 379 | +*/ 380 | + ft6x06_ts->irq = gpio_to_irq(pdata->irq_gpio); 381 | + 382 | + err = devm_request_threaded_irq(&client->dev, ft6x06_ts->irq, 383 | + NULL, ft6x06_ts_interrupt, 384 | + IRQF_ONESHOT | IRQF_TRIGGER_FALLING, 385 | + client->dev.driver->name, ft6x06_ts); 386 | + if (err < 0) { 387 | + dev_err(&client->dev, "%s: request irq failed\n", __func__); 388 | + goto exit_irq_request_failed; 389 | + } 390 | + 391 | + input_dev = input_allocate_device(); 392 | + if (!input_dev) { 393 | + err = -ENOMEM; 394 | + dev_err(&client->dev, "failed to allocate input device\n"); 395 | + goto exit_input_dev_alloc_failed; 396 | + } 397 | + 398 | + ft6x06_ts->input_dev = input_dev; 399 | + 400 | + input_dev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH); 401 | + 402 | + set_bit(ABS_MT_TOUCH_MAJOR, input_dev->absbit); 403 | + set_bit(ABS_MT_POSITION_X, input_dev->absbit); 404 | + set_bit(ABS_MT_POSITION_Y, input_dev->absbit); 405 | + set_bit(ABS_MT_PRESSURE, input_dev->absbit); 406 | + 407 | + input_set_abs_params(input_dev, 408 | + ABS_MT_POSITION_X, 0, ft6x06_ts->x_max, 0, 0); 409 | + input_set_abs_params(input_dev, 410 | + ABS_MT_POSITION_Y, 0, ft6x06_ts->y_max, 0, 0); 411 | + input_set_abs_params(input_dev, ABS_MT_TOUCH_MAJOR, 0, PRESS_MAX, 0, 0); 412 | + input_set_abs_params(input_dev, ABS_MT_PRESSURE, 0, PRESS_MAX, 0, 0); 413 | + input_set_abs_params(input_dev, 414 | + ABS_MT_TRACKING_ID, 0, CFG_MAX_TOUCH_POINTS, 0, 0); 415 | + input_set_abs_params(input_dev, ABS_X, 0, ft6x06_ts->x_max, 0, 0); 416 | + input_set_abs_params(input_dev, ABS_Y, 0, ft6x06_ts->y_max, 0, 0); 417 | + input_set_abs_params(input_dev, ABS_PRESSURE, 0, PRESS_MAX, 0, 0); 418 | + 419 | + set_bit(EV_KEY, input_dev->evbit); 420 | + set_bit(EV_ABS, input_dev->evbit); 421 | + 422 | + input_dev->name = FT6X06_NAME; 423 | + err = input_register_device(input_dev); 424 | + if (err) { 425 | + dev_err(&client->dev, 426 | + "ft6x06_ts_probe: failed to register input device: %s\n", 427 | + dev_name(&client->dev)); 428 | + goto exit_input_register_device_failed; 429 | + } 430 | + 431 | + /* allow touch panel controller to boot, before querying it */ 432 | + msleep(150); 433 | + 434 | +#ifdef DEBUG 435 | + { 436 | + u8 val; 437 | + ft6x06_read(client, FT6x06_REG_FW_VER, 1, &val); 438 | + dev_dbg(&client->dev, "[FTS] Firmware version = 0x%x\n", val); 439 | + 440 | + ft6x06_read(client, FT6x06_REG_POINT_RATE, 1, &val); 441 | + dev_dbg(&client->dev, "[FTS] report rate is %dHz.\n", 442 | + val * 10); 443 | + 444 | + ft6x06_read(client, FT6x06_REG_THGROUP, 1, &val); 445 | + dev_dbg(&client->dev, "[FTS] touch threshold is %d.\n", 446 | + val * 4); 447 | +#endif 448 | + 449 | + return 0; 450 | + 451 | +exit_input_register_device_failed: 452 | + input_free_device(input_dev); 453 | + 454 | +exit_input_dev_alloc_failed: 455 | +exit_request_reset: 456 | +exit_irq_request_failed: 457 | + i2c_set_clientdata(client, NULL); 458 | + kfree(ft6x06_ts); 459 | + 460 | +exit_alloc_data_failed: 461 | +exit_check_functionality_failed: 462 | + return err; 463 | +} 464 | + 465 | +#ifdef CONFIG_PM 466 | +static int ft6x06_ts_suspend(struct device *dev, pm_message_t mesg) 467 | +{ 468 | + struct ft6x06_ts_data *ts = dev_get_drvdata(dev); 469 | + dev_dbg(&ts->client->dev, "[FTS]ft6x06 suspend\n"); 470 | + disable_irq(ts->pdata->irq_gpio); 471 | + return 0; 472 | +} 473 | + 474 | +static int ft6x06_ts_resume(struct device *dev) 475 | +{ 476 | + struct ft6x06_ts_data *ts = dev_get_drvdata(dev); 477 | + dev_dbg(&ts->client->dev, "[FTS]ft6x06 resume.\n"); 478 | + if (gpio_is_valid(ts->pdata->reset_gpio)) { 479 | + gpio_set_value(ts->pdata->reset_gpio, 0); 480 | + msleep(20); 481 | + gpio_set_value(ts->pdata->reset_gpio, 1); 482 | + } 483 | + enable_irq(ts->pdata->irq_gpio); 484 | + return 0; 485 | +} 486 | +#else 487 | +#define ft6x06_ts_suspend NULL 488 | +#define ft6x06_ts_resume NULL 489 | +#endif 490 | + 491 | +static int ft6x06_ts_remove(struct i2c_client *client) 492 | +{ 493 | + struct ft6x06_ts_data *ft6x06_ts; 494 | + ft6x06_ts = i2c_get_clientdata(client); 495 | + input_unregister_device(ft6x06_ts->input_dev); 496 | + kfree(ft6x06_ts); 497 | + i2c_set_clientdata(client, NULL); 498 | + return 0; 499 | +} 500 | + 501 | +static const struct i2c_device_id ft6x06_ts_id[] = { 502 | + {FT6X06_NAME, 0}, 503 | + {} 504 | +}; 505 | + 506 | +MODULE_DEVICE_TABLE(i2c, ft6x06_ts_id); 507 | + 508 | +#ifdef CONFIG_OF 509 | +static struct of_device_id ft6x06_match_table[] = { 510 | + { .compatible = "focaltech,ft6x06",}, 511 | + { }, 512 | +}; 513 | +#else 514 | +#define ft6x06_match_table NULL 515 | +#endif 516 | + 517 | +static struct i2c_driver ft6x06_ts_driver = { 518 | + .probe = ft6x06_ts_probe, 519 | + .remove = ft6x06_ts_remove, 520 | + .id_table = ft6x06_ts_id, 521 | + .driver = { 522 | + .name = FT6X06_NAME, 523 | + .owner = THIS_MODULE, 524 | + .of_match_table=ft6x06_match_table, 525 | + .suspend = ft6x06_ts_suspend, 526 | + .resume = ft6x06_ts_resume, 527 | + }, 528 | +}; 529 | + 530 | +static int __init ft6x06_ts_init(void) 531 | +{ 532 | + int ret; 533 | + ret = i2c_add_driver(&ft6x06_ts_driver); 534 | + if (ret) 535 | + pr_err("Adding ft6x06 driver failed (errno = %d)\n", ret); 536 | + 537 | + return ret; 538 | +} 539 | + 540 | +static void __exit ft6x06_ts_exit(void) 541 | +{ 542 | + i2c_del_driver(&ft6x06_ts_driver); 543 | +} 544 | + 545 | +module_init(ft6x06_ts_init); 546 | +module_exit(ft6x06_ts_exit); 547 | + 548 | +MODULE_AUTHOR("Sean Cross "); 549 | +MODULE_DESCRIPTION("FocalTech ft6x06 TouchScreen driver"); 550 | +MODULE_LICENSE("GPL"); 551 | diff --git a/include/linux/input/ft6x06_ts.h b/include/linux/input/ft6x06_ts.h 552 | new file mode 100644 553 | index 000000000000..2233051427cf 554 | --- /dev/null 555 | +++ b/include/linux/input/ft6x06_ts.h 556 | @@ -0,0 +1,31 @@ 557 | +#ifndef __LINUX_FT6X06_TS_H__ 558 | +#define __LINUX_FT6X06_TS_H__ 559 | + 560 | +/* -- dirver configure -- */ 561 | +#define CFG_MAX_TOUCH_POINTS 2 562 | + 563 | +#define PRESS_MAX 0xFF 564 | +#define FT_PRESS 0x7F 565 | + 566 | +#define FT6X06_NAME "ft6x06_ts" 567 | + 568 | +#define FT_MAX_ID 0x0F 569 | +#define FT_TOUCH_STEP 6 570 | +#define FT_TOUCH_X_H_POS 3 571 | +#define FT_TOUCH_X_L_POS 4 572 | +#define FT_TOUCH_Y_H_POS 5 573 | +#define FT_TOUCH_Y_L_POS 6 574 | +#define FT_TOUCH_EVENT_POS 3 575 | +#define FT_TOUCH_ID_POS 5 576 | + 577 | +/*register address*/ 578 | +#define FT6x06_REG_FW_VER 0xA6 579 | +#define FT6x06_REG_POINT_RATE 0x88 580 | +#define FT6x06_REG_THGROUP 0x80 581 | + 582 | +struct ft6x06_platform_data { 583 | + unsigned int irq_gpio; 584 | + unsigned int reset_gpio; 585 | +}; 586 | + 587 | +#endif 588 | -- 589 | 2.11.0 590 | 591 | -------------------------------------------------------------------------------- /Logo-Kali-Pi/Archive/logo_linux_clut224.ppm: -------------------------------------------------------------------------------- 1 | P3 2 | 63 80 3 | 255 4 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 11 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 14 | 0 0 0 0 0 0 0 0 0 15 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 16 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 17 | 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 1 0 18 | 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 19 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 20 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 21 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 22 | 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 23 | 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 24 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 25 | 0 0 0 0 0 0 0 0 0 26 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 27 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 28 | 10 15 3 2 3 1 12 18 4 42 61 14 19 27 6 11 16 4 29 | 38 55 13 10 15 3 3 4 1 10 15 3 0 0 0 0 0 0 30 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 31 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 32 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 3 1 33 | 12 18 4 1 1 0 23 34 8 31 45 11 10 15 3 32 47 11 34 | 34 49 12 3 4 1 3 4 1 3 4 1 0 0 0 0 0 0 35 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 36 | 0 0 0 0 0 0 0 0 0 37 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 38 | 0 0 0 0 0 0 10 15 3 29 42 10 26 37 9 12 18 4 39 | 55 80 19 81 118 28 55 80 19 92 132 31 106 153 36 69 100 23 40 | 100 144 34 80 116 27 42 61 14 81 118 28 23 34 8 27 40 9 41 | 15 21 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 42 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 43 | 0 0 0 0 0 0 1 1 0 29 42 10 15 21 5 50 72 17 44 | 74 107 25 45 64 15 102 148 35 80 116 27 84 121 28 111 160 38 45 | 69 100 23 65 94 22 81 118 28 29 42 10 17 25 6 29 42 10 46 | 23 34 8 2 3 1 0 0 0 0 0 0 0 0 0 0 0 0 47 | 0 0 0 0 0 0 0 0 0 48 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 4 1 49 | 15 21 5 15 21 5 34 49 12 101 146 34 111 161 38 97 141 33 50 | 97 141 33 119 172 41 117 170 40 116 167 40 118 170 40 118 171 40 51 | 117 169 40 118 170 40 111 160 38 118 170 40 96 138 32 89 128 30 52 | 81 118 28 11 16 4 10 15 3 1 1 0 0 0 0 0 0 0 53 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 54 | 3 4 1 3 4 1 34 49 12 101 146 34 79 115 27 111 160 38 55 | 114 165 39 113 163 39 118 170 40 117 169 40 118 171 40 117 169 40 56 | 116 167 40 119 172 41 113 163 39 92 132 31 105 151 36 113 163 39 57 | 75 109 26 19 27 6 16 23 5 11 16 4 0 1 0 0 0 0 58 | 0 0 0 0 0 0 0 0 0 59 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10 15 3 60 | 80 116 27 106 153 36 105 151 36 114 165 39 118 170 40 118 171 40 61 | 118 171 40 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 62 | 117 169 40 117 169 40 117 170 40 117 169 40 118 170 40 118 170 40 63 | 117 170 40 75 109 26 75 109 26 34 49 12 0 0 0 0 0 0 64 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 4 1 65 | 64 92 22 65 94 22 100 144 34 118 171 40 118 170 40 117 169 40 66 | 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 67 | 117 169 40 117 169 40 117 169 40 118 171 41 118 170 40 117 169 40 68 | 109 158 37 105 151 36 104 150 35 47 69 16 0 0 0 0 0 0 69 | 0 0 0 0 0 0 0 0 0 70 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 71 | 42 61 14 115 167 39 118 170 40 117 169 40 117 169 40 117 169 40 72 | 117 170 40 117 170 40 117 169 40 117 169 40 117 169 40 117 169 40 73 | 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 74 | 117 169 40 117 169 40 118 170 40 96 138 32 17 25 6 0 0 0 75 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 47 69 16 76 | 114 165 39 117 168 40 117 170 40 117 169 40 117 169 40 117 169 40 77 | 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 78 | 117 169 40 117 169 40 118 170 40 117 169 40 117 169 40 117 169 40 79 | 117 170 40 119 172 41 96 138 32 12 18 4 0 0 0 0 0 0 80 | 0 0 0 0 0 0 0 0 0 81 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10 15 3 82 | 32 47 11 105 151 36 118 170 40 117 169 40 117 169 40 116 168 40 83 | 109 157 37 111 160 38 117 169 40 118 171 40 117 169 40 117 169 40 84 | 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 85 | 117 169 40 117 169 40 117 169 40 118 171 40 69 100 23 2 3 1 86 | 0 0 0 0 0 0 0 0 0 0 0 0 19 27 6 101 146 34 87 | 118 171 40 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 88 | 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 117 170 40 89 | 118 171 40 115 166 39 107 154 36 111 161 38 117 169 40 117 169 40 90 | 117 169 40 118 171 40 75 109 26 19 27 6 2 3 1 0 0 0 91 | 0 0 0 0 0 0 0 0 0 92 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 16 23 5 93 | 89 128 30 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 94 | 111 160 38 92 132 31 79 115 27 96 138 32 115 166 39 119 171 41 95 | 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 96 | 117 169 40 117 169 40 117 169 40 118 170 40 109 157 37 26 37 9 97 | 0 0 0 0 0 0 0 0 0 0 0 0 64 92 22 118 171 40 98 | 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 99 | 117 169 40 117 169 40 117 169 40 118 170 40 118 171 40 109 157 37 100 | 89 128 30 81 118 28 100 144 34 115 166 39 117 169 40 117 169 40 101 | 117 169 40 117 170 40 113 163 39 60 86 20 1 1 0 0 0 0 102 | 0 0 0 0 0 0 0 0 0 103 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 104 | 27 40 9 96 138 32 118 170 40 117 169 40 117 169 40 117 169 40 105 | 117 170 40 117 169 40 101 146 34 67 96 23 55 80 19 84 121 28 106 | 113 163 39 119 171 41 117 169 40 117 169 40 117 169 40 117 169 40 107 | 117 169 40 117 169 40 117 169 40 117 169 40 119 171 41 65 94 22 108 | 0 0 0 0 0 0 0 0 0 15 21 5 101 146 34 118 171 40 109 | 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 110 | 117 169 40 118 170 40 118 171 40 104 150 35 69 100 23 53 76 18 111 | 81 118 28 111 160 38 118 170 40 117 169 40 117 169 40 117 169 40 112 | 117 169 40 114 165 39 69 100 23 10 15 3 0 0 0 0 0 0 113 | 0 0 0 0 0 0 0 0 0 114 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 115 | 31 45 11 77 111 26 117 169 40 117 169 40 117 169 40 117 169 40 116 | 117 169 40 117 169 40 118 170 40 116 168 40 92 132 31 47 69 16 117 | 38 55 13 81 118 28 113 163 39 119 171 41 117 169 40 117 169 40 118 | 117 169 40 117 169 40 117 169 40 117 169 40 118 171 41 92 132 31 119 | 10 15 3 0 0 0 0 0 0 36 52 12 115 166 39 117 169 40 120 | 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 118 170 40 121 | 118 171 40 102 148 35 64 92 22 34 49 12 65 94 22 106 153 36 122 | 118 171 40 117 170 40 117 169 40 117 169 40 117 169 40 117 169 40 123 | 118 170 40 107 154 36 55 80 19 15 21 5 0 0 0 0 0 0 124 | 0 0 0 0 0 0 0 0 0 125 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 126 | 29 42 10 101 146 34 118 171 40 117 169 40 117 169 40 117 169 40 127 | 117 169 40 117 169 40 117 169 40 117 169 40 118 171 40 113 163 39 128 | 75 109 26 27 40 9 36 52 12 89 128 30 116 167 40 118 171 40 129 | 117 169 40 117 169 40 117 169 40 117 169 40 118 170 40 104 150 35 130 | 16 23 5 0 0 0 0 0 0 53 76 18 118 171 40 117 169 40 131 | 117 169 40 117 169 40 117 169 40 117 169 40 119 171 41 109 157 37 132 | 67 96 23 23 34 8 42 61 14 96 138 32 118 170 40 118 170 40 133 | 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 134 | 117 169 40 117 169 40 74 107 25 10 15 3 0 0 0 0 0 0 135 | 0 0 0 0 0 0 0 0 0 136 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 137 | 0 0 0 31 45 11 101 146 34 118 170 40 117 169 40 117 169 40 138 | 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 139 | 119 171 41 102 148 35 47 69 16 14 20 5 50 72 17 102 148 35 140 | 118 171 40 117 169 40 117 169 40 117 169 40 118 170 40 102 148 35 141 | 15 21 5 0 0 0 0 0 0 50 72 17 118 170 40 117 169 40 142 | 117 169 40 117 169 40 118 170 40 116 167 40 84 121 28 27 40 9 143 | 19 27 6 74 107 25 114 165 39 118 171 40 117 169 40 117 169 40 144 | 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 145 | 117 169 40 75 109 26 10 15 4 0 0 0 0 0 0 0 0 0 146 | 0 0 0 0 0 0 0 0 0 147 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 148 | 0 0 0 38 55 13 102 148 35 118 171 40 117 169 40 117 169 40 149 | 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 150 | 117 169 40 118 170 40 115 167 39 77 111 26 17 25 6 19 27 6 151 | 77 111 26 115 166 39 118 170 40 117 169 40 119 172 41 81 118 28 152 | 3 4 1 0 0 0 0 0 0 27 40 9 111 160 38 118 170 40 153 | 117 169 40 118 171 40 105 151 36 50 72 17 10 15 3 38 55 13 154 | 100 144 34 118 171 40 117 169 40 117 169 40 117 169 40 117 169 40 155 | 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 156 | 117 169 40 79 115 27 15 21 5 0 0 0 0 0 0 0 0 0 157 | 0 0 0 0 0 0 0 0 0 158 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 159 | 0 0 0 10 15 3 64 92 22 111 160 38 117 169 40 117 169 40 160 | 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 161 | 117 169 40 117 169 40 117 169 40 118 171 40 96 138 32 32 47 11 162 | 3 4 1 50 72 17 107 154 36 120 173 41 105 151 36 31 45 11 163 | 0 0 0 0 0 0 0 0 0 3 4 1 65 94 22 117 169 40 164 | 118 170 40 89 128 30 26 37 9 3 4 1 60 86 20 111 161 38 165 | 118 171 40 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 166 | 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 167 | 97 141 33 36 52 12 1 1 0 0 0 0 0 0 0 0 0 0 168 | 0 0 0 0 0 0 0 0 0 169 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 170 | 0 0 0 0 0 0 14 20 5 75 109 26 117 168 40 117 169 40 171 | 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 172 | 117 169 40 117 169 40 117 169 40 117 169 40 118 171 40 107 154 36 173 | 45 64 15 2 3 1 31 45 11 75 109 26 32 47 11 0 1 0 174 | 0 0 0 0 0 0 0 0 0 0 0 0 10 15 3 55 80 19 175 | 65 94 22 11 16 4 11 16 4 75 109 26 116 168 40 118 170 40 176 | 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 177 | 117 169 40 117 169 40 117 169 40 117 169 40 118 170 40 107 154 36 178 | 47 69 16 3 4 1 0 0 0 0 0 0 0 0 0 0 0 0 179 | 0 0 0 0 0 0 0 0 0 180 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 181 | 0 0 0 0 0 0 12 18 4 69 100 23 111 161 38 118 171 40 182 | 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 183 | 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 118 170 40 184 | 111 160 38 50 72 17 2 3 1 2 3 1 0 0 0 0 0 0 185 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 186 | 1 1 0 12 18 4 81 118 28 118 170 40 117 169 40 117 169 40 187 | 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 188 | 117 169 40 117 169 40 117 169 40 117 170 40 118 171 40 101 146 34 189 | 42 61 14 2 3 1 0 0 0 0 0 0 0 0 0 0 0 0 190 | 0 0 0 0 0 0 0 0 0 191 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 192 | 0 0 0 0 0 0 0 0 0 3 4 1 36 52 12 89 128 30 193 | 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 194 | 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 195 | 118 171 41 101 146 34 14 20 5 0 0 0 0 0 0 0 0 0 196 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 197 | 0 0 0 47 69 16 118 170 40 117 169 40 117 169 40 117 169 40 198 | 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 199 | 117 169 40 117 169 40 117 170 40 111 160 38 69 100 23 19 27 6 200 | 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 201 | 0 0 0 0 0 0 0 0 0 202 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 203 | 0 0 0 0 0 0 0 0 0 0 0 0 11 16 4 69 100 23 204 | 115 167 39 119 172 41 117 169 40 117 169 40 117 169 40 117 169 40 205 | 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 206 | 119 172 41 75 109 26 3 4 1 0 0 0 0 0 0 0 0 0 207 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 208 | 0 0 0 23 34 8 106 153 36 118 170 40 117 169 40 117 169 40 209 | 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 210 | 117 169 40 118 170 40 119 172 41 105 151 36 42 61 14 2 3 1 211 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 212 | 0 0 0 0 0 0 0 0 0 213 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 214 | 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 15 21 5 215 | 45 64 15 80 116 27 114 165 39 118 170 40 117 169 40 117 169 40 216 | 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 119 172 41 217 | 97 141 33 20 30 7 0 0 0 0 0 0 0 0 0 0 0 0 218 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 219 | 0 0 0 1 1 0 53 76 18 114 165 39 118 171 40 117 169 40 220 | 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 117 169 40 221 | 118 171 40 104 150 35 64 92 22 31 45 11 10 15 3 0 0 0 222 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 223 | 0 0 0 0 0 0 0 0 0 224 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 225 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 226 | 0 0 0 36 52 12 97 141 33 109 158 37 113 163 39 116 168 40 227 | 117 169 40 117 170 40 118 170 40 119 172 41 115 167 39 84 121 28 228 | 23 34 8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 229 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 230 | 0 0 0 0 0 0 3 4 1 50 72 17 102 148 35 118 171 40 231 | 119 171 41 118 170 40 117 169 40 117 169 40 115 166 39 111 161 38 232 | 109 157 37 79 115 27 12 18 4 0 0 0 0 0 0 0 0 0 233 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 234 | 0 0 0 0 0 0 0 0 0 235 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 236 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 237 | 0 0 0 3 4 1 15 21 5 23 34 8 45 64 15 106 153 36 238 | 116 167 40 111 160 38 101 146 34 79 115 27 42 61 14 10 15 3 239 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 240 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 241 | 0 0 0 0 0 0 0 0 0 1 1 0 20 30 7 60 86 20 242 | 89 128 30 106 153 36 113 163 39 117 169 40 84 121 28 29 42 10 243 | 19 27 6 10 15 3 2 3 1 0 0 0 0 0 0 0 0 0 244 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 245 | 0 0 0 0 0 0 0 0 0 246 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 247 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 248 | 0 0 0 0 0 0 0 0 0 0 0 0 16 23 5 38 55 13 249 | 36 52 12 26 37 9 12 18 4 2 3 1 0 0 0 0 0 0 250 | 0 0 0 0 0 0 0 0 0 1 0 0 19 2 7 52 5 18 251 | 78 7 27 88 8 31 81 7 29 56 5 19 25 2 9 3 0 1 252 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 253 | 3 4 1 19 27 6 31 45 11 38 55 13 32 47 11 3 4 1 254 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 256 | 0 0 0 0 0 0 0 0 0 257 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 258 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 259 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 0 1 260 | 9 0 3 12 1 4 9 0 3 4 0 1 0 0 0 0 0 0 261 | 0 0 0 0 0 0 28 3 10 99 9 35 156 14 55 182 16 64 262 | 189 17 66 190 17 67 189 17 66 184 17 65 166 15 58 118 13 41 263 | 45 4 16 3 0 1 0 0 0 0 0 0 0 0 0 0 0 0 264 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 265 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 266 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 267 | 0 0 0 0 0 0 0 0 0 268 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 269 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 270 | 0 0 0 0 0 0 11 1 4 52 5 18 101 9 35 134 12 47 271 | 151 14 53 154 14 54 151 14 53 113 10 40 11 1 4 0 0 0 272 | 3 0 1 67 6 24 159 14 56 190 17 67 190 17 67 188 17 66 273 | 188 17 66 188 17 66 188 17 66 188 17 66 190 17 67 191 17 67 274 | 174 16 61 101 9 35 14 1 5 0 0 0 35 3 12 108 10 38 275 | 122 11 43 122 11 43 112 10 39 87 8 30 50 5 17 13 1 5 276 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 277 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 278 | 0 0 0 0 0 0 0 0 0 279 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 280 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 281 | 3 0 1 56 5 19 141 13 49 182 16 64 191 17 67 191 17 67 282 | 190 17 67 190 17 67 191 17 67 113 10 40 3 0 1 1 0 0 283 | 79 7 28 180 16 63 190 17 67 188 17 66 188 17 66 188 17 66 284 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 285 | 189 17 66 188 17 66 122 11 43 11 1 4 41 4 14 176 16 62 286 | 191 17 67 191 17 67 191 17 67 190 17 67 181 16 63 146 13 51 287 | 75 7 26 10 1 4 0 0 0 0 0 0 0 0 0 0 0 0 288 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 289 | 0 0 0 0 0 0 0 0 0 290 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 291 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 1 2 292 | 90 8 32 178 16 62 191 17 67 188 17 66 188 17 66 188 17 66 293 | 188 17 66 190 17 67 141 13 49 22 2 8 0 0 0 41 4 14 294 | 173 16 61 190 17 67 188 17 66 188 17 66 188 17 66 188 17 66 295 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 296 | 188 17 66 188 17 66 188 17 66 88 8 31 1 0 0 89 8 31 297 | 185 17 65 189 17 66 188 17 66 188 17 66 189 17 66 191 17 67 298 | 186 17 65 124 11 43 25 2 9 0 0 0 0 0 0 0 0 0 299 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 300 | 0 0 0 0 0 0 0 0 0 301 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 302 | 0 0 0 0 0 0 0 0 0 0 0 0 2 0 1 89 8 31 303 | 184 17 65 189 17 66 188 17 66 188 17 66 188 17 66 188 17 66 304 | 190 17 67 151 14 53 34 3 12 0 0 0 0 0 0 79 7 28 305 | 190 17 67 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 306 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 307 | 188 17 66 188 17 66 191 17 67 146 13 51 9 1 3 7 1 2 308 | 108 10 38 187 17 66 189 17 66 188 17 66 188 17 66 188 17 66 309 | 188 17 66 190 17 67 141 13 49 22 2 8 0 0 0 0 0 0 310 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 311 | 0 0 0 0 0 0 0 0 0 312 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 313 | 0 0 0 0 0 0 0 0 0 0 0 0 52 5 18 176 16 62 314 | 189 17 66 188 17 66 188 17 66 188 17 66 188 17 66 190 17 67 315 | 151 14 53 38 3 13 0 0 0 0 0 0 0 0 0 50 5 17 316 | 180 16 63 189 17 66 188 17 66 188 17 66 188 17 66 188 17 66 317 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 318 | 188 17 66 188 17 66 191 17 67 141 13 49 7 1 3 0 0 0 319 | 11 1 4 112 10 39 187 17 66 189 17 66 188 17 66 188 17 66 320 | 188 17 66 188 17 66 190 17 67 113 10 40 5 0 2 0 0 0 321 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 322 | 0 0 0 0 0 0 0 0 0 323 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 324 | 0 0 0 0 0 0 0 0 0 7 1 3 132 12 46 191 17 67 325 | 188 17 66 188 17 66 188 17 66 188 17 66 190 17 67 146 13 51 326 | 35 3 12 0 0 0 0 0 0 0 0 0 0 0 0 5 0 2 327 | 101 9 35 185 17 65 190 17 67 188 17 66 188 17 66 188 17 66 328 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 329 | 188 17 66 190 17 67 180 16 63 67 6 24 0 0 0 0 0 0 330 | 0 0 0 11 1 4 108 10 38 186 17 65 189 17 66 188 17 66 331 | 188 17 66 188 17 66 189 17 66 180 16 63 56 5 19 0 0 0 332 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 333 | 0 0 0 0 0 0 0 0 0 334 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 335 | 0 0 0 0 0 0 0 0 0 44 4 15 177 16 62 189 17 66 336 | 188 17 66 188 17 66 189 17 66 189 17 66 134 12 47 28 3 10 337 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 338 | 8 1 3 79 7 28 159 14 56 188 17 66 191 17 67 190 17 67 339 | 189 17 66 189 17 66 189 17 66 189 17 66 190 17 67 191 17 67 340 | 188 17 66 158 14 55 72 7 25 4 0 1 0 0 0 0 0 0 341 | 0 0 0 0 0 0 8 1 3 95 9 33 182 16 64 189 17 67 342 | 188 17 66 188 17 66 188 17 66 191 17 67 122 11 43 3 0 1 343 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 344 | 0 0 0 0 0 0 0 0 0 345 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 346 | 0 0 0 0 0 0 0 0 0 88 8 31 190 17 67 188 17 66 347 | 188 17 66 189 17 66 185 17 65 113 10 40 18 2 6 0 0 0 348 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 349 | 0 0 0 1 0 0 24 2 8 77 7 27 124 11 43 154 14 54 350 | 168 15 59 173 16 61 173 16 61 168 15 59 154 14 54 124 11 43 351 | 77 7 27 22 2 8 0 0 0 0 0 0 0 0 0 0 0 0 352 | 0 0 0 0 0 0 0 0 0 5 0 2 77 7 27 173 16 61 353 | 190 17 67 188 17 66 188 17 66 190 17 67 164 15 57 23 2 8 354 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 355 | 0 0 0 0 0 0 0 0 0 356 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 357 | 0 0 0 0 0 0 1 0 0 118 13 41 191 17 67 188 17 66 358 | 190 17 67 174 16 61 87 8 30 8 1 3 0 0 0 0 0 0 359 | 0 0 0 0 0 0 10 1 4 29 3 10 40 4 14 36 3 13 360 | 18 2 6 2 0 1 0 0 0 0 0 0 3 0 1 14 1 5 361 | 26 2 9 33 3 11 32 3 11 25 2 9 13 1 5 3 0 1 362 | 0 0 0 14 1 5 56 5 19 95 9 33 109 10 38 101 9 35 363 | 77 7 27 35 3 12 5 0 2 0 0 0 1 0 0 56 5 19 364 | 156 14 55 190 17 67 188 17 66 188 17 66 182 16 64 50 5 17 365 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 366 | 0 0 0 0 0 0 0 0 0 367 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 368 | 0 0 0 0 0 0 5 0 2 134 12 47 191 17 67 189 17 66 369 | 151 14 53 52 5 18 2 0 1 0 0 0 0 0 0 1 0 0 370 | 28 3 10 90 8 32 146 13 51 170 15 60 178 16 62 174 16 61 371 | 158 14 55 112 10 39 40 4 14 1 0 0 0 0 0 0 0 0 372 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 0 1 373 | 56 5 19 146 13 51 183 17 64 191 17 67 191 17 67 191 17 67 374 | 188 17 66 173 16 61 122 11 43 41 4 14 1 0 0 0 0 0 375 | 30 3 10 124 11 43 185 17 65 190 17 67 187 17 66 67 6 24 376 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 377 | 0 0 0 0 0 0 0 0 0 378 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 379 | 0 0 0 0 0 0 6 1 2 134 12 47 168 15 59 99 9 35 380 | 21 2 7 0 0 0 0 0 0 0 0 0 6 1 2 77 7 27 381 | 162 15 57 190 17 67 191 17 67 189 17 66 189 17 66 189 17 66 382 | 190 17 67 191 17 67 169 15 59 75 7 26 3 0 1 0 0 0 383 | 0 0 0 0 0 0 0 0 0 0 0 0 2 0 1 79 7 28 384 | 178 16 62 191 17 67 188 17 66 188 17 66 188 17 66 188 17 66 385 | 188 17 66 189 17 66 191 17 67 170 15 60 79 7 28 5 0 2 386 | 0 0 0 10 1 3 78 7 27 159 14 56 188 17 66 75 7 26 387 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 388 | 0 0 0 0 0 0 0 0 0 389 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 390 | 0 0 0 0 0 0 1 0 0 35 3 12 29 3 10 2 0 1 391 | 0 0 0 0 0 0 0 0 0 9 1 3 101 9 35 183 17 64 392 | 190 17 67 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 393 | 188 17 66 188 17 66 190 17 67 178 16 63 67 6 23 0 0 0 394 | 0 0 0 0 0 0 0 0 0 0 0 0 52 5 18 174 16 61 395 | 190 17 67 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 396 | 188 17 66 188 17 66 188 17 66 190 17 67 182 16 64 89 8 31 397 | 4 0 1 0 0 0 0 0 0 25 2 9 73 7 26 31 3 11 398 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 399 | 0 0 0 0 0 0 0 0 0 400 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 401 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 402 | 0 0 0 0 0 0 4 0 1 98 9 34 187 17 66 189 17 66 403 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 404 | 188 17 66 188 17 66 188 17 66 190 17 67 158 14 55 25 2 9 405 | 0 0 0 0 0 0 0 0 0 8 1 3 134 12 47 191 17 67 406 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 407 | 188 17 66 188 17 66 188 17 66 188 17 66 189 17 66 180 16 63 408 | 68 6 24 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 409 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 410 | 0 0 0 0 0 0 0 0 0 411 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 412 | 0 0 0 6 1 2 19 2 7 3 0 1 0 0 0 0 0 0 413 | 0 0 0 0 0 0 65 6 23 180 16 63 189 17 66 188 17 66 414 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 415 | 188 17 66 188 17 66 188 17 66 188 17 66 189 17 66 83 8 29 416 | 0 0 0 0 0 0 0 0 0 41 4 14 177 16 62 189 17 66 417 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 418 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 190 17 67 419 | 159 14 56 28 3 10 0 0 0 0 0 0 0 0 0 23 2 8 420 | 41 4 14 5 0 2 0 0 0 0 0 0 0 0 0 0 0 0 421 | 0 0 0 0 0 0 0 0 0 422 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 423 | 23 2 8 113 10 40 159 14 56 65 6 23 0 0 0 0 0 0 424 | 0 0 0 16 1 6 146 13 51 191 17 67 188 17 66 188 17 66 425 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 426 | 188 17 66 188 17 66 188 17 66 188 17 66 191 17 67 132 12 46 427 | 5 0 2 0 0 0 0 0 0 77 7 27 189 17 66 188 17 66 428 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 429 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 430 | 190 17 67 98 9 34 0 0 0 0 0 0 12 1 4 134 12 47 431 | 178 16 63 108 10 38 16 1 6 0 0 0 0 0 0 0 0 0 432 | 0 0 0 0 0 0 0 0 0 433 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 30 3 10 434 | 141 13 49 190 17 67 191 17 67 134 12 47 6 1 2 0 0 0 435 | 0 0 0 68 6 24 186 17 65 188 17 66 188 17 66 188 17 66 436 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 437 | 188 17 66 188 17 66 188 17 66 188 17 66 190 17 67 156 14 55 438 | 14 1 5 0 0 0 0 0 0 98 9 34 191 17 67 188 17 66 439 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 440 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 441 | 190 17 67 156 14 55 19 2 7 0 0 0 47 4 16 181 16 63 442 | 190 17 67 189 17 66 126 14 44 17 2 6 0 0 0 0 0 0 443 | 0 0 0 0 0 0 0 0 0 444 | 0 0 0 0 0 0 0 0 0 0 0 0 16 1 6 134 12 47 445 | 191 17 67 188 17 66 190 17 67 162 15 57 19 2 7 0 0 0 446 | 3 0 1 123 11 43 191 17 67 188 17 66 188 17 66 188 17 66 447 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 448 | 188 17 66 188 17 66 188 17 66 188 17 66 190 17 67 163 15 57 449 | 20 2 7 0 0 0 0 0 0 101 9 35 191 17 67 188 17 66 450 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 451 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 452 | 188 17 66 182 16 64 52 5 18 0 0 0 73 7 26 188 17 66 453 | 188 17 66 188 17 66 189 17 66 109 10 38 5 0 2 0 0 0 454 | 0 0 0 0 0 0 0 0 0 455 | 0 0 0 0 0 0 0 0 0 0 0 0 95 9 33 189 17 66 456 | 188 17 66 188 17 66 189 17 66 171 15 60 29 3 10 0 0 0 457 | 16 1 6 156 14 55 190 17 67 188 17 66 188 17 66 188 17 66 458 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 459 | 188 17 66 188 17 66 188 17 66 188 17 66 190 17 67 158 14 55 460 | 17 2 6 0 0 0 0 0 0 85 8 30 190 17 67 188 17 66 461 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 462 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 463 | 188 17 66 189 17 66 81 7 29 0 0 0 85 8 30 190 17 67 464 | 188 17 66 188 17 66 189 17 66 180 16 63 56 5 19 0 0 0 465 | 0 0 0 0 0 0 0 0 0 466 | 0 0 0 0 0 0 0 0 0 25 2 9 162 15 57 190 17 67 467 | 188 17 66 188 17 66 189 17 66 173 16 61 31 3 11 0 0 0 468 | 30 3 10 171 15 60 189 17 66 188 17 66 188 17 66 188 17 66 469 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 470 | 188 17 66 188 17 66 188 17 66 188 17 66 191 17 67 141 13 49 471 | 7 1 2 0 0 0 0 0 0 56 5 19 183 17 64 188 17 66 472 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 473 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 474 | 188 17 66 191 17 67 98 9 34 0 0 0 88 8 31 190 17 67 475 | 188 17 66 188 17 66 188 17 66 191 17 67 124 11 43 5 0 2 476 | 0 0 0 0 0 0 0 0 0 477 | 0 0 0 0 0 0 0 0 0 68 6 24 187 17 66 188 17 66 478 | 188 17 66 188 17 66 189 17 66 170 15 60 28 3 10 0 0 0 479 | 34 3 12 174 16 61 189 17 66 188 17 66 188 17 66 188 17 66 480 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 481 | 188 17 66 188 17 66 188 17 66 188 17 66 191 17 67 101 9 35 482 | 0 0 0 0 0 0 0 0 0 21 2 7 159 14 56 190 17 67 483 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 484 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 485 | 188 17 66 191 17 67 98 9 34 0 0 0 81 7 29 189 17 66 486 | 188 17 66 188 17 66 188 17 66 189 17 66 168 15 59 28 3 10 487 | 0 0 0 0 0 0 0 0 0 488 | 0 0 0 0 0 0 0 0 0 109 10 38 191 17 67 188 17 66 489 | 188 17 66 188 17 66 190 17 67 163 15 57 21 2 7 0 0 0 490 | 26 2 9 168 15 59 189 17 66 188 17 66 188 17 66 188 17 66 491 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 492 | 188 17 66 188 17 66 188 17 66 189 17 66 180 16 63 47 4 16 493 | 0 0 0 0 0 0 0 0 0 0 0 0 108 10 38 190 17 67 494 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 495 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 496 | 188 17 66 189 17 66 78 7 27 0 0 0 68 6 24 187 17 66 497 | 188 17 66 188 17 66 188 17 66 188 17 66 183 17 64 56 5 19 498 | 0 0 0 0 0 0 0 0 0 499 | 0 0 0 0 0 0 3 0 1 131 12 46 191 17 67 188 17 66 500 | 188 17 66 188 17 66 190 17 67 151 14 53 12 1 4 0 0 0 501 | 11 1 4 146 13 51 190 17 67 188 17 66 188 17 66 188 17 66 502 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 503 | 188 17 66 188 17 66 188 17 66 191 17 67 126 14 44 7 1 2 504 | 0 0 0 0 0 0 0 0 0 0 0 0 32 3 11 164 15 58 505 | 190 17 67 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 506 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 507 | 189 17 66 178 16 62 44 4 15 0 0 0 50 5 17 182 16 64 508 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 72 7 25 509 | 0 0 0 0 0 0 0 0 0 510 | 0 0 0 0 0 0 5 0 2 134 12 47 191 17 67 188 17 66 511 | 188 17 66 188 17 66 191 17 67 131 12 46 3 0 1 0 0 0 512 | 0 0 0 101 9 35 190 17 67 188 17 66 188 17 66 188 17 66 513 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 514 | 188 17 66 188 17 66 190 17 67 170 15 60 44 4 15 0 0 0 515 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 77 7 27 516 | 183 17 64 189 17 66 188 17 66 188 17 66 188 17 66 188 17 66 517 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 518 | 191 17 67 134 12 47 9 1 3 0 0 0 31 3 11 171 15 60 519 | 189 17 66 188 17 66 188 17 66 188 17 66 188 17 66 72 7 25 520 | 0 0 0 0 0 0 0 0 0 521 | 0 0 0 0 0 0 2 0 1 124 11 43 191 17 67 188 17 66 522 | 188 17 66 188 17 66 191 17 67 101 9 35 0 0 0 0 0 0 523 | 0 0 0 35 3 12 168 15 59 190 17 67 188 17 66 188 17 66 524 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 525 | 188 17 66 189 17 66 182 16 64 77 7 27 0 0 0 0 0 0 526 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 1 2 527 | 99 9 35 185 17 65 189 17 66 188 17 66 188 17 66 188 17 66 528 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 189 17 66 529 | 177 16 62 56 5 19 0 0 0 0 0 0 13 1 5 151 14 53 530 | 190 17 67 188 17 66 188 17 66 188 17 66 185 17 65 56 5 19 531 | 0 0 0 0 0 0 0 0 0 532 | 0 0 0 0 0 0 0 0 0 99 9 35 191 17 67 188 17 66 533 | 188 17 66 188 17 66 186 17 65 65 6 23 0 0 0 0 0 0 534 | 0 0 0 0 0 0 79 7 28 182 16 64 190 17 67 188 17 66 535 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 536 | 191 17 67 177 16 62 83 8 29 4 0 1 0 0 0 0 0 0 537 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 538 | 8 1 3 89 8 31 175 16 62 191 17 67 189 17 66 188 17 66 539 | 188 17 66 188 17 66 188 17 66 188 17 66 190 17 67 181 16 63 540 | 85 8 30 3 0 1 0 0 0 0 0 0 1 0 0 118 13 41 541 | 191 17 67 188 17 66 188 17 66 189 17 66 173 16 61 34 3 12 542 | 0 0 0 0 0 0 0 0 0 543 | 0 0 0 0 0 0 0 0 0 56 5 19 183 17 64 188 17 66 544 | 188 17 66 189 17 66 169 15 59 30 3 10 0 0 0 0 0 0 545 | 0 0 0 0 0 0 5 0 2 83 8 29 173 16 61 191 17 67 546 | 190 17 67 189 17 66 189 17 66 190 17 67 191 17 67 187 17 66 547 | 151 14 53 56 5 19 3 0 1 0 0 0 16 1 6 50 5 17 548 | 79 7 28 95 9 33 95 9 33 75 7 26 41 4 14 10 1 4 549 | 0 0 0 2 0 1 50 5 17 132 12 46 178 16 62 190 17 67 550 | 191 17 67 191 17 67 191 17 67 186 17 65 154 14 54 68 6 24 551 | 4 0 1 0 0 0 0 0 0 0 0 0 0 0 0 72 7 25 552 | 187 17 66 188 17 66 188 17 66 191 17 67 141 13 49 9 1 3 553 | 0 0 0 0 0 0 0 0 0 554 | 0 0 0 0 0 0 0 0 0 14 1 5 151 14 53 190 17 67 555 | 188 17 66 191 17 67 131 12 46 5 0 2 0 0 0 0 0 0 556 | 0 0 0 0 0 0 0 0 0 2 0 1 44 4 15 113 10 40 557 | 156 14 55 173 16 61 174 16 61 164 15 58 134 12 47 77 7 27 558 | 18 2 6 0 0 0 16 1 6 85 8 30 151 14 53 182 16 64 559 | 189 17 66 191 17 67 190 17 67 188 17 66 177 16 62 141 13 49 560 | 68 6 24 8 1 3 0 0 0 8 1 3 44 4 15 88 8 31 561 | 113 10 40 122 11 43 108 10 38 67 6 24 20 2 7 0 0 0 562 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 28 3 10 563 | 166 15 58 190 17 67 188 17 66 187 17 66 79 7 28 0 0 0 564 | 0 0 0 0 0 0 0 0 0 565 | 0 0 0 0 0 0 0 0 0 0 0 0 73 7 26 185 17 65 566 | 189 17 66 184 17 65 65 6 23 0 0 0 0 0 0 0 0 0 567 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 1 568 | 17 2 6 32 3 11 34 3 12 22 2 8 6 1 2 0 0 0 569 | 0 0 0 38 3 13 141 13 49 188 17 66 190 17 67 188 17 66 570 | 188 17 66 188 17 66 188 17 66 188 17 66 189 17 66 191 17 67 571 | 184 17 65 122 11 43 21 2 7 0 0 0 0 0 0 0 0 0 572 | 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 573 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 574 | 108 10 38 191 17 67 191 17 67 141 13 49 16 1 6 0 0 0 575 | 0 0 0 0 0 0 0 0 0 576 | 0 0 0 0 0 0 0 0 0 0 0 0 8 1 3 112 10 39 577 | 186 17 65 124 11 43 10 1 4 0 0 0 0 0 0 0 0 0 578 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 579 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 580 | 36 3 13 156 14 55 191 17 67 188 17 66 188 17 66 188 17 66 581 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 582 | 189 17 66 190 17 67 134 12 47 18 2 6 0 0 0 0 0 0 583 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 584 | 0 0 0 7 1 2 41 4 14 75 7 26 66 5 23 19 2 7 585 | 26 2 9 144 13 50 154 14 54 40 4 14 0 0 0 0 0 0 586 | 0 0 0 0 0 0 0 0 0 587 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 1 5 588 | 56 5 19 19 2 7 0 0 0 7 1 2 29 3 10 35 3 12 589 | 19 2 7 2 0 1 0 0 0 0 0 0 0 0 0 0 0 0 590 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 1 5 591 | 134 12 47 191 17 67 188 17 66 188 17 66 188 17 66 188 17 66 592 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 593 | 188 17 66 188 17 66 189 17 67 108 10 38 3 0 1 0 0 0 594 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 595 | 40 4 14 124 11 43 177 16 62 188 17 66 187 17 66 144 13 50 596 | 24 2 8 17 2 6 22 2 8 0 0 0 0 0 0 0 0 0 597 | 0 0 0 0 0 0 0 0 0 598 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 599 | 0 0 0 0 0 0 19 2 7 122 11 43 171 15 60 175 16 62 600 | 159 14 56 112 10 39 40 4 14 2 0 1 0 0 0 0 0 0 601 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 72 7 25 602 | 186 17 65 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 603 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 604 | 188 17 66 188 17 66 189 17 66 174 16 61 41 4 14 0 0 0 605 | 0 0 0 0 0 0 0 0 0 0 0 0 3 0 1 72 7 25 606 | 168 15 59 191 17 67 189 17 66 188 17 66 188 17 66 190 17 67 607 | 95 9 33 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 608 | 0 0 0 0 0 0 0 0 0 609 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 610 | 0 0 0 0 0 0 95 9 33 191 17 67 189 17 66 189 17 66 611 | 190 17 67 191 17 67 171 15 60 90 8 32 12 1 4 0 0 0 612 | 0 0 0 0 0 0 0 0 0 0 0 0 5 0 2 132 12 46 613 | 191 17 67 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 614 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 615 | 188 17 66 188 17 66 188 17 66 190 17 67 98 9 34 0 0 0 616 | 0 0 0 0 0 0 0 0 0 5 0 2 88 8 31 180 16 63 617 | 190 17 67 188 17 66 188 17 66 188 17 66 188 17 66 191 17 67 618 | 146 13 51 11 1 4 0 0 0 0 0 0 0 0 0 0 0 0 619 | 0 0 0 0 0 0 0 0 0 620 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 621 | 0 0 0 9 1 3 144 13 50 191 17 67 188 17 66 188 17 66 622 | 188 17 66 188 17 66 189 17 66 187 17 66 123 11 43 20 2 7 623 | 0 0 0 0 0 0 0 0 0 0 0 0 21 2 7 163 15 57 624 | 190 17 67 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 625 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 626 | 188 17 66 188 17 66 188 17 66 191 17 67 134 12 47 5 0 2 627 | 0 0 0 0 0 0 3 0 1 88 8 31 182 16 64 189 17 66 628 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 189 17 66 629 | 171 15 60 31 3 11 0 0 0 0 0 0 0 0 0 0 0 0 630 | 0 0 0 0 0 0 0 0 0 631 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 632 | 0 0 0 20 2 7 162 15 57 190 17 67 188 17 66 188 17 66 633 | 188 17 66 188 17 66 188 17 66 188 17 66 190 17 67 132 12 46 634 | 20 2 7 0 0 0 0 0 0 0 0 0 32 3 11 173 16 61 635 | 189 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 636 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 637 | 188 17 66 188 17 66 188 17 66 190 17 67 151 14 53 12 1 4 638 | 0 0 0 0 0 0 72 7 25 180 16 63 189 17 66 188 17 66 639 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 640 | 181 16 63 47 4 16 0 0 0 0 0 0 0 0 0 0 0 0 641 | 0 0 0 0 0 0 0 0 0 642 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 643 | 0 0 0 21 2 7 163 15 57 190 17 67 188 17 66 188 17 66 644 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 190 17 67 645 | 122 11 43 9 1 3 0 0 0 0 0 0 30 3 10 171 15 60 646 | 189 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 647 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 648 | 188 17 66 188 17 66 188 17 66 190 17 67 146 13 51 10 1 4 649 | 0 0 0 38 3 13 166 15 58 190 17 67 188 17 66 188 17 66 650 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 651 | 183 17 64 52 5 18 0 0 0 0 0 0 0 0 0 0 0 0 652 | 0 0 0 0 0 0 0 0 0 653 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 654 | 0 0 0 13 1 5 154 14 54 190 17 67 188 17 66 188 17 66 655 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 656 | 186 17 65 79 7 28 0 0 0 0 0 0 14 1 5 156 14 54 657 | 190 17 67 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 658 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 659 | 188 17 66 188 17 66 188 17 66 191 17 67 124 11 43 2 0 1 660 | 5 0 2 122 11 43 191 17 67 188 17 66 188 17 66 188 17 66 661 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 662 | 182 16 64 47 4 16 0 0 0 0 0 0 0 0 0 0 0 0 663 | 0 0 0 0 0 0 0 0 0 664 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 665 | 0 0 0 3 0 1 126 14 44 191 17 67 188 17 66 188 17 66 666 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 667 | 190 17 67 158 14 55 23 2 8 0 0 0 1 0 0 113 10 40 668 | 191 17 67 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 669 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 670 | 188 17 66 188 17 66 188 17 66 188 17 66 78 7 27 0 0 0 671 | 47 4 16 177 16 62 189 17 66 188 17 66 188 17 66 188 17 66 672 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 189 17 66 673 | 173 16 61 34 3 12 0 0 0 0 0 0 0 0 0 0 0 0 674 | 0 0 0 0 0 0 0 0 0 675 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 676 | 0 0 0 0 0 0 85 8 30 189 17 66 188 17 66 188 17 66 677 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 678 | 188 17 66 188 17 66 79 7 28 0 0 0 0 0 0 47 4 16 679 | 175 16 62 189 17 66 188 17 66 188 17 66 188 17 66 188 17 66 680 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 681 | 188 17 66 188 17 66 190 17 67 156 14 55 22 2 8 0 0 0 682 | 109 10 38 191 17 67 188 17 66 188 17 66 188 17 66 188 17 66 683 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 190 17 67 684 | 151 14 53 13 1 5 0 0 0 0 0 0 0 0 0 0 0 0 685 | 0 0 0 0 0 0 0 0 0 686 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 687 | 0 0 0 0 0 0 35 3 12 173 16 61 189 17 66 188 17 66 688 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 689 | 188 17 66 191 17 67 134 12 47 7 1 2 0 0 0 3 0 1 690 | 99 9 35 188 17 66 189 17 66 188 17 66 188 17 66 188 17 66 691 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 692 | 188 17 66 189 17 66 181 16 63 68 6 24 0 0 0 18 2 6 693 | 156 14 55 190 17 67 188 17 66 188 17 66 188 17 66 188 17 66 694 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 190 17 67 695 | 101 9 35 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 696 | 0 0 0 0 0 0 0 0 0 697 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 698 | 0 0 0 0 0 0 3 0 1 118 13 41 191 17 67 188 17 66 699 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 700 | 188 17 66 189 17 66 168 15 59 28 3 10 0 0 0 0 0 0 701 | 12 1 4 113 10 40 187 17 66 189 17 67 188 17 66 188 17 66 702 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 703 | 190 17 67 180 16 63 88 8 31 4 0 1 0 0 0 47 4 16 704 | 180 16 63 189 17 66 188 17 66 188 17 66 188 17 66 188 17 66 705 | 188 17 66 188 17 66 188 17 66 188 17 66 190 17 67 168 15 59 706 | 36 3 13 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 707 | 0 0 0 0 0 0 0 0 0 708 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 709 | 0 0 0 0 0 0 0 0 0 38 3 13 164 15 58 190 17 67 710 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 711 | 188 17 66 188 17 66 182 16 64 50 5 17 0 0 0 0 0 0 712 | 0 0 0 11 1 4 90 8 32 169 15 59 190 17 67 190 17 67 713 | 189 17 66 189 17 66 189 17 66 189 17 66 191 17 67 189 17 66 714 | 158 14 55 68 6 24 4 0 1 0 0 0 0 0 0 73 7 26 715 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 716 | 188 17 66 188 17 66 188 17 66 189 17 66 185 17 65 83 8 29 717 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 718 | 0 0 0 0 0 0 0 0 0 719 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 720 | 0 0 0 0 0 0 0 0 0 0 0 0 65 6 23 174 16 61 721 | 190 17 67 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 722 | 188 17 66 188 17 66 185 17 65 56 5 19 0 0 0 0 0 0 723 | 0 0 0 0 0 0 2 0 1 35 3 12 99 9 35 146 13 51 724 | 170 15 60 177 16 62 177 16 62 166 15 58 141 13 49 85 8 30 725 | 24 2 8 0 0 0 0 0 0 0 0 0 0 0 0 85 8 30 726 | 190 17 67 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 727 | 188 17 66 188 17 66 188 17 66 189 17 66 112 10 39 8 1 3 728 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 729 | 0 0 0 0 0 0 0 0 0 730 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 731 | 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 68 6 24 732 | 170 15 60 191 17 67 188 17 66 188 17 66 188 17 66 188 17 66 733 | 188 17 66 188 17 66 182 16 64 50 5 17 0 0 0 0 0 0 734 | 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 11 1 4 735 | 28 3 10 40 4 14 38 3 13 25 2 9 8 1 3 0 0 0 736 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 78 7 27 737 | 189 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 738 | 188 17 66 189 17 66 187 17 66 113 10 40 14 1 5 0 0 0 739 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 740 | 0 0 0 0 0 0 0 0 0 741 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 742 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 743 | 47 4 16 141 13 49 186 17 65 191 17 67 190 17 67 189 17 66 744 | 189 17 66 191 17 67 156 14 55 20 2 7 0 0 0 0 0 0 745 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 746 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 747 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 44 4 15 748 | 178 16 62 190 17 67 188 17 66 188 17 66 188 17 66 190 17 67 749 | 191 17 67 173 16 61 90 8 32 10 1 4 0 0 0 0 0 0 750 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 751 | 0 0 0 0 0 0 0 0 0 752 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 753 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 754 | 0 0 0 14 1 5 68 6 24 131 12 46 162 15 57 174 16 61 755 | 171 15 60 146 13 51 56 5 19 0 0 0 0 0 0 0 0 0 756 | 0 0 0 0 0 0 0 0 0 3 0 1 14 1 5 29 3 10 757 | 41 4 14 47 4 16 50 5 17 45 4 16 34 3 12 18 2 6 758 | 5 0 2 0 0 0 0 0 0 0 0 0 0 0 0 5 0 2 759 | 90 8 32 169 15 59 185 17 65 187 17 66 182 16 64 163 15 57 760 | 113 10 40 41 4 14 2 0 1 0 0 0 0 0 0 0 0 0 761 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 762 | 0 0 0 0 0 0 0 0 0 763 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 764 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 765 | 0 0 0 0 0 0 0 0 0 5 0 2 21 2 7 34 3 12 766 | 29 3 10 11 1 4 0 0 0 0 0 0 0 0 0 0 0 0 767 | 3 0 1 32 3 11 79 7 28 124 11 43 154 14 54 171 15 60 768 | 180 16 63 182 16 64 182 16 64 180 16 63 174 16 61 159 14 56 769 | 132 12 46 88 8 31 34 3 12 3 0 1 0 0 0 0 0 0 770 | 3 0 1 29 3 10 56 5 19 65 6 23 50 5 17 23 2 8 771 | 3 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 772 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 773 | 0 0 0 0 0 0 0 0 0 774 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 775 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 776 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 777 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 25 2 9 778 | 109 10 38 169 15 59 189 17 66 191 17 67 190 17 67 189 17 66 779 | 189 17 66 188 17 66 188 17 66 188 17 66 189 17 66 190 17 67 780 | 191 17 67 190 17 67 171 15 60 98 9 34 10 1 3 0 0 0 781 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 782 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 783 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 784 | 0 0 0 0 0 0 0 0 0 785 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 786 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 787 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 788 | 0 0 0 0 0 0 0 0 0 0 0 0 14 1 5 141 13 49 789 | 191 17 67 189 17 66 188 17 66 188 17 66 188 17 66 188 17 66 790 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 791 | 188 17 66 188 17 66 189 17 67 186 17 65 65 6 23 0 0 0 792 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 793 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 794 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 795 | 0 0 0 0 0 0 0 0 0 796 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 797 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 798 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 799 | 0 0 0 0 0 0 0 0 0 0 0 0 23 2 8 166 15 58 800 | 190 17 67 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 801 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 802 | 188 17 66 188 17 66 189 17 66 176 16 62 45 4 16 0 0 0 803 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 804 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 805 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 806 | 0 0 0 0 0 0 0 0 0 807 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 808 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 809 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 810 | 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 83 8 29 811 | 183 17 64 189 17 66 188 17 66 188 17 66 188 17 66 188 17 66 812 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 813 | 188 17 66 189 17 66 185 17 65 95 9 33 3 0 1 0 0 0 814 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 815 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 816 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 817 | 0 0 0 0 0 0 0 0 0 818 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 819 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 820 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 821 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5 0 2 822 | 85 8 30 176 16 62 191 17 67 188 17 66 188 17 66 188 17 66 823 | 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 188 17 66 824 | 191 17 67 180 16 63 95 9 33 7 1 3 0 0 0 0 0 0 825 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 826 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 827 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 828 | 0 0 0 0 0 0 0 0 0 829 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 830 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 831 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 832 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 833 | 2 0 1 52 5 18 141 13 49 185 17 65 191 17 67 189 17 67 834 | 189 17 66 188 17 66 188 17 66 189 17 66 191 17 67 187 17 66 835 | 146 13 51 56 5 19 4 0 1 0 0 0 0 0 0 0 0 0 836 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 837 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 838 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 839 | 0 0 0 0 0 0 0 0 0 840 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 841 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 842 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 843 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 844 | 0 0 0 0 0 0 14 1 5 68 6 24 131 12 46 166 15 58 845 | 180 16 63 183 17 64 180 16 63 168 15 59 134 12 47 75 7 26 846 | 17 2 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 847 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 848 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 849 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 850 | 0 0 0 0 0 0 0 0 0 851 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 852 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 853 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 854 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 855 | 0 0 0 0 0 0 0 0 0 0 0 0 5 0 2 24 2 8 856 | 44 4 15 52 5 18 45 4 16 26 2 9 6 1 2 0 0 0 857 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 858 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 859 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 860 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 861 | 0 0 0 0 0 0 0 0 0 862 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 863 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 864 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 865 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 866 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 867 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 868 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 869 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 870 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 871 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 872 | 0 0 0 0 0 0 0 0 0 873 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 874 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 875 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 876 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 877 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 878 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 879 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 880 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 881 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 882 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 883 | 0 0 0 0 0 0 0 0 0 884 | --------------------------------------------------------------------------------