[OpenWrt-Devel] [PATCH] kernel: added defines for 3.12
Signed-off-by: Tim Harvey --- target/linux/generic/config-3.12 | 6 ++ 1 file changed, 6 insertions(+) diff --git a/target/linux/generic/config-3.12 b/target/linux/generic/config-3.12 index cd6429b..5c153b2 100644 --- a/target/linux/generic/config-3.12 +++ b/target/linux/generic/config-3.12 @@ -641,6 +641,7 @@ CONFIG_CRYPTO_ALGAPI2=y # CONFIG_CRYPTO_DEV_FSL_CAAM is not set # CONFIG_CRYPTO_DEV_HIFN_795X is not set # CONFIG_CRYPTO_DEV_MV_CESA is not set +# CONFIG_CRYPTO_DEV_SAHARA is not set # CONFIG_CRYPTO_DEV_TALITOS is not set # CONFIG_CRYPTO_ECB is not set # CONFIG_CRYPTO_FCRYPT is not set @@ -1150,6 +1151,7 @@ CONFIG_HAVE_KRETPROBES=y # CONFIG_HID_WACOM is not set # CONFIG_HID_WALTOP is not set # CONFIG_HID_WIIMOTE is not set +# CONFIG_HID_XINMO is not set # CONFIG_HID_ZEROPLUS is not set # CONFIG_HID_ZYDACRON is not set # CONFIG_HIGHMEM is not set @@ -3331,6 +,8 @@ CONFIG_SND_PCM_OSS_PLUGINS=y # CONFIG_SND_SOC_AU1XAUDIO is not set # CONFIG_SND_SOC_AU1XPSC is not set # CONFIG_SND_SOC_CACHE_LZO is not set +# CONFIG_SND_SOC_IMX_SPDIF is not set +# CONFIG_SND_SOC_IMX_WM8962 is not set # CONFIG_SND_SOC_MPC5200_AC97 is not set # CONFIG_SND_SOC_MPC5200_I2S is not set # CONFIG_SND_SONICVIBES is not set @@ -3343,6 +3347,7 @@ CONFIG_SND_USB=y # CONFIG_SND_USB_6FIRE is not set # CONFIG_SND_USB_AUDIO is not set # CONFIG_SND_USB_CAIAQ is not set +# CONFIG_SND_USB_HIFACE is not set # CONFIG_SND_USB_UA101 is not set # CONFIG_SND_USB_US122L is not set # CONFIG_SND_USB_USX2Y is not set @@ -3857,6 +3862,7 @@ CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y # CONFIG_USB_SERIAL_SAFE is not set CONFIG_USB_SERIAL_SAFE_PADDED=y # CONFIG_USB_SERIAL_SIEMENS_MPI is not set +# CONFIG_USB_SERIAL_SIMPLE is not set # CONFIG_USB_SERIAL_SIERRAWIRELESS is not set # CONFIG_USB_SERIAL_SIMPLE is not set # CONFIG_USB_SERIAL_SPCP8X5 is not set -- 1.8.4.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] kernel: module updates for 3.12
Signed-off-by: Tim Harvey --- package/kernel/linux/modules/sound.mk | 13 + package/kernel/linux/modules/usb.mk | 6 ++ 2 files changed, 19 insertions(+) diff --git a/package/kernel/linux/modules/sound.mk b/package/kernel/linux/modules/sound.mk index 4e1a656..450bc5f 100644 --- a/package/kernel/linux/modules/sound.mk +++ b/package/kernel/linux/modules/sound.mk @@ -190,6 +190,7 @@ $(eval $(call KernelPackage,sound-soc-ac97)) define KernelPackage/sound-soc-imx TITLE:=IMX SoC support +ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),lt,3.12.0)),1) KCONFIG:=\ CONFIG_SND_IMX_SOC \ CONFIG_SND_SOC_IMX_AUDMUX \ @@ -200,6 +201,18 @@ define KernelPackage/sound-soc-imx $(LINUX_DIR)/sound/soc/fsl/snd-soc-fsl-ssi.ko \ $(LINUX_DIR)/sound/soc/fsl/snd-soc-imx-pcm.ko AUTOLOAD:=$(call AutoLoad,56,snd-soc-imx-audmux snd-soc-fsl-ssi snd-soc-imx-pcm) +else + KCONFIG:=\ + CONFIG_SND_IMX_SOC \ + CONFIG_SND_SOC_IMX_AUDMUX \ + CONFIG_SND_SOC_FSL_SSI \ + CONFIG_SND_SOC_IMX_PCM_DMA + FILES:= \ + $(LINUX_DIR)/sound/soc/fsl/snd-soc-imx-audmux.ko \ + $(LINUX_DIR)/sound/soc/fsl/snd-soc-fsl-ssi.ko \ + $(LINUX_DIR)/sound/soc/fsl/imx-pcm-dma.ko + AUTOLOAD:=$(call AutoLoad,56,snd-soc-imx-audmux snd-soc-fsl-ssi snd-soc-imx-pcm) +endif DEPENDS:=@TARGET_imx6 +kmod-sound-soc-core $(call AddDepends/sound) endef diff --git a/package/kernel/linux/modules/usb.mk b/package/kernel/linux/modules/usb.mk index e1611aa..bc2250b 100644 --- a/package/kernel/linux/modules/usb.mk +++ b/package/kernel/linux/modules/usb.mk @@ -737,7 +737,13 @@ define KernelPackage/usb-net TITLE:=Kernel modules for USB-to-Ethernet convertors KCONFIG:=CONFIG_USB_USBNET CONFIG_MII=y AUTOLOAD:=$(call AutoProbe,usbnet) +ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),lt,3.12.0)),1) FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/usbnet.ko +else + FILES:=\ + $(LINUX_DIR)/drivers/$(USBNET_DIR)/usbnet.ko \ + $(LINUX_DIR)/drivers/net/mii.ko +endif $(call AddDepends/usb) endef -- 1.8.4.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] imx6: add DMA/SDMA support for 3.12
DMA and SDMA support are needed for ssi based audio. Note that the sdma firmware is no longer required for ssi audio. Signed-off-by: Tim Harvey --- target/linux/imx6/config-3.12 | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/target/linux/imx6/config-3.12 b/target/linux/imx6/config-3.12 index dadebfc..5ec8edd 100644 --- a/target/linux/imx6/config-3.12 +++ b/target/linux/imx6/config-3.12 @@ -14,8 +14,6 @@ CONFIG_ARCH_MULTI_V7=y CONFIG_ARCH_MXC=y # CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set CONFIG_ARCH_NR_GPIO=0 -# CONFIG_ARCH_OMAP3 is not set -# CONFIG_ARCH_OMAP4 is not set CONFIG_ARCH_REQUIRE_GPIOLIB=y # CONFIG_ARCH_SELECT_MEMORY_MODEL is not set # CONFIG_ARCH_SPARSEMEM_DEFAULT is not set @@ -195,8 +193,8 @@ CONFIG_I2C_BOARDINFO=y CONFIG_I2C_CHARDEV=y CONFIG_I2C_IMX=y # CONFIG_IMX2_WDT is not set -# CONFIG_IMX_DMA is not set -# CONFIG_IMX_SDMA is not set +CONFIG_IMX_DMA=y +CONFIG_IMX_SDMA=y # CONFIG_IMX_WEIM is not set CONFIG_INITRAMFS_SOURCE="" CONFIG_IRQCHIP=y -- 1.8.4.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] imx6: usb module update for 3.12
The chipidea kernel module names changed in 3.11 Signed-off-by: Tim Harvey --- package/kernel/linux/modules/usb.mk | 8 1 file changed, 8 insertions(+) diff --git a/package/kernel/linux/modules/usb.mk b/package/kernel/linux/modules/usb.mk index bc2250b..bd69faa 100644 --- a/package/kernel/linux/modules/usb.mk +++ b/package/kernel/linux/modules/usb.mk @@ -1069,11 +1069,19 @@ define KernelPackage/usb-chipidea CONFIG_USB_CHIPIDEA_HOST=y \ CONFIG_USB_CHIPIDEA_UDC=n \ CONFIG_USB_CHIPIDEA_DEBUG=y +ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),lt,3.11.0)),1) FILES:=\ $(LINUX_DIR)/drivers/usb/chipidea/ci_hdrc.ko \ $(if $(CONFIG_OF_DEVICE),$(LINUX_DIR)/drivers/usb/chipidea/ci13xxx_imx.ko) \ $(if $(CONFIG_OF_DEVICE),$(LINUX_DIR)/drivers/usb/chipidea/usbmisc_imx$(if $(call kernel_patchver_le,3.9),6q).ko) AUTOLOAD:=$(call AutoLoad,51,ci_hdrc $(if $(CONFIG_OF_DEVICE),ci13xxx_imx usbmisc_imx$(if $(call kernel_patchver_le,3.9),6q)),1) +else + FILES:=\ + $(LINUX_DIR)/drivers/usb/chipidea/ci_hdrc.ko \ + $(if $(CONFIG_OF),$(LINUX_DIR)/drivers/usb/chipidea/ci_hdrc_imx.ko) \ + $(if $(CONFIG_OF),$(LINUX_DIR)/drivers/usb/chipidea/usbmisc_imx.ko) + AUTOLOAD:=$(call AutoLoad,51,ci_hdrc $(if $(CONFIG_OF),ci_hdrc_imx usbmisc_imx),1) +endif $(call AddDepends/usb) endef -- 1.8.4.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] cns3xxx: Add GW2385 support
Signed-off-by: Tim Harvey --- .../cns3xxx/files/arch/arm/mach-cns3xxx/laguna.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/target/linux/cns3xxx/files/arch/arm/mach-cns3xxx/laguna.c b/target/linux/cns3xxx/files/arch/arm/mach-cns3xxx/laguna.c index 267b4c1..4903749 100644 --- a/target/linux/cns3xxx/files/arch/arm/mach-cns3xxx/laguna.c +++ b/target/linux/cns3xxx/files/arch/arm/mach-cns3xxx/laguna.c @@ -697,6 +697,21 @@ static struct gpio laguna_gpio_gw2387[] = { { 113, GPIOF_IN , "DIO5" }, }; +static struct gpio laguna_gpio_gw2385[] = { + { 0, GPIOF_IN , "*GSC_IRQ#" }, + { 1, GPIOF_OUT_INIT_HIGH, "*USB_HST_VBUS_EN" }, + { 2, GPIOF_IN , "*USB_HST_FAULT#" }, + { 5, GPIOF_IN , "*USB_OTG_FAULT#" }, + { 6, GPIOF_OUT_INIT_LOW , "*USB_HST_PCI_SEL" }, + { 7, GPIOF_OUT_INIT_LOW , "*GSM_SEL0" }, + { 8, GPIOF_OUT_INIT_LOW , "*GSM_SEL1" }, + { 9, GPIOF_OUT_INIT_LOW , "*SER_EN" }, + { 10, GPIOF_IN,"*USER_PB#" }, + { 11, GPIOF_OUT_INIT_HIGH, "*PERST#" }, + { 100, GPIOF_IN , "*USER_PB#" }, + { 103, GPIOF_OUT_INIT_HIGH, "V5_EN" }, +}; + static struct gpio laguna_gpio_gw2384[] = { { 0, GPIOF_IN , "*GSC_IRQ#" }, { 1, GPIOF_OUT_INIT_HIGH, "*USB_HST_VBUS_EN" }, @@ -953,6 +968,21 @@ static int __init laguna_model_setup(void) laguna_register_gpio(ARRAY_AND_SIZE(laguna_gpio_gw2387)); // configure LED's laguna_gpio_leds_data.num_leds = 2; + } else if (strncmp(laguna_info.model, "GW2385", 6) == 0) { + // configure GPIO's + laguna_register_gpio(ARRAY_AND_SIZE(laguna_gpio_gw2385)); + // configure LED's + laguna_gpio_leds[0].gpio = 115; + laguna_gpio_leds[1].gpio = 12; + laguna_gpio_leds[1].name = "red"; + laguna_gpio_leds[1].active_low = 0, + laguna_gpio_leds[2].gpio = 14; + laguna_gpio_leds[2].name = "green"; + laguna_gpio_leds[2].active_low = 0, + laguna_gpio_leds[3].gpio = 15; + laguna_gpio_leds[3].name = "blue"; + laguna_gpio_leds[3].active_low = 0, + laguna_gpio_leds_data.num_leds = 4; } else if (strncmp(laguna_info.model, "GW2384", 6) == 0) { // configure GPIO's laguna_register_gpio(ARRAY_AND_SIZE(laguna_gpio_gw2384)); -- 1.8.4.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] cns3xxx: various dwc (OTG) driver fixups
Signed-off-by: Tim Harvey --- .../cns3xxx/patches-3.8/400-dwc_host_fixups.patch | 1182 1 file changed, 1182 insertions(+) create mode 100644 target/linux/cns3xxx/patches-3.8/400-dwc_host_fixups.patch diff --git a/target/linux/cns3xxx/patches-3.8/400-dwc_host_fixups.patch b/target/linux/cns3xxx/patches-3.8/400-dwc_host_fixups.patch new file mode 100644 index 000..4b2105e --- /dev/null +++ b/target/linux/cns3xxx/patches-3.8/400-dwc_host_fixups.patch @@ -0,0 +1,1182 @@ +--- a/drivers/usb/dwc/otg_attr.c b/drivers/usb/dwc/otg_attr.c +@@ -721,9 +721,10 @@ static ssize_t hcddump_show( struct devi +char *buf) + { + #ifndef DWC_DEVICE_ONLY +- struct platform_device *pdev = container_of(_dev, struct platform_device, dev); \ +- dwc_otg_device_t *otg_dev = platform_get_drvdata(pdev); \ +- dwc_otg_hcd_dump_state(otg_dev->hcd); ++ struct platform_device *pdev = container_of(_dev, struct platform_device, dev); ++ struct usb_hcd *hcd = platform_get_drvdata(pdev); ++ dwc_otg_hcd_t *otg_dev = hcd_to_dwc_otg_hcd(hcd); ++ dwc_otg_hcd_dump_state(otg_dev); + #endif + return sprintf( buf, "HCD Dump\n" ); + } +--- a/drivers/usb/dwc/otg_cil.c b/drivers/usb/dwc/otg_cil.c +@@ -66,7 +66,7 @@ + #include "otg_regs.h" + #include "otg_cil.h" + #include "otg_pcd.h" +- ++#include "otg_hcd.h" + + /** + * This function is called to initialize the DWC_otg CSR data +@@ -1156,12 +1156,13 @@ void dwc_otg_core_host_init(dwc_otg_core + DWC_DEBUGPL(DBG_HCDV, "%s: Halt channel %d\n", __func__, i); + do { + hcchar.d32 = dwc_read_reg32(&hc_regs->hcchar); +- if (++count > 1000) ++ if (++count > 200) + { + DWC_ERROR("%s: Unable to clear halt on channel %d\n", + __func__, i); + break; + } ++ udelay(100); + } + while (hcchar.b.chen); + } +@@ -1211,6 +1212,8 @@ void dwc_otg_hc_init(dwc_otg_core_if_t * + hc_intr_mask.b.chhltd = 1; + if (core_if->dma_enable) { + hc_intr_mask.b.ahberr = 1; ++ /* Always record the first nak interrupt for bulk ++ * packets. */ + if (hc->error_state && !hc->do_split && + hc->ep_type != DWC_OTG_EP_TYPE_ISOC) { + hc_intr_mask.b.ack = 1; +@@ -1375,7 +1378,7 @@ void dwc_otg_hc_init(dwc_otg_core_if_t * + * @param hc Host channel to halt. + * @param halt_status Reason for halting the channel. + */ +-void dwc_otg_hc_halt(dwc_otg_core_if_t *core_if, ++void dwc_otg_hc_halt(dwc_otg_hcd_t *hcd, +dwc_hc_t *hc, +dwc_otg_halt_status_e halt_status) + { +@@ -1385,6 +1388,7 @@ void dwc_otg_hc_halt(dwc_otg_core_if_t * + dwc_otg_hc_regs_t *hc_regs; + dwc_otg_core_global_regs_t *global_regs; + dwc_otg_host_global_regs_t *host_global_regs; ++ dwc_otg_core_if_t *core_if = hcd->core_if; + + hc_regs = core_if->host_if->hc_regs[hc->hc_num]; + global_regs = core_if->core_global_regs; +@@ -1477,6 +1481,9 @@ void dwc_otg_hc_halt(dwc_otg_core_if_t * + + hc->halt_status = halt_status; + ++ if (!hc->halt_on_queue && !hc->halt_pending && hc->qh->nak_frame != 0x) ++ hcd->nakking_channels--; ++ + if (hcchar.b.chen) { + hc->halt_pending = 1; + hc->halt_on_queue = 0; +@@ -1744,9 +1751,9 @@ void dwc_otg_hc_start_transfer(dwc_otg_c + dwc_write_reg32(&hc_regs->hctsiz, hctsiz.d32); + + DWC_DEBUGPL(DBG_HCDV, "%s: Channel %d\n", __func__, hc->hc_num); +- DWC_DEBUGPL(DBG_HCDV, " Xfer Size: %d\n", hctsiz.b.xfersize); +- DWC_DEBUGPL(DBG_HCDV, " Num Pkts: %d\n", hctsiz.b.pktcnt); +- DWC_DEBUGPL(DBG_HCDV, " Start PID: %d\n", hctsiz.b.pid); ++ DWC_DEBUGPL(DBG_HCDV, " Xfer Size: %d\n", hctsiz.b.xfersize); ++ DWC_DEBUGPL(DBG_HCDV, " Num Pkts: %d\n", hctsiz.b.pktcnt); ++ DWC_DEBUGPL(DBG_HCDV, " Start PID: %d\n", hctsiz.b.pid); + + if (core_if->dma_enable) { + dwc_write_reg32(&hc_regs->hcdma, (uint32_t)hc->xfer_buff); +@@ -1774,6 +1781,10 @@ void dwc_otg_hc_start_transfer(dwc_otg_c + /* Set host channel enable after all other setup is complete. */ + hcchar.b.chen = 1; + hcchar.b.chdis = 0; ++ ++ /* Memory Barrier before enabling channel ensure the channel is setup correct */ ++ mb(); ++ + dwc_write_reg32(&hc_regs->hcchar, hcchar.d32); + + hc->xfer_started = 1; +@@ -1786,7 +1797,7 @@ void dwc_otg_hc_start_transfer(dwc_otg_c + } + + #ifdef DEBUG +- /* Start a timer for this transfer. */ ++ /* Start a timer for this transfer */ + core_if->hc_xfer_timer[hc->hc_nu
[OpenWrt-Devel] [PATCH] imx6: add support for GW53xx
The Gateworks GW53xx family of products is based on the Freescale i.MX6DL SoC and offers a small form-factor with peripherals such as: * i.MX6DL * NAND FLASH * 4x PCIe * 4x USB EHCI (1x front-panel; 3x PCIe sockets) * 1x USB OTG * 1x uSD * LVDS connector (VLDS for display, PWM/GPIO for backlight, i2c for touch) * HDMI Audio/Video out * Analog Video in * Digital IO * Gateworks System Controller * Accelerometer * Canbus * Optional GPS * Industrial temp (-40C to +85C) * DC input voltage 8 to 42V (Passive PoE and 802.3af) Signed-off-by: Tim Harvey --- .../files-3.10/arch/arm/boot/dts/imx6dl-gw53xx.dts | 399 + target/linux/imx6/patches-3.10/114-gw53xx.patch| 10 + target/linux/imx6/profiles/120-gateworks.mk| 1 + 3 files changed, 410 insertions(+) create mode 100644 target/linux/imx6/files-3.10/arch/arm/boot/dts/imx6dl-gw53xx.dts create mode 100644 target/linux/imx6/patches-3.10/114-gw53xx.patch diff --git a/target/linux/imx6/files-3.10/arch/arm/boot/dts/imx6dl-gw53xx.dts b/target/linux/imx6/files-3.10/arch/arm/boot/dts/imx6dl-gw53xx.dts new file mode 100644 index 000..87f0be2 --- /dev/null +++ b/target/linux/imx6/files-3.10/arch/arm/boot/dts/imx6dl-gw53xx.dts @@ -0,0 +1,399 @@ +/* + * Copyright 2013 Gateworks Corporation + * + * The code contained herein is licensed under the GNU General Public + * License. You may obtain a copy of the GNU General Public License + * Version 2 or later at the following locations: + * + * http://www.opensource.org/licenses/gpl-license.html + * http://www.gnu.org/copyleft/gpl.html + */ + +/dts-v1/; +#include "imx6dl.dtsi" + +/ { + model = "Gateworks Ventana i.MX6 DualLite GW53XX"; + compatible = "gw,imx6dl-gw53xx", "gw,ventana", "fsl,imx6dl"; + + /* these are used by bootloader for disabling nodes */ + aliases { + can0 = &can1; + ethernet0 = &fec; + ethernet1 = ð1; + i2c0 = &i2c1; + i2c1 = &i2c2; + i2c2 = &i2c3; + led0 = &led0; + led1 = &led1; + led2 = &led2; + nand = &gpmi; + sky2 = ð1; + ssi0 = &ssi1; + usb0 = &usbh1; + usb1 = &usbotg; + usdhc2 = &usdhc3; + }; + + chosen { + bootargs = "console=ttymxc1,115200"; + }; + + memory { + reg = <0x1000 0x4000>; + }; + + leds { + compatible = "gpio-leds"; + + led0: user1 { + label = "user1"; + gpios = <&gpio4 6 0>; /* 102 -> MX6_PANLEDG */ + default-state = "on"; + linux,default-trigger = "heartbeat"; + }; + + led1: user2 { + label = "user2"; + gpios = <&gpio4 7 0>; /* 103 -> MX6_PANLEDR */ + default-state = "off"; + }; + + led2: user3 { + label = "user3"; + gpios = <&gpio4 15 1>; /* 111 -> MX6_LOCLED# */ + default-state = "off"; + }; + }; + + regulators { + compatible = "simple-bus"; + + reg_1p0v: 1p0v { + compatible = "regulator-fixed"; + regulator-name = "1P0V"; + regulator-min-microvolt = <100>; + regulator-max-microvolt = <100>; + regulator-always-on; + }; + + /* remove this fixed regulator once ltc3676__sw2 driver available */ + reg_1p8v: 1p8v { + compatible = "regulator-fixed"; + regulator-name = "1P8V"; + regulator-min-microvolt = <180>; + regulator-max-microvolt = <180>; + regulator-always-on; + }; + + reg_3p3v: 3p3v { + compatible = "regulator-fixed"; + regulator-name = "3P3V"; + regulator-min-microvolt = <330>; + regulator-max-microvolt = <330>; + regulator-always-on; + }; + + reg_usb_h1_vbus: usb_h1_vbus { + compatible = "regulator-fixed"; + regulator-name = "usb_h1_vbus"; + regulator-min-microvolt = <500>; + regulator-max-microvolt = <500>; + regulator-always-on; + }; + + reg_usb_otg_vbus: usb_otg_vbus { + compatible = "regulator-fixed"; + regulator-name = "usb_otg_vbus"; + regulator-min-microvolt = <500>; + regulator-max-microvolt
[OpenWrt-Devel] [PATCH] kernel: add canbus kernel module support
Signed-off-by: Tim Harvey --- package/kernel/linux/modules/can.mk | 171 1 file changed, 171 insertions(+) create mode 100644 package/kernel/linux/modules/can.mk diff --git a/package/kernel/linux/modules/can.mk b/package/kernel/linux/modules/can.mk new file mode 100644 index 000..1dee371 --- /dev/null +++ b/package/kernel/linux/modules/can.mk @@ -0,0 +1,171 @@ +# +# Copyright (C) 2013 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +CAN_MENU:=CAN support + +# +# Core support +# +define KernelPackage/can + SUBMENU:=$(CAN_MENU) + TITLE:=CAN bus support + KCONFIG:=\ + CONFIG_CAN=y \ + CONFIG_CAN_CALC_BITTIMING=y \ + CONFIG_CAN_LEDS=y \ + CONFIG_NET_EMATCH_CANID=n \ + \ + CONFIG_CAN_VCAN=n \ + CONFIG_CAN_SLCAN=n \ + CONFIG_CAN_AT91=n \ + CONFIG_CAN_MCP251X=n \ + CONFIG_PCH_CAN=n \ + CONFIG_CAN_GRCAN=n \ + CONFIG_CAN_C_CAN=n \ + CONFIG_CAN_CC770=n \ + CONFIG_CAN_EMS_USB=n \ + CONFIG_CAN_ESD_USB2=n \ + CONFIG_CAN_KVASER_USB=n \ + CONFIG_CAN_PEAK_USB=n \ + CONFIG_CAN_8DEV_USB=n \ + CONFIG_CAN_SOFTING=n \ + CONFIG_CAN_SJA1000=n \ + \ + CONFIG_CAN_DEBUG_DEVICES=n +endef + +define KernelPackage/can/description + Kernel module for CAN bus support +endef + +$(eval $(call KernelPackage,can)) + + +define KernelPackage/can-raw + SUBMENU:=$(CAN_MENU) + TITLE:=Raw CAN Protcol + DEPENDS:=+kmod-can + KCONFIG:=CONFIG_CAN_RAW + FILES:=$(LINUX_DIR)/net/can/can-raw.ko + AUTOLOAD:=$(call AutoProbe,can-raw) +endef + +define KernelPackage/can-raw/description + The raw CAN protocol option offers access to the CAN bus via the BSD + socket API. +endef + +$(eval $(call KernelPackage,can-raw)) + + +define KernelPackage/can-bcm + SUBMENU:=$(CAN_MENU) + TITLE:=Broadcast Manager CAN Protcol + DEPENDS:=+kmod-can + KCONFIG:=CONFIG_CAN_BCM + FILES:=$(LINUX_DIR)/net/can/can-bcm.ko + AUTOLOAD:=$(call AutoProbe,can-bcm) +endef + +define KernelPackage/can-bcm/description + The Broadcast Manager offers content filtering, timeout monitoring, + sending of RTR frames, and cyclic CAN messages without permanent user + interaction. +endef + +$(eval $(call KernelPackage,can-bcm)) + + +define KernelPackage/can-gw + SUBMENU:=$(CAN_MENU) + TITLE:=CAN Gateway/Router + DEPENDS:=+kmod-can + KCONFIG:=CONFIG_CAN_GW + FILES:=$(LINUX_DIR)/net/can/can-gw.ko + AUTOLOAD:=$(call AutoProbe,can-gw) +endef + +define KernelPackage/can-gw/description + The CAN Gateway/Router is used to route (and modify) CAN frames. +endef + +$(eval $(call KernelPackage,can-gw)) + + +# +# CAN Device Drivers +# + +define KernelPackage/can-vcan + SUBMENU:=$(CAN_MENU) + TITLE:=Virtual Local CAN Interface + DEPENDS:=+kmod-can + KCONFIG:=CONFIG_CAN_VCAN + FILES:=$(LINUX_DIR)/drivers/net/can/vcan.ko + AUTOLOAD:=$(call AutoProbe,can-vcan) +endef + +define KernelPackage/can-vcan/description + Similar to the network loopback devices, vcan offers a + virtual local CAN interface. +endef + +$(eval $(call KernelPackage,can-vcan)) + + +define KernelPackage/can-slcan + SUBMENU:=$(CAN_MENU) + TITLE:=Serial / USB serial CAN Adaptors + DEPENDS:=+kmod-can + KCONFIG:=CONFIG_CAN_SLCAN + FILES:=$(LINUX_DIR)/drivers/net/can/slcan.ko + AUTOLOAD:=$(call AutoProbe,can-slcan) +endef + +define KernelPackage/can-slcan/description + CAN driver for several 'low cost' CAN interfaces that are attached + via serial lines or via USB-to-serial adapters using the LAWICEL + ASCII protocol. +endef + +$(eval $(call KernelPackage,can-slcan)) + + +# +# Platform CAN drivers +# +define KernelPackage/can-dev + SUBMENU:=$(CAN_MENU) + TITLE:=Platform CAN drivers with Netlink support + DEPENDS:=+kmod-can + KCONFIG:=CONFIG_CAN_DEV + FILES:=$(LINUX_DIR)/drivers/net/can/can-dev.ko + AUTOLOAD:=$(call AutoProbe,can-dev) +endef + +define KernelPackage/can-dev/description + Enables the common framework for platform CAN drivers with Netlink + support. This is the standard library for CAN drivers. +endef + +$(eval $(call KernelPackage,can-dev)) + + +define KernelPackage/flexcan + SUBMENU:=$(CAN_MENU) + TITLE:=Support for Freescale FLEXCAN based chips + DEPENDS:=@TARGET_imx6 +kmod-can-dev + KCONFIG:=CONFIG_CAN_FLEXCAN + FILES:=$(LINUX_DIR)/drivers/net/can/flexcan.ko + AUTOLOAD:=$(call AutoProbe,flexcan) +endef + +define KernelPackage/flexcan/description + Support for Freescale FLEXCAN based chips found on various i.MX SoCs +endef + +$(eval $(call KernelPackage,flexcan)) -- 1.8.4.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] imx6: add flexcan support
backport a upstream changes: - 0060-flexcan.patch: - add flexcan pinctrl and devicetree config - 0061-can-flexcan-use-correct-clock-as-base-for-bit-rate-calculation.patch: - fix a clock issue - 062-imx6q-fix-the-wrong-parent-of-can_root-clock.patch - fix a clock issue Signed-off-by: Tim Harvey --- target/linux/imx6/patches-3.10/0060-flexcan.patch | 92 ++ ...ct-clock-as-base-for-bit-rate-calculation.patch | 35 ...6q-fix-the-wrong-parent-of-can_root-clock.patch | 24 ++ 3 files changed, 151 insertions(+) create mode 100644 target/linux/imx6/patches-3.10/0060-flexcan.patch create mode 100644 target/linux/imx6/patches-3.10/0061-can-flexcan-use-correct-clock-as-base-for-bit-rate-calculation.patch create mode 100644 target/linux/imx6/patches-3.10/0062-imx6q-fix-the-wrong-parent-of-can_root-clock.patch diff --git a/target/linux/imx6/patches-3.10/0060-flexcan.patch b/target/linux/imx6/patches-3.10/0060-flexcan.patch new file mode 100644 index 000..11a66c5 --- /dev/null +++ b/target/linux/imx6/patches-3.10/0060-flexcan.patch @@ -0,0 +1,92 @@ +--- a/arch/arm/boot/dts/imx6q.dtsi b/arch/arm/boot/dts/imx6q.dtsi +@@ -163,6 +163,31 @@ + }; + }; + ++ flexcan1 { ++ pinctrl_flexcan1_1: flexcan1grp-1 { ++ fsl,pins = < ++ MX6Q_PAD_KEY_ROW2__FLEXCAN1_RX 0x8000 ++ MX6Q_PAD_KEY_COL2__FLEXCAN1_TX 0x8000 ++ >; ++ }; ++ ++ pinctrl_flexcan1_2: flexcan1grp-2 { ++ fsl,pins = < ++ MX6Q_PAD_GPIO_7__FLEXCAN1_TX 0x8000 ++ MX6Q_PAD_KEY_ROW2__FLEXCAN1_RX 0x8000 ++ >; ++ }; ++ }; ++ ++ flexcan2 { ++ pinctrl_flexcan2_1: flexcan2grp-1 { ++ fsl,pins = < ++ MX6Q_PAD_KEY_COL4__FLEXCAN2_TX 0x8000 ++ MX6Q_PAD_KEY_ROW4__FLEXCAN2_RX 0x8000 ++ >; ++ }; ++ }; ++ + gpmi-nand { + pinctrl_gpmi_nand_1: gpmi-nand-1 { + fsl,pins = < +--- a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi +@@ -292,13 +292,21 @@ + }; + + can1: flexcan@0209 { ++ compatible = "fsl,imx6q-flexcan"; + reg = <0x0209 0x4000>; + interrupts = <0 110 0x04>; ++ clocks = <&clks 108>, <&clks 109>; ++ clock-names = "ipg", "per"; ++ status = "disabled"; + }; + + can2: flexcan@02094000 { ++ compatible = "fsl,imx6q-flexcan"; + reg = <0x02094000 0x4000>; + interrupts = <0 111 0x04>; ++ clocks = <&clks 110>, <&clks 111>; ++ clock-names = "ipg", "per"; ++ status = "disabled"; + }; + + gpt: gpt@02098000 { +--- a/arch/arm/boot/dts/imx6dl.dtsi b/arch/arm/boot/dts/imx6dl.dtsi +@@ -80,6 +80,31 @@ + }; + }; + ++ flexcan1 { ++ pinctrl_flexcan1_1: flexcan1grp-1 { ++ fsl,pins = < ++ MX6DL_PAD_KEY_ROW2__FLEXCAN1_RX 0x8000 ++ MX6DL_PAD_KEY_COL2__FLEXCAN1_TX 0x8000 ++ >; ++ }; ++ ++ pinctrl_flexcan1_2: flexcan1grp-2 { ++ fsl,pins = < ++ MX6DL_PAD_GPIO_7__FLEXCAN1_TX 0x8000 ++ MX6DL_PAD_KEY_ROW2__FLEXCAN1_RX 0x8000 ++
[OpenWrt-Devel] [PATCH] imx6: add canbus support for Ventana boards
- The GW5400, GW5300, and GW5200 all have CAN bus option Signed-off-by: Tim Harvey --- target/linux/imx6/files-3.10/arch/arm/boot/dts/imx6dl-gw52xx.dts | 7 +++ target/linux/imx6/files-3.10/arch/arm/boot/dts/imx6dl-gw53xx.dts | 2 ++ target/linux/imx6/files-3.10/arch/arm/boot/dts/imx6q-gw54xx.dts | 2 ++ target/linux/imx6/profiles/120-gateworks.mk | 1 + 4 files changed, 12 insertions(+) diff --git a/target/linux/imx6/files-3.10/arch/arm/boot/dts/imx6dl-gw52xx.dts b/target/linux/imx6/files-3.10/arch/arm/boot/dts/imx6dl-gw52xx.dts index 400c064..eef42ed 100644 --- a/target/linux/imx6/files-3.10/arch/arm/boot/dts/imx6dl-gw52xx.dts +++ b/target/linux/imx6/files-3.10/arch/arm/boot/dts/imx6dl-gw52xx.dts @@ -18,6 +18,7 @@ /* these are used by bootloader for disabling nodes */ aliases { + can0 = &can1; ethernet0 = &fec; i2c0 = &i2c1; i2c1 = &i2c2; @@ -126,6 +127,12 @@ status = "okay"; }; +&can1 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_flexcan1_1>; + status = "okay"; +}; + &fec { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_enet_1>; diff --git a/target/linux/imx6/files-3.10/arch/arm/boot/dts/imx6dl-gw53xx.dts b/target/linux/imx6/files-3.10/arch/arm/boot/dts/imx6dl-gw53xx.dts index 87f0be2..99d3d4c 100644 --- a/target/linux/imx6/files-3.10/arch/arm/boot/dts/imx6dl-gw53xx.dts +++ b/target/linux/imx6/files-3.10/arch/arm/boot/dts/imx6dl-gw53xx.dts @@ -134,6 +134,8 @@ }; &can1 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_flexcan1_1>; status = "okay"; }; diff --git a/target/linux/imx6/files-3.10/arch/arm/boot/dts/imx6q-gw54xx.dts b/target/linux/imx6/files-3.10/arch/arm/boot/dts/imx6q-gw54xx.dts index f9cf29a..828fc81 100644 --- a/target/linux/imx6/files-3.10/arch/arm/boot/dts/imx6q-gw54xx.dts +++ b/target/linux/imx6/files-3.10/arch/arm/boot/dts/imx6q-gw54xx.dts @@ -125,6 +125,8 @@ }; &can1 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_flexcan1_1>; status = "okay"; }; diff --git a/target/linux/imx6/profiles/120-gateworks.mk b/target/linux/imx6/profiles/120-gateworks.mk index 830b3b2..dd61ab2 100644 --- a/target/linux/imx6/profiles/120-gateworks.mk +++ b/target/linux/imx6/profiles/120-gateworks.mk @@ -10,6 +10,7 @@ define Profile/VENTANA PACKAGES:= \ kmod-thermal-imx kmod-sky2 kmod-usb-chipidea kmod-usb-mxs-phy \ kmod-sound-soc-imx kmod-sound-soc-imx-sgtl5000 \ + kmod-flexcan \ kobs-ng endef -- 1.8.4.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/2] iwinfo: add 802.11ac hwmode support
In case of .11ac device the hwmode was not properly displayed. This patch fixes it. Signed-off-by: Marek Kwaczynski Signed-off-by: Bartosz Markowski --- package/network/utils/iwinfo/src/include/iwinfo.h |1 + package/network/utils/iwinfo/src/iwinfo_cli.c |5 +++-- package/network/utils/iwinfo/src/iwinfo_nl80211.c | 10 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/package/network/utils/iwinfo/src/include/iwinfo.h b/package/network/utils/iwinfo/src/include/iwinfo.h index ebea319..f5f04f5 100644 --- a/package/network/utils/iwinfo/src/include/iwinfo.h +++ b/package/network/utils/iwinfo/src/include/iwinfo.h @@ -27,6 +27,7 @@ #define IWINFO_80211_B (1 << 1) #define IWINFO_80211_G (1 << 2) #define IWINFO_80211_N (1 << 3) +#define IWINFO_80211_AC (1 << 4) #define IWINFO_CIPHER_NONE (1 << 0) #define IWINFO_CIPHER_WEP40 (1 << 1) diff --git a/package/network/utils/iwinfo/src/iwinfo_cli.c b/package/network/utils/iwinfo/src/iwinfo_cli.c index 87cc10f..891f77e 100644 --- a/package/network/utils/iwinfo/src/iwinfo_cli.c +++ b/package/network/utils/iwinfo/src/iwinfo_cli.c @@ -268,11 +268,12 @@ static char * format_hwmodes(int modes) if (modes <= 0) snprintf(buf, sizeof(buf), "unknown"); else - snprintf(buf, sizeof(buf), "802.11%s%s%s%s", + snprintf(buf, sizeof(buf), "802.11%s%s%s%s%s", (modes & IWINFO_80211_A) ? "a" : "", (modes & IWINFO_80211_B) ? "b" : "", (modes & IWINFO_80211_G) ? "g" : "", - (modes & IWINFO_80211_N) ? "n" : ""); + (modes & IWINFO_80211_N) ? "n" : "", + (modes & IWINFO_80211_AC) ? "ac" : ""); return buf; } diff --git a/package/network/utils/iwinfo/src/iwinfo_nl80211.c b/package/network/utils/iwinfo/src/iwinfo_nl80211.c index a258d2f..233c1de 100644 --- a/package/network/utils/iwinfo/src/iwinfo_nl80211.c +++ b/package/network/utils/iwinfo/src/iwinfo_nl80211.c @@ -2152,6 +2152,7 @@ static int nl80211_get_hwmodelist_cb(struct nl_msg *msg, void *arg) int *modes = arg; int bands_remain, freqs_remain; uint16_t caps = 0; + uint32_t vht_caps = 0; struct nlattr **attr = nl80211_parse(msg); struct nlattr *bands[NL80211_BAND_ATTR_MAX + 1]; struct nlattr *freqs[NL80211_FREQUENCY_ATTR_MAX + 1]; @@ -2173,6 +2174,13 @@ static int nl80211_get_hwmodelist_cb(struct nl_msg *msg, void *arg) if (caps > 0) *modes |= IWINFO_80211_N; + if (bands[NL80211_BAND_ATTR_VHT_CAPA]) + vht_caps = nla_get_u32(bands[NL80211_BAND_ATTR_VHT_CAPA]); + + /* Treat any nonzero capability as 11ac */ + if (vht_caps > 0) + *modes |= IWINFO_80211_AC; + nla_for_each_nested(freq, bands[NL80211_BAND_ATTR_FREQS], freqs_remain) { @@ -2187,7 +2195,7 @@ static int nl80211_get_hwmodelist_cb(struct nl_msg *msg, void *arg) *modes |= IWINFO_80211_B; *modes |= IWINFO_80211_G; } - else + else if (!(*modes & IWINFO_80211_AC)) { *modes |= IWINFO_80211_A; } -- 1.7.10 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] Unable to Compile Kernel Header ar71xx
Some people including me have a problem compiling openwrt for the ar71xx target: https://dev.openwrt.org/ticket/12907 Could someone more familiar with the build process have a look? Thanks in advance! Best Regards Philipp signature.asc Description: OpenPGP digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] WD MyNet N750: ar9344 + ar8327 switch, unclear on phy/mdio/mac wiring
Are there any plans to look at the bootloader and figure out where the PHY + MDIO breaks ? I'm too eager to flash OpenWrt on this device. I would like to dump my buffalo n600 device as soon as this device becomes functional. Thanks, cchhat01 On Fri, Nov 29, 2013 at 5:41 AM, Felix Kaechele wrote: > Bootloader code has been published as per my request. > > You can find it here: http://support.wdc.com/product/download.asp?groupid= > 1702&sid=178&lang=en > > Now we just need to find where they broke it :) > > - Felix > > ___ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] mac82011 550-ath9k_entropy_from_adc.patch backport AA - questions
On Thursday 05 December 2013 22:56:01 you wrote: > On 2013-12-05 22:41, Tijs Van Buggenhout wrote: > > Hi Felix, > > > > I have a question about https://dev.openwrt.org/changeset/38486. While > > backporting the aforementioned patch from trunk to attitude adjustment, I > > noticed that the patch does not include a gettor function for the adc > > entropy of the ar9002 chip, only those of ar5008 and ar9003. > > > > static void ar9003_hw_get_adc_entropy(struct ath_hw *ah, u8 *buf, size_t > > len) static void ar5008_hw_get_adc_entropy(struct ath_hw *ah, u8 *buf, > > size_t len) > > > > but no > > > > static void ar9002_hw_get_adc_entropy(struct ath_hw *ah, u8 *buf, size_t > > len) > > > > Furthermore, when the phy_ops are constructed in ar9002_hw_attach_phy_ops, > > the get_adc_entropy function pointer is never assigned. > > > > I can be wrong ofcourse, but am under the impression this will create a > > problem when the driver is probed for an ar9002 chip and possibly result > > in a kernel oops, because "ath9k_hw_get_adc_entropy" expects the ath_hw > > struct to have a valid (non-NULL) function pointer for get_adc_entropy. > > See below: > > > > static inline void ath9k_hw_get_adc_entropy(struct ath_hw *ah, > > > >u8 *buf, size_t len) > > > > { > > > >ath9k_hw_ops(ah)->get_adc_entropy(ah, buf, len); > > > > } > > > > Did changes in ar9002_phy.c somehow miss inclusion in the patch? > > ar5008_hw_attach_phy_ops is called for all chips older than AR9003, and > it is generic enough to work across that range of chips. Ah yes, I see what you mean in ar9002_hw_attach_ops ret = ar5008_hw_attach_phy_ops(ah); if (ret) return ret; if (AR_SREV_9280_20_OR_LATER(ah)) ar9002_hw_attach_phy_ops(ah); Missed that.. I assumed hw_attach_phy_ops was specific for every chip. > > When testing the backported patch for my ar9003 chip, I was confronted > > with a kernel oops at initialisation, which I narrowed down to > > ath9k_hw_reset function, called from ath_get_initial_entropy, where the > > channels in ieee80211_conf data field in common hardware config are not > > yet initialised it seems. I changed the condition to verify for a valid > > pointer before dereferencing it, which seems to solve the problem. > > This is different in the mac82011 version from trunk (compat- > > wireless-2013-11-05), where channelFlags from channel are used in the > > condition, which is an u32, and thus can not result in a null pointer > > dereference. My question now is, although the fix seems sufficient, is it > > also correct/expected behaviour? > > The patch assumes that ah->curchan is left initializes after the tx > power limit test. > In ath9k_init_txpower_limits, the new version has this code: > > if (curchan) > ah->curchan = curchan; > > I think the old version probably overwrites ah->curchan without checking > for NULL. This is part of the entropy patch, which I included in the backport aswell.. diff -u -Naur a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c --- a/drivers/net/wireless/ath/ath9k/init.c 2013-10-28 18:00:58.0 +0100 +++ b/drivers/net/wireless/ath/ath9k/init.c 2013-12-05 21:09:55.0 +0100 @@ -735,7 +735,8 @@ if (ah->caps.hw_caps & ATH9K_HW_CAP_5GHZ) ath9k_init_band_txpower(sc, IEEE80211_BAND_5GHZ); - ah->curchan = curchan; + if (curchan) + ah->curchan = curchan; } void ath9k_reload_chainmask_settings(struct ath_softc *sc) @@ -880,6 +881,19 @@ but the problem is in struct ieee80211_conf, part of hw common config, which is not yet initialised when ath_get_initial_entropy is called from ath9k_init_device.. --- a/drivers/net/wireless/ath/ath9k/hw.c 2013-10-28 18:00:58.0 +0100 +++ b/drivers/net/wireless/ath/ath9k/hw.c 2013-12-05 21:05:25.0 +0100 @@ -131,8 +131,8 @@ static void ath9k_hw_set_clockrate(struct ath_hw *ah) { - struct ieee80211_conf *conf = &ath9k_hw_common(ah)->hw->conf; struct ath_common *common = ath9k_hw_common(ah); + struct ieee80211_conf *conf = &common->hw->conf; unsigned int clockrate; /* AR9287 v1.3+ uses async FIFO and runs the MAC at 117 MHz */ @@ -140,7 +140,7 @@ clockrate = 117; else if (!ah->curchan) /* should really check for CCK instead */ clockrate = ATH9K_CLOCK_RATE_CCK; - else if (conf->chandef.chan->band == IEEE80211_BAND_2GHZ) + else if (conf->chandef.chan && conf->chandef.chan->band == IEEE80211_BAND_2GHZ) In ath9k_hw_reset, I experienced the problem with ath9k_hw_set_clockrate(ah) at line 1998, a few lines later (2008) in ath9k_hw_init_global_settings(ah) I see the same kind of null condition check I introduced in ath9k_hw_set_clockrate: /* * Workaround for early ACK timeouts, add an offset to match the * initval's 64us ack t
[OpenWrt-Devel] [PATCH 1/2][packages] vpnc: UCI support
Signed-off-by: Dmitri Bogomolov <4gli...@gmail.com> diff --git a/net/vpnc/Makefile b/net/vpnc/Makefile index 58af207..66cad8b 100644 --- a/net/vpnc/Makefile +++ b/net/vpnc/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2012 OpenWrt.org +# Copyright (C) 2006-2013 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -20,7 +20,7 @@ include $(INCLUDE_DIR)/package.mk define Package/vpnc SECTION:=net CATEGORY:=Network - DEPENDS:=+libgpg-error +libgcrypt +kmod-tun +vpnc-scripts + DEPENDS:=+libgpg-error +libgcrypt +kmod-tun +vpnc-scripts +coreutils-shuf TITLE:=VPN client for Cisco EasyVPN URL:=http://www.unix-ag.uni-kl.de/~massar/vpnc/ SUBMENU:=VPN @@ -36,6 +36,7 @@ endef define Package/vpnc/conffiles /etc/vpnc/default.conf +/etc/config/vpnc endef define Build/Compile @@ -51,11 +52,19 @@ endef define Package/vpnc/install $(INSTALL_DIR) $(1)/usr/sbin + sed -i -e "s|pid=.*|pid=/var/run/vpnc.pid|g" $(PKG_INSTALL_DIR)/usr/sbin/vpnc-disconnect $(CP) $(PKG_INSTALL_DIR)/usr/sbin/vpnc \ $(PKG_INSTALL_DIR)/usr/sbin/vpnc-disconnect \ $(1)/usr/sbin/ $(INSTALL_DIR) $(1)/etc/vpnc + echo "Pidfile /var/run/vpnc.pid" > $(PKG_INSTALL_DIR)/etc/vpnc/default.conf + echo "Noninteractive" >> $(PKG_INSTALL_DIR)/etc/vpnc/default.conf + $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/vpnc/default.conf $(1)/etc/vpnc/ + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_CONF) ./files/vpnc.config $(1)/etc/config/vpnc + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/vpnc.init $(1)/etc/init.d/vpnc endef $(eval $(call BuildPackage,vpnc)) diff --git a/net/vpnc/files/vpnc.config b/net/vpnc/files/vpnc.config new file mode 100644 index 000..ebeb81d --- /dev/null +++ b/net/vpnc/files/vpnc.config @@ -0,0 +1,6 @@ +config vpnc config +#list ipsec_gateway'vpn.example.com' +#option ipsec_id 'your id' +#option ipsec_secret 'your secret' +#option xauth_username 'username' +#option xauth_password 'password' diff --git a/net/vpnc/files/vpnc.init b/net/vpnc/files/vpnc.init new file mode 100644 index 000..10248c2 --- /dev/null +++ b/net/vpnc/files/vpnc.init @@ -0,0 +1,77 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2013 OpenWrt.org + +START=99 +STOP=10 + +PID_F=/var/run/vpnc.pid +CONFIGFILE="/etc/vpnc.conf" + +append_string() { + local section="$1" + local option="$2" + local value="$3" + local _val + config_get _val "$section" "$option" + [ -n "$_val" ] && append args "$3 $_val" +} + +update_conffile() { + local ipsec_id ipsec_secret ipsec_secret_obfuscated + local xauth_username xauth_password xauth_password_obfuscated + local vendor natt_mode + + config_get ipsec_id config "ipsec_id" + config_get ipsec_secret config "ipsec_secret" + config_get_bool ipsec_secret_obfuscated config "ipsec_secret_obfuscated" 0 + config_get xauth_username config "xauth_username" + config_get xauth_password config "xauth_password" + config_get_bool xauth_password_obfuscated config "xauth_password_obfuscated" 0 + config_get vendor config "vendor" "cisco" + config_get natt_mode config "natt_mode" "natt" + + echo "# Autogenerated vpnc config" > "$CONFIGFILE" + echo "IPSec gateway $ipsec_gateway" >> "$CONFIGFILE" + echo "IPSec ID $ipsec_id" >> "$CONFIGFILE" + echo "Xauth username $xauth_username" >> "$CONFIGFILE" + + local pass_string="IPSec" + [ $ipsec_secret_obfuscated -gt 0 ] && append pass_string "obfuscated" + echo "$pass_string secret $ipsec_secret" >> "$CONFIGFILE" + pass_string="Xauth" + [ $xauth_password_obfuscated -gt 0 ] && append pass_string "obfuscated" + echo "$pass_string password $xauth_password" >> "$CONFIGFILE" + + echo "Vendor $vendor" >> "$CONFIGFILE" + echo "NAT Traversal Mode $natt_mode" >> "$CONFIGFILE" +} + +start() { + config_load "vpnc" + args="" + update_conffile + + append_string config domain "--domain" + append_string config dh_group "--dh" + append_string config pfs "--pfs" + append_string config ifname "--ifname" + # append_string config debug "--debug" + + local _val + config_get _val config xauth_inter 0 + [ $_val -gt 0 ] && append args "--xauth-inter" + config_get _val config dpd_off 0 + [ $_val -eq 1 ] && append args "--dpd-idle 0" + + local ipsec_gateway + config_get ipsec_gateway config "ipsec_gateway" + for ipsec_gateway in $(shuf -e $ipsec_gateway); do + /usr/sbin/vpnc $args --gateway $ipsec_gateway + [ $? -eq 0 ] && break + done +} + +stop() { + vpnc-disconnect + [ -f $PID_F ] && kill $(cat $PID_F) +} ___
Re: [OpenWrt-Devel] Unable to Compile Kernel Header ar71xx
Hi. > Could someone more familiar with the build process have a look? Should be fixed with https://dev.openwrt.org/changeset/38998 - please test. ~ Jow signature.asc Description: OpenPGP digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Unable to Compile Kernel Header ar71xx
Hello Jow, your fix will not work with "make -j"! Please see the attached patch for an alternate implementation, which is successfully in use here. Jo-Philipp Wich wrote on 2013-12-06: > >> Could someone more familiar with the build process have a look? > > Should be fixed with https://dev.openwrt.org/changeset/38998 - please > test. > > ~ Jow Best Regards, Thomas 000-fix_kernel_build_xargs.patch Description: 000-fix_kernel_build_xargs.patch ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] ixp4xx: add GW2375 support
Signed-off-by: Tim Harvey --- .../ixp4xx/patches-3.10/300-avila_support.patch| 61 +++--- 1 file changed, 42 insertions(+), 19 deletions(-) diff --git a/target/linux/ixp4xx/patches-3.10/300-avila_support.patch b/target/linux/ixp4xx/patches-3.10/300-avila_support.patch index b1ca379..e214d96 100644 --- a/target/linux/ixp4xx/patches-3.10/300-avila_support.patch +++ b/target/linux/ixp4xx/patches-3.10/300-avila_support.patch @@ -143,7 +143,7 @@ .name = "intrq", .start = IRQ_IXP4XX_GPIO12, .end= IRQ_IXP4XX_GPIO12, -@@ -133,21 +210,210 @@ static struct platform_device avila_pata +@@ -133,21 +210,237 @@ static struct platform_device avila_pata .resource = avila_pata_resources, }; @@ -358,13 +358,17 @@ + platform_device_register(&avila_npec_device); + + platform_device_register(&avila_gpio_leds_device); - - avila_pata_resources[0].start = IXP4XX_EXP_BUS_BASE(1); - avila_pata_resources[0].end = IXP4XX_EXP_BUS_END(1); -@@ -159,8 +425,339 @@ static void __init avila_init(void) - avila_pata_data.cs1_cfg = IXP4XX_EXP_CS2; - - platform_device_register(&avila_pata); ++ ++ avila_pata_resources[0].start = IXP4XX_EXP_BUS_BASE(1); ++ avila_pata_resources[0].end = IXP4XX_EXP_BUS_END(1); ++ ++ avila_pata_resources[1].start = IXP4XX_EXP_BUS_BASE(2); ++ avila_pata_resources[1].end = IXP4XX_EXP_BUS_END(2); ++ ++ avila_pata_data.cs0_cfg = IXP4XX_EXP_CS1; ++ avila_pata_data.cs1_cfg = IXP4XX_EXP_CS2; ++ ++ platform_device_register(&avila_pata); +} + +static void __init avila_gw2347_setup(void) @@ -381,17 +385,13 @@ + platform_device_register(&avila_npec_device); + + platform_device_register(&avila_gpio_leds_device); -+ -+ avila_pata_resources[0].start = IXP4XX_EXP_BUS_BASE(1); -+ avila_pata_resources[0].end = IXP4XX_EXP_BUS_END(1); -+ -+ avila_pata_resources[1].start = IXP4XX_EXP_BUS_BASE(2); -+ avila_pata_resources[1].end = IXP4XX_EXP_BUS_END(2); -+ -+ avila_pata_data.cs0_cfg = IXP4XX_EXP_CS1; -+ avila_pata_data.cs1_cfg = IXP4XX_EXP_CS2; -+ -+ platform_device_register(&avila_pata); + + avila_pata_resources[0].start = IXP4XX_EXP_BUS_BASE(1); + avila_pata_resources[0].end = IXP4XX_EXP_BUS_END(1); +@@ -159,8 +452,335 @@ static void __init avila_init(void) + avila_pata_data.cs1_cfg = IXP4XX_EXP_CS2; + + platform_device_register(&avila_pata); +} + +static void __init avila_gw2353_setup(void) @@ -545,6 +545,26 @@ + setup_audio_devices(); +} + ++static void __init avila_gw2375_setup(void) ++{ ++ avila_npeb_data.phy = 1; ++ platform_device_register(&avila_npeb_device); ++ ++ avila_npec_data.phy = 2; ++ platform_device_register(&avila_npec_device); ++ ++ *IXP4XX_EXP_CS2 = 0xBFFF3C43; ++ irq_set_irq_type(IRQ_IXP4XX_GPIO10, IRQ_TYPE_EDGE_RISING); ++ avila_optional_uart_data[0].mapbase = 0x5200; ++ avila_optional_uart_data[0].membase = (void __iomem *)ioremap(0x5200, 0x0fff); ++ avila_optional_uart_data[0].irq = IRQ_IXP4XX_GPIO10; ++ ++ avila_optional_uart.num_resources = 1; ++ ++ platform_device_register(&avila_optional_uart); ++ ++ setup_audio_devices(); ++} + + +static struct avila_board_info avila_boards[] __initdata = { @@ -581,6 +601,9 @@ + }, { + .model = "GW2373", + .setup = avila_gw2369_setup, ++ }, { ++ .model = "GW2375", ++ .setup = avila_gw2375_setup, + } +}; + -- 1.8.4.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH][1/2] update Userspace support for the WA850/WA750
> I don't think that it is a patchwork issue because patches from other users > are > fine usually. However I don't know how you are submitting the patches, so I > don't know what you are doing wrong. Maybe gmail causes the corruption. Yup they did, also they reformatted the attached text files/patches > Ideally you should send patches inline instead of attaching that to the mail > Additionally the Signed-off-by line should be part of the patch itself. Indeed, it makes quoting a bit easier as well. But google did not work nicely when including it inline > Your previous patches also had the missing last line issue, but I have fixed > those manually. Thanks for that, also I know switched mail client and that solved the problems so far :) -Martijn ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/2][packages] vpnc: UCI support
This is more controversial part of my patch: watching and reconnecting scripts. I've tried to implement the simplest watch scenario with minimum extra configuration: option keepalive_interval. Signed-off-by: Dmitri Bogomolov <4gli...@gmail.com> diff --git a/net/vpnc/Makefile b/net/vpnc/Makefile index 66cad8b..1c66c6c 100644 --- a/net/vpnc/Makefile +++ b/net/vpnc/Makefile @@ -61,6 +61,13 @@ define Package/vpnc/install echo "Noninteractive" >> $(PKG_INSTALL_DIR)/etc/vpnc/default.conf $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/vpnc/default.conf $(1)/etc/vpnc/ + $(INSTALL_BIN) ./files/watch.sh $(1)/etc/vpnc/ + $(INSTALL_DIR) $(1)/etc/vpnc/post-connect.d + $(INSTALL_BIN) ./files/start_watch $(1)/etc/vpnc/post-connect.d/ + $(INSTALL_DIR) $(1)/etc/vpnc/post-disconnect.d + $(INSTALL_BIN) ./files/stop_watch $(1)/etc/vpnc/post-disconnect.d/ + $(INSTALL_DIR) $(1)/etc/hotplug.d/iface + $(INSTALL_BIN) ./files/vpnc.hotplug $(1)/etc/hotplug.d/iface/30-vpnc $(INSTALL_DIR) $(1)/etc/config $(INSTALL_CONF) ./files/vpnc.config $(1)/etc/config/vpnc $(INSTALL_DIR) $(1)/etc/init.d diff --git a/net/vpnc/files/start_watch b/net/vpnc/files/start_watch new file mode 100644 index 000..4789e84 --- /dev/null +++ b/net/vpnc/files/start_watch @@ -0,0 +1,8 @@ +. /etc/init.d/vpnc +. /lib/config/uci.sh + +local keepalive_interval=$(uci_get vpnc config keepalive_interval 300) +if [ $keepalive_interval -gt 0 ]; then +/etc/vpnc/watch.sh $INTERNAL_IP4_DNS $keepalive_interval $PID_F & +echo $! > /var/run/vpnc_watch.pid +fi diff --git a/net/vpnc/files/stop_watch b/net/vpnc/files/stop_watch new file mode 100644 index 000..dcea0b7 --- /dev/null +++ b/net/vpnc/files/stop_watch @@ -0,0 +1,3 @@ +PID_F=/var/run/vpnc_watch.pid +[ -f $PID_F ] && kill -KILL $(cat $PID_F) +rm -f $PID_F diff --git a/net/vpnc/files/vpnc.config b/net/vpnc/files/vpnc.config index ebeb81d..7d4dda7 100644 --- a/net/vpnc/files/vpnc.config +++ b/net/vpnc/files/vpnc.config @@ -4,3 +4,4 @@ config vpnc config #option ipsec_secret 'your secret' #option xauth_username 'username' #option xauth_password 'password' +option keepalive_interval 300 diff --git a/net/vpnc/files/vpnc.hotplug b/net/vpnc/files/vpnc.hotplug new file mode 100644 index 000..1cce1e2 --- /dev/null +++ b/net/vpnc/files/vpnc.hotplug @@ -0,0 +1,7 @@ +#!/bin/sh + +[ "$ACTION" = ifup -o "$ACTION" = ifupdate ] || exit 0 +if $(/etc/init.d/vpnc enabled) && [ $(fw3 -q network $INTERFACE) = wan ]; then +logger -t vpnc "Restarting due to ifup of $INTERFACE" +/etc/init.d/vpnc restart +fi diff --git a/net/vpnc/files/watch.sh b/net/vpnc/files/watch.sh new file mode 100644 index 000..3e13b53 --- /dev/null +++ b/net/vpnc/files/watch.sh @@ -0,0 +1,25 @@ +#!/bin/sh +# Simple watch script for VPNC + +KEEPALIVE_HOST=$1 +KEEPALIVE_INTERVAL=$2 +PID_F=$3 + +alive_test () { +ping -c2 -q $KEEPALIVE_HOST >> /dev/null +#nslookup $KEEPALIVE_HOST $KEEPALIVE_HOST >> /dev/null +echo $? +} + +while true; do +if [ $(alive_test) -eq 0 ]; then +sleep $KEEPALIVE_INTERVAL +else + # FIXME: what if alive_test continuously fails? +if [ -f $PID_F ]; then + logger -t vpnc "Restarting due to alive test failure" + /etc/init.d/vpnc restart + fi + exit 0 +fi +done ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH][packages]sane-backends: version no longer available as single tarball
sane-backends-1.0.23 is only available as three part download. The current version upstream is 1.0.24. This patch bumps sane-backends to 1.0.24 and refreshes the source patches. This fixes ticket #14579. Signed-off-by John Vogel -- diff --git a/utils/sane-backends/Makefile b/utils/sane-backends/Makefile index 5a99780..d152050 100644 --- a/utils/sane-backends/Makefile +++ b/utils/sane-backends/Makefile @@ -8,14 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=sane-backends -PKG_VERSION:=1.0.23 +PKG_VERSION:=1.0.24 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://fossies.org/linux/misc \ ftp://ftp.sane-project.org/pub/sane/$(PKG_NAME)-$(PKG_VERSION) \ https://alioth.debian.org/frs/download.php/3503 -PKG_MD5SUM:=e226a89c54173efea80e91e9a5eb6573 +PKG_MD5SUM:=1ca68e536cd7c1852322822f5f6ac3a4 PKG_FIXUP:=autoreconf PKG_INSTALL:=1 diff --git a/utils/sane-backends/patches/002-remove-uneeded.patch b/utils/sane-backends/patches/002-remove-uneeded.patch index 3eeca3d..fa2f26f 100644 --- a/utils/sane-backends/patches/002-remove-uneeded.patch +++ b/utils/sane-backends/patches/002-remove-uneeded.patch @@ -1,10 +1,10 @@ --- a/Makefile.in +++ b/Makefile.in -@@ -293,7 +293,7 @@ target_alias = @target_alias@ +@@ -396,7 +396,7 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ --SUBDIRS = include lib sanei backend frontend tools doc po +-SUBDIRS = include lib sanei backend frontend tools doc po testsuite +SUBDIRS = include lib sanei backend frontend DIST_SUBDIRS = include lib sanei backend frontend tools doc po japi testsuite dist_doc_DATA = AUTHORS ChangeLog COPYING LICENSE NEWS PROBLEMS PROJECTS \ diff --git a/utils/sane-backends/patches/010-dont-add-host-include-path.patch b/utils/sane-backends/patches/010-dont-add-host-include-path.patch index c7caf25..cf9c8d8 100644 --- a/utils/sane-backends/patches/010-dont-add-host-include-path.patch +++ b/utils/sane-backends/patches/010-dont-add-host-include-path.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -5070,9 +5070,6 @@ else +@@ -5192,9 +5192,6 @@ fi ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH][packages]i2c-tools: fix TARGET_CPPFLAGS
The Makefile for i2c-tools sets TARGET_CPPFLAGS to point to the linux source headers rather that the i2c-tools header, causing build failure. This patch changes TARGET_CPPFLAGS to point to the packages include dir. This fixes tickets #13546 and #13857. Signed-off-by John Vogel -- diff --git a/utils/i2c-tools/Makefile b/utils/i2c-tools/Makefile index 7085dd5..51dc010 100644 --- a/utils/i2c-tools/Makefile +++ b/utils/i2c-tools/Makefile @@ -62,7 +62,7 @@ define Package/python-smbus/description This package contain the python bindings for Linux SMBus access through i2c-dev. endef -TARGET_CPPFLAGS += -I$(LINUX_DIR)/include +TARGET_CPPFLAGS += -I$(PKG_BUILD_DIR)/include ifdef CONFIG_PACKAGE_python-smbus define Build/Compile/python-smbus ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH][packages]gst-plugins-bad: disable building ivorbis plugin
The configuration of gst-plugins-bad must disable testing for ogg, causing ivorbis to be enabled erroneously. This patch explisitely disables ivorbis at configure which fixes build. -- diff --git a/multimedia/gst-plugins-base/Makefile b/multimedia/gst-plugins-base/Makefile index 9c16586..9951c3f 100644 --- a/multimedia/gst-plugins-base/Makefile +++ b/multimedia/gst-plugins-base/Makefile @@ -86,6 +86,7 @@ CONFIGURE_ARGS += \ $(call GST_COND_SELECT,gio) \ --disable-gnome_vfs \ --disable-gst_v4l \ + --disable-ivorbis \ --disable-libvisual \ $(call GST_COND_SELECT,ogg) \ --disable-oggtest \ ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] minidlna: create /dev/inotify when necessary.
Hi, On 2 December 2013 19:24, Yousong Zhou wrote: > Hi, John and all. > > On 2 December 2013 14:51, John Crispin wrote: >> On 02/12/13 04:58, Yousong Zhou wrote: >>> >>> On ar71xx platform, /dev/inotify is not created by default. Create it >>> when inotify is enabled. >>> >>> This should close ticket #10711. >>> >>> Signed-off-by: Yousong Zhou >>> --- >>> multimedia/minidlna/files/minidlna.init |3 +++ >>> 1 files changed, 3 insertions(+), 0 deletions(-) >>> >>> diff --git a/multimedia/minidlna/files/minidlna.init >>> b/multimedia/minidlna/files/minidlna.init >>> index 581c8d1..60602c1 100644 >>> --- a/multimedia/minidlna/files/minidlna.init >>> +++ b/multimedia/minidlna/files/minidlna.init >>> @@ -48,6 +48,9 @@ minidlna_create_config() { >>> >>> [ -z "$interface" -o -t "$port" ]&& return 1 >>> >>> + config_get_bool inotify $cfg inotify >>> + [ "$inotify" -gt 0 ]&& [ ! -c /dev/inotify ]&& mknod >>> /dev/inotify c 10 63; >>> + >>> echo "# this file is generated automatically, don't edit"> >>> "$MINIDLNA_CONFIG_FILE" >>> >>> minidlna_cfg_append "port=$port" >> >> >> Hi, >> >> creating the device node inside a init.d script seems wrong >> >> can you try and figure out why hotplug.d is not creating the node ? > > Please forget this patch. inotify uses system call interface now. No > device node is involved. > > Shame on me that after creating the node and restarting minidlna, it > created an illusion that inotify for minidlna started working. > Nevertheless, there do exist situation that is not noticed by > minidlna. I'll look into that. I wrote a simple program to test inotify support on OpenWrt. It looks like overlayfs' support for inotify is not very well. Events like IN_CLOSE_WRITE are not informed to registered process. In the case of minidlna, it received only IN_CREATE event and found out that it was an invalid media file. IN_CLOSE_WRITE was not sent at all. Currently, to work around this, we can set media_dir to the actual filesystem directory, like /overlay/root/minidlna, instead of /root/minidlna. yousong ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel