[OpenWrt-Devel] [PATCH] [generic] ramips: adding support for OYE-0001 Wireless Router
From: Tom Deng <2579131...@qq.com> Adding support for OYE-0001 Wireless Router. OYE-0001 is a wireless router made by oyewifi.com. Below is the details: MT7620A, 128MB DDR2, 16MB FLASH, SD Slot, USB 2.0, 4 x LAN + 1 x WAN. Signed-off-by: Tom Deng <2579131...@qq.com> --- Index: target/linux/ramips/base-files/etc/diag.sh === --- target/linux/ramips/base-files/etc/diag.sh(revision 43797) +++ target/linux/ramips/base-files/etc/diag.sh(working copy) @@ -185,6 +185,9 @@ f7c027) status_led="belkin:orange:status" ;; +oye-0001) +status_led="oye:green:wifi" +;; na930) status_led="na930:blue:power" ;; Index: target/linux/ramips/base-files/etc/uci-defaults/01_leds === --- target/linux/ramips/base-files/etc/uci-defaults/01_leds(revision 43797) +++ target/linux/ramips/base-files/etc/uci-defaults/01_leds(working copy) @@ -198,6 +198,10 @@ set_wifi_led "zbtlink:blue:air" set_usb_led "zbtlink:blue:usb" ;; +oye-0001) +ucidef_set_led_default "power" "power" "oye:green:power" "1" +set_wifi_led "oye:green:wifi" +;; wr8305rt) ucidef_set_led_default "power" "power" "wr8305rt:sys" "1" set_usb_led "wr8305rt:usb" Index: target/linux/ramips/base-files/etc/uci-defaults/02_network === --- target/linux/ramips/base-files/etc/uci-defaults/02_network(revision 43797) +++ target/linux/ramips/base-files/etc/uci-defaults/02_network(working copy) @@ -103,6 +103,7 @@ dir-615-h1 | \ hlk-rm04 | \ mzk-w300nh2 | \ +oye-0001 | \ mzk-750dhp) ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" ucidef_add_switch "switch0" "1" "1" @@ -220,6 +221,11 @@ wan_mac=$(mtd_get_mac_binary devdata 7) ;; +oye-0001) +lan_mac=$(mtd_get_mac_binary factory 40) +wan_mac=$(mtd_get_mac_binary factory 46) +;; + w306r-v20) lan_mac=$(cat /sys/class/net/eth0/address) wan_mac=$(macaddr_add "$lan_mac" 5) Index: target/linux/ramips/base-files/lib/ramips.sh === --- target/linux/ramips/base-files/lib/ramips.sh(revision 43797) +++ target/linux/ramips/base-files/lib/ramips.sh(working copy) @@ -322,6 +322,9 @@ *"Zbtlink ZBT-WA05") name="zbt-wa05" ;; +*"OYE-0001") +name="oye-0001" +;; *"ZBT WR8305RT") name="wr8305rt" ;; Index: target/linux/ramips/base-files/lib/upgrade/platform.sh === --- target/linux/ramips/base-files/lib/upgrade/platform.sh(revision 43797) +++ target/linux/ramips/base-files/lib/upgrade/platform.sh(working copy) @@ -95,6 +95,7 @@ wmr300 |\ wr8305rt |\ wrtnode |\ +oye-0001 |\ x5 |\ x8 |\ zbt-wa05 |\ Index: target/linux/ramips/dts/OYE-0001.dts === --- target/linux/ramips/dts/OYE-0001.dts(revision 0) +++ target/linux/ramips/dts/OYE-0001.dts(revision 0) @@ -0,0 +1,123 @@ +/dts-v1/; + +/include/ "mt7620a.dtsi" + +/ { +compatible = "ralink,mt7620a-soc"; +model = "OYE-0001"; + +chosen { +bootargs = "console=ttyS0,115200"; +}; + +palmbus@1000 { +gpio2: gpio@660 { +status = "okay"; +}; + +gpio3: gpio@688 { +status = "okay"; +}; + +spi@b00 { +status = "okay"; + +m25p80@0 { +#address-cells = <1>; +#size-cells = <1>; +compatible = "w25q128"; +reg = <0 0>; +linux,modalias = "m25p80", "w25q128"; +spi-max-frequency = <1000>; + +partition@0 { +label = "u-boot"; +reg = <0x0 0x3>; +read-only; +}; + +partition@3 { +label = "u-boot-env"; +reg = <0x3 0x1>; +read-only; +}; + +factory: partition@4 { +label = "factory"; +reg = <0x4 0x1>; +read-only; +}; + +partition@5 { +label = "firmware"; +reg = <0x5 0xfb>; +}; + +}; +}; +}; + +pinctrl { +state_default: pinctrl0 { +gpio { +ralink,group
[OpenWrt-Devel] [PATCH procd] fix /dev/shm permissions
On my Ubuntu system, the permissions are 1777. They are incorrect in procd, leading to this: https://forum.openwrt.org/viewtopic.php?id=57073 This in intended for both CC and DD. Signed-off-by: Daniel Gimpelevich --- a/initd/early.c 2015-06-14 19:31:47.0 -0700 +++ b/initd/early.c 2015-06-17 02:15:23.858379753 -0700 @@ -64,7 +64,7 @@ mount("sysfs", "/sys", "sysfs", MS_NOATIME, 0); mount("none", "/sys/fs/cgroup", "cgroup", 0, 0); mount("tmpfs", "/dev", "tmpfs", MS_NOATIME, "mode=0755,size=512K"); - mkdir("/dev/shm", 0755); + mkdir("/dev/shm", 01777); mkdir("/dev/pts", 0755); mount("devpts", "/dev/pts", "devpts", MS_NOATIME, "mode=600"); early_dev(); --- a/plug/coldplug.c 2015-06-14 19:31:47.0 -0700 +++ b/plug/coldplug.c 2015-06-17 02:17:43.259071000 -0700 @@ -44,7 +44,7 @@ umount2("/dev/pts", MNT_DETACH); umount2("/dev/", MNT_DETACH); mount("tmpfs", "/dev", "tmpfs", 0, "mode=0755,size=512K"); - mkdir("/dev/shm", 0755); + mkdir("/dev/shm", 01777); mkdir("/dev/pts", 0755); mount("devpts", "/dev/pts", "devpts", 0, 0); udevtrigger.cb = udevtrigger_complete; ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] brcm47xx: drop global description in favour of subtarget ones
On 28 May 2015 at 23:43, Rafał Miłecki wrote: > On 28 May 2015 at 23:35, Michael Heimpold wrote: >> Defining a description in this makefile prevents the subtarget >> Target/Description sections to appear in menuconfig's help >> for the subtargets. >> >> However, this also removes the menuconfig's help text for the >> target itself, but I'm not skilled enough to avoid this. > > Guys, can we somehow improve (sub)targets handling? I'd expect > 1) Target System use brcm47xx/Makefile > 2) Subtarget use brcm47xx/*/target.mk Ping? -- Rafał ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] jffs2 CRC failed (many times after reboot) - Ralink MT7628
2015-06-15 10:08 GMT+02:00 Baptiste Clenet : > Hello, > > The first boot, after flashing a new image, runs fine. > I edit my /etc/config/network configuration then reboot and I get > those errors (every reboot): > > [8.13] jffs2: jffs2_scan_inode_node(): CRC failed on node at > 0x0046000c: Read 0x, calculated 0x4900568b > ... > ... (many times) > ... > [ 15.41] jffs2: notice: (306) jffs2_build_xattr_subsystem: > complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) > and 0 of xref (0 dead, 0 orphan) found. > > The flash driver seems to not work correctly after reboot. > Any ideas? > > > Baptiste > This not just for /etc/config/network, any files or folder created is deleted after reboot. How is this handle by openwrt/linux? Baptiste ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] openvpn: bump to 2.3.7.
On 2015-06-15 07:01, Yousong Zhou wrote: > Two patches are dropped as they were already applied upstream. > > Signed-off-by: Yousong Zhou Please fix the md5sum and refresh all patches. - Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] musl: provide wtmp compatibility stub for Linux-PAM.
On 2015-06-16 15:32, Yousong Zhou wrote: > Signed-off-by: Yousong Zhou Apparently this approach was rejected upstream. I want to keep the amount of non-upstream musl patches to a minimum. This issue seems to be easy to deal with by adding a small patch to Linux-PAM like Alpine Linux has done: http://git.alpinelinux.org/cgit/aports/tree/main/linux-pam/fix-compat.patch - Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] kernel: mitigate cgroups config dependency changes
On 2015-06-16 15:20, Daniel Golle wrote: > Memory Resource Controller no longer depends on Resource counters since > Kernel version 4.0. > > Signed-off-by: Daniel Golle > --- > config/Config-kernel.in | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/config/Config-kernel.in b/config/Config-kernel.in > index cc8df5a..86753ca 100644 > --- a/config/Config-kernel.in > +++ b/config/Config-kernel.in > @@ -300,7 +300,7 @@ if KERNEL_CGROUPS > config KERNEL_MEMCG > bool "Memory Resource Controller for Control Groups" > default n > - depends on KERNEL_RESOURCE_COUNTERS > + depends on KERNEL_RESOURCE_COUNTERS || LINUX_4_0 Should be || !LINUX_3_18 instead, otherwise it would have to be updated with every new kernel release that we add. - Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] Add support for PandoraBox PBR-M1 Board
On 2015-06-16 09:27, Tymon wrote: > Hi all, > please find below patch that adds support for PandoraBox PBR-M1 Board > to OpenWRT trunk. > > The board is based on mt7621 platform, and this patch > adds a separate profile for pbr-m1. > > Best regards, > Tymon > > > From: tymon > > Signed-off-by: tymon The patch is badly mangled and does not apply. Also, please fix your email subject and description. Subject: [PATCH] ramips: add support for PandoraBox PBR-M1 Email Body: Signed-off-by: ... - Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH procd] fix /dev/shm permissions, this time for real
Previous patch did not account for umask, now adding that. Signed-off-by: Daniel Gimpelevich --- a/initd/early.c +++ b/initd/early.c @@ -60,6 +60,8 @@ static void early_mounts(void) { + unsigned int oldumask = umask(0); + mount("proc", "/proc", "proc", MS_NOATIME, 0); mount("sysfs", "/sys", "sysfs", MS_NOATIME, 0); mount("none", "/sys/fs/cgroup", "cgroup", 0, 0); @@ -77,6 +79,7 @@ mkdir("/tmp/run", 0777); mkdir("/tmp/lock", 0777); mkdir("/tmp/state", 0777); + umask(oldumask); } static void --- a/plug/coldplug.c +++ b/plug/coldplug.c @@ -40,12 +40,14 @@ void procd_coldplug(void) { char *argv[] = { "udevtrigger", NULL }; + unsigned int oldumask = umask(0); umount2("/dev/pts", MNT_DETACH); umount2("/dev/", MNT_DETACH); mount("tmpfs", "/dev", "tmpfs", 0, "mode=0755,size=512K"); mkdir("/dev/shm", 01777); mkdir("/dev/pts", 0755); + umask(oldumask); mount("devpts", "/dev/pts", "devpts", 0, 0); udevtrigger.cb = udevtrigger_complete; udevtrigger.pid = fork(); ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v2] kernel: mitigate cgroups config dependency changes
Memory Resource Controller no longer depends on Resource counters since Kernel version 4.0. 3.18 is the only still supported version needing Resource counters for MEMCG, thus declare the dependency only for that version. Signed-off-by: Daniel Golle --- config/Config-kernel.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/Config-kernel.in b/config/Config-kernel.in index cc8df5a..2572bf4 100644 --- a/config/Config-kernel.in +++ b/config/Config-kernel.in @@ -300,7 +300,7 @@ if KERNEL_CGROUPS config KERNEL_MEMCG bool "Memory Resource Controller for Control Groups" default n - depends on KERNEL_RESOURCE_COUNTERS + depends on KERNEL_RESOURCE_COUNTERS || !LINUX_3_18 help Provides a memory resource controller that manages both anonymous memory and page cache. (See Documentation/cgroups/memory.txt) -- 2.4.3 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v2] openvpn: bump to 2.3.7.
Two patches are dropped as they were already applied upstream. Signed-off-by: Yousong Zhou --- v2 <- v1 - Update PKG_MD5SUM - Refreshed all patches package/network/services/openvpn/Makefile |6 +-- .../patches/001-backport_cipher_none_fix.patch | 57 .../services/openvpn/patches/100-polarssl_compat.h |2 +- .../services/openvpn/patches/110-musl_compat.patch | 13 - .../120-polarssl-disable-record-splitting.patch|6 +-- 5 files changed, 6 insertions(+), 78 deletions(-) delete mode 100644 package/network/services/openvpn/patches/001-backport_cipher_none_fix.patch delete mode 100644 package/network/services/openvpn/patches/110-musl_compat.patch diff --git a/package/network/services/openvpn/Makefile b/package/network/services/openvpn/Makefile index 81d8007..f3de63d 100644 --- a/package/network/services/openvpn/Makefile +++ b/package/network/services/openvpn/Makefile @@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=openvpn -PKG_VERSION:=2.3.6 -PKG_RELEASE:=5 +PKG_VERSION:=2.3.7 +PKG_RELEASE:=1 PKG_SOURCE_URL:=http://swupdate.openvpn.net/community/releases PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=6ca03fe0fd093e0d01601abee808835c +PKG_MD5SUM:=070bca95e478f88dff9ec6a221e2c3f7 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) diff --git a/package/network/services/openvpn/patches/001-backport_cipher_none_fix.patch b/package/network/services/openvpn/patches/001-backport_cipher_none_fix.patch deleted file mode 100644 index af445e3..000 --- a/package/network/services/openvpn/patches/001-backport_cipher_none_fix.patch +++ /dev/null @@ -1,57 +0,0 @@ -commit 98156e90e1e83133a6a6a020db8e7333ada6156b -Author: Steffan Karger -Date: Tue Dec 2 21:42:00 2014 +0100 - -Really fix '--cipher none' regression - -... by not incorrectly hinting to the compiler the function argument of -cipher_kt_mode_{cbc,ofb_cfb}() is nonnull, since that no longer is the -case. - -Verified the fix on Debian Wheezy, one of the platforms the reporter in -trac #473 mentions with a compiler that would optimize out the required -checks. - -Also add a testcase for --cipher none to t_lpback, to prevent further -regressions. - -Signed-off-by: Steffan Karger -Acked-by: Gert Doering -Message-Id: <1417552920-31770-1-git-send-email-stef...@karger.me> -URL: http://article.gmane.org/gmane.network.openvpn.devel/9300 -Signed-off-by: Gert Doering - a/src/openvpn/crypto_backend.h -+++ b/src/openvpn/crypto_backend.h -@@ -237,8 +237,7 @@ int cipher_kt_mode (const cipher_kt_t *c - * - * @returntrue iff the cipher is a CBC mode cipher. - */ --bool cipher_kt_mode_cbc(const cipher_kt_t *cipher) -- __attribute__((nonnull)); -+bool cipher_kt_mode_cbc(const cipher_kt_t *cipher); - - /** - * Check if the supplied cipher is a supported OFB or CFB mode cipher. -@@ -247,8 +246,7 @@ bool cipher_kt_mode_cbc(const cipher_kt_ - * - * @returntrue iff the cipher is a OFB or CFB mode cipher. - */ --bool cipher_kt_mode_ofb_cfb(const cipher_kt_t *cipher) -- __attribute__((nonnull)); -+bool cipher_kt_mode_ofb_cfb(const cipher_kt_t *cipher); - - - /** a/tests/t_lpback.sh -+++ b/tests/t_lpback.sh -@@ -35,6 +35,9 @@ CIPHERS=$(${top_builddir}/src/openvpn/op - # GD, 2014-07-06 do not test RC5-* either (fails on NetBSD w/o libcrypto_rc5) - CIPHERS=$(echo "$CIPHERS" | egrep -v '^(DES-EDE3-CFB1|DES-CFB1|RC5-)' ) - -+# Also test cipher 'none' -+CIPHERS=${CIPHERS}$(printf "\nnone") -+ - "${top_builddir}/src/openvpn/openvpn" --genkey --secret key.$$ - set +e - diff --git a/package/network/services/openvpn/patches/100-polarssl_compat.h b/package/network/services/openvpn/patches/100-polarssl_compat.h index 4def967..a1c83b0 100644 --- a/package/network/services/openvpn/patches/100-polarssl_compat.h +++ b/package/network/services/openvpn/patches/100-polarssl_compat.h @@ -239,7 +239,7 @@ { --- a/configure.ac +++ b/configure.ac -@@ -819,13 +819,13 @@ if test "${with_crypto_library}" = "pola +@@ -832,13 +832,13 @@ if test "${with_crypto_library}" = "pola #include ]], [[ diff --git a/package/network/services/openvpn/patches/110-musl_compat.patch b/package/network/services/openvpn/patches/110-musl_compat.patch deleted file mode 100644 index 566c17f..000 --- a/package/network/services/openvpn/patches/110-musl_compat.patch +++ /dev/null @@ -1,13 +0,0 @@ a/src/openvpn/syshead.h -+++ b/src/openvpn/syshead.h -@@ -214,10 +214,6 @@ - - #ifdef TARGET_LINUX - --#if defined(HAVE_NETINET_IF_ETHER_H) --#include --#endif -- - #ifdef HAVE_LINUX_IF_TUN_H - #include - #endif diff --git a/package/network/services/openvpn/patches/120-polarssl-disable-record-splitting.patch b/package/network/services/openvpn/patches/120-polarssl-disable-record-splitting.patch index
[OpenWrt-Devel] [PATCH] ipkg-build: suppress timestamps in gzip headers
When creating control.tar.gz, data.tar.gz and $package.ipk tar compresses them with default gzip options. This includes build timestamps in their gzip headers. By setting the GZIP env variable to -n, gzip no longer embeds them, which is a step towards reproducibility. See also [1] for more detailed motivations. [1]: https://wiki.debian.org/ReproducibleBuilds/About Signed-off-by: Reiner Herrmann --- scripts/ipkg-build | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/ipkg-build b/scripts/ipkg-build index c466f28..6787ed4 100755 --- a/scripts/ipkg-build +++ b/scripts/ipkg-build @@ -13,6 +13,7 @@ version=1.0 FIND="$(which find)" FIND="${FIND:-$(which gfind)}" TAR="${TAR:-$(which tar)}" +export GZIP="-n" ipkg_extract_value() { sed -e "s/^[^:]*:[[:space:]]*//" -- 2.1.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] libusb-compat: fix build with musl
Signed-off-by: Álvaro Fernández Rojas --- package/libs/libusb-compat/Makefile| 4 +- .../patches/001-fix-musl-stdint.patch | 185 + 2 files changed, 187 insertions(+), 2 deletions(-) create mode 100644 package/libs/libusb-compat/patches/001-fix-musl-stdint.patch diff --git a/package/libs/libusb-compat/Makefile b/package/libs/libusb-compat/Makefile index 561091f..c1cb587 100644 --- a/package/libs/libusb-compat/Makefile +++ b/package/libs/libusb-compat/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2010-2014 OpenWrt.org +# Copyright (C) 2010-2015 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libusb-compat PKG_VERSION:=0.1.4 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=@SF/libusb diff --git a/package/libs/libusb-compat/patches/001-fix-musl-stdint.patch b/package/libs/libusb-compat/patches/001-fix-musl-stdint.patch new file mode 100644 index 000..333bc09 --- /dev/null +++ b/package/libs/libusb-compat/patches/001-fix-musl-stdint.patch @@ -0,0 +1,185 @@ +--- a/libusb/usb.h b/libusb/usb.h +@@ -27,6 +27,7 @@ + + #include + #include ++#include + #include + + #include +@@ -78,40 +79,40 @@ + + /* All standard descriptors have these 2 fields in common */ + struct usb_descriptor_header { +- u_int8_t bLength; +- u_int8_t bDescriptorType; ++ uint8_t bLength; ++ uint8_t bDescriptorType; + }; + + /* String descriptor */ + struct usb_string_descriptor { +- u_int8_t bLength; +- u_int8_t bDescriptorType; +- u_int16_t wData[1]; ++ uint8_t bLength; ++ uint8_t bDescriptorType; ++ uint16_t wData[1]; + }; + + /* HID descriptor */ + struct usb_hid_descriptor { +- u_int8_t bLength; +- u_int8_t bDescriptorType; +- u_int16_t bcdHID; +- u_int8_t bCountryCode; +- u_int8_t bNumDescriptors; +- /* u_int8_t bReportDescriptorType; */ +- /* u_int16_t wDescriptorLength; */ ++ uint8_t bLength; ++ uint8_t bDescriptorType; ++ uint16_t bcdHID; ++ uint8_t bCountryCode; ++ uint8_t bNumDescriptors; ++ /* uint8_t bReportDescriptorType; */ ++ /* uint16_t wDescriptorLength; */ + /* ... */ + }; + + /* Endpoint descriptor */ + #define USB_MAXENDPOINTS 32 + struct usb_endpoint_descriptor { +- u_int8_t bLength; +- u_int8_t bDescriptorType; +- u_int8_t bEndpointAddress; +- u_int8_t bmAttributes; +- u_int16_t wMaxPacketSize; +- u_int8_t bInterval; +- u_int8_t bRefresh; +- u_int8_t bSynchAddress; ++ uint8_t bLength; ++ uint8_t bDescriptorType; ++ uint8_t bEndpointAddress; ++ uint8_t bmAttributes; ++ uint16_t wMaxPacketSize; ++ uint8_t bInterval; ++ uint8_t bRefresh; ++ uint8_t bSynchAddress; + + unsigned char *extra; /* Extra descriptors */ + int extralen; +@@ -129,15 +130,15 @@ struct usb_endpoint_descriptor { + /* Interface descriptor */ + #define USB_MAXINTERFACES 32 + struct usb_interface_descriptor { +- u_int8_t bLength; +- u_int8_t bDescriptorType; +- u_int8_t bInterfaceNumber; +- u_int8_t bAlternateSetting; +- u_int8_t bNumEndpoints; +- u_int8_t bInterfaceClass; +- u_int8_t bInterfaceSubClass; +- u_int8_t bInterfaceProtocol; +- u_int8_t iInterface; ++ uint8_t bLength; ++ uint8_t bDescriptorType; ++ uint8_t bInterfaceNumber; ++ uint8_t bAlternateSetting; ++ uint8_t bNumEndpoints; ++ uint8_t bInterfaceClass; ++ uint8_t bInterfaceSubClass; ++ uint8_t bInterfaceProtocol; ++ uint8_t iInterface; + + struct usb_endpoint_descriptor *endpoint; + +@@ -155,14 +156,14 @@ struct usb_interface { + /* Configuration descriptor information.. */ + #define USB_MAXCONFIG 8 + struct usb_config_descriptor { +- u_int8_t bLength; +- u_int8_t bDescriptorType; +- u_int16_t wTotalLength; +- u_int8_t bNumInterfaces; +- u_int8_t bConfigurationValue; +- u_int8_t iConfiguration; +- u_int8_t bmAttributes; +- u_int8_t MaxPower; ++ uint8_t bLength; ++ uint8_t bDescriptorType; ++ uint16_t wTotalLength; ++ uint8_t bNumInterfaces; ++ uint8_t bConfigurationValue; ++ uint8_t iConfiguration; ++ uint8_t bmAttributes; ++ uint8_t MaxPower; + + struct usb_interface *interface; + +@@ -172,28 +173,28 @@ struct usb_config_descriptor { + + /* Device descriptor */ + struct usb_device_descriptor { +- u_int8_t bLength; +- u_int8_t bDescriptorType; +- u_int16_t bcdUSB; +- u_int8_t bDeviceClass; +- u_int8_t bDeviceSubClass; +- u_int8_t bDeviceProtocol; +- u_int8_t bMaxPacketSize0; +- u_int16_t idVendor; +- u_int
Re: [OpenWrt-Devel] [PATCH] libusb-compat: fix build with musl
Hi Álvaro, hmm, I have no issues building it under musl here. The buildbots seems to report no errors either. Can you provide a diffconfig.sh output? Btw, you do not need to replace all types, u_int{8,16,32,64}_t is exposed by musl if you include *and* if _GNU_SOURCE is defined. ~ 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] [PATCH] libusb-compat: fix build with musl
Hi Jow, I didn't mean to use that commit description, but something like "fix musl compatibility". You're right, libusb-compat builds without issues, but when flashrom checks for libusb-compat it fails due to u_int*_t types: http://buildbot.openwrt.org:8010/broken_packages/brcm63xx.smp/flashrom/compile.txt Regards, Álvaro. El 17/06/2015 a las 22:29, Jo-Philipp Wich escribió: > Hi Álvaro, > > hmm, I have no issues building it under musl here. The buildbots seems > to report no errors either. > > Can you provide a diffconfig.sh output? > > Btw, you do not need to replace all types, u_int{8,16,32,64}_t is > exposed by musl if you include *and* if _GNU_SOURCE is > defined. > > ~ Jow > > > > ___ > 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
[OpenWrt-Devel] [PATCH] Add support for WeIO board. WeIO board (http://we-io.net) is based on Carambola2 module from 8Devices, and the patch adds a separate profile.
Signed-off-by: Drasko DRASKOVIC --- target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 + .../ar71xx/base-files/lib/upgrade/platform.sh | 3 +- target/linux/ar71xx/config-3.18| 1 + .../linux/ar71xx/files/arch/mips/ath79/mach-weio.c | 162 + target/linux/ar71xx/generic/profiles/weio.mk | 17 +++ target/linux/ar71xx/image/Makefile | 8 + .../610-MIPS-ath79-openwrt-machines.patch | 21 ++- 7 files changed, 209 insertions(+), 6 deletions(-) create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c create mode 100644 target/linux/ar71xx/generic/profiles/weio.mk diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index b13be1e..6a12533 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -793,6 +793,9 @@ ar71xx_board_detect() { *"UniFi AP Pro") name="uap-pro" ;; + *"WeIO") + name="weio" + ;; *WHR-G301N) name="whr-g301n" ;; diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index 3dbd91c..0f2920b 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -243,7 +243,8 @@ platform_check_image() { nbg460n_550n_550nh | \ unifi | \ unifi-outdoor | \ - carambola2 ) + carambola2 | \ + weio ) [ "$magic" != "2705" ] && { echo "Invalid image type." return 1 diff --git a/target/linux/ar71xx/config-3.18 b/target/linux/ar71xx/config-3.18 index 543b77e..e81ba51 100644 --- a/target/linux/ar71xx/config-3.18 +++ b/target/linux/ar71xx/config-3.18 @@ -126,6 +126,7 @@ CONFIG_ATH79_MACH_TL_WR941ND=y CONFIG_ATH79_MACH_TUBE2H=y CONFIG_ATH79_MACH_UBNT=y CONFIG_ATH79_MACH_UBNT_XM=y +CONFIG_ATH79_MACH_WEIO=y CONFIG_ATH79_MACH_WHR_HP_G300N=y CONFIG_ATH79_MACH_WLAE_AG300N=y CONFIG_ATH79_MACH_WLR8100=y diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c new file mode 100644 index 000..2ac4f92 --- /dev/null +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c @@ -0,0 +1,162 @@ +/** + * WEIO Web Of Things Platform + * + * Copyright (C) 2013 Drasko DRASKOVIC and Uros PETREVSKI + * + * ## ## ### + * ## ## ## #### ## ## + * ## ## ## #### ## ## + * ## ## ## #### ## ## + * ## ## ## #### ## ## + * ## ## ## #### ## ## + * ### ### ### + * + * Web Of Things Platform + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * Authors : + * Drasko DRASKOVIC + * Uros PETREVSKI + */ + +#include +#include +#include "common.h" +#include "dev-eth.h" +#include "dev-gpio-buttons.h" +#include "dev-leds-gpio.h" +#include "dev-m25p80.h" +#include "dev-spi.h" +#include "dev-usb.h" +#include "dev-wmac.h" +#include "machtypes.h" +#include "linux/i2c-gpio.h" +#include "linux/platform_device.h" + +#define WEIO_GPIO_LED_STA 1 +#define WEIO_GPIO_LED_AP 16 +//#define WEIO_GPIO_LED_ETH0 13 + +#define WEIO_GPIO_BTN_AP 20 +#define WEIO_GPIO_BTN_RESET23 + +#define WEIO_KEYS_POLL_INTERVAL20 /* msecs */ +#define WEIO_KEYS_DEBOUNCE_INTERVAL(3 * WEIO_KEYS_POLL_INTERVAL) + +#define WEIO_MAC0_OFFSET 0x +#define WEIO_MAC1_OFFSET 0x0006 +#define WEIO_CALDATA_OFFSET0x1000 +#define WEIO_WMAC_MAC_OFFSET 0x1002 + +static struct gpio_led weio_leds_gpio[] __initdata = { + { + .name = "weio:green:sta", + .gpio = WEIO_GPIO_LED_STA, + .active_low = 1, +.default_state = LEDS_GPIO_DEFSTATE_ON, + }, { + .name = "weio:green:ap", + .gpio =
Re: [OpenWrt-Devel] [PATCH] Add support for WeIO board
Thanks for revision, I have resent corrected patch: - Added description - Added signed-of - Corrected alphabetical order of `target/linux/ar71xx/base-files/lib/ar71xx.sh` BR, Drasko On Wed, Jun 17, 2015 at 2:17 PM, Karl Palsson wrote: > > Drasko DRASKOVIC wrote: >> --- >> target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 + >> .../ar71xx/base-files/lib/upgrade/platform.sh | 3 +- >> target/linux/ar71xx/config-3.18| 1 + >> .../linux/ar71xx/files/arch/mips/ath79/mach-weio.c | 162 >> + >> target/linux/ar71xx/generic/profiles/weio.mk | 17 +++ >> target/linux/ar71xx/image/Makefile | 8 + >> .../610-MIPS-ath79-openwrt-machines.patch | 21 ++- >> 7 files changed, 209 insertions(+), 6 deletions(-) >> create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c >> create mode 100644 target/linux/ar71xx/generic/profiles/weio.mk >> >> diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh >> b/target/linux/ar71xx/base-files/lib/ar71xx.sh >> index b13be1e..fe7478c 100755 >> --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh >> +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh >> @@ -892,6 +892,9 @@ ar71xx_board_detect() { >> "8devices Carambola2"*) >> name="carambola2" >> ;; >> + *"WeIO") >> + name="weio" >> + ;; >> *"Sitecom WLR-8100") >> name="wlr8100" >> ;; > > This one is in the wrong place too. Those last few entries, from EmbWir > Dorin down to HiWiFi are out of order, but the rest of the ENTIRE list > is well sorted. Your WeIO should be up around line 790, after the > Unifi, and before the WHR > > Sincerely, > Karl Palsson ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] Add support for WeIO board. WeIO board (http://we-io.net) is based on Carambola2 module from 8Devices, and the patch adds a separate profile.
You said you're removed the commented out code? Also, somehow your description ended up in the subject... (More comments inline, but this looks like an older version of the patch) Sincerely, Karl Palsson Drasko DRASKOVIC wrote: > Signed-off-by: Drasko DRASKOVIC > --- > target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 + > .../ar71xx/base-files/lib/upgrade/platform.sh | 3 +- > target/linux/ar71xx/config-3.18| 1 + > .../linux/ar71xx/files/arch/mips/ath79/mach-weio.c | 162 > + > target/linux/ar71xx/generic/profiles/weio.mk | 17 +++ > target/linux/ar71xx/image/Makefile | 8 + > .../610-MIPS-ath79-openwrt-machines.patch | 21 ++- > 7 files changed, 209 insertions(+), 6 deletions(-) > create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c > create mode 100644 target/linux/ar71xx/generic/profiles/weio.mk > > + > +#define WEIO_GPIO_LED_STA1 > +#define WEIO_GPIO_LED_AP 16 > +//#define WEIO_GPIO_LED_ETH0 13 Is there or not? Kill it if it doesn't exist. > + > +#define WEIO_GPIO_BTN_AP 20 > +#define WEIO_GPIO_BTN_RESET 23 > + > +#define WEIO_KEYS_POLL_INTERVAL 20 /* msecs */ > +#define WEIO_KEYS_DEBOUNCE_INTERVAL (3 * WEIO_KEYS_POLL_INTERVAL) > + > +#define WEIO_MAC0_OFFSET 0x > +#define WEIO_MAC1_OFFSET 0x0006 > +#define WEIO_CALDATA_OFFSET 0x1000 > +static void __init weio_common_setup(void) > +{ > + u8 *art = (u8 *) KSEG1ADDR(0x1fff); > + > + ath79_register_m25p80(NULL); > + ath79_register_wmac(art + WEIO_CALDATA_OFFSET, > + art + WEIO_WMAC_MAC_OFFSET); > + > +/** WeIO does not use ETH - only WiFi by default */ > +#if 0 > + ath79_setup_ar933x_phy4_switch(true, true); > + > + ath79_init_mac(ath79_eth0_data.mac_addr, art + WEIO_MAC0_OFFSET, 0); > + ath79_init_mac(ath79_eth1_data.mac_addr, art + WEIO_MAC1_OFFSET, 0); > + > + ath79_register_mdio(0, 0x0); > + > + /* LAN ports */ > + ath79_register_eth(1); > + > + /* WAN port */ > + ath79_register_eth(0); > +#endif /** commented out ETH */ > +} > + This was already raised earlier? > +static void __init weio_setup(void) > +{ > + weio_common_setup(); > + > + > + ath79_gpio_function_disable(AR933X_GPIO_FUNC_ETH_SWITCH_LED0_EN | > + AR933X_GPIO_FUNC_ETH_SWITCH_LED1_EN | > + AR933X_GPIO_FUNC_ETH_SWITCH_LED2_EN | > + AR933X_GPIO_FUNC_ETH_SWITCH_LED3_EN | > +AR933X_GPIO_FUNC_ETH_SWITCH_LED4_EN); > + > +platform_add_devices(weio_devices, ARRAY_SIZE(weio_devices)); > + > + ath79_register_leds_gpio(-1, ARRAY_SIZE(weio_leds_gpio), > + weio_leds_gpio); > + > + ath79_register_gpio_keys_polled(-1, WEIO_KEYS_POLL_INTERVAL, > + ARRAY_SIZE(weio_gpio_keys), > + weio_gpio_keys); > + ath79_register_usb(); > +} > + > +MIPS_MACHINE(ATH79_MACH_WEIO, "WEIO", "WeIO board from Drasko DRASKOVIC and > Uros PETREVSKI", Really? That's your model name? Really? Are you _sure_ that's what you want? > + weio_setup); > diff --git a/target/linux/ar71xx/generic/profiles/weio.mk > b/target/linux/ar71xx/generic/profiles/weio.mk > new file mode 100644 > index 000..227cec9 > --- /dev/null > +++ b/target/linux/ar71xx/generic/profiles/weio.mk > @@ -0,0 +1,17 @@ > +# > +# Copyright (C) 2013 OpenWrt.org > +# > +# This is free software, licensed under the GNU General Public License v2. > +# See /LICENSE for more information. > +# > + > +define Profile/WEIO > +NAME:=WeIO > +PACKAGES:=kmod-usb-core kmod-usb2 > +endef > + > +define Profile/WEIO/Description > +Package set optimized for the WeIO board. > +endef > + > +$(eval $(call Profile,WEIO)) > diff --git a/target/linux/ar71xx/image/Makefile > b/target/linux/ar71xx/image/Makefile > index 21d0d66..1f08ca0 100644 > --- a/target/linux/ar71xx/image/Makefile > +++ b/target/linux/ar71xx/image/Makefile > @@ -179,6 +179,14 @@ define Device/carambola2 > endef > TARGET_DEVICES += carambola2 > > +define Device/weio > + BOARDNAME = WEIO > + IMAGE_SIZE = 16000k > + CONSOLE = ttyATH0,115200 > + MTDPARTS = > spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro > +endef > +TARGET_DEVICES += weio > + > define Device/wndr3700 >BOARDNAME = WNDR3700 >NETGEAR_KERNEL_MAGIC = 0x33373030 > diff --git > a/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch > b/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch > index f8a561c..e8c8d5a 100644 > --- a/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch > +++ b/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch > @@ -1,6 +1,6 @@ > --- a/arch/
[OpenWrt-Devel] [PATCH] ramips: add support for PandoraBox PBR-M1
This patch is for PandoraBox PBR-M1 which is based on mt7621, all the features work fine, including rtc, leds, button, usb3.0, etc. Signed-off-by: tymon --- target/linux/ramips/base-files/etc/board.d/01_leds | 5 + .../linux/ramips/base-files/etc/board.d/02_network | 1 + target/linux/ramips/base-files/etc/diag.sh | 3 + target/linux/ramips/base-files/lib/ramips.sh | 3 + .../ramips/base-files/lib/upgrade/platform.sh | 1 + target/linux/ramips/dts/PBR-M1.dts | 150 + target/linux/ramips/image/Makefile | 7 +- target/linux/ramips/mt7621/profiles/pbr-m1.mk | 22 +++ 8 files changed, 191 insertions(+), 1 deletion(-) create mode 100644 target/linux/ramips/dts/PBR-M1.dts create mode 100644 target/linux/ramips/mt7621/profiles/pbr-m1.mk diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds index ad0062a..c63ff47 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -175,6 +175,11 @@ case $board in set_wifi_led "7links:orange:wifi" set_usb_led "7links:blue:storage" ;; +pbr-m1) +ucidef_set_led_netdev "internet" "internet" "pbr-m1:green:internet" "eth0.2" +ucidef_set_led_default "power" "power" "pbr-m1:green:power" "1" +ucidef_set_led_default "sys" "sys" "pbr-m1:green:sys" "1" +;; sl-r7205) set_wifi_led "rt2800pci-phy0::radio" ;; diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index 4982566..b3dd1f1 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -129,6 +129,7 @@ ramips_setup_interfaces() dir-320-b1 | \ dir-615-h1 | \ firewrt | \ + pbr-m1 | \ hlk-rm04 | \ mt7621 | \ mt7628 | \ diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh index d6001c5..bfc92e5 100644 --- a/target/linux/ramips/base-files/etc/diag.sh +++ b/target/linux/ramips/base-files/etc/diag.sh @@ -117,6 +117,9 @@ get_status_led() { omni-emb-hpm) status_led="emb:green:status" ;; + pbr-m1) + status_led="pbr-m1:green:sys" + ;; psr-680w) status_led="psr-680w:red:wan" ;; diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index 0cb02c7..14ffc21 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -247,6 +247,9 @@ ramips_board_detect() { *"OLinuXino-RT5350F-EVB") name="olinuxino-rt5350f-evb" ;; + *"PBR-M1") + name="pbr-m1" + ;; *"Petatel PSR-680W"*) name="psr-680w" ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index 99cabbd..8d5f74f 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -53,6 +53,7 @@ platform_check_image() { fonera20n | \ freestation5 | \ firewrt |\ + pbr-m1 |\ hg255d | \ hlk-rm04 | \ ht-tm02 | \ diff --git a/target/linux/ramips/dts/PBR-M1.dts b/target/linux/ramips/dts/PBR-M1.dts new file mode 100644 index 000..76eae93 --- /dev/null +++ b/target/linux/ramips/dts/PBR-M1.dts @@ -0,0 +1,150 @@ +/dts-v1/; + +/include/ "mt7621.dtsi" + +/ { + compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc"; + model = "PBR-M1"; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x1000>; + }; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + sdhci@1013 { + status = "okay"; + }; + + palmbus@1E00 { + spi@b00 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "w25q256"; + reg = <0 0>; + linux,modalias = "m25p80"; + spi-max-frequency = <1000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x3>; + read-only; + }; + + partition@3 { + labe