├── pxa ├── base-files │ ├── etc │ │ ├── rc.d │ │ │ ├── S90z2-alsa │ │ │ ├── S90z2-leds │ │ │ ├── S11z2-console │ │ │ └── S11z2-cpufreq │ │ ├── sysctl.d │ │ │ └── printk.conf │ │ ├── 5x8iz2s.psf │ │ ├── inittab │ │ ├── init.d │ │ │ ├── z2-alsa │ │ │ ├── z2-console │ │ │ ├── z2-leds │ │ │ └── z2-cpufreq │ │ ├── fw_env.config │ │ ├── config │ │ │ └── fstab │ │ ├── z2.kmap │ │ └── alsa │ │ │ └── asound.state │ └── boot │ │ ├── uboot.script │ │ ├── uboot.script.sdfix │ │ ├── uboot.script.base.norm │ │ └── uboot.script.base.sdfix ├── profiles │ ├── 100-Default.mk │ ├── 200-Gumstix.mk │ └── zipitz2.mk ├── patches-4.4 │ ├── 0030-wm8750-add-ctl.patch │ ├── 0026-update-zipitz2-device-tree-for-card-detection.patch │ ├── 0027-power_supply-fix-chrg-blink-full-solid.patch │ ├── 0031-arm-pxa27x-save-restore-pwer-on-suspend-resume.patch │ ├── 0032-arm-pxa27x-zipit-z2-disable-wake-on-gpio0.patch │ ├── 0009-pxamci-set-default-ocr_mask-if-none-is-supplied.patch │ ├── 0017-asoc-simple-card-add-Speaker-pin-to-HP-jack.patch │ ├── 0001-libertas_spi-cancel-packer-work-on-module-removal.patch │ ├── 0010-pxa-ssp-set-bus-ID-for-mixed-DT-legacy-initalization.patch │ ├── 0016-pxa2xx-pcm-lib-increase-min-period-size-to-1024-byte.patch │ ├── 0029-add-misc-dock-gpios.patch │ ├── 0019-ohci-pxa27x-disable-IRQ-on-suspend-enable-on-resume.patch │ ├── 0023-ARM-Z2-update-NOR-flash-partition-layout.patch │ ├── 0007-spi-pxa2xx-don-t-init-early-otherwise-it-inits-befor.patch │ ├── 0011-gpio-pxa-use-indexed-IRQs-for-DT-initalization.patch │ ├── 0025-pxamci-add-dt-card-detection.patch │ ├── 0014-pxa2xx-i2s-fix-filter_fn-argument.patch │ ├── 0018-pxa27xx_keypad-fix-resume-on-pxa27x-devices.patch │ ├── 0022-pxa27x_udc-add-a-module-parameter-to-skip-port-mode-.patch │ ├── 0012-pxa2xx-i2s-add-Dt-initialization-support.patch │ ├── 0005-pxa27x_udc-eliminate-alignment-issue.patch │ ├── 0028-pxa27x_udc-change-skip_portmode_init-to-host_portmod.patch │ ├── 0004-lms283gf05-add-suspend-resume-handlers.patch │ ├── 0002-libertas-add-ability-to-power-off-card-on-suspend.patch │ ├── 0021-pxamci-add-module-paratemers-to-ignore-CRC-errors-an.patch │ ├── 0008-z2-battery-add-DT-initialization-support.patch │ ├── 0003-libertas-implement-if_spi-runtime-power-management.patch │ ├── 0006-pxa27x_udc-add-ability-to-work-without-D-gpio-and-us.patch │ ├── 0020-z2-battery-get-charging-status-from-bq24035-via-gpio.patch │ └── 0024-Add-fancy-beep-module.patch ├── Makefile ├── image │ ├── gen_dts.sh │ └── Makefile ├── modules.mk ├── dts │ └── zipit-z2_template.dts └── config-4.4 ├── patches ├── openwrt-packages │ ├── 008-irssi-fix-url.patch │ ├── 005-tmux-accessperms.patch │ ├── 004-libidn-install-pkgconfig-dev.patch │ ├── 006-openobex-cmake-installdev.patch │ ├── 007-gpsd-installdev-add-includes.patch │ ├── 005-tmux-bump-version.patch │ ├── 011-opencv-libintl-fix.patch │ ├── 002-alsa-utils-fixup-for-salsa.patch │ ├── 003-gcc-bump-to-5.3.0.patch │ ├── 009-gpsd-cgps-small-screen.patch │ ├── 010-nano-bump-version-and-add-syntax-package.patch │ └── 001-alsa-lib-use-salsa.patch └── openwrt │ ├── 001-run-depmod-when-installing-kmod.patch │ └── 002-hostapd-add-interoperability-workaround-for-80+80-and-160-MHz-channels.patch ├── feeds.conf └── README.md /pxa/base-files/etc/rc.d/S90z2-alsa: -------------------------------------------------------------------------------- 1 | ../init.d/z2-alsa -------------------------------------------------------------------------------- /pxa/base-files/etc/rc.d/S90z2-leds: -------------------------------------------------------------------------------- 1 | ../init.d/z2-leds -------------------------------------------------------------------------------- /pxa/base-files/etc/rc.d/S11z2-console: -------------------------------------------------------------------------------- 1 | ../init.d/z2-console -------------------------------------------------------------------------------- /pxa/base-files/etc/rc.d/S11z2-cpufreq: -------------------------------------------------------------------------------- 1 | ../init.d/z2-cpufreq -------------------------------------------------------------------------------- /pxa/base-files/etc/sysctl.d/printk.conf: -------------------------------------------------------------------------------- 1 | kernel.printk = 4 4 1 7 2 | -------------------------------------------------------------------------------- /pxa/base-files/etc/5x8iz2s.psf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openwrt-zipit/openwrt-pxa-target/HEAD/pxa/base-files/etc/5x8iz2s.psf -------------------------------------------------------------------------------- /pxa/base-files/boot/uboot.script: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openwrt-zipit/openwrt-pxa-target/HEAD/pxa/base-files/boot/uboot.script -------------------------------------------------------------------------------- /pxa/base-files/boot/uboot.script.sdfix: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openwrt-zipit/openwrt-pxa-target/HEAD/pxa/base-files/boot/uboot.script.sdfix -------------------------------------------------------------------------------- /pxa/base-files/etc/inittab: -------------------------------------------------------------------------------- 1 | ::sysinit:/etc/init.d/rcS S boot 2 | ::shutdown:/etc/init.d/rcS K shutdown 3 | ttyS2::askfirst:/bin/ash --login 4 | tty1::respawn:/bin/ash --login 5 | -------------------------------------------------------------------------------- /pxa/base-files/etc/init.d/z2-alsa: -------------------------------------------------------------------------------- 1 | #!/bin/sh /etc/rc.common 2 | # Copyright (C) 2006-2016 OpenWrt.org 3 | 4 | START=90 5 | 6 | start() { 7 | echo "Setting up Zipit Z2 sound..." 8 | /usr/sbin/alsactl restore -f /etc/alsa/asound.state 9 | } 10 | 11 | boot() { 12 | start 13 | } 14 | 15 | -------------------------------------------------------------------------------- /pxa/base-files/boot/uboot.script.base.norm: -------------------------------------------------------------------------------- 1 | if ext2load mmc 0 0xa0000000 /boot/uImage ; then 2 | setenv bootargs console=tty0 console=ttyS2,115200 fbcon=rotate:3 cpufreq-pxa2xx.pxa27x_maxfreq=520 pxamci.ignore_crc_errors=1 root=/dev/mmcblk0p1 rootdelay=2 init=/etc/preinit 3 | bootm 0xa0000000; 4 | fi 5 | -------------------------------------------------------------------------------- /pxa/base-files/boot/uboot.script.base.sdfix: -------------------------------------------------------------------------------- 1 | if ext2load mmc 0 0xa0000000 /boot/uImage ; then 2 | setenv bootargs console=tty0 console=ttyS2,115200 fbcon=rotate:3 cpufreq-pxa2xx.pxa27x_maxfreq=520 pxamci.ignore_crc_errors=1 pxamci.force_1_bit=1 root=/dev/mmcblk0p1 rootdelay=2 init=/etc/preinit 3 | bootm 0xa0000000; 4 | fi 5 | -------------------------------------------------------------------------------- /pxa/base-files/etc/init.d/z2-console: -------------------------------------------------------------------------------- 1 | #!/bin/sh /etc/rc.common 2 | # Copyright (C) 2006-2016 OpenWrt.org 3 | 4 | START=11 5 | 6 | start() { 7 | echo "Setting up Zipit Z2 Console..." 8 | /usr/sbin/loadfont < /etc/5x8iz2s.psf 9 | /sbin/loadkmap < /etc/z2.kmap 10 | } 11 | 12 | boot() { 13 | start 14 | } 15 | -------------------------------------------------------------------------------- /pxa/profiles/100-Default.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2012 OpenWrt.org 3 | # 4 | # This is free software, licensed under the GNU General Public License v2. 5 | # See /LICENSE for more information. 6 | # 7 | 8 | define Profile/Default 9 | NAME:=Default Profile 10 | PACKAGES:= 11 | endef 12 | 13 | define Profile/Default/Description 14 | Default PXA Profile 15 | endef 16 | $(eval $(call Profile,Default)) 17 | 18 | -------------------------------------------------------------------------------- /pxa/profiles/200-Gumstix.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2012 OpenWrt.org 3 | # 4 | # This is free software, licensed under the GNU General Public License v2. 5 | # See /LICENSE for more information. 6 | # 7 | 8 | define Profile/Gumstix 9 | NAME:=Gumstix 10 | PACKAGES:=uboot-pxa-gumstix 11 | endef 12 | 13 | define Profile/Atheros-ath5k/Description 14 | Package set compatible with the Gumstix boards 15 | endef 16 | $(eval $(call Profile,Gumstix)) 17 | 18 | -------------------------------------------------------------------------------- /pxa/patches-4.4/0030-wm8750-add-ctl.patch: -------------------------------------------------------------------------------- 1 | --- a/sound/soc/codecs/wm8750.c 2016-09-12 19:52:19.245928841 -0500 2 | +++ b/sound/soc/codecs/wm8750.c 2016-09-12 19:53:11.461929894 -0500 3 | @@ -704,6 +704,7 @@ 4 | snd_soc_update_bits(codec, WM8750_ROUT2V, 0x0100, 0x0100); 5 | snd_soc_update_bits(codec, WM8750_LINVOL, 0x0100, 0x0100); 6 | snd_soc_update_bits(codec, WM8750_RINVOL, 0x0100, 0x0100); 7 | + snd_soc_update_bits(codec, WM8750_ADCTL3, 0x0180, 0x0180); 8 | 9 | return ret; 10 | } 11 | -------------------------------------------------------------------------------- /patches/openwrt-packages/008-irssi-fix-url.patch: -------------------------------------------------------------------------------- 1 | --- a/net/irssi/Makefile 2016-06-01 11:55:00.899028335 -0400 2 | +++ b/net/irssi/Makefile 2016-06-01 12:47:35.027847915 -0400 3 | @@ -12,7 +12,7 @@ 4 | PKG_RELEASE:=1 5 | 6 | PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 7 | -PKG_SOURCE_URL:=http://irssi.org/files/ 8 | +PKG_SOURCE_URL:=http://pkgs.fedoraproject.org/lookaside/pkgs/irssi/irssi-0.8.17.tar.bz2/ecf64be47978d89a742b435a81cb47db/ 9 | PKG_MD5SUM:=ecf64be47978d89a742b435a81cb47db 10 | 11 | PKG_FIXUP:=autoreconf 12 | -------------------------------------------------------------------------------- /pxa/patches-4.4/0026-update-zipitz2-device-tree-for-card-detection.patch: -------------------------------------------------------------------------------- 1 | diff --git a/arch/arm/boot/dts/zipit-z2.dts b/arch/arm/boot/dts/zipit-z2.dts 2 | index 1823921..ac5cc34 100644 3 | --- a/arch/arm/boot/dts/zipit-z2.dts 4 | +++ b/arch/arm/boot/dts/zipit-z2.dts 5 | @@ -120,7 +120,8 @@ 6 | }; 7 | mmc0: mmc@41100000 { 8 | pxa-mmc,detect-delay-ms = <200>; 9 | - //cd-gpios = <&gpio 96 GPIO_ACTIVE_HIGH>; 10 | + cd-gpios = <&gpio 96 GPIO_ACTIVE_HIGH>; 11 | + cd-invert; 12 | status = "okay"; 13 | }; 14 | uart0: uart@40100000 { 15 | -------------------------------------------------------------------------------- /patches/openwrt-packages/005-tmux-accessperms.patch: -------------------------------------------------------------------------------- 1 | --- a/utils/tmux/patches/200-define-accessperms.patch 1969-12-31 18:00:00.000000000 -0600 2 | +++ b/utils/tmux/patches/200-define-accessperms.patch 2016-08-10 08:12:45.775793407 -0500 3 | @@ -0,0 +1,13 @@ 4 | +--- a/server.c.orig 2016-08-10 08:10:35.655790785 -0500 5 | ++++ b/server.c 2016-08-10 08:09:24.891789359 -0500 6 | +@@ -36,6 +36,10 @@ 7 | + 8 | + #include "tmux.h" 9 | + 10 | ++#ifndef ACCESSPERMS 11 | ++#define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO) 12 | ++#endif 13 | ++ 14 | + /* 15 | + * Main server functions. 16 | + */ 17 | -------------------------------------------------------------------------------- /pxa/base-files/etc/fw_env.config: -------------------------------------------------------------------------------- 1 | # Configuration file for fw_(printenv/saveenv) utility. 2 | # Up to two entries are valid, in this case the redundant 3 | # environment sector is assumed present. 4 | # Notice, that the "Number of sectors" is ignored on NOR and SPI-dataflash. 5 | # Futhermore, if the Flash sector size is ommitted, this value is assumed to 6 | # be the same as the Environment size, which is valid for NOR and SPI-dataflash 7 | 8 | # NOR example 9 | # MTD device name Device offset Env. size Flash sector size Number of sectors 10 | /dev/mtd1 0x0000 0x10000 0x10000 1 11 | -------------------------------------------------------------------------------- /patches/openwrt-packages/004-libidn-install-pkgconfig-dev.patch: -------------------------------------------------------------------------------- 1 | diff --git a/libs/libidn/Makefile b/libs/libidn/Makefile 2 | index 8bfe2a8..ce4c69d 100644 3 | --- a/libs/libidn/Makefile 4 | +++ b/libs/libidn/Makefile 5 | @@ -79,6 +79,8 @@ define Build/InstallDev 6 | $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/ 7 | $(INSTALL_DIR) $(1)/usr/lib 8 | $(CP) $(PKG_INSTALL_DIR)/usr/lib/libidn.{a,so*} $(1)/usr/lib/ 9 | + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig 10 | + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libidn.pc $(1)/usr/lib/pkgconfig/ 11 | endef 12 | 13 | define Package/idn/install 14 | -------------------------------------------------------------------------------- /pxa/base-files/etc/config/fstab: -------------------------------------------------------------------------------- 1 | config 'global' 2 | option anon_swap '0' 3 | option anon_mount '0' 4 | option auto_swap '1' 5 | option auto_mount '1' 6 | option delay_root '10' 7 | option check_fs '0' 8 | 9 | config mount 10 | option target '/overlay' 11 | option device '/dev/mtdblock4' 12 | option fstype 'jffs2' 13 | option options 'rw,sync' 14 | option enabled '1' 15 | 16 | config mount 17 | option target '/mnt/mmcblk0p1' 18 | option device '/dev/mmcblk0p1' 19 | option fstype 'ext2' 20 | option options 'rw,noatime,errors=remount-ro' 21 | option enabled '1' 22 | -------------------------------------------------------------------------------- /pxa/profiles/zipitz2.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2013 OpenWrt.org 3 | # 4 | # This is free software, licensed under the GNU General Public License v2. 5 | # See /LICENSE for more information. 6 | # 7 | 8 | define Profile/ZipitZ2 9 | NAME:=ZipitZ2 10 | PACKAGES:=\ 11 | kmod-libertas-spi libertas-spi-firmware kmod-sound-zipit-z2 \ 12 | kmod-cpufreq-conservative kmod-usb-ohci-pxa27x \ 13 | zipit-base-files ebindkeys-zipit \ 14 | wireless-tools wpa-supplicant-mini alsa-utils 15 | endef 16 | 17 | define Profile/ZipitZ2/Description 18 | Package set optimized for the Zipit Z2 Handheld 19 | endef 20 | 21 | $(eval $(call Profile,ZipitZ2)) 22 | -------------------------------------------------------------------------------- /patches/openwrt/001-run-depmod-when-installing-kmod.patch: -------------------------------------------------------------------------------- 1 | diff --git a/include/kernel.mk b/include/kernel.mk 2 | index 432e8ce..6f2c8ec 100644 3 | --- a/include/kernel.mk 4 | +++ b/include/kernel.mk 5 | @@ -126,6 +126,7 @@ define ModuleAutoLoad 6 | echo "#!/bin/sh" > $(2)/CONTROL/postinst-pkg; \ 7 | echo "[ -z \"\$$$$$$$$IPKG_INSTROOT\" ] || exit 0" >> $(2)/CONTROL/postinst-pkg; \ 8 | echo ". /lib/functions.sh" >> $(2)/CONTROL/postinst-pkg; \ 9 | + echo "/sbin/depmod" >> $(2)/CONTROL/postinst-pkg; \ 10 | echo "insert_modules $$$$$$$$modules" >> $(2)/CONTROL/postinst-pkg; \ 11 | chmod 0755 $(2)/CONTROL/postinst-pkg; \ 12 | fi 13 | -------------------------------------------------------------------------------- /pxa/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2006-2011 OpenWrt.org 3 | # 4 | # This is free software, licensed under the GNU General Public License v2. 5 | # See /LICENSE for more information. 6 | # 7 | include $(TOPDIR)/rules.mk 8 | 9 | ARCH:=arm 10 | BOARD:=pxa 11 | BOARDNAME:=Marvell/Intel PXA2xx 12 | FEATURES:=jffs2 usb usbgadget 13 | MAINTAINER:=Imre Kaloz 14 | 15 | KERNEL_PATCHVER:=4.4 16 | 17 | include $(INCLUDE_DIR)/target.mk 18 | DEFAULT_PACKAGES += 19 | 20 | define Target/Description 21 | Build images for PXA2xx systems, eg. Zipit Z2 22 | endef 23 | 24 | KERNELNAME:=zImage dtbs 25 | 26 | $(eval $(call BuildTarget)) 27 | -------------------------------------------------------------------------------- /pxa/base-files/etc/init.d/z2-leds: -------------------------------------------------------------------------------- 1 | #!/bin/sh /etc/rc.common 2 | # Copyright (C) 2006-2016 OpenWrt.org 3 | 4 | START=90 5 | 6 | start() { 7 | echo "Setting up Zipit Z2 LED's..." 8 | echo "mmc0" > /sys/class/leds/z2\:green\:wifi/trigger 9 | echo "Z2-full" > /sys/class/leds/z2\:green\:charged/trigger 10 | echo "Z2-charging" > /sys/class/leds/z2\:amber\:charging/trigger 11 | STAT=`cat /sys/class/power_supply/Z2/status)` 12 | if [ "$STAT" == "Charging" ]; then 13 | echo "255" > /sys/class/leds/z2\:amber\:charging/brightness 14 | elif [ "$STAT" == "Full" ]; then 15 | echo "255" > /sys/class/leds/z2\:green\:charged/brightness 16 | fi 17 | } 18 | 19 | boot() { 20 | start 21 | } 22 | 23 | -------------------------------------------------------------------------------- /patches/openwrt-packages/006-openobex-cmake-installdev.patch: -------------------------------------------------------------------------------- 1 | diff --git a/utils/openobex/Makefile b/utils/openobex/Makefile 2 | index f03b96d..dee8ab1 100644 3 | --- a/utils/openobex/Makefile 4 | +++ b/utils/openobex/Makefile 5 | @@ -64,6 +64,8 @@ define Build/InstallDev 6 | $(INSTALL_DIR) $(1)/usr/lib 7 | $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopenobex.so* $(1)/usr/lib/ 8 | $(CP) $(PKG_BUILD_DIR)/apps/lib/libopenobex-apps-common.a $(1)/usr/lib/ 9 | + $(INSTALL_DIR) $(1)/usr/lib/cmake 10 | + $(CP) $(PKG_INSTALL_DIR)/usr/lib/cmake/* $(1)/usr/lib/cmake/ 11 | $(INSTALL_DIR) $(1)/usr/lib/pkgconfig 12 | $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/openobex.pc $(1)/usr/lib/pkgconfig/ 13 | endef 14 | -------------------------------------------------------------------------------- /pxa/patches-4.4/0027-power_supply-fix-chrg-blink-full-solid.patch: -------------------------------------------------------------------------------- 1 | --- a/drivers/power/power_supply_leds.c 2016-04-12 11:09:26.000000000 -0500 2 | +++ b/drivers/power/power_supply_leds.c 2017-03-01 21:53:03.740678198 -0600 3 | @@ -35,6 +35,10 @@ 4 | led_trigger_event(psy->charging_full_trig, LED_FULL); 5 | led_trigger_event(psy->charging_trig, LED_OFF); 6 | led_trigger_event(psy->full_trig, LED_FULL); 7 | + /* For charge blink / full solid, turn off the led first 8 | + * then turn it on full brightness */ 9 | + led_trigger_event(psy->charging_blink_full_solid_trig, 10 | + LED_OFF); 11 | led_trigger_event(psy->charging_blink_full_solid_trig, 12 | LED_FULL); 13 | break; 14 | -------------------------------------------------------------------------------- /pxa/patches-4.4/0031-arm-pxa27x-save-restore-pwer-on-suspend-resume.patch: -------------------------------------------------------------------------------- 1 | diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c 2 | index ffc4240..329727e 100644 3 | --- a/arch/arm/mach-pxa/pxa27x.c 4 | +++ b/arch/arm/mach-pxa/pxa27x.c 5 | @@ -105,6 +105,7 @@ enum { 6 | SLEEP_SAVE_PSTR, 7 | SLEEP_SAVE_MDREFR, 8 | SLEEP_SAVE_PCFR, 9 | + SLEEP_SAVE_PWER, 10 | SLEEP_SAVE_COUNT 11 | }; 12 | 13 | @@ -112,7 +113,7 @@ void pxa27x_cpu_pm_save(unsigned long *sleep_save) 14 | { 15 | sleep_save[SLEEP_SAVE_MDREFR] = __raw_readl(MDREFR); 16 | SAVE(PCFR); 17 | - 18 | + SAVE(PWER); 19 | SAVE(PSTR); 20 | } 21 | 22 | @@ -124,6 +125,7 @@ void pxa27x_cpu_pm_restore(unsigned long *sleep_save) 23 | PSSR = PSSR_RDH | PSSR_PH; 24 | 25 | RESTORE(PSTR); 26 | + RESTORE(PWER); 27 | } 28 | 29 | void pxa27x_cpu_pm_enter(suspend_state_t state) 30 | -------------------------------------------------------------------------------- /pxa/base-files/etc/init.d/z2-cpufreq: -------------------------------------------------------------------------------- 1 | #!/bin/sh /etc/rc.common 2 | # Copyright (C) 2006-2016 OpenWrt.org 3 | 4 | START=11 5 | 6 | start() { 7 | echo "Setting up conservative governor..." 8 | echo "conservative" > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor 9 | echo "20" > /sys/devices/system/cpu/cpufreq/conservative/down_threshold 10 | echo "10" > /sys/devices/system/cpu/cpufreq/conservative/freq_step 11 | echo "1" > /sys/devices/system/cpu/cpufreq/conservative/ignore_nice_load 12 | echo "10" > /sys/devices/system/cpu/cpufreq/conservative/sampling_down_factor 13 | echo "80000" > /sys/devices/system/cpu/cpufreq/conservative/sampling_rate 14 | echo "80000" > /sys/devices/system/cpu/cpufreq/conservative/sampling_rate_min 15 | echo "92" > /sys/devices/system/cpu/cpufreq/conservative/up_threshold 16 | } 17 | 18 | boot() { 19 | start 20 | } 21 | -------------------------------------------------------------------------------- /pxa/patches-4.4/0032-arm-pxa27x-zipit-z2-disable-wake-on-gpio0.patch: -------------------------------------------------------------------------------- 1 | diff --git a/arch/arm/mach-pxa/z2.c b/arch/arm/mach-pxa/z2.c 2 | index 9f2ad23..a4f79c4 100644 3 | --- a/arch/arm/mach-pxa/z2.c 4 | +++ b/arch/arm/mach-pxa/z2.c 5 | @@ -326,6 +326,13 @@ static void z2_power_off(void) 6 | #define z2_power_off NULL 7 | #endif 8 | 9 | +static void __init z2_map_io(void) 10 | +{ 11 | + pxa27x_map_io(); 12 | + 13 | + PWER &= ~(1 << 0); 14 | +} 15 | + 16 | /****************************************************************************** 17 | * Machine init 18 | ******************************************************************************/ 19 | @@ -348,7 +355,7 @@ static const char * const z2_dt_board_compat[] __initconst = { 20 | 21 | DT_MACHINE_START(ZIPIT2, "Zipit Z2") 22 | .atag_offset = 0x100, 23 | - .map_io = pxa27x_map_io, 24 | + .map_io = z2_map_io, 25 | .init_irq = pxa27x_dt_init_irq, 26 | .handle_irq = pxa27x_handle_irq, 27 | .init_machine = z2_init, 28 | -------------------------------------------------------------------------------- /patches/openwrt-packages/007-gpsd-installdev-add-includes.patch: -------------------------------------------------------------------------------- 1 | diff --git a/utils/gpsd/Makefile b/utils/gpsd/Makefile 2 | index d6ea568..5e12932 100644 3 | --- a/utils/gpsd/Makefile 4 | +++ b/utils/gpsd/Makefile 5 | @@ -107,13 +107,14 @@ SCONS_OPTIONS += \ 6 | 7 | define Build/InstallDev 8 | $(INSTALL_DIR) $(1)/usr/include 9 | - $(CP) $(PKG_INSTALL_DIR)/usr/include/gps.h $(1)/usr/include/ 10 | + $(CP) $(PKG_INSTALL_DIR)/usr/include/gps.h $(1)/usr/include/ 11 | + $(CP) $(PKG_BUILD_DIR)/gpsdclient.h $(1)/usr/include/ 12 | $(INSTALL_DIR) $(1)/usr/lib 13 | - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgps*.so* $(1)/usr/lib/ 14 | + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgps*.so* $(1)/usr/lib/ 15 | $(INSTALL_DIR) $(1)/usr/lib/pkgconfig 16 | - $(CP) \ 17 | - $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libgps*.pc \ 18 | - $(1)/usr/lib/pkgconfig/ 19 | + $(CP) \ 20 | + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libgps*.pc \ 21 | + $(1)/usr/lib/pkgconfig/ 22 | endef 23 | 24 | define Package/gpsd/install 25 | -------------------------------------------------------------------------------- /pxa/patches-4.4/0009-pxamci-set-default-ocr_mask-if-none-is-supplied.patch: -------------------------------------------------------------------------------- 1 | From c98119996c88d582c59e2fa6f8d5273b43b4ff2f Mon Sep 17 00:00:00 2001 2 | From: Vasily Khoruzhick 3 | Date: Sun, 14 Feb 2016 20:58:26 -0800 4 | Subject: [PATCH 09/19] pxamci: set default ocr_mask if none is supplied 5 | 6 | Signed-off-by: Vasily Khoruzhick 7 | --- 8 | drivers/mmc/host/pxamci.c | 3 +++ 9 | 1 file changed, 3 insertions(+) 10 | 11 | diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c 12 | index ce08896..69e38e3 100644 13 | --- a/drivers/mmc/host/pxamci.c 14 | +++ b/drivers/mmc/host/pxamci.c 15 | @@ -621,6 +621,9 @@ static int pxamci_of_init(struct platform_device *pdev) 16 | pdata->gpio_card_ro = 17 | of_get_named_gpio(np, "wp-gpios", 0); 18 | 19 | + /* Init default OCR mask */ 20 | + pdata->ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34; 21 | + 22 | /* pxa-mmc specific */ 23 | pdata->gpio_power = 24 | of_get_named_gpio(np, "pxa-mmc,gpio-power", 0); 25 | -- 26 | 1.7.10.4 27 | 28 | -------------------------------------------------------------------------------- /pxa/patches-4.4/0017-asoc-simple-card-add-Speaker-pin-to-HP-jack.patch: -------------------------------------------------------------------------------- 1 | From a294247ec11b3b46613f5f04f352e17bb4218726 Mon Sep 17 00:00:00 2001 2 | From: Vasily Khoruzhick 3 | Date: Tue, 16 Feb 2016 19:56:20 -0800 4 | Subject: [PATCH 17/19] asoc: simple-card: add 'Speaker' pin to HP jack 5 | 6 | Signed-off-by: Vasily Khoruzhick 7 | --- 8 | sound/soc/generic/simple-card.c | 5 +++++ 9 | 1 file changed, 5 insertions(+) 10 | 11 | diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c 12 | index 54c3320..81d543c 100644 13 | --- a/sound/soc/generic/simple-card.c 14 | +++ b/sound/soc/generic/simple-card.c 15 | @@ -117,6 +117,11 @@ static struct snd_soc_jack_pin simple_card_hp_jack_pins[] = { 16 | .pin = "Headphones", 17 | .mask = SND_JACK_HEADPHONE, 18 | }, 19 | + { 20 | + .pin = "Speaker", 21 | + .mask = SND_JACK_HEADPHONE, 22 | + .invert = 1, 23 | + } 24 | }; 25 | static struct snd_soc_jack_gpio simple_card_hp_jack_gpio = { 26 | .name = "Headphone detection", 27 | -- 28 | 1.7.10.4 29 | 30 | -------------------------------------------------------------------------------- /pxa/patches-4.4/0001-libertas_spi-cancel-packer-work-on-module-removal.patch: -------------------------------------------------------------------------------- 1 | From 5c5ba95a8ebf775d24346197d418cc686491fa78 Mon Sep 17 00:00:00 2001 2 | From: Vasily Khoruzhick 3 | Date: Mon, 7 Mar 2011 15:07:47 +0200 4 | Subject: [PATCH 01/19] libertas_spi: cancel packer work on module removal 5 | 6 | Signed-off-by: Vasily Khoruzhick 7 | --- 8 | drivers/net/wireless/libertas/if_spi.c | 1 + 9 | 1 file changed, 1 insertion(+) 10 | 11 | diff --git a/drivers/net/wireless/libertas/if_spi.c b/drivers/net/wireless/libertas/if_spi.c 12 | index 82c0796..1644222 100644 13 | --- a/drivers/net/wireless/libertas/if_spi.c 14 | +++ b/drivers/net/wireless/libertas/if_spi.c 15 | @@ -1235,6 +1235,7 @@ static int libertas_spi_remove(struct spi_device *spi) 16 | lbs_remove_card(priv); /* will call free_netdev */ 17 | 18 | free_irq(spi->irq, card); 19 | + cancel_work_sync(&card->packet_work); 20 | flush_workqueue(card->workqueue); 21 | destroy_workqueue(card->workqueue); 22 | if (card->pdata->teardown) 23 | -- 24 | 1.7.10.4 25 | 26 | -------------------------------------------------------------------------------- /pxa/patches-4.4/0010-pxa-ssp-set-bus-ID-for-mixed-DT-legacy-initalization.patch: -------------------------------------------------------------------------------- 1 | From 0a3632beb0792989b9d61ddc130a81763ae163d7 Mon Sep 17 00:00:00 2001 2 | From: Vasily Khoruzhick 3 | Date: Sun, 14 Feb 2016 20:58:54 -0800 4 | Subject: [PATCH 10/19] pxa-ssp: set bus ID for mixed DT/legacy initalization 5 | 6 | Signed-off-by: Vasily Khoruzhick 7 | --- 8 | arch/arm/plat-pxa/ssp.c | 3 +++ 9 | 1 file changed, 3 insertions(+) 10 | 11 | diff --git a/arch/arm/plat-pxa/ssp.c b/arch/arm/plat-pxa/ssp.c 12 | index daa1a65..bb0babb 100644 13 | --- a/arch/arm/plat-pxa/ssp.c 14 | +++ b/arch/arm/plat-pxa/ssp.c 15 | @@ -203,9 +203,12 @@ static int pxa_ssp_probe(struct platform_device *pdev) 16 | } 17 | 18 | if (dev->of_node) { 19 | + static int port_id = 1; 20 | const struct of_device_id *id = 21 | of_match_device(of_match_ptr(pxa_ssp_of_ids), dev); 22 | ssp->type = (int) id->data; 23 | + ssp->port_id = port_id; 24 | + port_id++; 25 | } else { 26 | const struct platform_device_id *id = 27 | platform_get_device_id(pdev); 28 | -- 29 | 1.7.10.4 30 | 31 | -------------------------------------------------------------------------------- /feeds.conf: -------------------------------------------------------------------------------- 1 | src-git packages https://github.com/openwrt/packages.git^763bba37e779c501ed2c2e6232ee5ffc15c000a6 2 | src-git pxa_target https://github.com/openwrt-zipit/openwrt-pxa-target.git 3 | src-git zipit_packages https://github.com/openwrt-zipit/openwrt-zipit-packages.git 4 | 5 | #src-git luci https://github.com/openwrt/luci.git 6 | #src-git routing https://github.com/openwrt-routing/packages.git 7 | #src-git telephony https://github.com/openwrt/telephony.git 8 | #src-git management https://github.com/openwrt-management/packages.git 9 | #src-git targets https://github.com/openwrt/targets.git 10 | #src-git oldpackages http://git.openwrt.org/packages.git 11 | #src-svn xwrt http://x-wrt.googlecode.com/svn/trunk/package 12 | #src-svn phone svn://svn.openwrt.org/openwrt/feeds/phone 13 | #src-svn efl svn://svn.openwrt.org/openwrt/feeds/efl 14 | #src-svn xorg svn://svn.openwrt.org/openwrt/feeds/xorg 15 | #src-svn desktop svn://svn.openwrt.org/openwrt/feeds/desktop 16 | #src-svn xfce svn://svn.openwrt.org/openwrt/feeds/xfce 17 | #src-svn lxde svn://svn.openwrt.org/openwrt/feeds/lxde 18 | #src-link custom /usr/src/openwrt/custom-feed 19 | -------------------------------------------------------------------------------- /pxa/patches-4.4/0016-pxa2xx-pcm-lib-increase-min-period-size-to-1024-byte.patch: -------------------------------------------------------------------------------- 1 | From 1b6f89f21e60228bda5e1ea735f164b7995aa64a Mon Sep 17 00:00:00 2001 2 | From: Vasily Khoruzhick 3 | Date: Tue, 16 Feb 2016 13:25:56 -0800 4 | Subject: [PATCH 16/19] pxa2xx-pcm-lib: increase min period size to 1024 bytes 5 | 6 | 32 is too small value, it causes high interrupt rate and 7 | audio stuttering 8 | 9 | Signed-off-by: Vasily Khoruzhick 10 | --- 11 | sound/arm/pxa2xx-pcm-lib.c | 2 +- 12 | 1 file changed, 1 insertion(+), 1 deletion(-) 13 | 14 | diff --git a/sound/arm/pxa2xx-pcm-lib.c b/sound/arm/pxa2xx-pcm-lib.c 15 | index e9b98af..a7bf5af 100644 16 | --- a/sound/arm/pxa2xx-pcm-lib.c 17 | +++ b/sound/arm/pxa2xx-pcm-lib.c 18 | @@ -27,7 +27,7 @@ static const struct snd_pcm_hardware pxa2xx_pcm_hardware = { 19 | .formats = SNDRV_PCM_FMTBIT_S16_LE | 20 | SNDRV_PCM_FMTBIT_S24_LE | 21 | SNDRV_PCM_FMTBIT_S32_LE, 22 | - .period_bytes_min = 32, 23 | + .period_bytes_min = 1024, 24 | .period_bytes_max = 8192 - 32, 25 | .periods_min = 1, 26 | .periods_max = 256, 27 | -- 28 | 1.7.10.4 29 | 30 | -------------------------------------------------------------------------------- /pxa/patches-4.4/0029-add-misc-dock-gpios.patch: -------------------------------------------------------------------------------- 1 | diff --git a/arch/arm/mach-pxa/z2.c b/arch/arm/mach-pxa/z2.c 2 | index 11ad845..9f2ad23 100644 3 | --- a/arch/arm/mach-pxa/z2.c 4 | +++ b/arch/arm/mach-pxa/z2.c 5 | @@ -138,6 +138,22 @@ static unsigned long z2_pin_config[] = { 6 | GPIO24_GPIO, /* WiFi CS */ 7 | GPIO36_GPIO, /* WiFi IRQ */ 8 | GPIO88_GPIO, /* LCD CS */ 9 | + GPIO86_GPIO, /* SSPRXD2 / USB_P3_5 */ 10 | + 11 | + /* Camera GPIO's on dock connector */ 12 | + GPIO12_GPIO, /* CIF_DD<7> */ 13 | + GPIO44_GPIO, /* CIF_LV camera frame start / V.sync */ 14 | + GPIO45_GPIO, /* CIF_PCLK / SSPSYSCLK3 */ 15 | + GPIO50_GPIO, /* CIF_DD<3> */ 16 | + GPIO51_GPIO, /* CIF_DD<2> */ 17 | + GPIO52_GPIO, /* CIF_DD<4> */ 18 | + GPIO53_GPIO, /* CIF_MCLK master clock out to camera */ 19 | + GPIO54_GPIO, /* CIF_PCLK pixel clock (max 26 MHz) */ 20 | + GPIO81_GPIO, /* CIF_DD<0> */ 21 | + GPIO84_GPIO, /* CIF_FV camera line start / H.sync */ 22 | + GPIO93_GPIO, /* CIF_DD<6> */ 23 | + GPIO94_GPIO, /* CIF_DD<5> */ 24 | + GPIO114_GPIO, /* CIF_DD<1> */ 25 | }; 26 | 27 | /****************************************************************************** 28 | -------------------------------------------------------------------------------- /patches/openwrt-packages/005-tmux-bump-version.patch: -------------------------------------------------------------------------------- 1 | diff --git a/utils/tmux/Makefile b/utils/tmux/Makefile 2 | index 16dabf5..eb97dfc 100644 3 | --- a/utils/tmux/Makefile 4 | +++ b/utils/tmux/Makefile 5 | @@ -10,10 +10,20 @@ include $(TOPDIR)/rules.mk 6 | PKG_NAME:=tmux 7 | PKG_VERSION:=2.2 8 | PKG_RELEASE:=1 9 | +PKG_REV:=baf155022707fea86cdbd3da8e3e4f1e27c449ec 10 | + 11 | +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz 12 | +PKG_SOURCE_URL:=git://github.com/tmux/tmux.git 13 | +PKG_SOURCE_PROTO:=git 14 | +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) 15 | +PKG_SOURCE_VERSION:=$(PKG_REV) 16 | +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) 17 | +PKG_FIXUP:=autoreconf 18 | + 19 | +#PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 20 | +#PKG_SOURCE_URL:=https://github.com/tmux/tmux/releases/download/$(PKG_VERSION) 21 | +#PKG_MD5SUM:=bd95ee7205e489c62c616bb7af040099 22 | 23 | -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 24 | -PKG_SOURCE_URL:=https://github.com/tmux/tmux/releases/download/$(PKG_VERSION) 25 | -PKG_MD5SUM:=bd95ee7205e489c62c616bb7af040099 26 | PKG_MAINTAINER:=Maxim Storchak 27 | 28 | PKG_LICENSE:=ISC 29 | -------------------------------------------------------------------------------- /pxa/patches-4.4/0019-ohci-pxa27x-disable-IRQ-on-suspend-enable-on-resume.patch: -------------------------------------------------------------------------------- 1 | From 24cf0746d3775dff9202b76a9f00bb28b54e9e84 Mon Sep 17 00:00:00 2001 2 | From: Vasily Khoruzhick 3 | Date: Tue, 16 Feb 2016 20:41:44 -0800 4 | Subject: [PATCH 19/19] ohci-pxa27x: disable IRQ on suspend, enable on resume 5 | 6 | Otherwise driver gets a spurious interrupt on resume and 7 | disables the IRQ 8 | 9 | Signed-off-by: Vasily Khoruzhick 10 | --- 11 | drivers/usb/host/ohci-pxa27x.c | 4 ++++ 12 | 1 file changed, 4 insertions(+) 13 | 14 | diff --git a/drivers/usb/host/ohci-pxa27x.c b/drivers/usb/host/ohci-pxa27x.c 15 | index ba1bec7..13022d2 100644 16 | --- a/drivers/usb/host/ohci-pxa27x.c 17 | +++ b/drivers/usb/host/ohci-pxa27x.c 18 | @@ -564,6 +564,8 @@ static int ohci_hcd_pxa27x_drv_suspend(struct device *dev) 19 | if (ret) 20 | return ret; 21 | 22 | + disable_irq(hcd->irq); 23 | + 24 | pxa27x_stop_hc(pxa_ohci, dev); 25 | return ret; 26 | } 27 | @@ -587,6 +589,8 @@ static int ohci_hcd_pxa27x_drv_resume(struct device *dev) 28 | /* Select Power Management Mode */ 29 | pxa27x_ohci_select_pmm(pxa_ohci, inf->port_mode); 30 | 31 | + enable_irq(hcd->irq); 32 | + 33 | ohci_resume(hcd, false); 34 | return 0; 35 | } 36 | -- 37 | 1.7.10.4 38 | 39 | -------------------------------------------------------------------------------- /pxa/patches-4.4/0023-ARM-Z2-update-NOR-flash-partition-layout.patch: -------------------------------------------------------------------------------- 1 | From 09d4b2c0f16b6170f744f67fbb94659d5a2e8a9f Mon Sep 17 00:00:00 2001 2 | From: Joe Honold 3 | Date: Wed, 2 Mar 2016 08:24:42 -0600 4 | Subject: [PATCH] ARM: Z2: update NOR flash partition layout 5 | 6 | --- 7 | arch/arm/boot/dts/zipit-z2.dts | 18 +++++++++++------- 8 | 1 file changed, 11 insertions(+), 7 deletions(-) 9 | 10 | diff --git a/arch/arm/boot/dts/zipit-z2.dts b/arch/arm/boot/dts/zipit-z2.dts 11 | index 1823921..855c1a3 100644 12 | --- a/arch/arm/boot/dts/zipit-z2.dts 13 | +++ b/arch/arm/boot/dts/zipit-z2.dts 14 | @@ -39,17 +39,21 @@ 15 | 16 | ubootenv@40000 { 17 | label = "U-Boot Environment"; 18 | - reg = <0x40000 0x20000>; 19 | + reg = <0x40000 0x10000>; 20 | }; 21 | 22 | - flash@60000 { 23 | - label = "Flash"; 24 | - reg = <0x60000 0x780000>; 25 | + kernel@50000 { 26 | + label = "Kernel"; 27 | + reg = <0x50000 0x190000>; 28 | }; 29 | 30 | - logo@7e0000 { 31 | - label = "U-Boot Logo"; 32 | - reg = <0x7e0000 0x20000>; 33 | + squashfs@1e0000 { 34 | + label = "Squashfs"; 35 | + reg = <0x1e0000 0x410000>; 36 | + }; 37 | + jffs2@5f0000 { 38 | + label = "JFFS2"; 39 | + reg = <0x5f0000 0>; 40 | }; 41 | }; 42 | 43 | -- 44 | 1.7.10.4 45 | 46 | -------------------------------------------------------------------------------- /pxa/patches-4.4/0007-spi-pxa2xx-don-t-init-early-otherwise-it-inits-befor.patch: -------------------------------------------------------------------------------- 1 | From fab4a658bd8b45bbabfc9633364efb9e9a23177c Mon Sep 17 00:00:00 2001 2 | From: Vasily Khoruzhick 3 | Date: Tue, 16 Feb 2016 19:55:41 -0800 4 | Subject: [PATCH 07/19] spi-pxa2xx: don't init early, otherwise it inits 5 | before DMA driver 6 | 7 | Signed-off-by: Vasily Khoruzhick 8 | --- 9 | drivers/spi/spi-pxa2xx.c | 4 ++-- 10 | 1 file changed, 2 insertions(+), 2 deletions(-) 11 | 12 | diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c 13 | index b25dc71..525db6d 100644 14 | --- a/drivers/spi/spi-pxa2xx.c 15 | +++ b/drivers/spi/spi-pxa2xx.c 16 | @@ -1529,7 +1529,7 @@ static int pxa2xx_spi_probe(struct platform_device *pdev) 17 | if (platform_info->enable_dma) { 18 | status = pxa2xx_spi_dma_setup(drv_data); 19 | if (status) { 20 | - dev_dbg(dev, "no DMA channels available, using PIO\n"); 21 | + dev_warn(dev, "no DMA channels available, using PIO\n"); 22 | platform_info->enable_dma = false; 23 | } 24 | } 25 | @@ -1733,7 +1733,7 @@ static int __init pxa2xx_spi_init(void) 26 | { 27 | return platform_driver_register(&driver); 28 | } 29 | -subsys_initcall(pxa2xx_spi_init); 30 | +module_init(pxa2xx_spi_init); 31 | 32 | static void __exit pxa2xx_spi_exit(void) 33 | { 34 | -- 35 | 1.7.10.4 36 | 37 | -------------------------------------------------------------------------------- /patches/openwrt-packages/011-opencv-libintl-fix.patch: -------------------------------------------------------------------------------- 1 | diff --git a/libs/opencv/Makefile b/libs/opencv/Makefile 2 | index 0a66b4d..efea322 100644 3 | --- a/libs/opencv/Makefile 4 | +++ b/libs/opencv/Makefile 5 | @@ -21,6 +21,7 @@ PKG_LICENSE_FILES:=LICENSE 6 | 7 | include $(INCLUDE_DIR)/package.mk 8 | include $(INCLUDE_DIR)/cmake.mk 9 | +include $(INCLUDE_DIR)/nls.mk 10 | 11 | define Package/opencv/Default/description 12 | OpenCV (Open Source Computer Vision Library) is an open source computer 13 | @@ -37,12 +38,20 @@ define Package/opencv 14 | TITLE:=OpenCV 15 | URL:=http://opencv.org/ 16 | MAINTAINER:=WRTnode Team 17 | - DEPENDS:=+libpthread +librt +libstdcpp +zlib +libjpeg 18 | + DEPENDS:=$(INTL_DEPENDS) +libpthread +librt +libstdcpp +zlib +libjpeg +glib2 19 | endef 20 | 21 | PKG_INSTALL:=1 22 | 23 | -CMAKE_OPTIONS += -DBUILD_opencv_gpu:BOOL=OFF \ 24 | +TARGET_LDFLAGS += \ 25 | + -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \ 26 | + $(INTL_LDFLAGS) 27 | + 28 | +CMAKE_OPTIONS += \ 29 | + -DCMAKE_EXE_LINKER_FLAGS:STRING="$(TARGET_LDFLAGS)" \ 30 | + -DCMAKE_MODULE_LINKER_FLAGS:STRING="$(TARGET_LDFLAGS)" \ 31 | + -DCMAKE_SHARED_LINKER_FLAGS:STRING="$(TARGET_LDFLAGS)" \ 32 | + -DBUILD_opencv_gpu:BOOL=OFF \ 33 | -DWITH_1394:BOOL=OFF -DBUILD_opencv_stitching:BOOL=OFF \ 34 | -DBUILD_opencv_superres:BOOL=OFF -DBUILD_opencv_ts:BOOL=OFF \ 35 | -DBUILD_opencv_highgui:BOOL=OFF \ 36 | -------------------------------------------------------------------------------- /patches/openwrt-packages/002-alsa-utils-fixup-for-salsa.patch: -------------------------------------------------------------------------------- 1 | From 30830d299441facee9ac0b325fcba811ad1b682d Mon Sep 17 00:00:00 2001 2 | From: Joe Honold 3 | Date: Mon, 18 Jul 2016 11:51:39 -0500 4 | Subject: [PATCH] alsa-utils fixup for salsa 5 | 6 | --- 7 | utils/alsa-utils/Makefile | 10 +++------- 8 | 1 file changed, 3 insertions(+), 7 deletions(-) 9 | 10 | diff --git a/utils/alsa-utils/Makefile b/utils/alsa-utils/Makefile 11 | index 5e8d2bc..a1df55b 100644 12 | --- a/utils/alsa-utils/Makefile 13 | +++ b/utils/alsa-utils/Makefile 14 | @@ -18,6 +18,9 @@ PKG_MD5SUM:=b9d6102fbbd0b68040bb77023ed30c0c 15 | PKG_INSTALL:=1 16 | PKG_MAINTAINER:=Ted Hess 17 | 18 | +PKG_FIXUP:=autoreconf 19 | +PKG_FIXUP:=gettext-version 20 | + 21 | include $(INCLUDE_DIR)/package.mk 22 | 23 | define Package/alsa-utils 24 | @@ -56,13 +58,7 @@ define Package/alsa-utils/install 25 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/amixer $(1)/usr/bin/ 26 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/alsamixer $(1)/usr/bin/ 27 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/aplay $(1)/usr/bin/ 28 | - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/arecord $(1)/usr/bin/ 29 | - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/alsactl $(1)/usr/sbin/ 30 | - 31 | - $(INSTALL_DIR) $(1)/usr/share/alsa/init 32 | - $(INSTALL_DATA) \ 33 | - $(PKG_INSTALL_DIR)/usr/share/alsa/init/* \ 34 | - $(1)/usr/share/alsa/init/ 35 | + $(LN) /usr/bin/aplay $(1)/usr/bin/arecord 36 | endef 37 | 38 | define Package/alsa-utils-seq/install 39 | -- 40 | 2.1.4 41 | 42 | -------------------------------------------------------------------------------- /pxa/image/gen_dts.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Calculates flash partition sizes, updates the template DTS file 3 | # and creates empty jffs2 partitions 4 | 5 | [ $# -eq 6 ] || { 6 | echo "SYNTAX: $0 " 7 | exit 1 8 | } 9 | 10 | # Defaults 11 | FLASH_BLOCKSIZE=64 12 | FLASH_SZ=128 13 | UBOOT_SZ=4 14 | UBOOT_ENV_SZ=1 15 | 16 | # Calculate partition sizes 17 | KERNEL_SZ=`du -B "$FLASH_BLOCKSIZE"k "$2/$3-uImage" | awk '{print $1}'` 18 | KERNEL_DT_SZ=`printf %x $(($KERNEL_SZ * $FLASH_BLOCKSIZE * 1024))` 19 | ROOTFS_ADDR=`printf %x $((($UBOOT_SZ + $UBOOT_ENV_SZ + $KERNEL_SZ) * $FLASH_BLOCKSIZE * 1024))` 20 | ROOTFS_SZ=`du -B "$FLASH_BLOCKSIZE"k "$2/$3-squashfs.img" | awk '{print $1}'` 21 | JFFS2_ADDR=`printf %x $((($UBOOT_SZ + $UBOOT_ENV_SZ + $KERNEL_SZ + $ROOTFS_SZ) * $FLASH_BLOCKSIZE * 1024))` 22 | SQUASHFS_SZ=`printf %x $(($ROOTFS_SZ * $FLASH_BLOCKSIZE * 1024))` 23 | JFFS_SIZE=$((($FLASH_SZ - $UBOOT_SZ - $UBOOT_ENV_SZ - $KERNEL_SZ - $ROOTFS_SZ) * $FLASH_BLOCKSIZE * 1024)) 24 | 25 | # Replace partition sizes in the DTS template 26 | sed -e "s:DT_SZ_KERNEL:${KERNEL_DT_SZ}:" -e "s:DT_ADDR_SQUASH:${ROOTFS_ADDR}:g" -e "s:DT_SZ_SQUASH:${SQUASHFS_SZ}:" -e "s:DT_ADDR_JFFS2:${JFFS2_ADDR}:g" <../dts/zipit-z2_template.dts >$4/zipit-z2.new.dts 27 | 28 | # Create the empty jffs2 partition 29 | mkdir -p "$5/empty_jffs" 30 | "$6/bin/mkfs.jffs2" -v -X lzma -y 80:lzma -y 70:zlib \ 31 | --pad="$JFFS_SIZE" \ 32 | --little-endian --squash -e 64KiB \ 33 | -d "$5/empty_jffs" \ 34 | -o "$2/$3-overlay.jffs2" 35 | -------------------------------------------------------------------------------- /pxa/patches-4.4/0011-gpio-pxa-use-indexed-IRQs-for-DT-initalization.patch: -------------------------------------------------------------------------------- 1 | From 7d55a7bfb78953125d4cb7e1f29ada53e0bb115b Mon Sep 17 00:00:00 2001 2 | From: Vasily Khoruzhick 3 | Date: Sun, 14 Feb 2016 20:59:54 -0800 4 | Subject: [PATCH 11/19] gpio-pxa: use indexed IRQs for DT initalization 5 | 6 | Signed-off-by: Vasily Khoruzhick 7 | --- 8 | drivers/gpio/gpio-pxa.c | 13 ++++++++++--- 9 | 1 file changed, 10 insertions(+), 3 deletions(-) 10 | 11 | diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c 12 | index df2ce55..0e626a9 100644 13 | --- a/drivers/gpio/gpio-pxa.c 14 | +++ b/drivers/gpio/gpio-pxa.c 15 | @@ -23,6 +23,7 @@ 16 | #include 17 | #include 18 | #include 19 | +#include 20 | #include 21 | #include 22 | #include 23 | @@ -595,9 +596,15 @@ static int pxa_gpio_probe(struct platform_device *pdev) 24 | if (!pxa_last_gpio) 25 | return -EINVAL; 26 | 27 | - irq0 = platform_get_irq_byname(pdev, "gpio0"); 28 | - irq1 = platform_get_irq_byname(pdev, "gpio1"); 29 | - irq_mux = platform_get_irq_byname(pdev, "gpio_mux"); 30 | + if (use_of) { 31 | + irq0 = of_irq_get(pdev->dev.of_node, 0); 32 | + irq1 = of_irq_get(pdev->dev.of_node, 1); 33 | + irq_mux = of_irq_get(pdev->dev.of_node, 2); 34 | + } else { 35 | + irq0 = platform_get_irq_byname(pdev, "gpio0"); 36 | + irq1 = platform_get_irq_byname(pdev, "gpio1"); 37 | + irq_mux = platform_get_irq_byname(pdev, "gpio_mux"); 38 | + } 39 | if ((irq0 > 0 && irq1 <= 0) || (irq0 <= 0 && irq1 > 0) 40 | || (irq_mux <= 0)) 41 | return -EINVAL; 42 | -- 43 | 1.7.10.4 44 | 45 | -------------------------------------------------------------------------------- /pxa/patches-4.4/0025-pxamci-add-dt-card-detection.patch: -------------------------------------------------------------------------------- 1 | diff --git a/include/linux/platform_data/mmc-pxamci.h b/include/linux/platform_data/mmc-pxamci.h 2 | index 1706b35..cefd3fa 100644 3 | --- a/include/linux/platform_data/mmc-pxamci.h 4 | +++ b/include/linux/platform_data/mmc-pxamci.h 5 | @@ -15,6 +15,7 @@ struct pxamci_platform_data { 6 | int (*setpower)(struct device *, unsigned int); 7 | void (*exit)(struct device *, void *); 8 | int gpio_card_detect; /* gpio detecting card insertion */ 9 | + int gpio_card_detect_invert; /* gpio active high card detection */ 10 | int gpio_card_ro; /* gpio detecting read only toggle */ 11 | bool gpio_card_ro_invert; /* gpio ro is inverted */ 12 | int gpio_power; /* gpio powering up MMC bus */ 13 | 14 | diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c 15 | index 38dfbf6..10e8e44 100644 16 | --- a/drivers/mmc/host/pxamci.c 17 | +++ b/drivers/mmc/host/pxamci.c 18 | @@ -634,6 +634,11 @@ static int pxamci_of_init(struct platform_device *pdev) 19 | 20 | pdata->gpio_card_detect = 21 | of_get_named_gpio(np, "cd-gpios", 0); 22 | + if (of_find_property(np, "cd-invert", NULL)){ 23 | + pdata->gpio_card_detect_invert = true; 24 | + } else { 25 | + pdata->gpio_card_detect_invert = false; 26 | + } 27 | pdata->gpio_card_ro = 28 | of_get_named_gpio(np, "wp-gpios", 0); 29 | 30 | @@ -840,7 +845,8 @@ static int pxamci_probe(struct platform_device *pdev) 31 | if (ret) { 32 | dev_err(&pdev->dev, "Failed requesting gpio_cd %d\n", gpio_cd); 33 | goto out; 34 | - } 35 | + } else if(host->pdata->gpio_card_detect_invert) 36 | + mmc->caps2 |= MMC_CAP2_CD_ACTIVE_HIGH; 37 | 38 | if (host->pdata && host->pdata->init) 39 | host->pdata->init(&pdev->dev, pxamci_detect_irq, mmc); 40 | -------------------------------------------------------------------------------- /pxa/patches-4.4/0014-pxa2xx-i2s-fix-filter_fn-argument.patch: -------------------------------------------------------------------------------- 1 | From c3fd7292dbede8e202d45bc302eb7ce44e649485 Mon Sep 17 00:00:00 2001 2 | From: Vasily Khoruzhick 3 | Date: Mon, 15 Feb 2016 09:10:38 -0800 4 | Subject: [PATCH 14/19] pxa2xx-i2s: fix filter_fn argument 5 | 6 | Signed-off-by: Vasily Khoruzhick 7 | --- 8 | sound/soc/pxa/pxa2xx-i2s.c | 12 ++++++++++-- 9 | 1 file changed, 10 insertions(+), 2 deletions(-) 10 | 11 | diff --git a/sound/soc/pxa/pxa2xx-i2s.c b/sound/soc/pxa/pxa2xx-i2s.c 12 | index 96eb78d..d9ea696 100644 13 | --- a/sound/soc/pxa/pxa2xx-i2s.c 14 | +++ b/sound/soc/pxa/pxa2xx-i2s.c 15 | @@ -18,6 +18,7 @@ 16 | #include 17 | #include 18 | #include 19 | +#include 20 | #include 21 | #include 22 | #include 23 | @@ -83,7 +84,11 @@ static struct pxa_i2s_port pxa_i2s; 24 | static struct clk *clk_i2s; 25 | static int clk_ena = 0; 26 | 27 | -static unsigned long pxa2xx_i2s_pcm_stereo_out_req = 3; 28 | + 29 | +static struct pxad_param pxa2xx_i2s_pcm_stereo_out_req = { 30 | + .drcmr = 3, 31 | + .prio = 0, 32 | +}; 33 | static struct snd_dmaengine_dai_dma_data pxa2xx_i2s_pcm_stereo_out = { 34 | .addr = __PREG(SADR), 35 | .addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES, 36 | @@ -91,7 +96,10 @@ static struct snd_dmaengine_dai_dma_data pxa2xx_i2s_pcm_stereo_out = { 37 | .filter_data = &pxa2xx_i2s_pcm_stereo_out_req, 38 | }; 39 | 40 | -static unsigned long pxa2xx_i2s_pcm_stereo_in_req = 2; 41 | +static struct pxad_param pxa2xx_i2s_pcm_stereo_in_req = { 42 | + .drcmr = 2, 43 | + .prio = 0, 44 | +}; 45 | static struct snd_dmaengine_dai_dma_data pxa2xx_i2s_pcm_stereo_in = { 46 | .addr = __PREG(SADR), 47 | .addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES, 48 | -- 49 | 1.7.10.4 50 | 51 | -------------------------------------------------------------------------------- /pxa/base-files/etc/z2.kmap: -------------------------------------------------------------------------------- 1 | bkeymap         q w e r t y u i o p a s d f g h j k l ;z x c v b n m ,.         Q W E R T Y U I O P A S D F G H J K L ~Z X C V B N M ()    2 |  3 | |        1234567890$#&@"'[]-:!/+*=_?<>         Q W E R T Y U I O P A S D F G H J `|^Z \CV B N %{}          4 |            5 |            6 |  Loading keymap-2.6.map 7 | -------------------------------------------------------------------------------- /pxa/patches-4.4/0018-pxa27xx_keypad-fix-resume-on-pxa27x-devices.patch: -------------------------------------------------------------------------------- 1 | From 184b979736ee050d6fac61ef04da163e9f63444a Mon Sep 17 00:00:00 2001 2 | From: Vasily Khoruzhick 3 | Date: Tue, 16 Feb 2016 20:31:49 -0800 4 | Subject: [PATCH 18/19] pxa27xx_keypad: fix resume on pxa27x devices 5 | 6 | Signed-off-by: Vasily Khoruzhick 7 | --- 8 | drivers/input/keyboard/pxa27x_keypad.c | 25 +++++++++---------------- 9 | 1 file changed, 9 insertions(+), 16 deletions(-) 10 | 11 | diff --git a/drivers/input/keyboard/pxa27x_keypad.c b/drivers/input/keyboard/pxa27x_keypad.c 12 | index fcef5d1..74194fd 100644 13 | --- a/drivers/input/keyboard/pxa27x_keypad.c 14 | +++ b/drivers/input/keyboard/pxa27x_keypad.c 15 | @@ -666,14 +666,9 @@ static int pxa27x_keypad_suspend(struct device *dev) 16 | struct platform_device *pdev = to_platform_device(dev); 17 | struct pxa27x_keypad *keypad = platform_get_drvdata(pdev); 18 | 19 | - /* 20 | - * If the keypad is used a wake up source, clock can not be disabled. 21 | - * Or it can not detect the key pressing. 22 | - */ 23 | + clk_disable(keypad->clk); 24 | if (device_may_wakeup(&pdev->dev)) 25 | enable_irq_wake(keypad->irq); 26 | - else 27 | - clk_disable_unprepare(keypad->clk); 28 | 29 | return 0; 30 | } 31 | @@ -688,20 +683,18 @@ static int pxa27x_keypad_resume(struct device *dev) 32 | * If the keypad is used as wake up source, the clock is not turned 33 | * off. So do not need configure it again. 34 | */ 35 | - if (device_may_wakeup(&pdev->dev)) { 36 | + if (device_may_wakeup(&pdev->dev)) 37 | disable_irq_wake(keypad->irq); 38 | - } else { 39 | - mutex_lock(&input_dev->mutex); 40 | - 41 | - if (input_dev->users) { 42 | - /* Enable unit clock */ 43 | - clk_prepare_enable(keypad->clk); 44 | - pxa27x_keypad_config(keypad); 45 | - } 46 | 47 | - mutex_unlock(&input_dev->mutex); 48 | + mutex_lock(&input_dev->mutex); 49 | + if (input_dev->users) { 50 | + /* Enable unit clock */ 51 | + clk_enable(keypad->clk); 52 | + pxa27x_keypad_config(keypad); 53 | } 54 | 55 | + mutex_unlock(&input_dev->mutex); 56 | + 57 | return 0; 58 | } 59 | #endif 60 | -- 61 | 1.7.10.4 62 | 63 | -------------------------------------------------------------------------------- /pxa/patches-4.4/0022-pxa27x_udc-add-a-module-parameter-to-skip-port-mode-.patch: -------------------------------------------------------------------------------- 1 | From 64be782b884f15253ce53bb32147c731ee3c4ddd Mon Sep 17 00:00:00 2001 2 | From: Vasily Khoruzhick 3 | Date: Sun, 21 Feb 2016 21:23:25 -0800 4 | Subject: [PATCH 5/5] pxa27x_udc: add a module parameter to skip port mode init 5 | 6 | By default pxa27x_udc sets PORT 2 mode to device. But it's not a good 7 | idea when using USB flash as a boot device. 8 | 9 | Signed-off-by: Vasily Khoruzhick 10 | --- 11 | drivers/usb/gadget/udc/pxa27x_udc.c | 24 +++++++++++++++--------- 12 | 1 file changed, 15 insertions(+), 9 deletions(-) 13 | 14 | diff --git a/drivers/usb/gadget/udc/pxa27x_udc.c b/drivers/usb/gadget/udc/pxa27x_udc.c 15 | index 4c74a7f..23feb63 100644 16 | --- a/drivers/usb/gadget/udc/pxa27x_udc.c 17 | +++ b/drivers/usb/gadget/udc/pxa27x_udc.c 18 | @@ -78,6 +78,10 @@ 19 | #define DRIVER_VERSION "2008-04-18" 20 | #define DRIVER_DESC "PXA 27x USB Device Controller driver" 21 | 22 | +static bool skip_portmode_init; 23 | +module_param(skip_portmode_init, bool, 0644); 24 | +MODULE_PARM_DESC(skip_portmode_init, "Don't force PORT2 mode to device"); 25 | + 26 | static const char driver_name[] = "pxa27x_udc"; 27 | static struct pxa_udc *the_controller; 28 | 29 | @@ -2556,15 +2560,17 @@ static int pxa_udc_probe(struct platform_device *pdev) 30 | 31 | pxa_init_debugfs(udc); 32 | 33 | - /* Switch to device mode by default */ 34 | - v = udc_readl(udc, UP2OCR); 35 | - /* Disable D+ and D- pull down, 36 | - Transceiver output select = 0 -> UDC 37 | - */ 38 | - v &= ~(UP2OCR_HXS |UP2OCR_DPPDE | UP2OCR_DMPDE); 39 | - /* Enable transceiver */ 40 | - v |= UP2OCR_HXOE; 41 | - udc_writel(udc, UP2OCR, v); 42 | + if (!skip_portmode_init) { 43 | + /* Switch to device mode by default */ 44 | + v = udc_readl(udc, UP2OCR); 45 | + /* Disable D+ and D- pull down, 46 | + Transceiver output select = 0 -> UDC 47 | + */ 48 | + v &= ~(UP2OCR_HXS |UP2OCR_DPPDE | UP2OCR_DMPDE); 49 | + /* Enable transceiver */ 50 | + v |= UP2OCR_HXOE; 51 | + udc_writel(udc, UP2OCR, v); 52 | + } 53 | 54 | if (should_enable_udc(udc)) 55 | udc_enable(udc); 56 | -- 57 | 2.7.0 58 | 59 | -------------------------------------------------------------------------------- /pxa/patches-4.4/0012-pxa2xx-i2s-add-Dt-initialization-support.patch: -------------------------------------------------------------------------------- 1 | From 9bf3aa9803ee0d3e02714c9909bc73cf76d637a3 Mon Sep 17 00:00:00 2001 2 | From: Vasily Khoruzhick 3 | Date: Sun, 14 Feb 2016 21:00:52 -0800 4 | Subject: [PATCH 12/19] pxa2xx-i2s: add Dt initialization support 5 | 6 | --- 7 | sound/soc/pxa/Kconfig | 4 +++- 8 | sound/soc/pxa/pxa2xx-i2s.c | 12 +++++++++++- 9 | 2 files changed, 14 insertions(+), 2 deletions(-) 10 | 11 | diff --git a/sound/soc/pxa/Kconfig b/sound/soc/pxa/Kconfig 12 | index f2bf866..a7f33bc 100644 13 | --- a/sound/soc/pxa/Kconfig 14 | +++ b/sound/soc/pxa/Kconfig 15 | @@ -28,7 +28,9 @@ config SND_PXA2XX_SOC_AC97 16 | select SND_SOC_AC97_BUS 17 | 18 | config SND_PXA2XX_SOC_I2S 19 | - tristate 20 | + tristate "PXA2XX I2S driver" 21 | + help 22 | + Say Y if you want ot enable PXA2XX I2S driver 23 | 24 | config SND_PXA_SOC_SSP 25 | tristate 26 | diff --git a/sound/soc/pxa/pxa2xx-i2s.c b/sound/soc/pxa/pxa2xx-i2s.c 27 | index 0389cf7..96eb78d 100644 28 | --- a/sound/soc/pxa/pxa2xx-i2s.c 29 | +++ b/sound/soc/pxa/pxa2xx-i2s.c 30 | @@ -24,6 +24,7 @@ 31 | #include 32 | #include 33 | #include 34 | +#include 35 | 36 | #include 37 | #include 38 | @@ -302,7 +303,7 @@ static int pxa2xx_i2s_resume(struct snd_soc_dai *dai) 39 | 40 | static int pxa2xx_i2s_probe(struct snd_soc_dai *dai) 41 | { 42 | - clk_i2s = clk_get(dai->dev, "I2SCLK"); 43 | + clk_i2s = clk_get(dai->dev, NULL); 44 | if (IS_ERR(clk_i2s)) 45 | return PTR_ERR(clk_i2s); 46 | 47 | @@ -374,11 +375,20 @@ static int pxa2xx_i2s_drv_probe(struct platform_device *pdev) 48 | &pxa_i2s_dai, 1); 49 | } 50 | 51 | +#ifdef CONFIG_OF 52 | +static const struct of_device_id snd_soc_pxa2xx_i2s_match[] = { 53 | + { .compatible = "mrvl,pxa2xx-i2s" }, 54 | + { } 55 | +}; 56 | +MODULE_DEVICE_TABLE(of, snd_soc_pxa2xx_i2s_match); 57 | +#endif 58 | + 59 | static struct platform_driver pxa2xx_i2s_driver = { 60 | .probe = pxa2xx_i2s_drv_probe, 61 | 62 | .driver = { 63 | .name = "pxa2xx-i2s", 64 | + .of_match_table = of_match_ptr(snd_soc_pxa2xx_i2s_match), 65 | }, 66 | }; 67 | 68 | -- 69 | 1.7.10.4 70 | 71 | -------------------------------------------------------------------------------- /pxa/patches-4.4/0005-pxa27x_udc-eliminate-alignment-issue.patch: -------------------------------------------------------------------------------- 1 | From 83f4e73c375d58f7f15649c38ea921110a9e600d Mon Sep 17 00:00:00 2001 2 | From: Vasily Khoruzhick 3 | Date: Sat, 25 Oct 2014 14:55:42 +0300 4 | Subject: [PATCH 05/19] pxa27x_udc: eliminate alignment issue 5 | 6 | Signed-off-by: Vasily Khoruzhick 7 | --- 8 | drivers/usb/gadget/udc/pxa27x_udc.c | 20 ++++++++++++++------ 9 | 1 file changed, 14 insertions(+), 6 deletions(-) 10 | 11 | diff --git a/drivers/usb/gadget/udc/pxa27x_udc.c b/drivers/usb/gadget/udc/pxa27x_udc.c 12 | index 001a3b7..1ecf6e5 100644 13 | --- a/drivers/usb/gadget/udc/pxa27x_udc.c 14 | +++ b/drivers/usb/gadget/udc/pxa27x_udc.c 15 | @@ -34,6 +34,8 @@ 16 | #include 17 | #include 18 | 19 | +#include 20 | + 21 | #include "pxa27x_udc.h" 22 | 23 | /* 24 | @@ -862,7 +864,7 @@ static void nuke(struct pxa_ep *ep, int status) 25 | */ 26 | static int read_packet(struct pxa_ep *ep, struct pxa27x_request *req) 27 | { 28 | - u32 *buf; 29 | + u32 *buf, v; 30 | int bytes_ep, bufferspace, count, i; 31 | 32 | bytes_ep = ep_count_bytes_remain(ep); 33 | @@ -876,8 +878,11 @@ static int read_packet(struct pxa_ep *ep, struct pxa27x_request *req) 34 | else /* zlp */ 35 | count = 0; 36 | 37 | - for (i = count; i > 0; i -= 4) 38 | - *buf++ = udc_ep_readl(ep, UDCDR); 39 | + for (i = count; i > 0; i -= 4) { 40 | + v = udc_ep_readl(ep, UDCDR); 41 | + put_unaligned(v, buf); 42 | + buf++; 43 | + } 44 | req->req.actual += count; 45 | 46 | ep_write_UDCCSR(ep, UDCCSR_PC); 47 | @@ -901,7 +906,7 @@ static int write_packet(struct pxa_ep *ep, struct pxa27x_request *req, 48 | unsigned int max) 49 | { 50 | int length, count, remain, i; 51 | - u32 *buf; 52 | + u32 *buf, v; 53 | u8 *buf_8; 54 | 55 | buf = (u32 *)(req->req.buf + req->req.actual); 56 | @@ -912,8 +917,11 @@ static int write_packet(struct pxa_ep *ep, struct pxa27x_request *req, 57 | 58 | remain = length & 0x3; 59 | count = length & ~(0x3); 60 | - for (i = count; i > 0 ; i -= 4) 61 | - udc_ep_writel(ep, UDCDR, *buf++); 62 | + for (i = count; i > 0 ; i -= 4) { 63 | + v = get_unaligned(buf); 64 | + udc_ep_writel(ep, UDCDR, v); 65 | + buf++; 66 | + } 67 | 68 | buf_8 = (u8 *)buf; 69 | for (i = remain; i > 0; i--) 70 | -- 71 | 1.7.10.4 72 | 73 | -------------------------------------------------------------------------------- /pxa/patches-4.4/0028-pxa27x_udc-change-skip_portmode_init-to-host_portmod.patch: -------------------------------------------------------------------------------- 1 | From 86c262626e819838e4c661a339ee84fae1ac2ee4 Mon Sep 17 00:00:00 2001 2 | From: Joe Honold 3 | Date: Wed, 3 Aug 2016 21:31:20 -0500 4 | Subject: [PATCH] pxa27x_udc: change skip_portmode_init to host_portmode_init 5 | and force host mode if set 6 | 7 | Signed-off-by: Joe Honold 8 | --- 9 | drivers/usb/gadget/udc/pxa27x_udc.c | 22 ++++++++++++++++++---- 10 | 1 file changed, 18 insertions(+), 4 deletions(-) 11 | 12 | diff --git a/drivers/usb/gadget/udc/pxa27x_udc.c b/drivers/usb/gadget/udc/pxa27x_udc.c 13 | index 23feb63..daea05c 100644 14 | --- a/drivers/usb/gadget/udc/pxa27x_udc.c 15 | +++ b/drivers/usb/gadget/udc/pxa27x_udc.c 16 | @@ -78,9 +78,9 @@ 17 | #define DRIVER_VERSION "2008-04-18" 18 | #define DRIVER_DESC "PXA 27x USB Device Controller driver" 19 | 20 | -static bool skip_portmode_init; 21 | -module_param(skip_portmode_init, bool, 0644); 22 | -MODULE_PARM_DESC(skip_portmode_init, "Don't force PORT2 mode to device"); 23 | +static bool host_portmode_init; 24 | +module_param(host_portmode_init, bool, 0644); 25 | +MODULE_PARM_DESC(host_portmode_init, "Force PORT2 mode to host"); 26 | 27 | static const char driver_name[] = "pxa27x_udc"; 28 | static struct pxa_udc *the_controller; 29 | @@ -2560,7 +2560,7 @@ static int pxa_udc_probe(struct platform_device *pdev) 30 | 31 | pxa_init_debugfs(udc); 32 | 33 | - if (!skip_portmode_init) { 34 | + if (!host_portmode_init) { 35 | /* Switch to device mode by default */ 36 | v = udc_readl(udc, UP2OCR); 37 | /* Disable D+ and D- pull down, 38 | @@ -2570,6 +2570,20 @@ static int pxa_udc_probe(struct platform_device *pdev) 39 | /* Enable transceiver */ 40 | v |= UP2OCR_HXOE; 41 | udc_writel(udc, UP2OCR, v); 42 | + dev_warn(&pdev->dev, "started device mode"); 43 | + } else { 44 | + /* Switch to host mode */ 45 | + v = udc_readl(udc, UP2OCR); 46 | + /* Enable D+ and D- pull down, 47 | + Transceiver output select = 1 -> Host 48 | + */ 49 | + v |= (UP2OCR_HXS |UP2OCR_DPPDE | UP2OCR_DMPDE); 50 | + /* Disable D+ pull up */ 51 | + v &= ~(UP2OCR_DPPUE); 52 | + /* Enable transceiver */ 53 | + v |= UP2OCR_HXOE;; 54 | + udc_writel(udc, UP2OCR, v); 55 | + dev_warn(&pdev->dev, "started host mode"); 56 | } 57 | 58 | if (should_enable_udc(udc)) 59 | -- 60 | 2.1.4 61 | 62 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # openwrt-pxa-target 2 | This target feed adds support for the Zipit Z2 (pxa) platform to openwrt. It has been tested with openwrt trunk as of commit [1e22c9b9eb691878156dfe32fb1e117737f1d248](https://github.com/openwrt/archive/commit/1e22c9b9eb691878156dfe32fb1e117737f1d248) (Wed Apr 27 2016) 3 | 4 | ## Pre-Built Package Repository 5 | Pre-compiled rootfs and packages are available. See the [Wiki](https://github.com/openwrt-zipit/openwrt-pxa-target/wiki) for more information about installation and general usage. 6 | 7 | ## Prerequisites 8 | See the [OpenWrt Wiki page](https://wiki.openwrt.org/doc/howto/buildroot.exigence) for host system prerequisites 9 | 10 | ## Usage 11 | Download openwrt trunk with git and checkout commit 1e22c9b9eb691878156dfe32fb1e117737f1d248: 12 | 13 | git clone https://github.com/openwrt/archive.git openwrt-zipit 14 | cd openwrt-zipit 15 | git checkout 1e22c9b9eb691878156dfe32fb1e117737f1d248 16 | 17 | Add the pxa target feed to _feeds.conf_: 18 | 19 | echo "src-git pxa_target https://github.com/openwrt-zipit/openwrt-pxa-target" > feeds.conf 20 | 21 | Update and install the target feed: 22 | 23 | scripts/feeds update && scripts/feeds install -p pxa_target pxa 24 | 25 | Copy the _feeds.conf_ and default config files: 26 | 27 | cp feeds/pxa_target/feeds.conf ./feeds.conf 28 | cp feeds/pxa_target/zipit_openwrt_defconfig ./.config 29 | 30 | Update the feeds again: 31 | 32 | scripts/feeds update && scripts/feeds install -a 33 | 34 | Apply patches to openwrt and openwrt-packages: 35 | 36 | for f in feeds/pxa_target/patches/openwrt/*; do patch -p1 < "${f}"; done 37 | for f in feeds/pxa_target/patches/openwrt-packages/*; do patch -d feeds/packages -p1 < "${f}"; done 38 | 39 | Update zipit_openwrt_defconfig: 40 | 41 | make defconfig 42 | 43 | Run _make_ to do the default build or run _make menuconfig_ to add/remove packages. 44 | 45 | ## Zipit Z2 Linux Kernel 4.4 Internal 8Mb FlashPartition Layout 46 | | Mtdblock | Name | Size(bytes) | Start[hex] | Size[hex] | 47 | |:--------:|:--------:| -----------:| ----------:| ---------:| 48 | | 0 | u-boot | 262144 | 0x00000 | 0x40000 | 49 | | 1 | u-boot-env | 65536 | 0x40000 | 0x10000 | 50 | | 2 | kernel | ? | 0x50000 | ? | 51 | | 3 | squashfs | ? | ? | ? | 52 | | 4 | jffs2 | ? | ? | ? | 53 | | 5 | firmware | 8060928 | 0x50000 | 0x7B0000 | 54 | 55 | Flash partition sizes are automatically calculated at image creation time and follow the above layout. A successful build will output a "firmware" image file in the bin/pxa dir which contains the kernel, squashfs and jffs which can be written to to mtdblock5 (firmware). If you modify (add) packages (via menuconfig) and the image file is larger than 8060928 bytes, the openwrt build will exit with an error stating such. Reduce your installed packages and try again. 56 | -------------------------------------------------------------------------------- /pxa/patches-4.4/0004-lms283gf05-add-suspend-resume-handlers.patch: -------------------------------------------------------------------------------- 1 | From 4f4de5d4a671fdea8a9a646bf87de0f4a0509f85 Mon Sep 17 00:00:00 2001 2 | From: Vasily Khoruzhick 3 | Date: Sun, 3 Jun 2012 23:51:55 +0300 4 | Subject: [PATCH 04/19] lms283gf05: add suspend/resume handlers 5 | 6 | Signed-off-by: Vasily Khoruzhick 7 | --- 8 | drivers/video/backlight/lms283gf05.c | 55 ++++++++++++++++++++++++++++++++++ 9 | 1 file changed, 55 insertions(+) 10 | 11 | diff --git a/drivers/video/backlight/lms283gf05.c b/drivers/video/backlight/lms283gf05.c 12 | index 4237aaa..e39e2ec 100644 13 | --- a/drivers/video/backlight/lms283gf05.c 14 | +++ b/drivers/video/backlight/lms283gf05.c 15 | @@ -22,6 +22,7 @@ 16 | struct lms283gf05_state { 17 | struct spi_device *spi; 18 | struct lcd_device *ld; 19 | + unsigned int power; 20 | }; 21 | 22 | struct lms283gf05_seq { 23 | @@ -130,6 +131,8 @@ static int lms283gf05_power_set(struct lcd_device *ld, int power) 24 | struct spi_device *spi = st->spi; 25 | struct lms283gf05_pdata *pdata = dev_get_platdata(&spi->dev); 26 | 27 | + st->power = power; 28 | + 29 | if (power <= FB_BLANK_NORMAL) { 30 | if (pdata) 31 | lms283gf05_reset(pdata->reset_gpio, 32 | @@ -189,11 +192,63 @@ static int lms283gf05_probe(struct spi_device *spi) 33 | return 0; 34 | } 35 | 36 | +#if defined(CONFIG_PM) 37 | +static unsigned int before_power; 38 | + 39 | +static int lms283gf05_suspend(struct device *dev) 40 | +{ 41 | + int ret = 0; 42 | + struct lms283gf05_state *state = dev_get_drvdata(dev); 43 | + 44 | + dev_dbg(dev, "lcd->power = %d\n", state->power); 45 | + 46 | + before_power = state->power; 47 | + 48 | + /* 49 | + * when lcd panel is suspend, lcd panel becomes off 50 | + * regardless of status. 51 | + */ 52 | + ret = lms283gf05_power_set(state->ld, FB_BLANK_POWERDOWN); 53 | + 54 | + return ret; 55 | +} 56 | + 57 | +static int lms283gf05_resume(struct device *dev) 58 | +{ 59 | + int ret = 0; 60 | + struct lms283gf05_state *state = dev_get_drvdata(dev); 61 | + 62 | + dev_dbg(dev, "before_power = %d\n", before_power); 63 | + 64 | + ret = lms283gf05_power_set(state->ld, before_power); 65 | + 66 | + return ret; 67 | +} 68 | + 69 | +#else 70 | +#define lms283gf05_suspend NULL 71 | +#define lms283gf05_resume NULL 72 | +#endif 73 | + 74 | +static SIMPLE_DEV_PM_OPS(lms283gf05_pm_ops, lms283gf05_suspend, 75 | + lms283gf05_resume); 76 | + 77 | +static int lms283gf05_remove(struct spi_device *spi) 78 | +{ 79 | + struct lms283gf05_state *st = dev_get_drvdata(&spi->dev); 80 | + 81 | + lcd_device_unregister(st->ld); 82 | + 83 | + return 0; 84 | +} 85 | + 86 | static struct spi_driver lms283gf05_driver = { 87 | .driver = { 88 | .name = "lms283gf05", 89 | + .pm = &lms283gf05_pm_ops, 90 | }, 91 | .probe = lms283gf05_probe, 92 | + .remove = lms283gf05_remove, 93 | }; 94 | 95 | module_spi_driver(lms283gf05_driver); 96 | -- 97 | 1.7.10.4 98 | 99 | -------------------------------------------------------------------------------- /pxa/patches-4.4/0002-libertas-add-ability-to-power-off-card-on-suspend.patch: -------------------------------------------------------------------------------- 1 | From 22372ec98f936be922f2c86d172bfaf44b1a09df Mon Sep 17 00:00:00 2001 2 | From: Vasily Khoruzhick 3 | Date: Tue, 2 Aug 2011 12:48:54 +0300 4 | Subject: [PATCH 02/19] libertas: add ability to power off card on suspend 5 | 6 | Could be usefull if it's not possible to keep power on the card 7 | when host goes into suspend. 8 | 9 | Signed-off-by: Vasily Khoruzhick 10 | --- 11 | drivers/net/wireless/libertas/dev.h | 3 ++- 12 | drivers/net/wireless/libertas/main.c | 22 +++++++++++++++------- 13 | 2 files changed, 17 insertions(+), 8 deletions(-) 14 | 15 | diff --git a/drivers/net/wireless/libertas/dev.h b/drivers/net/wireless/libertas/dev.h 16 | index 6bd1608..adc7d34 100644 17 | --- a/drivers/net/wireless/libertas/dev.h 18 | +++ b/drivers/net/wireless/libertas/dev.h 19 | @@ -99,9 +99,10 @@ struct lbs_private { 20 | /* Hardware access */ 21 | void *card; 22 | bool iface_running; 23 | + bool suspend_iface_status; 24 | u8 fw_ready; 25 | u8 surpriseremoved; 26 | - u8 setup_fw_on_resume; 27 | + u8 disable_on_suspend; 28 | int (*hw_host_to_card) (struct lbs_private *priv, u8 type, u8 *payload, u16 nb); 29 | void (*reset_card) (struct lbs_private *priv); 30 | int (*power_save) (struct lbs_private *priv); 31 | diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c 32 | index 8079560..7e63255 100644 33 | --- a/drivers/net/wireless/libertas/main.c 34 | +++ b/drivers/net/wireless/libertas/main.c 35 | @@ -693,7 +693,7 @@ done: 36 | 37 | int lbs_suspend(struct lbs_private *priv) 38 | { 39 | - int ret; 40 | + int ret = 0; 41 | 42 | lbs_deb_enter(LBS_DEB_FW); 43 | 44 | @@ -707,7 +707,13 @@ int lbs_suspend(struct lbs_private *priv) 45 | priv->deep_sleep_required = 1; 46 | } 47 | 48 | - ret = lbs_set_host_sleep(priv, 1); 49 | + if (priv->disable_on_suspend) { 50 | + /* Disable card */ 51 | + priv->suspend_iface_status = priv->iface_running; 52 | + if (priv->iface_running) 53 | + lbs_stop_iface(priv); 54 | + } else 55 | + ret = lbs_set_host_sleep(priv, 1); 56 | 57 | netif_device_detach(priv->dev); 58 | if (priv->mesh_dev) 59 | @@ -720,11 +726,16 @@ EXPORT_SYMBOL_GPL(lbs_suspend); 60 | 61 | int lbs_resume(struct lbs_private *priv) 62 | { 63 | - int ret; 64 | + int ret = 0; 65 | 66 | lbs_deb_enter(LBS_DEB_FW); 67 | 68 | - ret = lbs_set_host_sleep(priv, 0); 69 | + if (priv->disable_on_suspend) { 70 | + /* Enable card */ 71 | + if (priv->suspend_iface_status) 72 | + lbs_start_iface(priv); 73 | + } else 74 | + ret = lbs_set_host_sleep(priv, 0); 75 | 76 | netif_device_attach(priv->dev); 77 | if (priv->mesh_dev) 78 | @@ -738,9 +749,6 @@ int lbs_resume(struct lbs_private *priv) 79 | "deep sleep activation failed: %d\n", ret); 80 | } 81 | 82 | - if (priv->setup_fw_on_resume) 83 | - ret = lbs_setup_firmware(priv); 84 | - 85 | lbs_deb_leave_args(LBS_DEB_FW, "ret %d", ret); 86 | return ret; 87 | } 88 | -- 89 | 1.7.10.4 90 | 91 | -------------------------------------------------------------------------------- /patches/openwrt/002-hostapd-add-interoperability-workaround-for-80+80-and-160-MHz-channels.patch: -------------------------------------------------------------------------------- 1 | From f9fc9c242fa62c214dc4a92bd89ca9a36bc8308c Mon Sep 17 00:00:00 2001 2 | From: Imre Kaloz 3 | Date: Thu, 13 Oct 2016 12:44:08 +0200 4 | Subject: [PATCH] hostapd: add interoperability workaround for 80+80 and 160 5 | MHz channels 6 | 7 | Signed-off-by: Imre Kaloz 8 | --- 9 | .../patches/700-160mhz_interop_workaround.patch | 48 ++++++++++++++++++++++ 10 | 1 file changed, 48 insertions(+) 11 | create mode 100644 package/network/services/hostapd/patches/700-160mhz_interop_workaround.patch 12 | 13 | diff --git a/package/network/services/hostapd/patches/700-160mhz_interop_workaround.patch b/package/network/services/hostapd/patches/700-160mhz_interop_workaround.patch 14 | new file mode 100644 15 | index 0000000000..75ece9b6cc 16 | --- /dev/null 17 | +++ b/package/network/services/hostapd/patches/700-160mhz_interop_workaround.patch 18 | @@ -0,0 +1,48 @@ 19 | +VHT: Add an interoperability workaround for 80+80 and 160 MHz channels 20 | + 21 | +Number of deployed 80 MHz capable VHT stations that do not support 80+80 22 | +and 160 MHz bandwidths seem to misbehave when trying to connect to an AP 23 | +that advertises 80+80 or 160 MHz channel bandwidth in the VHT Operation 24 | +element. To avoid such issues with deployed devices, modify the design 25 | +based on newly proposed IEEE 802.11 standard changes. 26 | + 27 | +This allows poorly implemented VHT 80 MHz stations to connect with the 28 | +AP in 80 MHz mode. 80+80 and 160 MHz capable stations need to support 29 | +the new workaround mechanism to allow full bandwidth to be used. 30 | +However, there are more or less no impacted station with 80+80/160 31 | +capability deployed. 32 | + 33 | +Signed-off-by: Jouni Malinen 34 | + 35 | +diff --git a/src/ap/ieee802_11_vht.c b/src/ap/ieee802_11_vht.c 36 | +index 3236016..e923094 100644 37 | +--- a/src/ap/ieee802_11_vht.c 38 | ++++ b/src/ap/ieee802_11_vht.c 39 | +@@ -82,6 +82,27 @@ u8 * hostapd_eid_vht_operation(struct hostapd_data *hapd, u8 *eid) 40 | + 41 | + oper->vht_op_info_chwidth = hapd->iconf->vht_oper_chwidth; 42 | + 43 | ++ if (hapd->iconf->vht_oper_chwidth == 2) { 44 | ++ /* 45 | ++ * Convert 160 MHz channel width to new style as interop 46 | ++ * workaround. 47 | ++ */ 48 | ++ oper->vht_op_info_chwidth = 1; 49 | ++ oper->vht_op_info_chan_center_freq_seg1_idx = 50 | ++ oper->vht_op_info_chan_center_freq_seg0_idx; 51 | ++ if (hapd->iconf->channel < 52 | ++ hapd->iconf->vht_oper_centr_freq_seg0_idx) 53 | ++ oper->vht_op_info_chan_center_freq_seg0_idx -= 8; 54 | ++ else 55 | ++ oper->vht_op_info_chan_center_freq_seg0_idx += 8; 56 | ++ } else if (hapd->iconf->vht_oper_chwidth == 3) { 57 | ++ /* 58 | ++ * Convert 80+80 MHz channel width to new style as interop 59 | ++ * workaround. 60 | ++ */ 61 | ++ oper->vht_op_info_chwidth = 1; 62 | ++ } 63 | ++ 64 | + /* VHT Basic MCS set comes from hw */ 65 | + /* Hard code 1 stream, MCS0-7 is a min Basic VHT MCS rates */ 66 | + oper->vht_basic_mcs_set = host_to_le16(0xfffc); 67 | -------------------------------------------------------------------------------- /pxa/image/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2008-2012 OpenWrt.org 3 | # 4 | # This is free software, licensed under the GNU General Public License v2. 5 | # See /LICENSE for more information. 6 | # 7 | include $(TOPDIR)/rules.mk 8 | include $(INCLUDE_DIR)/image.mk 9 | include $(INCLUDE_DIR)/host.mk 10 | 11 | SQUASHFSCOMP:=xz 12 | FLASH_BLOCKSIZE:=64 13 | FLASH_SZ:=128 14 | UBOOT_SZ:=4 15 | UBOOT_ENV_SZ:=1 16 | 17 | define MkuImage 18 | # Tack DTB onto end of kernel zImage 19 | cat $(KDIR)/zImage $(DTS_DIR)/zipit-z2.dtb > $(KDIR_TMP)/zImage-dtb 20 | # Make the uImage 21 | mkimage -A Arm \ 22 | -O linux \ 23 | -C none \ 24 | -T kernel \ 25 | -a 0xA0008000 -e 0xA0008000 \ 26 | -n uImage-dtb -d $(KDIR_TMP)/zImage-dtb $(KDIR_TMP)/uImage 27 | dd if=$(KDIR_TMP)/uImage of=$(BIN_DIR)/$(IMG_PREFIX)-uImage bs=$(FLASH_BLOCKSIZE)k conv=sync 28 | endef 29 | 30 | # Build a fake flash image for usage in Qemu 31 | define Image/Build/Gumstix 32 | dd if=/dev/zero bs=128k count=256 of=$(BIN_DIR)/$(IMG_PREFIX)-$(1)-qemu-flash.img 33 | dd if=$(BIN_DIR)/openwrt-pxa-gumstix-u-boot.bin conv=notrunc bs=128k \ 34 | of=$(BIN_DIR)/$(IMG_PREFIX)-$(1)-qemu-flash.img 35 | dd if=$(KDIR)/root.$(1) conv=notrunc bs=128k seek=2 \ 36 | of=$(BIN_DIR)/$(IMG_PREFIX)-$(1)-qemu-flash.img 37 | dd if=$(KDIR)/uImage conv=notrunc bs=128k seek=248 \ 38 | of=$(BIN_DIR)/$(IMG_PREFIX)-$(1)-qemu-flash.img 39 | endef 40 | 41 | define Image/Build/jffs2-64k 42 | dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img bs=64k conv=sync 43 | endef 44 | 45 | define Image/Build/squashfs 46 | $(call prepare_generic_squashfs,$(KDIR)/root.squashfs) 47 | dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img bs=$(FLASH_BLOCKSIZE)k conv=sync 48 | endef 49 | 50 | define Image/Build/firmware 51 | # Build uImage so we can get closest approximate size for kernel partition 52 | $(call MkuImage) 53 | # Rebuild DTS with our template and updated partition sizes 54 | ./gen_dts.sh $(KDIR) $(BIN_DIR) $(IMG_PREFIX) $(DTS_DIR) $(KDIR_TMP) $(STAGING_DIR_HOST) 55 | $(call Image/BuildDTB,$(DTS_DIR)/zipit-z2.new.dts,$(DTS_DIR)/zipit-z2.dtb) 56 | # Rebuild the uImage with our new DTB 57 | $(call MkuImage) 58 | # Combine everything into one firmware file 59 | cat $(BIN_DIR)/$(IMG_PREFIX)-uImage \ 60 | $(BIN_DIR)/$(IMG_PREFIX)-squashfs.img \ 61 | $(BIN_DIR)/$(IMG_PREFIX)-overlay.jffs2 >$(BIN_DIR)/$(IMG_PREFIX)-firmware.img 62 | # Verify size of firmware to make sure it will fit in flash 63 | $(call check-filesize,$(BIN_DIR)/$(IMG_PREFIX)-firmware.img,8060928) 64 | endef 65 | 66 | # Build tarball with uImage in /boot 67 | define Image/Build/targz 68 | $(CP) $(BIN_DIR)/$(IMG_PREFIX)-uImage $(TARGET_DIR)/boot/uImage 69 | $(call Image/mkfs/targz) 70 | rm $(TARGET_DIR)/boot/uImage 71 | endef 72 | 73 | define check-filesize 74 | @if [ "$$$$(stat -c%s $(1))" -gt $(2) ]; then \ 75 | echo "WARNING: file $(1) is too big!" >&2; \ 76 | exit 1; \ 77 | fi 78 | endef 79 | 80 | define Image/Build 81 | $(call Image/Build/$(1),$(1)) 82 | $(call Image/Build/$(PROFILE),$(1)) 83 | $(call Image/Build/firmware,$(1)) 84 | $(call Image/Build/targz,$(1)) 85 | endef 86 | 87 | $(eval $(call BuildImage)) 88 | -------------------------------------------------------------------------------- /pxa/patches-4.4/0021-pxamci-add-module-paratemers-to-ignore-CRC-errors-an.patch: -------------------------------------------------------------------------------- 1 | From 79fc94df75ab95ebfc6623f50097507d67545aab Mon Sep 17 00:00:00 2001 2 | From: Vasily Khoruzhick 3 | Date: Sun, 21 Feb 2016 18:59:30 -0800 4 | Subject: [PATCH 4/5] pxamci: add module paratemers to ignore CRC errors and 5 | enforce 1bit xfers 6 | 7 | pxamci driver tend to report bogus CRC errors on data xfers, it's possible 8 | to workaround it by forcing 1-bit mode, but it reduces bus bandwidth. 9 | Another option is to ignore CRC errors, but it's not safe. It's up to user 10 | to decide what way he prefers. 11 | 12 | Signed-off-by: Vasily Khoruzhick 13 | --- 14 | drivers/mmc/host/pxamci.c | 32 ++++++++++++++++++++++++++++---- 15 | 1 file changed, 28 insertions(+), 4 deletions(-) 16 | 17 | diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c 18 | index 69e38e3..38dfbf6 100644 19 | --- a/drivers/mmc/host/pxamci.c 20 | +++ b/drivers/mmc/host/pxamci.c 21 | @@ -52,6 +52,14 @@ 22 | #define mmc_has_26MHz() (cpu_is_pxa300() || cpu_is_pxa310() \ 23 | || cpu_is_pxa935()) 24 | 25 | +static bool force_1_bit; 26 | +module_param(force_1_bit, bool, 0644); 27 | +MODULE_PARM_DESC(force_1_bit, "Force 1 bit data transfers."); 28 | + 29 | +static bool ignore_crc_errors; 30 | +module_param(ignore_crc_errors, bool, 0644); 31 | +MODULE_PARM_DESC(ignore_crc_errors, "Ignore CRC errors."); 32 | + 33 | struct pxamci_host { 34 | struct mmc_host *mmc; 35 | spinlock_t lock; 36 | @@ -329,8 +337,9 @@ static int pxamci_cmd_done(struct pxamci_host *host, unsigned int stat) 37 | * A bogus CRC error can appear if the msb of a 136 bit 38 | * response is a one. 39 | */ 40 | - if (cpu_is_pxa27x() && 41 | - (cmd->flags & MMC_RSP_136 && cmd->resp[0] & 0x80000000)) 42 | + if ((cpu_is_pxa27x() && 43 | + (cmd->flags & MMC_RSP_136 && cmd->resp[0] & 0x80000000)) || 44 | + ignore_crc_errors) 45 | pr_debug("ignoring CRC from command %d - *risky*\n", cmd->opcode); 46 | else 47 | cmd->error = -EILSEQ; 48 | @@ -369,8 +378,15 @@ static int pxamci_data_done(struct pxamci_host *host, unsigned int stat) 49 | 50 | if (stat & STAT_READ_TIME_OUT) 51 | data->error = -ETIMEDOUT; 52 | - else if (stat & (STAT_CRC_READ_ERROR|STAT_CRC_WRITE_ERROR)) 53 | - data->error = -EILSEQ; 54 | + else if (stat & (STAT_CRC_READ_ERROR|STAT_CRC_WRITE_ERROR)) { 55 | + if (ignore_crc_errors) 56 | + dev_dbg(mmc_dev(host->mmc), 57 | + "Ignoring data xfer crc error on %s\n", 58 | + data->flags & MMC_DATA_READ ? 59 | + "read" : "write"); 60 | + else 61 | + data->error = -EILSEQ; 62 | + } 63 | 64 | /* 65 | * There appears to be a hardware design bug here. There seems to 66 | @@ -725,6 +741,14 @@ static int pxamci_probe(struct platform_device *pdev) 67 | MMC_CAP_SD_HIGHSPEED; 68 | } 69 | 70 | + if (force_1_bit) { 71 | + dev_warn(mmc_dev(host->mmc), "Forcing 1-bit data transfers\n"); 72 | + mmc->caps &= ~MMC_CAP_4_BIT_DATA; 73 | + } 74 | + 75 | + if (ignore_crc_errors) 76 | + dev_warn(mmc_dev(host->mmc), "Will ignore CRC errors for data xfers\n"); 77 | + 78 | spin_lock_init(&host->lock); 79 | host->res = r; 80 | host->irq = irq; 81 | -- 82 | 2.7.0 83 | 84 | -------------------------------------------------------------------------------- /pxa/patches-4.4/0008-z2-battery-add-DT-initialization-support.patch: -------------------------------------------------------------------------------- 1 | From 5f7bb86d38778b73094809a73882cc486f3a4104 Mon Sep 17 00:00:00 2001 2 | From: Vasily Khoruzhick 3 | Date: Sun, 14 Feb 2016 20:57:40 -0800 4 | Subject: [PATCH 08/19] z2-battery: add DT initialization support 5 | 6 | Signed-off-by: Vasily Khoruzhick 7 | --- 8 | drivers/power/z2_battery.c | 50 +++++++++++++++++++++++++++++++++++++++++--- 9 | 1 file changed, 47 insertions(+), 3 deletions(-) 10 | 11 | diff --git a/drivers/power/z2_battery.c b/drivers/power/z2_battery.c 12 | index b201e3f..97b0a43 100644 13 | --- a/drivers/power/z2_battery.c 14 | +++ b/drivers/power/z2_battery.c 15 | @@ -12,6 +12,8 @@ 16 | #include 17 | #include 18 | #include 19 | +#include 20 | +#include 21 | #include 22 | #include 23 | #include 24 | @@ -182,22 +184,46 @@ static int z2_batt_ps_init(struct z2_charger *charger, int props) 25 | return 0; 26 | } 27 | 28 | +struct z2_battery_info *z2_batt_parse_dt(struct device *dev) 29 | +{ 30 | + struct z2_battery_info *info; 31 | + 32 | + info = devm_kzalloc(dev, sizeof(*info), GFP_KERNEL); 33 | + if (!info) 34 | + return info; 35 | + of_property_read_u32(dev->of_node, "i2c_reg", &info->batt_I2C_reg); 36 | + info->charge_gpio = of_get_named_gpio(dev->of_node, "charge-gpio", 0); 37 | + of_property_read_u32(dev->of_node, "min_voltage", &info->min_voltage); 38 | + of_property_read_u32(dev->of_node, "max_voltage", &info->max_voltage); 39 | + of_property_read_u32(dev->of_node, "batt_div", &info->batt_div); 40 | + of_property_read_u32(dev->of_node, "batt_mult", &info->batt_mult); 41 | + of_property_read_string(dev->of_node, "batt_name", (const char**)&info->batt_name); 42 | + info->batt_tech = POWER_SUPPLY_TECHNOLOGY_LION; 43 | + 44 | + return info; 45 | +} 46 | + 47 | static int z2_batt_probe(struct i2c_client *client, 48 | const struct i2c_device_id *id) 49 | { 50 | int ret = 0; 51 | int props = 1; /* POWER_SUPPLY_PROP_PRESENT */ 52 | struct z2_charger *charger; 53 | + struct device *dev = &client->dev; 54 | struct z2_battery_info *info = client->dev.platform_data; 55 | struct power_supply_config psy_cfg = {}; 56 | 57 | - if (info == NULL) { 58 | + if (!dev->of_node && info == NULL) { 59 | dev_err(&client->dev, 60 | "Please set platform device platform_data" 61 | " to a valid z2_battery_info pointer!\n"); 62 | return -EINVAL; 63 | } 64 | 65 | + /* Parse properties from DT */ 66 | + if (dev->of_node) 67 | + info = z2_batt_parse_dt(dev); 68 | + 69 | charger = kzalloc(sizeof(*charger), GFP_KERNEL); 70 | if (charger == NULL) 71 | return -ENOMEM; 72 | @@ -210,7 +236,12 @@ static int z2_batt_probe(struct i2c_client *client, 73 | 74 | mutex_init(&charger->work_lock); 75 | 76 | - if (info->charge_gpio >= 0 && gpio_is_valid(info->charge_gpio)) { 77 | + if (!charger->info) { 78 | + ret = -ENOMEM; 79 | + goto err; 80 | + } 81 | + 82 | + if (info->charge_gpio >= 0) { 83 | ret = gpio_request(info->charge_gpio, "BATT CHRG"); 84 | if (ret) 85 | goto err; 86 | @@ -314,11 +345,24 @@ static const struct i2c_device_id z2_batt_id[] = { 87 | }; 88 | MODULE_DEVICE_TABLE(i2c, z2_batt_id); 89 | 90 | +#ifdef CONFIG_OF 91 | +static const struct of_device_id z2_batt_of_match[] = { 92 | + { .compatible = "aer915", }, 93 | + { }, 94 | +}; 95 | +MODULE_DEVICE_TABLE(of, z2_batt_of_match); 96 | +#else 97 | +static const struct of_device_id z2_batt_of_match[] = { 98 | + { }, 99 | +}; 100 | +#endif 101 | + 102 | static struct i2c_driver z2_batt_driver = { 103 | .driver = { 104 | .name = "z2-battery", 105 | .owner = THIS_MODULE, 106 | - .pm = Z2_BATTERY_PM_OPS 107 | + .pm = Z2_BATTERY_PM_OPS, 108 | + .of_match_table = of_match_ptr(z2_batt_of_match), 109 | }, 110 | .probe = z2_batt_probe, 111 | .remove = z2_batt_remove, 112 | -- 113 | 1.7.10.4 114 | 115 | -------------------------------------------------------------------------------- /pxa/modules.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2013-2016 OpenWrt.org 3 | # 4 | # This is free software, licensed under the GNU General Public License v2. 5 | # See /LICENSE for more information. 6 | 7 | define KernelPackage/sound-zipit-z2 8 | SUBMENU:=Sound Support 9 | TITLE:=Zipit Z2 Sound Support 10 | KCONFIG:= \ 11 | CONFIG_SND_PXA2XX_SOC=m \ 12 | CONFIG_SND_PXA2XX_SOC_I2S=m \ 13 | CONFIG_SND_PXA2XX_AC97=n \ 14 | CONFIG_SND_PXA2XX_SOC_Z2=n \ 15 | CONFIG_SND_SIMPLE_CARD \ 16 | CONFIG_SND_SOC_WM8750 17 | FILES:= \ 18 | $(LINUX_DIR)/sound/core/snd-pcm-dmaengine.ko \ 19 | $(LINUX_DIR)/sound/arm/snd-pxa2xx-lib.ko \ 20 | $(LINUX_DIR)/sound/soc/pxa/snd-soc-pxa2xx.ko \ 21 | $(LINUX_DIR)/sound/soc/pxa/snd-soc-pxa2xx-i2s.ko \ 22 | $(LINUX_DIR)/sound/soc/generic/snd-soc-simple-card.ko \ 23 | $(LINUX_DIR)/sound/soc/codecs/snd-soc-wm8750.ko 24 | AUTOLOAD:=$(call AutoLoad,60,snd-pcm-dmaengine snd-pxa2xx-lib snd-soc-pxa2xx snd-soc-pxa2xx-i2s snd-soc-wm8750 snd-soc-simple-card) 25 | DEPENDS:=@TARGET_pxa_ZipitZ2 +kmod-sound-core +kmod-sound-soc-core 26 | $(call AddDepends/sound) 27 | endef 28 | 29 | define KernelPackage/sound-zipit-z2/description 30 | Sound support for Zipit Z2 31 | endef 32 | 33 | $(eval $(call KernelPackage,sound-zipit-z2)) 34 | 35 | define KernelPackage/cpufreq-conservative 36 | SUBMENU:=Other modules 37 | TITLE:=CPUFreq conservative governor 38 | KCONFIG:=CONFIG_CPU_FREQ_GOV_CONSERVATIVE 39 | FILES:=$(LINUX_DIR)/drivers/cpufreq/cpufreq_conservative.ko 40 | AUTOLOAD:=$(call AutoProbe,cpufreq_conservative) 41 | endef 42 | 43 | define KernelPackage/cpufreq-conservative/description 44 | Conservative CPU Frequency Governor 45 | endef 46 | 47 | $(eval $(call KernelPackage,cpufreq-conservative)) 48 | 49 | define KernelPackage/usb-ohci-pxa27x 50 | SUBMENU:=USB Support 51 | TITLE:=PXA27x USB OHCI (Host) Support 52 | KCONFIG:= \ 53 | CONFIG_USB_OHCI_HCD=m \ 54 | CONFIG_USB_OHCI_HCD_PXA27X=m 55 | FILES:=$(LINUX_DIR)/drivers/usb/host/ohci-pxa27x.ko 56 | AUTOLOAD:=$(call AutoLoad,60,ohci-pxa27x) 57 | DEPENDS:=@TARGET_pxa +kmod-usb-ohci 58 | $(call AddDepends/usb) 59 | endef 60 | 61 | define KernelPackage/usb-ohci-pxa27x/description 62 | USB Host support for PXA27x 63 | endef 64 | 65 | $(eval $(call KernelPackage,usb-ohci-pxa27x)) 66 | 67 | define KernelPackage/fancy-beeper 68 | SUBMENU:=Other modules 69 | TITLE:=Fancy Beeper Device 70 | KCONFIG:=CONFIG_FANCY_BEEP=m 71 | FILES:=$(LINUX_DIR)/drivers/char/beep.ko 72 | AUTOLOAD:=$(call AutoLoad,60,beep) 73 | DEPENDS:=@TARGET_pxa 74 | endef 75 | 76 | define KernelPackage/fancy-beeper/description 77 | Fancy Beeper Char Device 78 | endef 79 | 80 | $(eval $(call KernelPackage,fancy-beeper)) 81 | 82 | define KernelPackage/soc-camera 83 | SUBMENU:=$(VIDEO_MENU) 84 | TITLE:=SOC Camera Support 85 | KCONFIG:= \ 86 | CONFIG_SOC_CAMERA \ 87 | CONFIG_SOC_CAMERA_PLATFORM \ 88 | CONFIG_SOC_CAMERA_IMX074 \ 89 | CONFIG_SOC_CAMERA_MT9M001 \ 90 | CONFIG_SOC_CAMERA_MT9M111 \ 91 | CONFIG_SOC_CAMERA_MT9T031 \ 92 | CONFIG_SOC_CAMERA_MT9T112 \ 93 | CONFIG_SOC_CAMERA_MT9V022 \ 94 | CONFIG_SOC_CAMERA_OV5642 \ 95 | CONFIG_SOC_CAMERA_OV6650 \ 96 | CONFIG_SOC_CAMERA_OV772X \ 97 | CONFIG_SOC_CAMERA_OV9640 \ 98 | CONFIG_SOC_CAMERA_OV9740 \ 99 | CONFIG_SOC_CAMERA_RJ54N1 \ 100 | CONFIG_SOC_CAMERA_TW9910 101 | FILES:= \ 102 | $(LINUX_DIR)/drivers/media/v4l2-core/videobuf-core.ko \ 103 | $(LINUX_DIR)/drivers/media/platform/soc_camera/soc_camera.ko \ 104 | $(LINUX_DIR)/drivers/media/platform/soc_camera/soc_mediabus.ko 105 | AUTOLOAD:=$(call AutoLoad,65,videobuf-core soc_mediabus soc_camera) 106 | # Dirty Fix: kmod-video-uvc isn't actually required, but videobuf2 package 107 | # won't build without a driver that requires CONFIG_VIDEOBUF2_MEMOPS 108 | DEPENDS:=+kmod-i2c-core +kmod-video-videobuf2 +kmod-video-uvc 109 | $(call AddDepends/camera) 110 | endef 111 | 112 | define KernelPackage/soc-camera/description 113 | SOC Camera Support 114 | endef 115 | 116 | $(eval $(call KernelPackage,soc-camera)) 117 | 118 | define KernelPackage/pxa-camera 119 | SUBMENU:=$(VIDEO_MENU) 120 | TITLE:=PXA27x Camera Support 121 | KCONFIG:= \ 122 | CONFIG_VIDEOBUF_DMA_SG \ 123 | CONFIG_VIDEO_PXA27x 124 | FILES:= \ 125 | $(LINUX_DIR)/drivers/media/v4l2-core/videobuf-dma-sg.ko \ 126 | $(LINUX_DIR)/drivers/media/platform/soc_camera/pxa_camera.ko 127 | AUTOLOAD:=$(call AutoLoad,70,pxa-camera videobuf-dma-sg) 128 | DEPENDS:=@TARGET_pxa kmod-soc-camera 129 | endef 130 | 131 | define KernelPackage/pxa-camera/description 132 | PXA27x Camera Support 133 | endef 134 | 135 | $(eval $(call KernelPackage,pxa-camera)) 136 | 137 | define KernelPackage/ov2640-camera 138 | SUBMENU:=$(VIDEO_MENU) 139 | TITLE:=ov2640 Camera Support 140 | KCONFIG:=CONFIG_SOC_CAMERA_OV2640 141 | FILES:=$(LINUX_DIR)/drivers/media/i2c/soc_camera/ov2640.ko 142 | AUTOLOAD:=$(call AutoLoad,75,ov2640) 143 | DEPENDS:=kmod-soc-camera 144 | endef 145 | 146 | define KernelPackage/ov2640-camera/description 147 | ov2640 Camera Support 148 | endef 149 | 150 | $(eval $(call KernelPackage,ov2640-camera)) 151 | -------------------------------------------------------------------------------- /pxa/patches-4.4/0003-libertas-implement-if_spi-runtime-power-management.patch: -------------------------------------------------------------------------------- 1 | From bd009c176f559ea3aa238a00c7a23a9f3e4f3a0d Mon Sep 17 00:00:00 2001 2 | From: Vasily Khoruzhick 3 | Date: Tue, 2 Aug 2011 11:48:27 +0300 4 | Subject: [PATCH 03/19] libertas: implement if_spi runtime power management 5 | 6 | The SPI card is now fully powered down when the network 7 | interface is brought down. 8 | 9 | Signed-off-by: Vasily Khoruzhick 10 | --- 11 | drivers/net/wireless/libertas/if_spi.c | 80 ++++++++++++++++++-------------- 12 | 1 file changed, 44 insertions(+), 36 deletions(-) 13 | 14 | diff --git a/drivers/net/wireless/libertas/if_spi.c b/drivers/net/wireless/libertas/if_spi.c 15 | index 1644222..3a3033a 100644 16 | --- a/drivers/net/wireless/libertas/if_spi.c 17 | +++ b/drivers/net/wireless/libertas/if_spi.c 18 | @@ -1104,21 +1104,39 @@ static void if_spi_resume_worker(struct work_struct *work) 19 | card = container_of(work, struct if_spi_card, resume_work); 20 | 21 | if (card->suspended) { 22 | - if (card->pdata->setup) 23 | - card->pdata->setup(card->spi); 24 | - 25 | - /* Init card ... */ 26 | - if_spi_init_card(card); 27 | - 28 | - enable_irq(card->spi->irq); 29 | - 30 | - /* And resume it ... */ 31 | lbs_resume(card->priv); 32 | 33 | card->suspended = 0; 34 | } 35 | } 36 | 37 | +static int if_spi_power_save(struct lbs_private *priv) 38 | +{ 39 | + struct if_spi_card *card = priv->card; 40 | + 41 | + flush_workqueue(card->workqueue); 42 | + disable_irq(card->spi->irq); 43 | + card->pdata->teardown(card->spi); 44 | + priv->fw_ready = 0; 45 | + 46 | + return 0; 47 | +} 48 | + 49 | +static int if_spi_power_restore(struct lbs_private *priv) 50 | +{ 51 | + struct if_spi_card *card = priv->card; 52 | + int ret; 53 | + 54 | + card->pdata->setup(card->spi); 55 | + ret = if_spi_init_card(card); 56 | + if (ret) 57 | + return ret; 58 | + enable_irq(card->spi->irq); 59 | + priv->fw_ready = 1; 60 | + 61 | + return 0; 62 | +} 63 | + 64 | static int if_spi_probe(struct spi_device *spi) 65 | { 66 | struct if_spi_card *card; 67 | @@ -1133,17 +1151,11 @@ static int if_spi_probe(struct spi_device *spi) 68 | goto out; 69 | } 70 | 71 | - if (pdata->setup) { 72 | - err = pdata->setup(spi); 73 | - if (err) 74 | - goto out; 75 | - } 76 | - 77 | /* Allocate card structure to represent this specific device */ 78 | card = kzalloc(sizeof(struct if_spi_card), GFP_KERNEL); 79 | if (!card) { 80 | err = -ENOMEM; 81 | - goto teardown; 82 | + goto out; 83 | } 84 | spi_set_drvdata(spi, card); 85 | card->pdata = pdata; 86 | @@ -1154,13 +1166,6 @@ static int if_spi_probe(struct spi_device *spi) 87 | INIT_LIST_HEAD(&card->data_packet_list); 88 | spin_lock_init(&card->buffer_lock); 89 | 90 | - /* Initialize the SPI Interface Unit */ 91 | - 92 | - /* Firmware load */ 93 | - err = if_spi_init_card(card); 94 | - if (err) 95 | - goto free_card; 96 | - 97 | /* 98 | * Register our card with libertas. 99 | * This will call alloc_etherdev. 100 | @@ -1171,13 +1176,16 @@ static int if_spi_probe(struct spi_device *spi) 101 | goto free_card; 102 | } 103 | card->priv = priv; 104 | - priv->setup_fw_on_resume = 1; 105 | priv->card = card; 106 | priv->hw_host_to_card = if_spi_host_to_card; 107 | + if (pdata->setup && pdata->teardown) { 108 | + priv->power_save = if_spi_power_save; 109 | + priv->power_restore = if_spi_power_restore; 110 | + } 111 | priv->enter_deep_sleep = NULL; 112 | priv->exit_deep_sleep = NULL; 113 | priv->reset_deep_sleep_wakeup = NULL; 114 | - priv->fw_ready = 1; 115 | + priv->disable_on_suspend = 1; 116 | 117 | /* Initialize interrupt handling stuff. */ 118 | card->workqueue = create_workqueue("libertas_spi"); 119 | @@ -1191,6 +1199,13 @@ static int if_spi_probe(struct spi_device *spi) 120 | goto terminate_workqueue; 121 | } 122 | 123 | + /* Disable IRQ, hw is not ready yet */ 124 | + disable_irq(spi->irq); 125 | + 126 | + err = if_spi_power_restore(priv); 127 | + if (err) 128 | + goto release_irq; 129 | + 130 | /* 131 | * Start the card. 132 | * This will call register_netdev, and we'll start 133 | @@ -1198,13 +1213,16 @@ static int if_spi_probe(struct spi_device *spi) 134 | */ 135 | err = lbs_start_card(priv); 136 | if (err) 137 | - goto release_irq; 138 | + goto teardown; 139 | + if_spi_power_save(priv); 140 | 141 | lbs_deb_spi("Finished initializing WLAN module.\n"); 142 | 143 | /* successful exit */ 144 | goto out; 145 | 146 | +teardown: 147 | + if_spi_power_save(priv); 148 | release_irq: 149 | free_irq(spi->irq, card); 150 | terminate_workqueue: 151 | @@ -1213,9 +1231,6 @@ terminate_workqueue: 152 | lbs_remove_card(priv); /* will call free_netdev */ 153 | free_card: 154 | free_if_spi_card(card); 155 | -teardown: 156 | - if (pdata->teardown) 157 | - pdata->teardown(spi); 158 | out: 159 | lbs_deb_leave_args(LBS_DEB_SPI, "err %d\n", err); 160 | return err; 161 | @@ -1238,8 +1253,6 @@ static int libertas_spi_remove(struct spi_device *spi) 162 | cancel_work_sync(&card->packet_work); 163 | flush_workqueue(card->workqueue); 164 | destroy_workqueue(card->workqueue); 165 | - if (card->pdata->teardown) 166 | - card->pdata->teardown(spi); 167 | free_if_spi_card(card); 168 | lbs_deb_leave(LBS_DEB_SPI); 169 | return 0; 170 | @@ -1252,11 +1265,6 @@ static int if_spi_suspend(struct device *dev) 171 | 172 | if (!card->suspended) { 173 | lbs_suspend(card->priv); 174 | - flush_workqueue(card->workqueue); 175 | - disable_irq(spi->irq); 176 | - 177 | - if (card->pdata->teardown) 178 | - card->pdata->teardown(spi); 179 | card->suspended = 1; 180 | } 181 | 182 | -- 183 | 1.7.10.4 184 | 185 | -------------------------------------------------------------------------------- /pxa/patches-4.4/0006-pxa27x_udc-add-ability-to-work-without-D-gpio-and-us.patch: -------------------------------------------------------------------------------- 1 | From 6e2e243d83207122a9a36cd5cda23eb6e004f270 Mon Sep 17 00:00:00 2001 2 | From: Vasily Khoruzhick 3 | Date: Tue, 16 Feb 2016 19:57:26 -0800 4 | Subject: [PATCH 06/19] pxa27x_udc: add ability to work without D+ gpio and 5 | usb_mode switch 6 | 7 | Signed-off-by: Vasily Khoruzhick 8 | --- 9 | drivers/usb/gadget/udc/pxa27x_udc.c | 96 +++++++++++++++++++++++++++++++++-- 10 | 1 file changed, 91 insertions(+), 5 deletions(-) 11 | 12 | diff --git a/drivers/usb/gadget/udc/pxa27x_udc.c b/drivers/usb/gadget/udc/pxa27x_udc.c 13 | index 1ecf6e5..4c74a7f 100644 14 | --- a/drivers/usb/gadget/udc/pxa27x_udc.c 15 | +++ b/drivers/usb/gadget/udc/pxa27x_udc.c 16 | @@ -1406,6 +1406,7 @@ static int pxa_ep_enable(struct usb_ep *_ep, 17 | return -EINVAL; 18 | 19 | udc_usb_ep = container_of(_ep, struct udc_usb_ep, usb_ep); 20 | + 21 | if (udc_usb_ep->pxa_ep) { 22 | ep = udc_usb_ep->pxa_ep; 23 | ep_warn(ep, "usb_ep %s already enabled, doing nothing\n", 24 | @@ -1513,6 +1514,15 @@ static void dplus_pullup(struct pxa_udc *udc, int on) 25 | udc->udc_command(PXA2XX_UDC_CMD_CONNECT); 26 | else 27 | udc->udc_command(PXA2XX_UDC_CMD_DISCONNECT); 28 | + } else { 29 | + u32 v = udc_readl(udc, UP2OCR); 30 | + if (on) 31 | + v |= UP2OCR_DPPUE; 32 | + else 33 | + v &= ~(UP2OCR_DPPUE); 34 | + /* change D+ only if port is switch to device mode */ 35 | + if (!(v & UP2OCR_HXS)) 36 | + udc_writel(udc, UP2OCR, v); 37 | } 38 | udc->pullup_on = on; 39 | } 40 | @@ -1603,9 +1613,6 @@ static int pxa_udc_pullup(struct usb_gadget *_gadget, int is_active) 41 | { 42 | struct pxa_udc *udc = to_gadget_udc(_gadget); 43 | 44 | - if (!udc->gpiod && !udc->udc_command) 45 | - return -EOPNOTSUPP; 46 | - 47 | dplus_pullup(udc, is_active); 48 | 49 | if (should_enable_udc(udc)) 50 | @@ -1697,6 +1704,7 @@ static void udc_disable(struct pxa_udc *udc) 51 | 52 | ep0_idle(udc); 53 | udc->gadget.speed = USB_SPEED_UNKNOWN; 54 | + 55 | clk_disable(udc->clk); 56 | 57 | udc->enabled = 0; 58 | @@ -1806,6 +1814,7 @@ static int pxa27x_udc_start(struct usb_gadget *g, 59 | 60 | /* first hook up the driver ... */ 61 | udc->driver = driver; 62 | + dplus_pullup(udc, 1); 63 | 64 | if (!IS_ERR_OR_NULL(udc->transceiver)) { 65 | retval = otg_set_peripheral(udc->transceiver->otg, 66 | @@ -1858,6 +1867,7 @@ static int pxa27x_udc_stop(struct usb_gadget *g) 67 | 68 | stop_activity(udc, NULL); 69 | udc_disable(udc); 70 | + dplus_pullup(udc, 0); 71 | 72 | udc->driver = NULL; 73 | 74 | @@ -2395,6 +2405,65 @@ static struct pxa_udc memory = { 75 | } 76 | }; 77 | 78 | +static ssize_t usb_mode_show(struct device *dev, struct device_attribute *attr, 79 | + char *buf) 80 | +{ 81 | + struct pxa_udc *udc = dev_get_drvdata(dev); 82 | + 83 | + if (udc_readl(udc, UP2OCR) & UP2OCR_HXS) 84 | + return sprintf(buf, "host\n"); 85 | + else 86 | + return sprintf(buf, "device\n"); 87 | +} 88 | + 89 | +static ssize_t usb_mode_set(struct device *dev, struct device_attribute *attr, 90 | + const char *buf, size_t count) 91 | +{ 92 | + u32 v; 93 | + struct pxa_udc *udc = dev_get_drvdata(dev); 94 | + 95 | + if (strncmp(buf, "host", min(count, (size_t)4)) == 0) { 96 | + v = udc_readl(udc, UP2OCR); 97 | + /* Enable D+ and D- pull down, 98 | + Transceiver output select = 1 -> Host 99 | + */ 100 | + v |= (UP2OCR_HXS |UP2OCR_DPPDE | UP2OCR_DMPDE); 101 | + /* Disable D+ pull up */ 102 | + v &= ~(UP2OCR_DPPUE); 103 | + /* Enable transceiver */ 104 | + v |= UP2OCR_HXOE;; 105 | + udc_writel(udc, UP2OCR, v); 106 | + 107 | + return count; 108 | + } else if (strncmp(buf, "device", min(count, (size_t)6)) == 0) { 109 | + v = udc_readl(udc, UP2OCR); 110 | + /* Disable D+ and D- pull down, 111 | + Transceiver output select = 0 -> UDC 112 | + */ 113 | + v &= ~(UP2OCR_HXS |UP2OCR_DPPDE | UP2OCR_DMPDE); 114 | + /* Enable transceiver */ 115 | + v |= UP2OCR_HXOE; 116 | + /* Enable D+ pull up if necessary */ 117 | + if (udc->pullup_on) 118 | + v |= UP2OCR_DPPUE; 119 | + udc_writel(udc, UP2OCR, v); 120 | + 121 | + return count; 122 | + } 123 | + return -EINVAL; 124 | +} 125 | + 126 | +static DEVICE_ATTR(usb_mode, 0644, usb_mode_show, usb_mode_set); 127 | + 128 | +static const struct attribute *attrs[] = { 129 | + &dev_attr_usb_mode.attr, 130 | + NULL, 131 | +}; 132 | + 133 | +static const struct attribute_group attr_group = { 134 | + .attrs = (struct attribute **)attrs, 135 | +}; 136 | + 137 | #if defined(CONFIG_OF) 138 | static const struct of_device_id udc_pxa_dt_ids[] = { 139 | { .compatible = "marvell,pxa270-udc" }, 140 | @@ -2417,6 +2486,7 @@ static int pxa_udc_probe(struct platform_device *pdev) 141 | int retval = 0, gpio; 142 | struct pxa2xx_udc_mach_info *mach = dev_get_platdata(&pdev->dev); 143 | unsigned long gpio_flags; 144 | + u32 v; 145 | 146 | if (mach) { 147 | gpio_flags = mach->gpio_pullup_inverted ? GPIOF_ACTIVE_LOW : 0; 148 | @@ -2446,9 +2516,9 @@ static int pxa_udc_probe(struct platform_device *pdev) 149 | udc->transceiver = usb_get_phy(USB_PHY_TYPE_USB2); 150 | 151 | if (IS_ERR(udc->gpiod)) { 152 | - dev_err(&pdev->dev, "Couldn't find or request D+ gpio : %ld\n", 153 | + dev_warn(&pdev->dev, "Couldn't find or request D+ gpio : %ld, using UP2OCR\n", 154 | PTR_ERR(udc->gpiod)); 155 | - return PTR_ERR(udc->gpiod); 156 | + udc->gpiod = NULL; 157 | } 158 | if (udc->gpiod) 159 | gpiod_direction_output(udc->gpiod, 0); 160 | @@ -2480,7 +2550,22 @@ static int pxa_udc_probe(struct platform_device *pdev) 161 | if (retval) 162 | goto err; 163 | 164 | + retval = sysfs_create_group(&pdev->dev.kobj, &attr_group); 165 | + if (retval) 166 | + goto err; 167 | + 168 | pxa_init_debugfs(udc); 169 | + 170 | + /* Switch to device mode by default */ 171 | + v = udc_readl(udc, UP2OCR); 172 | + /* Disable D+ and D- pull down, 173 | + Transceiver output select = 0 -> UDC 174 | + */ 175 | + v &= ~(UP2OCR_HXS |UP2OCR_DPPDE | UP2OCR_DMPDE); 176 | + /* Enable transceiver */ 177 | + v |= UP2OCR_HXOE; 178 | + udc_writel(udc, UP2OCR, v); 179 | + 180 | if (should_enable_udc(udc)) 181 | udc_enable(udc); 182 | return 0; 183 | @@ -2499,6 +2584,7 @@ static int pxa_udc_remove(struct platform_device *_dev) 184 | 185 | usb_del_gadget_udc(&udc->gadget); 186 | pxa_cleanup_debugfs(udc); 187 | + sysfs_remove_group(&_dev->dev.kobj, &attr_group); 188 | 189 | usb_put_phy(udc->transceiver); 190 | 191 | -- 192 | 1.7.10.4 193 | 194 | -------------------------------------------------------------------------------- /pxa/patches-4.4/0020-z2-battery-get-charging-status-from-bq24035-via-gpio.patch: -------------------------------------------------------------------------------- 1 | From 1cd96e2f472f7eb532259f9fb0647d8e194a7e96 Mon Sep 17 00:00:00 2001 2 | From: Joseph Honold 3 | Date: Sun, 21 Feb 2016 14:48:36 -0600 4 | Subject: [PATCH] z2-battery: get charging status from bq24035 via gpio 5 | 6 | Signed-off-by: Joseph Honold 7 | --- 8 | arch/arm/boot/dts/zipit-z2.dts | 2 ++ 9 | drivers/power/z2_battery.c | 75 +++++++++++++++++++++++++++++------------- 10 | include/linux/z2_battery.h | 2 ++ 11 | 3 files changed, 56 insertions(+), 23 deletions(-) 12 | 13 | diff --git a/arch/arm/boot/dts/zipit-z2.dts b/arch/arm/boot/dts/zipit-z2.dts 14 | index df8ec4d..1823921 100644 15 | --- a/arch/arm/boot/dts/zipit-z2.dts 16 | +++ b/arch/arm/boot/dts/zipit-z2.dts 17 | @@ -103,6 +103,8 @@ 18 | compatible = "aer915"; 19 | reg = <0x55>; 20 | charge-gpio = <&gpio 0 GPIO_ACTIVE_LOW>; 21 | + charge-stat-1 = <&gpio 99 GPIO_OPEN_DRAIN>; 22 | + charge-stat-2 = <&gpio 95 GPIO_OPEN_DRAIN>; 23 | i2c_reg = <2>; 24 | min_voltage = <3475000>; 25 | max_voltage = <4190000>; 26 | diff --git a/drivers/power/z2_battery.c b/drivers/power/z2_battery.c 27 | index 97b0a43..ed43b75 100644 28 | --- a/drivers/power/z2_battery.c 29 | +++ b/drivers/power/z2_battery.c 30 | @@ -94,18 +94,30 @@ static void z2_batt_ext_power_changed(struct power_supply *batt_ps) 31 | 32 | static void z2_batt_update(struct z2_charger *charger) 33 | { 34 | - int old_status = charger->bat_status; 35 | + int old_status = charger->bat_status, val1 = 1, val2 = 1; 36 | struct z2_battery_info *info; 37 | 38 | info = charger->info; 39 | 40 | mutex_lock(&charger->work_lock); 41 | 42 | - charger->bat_status = (info->charge_gpio >= 0) ? 43 | - (gpio_get_value(info->charge_gpio) ? 44 | - POWER_SUPPLY_STATUS_CHARGING : 45 | - POWER_SUPPLY_STATUS_DISCHARGING) : 46 | - POWER_SUPPLY_STATUS_UNKNOWN; 47 | + if (info->charge_stat_1 >= 0 && info->charge_stat_2 >= 0){ 48 | + val1 = gpio_get_value(info->charge_stat_1); 49 | + val2 = gpio_get_value(info->charge_stat_2); 50 | + 51 | + if (val1 == 0 && val2 == 0){ 52 | + charger->bat_status = POWER_SUPPLY_STATUS_CHARGING; 53 | + } 54 | + else if (val1 == 0 && val2 == 1){ 55 | + charger->bat_status = POWER_SUPPLY_STATUS_CHARGING; 56 | + } 57 | + else if (val1 == 1 && val2 == 0){ 58 | + charger->bat_status = POWER_SUPPLY_STATUS_FULL; 59 | + } 60 | + else{ 61 | + charger->bat_status = POWER_SUPPLY_STATUS_DISCHARGING; 62 | + } 63 | + } 64 | 65 | if (old_status != charger->bat_status) { 66 | pr_debug("%s: %i -> %i\n", charger->batt_ps->desc->name, 67 | @@ -193,6 +205,8 @@ struct z2_battery_info *z2_batt_parse_dt(struct device *dev) 68 | return info; 69 | of_property_read_u32(dev->of_node, "i2c_reg", &info->batt_I2C_reg); 70 | info->charge_gpio = of_get_named_gpio(dev->of_node, "charge-gpio", 0); 71 | + info->charge_stat_1 = of_get_named_gpio(dev->of_node, "charge-stat-1", 0); 72 | + info->charge_stat_2 = of_get_named_gpio(dev->of_node, "charge-stat-2", 0); 73 | of_property_read_u32(dev->of_node, "min_voltage", &info->min_voltage); 74 | of_property_read_u32(dev->of_node, "max_voltage", &info->max_voltage); 75 | of_property_read_u32(dev->of_node, "batt_div", &info->batt_div); 76 | @@ -206,7 +220,7 @@ struct z2_battery_info *z2_batt_parse_dt(struct device *dev) 77 | static int z2_batt_probe(struct i2c_client *client, 78 | const struct i2c_device_id *id) 79 | { 80 | - int ret = 0; 81 | + int ret = 0, ret1 = 0, ret2 = 0; 82 | int props = 1; /* POWER_SUPPLY_PROP_PRESENT */ 83 | struct z2_charger *charger; 84 | struct device *dev = &client->dev; 85 | @@ -241,21 +255,28 @@ static int z2_batt_probe(struct i2c_client *client, 86 | goto err; 87 | } 88 | 89 | - if (info->charge_gpio >= 0) { 90 | - ret = gpio_request(info->charge_gpio, "BATT CHRG"); 91 | - if (ret) 92 | + if (info->charge_stat_1 >= 0 && info->charge_stat_2 >= 0) { 93 | + ret1 = gpio_request(info->charge_stat_1, "BATT STAT 1"); 94 | + ret2 = gpio_request(info->charge_stat_2, "BATT STAT 2"); 95 | + if (ret1 || ret2) 96 | goto err; 97 | 98 | - ret = gpio_direction_input(info->charge_gpio); 99 | - if (ret) 100 | + ret1 = gpio_direction_input(info->charge_stat_1); 101 | + ret2 = gpio_direction_input(info->charge_stat_2); 102 | + if (ret1 || ret2) 103 | goto err2; 104 | 105 | - irq_set_irq_type(gpio_to_irq(info->charge_gpio), 106 | + irq_set_irq_type(gpio_to_irq(info->charge_stat_1), 107 | + IRQ_TYPE_EDGE_BOTH); 108 | + ret1 = request_irq(gpio_to_irq(info->charge_stat_1), 109 | + z2_charge_switch_irq, 0, 110 | + "Charge Status GPIO 1", charger); 111 | + irq_set_irq_type(gpio_to_irq(info->charge_stat_2), 112 | IRQ_TYPE_EDGE_BOTH); 113 | - ret = request_irq(gpio_to_irq(info->charge_gpio), 114 | + ret2 = request_irq(gpio_to_irq(info->charge_stat_2), 115 | z2_charge_switch_irq, 0, 116 | - "AC Detect", charger); 117 | - if (ret) 118 | + "Charge Status GPIO 2", charger); 119 | + if (ret1 || ret2) 120 | goto err3; 121 | } 122 | 123 | @@ -280,11 +301,15 @@ static int z2_batt_probe(struct i2c_client *client, 124 | err4: 125 | kfree(charger->batt_ps_desc.properties); 126 | err3: 127 | - if (info->charge_gpio >= 0 && gpio_is_valid(info->charge_gpio)) 128 | - free_irq(gpio_to_irq(info->charge_gpio), charger); 129 | + if (info->charge_stat_1 >= 0 && gpio_is_valid(info->charge_stat_1)) 130 | + free_irq(gpio_to_irq(info->charge_stat_1), charger); 131 | + if (info->charge_stat_2 >= 0 && gpio_is_valid(info->charge_stat_2)) 132 | + free_irq(gpio_to_irq(info->charge_stat_2), charger); 133 | err2: 134 | - if (info->charge_gpio >= 0 && gpio_is_valid(info->charge_gpio)) 135 | - gpio_free(info->charge_gpio); 136 | + if (info->charge_stat_1 >= 0 && gpio_is_valid(info->charge_stat_1)) 137 | + gpio_free(info->charge_stat_1); 138 | + if (info->charge_stat_2 >= 0 && gpio_is_valid(info->charge_stat_2)) 139 | + gpio_free(info->charge_stat_2); 140 | err: 141 | kfree(charger); 142 | return ret; 143 | @@ -299,9 +324,13 @@ static int z2_batt_remove(struct i2c_client *client) 144 | power_supply_unregister(charger->batt_ps); 145 | 146 | kfree(charger->batt_ps_desc.properties); 147 | - if (info->charge_gpio >= 0 && gpio_is_valid(info->charge_gpio)) { 148 | - free_irq(gpio_to_irq(info->charge_gpio), charger); 149 | - gpio_free(info->charge_gpio); 150 | + if (info->charge_stat_1 >= 0 && gpio_is_valid(info->charge_stat_1)) { 151 | + free_irq(gpio_to_irq(info->charge_stat_1), charger); 152 | + gpio_free(info->charge_stat_1); 153 | + } 154 | + if (info->charge_stat_2 >= 0 && gpio_is_valid(info->charge_stat_2)) { 155 | + free_irq(gpio_to_irq(info->charge_stat_2), charger); 156 | + gpio_free(info->charge_stat_2); 157 | } 158 | 159 | kfree(charger); 160 | diff --git a/include/linux/z2_battery.h b/include/linux/z2_battery.h 161 | index 7b97504..e979b74 100644 162 | --- a/include/linux/z2_battery.h 163 | +++ b/include/linux/z2_battery.h 164 | @@ -6,6 +6,8 @@ struct z2_battery_info { 165 | int batt_I2C_addr; 166 | int batt_I2C_reg; 167 | int charge_gpio; 168 | + int charge_stat_1; 169 | + int charge_stat_2; 170 | int min_voltage; 171 | int max_voltage; 172 | int batt_div; 173 | -- 174 | 2.7.0 175 | 176 | -------------------------------------------------------------------------------- /pxa/patches-4.4/0024-Add-fancy-beep-module.patch: -------------------------------------------------------------------------------- 1 | From c0ff547f59fc4b90c1f7e001d65363a1f08f74f3 Mon Sep 17 00:00:00 2001 2 | From: Joseph Honold 3 | Date: Sat, 26 Mar 2016 16:57:45 -0500 4 | Subject: [PATCH] Add fancy beep module. 5 | 6 | The fancy beeper kernel module is a device driver that allows you to 7 | replace the PC speaker beep with a userspace daemon that will perform 8 | an action of your choice. The main use of this is to play a sound file 9 | in place of the system beep, but you can write a beeper daemon to do 10 | anything you want it to. 11 | --- 12 | drivers/char/Kconfig | 11 +++ 13 | drivers/char/Makefile | 2 + 14 | drivers/char/beep.c | 190 ++++++++++++++++++++++++++++++++++++++++++++++++++ 15 | 3 files changed, 203 insertions(+) 16 | create mode 100644 drivers/char/beep.c 17 | 18 | diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig 19 | index a043107..858fbac 100644 20 | --- a/drivers/char/Kconfig 21 | +++ b/drivers/char/Kconfig 22 | @@ -603,5 +603,16 @@ config TILE_SROM 23 | 24 | source "drivers/char/xillybus/Kconfig" 25 | 26 | +config FANCY_BEEP 27 | + tristate "Fancy Beeper Device (/dev/misc/beep)" 28 | + default n 29 | + help 30 | + The fancy beeper kernel module is a device driver that allows you to 31 | + replace the PC speaker beep with a userspace daemon that will perform 32 | + an action of your choice. The main use of this is to play a sound file 33 | + in place of the system beep, but you can write a beeper daemon to do 34 | + anything you want it to. For more information see: 35 | + https://github.com/mozzwald/Fancy-Beeper-Daemon 36 | + 37 | endmenu 38 | 39 | diff --git a/drivers/char/Makefile b/drivers/char/Makefile 40 | index d8a7579..f57b347 100644 41 | --- a/drivers/char/Makefile 42 | +++ b/drivers/char/Makefile 43 | @@ -60,3 +60,5 @@ js-rtc-y = rtc.o 44 | 45 | obj-$(CONFIG_TILE_SROM) += tile-srom.o 46 | obj-$(CONFIG_XILLYBUS) += xillybus/ 47 | + 48 | +obj-$(CONFIG_FANCY_BEEP) += beep.o 49 | diff --git a/drivers/char/beep.c b/drivers/char/beep.c 50 | new file mode 100644 51 | index 0000000..77aef31 52 | --- /dev/null 53 | +++ b/drivers/char/beep.c 54 | @@ -0,0 +1,190 @@ 55 | +/* 56 | + * Fancy beeper driver for Linux 57 | + * 58 | + * Copyright (c) 2004 Jason F. McBrayer 59 | + * 60 | + * Based on pcspkr.c (c) 2002 Vojtech Pavlik and (c) 1992 Orest Zborowski 61 | + * Inspired by modreq_beep and oplbeep. 62 | + * 63 | + * mozzwald modified 2015-03-25 64 | + */ 65 | + 66 | +/* 67 | + * This program is free software; you can redistribute it and/or modify it 68 | + * under the terms of the GNU General Public License version 2 as published by 69 | + * the Free Software Foundation 70 | + */ 71 | + 72 | +/* Kernel includes */ 73 | +#include 74 | +#include 75 | +#include 76 | +#include 77 | +#include 78 | +#include 79 | +#include 80 | +#include 81 | +#include 82 | + 83 | +/* Definitions */ 84 | +#define BEEP_MAJOR 10 85 | +#define BEEP_MINOR 128 86 | +#undef DEBUG 87 | + 88 | +/* Static data */ 89 | +static DECLARE_WAIT_QUEUE_HEAD (beep_wait); 90 | +static char what_beep=0; 91 | +static int beep_listening=0; 92 | + 93 | + 94 | +MODULE_AUTHOR("Jason F. McBrayer "); 95 | +MODULE_DESCRIPTION("Fancy beeper driver"); 96 | +MODULE_LICENSE("GPL"); 97 | + 98 | +static char beep_name[] = "Fancy Beeper"; 99 | +static struct input_dev *beep_dev; 100 | + 101 | + 102 | +static int close_beep(struct inode * inode, struct file * file) 103 | +{ 104 | + if (beep_listening >0) 105 | + beep_listening--; 106 | + return(0); 107 | +} 108 | + 109 | +/* 110 | + * open access to the beep, currently only one reading open is 111 | + * allowed. We can do as many writes as we like. This really calls 112 | + * for some kind of buffering of events, something more accurate than 113 | + * the simple static what_beep. Later.... 114 | + */ 115 | + 116 | +static int open_beep(struct inode * inode, struct file * file) 117 | +{ 118 | +#ifdef DEBUG 119 | + printk(KERN_WARNING "open_beep called.\n"); 120 | +#endif 121 | + switch(file->f_flags & O_ACCMODE) 122 | + { 123 | + case O_RDONLY: 124 | + if (beep_listening) 125 | + return -EBUSY; 126 | + beep_listening++; 127 | + what_beep=0; /* Zero means we don't have 128 | + any beeps waiting to be fetched */ 129 | + return 0; 130 | + case O_NONBLOCK: 131 | + return -EAGAIN; 132 | + case O_WRONLY: 133 | + return 0; 134 | + default: 135 | + return -EINVAL; 136 | + } 137 | +} 138 | + 139 | +static ssize_t read_beep(struct file * file, char * buffer, size_t len, 140 | + loff_t *ppos) 141 | +{ 142 | + size_t bytes_sent=0; 143 | + 144 | + /* Can't seek (pread) on this device */ 145 | + /* if (ppos != &file->f_pos) */ 146 | + /* return -ESPIPE; */ 147 | + /* You can seek, but it doesn't do anything... */ 148 | + 149 | + if (!access_ok(VERIFY_WRITE, buffer, sizeof(what_beep))) { 150 | + what_beep = 0; 151 | + return -EFAULT; 152 | + } 153 | + if (!beep_listening) /* Pretty improbable...*/ 154 | + { 155 | + return -EAGAIN; 156 | + /* Uh? Is this a good return value? */ 157 | + } 158 | + 159 | + /* OK, now for the fun bit.... I never did anything in kernel space 160 | + * before, so if this is completely foolish, just tell me, OK? 161 | + */ 162 | + if (wait_event_interruptible(beep_wait, what_beep)) 163 | + return -EINTR; 164 | + 165 | + while ((len>0) && (what_beep>0)) { 166 | + put_user(what_beep, buffer); 167 | + what_beep--; 168 | + len--; 169 | + bytes_sent++; 170 | + } 171 | +#ifdef DEBUG 172 | + printk("Beep!\n"); 173 | +#endif 174 | + return(bytes_sent); 175 | +} 176 | + 177 | +struct file_operations beep_fops = { 178 | + owner: THIS_MODULE, 179 | + read: read_beep, 180 | + open: open_beep, 181 | + release: close_beep, 182 | +}; 183 | + 184 | +static struct miscdevice beep_miscdev = { 185 | + BEEP_MINOR, 186 | + "beep", 187 | + &beep_fops 188 | +}; 189 | + 190 | + 191 | +static int beep_event(struct input_dev *dev, unsigned int type, 192 | + unsigned int code, int value) 193 | +{ 194 | + if (type != EV_SND) 195 | + return -1; 196 | + 197 | + switch (code) { 198 | + case SND_BELL: if (value) value = 1000; 199 | + case SND_TONE: break; 200 | + default: return -1; 201 | + } 202 | +#ifdef DEBUG 203 | + printk(KERN_WARNING "beep_event called with %d %d %d\n", 204 | + type, code, value); 205 | +#endif 206 | + 207 | + if (value) { 208 | + what_beep=1; 209 | + wake_up(&beep_wait); 210 | + } 211 | + return 0; 212 | +} 213 | + 214 | +static int __init beep_init(void) 215 | +{ 216 | + int ret = 0; 217 | + beep_dev = input_allocate_device(); 218 | + 219 | + beep_dev->evbit[0] = BIT(EV_SND); 220 | + beep_dev->sndbit[0] = BIT(SND_BELL) | BIT(SND_TONE); 221 | + beep_dev->event = beep_event; 222 | + beep_dev->name = beep_name; 223 | + 224 | + ret = input_register_device(beep_dev); 225 | + if(ret){ 226 | + printk(KERN_INFO "Unable to register beep device\n"); 227 | + return ret; 228 | + } 229 | + 230 | + printk(KERN_INFO "input: %s\n", beep_name); 231 | + 232 | + misc_register(&beep_miscdev); 233 | + 234 | + return 0; 235 | +} 236 | + 237 | +static void __exit beep_exit(void) 238 | +{ 239 | + input_unregister_device(beep_dev); 240 | + misc_deregister(&beep_miscdev); 241 | +} 242 | + 243 | +module_init(beep_init); 244 | +module_exit(beep_exit); 245 | -- 246 | 2.7.4 247 | 248 | -------------------------------------------------------------------------------- /pxa/dts/zipit-z2_template.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Vasily Khoruzhick 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License version 2 as 6 | * publishhed by the Free Software Foundation. 7 | */ 8 | 9 | /dts-v1/; 10 | #include 11 | #include 12 | #include "pxa27x.dtsi" 13 | 14 | / { 15 | model = "Zipit Z2"; 16 | compatible = "zipitz2"; 17 | 18 | chosen { 19 | bootargs = "console=ttyS2"; 20 | }; 21 | 22 | memory { 23 | reg = <0xa0000000 0x2000000>; 24 | }; 25 | 26 | pxabus { 27 | nor_flash@00000000 { 28 | compatible = "cfi-flash"; 29 | reg = <0x00000000 0x800000>; 30 | linux,mtd-name = "physmap-flash.0"; 31 | bank-width = <2>; 32 | #address-cells = <1>; 33 | #size-cells = <1>; 34 | 35 | uboot@0 { 36 | label = "U-Boot Bootloader"; 37 | reg = <0x00000 0x40000>; 38 | }; 39 | 40 | ubootenv@40000 { 41 | label = "U-Boot Environment"; 42 | reg = <0x40000 0x10000>; 43 | }; 44 | 45 | kernel@50000 { 46 | label = "Kernel"; 47 | reg = <0x50000 0xDT_SZ_KERNEL>; 48 | }; 49 | 50 | squashfs@DT_ADDR_SQUASH { 51 | label = "Squashfs"; 52 | reg = <0xDT_ADDR_SQUASH 0xDT_SZ_SQUASH>; 53 | }; 54 | jffs2@DT_ADDR_JFFS2 { 55 | label = "JFFS2"; 56 | reg = <0xDT_ADDR_JFFS2 0>; 57 | }; 58 | firm@50000 { 59 | label = "Firmware"; 60 | reg = <0x50000 0>; 61 | }; 62 | }; 63 | 64 | pwri2c: i2c@40f000180 { 65 | status = "okay"; 66 | tps65021@48 { 67 | compatible = "ti,tps65021"; 68 | reg = <0x48>; 69 | regulators { 70 | tps65021_vcc_core_reg: vcc_core { 71 | regulator-name = "vcc_core"; 72 | regulator-always-on; 73 | regulator-boot-on; 74 | regulator-min-microvolt = <800000>; 75 | regulator-max-microvolt = <1600000>; 76 | }; 77 | tps65021_dcdc2_reg: dcdc1 { 78 | regulator-name = "DCDC2"; 79 | regulator-always-on; 80 | regulator-boot-on; 81 | regulator-min-microvolt = <3300000>; 82 | regulator-max-microvolt = <3300000>; 83 | }; 84 | tps65021_dcdc3_reg: dcdc2 { 85 | regulator-name = "DCDC3"; 86 | regulator-always-on; 87 | regulator-boot-on; 88 | regulator-min-microvolt = <1800000>; 89 | regulator-max-microvolt = <1800000>; 90 | }; 91 | tps65021_ldo1_reg: ldo1 { 92 | regulator-name = "LDO1"; 93 | regulator-always-on; 94 | regulator-boot-on; 95 | regulator-min-microvolt = <1000000>; 96 | regulator-max-microvolt = <3150000>; 97 | }; 98 | tps65021_ldo2_reg: ldo2 { 99 | regulator-name = "LDO2"; 100 | regulator-always-on; 101 | regulator-boot-on; 102 | regulator-min-microvolt = <1050000>; 103 | regulator-max-microvolt = <3300000>; 104 | }; 105 | }; 106 | }; 107 | }; 108 | pxai2c1: i2c@40301680 { 109 | status = "okay"; 110 | aer915@55 { 111 | compatible = "aer915"; 112 | reg = <0x55>; 113 | charge-gpio = <&gpio 0 GPIO_ACTIVE_LOW>; 114 | charge-stat-1 = <&gpio 99 GPIO_OPEN_DRAIN>; 115 | charge-stat-2 = <&gpio 95 GPIO_OPEN_DRAIN>; 116 | i2c_reg = <2>; 117 | min_voltage = <3475000>; 118 | max_voltage = <4190000>; 119 | batt_div = <59>; 120 | batt_mult = <1000000>; 121 | batt_name = "Z2"; 122 | }; 123 | wm8750: wm8750@1b { 124 | #sound-dai-cells = <0>; 125 | compatible = "wlf,wm8750"; 126 | reg = <0x1b>; 127 | }; 128 | }; 129 | mmc0: mmc@41100000 { 130 | pxa-mmc,detect-delay-ms = <200>; 131 | cd-gpios = <&gpio 96 GPIO_ACTIVE_HIGH>; 132 | cd-invert; 133 | status = "okay"; 134 | }; 135 | uart0: uart@40100000 { 136 | status = "okay"; 137 | }; 138 | uart1: uart@40200000 { 139 | status = "okay"; 140 | }; 141 | uart2: uart@40700000 { 142 | status = "okay"; 143 | }; 144 | 145 | display-backlight { 146 | compatible = "pwm-backlight"; 147 | pwms = <&pwm1 1260320>; 148 | brightness-levels = <0 200 300 400 500 600 700 800 900 1023>; 149 | default-brightness-level = <4>; 150 | }; 151 | 152 | keyboard-backlight { 153 | compatible = "pwm-backlight"; 154 | pwms = <&pwm2 1260320>; 155 | brightness-levels = <0 200 300 400 500 600 700 800 900 1023>; 156 | default-brightness-level = <0>; 157 | }; 158 | gpio-leds { 159 | compatible = "gpio-leds"; 160 | 161 | green-wifi { 162 | label = "z2:green:wifi"; 163 | gpios = <&gpio 10 GPIO_ACTIVE_LOW>; 164 | }; 165 | green-charged { 166 | label = "z2:green:charged"; 167 | linux,default_trigger = "mmc0"; 168 | gpios = <&gpio 85 GPIO_ACTIVE_LOW>; 169 | }; 170 | amber-charging { 171 | label = "z2:amber:charging"; 172 | linux,default_trigger = "Z2-charging-or-full"; 173 | gpios = <&gpio 83 GPIO_ACTIVE_LOW>; 174 | }; 175 | }; 176 | gpio-keys { 177 | compatible = "gpio-keys"; 178 | power-button { 179 | label = "Power Button"; 180 | linux,code = ; 181 | gpios = <&gpio 1 GPIO_ACTIVE_LOW>; 182 | gpio-key,wakeup; 183 | }; 184 | lid { 185 | label = "Lid Switch"; 186 | linux,code = ; 187 | gpios = <&gpio 98 GPIO_ACTIVE_LOW>; 188 | }; 189 | }; 190 | keypad@41500000 { 191 | status = "okay"; 192 | keypad,num-rows = <7>; 193 | keypad,num-columns = <8>; 194 | marvell,debounce-interval = <30>; 195 | linux,keymap = <0x00000165 /* KEY_OPTION */ 196 | 0x01000067 /* KEY_UP */ 197 | 0x0200006c /* KEY_DOWN */ 198 | 0x03000069 /* KEY_LEFT */ 199 | 0x0400006a /* KEY_RIGHT */ 200 | 0x0500006b /* KEY_END */ 201 | 0x0600004e /* KEY_KPPLUS */ 202 | 0x00010066 /* KEY_HOME */ 203 | 0x01010010 /* KEY_Q */ 204 | 0x02010017 /* KEY_I */ 205 | 0x03010022 /* KEY_G */ 206 | 0x0401002d /* KEY_X */ 207 | 0x0501001c /* KEY_ENTER */ 208 | 0x0601004a /* KEY_KPMINUS */ 209 | 0x00020068 /* KEY_PAGEUP */ 210 | 0x01020011 /* KEY_W */ 211 | 0x02020018 /* KEY_O */ 212 | 0x03020023 /* KEY_H */ 213 | 0x0402002e /* KEY_C */ 214 | 0x05020038 /* KEY_LEFTALT */ 215 | 0x0003006d /* KEY_PAGEDOWN */ 216 | 0x01030012 /* KEY_E */ 217 | 0x02030019 /* KEY_P */ 218 | 0x03030024 /* KEY_J */ 219 | 0x0403002f /* KEY_V */ 220 | 0x0503002a /* KEY_LEFTSHIFT */ 221 | 0x00040001 /* KEY_ESC */ 222 | 0x01040013 /* KEY_R */ 223 | 0x0204001e /* KEY_A */ 224 | 0x03040025 /* KEY_K */ 225 | 0x04040030 /* KEY_B */ 226 | 0x0504001d /* KEY_LEFTCTRL */ 227 | 0x0005000f /* KEY_TAB */ 228 | 0x01050014 /* KEY_T */ 229 | 0x0205001f /* KEY_S */ 230 | 0x03050026 /* KEY_L */ 231 | 0x04050031 /* KEY_N */ 232 | 0x05050039 /* KEY_SPACE */ 233 | 0x000600a6 /* KEY_STOPCD */ 234 | 0x01060015 /* KEY_Y */ 235 | 0x02060020 /* KEY_D */ 236 | 0x0306000e /* KEY_BACKSPACE */ 237 | 0x04060032 /* KEY_M */ 238 | 0x05060033 /* KEY_COMMA */ 239 | 0x000700c8 /* KEY_PLAYCD */ 240 | 0x01070016 /* KEY_U */ 241 | 0x02070021 /* KEY_F */ 242 | 0x0307002c /* KEY_Z */ 243 | 0x04070027 /* KEY_SEMICOLON */ 244 | 0x05070034>; /* KEY_DOT */ 245 | }; 246 | ssp1: ssp@41000000 { 247 | status = "okay"; 248 | }; 249 | ssp2: ssp@41700000 { 250 | status = "okay"; 251 | }; 252 | i2s: pxa2xx-i2s@40400000 { 253 | #sound-dai-cells = <0>; 254 | status = "okay"; 255 | }; 256 | sound_plat: pxa-pcm-audio { 257 | #sound-dai-cells = <0>; 258 | compatible = "mrvl,pxa-pcm-audio"; 259 | status = "okay"; 260 | }; 261 | audio { 262 | compatible = "simple-audio-card"; 263 | simple-audio-card,name = "Z2"; 264 | simple-audio-card,format = "i2s"; 265 | simple-audio-card,bitclock-master = <&frame_master>; 266 | simple-audio-card,frame-master = <&frame_master>; 267 | simple-audio-card,widgets = 268 | "Headphone", "Headphones", 269 | "Microphone", "Mic Jack", 270 | "Microphone", "Mic Dock", 271 | "Speaker", "Speaker"; 272 | simple-audio-card,routing = 273 | /* headphone connected to LOUT1, ROUT1 */ 274 | "Headphones", "LOUT1", 275 | "Headphones", "ROUT1", 276 | 277 | /* ext speaker connected to LOUT2, ROUT2 */ 278 | "Speaker", "ROUT2", 279 | "Speaker", "LOUT2", 280 | 281 | /* headset mic is connected to R input 2 - with bias */ 282 | "RINPUT2", "Mic Bias", 283 | "Mic Bias", "Mic Jack", 284 | 285 | /* dock mic is connected to L input 2 - with bias */ 286 | "LINPUT2", "Mic Bias", 287 | "Mic Bias", "Mic Dock"; 288 | 289 | simple-audio-card,hp-det-gpio = <&gpio 37 GPIO_ACTIVE_LOW>; 290 | 291 | frame_master: simple-audio-card,cpu { 292 | sound-dai = <&i2s>; 293 | }; 294 | simple-audio-card,codec { 295 | sound-dai = <&wm8750>; 296 | system-clock-frequency = <11289600>; 297 | }; 298 | simple-audio-card,plat { 299 | sound-dai = <&sound_plat>; 300 | }; 301 | }; 302 | pxa27x_udc: udc@40600000 { 303 | status = "okay"; 304 | }; 305 | pxa27x_ohci: usb@4c000000 { 306 | status = "okay"; 307 | marvell,enable-port2; 308 | marvell,no-oc-protection; 309 | marvell,power-on-delay = <10>; 310 | marvell,power-budget = <500>; 311 | marvell,port-mode = <3>; 312 | }; 313 | }; 314 | }; 315 | -------------------------------------------------------------------------------- /patches/openwrt-packages/003-gcc-bump-to-5.3.0.patch: -------------------------------------------------------------------------------- 1 | From f29e2156643bc0e89514f0e5598adf8408abacaf Mon Sep 17 00:00:00 2001 2 | From: Joe Honold 3 | Date: Mon, 27 Jun 2016 10:42:38 -0500 4 | Subject: [PATCH] gcc: bump to 5.3.0 5 | 6 | --- 7 | devel/gcc/Makefile | 82 ++++++++++++++++++---- 8 | ...2-dont-choke-when-building-32bit-on-64bit.patch | 9 ++- 9 | devel/gcc/patches/004-libcc1_uclibc_lm.patch | 11 +++ 10 | devel/gcc/patches/930-osdefines.patch | 13 ++++ 11 | 4 files changed, 97 insertions(+), 18 deletions(-) 12 | create mode 100644 devel/gcc/patches/004-libcc1_uclibc_lm.patch 13 | create mode 100644 devel/gcc/patches/930-osdefines.patch 14 | 15 | diff --git a/devel/gcc/Makefile b/devel/gcc/Makefile 16 | index 44775d4..82c8eeb 100644 17 | --- a/devel/gcc/Makefile 18 | +++ b/devel/gcc/Makefile 19 | @@ -4,17 +4,20 @@ 20 | # This is free software, licensed under the GNU General Public License v2. 21 | # See /LICENSE for more information. 22 | # 23 | -# 24 | +# Upgraded from 4.8.3 to 5.3.0 25 | 26 | include $(TOPDIR)/rules.mk 27 | 28 | PKG_NAME:=gcc 29 | -PKG_VERSION:=4.8.3 30 | -PKG_RELEASE:=1 31 | -PKG_SOURCE_URL:=@GNU/gcc/gcc-$(PKG_VERSION) 32 | +PKG_VERSION:=5.3.0 33 | +PKG_RELEASE:=3 34 | +PKG_SOURCE_URL:=ftp://ftp.fu-berlin.de/unix/languages/gcc/releases/gcc-$(PKG_VERSION) \ 35 | + http://mirrors.rcn.net/pub/sourceware/gcc/releases/gcc-$(PKG_VERSION) \ 36 | + ftp://ftp.gnu.org/gnu/gcc/releases/gcc-$(PKG_VERSION) 37 | 38 | PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 39 | -PKG_MD5SUM:=7c60f24fab389f77af203d2516ee110f 40 | +PKG_MD5SUM:=c9616fd448f980259c31de613e575719 41 | +PATCH_DIR:=$(TOPDIR)/toolchain/gcc/patches/$(PKG_VERSION) 42 | PKG_INSTALL:=1 43 | PKG_FIXUP:=libtool 44 | PKG_BUILD_PARALLEL:=1 45 | @@ -46,12 +49,46 @@ define Package/gcc/description 46 | build a native toolchain for compiling on target 47 | endef 48 | 49 | +GMPSRC=gmp-4.3.2 50 | + 51 | +define Download/gmp 52 | + URL:=ftp://gcc.gnu.org/pub/gcc/infrastructure/ 53 | + FILE:=$(GMPSRC).tar.bz2 54 | + MD5SUM:=dd60683d7057917e34630b4a787932e8 55 | +endef 56 | +$(eval $(call Download,gmp)) 57 | + 58 | +MPCSRC=mpc-0.8.1 59 | + 60 | +define Download/mpc 61 | + URL:=ftp://gcc.gnu.org/pub/gcc/infrastructure/ 62 | + FILE:=$(MPCSRC).tar.gz 63 | + MD5SUM:=5b34aa804d514cc295414a963aedb6bf 64 | +endef 65 | +$(eval $(call Download,mpc)) 66 | + 67 | +MPFRSRC=mpfr-2.4.2 68 | + 69 | +define Download/mpfr 70 | + URL:=ftp://gcc.gnu.org/pub/gcc/infrastructure/ 71 | + FILE:=$(MPFRSRC).tar.bz2 72 | + MD5SUM:=89e59fe665e2b3ad44a6789f40b059a0 73 | +endef 74 | +$(eval $(call Download,mpfr)) 75 | 76 | define Build/Prepare 77 | $(PKG_UNPACK) 78 | -# we have to download additional stuff before patching 79 | - (cd $(PKG_BUILD_DIR) && ./contrib/download_prerequisites) 80 | +# we have to download and unpack additional stuff before patching 81 | + tar -C $(PKG_BUILD_DIR) -xvjf $(DL_DIR)/$(GMPSRC).tar.bz2 82 | + ln -sf $(PKG_BUILD_DIR)/$(GMPSRC) $(PKG_BUILD_DIR)/gmp 83 | + tar -C $(PKG_BUILD_DIR) -xvzf $(DL_DIR)/$(MPCSRC).tar.gz 84 | + ln -sf $(PKG_BUILD_DIR)/$(MPCSRC) $(PKG_BUILD_DIR)/mpc 85 | + tar -C $(PKG_BUILD_DIR) -xvjf $(DL_DIR)/$(MPFRSRC).tar.bz2 86 | + ln -sf $(PKG_BUILD_DIR)/$(MPFRSRC) $(PKG_BUILD_DIR)/mpfr 87 | $(Build/Patch) 88 | + patch -p1 -d "$(PKG_BUILD_DIR)" < ./patches/002-dont-choke-when-building-32bit-on-64bit.patch 89 | + patch -p1 -d "$(PKG_BUILD_DIR)" < ./patches/003-mpfr-longlong-mips.patch 90 | + 91 | # poor man's fix for `none-openwrt-linux' not recognized when building with musl 92 | cp $(PKG_BUILD_DIR)/config.sub $(PKG_BUILD_DIR)/mpfr/ 93 | cp $(PKG_BUILD_DIR)/config.sub $(PKG_BUILD_DIR)/gmp/ 94 | @@ -72,10 +109,14 @@ define Build/Configure 95 | --with-bugurl=$(BUGURL) \ 96 | --with-pkgversion="$(PKGVERSION)" \ 97 | --enable-shared \ 98 | - --disable-__cxa_atexit \ 99 | + $(if $(CONFIG_LIBC_USE_GLIBC),--enable,--disable)-__cxa_atexit \ 100 | + --with-default-libstdcxx-abi=gcc4-compatible \ 101 | --enable-target-optspace \ 102 | --with-gnu-ld \ 103 | --disable-nls \ 104 | + --disable-libsanitizer \ 105 | + --disable-libvtv \ 106 | + --disable-libcilkrts \ 107 | --disable-libmudflap \ 108 | --disable-multilib \ 109 | --disable-libgomp \ 110 | @@ -86,10 +127,9 @@ define Build/Configure 111 | --with-host-libstdcxx=-lstdc++ \ 112 | --prefix=/usr \ 113 | --libexecdir=/usr/lib \ 114 | + --with-local-prefix=/usr \ 115 | $(SOFT_FLOAT_CONFIG_OPTION) \ 116 | $(call qstrip,$(CONFIG_EXTRA_GCC_CONFIG_OPTIONS)) \ 117 | - $(if $(CONFIG_mips64)$(CONFIG_mips64el),--with-arch=mips64 \ 118 | - --with-abi=$(subst ",,$(CONFIG_MIPS64_ABI))) \ 119 | ); 120 | endef 121 | 122 | @@ -98,6 +138,18 @@ define Build/Compile 123 | DESTDIR="$(PKG_INSTALL_DIR)" $(MAKE_ARGS) all install 124 | endef 125 | 126 | +ENVCFLAGS:="$(TARGET_OPTIMIZATION) $(EXTRA_OPTIMIZATION) 127 | +ifeq ($(CONFIG_SOFT_FLOAT),y) 128 | + ifeq ($(CONFIG_arm),y) 129 | + ENVCFLAGS+= -mfloat-abi=soft 130 | + else 131 | + ENVCFLAGS+= -msoft-float 132 | + endif 133 | +endif 134 | +ENVCFLAGS+=" 135 | + 136 | +ENVLDFLAGS:="-Wl,-rpath=/usr/lib -Wl,--dynamic-linker=/usr/lib/$(DYNLINKER) -L/usr/lib" 137 | + 138 | define Package/gcc/install 139 | $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION) 140 | cp -ar $(PKG_INSTALL_DIR)/usr/include $(1)/usr 141 | @@ -108,11 +160,15 @@ define Package/gcc/install 142 | ln -s $(REAL_GNU_TARGET_NAME)-gcc $(1)/usr/bin/gcc 143 | ln -s $(REAL_GNU_TARGET_NAME)-gcc $(1)/usr/bin/$(REAL_GNU_TARGET_NAME)-gcc-$(PKG_VERSION) 144 | cp -ar $(PKG_INSTALL_DIR)/usr/lib/gcc $(1)/usr/lib 145 | - $(RM) $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)/*.a 146 | - cp -ar $(TOOLCHAIN_DIR)/include $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION) 147 | + cp -ar $(TOOLCHAIN_DIR)/include $(1)/usr 148 | cp -a $(TOOLCHAIN_DIR)/lib/*.{o,so*} $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION) 149 | cp -a $(TOOLCHAIN_DIR)/lib/*nonshared*.a $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION) 150 | - grep "GROUP.*-lgcc" $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)/libgcc_s.so && cp -a $(PKG_INSTALL_DIR)/usr/lib/gcc/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)/libgcc.a $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)/ ; true 151 | + rm -f $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)/libgo* 152 | + rm -f $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)/libcc1* 153 | + echo '#!/bin/sh' > $(1)/usr/bin/gcc_env.sh 154 | + echo 'export LDFLAGS=$(ENVLDFLAGS)' >> $(1)/usr/bin/gcc_env.sh 155 | + echo 'export CFLAGS=$(ENVCFLAGS)' >> $(1)/usr/bin/gcc_env.sh 156 | + chmod +x $(1)/usr/bin/gcc_env.sh 157 | endef 158 | 159 | $(eval $(call BuildPackage,gcc)) 160 | diff --git a/devel/gcc/patches/002-dont-choke-when-building-32bit-on-64bit.patch b/devel/gcc/patches/002-dont-choke-when-building-32bit-on-64bit.patch 161 | index 8472960..a00cbcd 100644 162 | --- a/devel/gcc/patches/002-dont-choke-when-building-32bit-on-64bit.patch 163 | +++ b/devel/gcc/patches/002-dont-choke-when-building-32bit-on-64bit.patch 164 | @@ -1,15 +1,14 @@ 165 | -diff --git a/gcc/real.h b/gcc/real.h 166 | -index 2ff84f6..fbb4b0e 100644 167 | --- a/gcc/real.h 168 | +++ b/gcc/real.h 169 | -@@ -72,8 +72,10 @@ struct GTY(()) real_value { 170 | +@@ -75,9 +75,10 @@ 171 | + (REAL_VALUE_TYPE_SIZE%HOST_BITS_PER_WIDE_INT ? 1 : 0)) /* round up */ 172 | 173 | /* Verify the guess. */ 174 | +#ifndef __LP64__ 175 | extern char test_real_width 176 | - [sizeof(REAL_VALUE_TYPE) <= REAL_WIDTH*sizeof(HOST_WIDE_INT) ? 1 : -1]; 177 | + [sizeof (REAL_VALUE_TYPE) <= REAL_WIDTH * sizeof (HOST_WIDE_INT) ? 1 : -1]; 178 | +- 179 | +#endif 180 | - 181 | /* Calculate the format for CONST_DOUBLE. We need as many slots as 182 | are necessary to overlay a REAL_VALUE_TYPE on them. This could be 183 | + as many as four (32-bit HOST_WIDE_INT, 128-bit REAL_VALUE_TYPE). 184 | diff --git a/devel/gcc/patches/004-libcc1_uclibc_lm.patch b/devel/gcc/patches/004-libcc1_uclibc_lm.patch 185 | new file mode 100644 186 | index 0000000..cb96fd5 187 | --- /dev/null 188 | +++ b/devel/gcc/patches/004-libcc1_uclibc_lm.patch 189 | @@ -0,0 +1,11 @@ 190 | +--- a/gcc/Makefile.in 191 | ++++ b/gcc/Makefile.in 192 | +@@ -343,7 +343,7 @@ 193 | + # This is where we get zlib from. zlibdir is -L../zlib and zlibinc is 194 | + # -I../zlib, unless we were configured with --with-system-zlib, in which 195 | + # case both are empty. 196 | +-ZLIB = @zlibdir@ -lz 197 | ++ZLIB = @zlibdir@ -lz -lm 198 | + ZLIBINC = @zlibinc@ 199 | + 200 | + # How to find GMP 201 | diff --git a/devel/gcc/patches/930-osdefines.patch b/devel/gcc/patches/930-osdefines.patch 202 | new file mode 100644 203 | index 0000000..a1b6120 204 | --- /dev/null 205 | +++ b/devel/gcc/patches/930-osdefines.patch 206 | @@ -0,0 +1,13 @@ 207 | +--- a/libstdc++-v3/config/os/gnu-linux/os_defines.h 2015-01-05 06:33:28.000000000 -0600 208 | ++++ b/libstdc++-v3/config/os/gnu-linux/os_defines.h 2016-04-15 12:32:49.374356001 -0500 209 | +@@ -41,8 +41,8 @@ 210 | + // Provide a declaration for the possibly deprecated gets function, as 211 | + // glibc 2.15 and later does not declare gets for ISO C11 when 212 | + // __GNU_SOURCE is defined. 213 | +-#if __GLIBC_PREREQ(2,15) && defined(_GNU_SOURCE) 214 | ++//#if __GLIBC_PREREQ(2,15) && defined(_GNU_SOURCE) 215 | + # undef _GLIBCXX_HAVE_GETS 216 | +-#endif 217 | ++//#endif 218 | + 219 | + #endif 220 | -- 221 | 2.1.4 222 | 223 | -------------------------------------------------------------------------------- /patches/openwrt-packages/009-gpsd-cgps-small-screen.patch: -------------------------------------------------------------------------------- 1 | --- a/utils/gpsd/patches/0002-cgps-zipit-small-screen.patch 1969-12-31 19:00:00.000000000 -0500 2 | +++ b/utils/gpsd/patches/0002-cgps-zipit-small-screen.patch 2016-10-01 15:21:09.691631473 -0400 3 | @@ -0,0 +1,242 @@ 4 | +--- gpsd-3.15/cgps.c.bak 2016-10-01 13:02:40.128081830 -0400 5 | ++++ gpsd-3.15/cgps.c 2016-10-01 14:54:15.833562567 -0400 6 | +@@ -47,21 +47,26 @@ 7 | + 8 | + /* This is how far over in the 'datawin' window to indent the field 9 | + descriptions. */ 10 | +-#define DATAWIN_DESC_OFFSET 5 11 | ++#define DATAWIN_DESC_OFFSET 1 12 | + 13 | + /* This is how far over in the 'datawin' window to indent the field 14 | + values. */ 15 | +-#define DATAWIN_VALUE_OFFSET 17 16 | ++#define DATAWIN_VALUE_OFFSET 12 17 | + 18 | + /* This is the width of the 'datawin' window. It's recommended to 19 | + keep DATAWIN_WIDTH + SATELLITES_WIDTH <= 80 so it'll fit on a 20 | + "standard" 80x24 screen. */ 21 | +-#define DATAWIN_WIDTH 45 22 | ++#define DATAWIN_WIDTH 33 23 | + 24 | + /* This is the width of the 'satellites' window. It's recommended to 25 | + keep DATAWIN_WIDTH + SATELLITES_WIDTH <= 80 so it'll fit on a 26 | + "standard" 80x24 screen. */ 27 | +-#define SATELLITES_WIDTH 35 28 | ++#define SATELLITES_WIDTH 20 29 | ++ 30 | ++//#define DW 27 31 | ++#define DW 17 32 | ++//#define DX 22 33 | ++#define DX 12 34 | + 35 | + /* ================================================================ 36 | + You shouldn't have to modify any #define values below this line. 37 | +@@ -321,7 +326,8 @@ 38 | + } 39 | + 40 | + (void)wborder(datawin, 0, 0, 0, 0, 0, 0, 0, 0); 41 | +- (void)mvwprintw(satellites, 1, 1, "PRN: Elev: Azim: SNR: Used:"); 42 | ++ //(void)mvwprintw(satellites, 1, 1, "PRN: Elev: Azim: SNR: Used:"); 43 | ++ (void)mvwprintw(satellites, 1, 1, "PRN Elv Azm SNR OK"); 44 | + (void)wborder(satellites, 0, 0, 0, 0, 0, 0, 0, 0); 45 | + } 46 | + } 47 | +@@ -347,38 +353,38 @@ 48 | + (void)unix_to_iso8601(gpsdata->fix.time, scr, sizeof(scr)); 49 | + } else 50 | + (void)snprintf(scr, sizeof(scr), "n/a"); 51 | +- (void)mvwprintw(datawin, 1, DATAWIN_VALUE_OFFSET, "%-*s", 27, scr); 52 | ++ (void)mvwprintw(datawin, 1, DATAWIN_VALUE_OFFSET-4, "%-*s", DW, scr); 53 | + 54 | + /* Fill in the heading. */ 55 | + if (isnan(gpsdata->fix.track) == 0) { 56 | + (void)snprintf(scr, sizeof(scr), "%.1f degrees", gpsdata->fix.track); 57 | + } else 58 | + (void)snprintf(scr, sizeof(scr), "n/a"); 59 | +- (void)mvwprintw(datawin, 2, DATAWIN_VALUE_OFFSET, "%-*s", 27, scr); 60 | ++ (void)mvwprintw(datawin, 2, DATAWIN_VALUE_OFFSET, "%-*s", DW, scr); 61 | + 62 | + /* Fill in the pitch. */ 63 | + if (isnan(gpsdata->fix.climb) == 0) { 64 | + (void)snprintf(scr, sizeof(scr), "%.1f", gpsdata->fix.climb); 65 | + } else 66 | + (void)snprintf(scr, sizeof(scr), "n/a"); 67 | +- (void)mvwprintw(datawin, 3, DATAWIN_VALUE_OFFSET, "%-*s", 27, scr); 68 | ++ (void)mvwprintw(datawin, 3, DATAWIN_VALUE_OFFSET, "%-*s", DW, scr); 69 | + 70 | + /* Fill in the roll. */ 71 | + if (isnan(gpsdata->fix.speed) == 0) 72 | + (void)snprintf(scr, sizeof(scr), "%.1f", gpsdata->fix.speed); 73 | + else 74 | + (void)snprintf(scr, sizeof(scr), "n/a"); 75 | +- (void)mvwprintw(datawin, 4, DATAWIN_VALUE_OFFSET, "%-*s", 27, scr); 76 | ++ (void)mvwprintw(datawin, 4, DATAWIN_VALUE_OFFSET, "%-*s", DW, scr); 77 | + 78 | + /* Fill in the speed. */ 79 | + if (isnan(gpsdata->fix.altitude) == 0) 80 | + (void)snprintf(scr, sizeof(scr), "%.1f", gpsdata->fix.altitude); 81 | + else 82 | + (void)snprintf(scr, sizeof(scr), "n/a"); 83 | +- (void)mvwprintw(datawin, 5, DATAWIN_VALUE_OFFSET, "%-*s", 27, scr); 84 | ++ (void)mvwprintw(datawin, 5, DATAWIN_VALUE_OFFSET, "%-*s", DW, scr); 85 | + 86 | + /* When we need to fill in receiver type again, do it here. */ 87 | +- (void)mvwprintw(datawin, 6, DATAWIN_VALUE_OFFSET, "%-*s", 27, scr); 88 | ++ (void)mvwprintw(datawin, 6, DATAWIN_VALUE_OFFSET, "%-*s", DW, scr); 89 | + 90 | + /* Be quiet if the user requests silence. */ 91 | + if (!silent_flag && raw_flag) { 92 | +@@ -408,7 +414,8 @@ 93 | + for (i = 0; i < MAX_POSSIBLE_SATS; i++) { 94 | + if (i < gpsdata->satellites_visible) { 95 | + (void)snprintf(scr, sizeof(scr), 96 | +- " %3d %02d %03d %02d %c", 97 | ++ //" %3d %02d %03d %02d %c", 98 | ++ "%3d %02d %03d %02d %c", 99 | + gpsdata->skyview[i].PRN, 100 | + gpsdata->skyview[i].elevation, 101 | + gpsdata->skyview[i].azimuth, 102 | +@@ -428,7 +435,8 @@ 103 | + && (gpsdata->skyview[i].used 104 | + || (gpsdata->satellites_visible <= display_sats))) { 105 | + (void)snprintf(scr, sizeof(scr), 106 | +- " %3d %02d %03d %02d %c", 107 | ++ //" %3d %02d %03d %02d %c", 108 | ++ "%3d %02d %03d %02d %c", 109 | + gpsdata->skyview[i].PRN, 110 | + gpsdata->skyview[i].elevation, 111 | + gpsdata->skyview[i].azimuth, 112 | +@@ -456,7 +464,7 @@ 113 | + (void)unix_to_iso8601(gpsdata->fix.time, scr, sizeof(scr)); 114 | + } else 115 | + (void)snprintf(scr, sizeof(scr), "n/a"); 116 | +- (void)mvwprintw(datawin, 1, DATAWIN_VALUE_OFFSET, "%-*s", 27, scr); 117 | ++ (void)mvwprintw(datawin, 1, DATAWIN_VALUE_OFFSET-4, "%-*s", DW, scr); 118 | + 119 | + 120 | + /* Fill in the latitude. */ 121 | +@@ -466,7 +474,7 @@ 122 | + (gpsdata->fix.latitude < 0) ? 'S' : 'N'); 123 | + } else 124 | + (void)snprintf(scr, sizeof(scr), "n/a"); 125 | +- (void)mvwprintw(datawin, 2, DATAWIN_VALUE_OFFSET, "%-*s", 27, scr); 126 | ++ (void)mvwprintw(datawin, 2, DATAWIN_VALUE_OFFSET, "%-*s", DW, scr); 127 | + 128 | + /* Fill in the longitude. */ 129 | + if (gpsdata->fix.mode >= MODE_2D && isnan(gpsdata->fix.longitude) == 0) { 130 | +@@ -475,7 +483,7 @@ 131 | + (gpsdata->fix.longitude < 0) ? 'W' : 'E'); 132 | + } else 133 | + (void)snprintf(scr, sizeof(scr), "n/a"); 134 | +- (void)mvwprintw(datawin, 3, DATAWIN_VALUE_OFFSET, "%-*s", 27, scr); 135 | ++ (void)mvwprintw(datawin, 3, DATAWIN_VALUE_OFFSET, "%-*s", DW, scr); 136 | + 137 | + /* Fill in the altitude. */ 138 | + if (gpsdata->fix.mode >= MODE_3D && isnan(gpsdata->fix.altitude) == 0) 139 | +@@ -483,7 +491,7 @@ 140 | + gpsdata->fix.altitude * altfactor, altunits); 141 | + else 142 | + (void)snprintf(scr, sizeof(scr), "n/a"); 143 | +- (void)mvwprintw(datawin, 4, DATAWIN_VALUE_OFFSET, "%-*s", 27, scr); 144 | ++ (void)mvwprintw(datawin, 4, DATAWIN_VALUE_OFFSET, "%-*s", DW, scr); 145 | + 146 | + /* Fill in the speed. */ 147 | + if (gpsdata->fix.mode >= MODE_2D && isnan(gpsdata->fix.track) == 0) 148 | +@@ -491,7 +499,7 @@ 149 | + gpsdata->fix.speed * speedfactor, speedunits); 150 | + else 151 | + (void)snprintf(scr, sizeof(scr), "n/a"); 152 | +- (void)mvwprintw(datawin, 5, DATAWIN_VALUE_OFFSET, "%-*s", 27, scr); 153 | ++ (void)mvwprintw(datawin, 5, DATAWIN_VALUE_OFFSET, "%-*s", DW, scr); 154 | + 155 | + /* Fill in the heading. */ 156 | + if (gpsdata->fix.mode >= MODE_2D && isnan(gpsdata->fix.track) == 0) { 157 | +@@ -507,7 +515,7 @@ 158 | + } 159 | + } else 160 | + (void)snprintf(scr, sizeof(scr), "n/a"); 161 | +- (void)mvwprintw(datawin, 6, DATAWIN_VALUE_OFFSET, "%-*s", 27, scr); 162 | ++ (void)mvwprintw(datawin, 6, DATAWIN_VALUE_OFFSET, "%-*s", DW, scr); 163 | + 164 | + /* Fill in the rate of climb. */ 165 | + if (gpsdata->fix.mode >= MODE_3D && isnan(gpsdata->fix.climb) == 0) 166 | +@@ -515,7 +523,7 @@ 167 | + gpsdata->fix.climb * altfactor * 60, altunits); 168 | + else 169 | + (void)snprintf(scr, sizeof(scr), "n/a"); 170 | +- (void)mvwprintw(datawin, 7, DATAWIN_VALUE_OFFSET, "%-*s", 27, scr); 171 | ++ (void)mvwprintw(datawin, 7, DATAWIN_VALUE_OFFSET, "%-*s", DW, scr); 172 | + 173 | + /* Fill in the GPS status and the time since the last state 174 | + * change. */ 175 | +@@ -542,7 +550,7 @@ 176 | + break; 177 | + } 178 | + } 179 | +- (void)mvwprintw(datawin, 8, DATAWIN_VALUE_OFFSET, "%-*s", 27, scr); 180 | ++ (void)mvwprintw(datawin, 8, DATAWIN_VALUE_OFFSET, "%-*s", DW, scr); 181 | + 182 | + /* Note that the following fields are exceptions to the 183 | + * sizing rule. The minimum window size does not include these 184 | +@@ -560,7 +568,7 @@ 185 | + (int)(gpsdata->fix.epx * altfactor), altunits); 186 | + else 187 | + (void)snprintf(scr, sizeof(scr), "n/a"); 188 | +- (void)mvwprintw(datawin, 9, DATAWIN_VALUE_OFFSET + 5, "%-*s", 22, 189 | ++ (void)mvwprintw(datawin, 9, DATAWIN_VALUE_OFFSET + 5, "%-*s", DX, 190 | + scr); 191 | + 192 | + if (isnan(gpsdata->fix.epy) == 0) 193 | +@@ -568,7 +576,7 @@ 194 | + (int)(gpsdata->fix.epy * altfactor), altunits); 195 | + else 196 | + (void)snprintf(scr, sizeof(scr), "n/a"); 197 | +- (void)mvwprintw(datawin, 10, DATAWIN_VALUE_OFFSET + 5, "%-*s", 22, 198 | ++ (void)mvwprintw(datawin, 10, DATAWIN_VALUE_OFFSET + 5, "%-*s", DX, 199 | + scr); 200 | + 201 | + /* Fill in the estimated vertical position error. */ 202 | +@@ -577,7 +585,7 @@ 203 | + (int)(gpsdata->fix.epv * altfactor), altunits); 204 | + else 205 | + (void)snprintf(scr, sizeof(scr), "n/a"); 206 | +- (void)mvwprintw(datawin, 11, DATAWIN_VALUE_OFFSET + 5, "%-*s", 22, 207 | ++ (void)mvwprintw(datawin, 11, DATAWIN_VALUE_OFFSET + 5, "%-*s", DX, 208 | + scr); 209 | + 210 | + /* Fill in the estimated track error. */ 211 | +@@ -586,7 +594,7 @@ 212 | + (int)(gpsdata->fix.epd)); 213 | + else 214 | + (void)snprintf(scr, sizeof(scr), "n/a"); 215 | +- (void)mvwprintw(datawin, 12, DATAWIN_VALUE_OFFSET + 5, "%-*s", 22, 216 | ++ (void)mvwprintw(datawin, 12, DATAWIN_VALUE_OFFSET + 5, "%-*s", DX, 217 | + scr); 218 | + 219 | + /* Fill in the estimated speed error. */ 220 | +@@ -595,7 +603,7 @@ 221 | + (int)(gpsdata->fix.eps * speedfactor), speedunits); 222 | + else 223 | + (void)snprintf(scr, sizeof(scr), "n/a"); 224 | +- (void)mvwprintw(datawin, 13, DATAWIN_VALUE_OFFSET + 5, "%-*s", 22, 225 | ++ (void)mvwprintw(datawin, 13, DATAWIN_VALUE_OFFSET + 5, "%-*s", DX, 226 | + scr); 227 | + /* Fill in the time offset. */ 228 | + if (isnan(gpsdata->fix.time) == 0) 229 | +@@ -603,14 +611,14 @@ 230 | + (double)(timestamp()-gpsdata->fix.time)); 231 | + else 232 | + (void)snprintf(scr, sizeof(scr), "n/a"); 233 | +- (void)mvwprintw(datawin, 14, DATAWIN_VALUE_OFFSET + 5, "%-*s", 22, 234 | ++ (void)mvwprintw(datawin, 14, DATAWIN_VALUE_OFFSET + 5, "%-*s", DX, 235 | + scr); 236 | + /* Fill in the grid square (esr thought *this* one was interesting). */ 237 | + if (isnan(gpsdata->fix.longitude)==0 && isnan(gpsdata->fix.latitude)==0) 238 | + s = maidenhead(gpsdata->fix.latitude,gpsdata->fix.longitude); 239 | + else 240 | + s = "n/a"; 241 | +- (void)mvwprintw(datawin, 15, DATAWIN_VALUE_OFFSET + 5, "%-*s", 22, s); 242 | ++ (void)mvwprintw(datawin, 15, DATAWIN_VALUE_OFFSET + 5, "%-*s", DX, s); 243 | + } 244 | + 245 | + /* Be quiet if the user requests silence. */ 246 | -------------------------------------------------------------------------------- /pxa/base-files/etc/alsa/asound.state: -------------------------------------------------------------------------------- 1 | state.Z2 { 2 | control.1 { 3 | iface MIXER 4 | name 'Capture Volume' 5 | value.0 23 6 | value.1 23 7 | comment { 8 | access 'read write' 9 | type INTEGER 10 | count 2 11 | range '0 - 63' 12 | } 13 | } 14 | control.2 { 15 | iface MIXER 16 | name 'Capture ZC Switch' 17 | value.0 false 18 | value.1 false 19 | comment { 20 | access 'read write' 21 | type BOOLEAN 22 | count 2 23 | } 24 | } 25 | control.3 { 26 | iface MIXER 27 | name 'Capture Switch' 28 | value.0 false 29 | value.1 false 30 | comment { 31 | access 'read write' 32 | type BOOLEAN 33 | count 2 34 | } 35 | } 36 | control.4 { 37 | iface MIXER 38 | name 'Headphone Playback ZC Switch' 39 | value.0 false 40 | value.1 false 41 | comment { 42 | access 'read write' 43 | type BOOLEAN 44 | count 2 45 | } 46 | } 47 | control.5 { 48 | iface MIXER 49 | name 'Speaker Playback ZC Switch' 50 | value.0 true 51 | value.1 true 52 | comment { 53 | access 'read write' 54 | type BOOLEAN 55 | count 2 56 | } 57 | } 58 | control.6 { 59 | iface MIXER 60 | name 'Playback De-emphasis' 61 | value None 62 | comment { 63 | access 'read write' 64 | type ENUMERATED 65 | count 1 66 | item.0 None 67 | item.1 '32Khz' 68 | item.2 '44.1Khz' 69 | item.3 '48Khz' 70 | } 71 | } 72 | control.7 { 73 | iface MIXER 74 | name 'Capture Polarity' 75 | value Normal 76 | comment { 77 | access 'read write' 78 | type ENUMERATED 79 | count 1 80 | item.0 Normal 81 | item.1 'L Invert' 82 | item.2 'R Invert' 83 | item.3 'L + R Invert' 84 | } 85 | } 86 | control.8 { 87 | iface MIXER 88 | name 'Playback 6dB Attenuate' 89 | value true 90 | comment { 91 | access 'read write' 92 | type BOOLEAN 93 | count 1 94 | } 95 | } 96 | control.9 { 97 | iface MIXER 98 | name 'Capture 6dB Attenuate' 99 | value false 100 | comment { 101 | access 'read write' 102 | type BOOLEAN 103 | count 1 104 | } 105 | } 106 | control.10 { 107 | iface MIXER 108 | name 'PCM Volume' 109 | value.0 237 110 | value.1 237 111 | comment { 112 | access 'read write' 113 | type INTEGER 114 | count 2 115 | range '0 - 255' 116 | } 117 | } 118 | control.11 { 119 | iface MIXER 120 | name 'Bass Boost' 121 | value 'Linear Control' 122 | comment { 123 | access 'read write' 124 | type ENUMERATED 125 | count 1 126 | item.0 'Linear Control' 127 | item.1 'Adaptive Boost' 128 | } 129 | } 130 | control.12 { 131 | iface MIXER 132 | name 'Bass Filter' 133 | value '130Hz @ 48kHz' 134 | comment { 135 | access 'read write' 136 | type ENUMERATED 137 | count 1 138 | item.0 '130Hz @ 48kHz' 139 | item.1 '200Hz @ 48kHz' 140 | } 141 | } 142 | control.13 { 143 | iface MIXER 144 | name 'Bass Volume' 145 | value 13 146 | comment { 147 | access 'read write' 148 | type INTEGER 149 | count 1 150 | range '0 - 15' 151 | } 152 | } 153 | control.14 { 154 | iface MIXER 155 | name 'Treble Volume' 156 | value 14 157 | comment { 158 | access 'read write' 159 | type INTEGER 160 | count 1 161 | range '0 - 15' 162 | } 163 | } 164 | control.15 { 165 | iface MIXER 166 | name 'Treble Cut-off' 167 | value '8kHz' 168 | comment { 169 | access 'read write' 170 | type ENUMERATED 171 | count 1 172 | item.0 '8kHz' 173 | item.1 '4kHz' 174 | } 175 | } 176 | control.16 { 177 | iface MIXER 178 | name '3D Switch' 179 | value false 180 | comment { 181 | access 'read write' 182 | type BOOLEAN 183 | count 1 184 | } 185 | } 186 | control.17 { 187 | iface MIXER 188 | name '3D Volume' 189 | value 4 190 | comment { 191 | access 'read write' 192 | type INTEGER 193 | count 1 194 | range '0 - 15' 195 | } 196 | } 197 | control.18 { 198 | iface MIXER 199 | name '3D Lower Cut-off' 200 | value '200Hz' 201 | comment { 202 | access 'read write' 203 | type ENUMERATED 204 | count 1 205 | item.0 '200Hz' 206 | item.1 '500Hz' 207 | } 208 | } 209 | control.19 { 210 | iface MIXER 211 | name '3D Upper Cut-off' 212 | value '2.2kHz' 213 | comment { 214 | access 'read write' 215 | type ENUMERATED 216 | count 1 217 | item.0 '2.2kHz' 218 | item.1 '1.5kHz' 219 | } 220 | } 221 | control.20 { 222 | iface MIXER 223 | name '3D Mode' 224 | value Capture 225 | comment { 226 | access 'read write' 227 | type ENUMERATED 228 | count 1 229 | item.0 Capture 230 | item.1 Playback 231 | } 232 | } 233 | control.21 { 234 | iface MIXER 235 | name 'ALC Capture Target Volume' 236 | value 3 237 | comment { 238 | access 'read write' 239 | type INTEGER 240 | count 1 241 | range '0 - 7' 242 | } 243 | } 244 | control.22 { 245 | iface MIXER 246 | name 'ALC Capture Max Volume' 247 | value 7 248 | comment { 249 | access 'read write' 250 | type INTEGER 251 | count 1 252 | range '0 - 7' 253 | } 254 | } 255 | control.23 { 256 | iface MIXER 257 | name 'ALC Capture Function' 258 | value Off 259 | comment { 260 | access 'read write' 261 | type ENUMERATED 262 | count 1 263 | item.0 Off 264 | item.1 Right 265 | item.2 Left 266 | item.3 Stereo 267 | } 268 | } 269 | control.24 { 270 | iface MIXER 271 | name 'ALC Capture ZC Switch' 272 | value false 273 | comment { 274 | access 'read write' 275 | type BOOLEAN 276 | count 1 277 | } 278 | } 279 | control.25 { 280 | iface MIXER 281 | name 'ALC Capture Hold Time' 282 | value 0 283 | comment { 284 | access 'read write' 285 | type INTEGER 286 | count 1 287 | range '0 - 15' 288 | } 289 | } 290 | control.26 { 291 | iface MIXER 292 | name 'ALC Capture Decay Time' 293 | value 3 294 | comment { 295 | access 'read write' 296 | type INTEGER 297 | count 1 298 | range '0 - 15' 299 | } 300 | } 301 | control.27 { 302 | iface MIXER 303 | name 'ALC Capture Attack Time' 304 | value 2 305 | comment { 306 | access 'read write' 307 | type INTEGER 308 | count 1 309 | range '0 - 15' 310 | } 311 | } 312 | control.28 { 313 | iface MIXER 314 | name 'ALC Capture NG Threshold' 315 | value 0 316 | comment { 317 | access 'read write' 318 | type INTEGER 319 | count 1 320 | range '0 - 31' 321 | } 322 | } 323 | control.29 { 324 | iface MIXER 325 | name 'ALC Capture NG Type' 326 | value '2.2kHz' 327 | comment { 328 | access 'read write' 329 | type ENUMERATED 330 | count 1 331 | item.0 '2.2kHz' 332 | item.1 '1.5kHz' 333 | } 334 | } 335 | control.30 { 336 | iface MIXER 337 | name 'ALC Capture NG Switch' 338 | value false 339 | comment { 340 | access 'read write' 341 | type BOOLEAN 342 | count 1 343 | } 344 | } 345 | control.31 { 346 | iface MIXER 347 | name 'Left ADC Capture Volume' 348 | value 195 349 | comment { 350 | access 'read write' 351 | type INTEGER 352 | count 1 353 | range '0 - 255' 354 | } 355 | } 356 | control.32 { 357 | iface MIXER 358 | name 'Right ADC Capture Volume' 359 | value 195 360 | comment { 361 | access 'read write' 362 | type INTEGER 363 | count 1 364 | range '0 - 255' 365 | } 366 | } 367 | control.33 { 368 | iface MIXER 369 | name 'ZC Timeout Switch' 370 | value false 371 | comment { 372 | access 'read write' 373 | type BOOLEAN 374 | count 1 375 | } 376 | } 377 | control.34 { 378 | iface MIXER 379 | name 'Playback Invert Switch' 380 | value false 381 | comment { 382 | access 'read write' 383 | type BOOLEAN 384 | count 1 385 | } 386 | } 387 | control.35 { 388 | iface MIXER 389 | name 'Right Speaker Playback Invert Switch' 390 | value true 391 | comment { 392 | access 'read write' 393 | type BOOLEAN 394 | count 1 395 | } 396 | } 397 | control.36 { 398 | iface MIXER 399 | name 'Mic Boost' 400 | value.0 0 401 | value.1 0 402 | comment { 403 | access 'read write' 404 | type INTEGER 405 | count 2 406 | range '0 - 3' 407 | } 408 | } 409 | control.37 { 410 | iface MIXER 411 | name 'Bypass Left Playback Volume' 412 | value.0 2 413 | value.1 2 414 | comment { 415 | access 'read write' 416 | type INTEGER 417 | count 2 418 | range '0 - 7' 419 | } 420 | } 421 | control.38 { 422 | iface MIXER 423 | name 'Bypass Right Playback Volume' 424 | value.0 2 425 | value.1 2 426 | comment { 427 | access 'read write' 428 | type INTEGER 429 | count 2 430 | range '0 - 7' 431 | } 432 | } 433 | control.39 { 434 | iface MIXER 435 | name 'Bypass Mono Playback Volume' 436 | value.0 2 437 | value.1 2 438 | comment { 439 | access 'read write' 440 | type INTEGER 441 | count 2 442 | range '0 - 7' 443 | } 444 | } 445 | control.40 { 446 | iface MIXER 447 | name 'Mono Playback ZC Switch' 448 | value false 449 | comment { 450 | access 'read write' 451 | type BOOLEAN 452 | count 1 453 | } 454 | } 455 | control.41 { 456 | iface MIXER 457 | name 'Headphone Playback Volume' 458 | value.0 100 459 | value.1 100 460 | comment { 461 | access 'read write' 462 | type INTEGER 463 | count 2 464 | range '0 - 127' 465 | } 466 | } 467 | control.42 { 468 | iface MIXER 469 | name 'Speaker Playback Volume' 470 | value.0 121 471 | value.1 121 472 | comment { 473 | access 'read write' 474 | type INTEGER 475 | count 2 476 | range '0 - 127' 477 | } 478 | } 479 | control.43 { 480 | iface MIXER 481 | name 'Mono Playback Volume' 482 | value 121 483 | comment { 484 | access 'read write' 485 | type INTEGER 486 | count 1 487 | range '0 - 127' 488 | } 489 | } 490 | control.44 { 491 | iface CARD 492 | name 'Headphones Jack' 493 | value true 494 | comment { 495 | access read 496 | type BOOLEAN 497 | count 1 498 | } 499 | } 500 | control.45 { 501 | iface CARD 502 | name 'Speaker Jack' 503 | value true 504 | comment { 505 | access read 506 | type BOOLEAN 507 | count 1 508 | } 509 | } 510 | control.46 { 511 | iface MIXER 512 | name 'Left Mixer Playback Switch' 513 | value true 514 | comment { 515 | access 'read write' 516 | type BOOLEAN 517 | count 1 518 | } 519 | } 520 | control.47 { 521 | iface MIXER 522 | name 'Left Mixer Left Bypass Switch' 523 | value false 524 | comment { 525 | access 'read write' 526 | type BOOLEAN 527 | count 1 528 | } 529 | } 530 | control.48 { 531 | iface MIXER 532 | name 'Left Mixer Right Playback Switch' 533 | value false 534 | comment { 535 | access 'read write' 536 | type BOOLEAN 537 | count 1 538 | } 539 | } 540 | control.49 { 541 | iface MIXER 542 | name 'Left Mixer Right Bypass Switch' 543 | value false 544 | comment { 545 | access 'read write' 546 | type BOOLEAN 547 | count 1 548 | } 549 | } 550 | control.50 { 551 | iface MIXER 552 | name 'Right Mixer Left Playback Switch' 553 | value false 554 | comment { 555 | access 'read write' 556 | type BOOLEAN 557 | count 1 558 | } 559 | } 560 | control.51 { 561 | iface MIXER 562 | name 'Right Mixer Left Bypass Switch' 563 | value false 564 | comment { 565 | access 'read write' 566 | type BOOLEAN 567 | count 1 568 | } 569 | } 570 | control.52 { 571 | iface MIXER 572 | name 'Right Mixer Playback Switch' 573 | value true 574 | comment { 575 | access 'read write' 576 | type BOOLEAN 577 | count 1 578 | } 579 | } 580 | control.53 { 581 | iface MIXER 582 | name 'Right Mixer Right Bypass Switch' 583 | value false 584 | comment { 585 | access 'read write' 586 | type BOOLEAN 587 | count 1 588 | } 589 | } 590 | control.54 { 591 | iface MIXER 592 | name 'Mono Mixer Left Playback Switch' 593 | value false 594 | comment { 595 | access 'read write' 596 | type BOOLEAN 597 | count 1 598 | } 599 | } 600 | control.55 { 601 | iface MIXER 602 | name 'Mono Mixer Left Bypass Switch' 603 | value false 604 | comment { 605 | access 'read write' 606 | type BOOLEAN 607 | count 1 608 | } 609 | } 610 | control.56 { 611 | iface MIXER 612 | name 'Mono Mixer Right Playback Switch' 613 | value false 614 | comment { 615 | access 'read write' 616 | type BOOLEAN 617 | count 1 618 | } 619 | } 620 | control.57 { 621 | iface MIXER 622 | name 'Mono Mixer Right Bypass Switch' 623 | value false 624 | comment { 625 | access 'read write' 626 | type BOOLEAN 627 | count 1 628 | } 629 | } 630 | control.58 { 631 | iface MIXER 632 | name 'Left PGA Mux' 633 | value 'Line 1' 634 | comment { 635 | access 'read write' 636 | type ENUMERATED 637 | count 1 638 | item.0 'Line 1' 639 | item.1 'Line 2' 640 | item.2 'Line 3' 641 | item.3 Differential 642 | } 643 | } 644 | control.59 { 645 | iface MIXER 646 | name 'Right PGA Mux' 647 | value 'Line 1' 648 | comment { 649 | access 'read write' 650 | type ENUMERATED 651 | count 1 652 | item.0 'Line 1' 653 | item.1 'Line 2' 654 | item.2 'Line 3' 655 | item.3 Differential 656 | } 657 | } 658 | control.60 { 659 | iface MIXER 660 | name 'Left Line Mux' 661 | value 'Line 1' 662 | comment { 663 | access 'read write' 664 | type ENUMERATED 665 | count 1 666 | item.0 'Line 1' 667 | item.1 'Line 2' 668 | item.2 'Line 3' 669 | item.3 PGA 670 | item.4 Differential 671 | } 672 | } 673 | control.61 { 674 | iface MIXER 675 | name 'Right Line Mux' 676 | value 'Line 1' 677 | comment { 678 | access 'read write' 679 | type ENUMERATED 680 | count 1 681 | item.0 'Line 1' 682 | item.1 'Line 2' 683 | item.2 'Line 3' 684 | item.3 PGA 685 | item.4 Differential 686 | } 687 | } 688 | control.62 { 689 | iface MIXER 690 | name 'Out3 Mux' 691 | value VREF 692 | comment { 693 | access 'read write' 694 | type ENUMERATED 695 | count 1 696 | item.0 VREF 697 | item.1 'ROUT1 + Vol' 698 | item.2 MonoOut 699 | item.3 ROUT1 700 | } 701 | } 702 | control.63 { 703 | iface MIXER 704 | name 'Differential Mux' 705 | value 'Line 1' 706 | comment { 707 | access 'read write' 708 | type ENUMERATED 709 | count 1 710 | item.0 'Line 1' 711 | item.1 'Line 2' 712 | } 713 | } 714 | control.64 { 715 | iface MIXER 716 | name Route 717 | value Stereo 718 | comment { 719 | access 'read write' 720 | type ENUMERATED 721 | count 1 722 | item.0 Stereo 723 | item.1 'Mono (Left)' 724 | item.2 'Mono (Right)' 725 | item.3 'Digital Mono' 726 | } 727 | } 728 | } 729 | -------------------------------------------------------------------------------- /pxa/config-4.4: -------------------------------------------------------------------------------- 1 | CONFIG_ADVISE_SYSCALLS=y 2 | CONFIG_ALIGNMENT_TRAP=y 3 | CONFIG_APM_EMULATION=y 4 | CONFIG_APM_POWER=y 5 | # CONFIG_ARCH_GUMSTIX is not set 6 | CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y 7 | CONFIG_ARCH_HAS_ELF_RANDOMIZE=y 8 | CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y 9 | # CONFIG_ARCH_HAS_SG_CHAIN is not set 10 | CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y 11 | CONFIG_ARCH_HIBERNATION_POSSIBLE=y 12 | # CONFIG_ARCH_LUBBOCK is not set 13 | CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y 14 | CONFIG_ARCH_MTD_XIP=y 15 | CONFIG_ARCH_NR_GPIO=0 16 | CONFIG_ARCH_PXA=y 17 | # CONFIG_ARCH_PXA_ESERIES is not set 18 | # CONFIG_ARCH_PXA_IDP is not set 19 | # CONFIG_ARCH_PXA_PALM is not set 20 | CONFIG_ARCH_REQUIRE_GPIOLIB=y 21 | # CONFIG_ARCH_SELECT_MEMORY_MODEL is not set 22 | # CONFIG_ARCH_SPARSEMEM_DEFAULT is not set 23 | CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y 24 | CONFIG_ARCH_SUPPORTS_UPROBES=y 25 | CONFIG_ARCH_SUSPEND_POSSIBLE=y 26 | CONFIG_ARCH_USE_BUILTIN_BSWAP=y 27 | CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y 28 | # CONFIG_ARCH_VIPER is not set 29 | CONFIG_ARCH_WANT_GENERAL_HUGETLB=y 30 | CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y 31 | CONFIG_ARM=y 32 | CONFIG_ARM_APPENDED_DTB=y 33 | CONFIG_ARM_ATAG_DTB_COMPAT=y 34 | # CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND is not set 35 | CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y 36 | CONFIG_ARM_CPU_SUSPEND=y 37 | CONFIG_ARM_L1_CACHE_SHIFT=5 38 | CONFIG_ARM_PATCH_PHYS_VIRT=y 39 | CONFIG_ARM_PXA2xx_CPUFREQ=y 40 | CONFIG_ARM_THUMB=y 41 | CONFIG_ATAGS=y 42 | CONFIG_AUTO_ZRELADDR=y 43 | CONFIG_BACKLIGHT_CLASS_DEVICE=y 44 | CONFIG_BACKLIGHT_LCD_SUPPORT=y 45 | CONFIG_BACKLIGHT_PWM=y 46 | CONFIG_BATTERY_Z2=y 47 | CONFIG_BINFMT_MISC=m 48 | CONFIG_BLK_CGROUP=y 49 | CONFIG_BLK_DEV_LOOP=y 50 | CONFIG_BLK_DEV_RAM=y 51 | CONFIG_BLK_DEV_RAM_COUNT=16 52 | CONFIG_BLK_DEV_RAM_SIZE=4096 53 | CONFIG_BLK_DEV_SD=y 54 | CONFIG_BSD_PROCESS_ACCT=y 55 | CONFIG_BSD_PROCESS_ACCT_V3=y 56 | CONFIG_BUILD_BIN2C=y 57 | # CONFIG_CACHE_L2X0 is not set 58 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y 59 | # CONFIG_CFS_BANDWIDTH is not set 60 | CONFIG_CGROUPS=y 61 | # CONFIG_CGROUP_CPUACCT is not set 62 | # CONFIG_CGROUP_DEVICE is not set 63 | # CONFIG_CGROUP_FREEZER is not set 64 | # CONFIG_CGROUP_NET_CLASSID is not set 65 | # CONFIG_CGROUP_PIDS is not set 66 | CONFIG_CGROUP_SCHED=y 67 | CONFIG_CLKDEV_LOOKUP=y 68 | CONFIG_CLKSRC_MMIO=y 69 | CONFIG_CLKSRC_OF=y 70 | CONFIG_CLKSRC_PROBE=y 71 | CONFIG_CLKSRC_PXA=y 72 | CONFIG_CLONE_BACKWARDS=y 73 | CONFIG_CMDLINE="console=ttyS2,115200 root=/dev/mmcblk0p2 rootdelay=2 fbcon=rotate:3 debug init=/etc/preinit" 74 | CONFIG_CMDLINE_FROM_BOOTLOADER=y 75 | CONFIG_COMMON_CLK=y 76 | CONFIG_COMMON_CLK_PXA=y 77 | CONFIG_CONFIGFS_FS=m 78 | CONFIG_CONSOLE_TRANSLATIONS=y 79 | CONFIG_COREDUMP=y 80 | # CONFIG_CPUFREQ_DT is not set 81 | # CONFIG_CPUSETS is not set 82 | CONFIG_CPU_32v5=y 83 | CONFIG_CPU_ABRT_EV5T=y 84 | CONFIG_CPU_CACHE_VIVT=y 85 | CONFIG_CPU_CP15=y 86 | CONFIG_CPU_CP15_MMU=y 87 | CONFIG_CPU_FREQ=y 88 | # CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set 89 | CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y 90 | # CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set 91 | # CONFIG_CPU_FREQ_GOV_ONDEMAND is not set 92 | # CONFIG_CPU_FREQ_GOV_PERFORMANCE is not set 93 | # CONFIG_CPU_FREQ_GOV_POWERSAVE is not set 94 | CONFIG_CPU_FREQ_GOV_USERSPACE=y 95 | CONFIG_CPU_FREQ_STAT=y 96 | CONFIG_CPU_IDLE=y 97 | CONFIG_CPU_IDLE_GOV_LADDER=y 98 | CONFIG_CPU_IDLE_GOV_MENU=y 99 | CONFIG_CPU_PABRT_LEGACY=y 100 | CONFIG_CPU_PM=y 101 | CONFIG_CPU_TLB_V4WBI=y 102 | CONFIG_CPU_USE_DOMAINS=y 103 | CONFIG_CPU_XSCALE=y 104 | CONFIG_CROSS_MEMORY_ATTACH=y 105 | CONFIG_CRYPTO_RNG2=y 106 | CONFIG_CRYPTO_WORKQUEUE=y 107 | # CONFIG_DEBUG_BLK_CGROUP is not set 108 | CONFIG_DEBUG_BUGVERBOSE=y 109 | # CONFIG_DEBUG_FS is not set 110 | # CONFIG_DEBUG_KERNEL is not set 111 | CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" 112 | CONFIG_DEBUG_MEMORY_INIT=y 113 | # CONFIG_DEBUG_UART_8250 is not set 114 | # CONFIG_DEBUG_USER is not set 115 | CONFIG_DEFAULT_HOSTNAME="zipitz2" 116 | CONFIG_DEFAULT_IOSCHED="noop" 117 | CONFIG_DEFAULT_NOOP=y 118 | CONFIG_DEVMEM=y 119 | CONFIG_DIRECT_IO=y 120 | CONFIG_DMADEVICES=y 121 | CONFIG_DMA_ENGINE=y 122 | CONFIG_DMA_OF=y 123 | CONFIG_DMA_VIRTUAL_CHANNELS=y 124 | CONFIG_DNOTIFY=y 125 | CONFIG_DTC=y 126 | CONFIG_DUMMY_CONSOLE=y 127 | CONFIG_EDAC_ATOMIC_SCRUB=y 128 | CONFIG_EDAC_SUPPORT=y 129 | CONFIG_ELF_CORE=y 130 | # CONFIG_EMBEDDED is not set 131 | CONFIG_ENABLE_MUST_CHECK=y 132 | # CONFIG_ETHERNET is not set 133 | # CONFIG_EXPERT is not set 134 | CONFIG_EXT2_FS=y 135 | # CONFIG_EXT2_FS_POSIX_ACL is not set 136 | # CONFIG_EXT2_FS_SECURITY is not set 137 | CONFIG_EXT2_FS_XATTR=y 138 | CONFIG_FAIR_GROUP_SCHED=y 139 | # CONFIG_FANCY_BEEP is not set 140 | CONFIG_FB=y 141 | CONFIG_FB_CFB_COPYAREA=y 142 | CONFIG_FB_CFB_FILLRECT=y 143 | CONFIG_FB_CFB_IMAGEBLIT=y 144 | CONFIG_FB_CMDLINE=y 145 | # CONFIG_FB_MBX is not set 146 | CONFIG_FB_PXA=y 147 | CONFIG_FB_PXA_OVERLAY=y 148 | # CONFIG_FB_PXA_PARAMETERS is not set 149 | # CONFIG_FB_PXA_SMARTPANEL is not set 150 | # CONFIG_FB_W100 is not set 151 | CONFIG_FIX_EARLYCON_MEM=y 152 | CONFIG_FONTS=y 153 | # CONFIG_FONT_10x18 is not set 154 | # CONFIG_FONT_6x10 is not set 155 | # CONFIG_FONT_6x11 is not set 156 | # CONFIG_FONT_7x14 is not set 157 | # CONFIG_FONT_8x16 is not set 158 | # CONFIG_FONT_8x8 is not set 159 | # CONFIG_FONT_ACORN_8x8 is not set 160 | CONFIG_FONT_MINI_4x6=y 161 | # CONFIG_FONT_PEARL_8x8 is not set 162 | # CONFIG_FONT_SUN12x22 is not set 163 | # CONFIG_FONT_SUN8x16 is not set 164 | CONFIG_FONT_SUPPORT=y 165 | CONFIG_FRAMEBUFFER_CONSOLE=y 166 | CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y 167 | CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y 168 | CONFIG_FRAME_POINTER=y 169 | CONFIG_FREEZER=y 170 | CONFIG_FS_MBCACHE=y 171 | CONFIG_GENERIC_ALLOCATOR=y 172 | CONFIG_GENERIC_ATOMIC64=y 173 | CONFIG_GENERIC_BUG=y 174 | CONFIG_GENERIC_CLOCKEVENTS=y 175 | CONFIG_GENERIC_IDLE_POLL_SETUP=y 176 | CONFIG_GENERIC_IO=y 177 | CONFIG_GENERIC_IRQ_SHOW=y 178 | CONFIG_GENERIC_IRQ_SHOW_LEVEL=y 179 | CONFIG_GENERIC_PCI_IOMAP=y 180 | CONFIG_GENERIC_SCHED_CLOCK=y 181 | CONFIG_GENERIC_SMP_IDLE_THREAD=y 182 | CONFIG_GENERIC_STRNCPY_FROM_USER=y 183 | CONFIG_GENERIC_STRNLEN_USER=y 184 | CONFIG_GPIOLIB=y 185 | CONFIG_GPIO_DEVRES=y 186 | CONFIG_GPIO_PXA=y 187 | CONFIG_GPIO_SYSFS=y 188 | CONFIG_HANDLE_DOMAIN_IRQ=y 189 | CONFIG_HARDIRQS_SW_RESEND=y 190 | CONFIG_HAS_DMA=y 191 | CONFIG_HAS_IOMEM=y 192 | CONFIG_HAS_IOPORT_MAP=y 193 | # CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set 194 | CONFIG_HAVE_ARCH_AUDITSYSCALL=y 195 | # CONFIG_HAVE_ARCH_BITREVERSE is not set 196 | CONFIG_HAVE_ARCH_JUMP_LABEL=y 197 | CONFIG_HAVE_ARCH_KGDB=y 198 | CONFIG_HAVE_ARCH_PFN_VALID=y 199 | CONFIG_HAVE_ARCH_SECCOMP_FILTER=y 200 | CONFIG_HAVE_ARCH_TRACEHOOK=y 201 | # CONFIG_HAVE_BOOTMEM_INFO_NODE is not set 202 | CONFIG_HAVE_BPF_JIT=y 203 | CONFIG_HAVE_CC_STACKPROTECTOR=y 204 | CONFIG_HAVE_CLK=y 205 | CONFIG_HAVE_CLK_PREPARE=y 206 | CONFIG_HAVE_CONTEXT_TRACKING=y 207 | CONFIG_HAVE_C_RECORDMCOUNT=y 208 | CONFIG_HAVE_DEBUG_KMEMLEAK=y 209 | CONFIG_HAVE_DMA_API_DEBUG=y 210 | CONFIG_HAVE_DMA_ATTRS=y 211 | CONFIG_HAVE_DMA_CONTIGUOUS=y 212 | CONFIG_HAVE_DYNAMIC_FTRACE=y 213 | CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 214 | CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y 215 | CONFIG_HAVE_FUNCTION_TRACER=y 216 | CONFIG_HAVE_GENERIC_DMA_COHERENT=y 217 | CONFIG_HAVE_IDE=y 218 | CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y 219 | CONFIG_HAVE_KERNEL_GZIP=y 220 | CONFIG_HAVE_KERNEL_LZ4=y 221 | CONFIG_HAVE_KERNEL_LZMA=y 222 | CONFIG_HAVE_KERNEL_LZO=y 223 | CONFIG_HAVE_KERNEL_XZ=y 224 | CONFIG_HAVE_LATENCYTOP_SUPPORT=y 225 | CONFIG_HAVE_MEMBLOCK=y 226 | CONFIG_HAVE_MOD_ARCH_SPECIFIC=y 227 | CONFIG_HAVE_NET_DSA=y 228 | CONFIG_HAVE_OPROFILE=y 229 | CONFIG_HAVE_OPTPROBES=y 230 | CONFIG_HAVE_PERF_EVENTS=y 231 | CONFIG_HAVE_PERF_REGS=y 232 | CONFIG_HAVE_PERF_USER_STACK_DUMP=y 233 | CONFIG_HAVE_PROC_CPU=y 234 | CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y 235 | CONFIG_HAVE_SYSCALL_TRACEPOINTS=y 236 | CONFIG_HAVE_UID16=y 237 | CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y 238 | CONFIG_HW_CONSOLE=y 239 | CONFIG_HZ=250 240 | # CONFIG_HZ_100 is not set 241 | CONFIG_HZ_250=y 242 | CONFIG_HZ_FIXED=0 243 | CONFIG_I2C=y 244 | CONFIG_I2C_BOARDINFO=y 245 | CONFIG_I2C_CHARDEV=y 246 | CONFIG_I2C_COMPAT=y 247 | CONFIG_I2C_HELPER_AUTO=y 248 | CONFIG_I2C_PXA=y 249 | # CONFIG_I2C_PXA_SLAVE is not set 250 | CONFIG_IKCONFIG=y 251 | CONFIG_IKCONFIG_PROC=y 252 | CONFIG_INITRAMFS_SOURCE="" 253 | CONFIG_INPUT=y 254 | CONFIG_INPUT_KEYBOARD=y 255 | CONFIG_INPUT_MATRIXKMAP=y 256 | CONFIG_INPUT_MOUSE=y 257 | CONFIG_INPUT_MOUSEDEV=y 258 | CONFIG_INPUT_MOUSEDEV_PSAUX=y 259 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 260 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 261 | CONFIG_IOMMU_HELPER=y 262 | # CONFIG_IOSCHED_DEADLINE is not set 263 | CONFIG_IRQCHIP=y 264 | CONFIG_IRQ_DOMAIN=y 265 | CONFIG_IRQ_FORCED_THREADING=y 266 | CONFIG_IRQ_WORK=y 267 | # CONFIG_ISDN is not set 268 | CONFIG_IWMMXT=y 269 | CONFIG_JFFS2_ZLIB=y 270 | CONFIG_JUMP_LABEL=y 271 | CONFIG_KALLSYMS=y 272 | CONFIG_KEYBOARD_GPIO=y 273 | CONFIG_KEYBOARD_PXA27x=y 274 | CONFIG_LCD_CLASS_DEVICE=y 275 | CONFIG_LCD_LMS283GF05=y 276 | # CONFIG_LCD_PLATFORM is not set 277 | CONFIG_LEDS_GPIO=m 278 | CONFIG_LEDS_TRIGGER_BACKLIGHT=m 279 | CONFIG_LEDS_TRIGGER_DEFAULT_ON=m 280 | CONFIG_LEDS_TRIGGER_GPIO=m 281 | CONFIG_LEDS_TRIGGER_HEARTBEAT=m 282 | CONFIG_LEDS_TRIGGER_NETDEV=m 283 | CONFIG_LEDS_TRIGGER_TIMER=m 284 | CONFIG_LIBFDT=y 285 | CONFIG_LZ4_COMPRESS=y 286 | CONFIG_LZ4_DECOMPRESS=y 287 | CONFIG_LZO_COMPRESS=y 288 | CONFIG_LZO_DECOMPRESS=y 289 | # CONFIG_MACH_ARCOM_ZEUS is not set 290 | # CONFIG_MACH_ARMCORE is not set 291 | # CONFIG_MACH_BALLOON3 is not set 292 | # CONFIG_MACH_CAPC7117 is not set 293 | # CONFIG_MACH_CM_X300 is not set 294 | # CONFIG_MACH_COLIBRI is not set 295 | # CONFIG_MACH_COLIBRI300 is not set 296 | # CONFIG_MACH_COLIBRI320 is not set 297 | # CONFIG_MACH_CSB726 is not set 298 | # CONFIG_MACH_EM_X270 is not set 299 | # CONFIG_MACH_EXEDA is not set 300 | # CONFIG_MACH_H4700 is not set 301 | # CONFIG_MACH_H5000 is not set 302 | # CONFIG_MACH_HIMALAYA is not set 303 | # CONFIG_MACH_ICONTROL is not set 304 | # CONFIG_MACH_INTELMOTE2 is not set 305 | # CONFIG_MACH_LITTLETON is not set 306 | # CONFIG_MACH_LOGICPD_PXA270 is not set 307 | # CONFIG_MACH_MAGICIAN is not set 308 | # CONFIG_MACH_MAINSTONE is not set 309 | # CONFIG_MACH_MIOA701 is not set 310 | # CONFIG_MACH_MP900C is not set 311 | # CONFIG_MACH_PCM027 is not set 312 | # CONFIG_MACH_PXA27X_DT is not set 313 | # CONFIG_MACH_PXA3XX_DT is not set 314 | # CONFIG_MACH_RAUMFELD_CONNECTOR is not set 315 | # CONFIG_MACH_RAUMFELD_RC is not set 316 | # CONFIG_MACH_RAUMFELD_SPEAKER is not set 317 | # CONFIG_MACH_SAAR is not set 318 | # CONFIG_MACH_STARGATE2 is not set 319 | # CONFIG_MACH_TAVOREVB is not set 320 | # CONFIG_MACH_VPAC270 is not set 321 | # CONFIG_MACH_XCEP is not set 322 | CONFIG_MACH_ZIPIT2=y 323 | # CONFIG_MACH_ZYLONITE300 is not set 324 | # CONFIG_MACH_ZYLONITE320 is not set 325 | # CONFIG_MEMCG is not set 326 | CONFIG_MMC=y 327 | CONFIG_MMC_BLOCK=y 328 | CONFIG_MMC_PXA=y 329 | # CONFIG_MMP_PDMA is not set 330 | CONFIG_MODULES_USE_ELF_REL=y 331 | # CONFIG_MOUSE_BCM5974 is not set 332 | # CONFIG_MOUSE_CYAPA is not set 333 | # CONFIG_MOUSE_NAVPOINT_PXA27x is not set 334 | # CONFIG_MOUSE_PS2 is not set 335 | # CONFIG_MOUSE_SERIAL is not set 336 | # CONFIG_MOUSE_VSXXXAA is not set 337 | CONFIG_MTD_CFI_ADV_OPTIONS=y 338 | # CONFIG_MTD_CFI_AMDSTD is not set 339 | CONFIG_MTD_CFI_GEOMETRY=y 340 | # CONFIG_MTD_CFI_I2 is not set 341 | # CONFIG_MTD_MAP_BANK_WIDTH_1 is not set 342 | # CONFIG_MTD_MAP_BANK_WIDTH_4 is not set 343 | CONFIG_MTD_PHYSMAP=y 344 | CONFIG_MTD_PXA2XX=y 345 | # CONFIG_MTD_XIP is not set 346 | CONFIG_MULTI_IRQ_HANDLER=y 347 | CONFIG_NAMESPACES=y 348 | CONFIG_NEED_DMA_MAP_STATE=y 349 | CONFIG_NEED_KUSER_HELPERS=y 350 | CONFIG_NEED_PER_CPU_KM=y 351 | # CONFIG_NET_CLS_CGROUP is not set 352 | # CONFIG_NET_NS is not set 353 | CONFIG_NLS=y 354 | CONFIG_NO_BOOTMEM=y 355 | CONFIG_NO_HZ=y 356 | CONFIG_NO_HZ_COMMON=y 357 | CONFIG_NO_HZ_IDLE=y 358 | CONFIG_OF=y 359 | CONFIG_OF_ADDRESS=y 360 | CONFIG_OF_EARLY_FLATTREE=y 361 | CONFIG_OF_FLATTREE=y 362 | CONFIG_OF_GPIO=y 363 | CONFIG_OF_IRQ=y 364 | CONFIG_OF_MTD=y 365 | CONFIG_OF_NET=y 366 | CONFIG_OF_RESERVED_MEM=y 367 | CONFIG_OLD_SIGACTION=y 368 | CONFIG_OLD_SIGSUSPEND3=y 369 | CONFIG_OPROFILE=m 370 | CONFIG_PAGE_OFFSET=0xC0000000 371 | # CONFIG_PCI_DOMAINS_GENERIC is not set 372 | # CONFIG_PCI_SYSCALL is not set 373 | CONFIG_PDA_POWER=y 374 | CONFIG_PERF_USE_VMALLOC=y 375 | CONFIG_PGTABLE_LEVELS=2 376 | # CONFIG_PGTABLE_MAPPING is not set 377 | CONFIG_PLAT_PXA=y 378 | CONFIG_PM=y 379 | CONFIG_PM_CLK=y 380 | # CONFIG_PM_DEBUG is not set 381 | CONFIG_PM_SLEEP=y 382 | CONFIG_POSIX_MQUEUE=y 383 | CONFIG_POSIX_MQUEUE_SYSCTL=y 384 | CONFIG_POWER_SUPPLY=y 385 | CONFIG_PREEMPT=y 386 | CONFIG_PREEMPT_COUNT=y 387 | # CONFIG_PREEMPT_NONE is not set 388 | CONFIG_PREEMPT_RCU=y 389 | CONFIG_PROC_PAGE_MONITOR=y 390 | CONFIG_PROFILING=y 391 | CONFIG_PWM=y 392 | CONFIG_PWM_PXA=y 393 | CONFIG_PWM_SYSFS=y 394 | CONFIG_PXA27x=y 395 | # CONFIG_PXA3XX_GCU is not set 396 | CONFIG_PXA_DMA=y 397 | # CONFIG_PXA_EZX is not set 398 | # CONFIG_PXA_SHARPSL is not set 399 | CONFIG_PXA_SSP=y 400 | # CONFIG_PXA_SYSTEMS_CPLDS is not set 401 | CONFIG_RATIONAL=y 402 | # CONFIG_RCU_BOOST is not set 403 | CONFIG_RCU_STALL_COMMON=y 404 | CONFIG_REGMAP=m 405 | CONFIG_REGMAP_I2C=m 406 | CONFIG_REGMAP_SPI=m 407 | CONFIG_RING_BUFFER=y 408 | CONFIG_RING_BUFFER_ALLOW_SWAP=y 409 | CONFIG_RTC_CLASS=y 410 | # CONFIG_RTC_DRV_CMOS is not set 411 | CONFIG_RTC_DRV_PXA=y 412 | CONFIG_RTC_DRV_SA1100=y 413 | # CONFIG_RT_GROUP_SCHED is not set 414 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y 415 | CONFIG_SA1100_WATCHDOG=y 416 | CONFIG_SCHED_HRTICK=y 417 | # CONFIG_SCHED_INFO is not set 418 | CONFIG_SCSI=y 419 | # CONFIG_SERIAL_8250 is not set 420 | CONFIG_SERIAL_PXA=y 421 | CONFIG_SERIAL_PXA_CONSOLE=y 422 | CONFIG_SLUB_DEBUG=y 423 | CONFIG_SPARSE_IRQ=y 424 | CONFIG_SPI=y 425 | CONFIG_SPI_MASTER=y 426 | CONFIG_SPI_PXA2XX=y 427 | CONFIG_SPI_PXA2XX_DMA=y 428 | CONFIG_SPLIT_PTLOCK_CPUS=999999 429 | CONFIG_SRCU=y 430 | CONFIG_SUSPEND=y 431 | CONFIG_SUSPEND_FREEZER=y 432 | CONFIG_SWIOTLB=y 433 | CONFIG_SYSFS_SYSCALL=y 434 | CONFIG_SYS_SUPPORTS_APM_EMULATION=y 435 | CONFIG_TICK_CPU_ACCOUNTING=y 436 | CONFIG_TRACE_CLOCK=y 437 | # CONFIG_TRIZEPS_PXA is not set 438 | CONFIG_UACCESS_WITH_MEMCPY=y 439 | CONFIG_UNCOMPRESS_INCLUDE="mach/uncompress.h" 440 | CONFIG_UNINLINE_SPIN_UNLOCK=y 441 | CONFIG_USB=y 442 | CONFIG_USB_COMMON=y 443 | # CONFIG_USB_EHCI_HCD is not set 444 | # CONFIG_USB_ETH is not set 445 | CONFIG_USB_GADGET=y 446 | CONFIG_USB_OHCI_HCD=y 447 | # CONFIG_USB_OHCI_HCD_PLATFORM is not set 448 | CONFIG_USB_OHCI_HCD_PXA27X=y 449 | CONFIG_USB_PXA27X=y 450 | CONFIG_USB_STORAGE=y 451 | CONFIG_USB_SUPPORT=y 452 | CONFIG_USELIB=y 453 | # CONFIG_USER_NS is not set 454 | CONFIG_USE_OF=y 455 | CONFIG_UTS_NS=y 456 | CONFIG_VECTORS_BASE=0xffff0000 457 | # CONFIG_VLAN_8021Q is not set 458 | CONFIG_VM_EVENT_COUNTERS=y 459 | CONFIG_VT=y 460 | CONFIG_VT_CONSOLE=y 461 | CONFIG_VT_CONSOLE_SLEEP=y 462 | CONFIG_VT_HW_CONSOLE_BINDING=y 463 | # CONFIG_WEXT_PRIV is not set 464 | # CONFIG_WL_TI is not set 465 | # CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set 466 | CONFIG_XZ_DEC_ARM=y 467 | CONFIG_XZ_DEC_ARMTHUMB=y 468 | CONFIG_XZ_DEC_BCJ=y 469 | CONFIG_XZ_DEC_IA64=y 470 | CONFIG_XZ_DEC_POWERPC=y 471 | CONFIG_XZ_DEC_SPARC=y 472 | CONFIG_XZ_DEC_X86=y 473 | CONFIG_ZBOOT_ROM_BSS=0x0 474 | CONFIG_ZBOOT_ROM_TEXT=0x0 475 | CONFIG_ZLIB_DEFLATE=y 476 | CONFIG_ZLIB_INFLATE=y 477 | CONFIG_ZONE_DMA_FLAG=0 478 | CONFIG_ZSMALLOC=y 479 | # CONFIG_ZSMALLOC_STAT is not set 480 | -------------------------------------------------------------------------------- /patches/openwrt-packages/010-nano-bump-version-and-add-syntax-package.patch: -------------------------------------------------------------------------------- 1 | From 4d63cccb803f08dbd0294f6b2cc1293e35450a8b Mon Sep 17 00:00:00 2001 2 | From: Joe Honold 3 | Date: Wed, 14 Sep 2016 10:48:51 -0500 4 | Subject: [PATCH] nano: bump version and add syntax package 5 | 6 | Signed-off-by: Joe Honold 7 | --- 8 | utils/nano/Makefile | 35 ++++- 9 | utils/nano/files/c.nanorc | 30 +++++ 10 | utils/nano/files/js.nanorc | 38 ++++++ 11 | utils/nano/files/makefile.nanorc | 9 ++ 12 | utils/nano/files/nanorc | 282 +++++++++++++++++++++++++++++++++++++++ 13 | utils/nano/files/nanorc.nanorc | 16 +++ 14 | utils/nano/files/patch.nanorc | 10 ++ 15 | utils/nano/files/sh.nanorc | 22 +++ 16 | utils/nano/files/xml.nanorc | 10 ++ 17 | 9 files changed, 446 insertions(+), 6 deletions(-) 18 | create mode 100644 utils/nano/files/c.nanorc 19 | create mode 100644 utils/nano/files/js.nanorc 20 | create mode 100644 utils/nano/files/makefile.nanorc 21 | create mode 100644 utils/nano/files/nanorc 22 | create mode 100644 utils/nano/files/nanorc.nanorc 23 | create mode 100644 utils/nano/files/patch.nanorc 24 | create mode 100644 utils/nano/files/sh.nanorc 25 | create mode 100644 utils/nano/files/xml.nanorc 26 | 27 | diff --git a/utils/nano/Makefile b/utils/nano/Makefile 28 | index 8e27ed1..7ff5f8e 100644 29 | --- a/utils/nano/Makefile 30 | +++ b/utils/nano/Makefile 31 | @@ -8,14 +8,14 @@ 32 | include $(TOPDIR)/rules.mk 33 | 34 | PKG_NAME:=nano 35 | -PKG_VERSION:=2.5.3 36 | +PKG_VERSION:=2.7.0 37 | PKG_RELEASE:=1 38 | PKG_LICENSE:=GPL-3.0+ 39 | PKG_LICENSE_FILES:=COPYING 40 | 41 | PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 42 | PKG_SOURCE_URL:=@GNU/nano 43 | -PKG_MD5SUM:=a04d77611422ab4b6a7b489650c7a793 44 | +PKG_MD5SUM:=0805c5b8c75d4fde053e4b1431270f91 45 | 46 | PKG_INSTALL:=1 47 | PKG_BUILD_PARALLEL:=1 48 | @@ -37,20 +37,43 @@ define Package/nano/description 49 | of the Pico text editor. 50 | endef 51 | 52 | +define Package/nano-syntax 53 | + $(call Package/nano/Default) 54 | + SUBMENU:=Editors 55 | + SECTION:=utils 56 | + CATEGORY:=Utilities 57 | + TITLE:=Syntax highlighting definitions for nano editor 58 | + URL:=http://www.nano-editor.org/ 59 | + MAINTAINER:=Jonathan Bennett 60 | + DEPENDS:=+nano 61 | +endef 62 | + 63 | CONFIGURE_ARGS += \ 64 | - --enable-tiny \ 65 | --disable-glibtest \ 66 | --disable-utf8 \ 67 | + --disable-libmagic \ 68 | --without-slang \ 69 | - --disable-color \ 70 | 71 | CONFIGURE_VARS += \ 72 | - ac_cv_header_regex_h=no \ 73 | + ac_cv_header_regex_h=yes \ 74 | 75 | define Package/nano/install 76 | $(INSTALL_DIR) $(1)/usr/bin 77 | $(CP) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/bin/ 78 | endef 79 | 80 | -$(eval $(call BuildPackage,nano)) 81 | +define Package/nano-syntax/install 82 | + $(INSTALL_DIR) $(1)/etc 83 | + $(CP) ./files/nanorc $(1)/etc/ 84 | + $(INSTALL_DIR) $(1)/usr/share/nano 85 | + $(CP) ./files/makefile.nanorc $(1)/usr/share/nano/ 86 | + $(CP) ./files/nanorc.nanorc $(1)/usr/share/nano/ 87 | + $(CP) ./files/c.nanorc $(1)/usr/share/nano/ 88 | + $(CP) ./files/sh.nanorc $(1)/usr/share/nano/ 89 | + $(CP) ./files/patch.nanorc $(1)/usr/share/nano/ 90 | + $(CP) ./files/xml.nanorc $(1)/usr/share/nano/ 91 | + $(CP) ./files/js.nanorc $(1)/usr/share/nano/ 92 | +endef 93 | 94 | +$(eval $(call BuildPackage,nano)) 95 | +$(eval $(call BuildPackage,nano-syntax)) 96 | diff --git a/utils/nano/files/c.nanorc b/utils/nano/files/c.nanorc 97 | new file mode 100644 98 | index 0000000..f271541 99 | --- /dev/null 100 | +++ b/utils/nano/files/c.nanorc 101 | @@ -0,0 +1,30 @@ 102 | +## Here is an example for C/C++. 103 | +## 104 | +syntax "c" "\.(c(c|pp|xx)?|C)$" "\.(h(h|pp|xx)?|H)$" "\.ii?$" 105 | +color brightred "[A-Z_][0-9A-Z_]+" 106 | +color green "(\bfloat\b|\bdouble\b|\bbool\b|\bchar\b|\bint\b|\bshort\b|\blong\b|\bsizeof\b|\benum\b|\bvoid\b|\bstatic\b|\bconst\b|\bstruct\b|\bunion\b|\btypedef\b|\bextern\b|\s(un)?signed|inline)" 107 | +color green "((s?size)|((u_?)?int(8|16|32|64|ptr)))_t" 108 | +color green "(\bclass\b|\bnamespace\b|\btemplate\b|\bpublic\b|\bprotected\b|\bprivate\b|\btypename\b|\bthis\b|\bfriend\b|\bvirtual\b|\busing\b|\bmutable\b|\bvolatile\b|\bregister\b|\bexplicit\b)" 109 | +color brightyellow "(\bfor\b|\bif\b|\bwhile\b|\bdo\b|\belse\b|\bcase\b|\bdefault\b|\bswitch\b)" 110 | +color brightyellow "(\btry\b|\bthrow\b|\bcatch\b|\boperator\b|\bnew\b|\bdelete\b)" 111 | +color magenta "(\bgoto\b|\bcontinue\b|\bbreak\b|\breturn\b)" 112 | +color brightcyan "^[[:space:]]*#[[:space:]]*(define|include(_next)?|(un|ifn?)def|endif|el(if|se)|if|warning|error|pragma)" 113 | +color brightmagenta "'([^'\]|(\\["'abfnrtv\\]))'" "'\\(([0-3]?[0-7]{1,2}))'" "'\\x[0-9A-Fa-f]{1,2}'" 114 | +## 115 | +## GCC builtins 116 | +color cyan "__attribute__[[:space:]]*\(\([^)]*\)\)" "__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__" 117 | +## 118 | +## String highlighting. You will in general want your comments and 119 | +## strings to come last, because syntax highlighting rules will be 120 | +## applied in the order they are read in. 121 | +color brightyellow "<[^= ]*>" ""(\\.|[^"])*"" 122 | +## 123 | +## This string is VERY resource intensive! 124 | +color brightyellow start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*"" 125 | + 126 | +## Comment highlighting 127 | +color brightblue "//.*" 128 | +color brightblue start="/\*" end="\*/" 129 | + 130 | +## Trailing whitespace 131 | +color ,green "[[:space:]]+$" 132 | diff --git a/utils/nano/files/js.nanorc b/utils/nano/files/js.nanorc 133 | new file mode 100644 134 | index 0000000..f21f838 135 | --- /dev/null 136 | +++ b/utils/nano/files/js.nanorc 137 | @@ -0,0 +1,38 @@ 138 | +syntax "JavaScript" "\.(js)$" 139 | + 140 | +## Default 141 | +color white "^.+$" 142 | +color brightwhite "\." 143 | +color brightred "\b.*=" 144 | +## Decimal, cotal and hexadecimal numbers 145 | +#color yellow "[-+]?(\s[1-9][0-9]*|[^a-zA-Z][1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?" 146 | +color yellow "[-+]?([^a-zA-Z][1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?" 147 | +## Floating point number with at least one digit before decimal point 148 | +color yellow "<[-+]?([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?" 149 | +color yellow "<[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?" 150 | +## Keywords 151 | +color green "(\bbreak\b|\bcase\b|\bcatch\b|\bcontinue\b|\bdefault\b|\bdelete\b|\bdo\b|\belse\b|\bfinally\b)" 152 | +#color green "(\sbreak\s|\scase\s|\scatch\s|\scontinue\s|\sdefault\s|\sdelete\s|do[^a-zA-Z]|\selse\s|\sfinally\s)" 153 | +#color brightmagenta "(\b[A-Z]+\b|\b([A-Z]+_)+[A-Z]+\b)" 154 | +color brightmagenta "(\b.*:)" 155 | +color magenta "=|:" 156 | + 157 | +color green "(\bfor\b|\bfunction\b|\bif\b|\bin\b|\binstanceof\b|\bnew\b|\bnull\b|\breturn\b|\bswitch\b)" 158 | +color green "(\bswitch\b|\bthis\b|\bthrow\b|\btry\b|\btypeof\b|\bundefined\b|\bvar\b|\bvoid\b|\bwhi|\bwhile\b|b\with\b)" 159 | +## Type specifiers 160 | +color red "(\bArray\b|\bBoolean\b|\bDate\b|\bEnumerator\b|\bError\b|\bFunction\b|\bMath\b)" 161 | +color red "(\bNumber\b|\bObject\b|\bRegExp\b|\bString\b)" 162 | +color red "(\btrue\b|\bfalse\b)" 163 | +## String 164 | +color brightyellow "L?\"(\\"|[^"])*\"" 165 | +color brightyellow "L?'(\'|[^'])*'" 166 | +## Escapes 167 | +color red "\\[0-7][0-7]?[0-7]?|\\x[0-9a-fA-F]+|\\[bfnrt'"\?\\]" 168 | + 169 | +## Comments 170 | +#color magenta start="/\*" end="\*/" 171 | + 172 | +## Comment highlighting 173 | +color brightblue "//.*" 174 | +color brightblue start="/\*" end="\*/" 175 | + 176 | diff --git a/utils/nano/files/makefile.nanorc b/utils/nano/files/makefile.nanorc 177 | new file mode 100644 178 | index 0000000..a184306 179 | --- /dev/null 180 | +++ b/utils/nano/files/makefile.nanorc 181 | @@ -0,0 +1,9 @@ 182 | +# unattributed syntax highlighting example from wiki.linuxhelp.net/ 183 | + 184 | +syntax "makefile" "Makefile[^/]*$" 185 | +color cyan "." 186 | +color red "[:=]" 187 | +color magenta "(\bif\b|\bifeq\b|\belse\b|\bendif\b)" 188 | +color blue "\$+[{(][a-zA-Z0-9_-]+[})]" 189 | +color brightblue "^[^ ]+:" 190 | +color green "#.*$" 191 | diff --git a/utils/nano/files/nanorc b/utils/nano/files/nanorc 192 | new file mode 100644 193 | index 0000000..e4bb8ad 194 | --- /dev/null 195 | +++ b/utils/nano/files/nanorc 196 | @@ -0,0 +1,282 @@ 197 | +## Sample initialization file for GNU nano. 198 | +## 199 | +## Please note that you must have configured nano with --enable-nanorc 200 | +## for this file to be read! Also note that this file should not be in 201 | +## DOS or Mac format, and that characters specially interpreted by the 202 | +## DOS or Mac format, and that characters specially interpreted by the 203 | +## shell should not be escaped here. 204 | +## 205 | +## To make sure a value is disabled, use "unset