[OpenWrt-Devel] [PATCH] cyassl: version bump
This patch introduces a new build error into coova-chilli, but coova-chilli already fails to build even without it anyway. CyaSSL is now called wolfSSL, and all the API's have been renamed, and backward-compatibility headers added. Signed-off-by: Daniel Gimpelevich --- a/package/libs/cyassl/Makefile (revision 45705) +++ b/package/libs/cyassl/Makefile (working copy) @@ -7,13 +7,13 @@ include $(TOPDIR)/rules.mk -PKG_NAME:=cyassl -PKG_VERSION:=3.3.0 -PKG_RELEASE:=2 +PKG_NAME:=wolfssl +PKG_VERSION:=3.4.6 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip PKG_SOURCE_URL:=http://www.yassl.com/ -PKG_MD5SUM:=0303eb0f2f9065a1207d9104ab0eba7c +PKG_MD5SUM:=0410b3841588d635e9ecacb2d42c38f5 PKG_FIXUP:=libtool PKG_INSTALL:=1 @@ -45,17 +45,27 @@ --enable-ecc \ --disable-examples +ifneq ($(CONFIG_TARGET_x86),) + CONFIGURE_ARGS += --enable-intelasm +endif +ifneq ($(CONFIG_TARGET_x86_64),) + CONFIGURE_ARGS += --enable-intelasm +endif + define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcyassl.{so*,la} $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libwolfssl.{so*,la} $(1)/usr/lib/ + ln -s libwolfssl.so $(1)/usr/lib/libcyassl.so + ln -s libwolfssl.la $(1)/usr/lib/libcyassl.la endef define Package/libcyassl/install $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcyassl.so* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libwolfssl.so* $(1)/usr/lib/ + ln -s libwolfssl.so $(1)/usr/lib/libcyassl.so endef $(eval $(call BuildPackage,libcyassl)) --- a/package/libs/cyassl/patches/200-SSL_accept-handle-hello-garbage.patch (revision 45705) +++ b/package/libs/cyassl/patches/200-SSL_accept-handle-hello-garbage.patch (working copy) @@ -1,6 +1,6 @@ --- a/src/internal.c +++ b/src/internal.c -@@ -6037,6 +6037,10 @@ int ProcessReply(CYASSL* ssl) +@@ -6353,6 +6353,10 @@ int ProcessReply(CYASSL* ssl) b1 = ssl->buffers.inputBuffer.buffer[ssl->buffers.inputBuffer.idx++]; ssl->curSize = (word16)(((b0 & 0x7f) << 8) | b1); --- a/package/libs/cyassl/patches/300-SSL_set_tlsext_host_name.patch (revision 45705) +++ b/package/libs/cyassl/patches/300-SSL_set_tlsext_host_name.patch (working copy) @@ -1,10 +1,10 @@ a/cyassl/openssl/ssl.h -+++ b/cyassl/openssl/ssl.h -@@ -372,6 +373,7 @@ - #define SSL_CTX_get_ex_new_index CyaSSL_CTX_get_ex_new_index +--- a/wolfssl/openssl/ssl.h b/wolfssl/openssl/ssl.h +@@ -398,6 +398,7 @@ + #define SSL_get_default_timeout(ctx) 500 -+#define SSL_set_tlsext_host_name(x, y) CyaSSL_UseSNI(x, CYASSL_SNI_HOST_NAME, y, strlen(y)) ++#define SSL_set_tlsext_host_name(x, y) wolfSSL_UseSNI(x, WOLFSSL_SNI_HOST_NAME, y, strlen(y)) #ifdef __cplusplus } /* extern "C" */ --- /dev/null (revision 0) +++ b/package/libs/cyassl/patches/400-additional_compatibility.patch (working copy) @@ -0,0 +1,15 @@ +--- a/cyassl/openssl/ssl.h 2015-02-25 13:04:52.0 -0800 b/cyassl/openssl/ssl.h 2015-05-20 11:13:44.476628943 -0700 +@@ -25,3 +25,12 @@ + */ + ++#ifndef CYASSL_OPENSSL_H_ ++#define CYASSL_OPENSSL_H_ ++ ++#include ++#ifndef HAVE_SNI ++#undef CYASSL_SNI_HOST_NAME ++#endif + #include ++ ++#endif ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] cyassl: version bump
On Thu, 2015-05-21 at 00:19 +0200, Hauke Mehrtens wrote: > On 05/20/2015 11:42 PM, Daniel Gimpelevich wrote: > > This patch introduces a new build error into coova-chilli, but > > coova-chilli already fails to build even without it anyway. CyaSSL is > > now called wolfSSL, and all the API's have been renamed, and > > backward-compatibility headers added. > > Does this fix any security Issues? Otherwise I would wait till the > branch to update this library. > > Hauke > It's mostly new features and many bug fixes, though there are a few minor security-related changes relating to obsolete algorithms and protocols. The changelog contains the following note: - No high level security fixes that requires an update though we always recommend updating to the latest (except note 6 use case of ecc/normal math) It should be noted that since version 3.3.0, there have been versions 3.3.2, 3.4.0, and 3.4.6 now. It might be worth fixing the coova-chilli package to build before the branch so that it isn't stuck with a broken package, but if anyone does that without this patch, applying this patch will re-break it, so it might pay to do this a priori. If you disagree, I believe the branch is scheduled for this week, so the wait wouldn't be long. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] cyassl: version bump
On Wed, 2015-05-20 at 15:34 -0700, Daniel Gimpelevich wrote: > On Thu, 2015-05-21 at 00:19 +0200, Hauke Mehrtens wrote: > > On 05/20/2015 11:42 PM, Daniel Gimpelevich wrote: > > > This patch introduces a new build error into coova-chilli, but > > > coova-chilli already fails to build even without it anyway. CyaSSL is > > > now called wolfSSL, and all the API's have been renamed, and > > > backward-compatibility headers added. > > > > Does this fix any security Issues? Otherwise I would wait till the > > branch to update this library. > > > > Hauke > > > > It's mostly new features and many bug fixes, though there are a few > minor security-related changes relating to obsolete algorithms and > protocols. The changelog contains the following note: > > - No high level security fixes that requires an update though we always > recommend updating to the latest (except note 6 use case of ecc/normal math) > > It should be noted that since version 3.3.0, there have been versions > 3.3.2, 3.4.0, and 3.4.6 now. > > It might be worth fixing the coova-chilli package to build before the > branch so that it isn't stuck with a broken package, but if anyone does > that without this patch, applying this patch will re-break it, so it > might pay to do this a priori. If you disagree, I believe the branch is > scheduled for this week, so the wait wouldn't be long. Chaos Calmer has been branched. Time to apply the patch? ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[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 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 procd] move /dev/shm to /tmp/shm
Since the /dev filesystem is tiny, /dev/shm needs to live somewhere else. Signed-off-by: Daniel Gimpelevich --- a/initd/early.c 2015-06-19 14:01:25.0 -0700 +++ b/initd/early.c 2015-07-10 15:04:23.270143065 -0700 @@ -66,16 +66,20 @@ 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", 01777); + symlink("/tmp/shm", "/dev/shm"); mkdir("/dev/pts", 0755); mount("devpts", "/dev/pts", "devpts", MS_NOATIME, "mode=600"); early_dev(); early_console("/dev/console"); - if (mount_zram_on_tmp()) + if (mount_zram_on_tmp()) { mount("tmpfs", "/tmp", "tmpfs", MS_NOSUID | MS_NODEV | MS_NOATIME, NULL); - else - mkdev("*", 0600); + mkdir("/tmp/shm", 01777); + } else { + mkdir("/tmp/shm", 01777); + mount("tmpfs", "/tmp/shm", "tmpfs", MS_NOSUID | MS_NODEV | MS_NOATIME, + "mode=01777"); + } mkdir("/tmp/run", 0777); mkdir("/tmp/lock", 0777); mkdir("/tmp/state", 0777); --- a/plug/coldplug.c 2015-06-19 14:01:25.0 -0700 +++ b/plug/coldplug.c 2015-07-10 15:04:19.270123233 -0700 @@ -45,7 +45,7 @@ umount2("/dev/pts", MNT_DETACH); umount2("/dev/", MNT_DETACH); mount("tmpfs", "/dev", "tmpfs", 0, "mode=0755,size=512K"); - mkdir("/dev/shm", 01777); + symlink("/tmp/shm", "/dev/shm"); mkdir("/dev/pts", 0755); umask(oldumask); mount("devpts", "/dev/pts", "devpts", 0, 0); ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] Make virtualization guests built for pentium4 with SMP
Signed-off-by: Daniel Gimpelevich --- include/target.mk | 1 + target/linux/x86/kvm_guest/config-default | 15 ++- target/linux/x86/kvm_guest/target.mk | 1 + target/linux/x86/xen_domu/target.mk | 1 + 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/include/target.mk b/include/target.mk index bfead52..3e7f17d 100644 --- a/include/target.mk +++ b/include/target.mk @@ -222,6 +222,7 @@ ifeq ($(DUMP),1) ifeq ($(ARCH),i386) CPU_TYPE ?= i486 CPU_CFLAGS_i486 = -march=i486 +CPU_CFLAGS_pentium4 = -march=pentium4 CPU_CFLAGS_geode = -march=geode -mmmx -m3dnow endif ifneq ($(findstring arm,$(ARCH)),) diff --git a/target/linux/x86/kvm_guest/config-default b/target/linux/x86/kvm_guest/config-default index f26e268..b54b1df 100644 --- a/target/linux/x86/kvm_guest/config-default +++ b/target/linux/x86/kvm_guest/config-default @@ -19,12 +19,14 @@ CONFIG_ACPI_PROCESSOR=y # CONFIG_ACPI_THERMAL is not set # CONFIG_ACPI_WMI is not set CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC=y +CONFIG_ARCH_PHYS_ADDR_T_64BIT=y # CONFIG_ASUS_LAPTOP is not set CONFIG_CPU_IDLE_GOV_MENU=y # CONFIG_EEEPC_LAPTOP is not set # CONFIG_EFI is not set CONFIG_HAVE_ACPI_APEI=y CONFIG_HAVE_ACPI_APEI_NMI=y +# CONFIG_HIGHMEM64G is not set CONFIG_HOTPLUG_PCI=y CONFIG_HOTPLUG_PCI_ACPI=y # CONFIG_HOTPLUG_PCI_ACPI_IBM is not set @@ -45,17 +47,21 @@ CONFIG_HYPERVISOR_GUEST=y CONFIG_KVM_GUEST=y # CONFIG_LGUEST is not set # CONFIG_LGUEST_GUEST is not set -CONFIG_NLS=y CONFIG_NO_HZ=y +# CONFIG_M486 is not set +CONFIG_MPENTIUM4=y +CONFIG_NR_CPUS=4 CONFIG_PARAVIRT=y CONFIG_PARAVIRT_CLOCK=y # CONFIG_PARAVIRT_DEBUG is not set +CONFIG_PARAVIRT_SPINLOCKS=y CONFIG_PARAVIRT_TIME_ACCOUNTING=y CONFIG_PCIEAER=y CONFIG_PCIEPORTBUS=y CONFIG_PCI_IOAPIC=y CONFIG_PCI_LABEL=y CONFIG_PCI_MMCONFIG=y +CONFIG_PHYS_ADDR_T_64BIT=y CONFIG_PNP=y CONFIG_PNPACPI=y CONFIG_PNP_DEBUG_MESSAGES=y @@ -64,6 +70,8 @@ CONFIG_RAS=y # CONFIG_SAMSUNG_Q10 is not set # CONFIG_SCSI_VIRTIO is not set CONFIG_SERIAL_8250_PNP=y +CONFIG_SLUB_CPU_PARTIAL=y +CONFIG_SMP=y # CONFIG_THINKPAD_ACPI is not set # CONFIG_TOPSTAR_LAPTOP is not set # CONFIG_TOSHIBA_BT_RFKILL is not set @@ -76,14 +84,19 @@ CONFIG_VIRTIO_PCI=y CONFIG_VIRTUALIZATION=y # CONFIG_VMWARE_BALLOON is not set # CONFIG_VT_HW_CONSOLE_BINDING is not set +CONFIG_X86_32_SMP=y # CONFIG_X86_ACPI_CPUFREQ is not set +# CONFIG_X86_BIGSMP is not set # CONFIG_X86_E_POWERSAVER is not set # CONFIG_X86_GENERIC is not set +CONFIG_X86_HT=y # CONFIG_X86_INTEL_LPSS is not set CONFIG_X86_INTERNODE_CACHE_SHIFT=4 CONFIG_X86_L1_CACHE_SHIFT=4 # CONFIG_X86_LONGHAUL is not set +CONFIG_X86_PAE=y # CONFIG_X86_PAT is not set # CONFIG_X86_PCC_CPUFREQ is not set CONFIG_X86_PM_TIMER=y # CONFIG_X86_PPRO_FENCE is not set +# CONFIG_XEN is not set diff --git a/target/linux/x86/kvm_guest/target.mk b/target/linux/x86/kvm_guest/target.mk index d3f950f..4bdfbc6 100644 --- a/target/linux/x86/kvm_guest/target.mk +++ b/target/linux/x86/kvm_guest/target.mk @@ -1,3 +1,4 @@ BOARDNAME:=KVM Guest FEATURES:=ext4 pci usb DEFAULT_PACKAGES += kmod-virtio-balloon kmod-virtio-net kmod-virtio-random +CPU_TYPE := pentium4 diff --git a/target/linux/x86/xen_domu/target.mk b/target/linux/x86/xen_domu/target.mk index f7a69bf..31d110c 100644 --- a/target/linux/x86/xen_domu/target.mk +++ b/target/linux/x86/xen_domu/target.mk @@ -1,3 +1,4 @@ BOARDNAME:=Xen Paravirt Guest DEFAULT_PACKAGES += kmod-xen-fs kmod-xen-evtchn kmod-xen-netdev kmod-xen-kbddev FEATURES:=display ext4 targz +CPU_TYPE := pentium4 -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] Make virtualization guests built for pentium4 with SMP
On Sun, 2015-07-12 at 14:00 +0200, Hauke Mehrtens wrote: > Will this work on most CPUs also the Atoms and so on? > I would rather prefer -march=i686 and -mtune=generic for the x86 > virtual > machine images, but I am not an x86 expert. Do I need hardware support > for visualization in my host CPU for all these images? Are all the AMD > CPUs with hardware visualization support when IO build with > -march=pentium4 ? It's already used for the Xen guest kernel, just not GCC. The gcc manpage says that all -march=pentium4 means is enable MMX, SSE, and SSE2, which I believe the old Atoms support, but even if they don't, running any VM on such low-spec processors isn't likely to work anyway. Using -march=i686 is an alias for Pentium Pro, that is, before the Pentium II. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH procd] move /dev/shm to /tmp/shm
OpenSSL session caches create shared memory segments that appear as files under /dev/shm. If there is not enough room there, execution terminates with SIGBUS upon access. Even a single instance would exceed 512K. On Tue, 2015-07-14 at 11:50 +0200, John Crispin wrote: > what kind of usage do you expect ? > > On 11/07/2015 03:58, Daniel Gimpelevich wrote: > > Since the /dev filesystem is tiny, /dev/shm needs to live somewhere > > else. > > > > Signed-off-by: Daniel Gimpelevich > > --- a/initd/early.c 2015-06-19 14:01:25.0 -0700 > > +++ b/initd/early.c 2015-07-10 15:04:23.270143065 -0700 > > @@ -66,16 +66,20 @@ > > 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", 01777); > > + symlink("/tmp/shm", "/dev/shm"); > > mkdir("/dev/pts", 0755); > > mount("devpts", "/dev/pts", "devpts", MS_NOATIME, "mode=600"); > > early_dev(); > > > > early_console("/dev/console"); > > - if (mount_zram_on_tmp()) > > + if (mount_zram_on_tmp()) { > > mount("tmpfs", "/tmp", "tmpfs", MS_NOSUID | MS_NODEV | > > MS_NOATIME, NULL); > > - else > > - mkdev("*", 0600); > > + mkdir("/tmp/shm", 01777); > > + } else { > > + mkdir("/tmp/shm", 01777); > > + mount("tmpfs", "/tmp/shm", "tmpfs", MS_NOSUID | MS_NODEV | > > MS_NOATIME, > > + "mode=01777"); > > + } > > mkdir("/tmp/run", 0777); > > mkdir("/tmp/lock", 0777); > > mkdir("/tmp/state", 0777); > > --- a/plug/coldplug.c 2015-06-19 14:01:25.0 -0700 > > +++ b/plug/coldplug.c 2015-07-10 15:04:19.270123233 -0700 > > @@ -45,7 +45,7 @@ > > umount2("/dev/pts", MNT_DETACH); > > umount2("/dev/", MNT_DETACH); > > mount("tmpfs", "/dev", "tmpfs", 0, "mode=0755,size=512K"); > > - mkdir("/dev/shm", 01777); > > + symlink("/tmp/shm", "/dev/shm"); > > mkdir("/dev/pts", 0755); > > umask(oldumask); > > mount("devpts", "/dev/pts", "devpts", 0, 0); > > ___ > > 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 procd] move /dev/shm to /tmp/shm
I'm intending for this fix to be backported to CC as well. On Tue, 2015-07-14 at 09:59 -0700, Daniel Gimpelevich wrote: > OpenSSL session caches create shared memory segments that appear as > files under /dev/shm. If there is not enough room there, execution > terminates with SIGBUS upon access. Even a single instance would > exceed > 512K. > > On Tue, 2015-07-14 at 11:50 +0200, John Crispin wrote: > > what kind of usage do you expect ? > > > > On 11/07/2015 03:58, Daniel Gimpelevich wrote: > > > Since the /dev filesystem is tiny, /dev/shm needs to live > somewhere > > > else. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH procd] move /dev/shm to /tmp/shm
Is there an ETA for merging this? On Sun, 2015-07-19 at 19:14 -0700, Daniel Gimpelevich wrote: > I'm intending for this fix to be backported to CC as well. > > On Tue, 2015-07-14 at 09:59 -0700, Daniel Gimpelevich wrote: > > OpenSSL session caches create shared memory segments that appear as > > files under /dev/shm. If there is not enough room there, execution > > terminates with SIGBUS upon access. Even a single instance would > > exceed > > 512K. > > > > On Tue, 2015-07-14 at 11:50 +0200, John Crispin wrote: > > > what kind of usage do you expect ? > > > > > > On 11/07/2015 03:58, Daniel Gimpelevich wrote: > > > > Since the /dev filesystem is tiny, /dev/shm needs to live > > somewhere > > > > else. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH procd] move /dev/shm to /tmp/shm
I see procd got an update. Any reason this patch was left out? On Fri, 2015-09-11 at 13:05 -0700, Daniel Gimpelevich wrote: > Is there an ETA for merging this? > > On Sun, 2015-07-19 at 19:14 -0700, Daniel Gimpelevich wrote: > > I'm intending for this fix to be backported to CC as well. > > > > On Tue, 2015-07-14 at 09:59 -0700, Daniel Gimpelevich wrote: > > > OpenSSL session caches create shared memory segments that appear as > > > files under /dev/shm. If there is not enough room there, execution > > > terminates with SIGBUS upon access. Even a single instance would > > > exceed > > > 512K. > > > > > > On Tue, 2015-07-14 at 11:50 +0200, John Crispin wrote: > > > > what kind of usage do you expect ? > > > > > > > > On 11/07/2015 03:58, Daniel Gimpelevich wrote: > > > > > Since the /dev filesystem is tiny, /dev/shm needs to live > > > somewhere > > > > > else. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [packages] broken package: procd is broken in 15.05 (#1879)
On Thu, 2015-10-22 at 17:54 +0200, Felix Fietkau wrote: > On 2015-10-21 01:34, Daniel Golle wrote: > > Hi! > > > > This has been an argument going on between the gcc and the glibc people > > for about 10 years now. > > See > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25509 > > > > It seems like commit b6618ffa which added the symlinks silently broke > > things when building with glibc. > > Don't ask me why glibc enabled warn_unused_result for symlink(3) but > > doesn't for found mount(2) or mkdir(3)... > > > > A way around it would be to take things as they are and simply make > > sure to surpress the warning as shown in > > http://www.redhat.com/archives/rhl-devel-list/2007-March/msg00692.html [snip] > inline functions should be static. the always_inline part is irrelevant > here. > > - Felix Maybe it can just be typecast to void? This kind of issue was one of the last things I expected. I first learned C before ANSI or ISO had even draft standards, and I guess it still shows. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [packages] broken package: procd is broken in 15.05 (#1879)
On Thu, 2015-10-22 at 22:30 +0100, Carlos Ferreira wrote: > Daniel > Your patch did not work without some simple modifications. > This puzzled me until I realized you meant the other Daniel. PS: HAPPY INTERNATIONAL CAPS LOCK DAY! ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [packages] broken package: procd is broken in 15.05 (#1879)
On Thu, 2015-10-22 at 22:50 +0100, Carlos Ferreira wrote: > Yes :S Sorry! > Btw, Caps lock day? Did my Gmail applied some weird format again ? :S HTML. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] lantiq: spi-max-frequency
On Thu, 2015-02-26 at 16:02 +0100, Joerg Jungermann wrote: > Hi, > > I have here multiple TD-W8970 with Annex A and Annex B. > > > m25p80@0 { > > #address-cells = <1>; > > #size-cells = <1>; > > compatible = "s25fl129p0"; > > reg = <0 0>; > > linux,modalias = "m25p80", "mx25l3205d"; > > spi-max-frequency = <100>; > > I increased spi-max-frequency = <5000>. > According to the datasheets I found that is maximum frequency. > > With my 3 models (2x A, 1x B) these settings work with BB (kernel > 3.10) well. > I have not yet tested 3.18. > I benchmarked boot up times from spi-flash with my build. > I could lower bootup times (from uboot to init-completed) from 2m01s > to 1m18s. > > I suggest backporting this increase of the spi freq to BB. > > best regards Index: target/linux/lantiq/dts/DGN3500.dtsi === --- a/target/linux/lantiq/dts/DGN3500.dtsi (revision 47278) +++ b/target/linux/lantiq/dts/DGN3500.dtsi (working copy) @@ -85,7 +85,7 @@ compatible = "s25fl129p0"; reg = <0 0>; linux,modalias = "m25p80", "mx25l3205d"; - spi-max-frequency = <100>; + spi-max-frequency = <5000>; partition@0 { reg = <0x0 0x1>; Index: target/linux/lantiq/dts/TDW89X0.dtsi === --- a/target/linux/lantiq/dts/TDW89X0.dtsi (revision 47278) +++ b/target/linux/lantiq/dts/TDW89X0.dtsi (working copy) @@ -160,7 +160,7 @@ compatible = "en25q64", "m25p80"; reg = <0 0>; linux,modalias = "en25q64"; - spi-max-frequency = <100>; + spi-max-frequency = <5000>; partition@0 { reg = <0x0 0x2>; ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] lantiq: spi-max-frequency
On Sat, 2015-11-21 at 19:15 +0100, John Crispin wrote: > Hi, > > common, you know how to send a patch and put a SoB under it. i've seen > you do it lots of times ;) > > John Yes, but it just doesn't feel right for me to do when the patch is essentially from Joerg and not from me. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] lantiq: spi-max-frequency
On Sat, 2015-11-21 at 10:27 -0800, Daniel Gimpelevich wrote: > On Sat, 2015-11-21 at 19:15 +0100, John Crispin wrote: > > Hi, > > > > common, you know how to send a patch and put a SoB under it. i've seen > > you do it lots of times ;) > > > > John > > Yes, but it just doesn't feel right for me to do when the patch is > essentially from Joerg and not from me. > Are there any other DTS files to which this would apply? ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] lantiq: spi-max-frequency
On Sat, 2015-11-21 at 20:15 +0100, John Crispin wrote: > On 21/11/2015 20:05, Daniel Gimpelevich wrote: > > On Sat, 2015-11-21 at 10:27 -0800, Daniel Gimpelevich wrote: > >> On Sat, 2015-11-21 at 19:15 +0100, John Crispin wrote: > >>> Hi, > >>> > >>> common, you know how to send a patch and put a SoB under it. i've seen > >>> you do it lots of times ;) > >>> > >>> John > >> > >> Yes, but it just doesn't feel right for me to do when the patch is > >> essentially from Joerg and not from me. > >> > > > > Are there any other DTS files to which this would apply? > > > > grep for spi-gpio in the dts folder Do all three of those use the same chip? ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] lantiq: spi-max-frequency
On Sat, 2015-11-21 at 20:19 +0100, John Crispin wrote: > > On 21/11/2015 20:17, Daniel Gimpelevich wrote: > > On Sat, 2015-11-21 at 20:15 +0100, John Crispin wrote: > >> On 21/11/2015 20:05, Daniel Gimpelevich wrote: > >>> On Sat, 2015-11-21 at 10:27 -0800, Daniel Gimpelevich wrote: > >>>> On Sat, 2015-11-21 at 19:15 +0100, John Crispin wrote: > >>>>> Hi, > >>>>> > >>>>> common, you know how to send a patch and put a SoB under it. i've seen > >>>>> you do it lots of times ;) > >>>>> > >>>>> John > >>>> > >>>> Yes, but it just doesn't feel right for me to do when the patch is > >>>> essentially from Joerg and not from me. > >>>> > >>> > >>> Are there any other DTS files to which this would apply? > >>> > >> > >> grep for spi-gpio in the dts folder > > > > Do all three of those use the same chip? > > probably not > > > > I ask because Joerg mentioned some sort of datasheet. I only know that he tried the patch with BB on the TP-Link and it worked, and I tried it with DD on the Netgear and it worked. I never got CC to work properly with or without it. Any chance you can test on the FritzBox before a resubmit? ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 00/17] atheros: checkpatch fixes
On Tue, 2014-06-24 at 13:51 -0700, Florian Fainelli wrote: > 2014-06-24 13:30 GMT-07:00 Daniel Gimpelevich > : > > On Tue, 2014-06-24 at 12:38 -0700, Florian Fainelli wrote: > >> I think AR231x has none of those, it's an End of Life platform, the > >> code base has been mostly static and well know for a while, so I would > >> argue that Device Tree should not be made a requirement here as it > >> will just delay Sergey's upstreaming effort even more. > >> > > Very valuable input. Still, there is no way for software to determine > > which AR231x board it's running on, and they all have different uses of > > GPIO, plus the AR2317 watchdog operates completely differently from the > > AR2315 one. What solution do you propose? Some earlier discussion: > > http://patchwork.openwrt.org/patch/4351/ > > For GPIOs, since the way they are used most likely varies on a > per-board basis, we could probably come up with the same mechanism as > used on ath79 where we end-up patching the kernel command-line to > insert a MIPS machine id for instance. > > For the watchdog driver, if we have access to a revision register we > can read at runtime, then we could use a separate platform driver name > (e.g: ar2315-wdt vs ar2317-wdt) that would lead to either two separate > drivers to get registered, or have different code-paths being used in > the same ar231x driver. In case we do not have that revision register, > we can leverage solution 1) for GPIOs. Wait, what is this "ath79" target? ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 1/4] lantiq: Fix initscript issue
Currently this initscript fails if the macaddr has any leading zeroes. This patch corrects the problem. Signed-off-by: Daniel Gimpelevich --- a/target/linux/lantiq/base-files/etc/init.d/esi (revision 44023) +++ b/target/linux/lantiq/base-files/etc/init.d/esi (working copy) @@ -3,5 +3,5 @@ START=19 start() { - esi $(printf '%X' $((1+0x$(tr -d : /dev/null || : + esi $(printf '%012X' $((1+0x$(tr -d : /dev/console || : } ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 4/4] lantiq: DGN3500 cleanups
This patch builds on the previous three to streamline support for the Netgear DGN3500. Signed-off-by: Daniel Gimpelevich --- a/target/linux/lantiq/base-files/etc/uci-defaults/02_network (revision 44023) +++ b/target/linux/lantiq/base-files/etc/uci-defaults/02_network (working copy) @@ -120,8 +120,6 @@ ;; DGN3500*) - lan_mac=$(mtd_get_mac_ascii uboot-env ethaddr) - wan_mac=$(macaddr_add "$lan_mac" 1) ucidef_set_interface_lan "eth0.1" ucidef_add_switch "switch0" "1" "1" ucidef_add_switch_vlan "switch0" "1" "3 2 1 0 5t" --- a/target/linux/lantiq/dts/DGN3500.dtsi (revision 44023) +++ b/target/linux/lantiq/dts/DGN3500.dtsi (working copy) @@ -2,7 +2,7 @@ / { chosen { - bootargs = "console=ttyLTQ0,115200 init=/etc/preinit"; + bootargs-append = "root=/dev/mtdblock5 console=ttyLTQ0,115200"; }; memory@0 { ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/4] Preserve bootloader command line on MIPS
Somewhere in the conversion of the MIPS architecture code to Device Tree usage, there's been a failure to keep the separate variables holding the kernel command line reconciled between the tree and the bootloader. This patch restores previous functionality that broke. Signed-off-by: Daniel Gimpelevich --- a/target/linux/generic/patches-3.14/997-device_tree_cmdline.patch +++ b/target/linux/generic/patches-3.14/997-device_tree_cmdline.patch @@ -1,6 +1,8 @@ a/drivers/of/fdt.c -+++ b/drivers/of/fdt.c -@@ -817,6 +817,9 @@ int __init early_init_dt_scan_chosen(uns +Index: linux-3.14.28/drivers/of/fdt.c +=== +--- linux-3.14.28.orig/drivers/of/fdt.c2015-01-08 10:01:03.0 -0800 linux-3.14.28/drivers/of/fdt.c 2015-01-17 20:29:51.674740290 -0800 +@@ -817,6 +817,9 @@ p = of_get_flat_dt_prop(node, "bootargs", &l); if (p != NULL && l > 0) strlcpy(data, p, min((int)l, COMMAND_LINE_SIZE)); @@ -10,3 +12,17 @@ /* * CONFIG_CMDLINE is meant to be a default in case nothing else +Index: linux-3.14.28/arch/mips/kernel/prom.c +=== +--- linux-3.14.28.orig/arch/mips/kernel/prom.c 2015-01-17 20:30:09.922830766 -0800 linux-3.14.28/arch/mips/kernel/prom.c 2015-01-17 20:30:54.095049815 -0800 +@@ -49,6 +49,9 @@ + + void __init __dt_setup_arch(struct boot_param_header *bph) + { ++ if (boot_command_line[0] == '\0') ++ strcpy(boot_command_line, arcs_cmdline); ++ + if (!early_init_dt_scan(bph)) + return; + --- a/target/linux/generic/patches-3.18/997-device_tree_cmdline.patch +++ b/target/linux/generic/patches-3.18/997-device_tree_cmdline.patch @@ -1,6 +1,8 @@ a/drivers/of/fdt.c -+++ b/drivers/of/fdt.c -@@ -903,6 +903,9 @@ int __init early_init_dt_scan_chosen(uns +Index: linux-3.18.2/drivers/of/fdt.c +=== +--- linux-3.18.2.orig/drivers/of/fdt.c 2015-01-17 20:57:52.419074654 -0800 linux-3.18.2/drivers/of/fdt.c 2015-01-17 20:57:52.367074398 -0800 +@@ -903,6 +903,9 @@ p = of_get_flat_dt_prop(node, "bootargs", &l); if (p != NULL && l > 0) strlcpy(data, p, min((int)l, COMMAND_LINE_SIZE)); @@ -10,3 +12,17 @@ /* * CONFIG_CMDLINE is meant to be a default in case nothing else +Index: linux-3.18.2/arch/mips/kernel/prom.c +=== +--- linux-3.18.2.orig/arch/mips/kernel/prom.c 2015-01-17 20:57:52.419074654 -0800 linux-3.18.2/arch/mips/kernel/prom.c 2015-01-17 20:57:52.415074633 -0800 +@@ -49,6 +49,9 @@ + + void __init __dt_setup_arch(void *bph) + { ++ if (boot_command_line[0] == '\0') ++ strcpy(boot_command_line, arcs_cmdline); ++ + if (!early_init_dt_scan(bph)) + return; + ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 3/4] lantiq: Restore call to orphaned etop function
It seems the call to ltq_get_eth_mac() disappeared at some point. This patch puts it where it currently most makes sense. Signed-off-by: Daniel Gimpelevich --- a/target/linux/lantiq/patches-3.14/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch (revision 44023) +++ b/target/linux/lantiq/patches-3.14/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch (working copy) @@ -19,8 +19,10 @@ create mode 100644 arch/mips/lantiq/xway/pci-ath-fixup.c create mode 100644 arch/mips/lantiq/xway/rt_eep.c /dev/null -+++ b/arch/mips/include/asm/mach-lantiq/pci-ath-fixup.h +Index: linux-3.14.28/arch/mips/include/asm/mach-lantiq/pci-ath-fixup.h +=== +--- /dev/null 1970-01-01 00:00:00.0 + linux-3.14.28/arch/mips/include/asm/mach-lantiq/pci-ath-fixup.h 2015-01-17 10:55:03.329443942 -0800 @@ -0,0 +1,6 @@ +#ifndef _PCI_ATH_FIXUP +#define _PCI_ATH_FIXUP @@ -28,9 +30,11 @@ +void ltq_pci_ath_fixup(unsigned slot, u16 *cal_data) __init; + +#endif /* _PCI_ATH_FIXUP */ a/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h -+++ b/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h -@@ -90,5 +90,8 @@ int xrx200_gphy_boot(struct device *dev, +Index: linux-3.14.28/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h +=== +--- linux-3.14.28.orig/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h 2015-01-17 10:55:03.337443971 -0800 linux-3.14.28/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h 2015-01-17 10:55:03.329443942 -0800 +@@ -90,5 +90,8 @@ extern void ltq_pmu_enable(unsigned int module); extern void ltq_pmu_disable(unsigned int module); @@ -39,9 +43,11 @@ + #endif /* CONFIG_SOC_TYPE_XWAY */ #endif /* _LTQ_XWAY_H__ */ a/arch/mips/lantiq/xway/Makefile -+++ b/arch/mips/lantiq/xway/Makefile -@@ -2,4 +2,7 @@ obj-y := prom.o sysctrl.o clk.o reset.o +Index: linux-3.14.28/arch/mips/lantiq/xway/Makefile +=== +--- linux-3.14.28.orig/arch/mips/lantiq/xway/Makefile 2015-01-17 10:55:03.337443971 -0800 linux-3.14.28/arch/mips/lantiq/xway/Makefile 2015-01-17 11:58:16.0 -0800 +@@ -2,4 +2,7 @@ obj-y += vmmc.o tffs.o @@ -49,8 +55,10 @@ +obj-$(CONFIG_PCI) += ath_eep.o rt_eep.o pci-ath-fixup.o + obj-$(CONFIG_XRX200_PHY_FW) += xrx200_phy_fw.o /dev/null -+++ b/arch/mips/lantiq/xway/ath_eep.c +Index: linux-3.14.28/arch/mips/lantiq/xway/ath_eep.c +=== +--- /dev/null 1970-01-01 00:00:00.0 + linux-3.14.28/arch/mips/lantiq/xway/ath_eep.c 2015-01-17 10:55:03.329443942 -0800 @@ -0,0 +1,282 @@ +/* + * Copyright (C) 2011 Luca Olivetti @@ -334,8 +342,10 @@ + return platform_driver_probe(&ath5k_eeprom_driver, of_ath5k_eeprom_probe); +} +device_initcall(of_ath5k_eeprom_init); /dev/null -+++ b/arch/mips/lantiq/xway/eth_mac.c +Index: linux-3.14.28/arch/mips/lantiq/xway/eth_mac.c +=== +--- /dev/null 1970-01-01 00:00:00.0 + linux-3.14.28/arch/mips/lantiq/xway/eth_mac.c 2015-01-17 11:14:42.823292726 -0800 @@ -0,0 +1,76 @@ +/* + * Copyright (C) 2012 John Crispin @@ -413,8 +423,10 @@ + return platform_driver_probe(ð_mac_driver, of_eth_mac_probe); +} +device_initcall(of_eth_mac_init); /dev/null -+++ b/arch/mips/lantiq/xway/pci-ath-fixup.c +Index: linux-3.14.28/arch/mips/lantiq/xway/pci-ath-fixup.c +=== +--- /dev/null 1970-01-01 00:00:00.0 + linux-3.14.28/arch/mips/lantiq/xway/pci-ath-fixup.c2015-01-17 10:55:03.329443942 -0800 @@ -0,0 +1,109 @@ +/* + * Atheros AP94 reference board PCI initialization @@ -525,8 +537,10 @@ + ath_fixups[ath_num_fixups].cal_data = cal_data; + ath_num_fixups++; +} /dev/null -+++ b/arch/mips/lantiq/xway/rt_eep.c +Index: linux-3.14.28/arch/mips/lantiq/xway/rt_eep.c +=== +--- /dev/null 1970-01-01 00:00:00.0 + linux-3.14.28/arch/mips/lantiq/xway/rt_eep.c 2015-01-17 10:55:03.329443942 -0800 @@ -0,0 +1,60 @@ +/* + * Copyright (C) 2011 John Crispin @@ -588,3 +602,17 @@ + return platform_driver_probe(&ralink_eeprom_driver, of_ralink_eeprom_probe); +} +device_initcall(of_ralink_eeprom_init); +Index: linux-3.14.28/drivers/net/ethernet/lantiq_etop.c +=== +--- linux-3.14.28.orig/drivers/net/ethernet/lantiq_etop.c 2015-01-17 11:52:03.818405214 -0800 linux-3.14.28/drivers/net/ethernet/lantiq_etop.c 2015-01-17 12:02:20.905465188 -0800 +@@ -843,6 +843,9 @@ + + if (priv->mac) + memcpy(&mac.sa_data, priv
Re: [OpenWrt-Devel] lantiq v3.18
On Mon, 2015-02-09 at 13:30 +0100, John Crispin wrote: > Hi, > > i bumped the lantiq support to v3.18 and tested it on 6 different > boards. I have not tested vdsl support due to lack of a vdsl line. > could someone please do so. > > @antii: can you rebase/resnd the dwc2 series ? it does not apply to > the v3.18 patches > > John Build now fails for AR9. Relevant log: scripts/kconfig/conf --silentoldconfig Kconfig net/sched/Kconfig:43: warning: menuconfig statement without prompt * * Restart config... * * * Staging drivers * Staging drivers (STAGING) [Y/n/?] y Data acquisition support (comedi) (COMEDI) [N/m/?] n RealTek RTL8192U Wireless LAN NIC driver (RTL8192U) [N/m/?] n Support for rtllib wireless devices (RTLLIB) [N/m/?] n RealTek RTL8712U (RTL8192SU) Wireless LAN NIC driver (R8712U) [N/m/y/?] n Realtek RTL8188EU Wireless LAN NIC driver (R8188EU) [N/m/y/?] n Realtek RTL8723AU Wireless LAN NIC driver (R8723AU) [N/m/?] (NEW) aborted! ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] lantiq v3.18
On Mon, 2015-02-09 at 19:18 +0100, John Crispin wrote: > try r44366 or newer please SPI flash is not detected, bricking the device. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] lantiq v3.18
On Mon, 2015-02-09 at 21:27 +0100, John Crispin wrote: > bootlog please > > On 09/02/2015 21:25, Daniel Gimpelevich wrote: > > On Mon, 2015-02-09 at 19:18 +0100, John Crispin wrote: > >> try r44366 or newer please > > > > SPI flash is not detected, bricking the device. > > [0.00] Linux version 3.18.6 (danielg4@chimera) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r43982) ) #3 Mon Feb 9 115 [0.00] SoC: AR9 rev 1.2 [0.00] bootconsole [early0] enabled [0.00] CPU0 revision is: 0001954c (MIPS 34Kc) [0.00] MIPS: machine is DGN3500 - Netgear DGN3500 [0.00] Determined physical RAM map: [0.00] memory: 0400 @ (usable) [0.00] User-defined physical RAM map: [0.00] memory: 0400 @ (usable) [0.00] Initrd not found or empty - disabling initrd [0.00] Zone ranges: [0.00] Normal [mem 0x-0x03ff] [0.00] Movable zone start for each node [0.00] Early memory node ranges [0.00] node 0: [mem 0x-0x03ff] [0.00] Initmem setup node 0 [mem 0x-0x03ff] [0.00] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes. [0.00] Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 32 bytes [0.00] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256 [0.00] Kernel command line: root=/dev/mtdblock0 ip=192.168.1.1:192.168.1.15eth0:on console=ttyS1,115200 ethaddr=30:46:90 [0.00] PID hash table entries: 256 (order: -2, 1024 bytes) [0.00] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes) [0.00] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes) [0.00] Writing ErrCtl register=5880 [0.00] Readback ErrCtl register=5880 [0.00] Memory: 60404K/65536K available (3312K kernel code, 147K rwdata, 664K rodata, 144K init, 194K bss, 5132K reserved) [0.00] NR_IRQS:256 [0.00] CPU Clock: 333MHz [0.00] Calibrating delay loop... 221.18 BogoMIPS (lpj=442368) [0.036000] pid_max: default: 32768 minimum: 301 [0.04] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes) [0.044000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes) [0.052000] pinctrl core: initialized pinctrl subsystem [0.056000] NET: Registered protocol family 16 [0.064000] pinctrl-xway 1e100b10.pinmux: Init done [0.068000] dma-xway 1e104100.dma: Init done - hw rev: 6, ports: 5, channels: 20 [0.076000] PCI host bridge /fpi@1000/pci@E105400 ranges: [0.08] MEM 0x1800..0x19ff [0.084000] IO 0x1ae0..0x1aff [0.088000] ath9k,eeprom ath9k_eep: failed to load eeprom address [0.10] usbcore: registered new interface driver usbfs [0.104000] usbcore: registered new interface driver hub [0.108000] usbcore: registered new device driver usb [0.112000] PCI host bridge to bus :00 [0.116000] pci_bus :00: root bus resource [mem 0x1800-0x19ff] [0.12] pci_bus :00: root bus resource [io 0x] [0.124000] pci_bus :00: No busn resource found for root bus, will use [bus 00-ff] [0.128000] pci :00:0e.0: BAR 0: assigned [mem 0x1800-0x1800] [0.132000] Switched to clocksource MIPS [0.136000] NET: Registered protocol family 2 [0.144000] TCP established hash table entries: 1024 (order: 0, 4096 bytes) [0.148000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes) [0.156000] TCP: Hash tables configured (established 1024 bind 1024) [0.164000] TCP: reno registered [0.164000] UDP hash table entries: 256 (order: 0, 4096 bytes) [0.172000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes) [0.18] NET: Registered protocol family 1 [0.184000] gptu: totally 6 16-bit timers/counters [0.188000] gptu: misc_register on minor 63 [0.192000] gptu: succeeded to request irq 126 [0.196000] gptu: succeeded to request irq 127 [0.20] gptu: succeeded to request irq 128 [0.204000] gptu: succeeded to request irq 129 [0.212000] gptu: succeeded to request irq 130 [0.216000] gptu: succeeded to request irq 131 [0.22] futex hash table entries: 256 (order: -1, 3072 bytes) [0.228000] squashfs: version 4.0 (2009/01/31) Phillip Lougher [0.236000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc. [0.248000] msgmni has been set to 117 [0.252000] io scheduler noop registered [0.256000] io scheduler deadline registered (default) [0.26] 1e100c00.serial: ttyLTQ0 at MMIO 0x1e100c00 (irq = 112, base_baud = 0) is a lantiq,asc [0.268000] console [ttyLTQ0] enabled [0.268000] console [ttyLTQ0] enabled [0.276000] bootconsole [early0] disabled [0.276000] bootconsole [early0]
Re: [OpenWrt-Devel] lantiq v3.18
Is there a patchset I could try? On Mon, 2015-02-09 at 12:44 -0800, Daniel Gimpelevich wrote: > On Mon, 2015-02-09 at 21:27 +0100, John Crispin wrote: > > bootlog please > > > > On 09/02/2015 21:25, Daniel Gimpelevich wrote: > > > On Mon, 2015-02-09 at 19:18 +0100, John Crispin wrote: > > >> try r44366 or newer please > > > > > > SPI flash is not detected, bricking the device. > > > > > [0.00] Linux version 3.18.6 (danielg4@chimera) (gcc version 4.8.3 > (OpenWrt/Linaro GCC 4.8-2014.04 r43982) ) #3 Mon Feb 9 115 > [0.00] SoC: AR9 rev 1.2 > [0.00] bootconsole [early0] enabled > [0.00] CPU0 revision is: 0001954c (MIPS 34Kc) > [0.00] MIPS: machine is DGN3500 - Netgear DGN3500 > [0.00] Determined physical RAM map: > [0.00] memory: 0400 @ (usable) > [0.00] User-defined physical RAM map: > [0.00] memory: 0400 @ (usable) > [0.00] Initrd not found or empty - disabling initrd > [0.00] Zone ranges: > [0.00] Normal [mem 0x-0x03ff] > [0.00] Movable zone start for each node > [0.00] Early memory node ranges > [0.00] node 0: [mem 0x-0x03ff] > [0.00] Initmem setup node 0 [mem 0x-0x03ff] > [0.00] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes. > [0.00] Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 32 > bytes > [0.00] Built 1 zonelists in Zone order, mobility grouping on. Total > pages: 16256 > [0.00] Kernel command line: root=/dev/mtdblock0 > ip=192.168.1.1:192.168.1.15eth0:on console=ttyS1,115200 ethaddr=30:46:90 > [0.00] PID hash table entries: 256 (order: -2, 1024 bytes) > [0.00] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes) > [0.00] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes) > [0.00] Writing ErrCtl register=5880 > [0.00] Readback ErrCtl register=5880 > [0.00] Memory: 60404K/65536K available (3312K kernel code, 147K > rwdata, 664K rodata, 144K init, 194K bss, 5132K reserved) > [0.00] NR_IRQS:256 > [0.00] CPU Clock: 333MHz > [0.00] Calibrating delay loop... 221.18 BogoMIPS (lpj=442368) > [0.036000] pid_max: default: 32768 minimum: 301 > [0.04] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes) > [0.044000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 > bytes) > [0.052000] pinctrl core: initialized pinctrl subsystem > [0.056000] NET: Registered protocol family 16 > [0.064000] pinctrl-xway 1e100b10.pinmux: Init done > [0.068000] dma-xway 1e104100.dma: Init done - hw rev: 6, ports: 5, > channels: 20 > [0.076000] PCI host bridge /fpi@1000/pci@E105400 ranges: > [0.08] MEM 0x1800..0x19ff > [0.084000] IO 0x1ae0..0x1aff > [0.088000] ath9k,eeprom ath9k_eep: failed to load eeprom address > [0.10] usbcore: registered new interface driver usbfs > [0.104000] usbcore: registered new interface driver hub > [0.108000] usbcore: registered new device driver usb > [0.112000] PCI host bridge to bus :00 > [0.116000] pci_bus :00: root bus resource [mem 0x1800-0x19ff] > [0.12] pci_bus :00: root bus resource [io 0x] > [0.124000] pci_bus :00: No busn resource found for root bus, will use > [bus 00-ff] > [0.128000] pci :00:0e.0: BAR 0: assigned [mem 0x1800-0x1800] > [0.132000] Switched to clocksource MIPS > [0.136000] NET: Registered protocol family 2 > [0.144000] TCP established hash table entries: 1024 (order: 0, 4096 bytes) > [0.148000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes) > [0.156000] TCP: Hash tables configured (established 1024 bind 1024) > [0.164000] TCP: reno registered > [0.164000] UDP hash table entries: 256 (order: 0, 4096 bytes) > [0.172000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes) > [0.18] NET: Registered protocol family 1 > [0.184000] gptu: totally 6 16-bit timers/counters > [0.188000] gptu: misc_register on minor 63 > [0.192000] gptu: succeeded to request irq 126 > [0.196000] gptu: succeeded to request irq 127 > [0.20] gptu: succeeded to request irq 128 > [0.204000] gptu: succeeded to request irq 129 > [0.212000] gptu: succeeded to request irq 130 > [0.216000] gptu: succeeded to request irq 131 > [0.22] futex hash table entries: 256 (order: -1, 3072 bytes) > [0.228000] squashfs: version 4.0 (2009/01/31) Phillip Lougher &
Re: [OpenWrt-Devel] lantiq v3.18
John Crispin writes: > > > On 10/02/2015 19:35, Joerg Hollmann wrote: > > Hello Daniel, > > > > could it be, that the definition of the kernel partition in the dts > > file of your device ist too small? > > i think the problem is that spi-gpio is either not loaded or loaded > too late. i wont have time to look at it till friday though. > > > I have seen similar error messages on the builds for the VG3503J. > > there is a kernel part defined in the dts ? the mtdsplit should handle > it for your. i'll look at that aswell, only tested a initramfs on the > VG3503J Booting an initramfs of 3.18 succeeds but still does not detect the SPI flash. It also uses a wrong macaddr, no doubt due to the following wrong logic in 0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch --- a/drivers/net/ethernet/lantiq_etop.c +++ b/drivers/net/ethernet/lantiq_etop.c @@ -161,7 +161,7 @@ struct ltq_etop_priv { int tx_irq; int rx_irq; - const void *mac; + void *mac; int mii_mode; spinlock_t lock; @@ -840,7 +840,11 @@ ltq_etop_init(struct net_device *dev) if (err) goto err_hw; - memcpy(&mac, &priv->pldata->mac, sizeof(struct sockaddr)); + if (priv->mac) + memcpy(&mac, priv->mac, sizeof(struct sockaddr)); + else + memcpy(&mac, ltq_get_eth_mac(), sizeof(struct sockaddr)) + if (!is_valid_ether_addr(mac.sa_data)) { pr_warn("etop: invalid MAC, using random\n"); eth_random_addr(mac.sa_data); This stuffs the macaddr into the wrong field of the sockaddr and reads beyond the end of the macaddr. The corresponding patch to 3.14 was right ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] lantiq v3.18
On Thu, Feb 12, 2015 at 3:19 AM, John Crispin wrote: > > > On 10/02/2015 10:40, Daniel Gimpelevich wrote: > > Is there a patchset I could try? > > try r44421 or newer Tried initramfs, bootlog attached. [0.00] Linux version 3.18.6 (danielg4@chimera) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r43982) ) #2 Thu Feb 12 08:19:32 PST 2015 [0.00] SoC: AR9 rev 1.2 [0.00] bootconsole [early0] enabled [0.00] CPU0 revision is: 0001954c (MIPS 34Kc) [0.00] MIPS: machine is DGN3500 - Netgear DGN3500 [0.00] Determined physical RAM map: [0.00] memory: 0400 @ (usable) [0.00] User-defined physical RAM map: [0.00] memory: 0400 @ (usable) [0.00] Initrd not found or empty - disabling initrd [0.00] Zone ranges: [0.00] Normal [mem 0x-0x03ff] [0.00] Movable zone start for each node [0.00] Early memory node ranges [0.00] node 0: [mem 0x-0x03ff] [0.00] Initmem setup node 0 [mem 0x-0x03ff] [0.00] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes. [0.00] Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 32 bytes [0.00] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256 [0.00] Kernel command line: root=/dev/ram rw ip=192.168.1.1:192.168.1.15eth0:on console=ttyS1,115200 ethaddr=30:46:9a:31:0c:99 phym=64M mem=64M panic=1 root=/dev/mtdblock5 console=ttyLTQ0,115200 [0.00] PID hash table entries: 256 (order: -2, 1024 bytes) [0.00] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes) [0.00] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes) [0.00] Writing ErrCtl register=1bc2 [0.00] Readback ErrCtl register=1bc2 [0.00] Memory: 56244K/65536K available (3319K kernel code, 150K rwdata, 672K rodata, 4288K init, 194K bss, 9292K reserved) [0.00] NR_IRQS:256 [0.00] CPU Clock: 333MHz [0.00] Calibrating delay loop... 221.18 BogoMIPS (lpj=442368) [0.04] pid_max: default: 32768 minimum: 301 [0.044000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes) [0.048000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes) [0.056000] pinctrl core: initialized pinctrl subsystem [0.064000] NET: Registered protocol family 16 [0.072000] pinctrl-xway 1e100b10.pinmux: Init done [0.076000] dma-xway 1e104100.dma: Init done - hw rev: 6, ports: 5, channels: 20 [0.084000] PCI host bridge /fpi@1000/pci@E105400 ranges: [0.088000] MEM 0x1800..0x19ff [0.092000] IO 0x1ae0..0x1aff [0.096000] ath9k,eeprom ath9k_eep: failed to load eeprom address [0.108000] usbcore: registered new interface driver usbfs [0.112000] usbcore: registered new interface driver hub [0.116000] usbcore: registered new device driver usb [0.12] PCI host bridge to bus :00 [0.124000] pci_bus :00: root bus resource [mem 0x1800-0x19ff] [0.128000] pci_bus :00: root bus resource [io 0x] [0.132000] pci_bus :00: No busn resource found for root bus, will use [bus 00-ff] [0.136000] pci :00:0e.0: BAR 0: assigned [mem 0x1800-0x1800] [0.14] Switched to clocksource MIPS [0.144000] NET: Registered protocol family 2 [0.152000] TCP established hash table entries: 1024 (order: 0, 4096 bytes) [0.156000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes) [0.164000] TCP: Hash tables configured (established 1024 bind 1024) [0.172000] TCP: reno registered [0.172000] UDP hash table entries: 256 (order: 0, 4096 bytes) [0.18] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes) [0.188000] NET: Registered protocol family 1 [ 10.284000] gptu: totally 6 16-bit timers/counters [ 10.288000] gptu: misc_register on minor 63 [ 10.292000] gptu: succeeded to request irq 126 [ 10.30] gptu: succeeded to request irq 127 [ 10.304000] gptu: succeeded to request irq 128 [ 10.308000] gptu: succeeded to request irq 129 [ 10.312000] gptu: succeeded to request irq 130 [ 10.316000] gptu: succeeded to request irq 131 [ 10.324000] futex hash table entries: 256 (order: -1, 3072 bytes) [ 10.332000] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 10.336000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc. [ 10.348000] msgmni has been set to 109 [ 10.352000] io scheduler noop registered [ 10.356000] io scheduler deadline registered (default) [ 10.36] 1e100c00.serial: ttyLTQ0 at MMIO 0x1e100c00 (irq = 112, base_baud = 0) is a lantiq,asc [ 10.372000] console [ttyLTQ0] enabled [ 10.372000] console [ttyLTQ0] enabled [ 10.38] bootconsole [early0] disabled [ 10.38] bootconsole [early0] disabled
Re: [OpenWrt-Devel] lantiq v3.18
On Thu, Feb 12, 2015 at 8:54 AM, Daniel Gimpelevich < dan...@gimpelevich.san-francisco.ca.us> wrote: > On Thu, Feb 12, 2015 at 3:19 AM, John Crispin wrote: > >> >> >> On 10/02/2015 10:40, Daniel Gimpelevich wrote: >> > Is there a patchset I could try? >> >> try r44421 or newer > > > Tried initramfs, bootlog attached. > With this image, booting from SPI flash still fails, because there is no longer a "kernel" partition, so the rootfs is now /dev/mtdblock4, while the DTS file still specifies /dev/mtdblock5. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] lantiq v3.18
On Thu, Feb 12, 2015 at 9:33 AM, John Crispin wrote: > > > On 12/02/2015 18:30, Daniel Gimpelevich wrote: > > On Thu, Feb 12, 2015 at 8:54 AM, Daniel Gimpelevich > > > <mailto:dan...@gimpelevich.san-francisco.ca.us>> wrote: > > > > On Thu, Feb 12, 2015 at 3:19 AM, John Crispin > <mailto:blo...@openwrt.org>> wrote: > > > > > > > > On 10/02/2015 10:40, Daniel Gimpelevich wrote: > > > Is there a patchset I could try? > > > > try r44421 or newer > > > > > > Tried initramfs, bootlog attached. > > > > > > With this image, booting from SPI flash still fails, because there is no > > longer a "kernel" partition, so the rootfs is now /dev/mtdblock4, while > > the DTS file still specifies /dev/mtdblock5. > > and why does that cause booting to fail ? > If the kernel cannot find the rootfs, it cannot boot. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] lantiq v3.18
On Thu, 12 Feb 2015 18:38:09 +0100, John Crispin wrote: > ah i see, not even sure why we attach that info. the mtdsplid should > automatically set the root= > > try removing the root= parameter please and see if it boots properly That was there to override the root= from the bootloader, otherwise it would try to use /dev/mtdblock0. This corrects it better and boots: Signed-off-by: Daniel Gimpelevich --- a/target/linux/lantiq/dts/DGN3500.dtsi (revision 44424) +++ b/target/linux/lantiq/dts/DGN3500.dtsi (working copy) @@ -2,7 +2,7 @@ / { chosen { - bootargs-append = "root=/dev/mtdblock5 console=ttyLTQ0,115200"; + bootargs-append = "root= console=ttyLTQ0,115200"; }; memory@0 { ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] Retry 6rd if wan is down
Currently, if you have dual WAN and the link needed for 6rd is down, it just silently fails. This patch makes it retry in case the link comes up. Signed-off-by: Daniel Gimpelevich --- a/package/network/ipv6/6rd/files/6rd.sh (revision 44437) +++ b/package/network/ipv6/6rd/files/6rd.sh (working copy) @@ -33,7 +33,8 @@ fi if ! network_get_ipaddr ipaddr "$wanif"; then - proto_notify_error "$cfg" "NO_WAN_LINK" + sleep 60 + proto_setup_failed "$cfg" return fi } ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] ppp: Allow PPTP over a specified interface
In a dual-WAN setup, it's useful to specify an interface over which to have PPTP. Signed-off-by: Daniel Gimpelevich --- a/package/network/services/ppp/files/ppp.sh (revision 44437) +++ b/package/network/services/ppp/files/ppp.sh (working copy) @@ -181,6 +181,7 @@ proto_pptp_init_config() { ppp_generic_init_config proto_config_add_string "server" + proto_config_add_string "interface" available=1 no_device=1 } @@ -190,9 +191,10 @@ local iface="$2" local ip serv_addr server - json_get_var server server && { + json_get_vars interface server + [ -n "$server" ] && { for ip in $(resolveip -t 5 "$server"); do - ( proto_add_host_dependency "$config" "$ip" ) + ( proto_add_host_dependency "$config" "$ip" $interface ) serv_addr=1 done } ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v2] ppp: Allow PPTP over a specified interface
On Fri, 13 Feb 2015 10:18:47 +, Daniel Gimpelevich wrote: > In a dual-WAN setup, it's useful to specify an interface over which to > have PPTP. Whoops, sent an out-of-date patch by mistake. Here's the real one. Signed-off-by: Daniel Gimpelevich --- a/package/network/services/ppp/files/ppp.sh (revision 44437) +++ b/package/network/services/ppp/files/ppp.sh (working copy) @@ -181,6 +181,7 @@ proto_pptp_init_config() { ppp_generic_init_config proto_config_add_string "server" + proto_config_add_string "interface" available=1 no_device=1 } @@ -189,10 +190,11 @@ local config="$1" local iface="$2" - local ip serv_addr server - json_get_var server server && { + local ip serv_addr server interface + json_get_vars interface server + [ -n "$server" ] && { for ip in $(resolveip -t 5 "$server"); do - ( proto_add_host_dependency "$config" "$ip" ) + ( proto_add_host_dependency "$config" "$ip" $interface ) serv_addr=1 done } ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] Retry 6rd if wan is down
On Fri, 13 Feb 2015 20:09:40 +0800, Yousong Zhou wrote: > A wild guess is that `return 1` or `exit 1` should do the trick. > > yousong No, the return value is ignored. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] lantiq v3.18
On Fri, 13 Feb 2015 09:23:16 +0100, Sylwester Petela wrote: > PCI works, I have one more issue (present from 3.14 kernel) , unit will > hang (without any errors in console output) when trying to reboot from > cli/luci, but only when dsl_control is started at boot, without attached > line or with dsl_control excluded from running on boot, everything > works ok, even trying to stop dsl_control before reboot doesn't help. > I'm thinking that dts for P-2812HNU has something to do with it, but I > cannot trace it. I'm not sure whether this is the same issue, but when I boot with the DSL connected, it takes another five minutes after the console shows the line "procd: - init complete -" before the DSL actually connects, and if I type "time /etc/init.d/dsl_control status" after it connects and walk away, it tells me it took twenty minutes to complete. This makes LuCI unusable, because it tries to query the status every few seconds, exhausting the RAM, which causes a reboot. This problem did not exist on 3.14, so I suspect it may be related to the kernel config. I might not be able to test anything new till the middle of next week. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] lantiq v3.18
On Fri, 13 Feb 2015 19:43:32 +0100, John Crispin wrote: > look at /proc/cpuinfo please and tell us how many bogomips are reported system type : AR9 rev 1.2 machine : DGN3500 - Netgear DGN3500 processor : 0 cpu model : MIPS 34Kc V4.12 BogoMIPS: 221.18 wait instruction: yes microsecond timers : yes tlb_entries : 16 extra interrupt vector : yes hardware watchpoint : yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb] isa : mips1 mips2 mips32r1 mips32r2 ASEs implemented: mips16 dsp mt shadow register sets: 1 kscratch registers : 0 package : 0 core: 0 VCED exceptions : not available VCEI exceptions : not available ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] lantiq v3.18
On Sat, 14 Feb 2015 19:55:03 +0100, John Crispin wrote: > ok, i think the spi clock is just really slow > > m25p80@0 { > #address-cells = <1>; > #size-cells = <1>; > compatible = "s25fl129p0"; > reg = <0 0>; > linux,modalias = "m25p80", "mx25l3205d"; > spi-max-frequency = <100>; > > try increasing it to 10 or 20 mhz. running the flash at 1 Mhz explains > why it takes a week to boot and do anything useful. even with the bus > being bitbanged it should be possible to go beyond 1mhz 1) I'm not sure what tests to run to see what frequency is safe. 2) That's the flash, though. I don't think it explains why the DSL interface in particular takes forever and a day to acknowledge anything. Does it? ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] Retry 6rd if wan is down
On Mon, 16 Feb 2015 09:37:18 +0100, Steven Barth wrote: > What does that "sleep 60" do for you here? It doesn't look very sane to > me. Without it, it retries every couple of seconds, and that really bogs down the CPU. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] lantiq v3.18
On Sun, 15 Feb 2015 05:21:34 +, Daniel Gimpelevich wrote: > On Sat, 14 Feb 2015 19:55:03 +0100, John Crispin wrote: >> ok, i think the spi clock is just really slow >> >> m25p80@0 { >> #address-cells = <1>; >> #size-cells = <1>; >> compatible = "s25fl129p0"; >> reg = <0 0>; >> linux,modalias = "m25p80", "mx25l3205d"; >> spi-max-frequency = <100>; >> >> try increasing it to 10 or 20 mhz. running the flash at 1 Mhz explains >> why it takes a week to boot and do anything useful. even with the bus >> being bitbanged it should be possible to go beyond 1mhz > > 1) I'm not sure what tests to run to see what frequency is safe. > 2) That's the flash, though. I don't think it explains why the DSL > interface in particular takes forever and a day to acknowledge anything. > Does it? OK, adding an extra zero to spi-max-frequency leaves me with no Internet after boot. The nas0 interface is created but not brought up. Also, /etc/init.d/dsl_control STILL takes about twenty minutes to execute. Here is the output of logread: Wed Feb 25 16:33:51 2015 kern.info kernel: [ 28.50] IFXUSB: ifxusb_hcd: version 3.2 B110801 Wed Feb 25 16:33:51 2015 kern.info kernel: [ 29.004000] IFXUSB: USB core #0 soft-reset Wed Feb 25 16:33:51 2015 kern.info kernel: [ 29.208000] IFXUSB: USB core #0 soft-reset Wed Feb 25 16:33:51 2015 kern.info kernel: [ 29.208000] ifxusb_hcd ifxusb_hcd: IFX USB Controller Wed Feb 25 16:33:51 2015 kern.info kernel: [ 29.212000] ifxusb_hcd ifxusb_hcd: new USB bus registered, assigned bus number 1 Wed Feb 25 16:33:51 2015 kern.info kernel: [ 29.22] ifxusb_hcd ifxusb_hcd: irq 62, io mem 0xbe101000 Wed Feb 25 16:33:51 2015 kern.info kernel: [ 29.228000] IFXUSB: Init: Power Port (0) Wed Feb 25 16:33:51 2015 kern.info kernel: [ 29.236000] hub 1-0:1.0: USB hub found Wed Feb 25 16:33:51 2015 kern.info kernel: [ 29.236000] hub 1-0:1.0: 1 port detected Wed Feb 25 16:33:51 2015 kern.notice kernel: [ 30.916000] random: mktemp urandom read with 121 bits of entropy available Wed Feb 25 16:33:51 2015 kern.notice kernel: [ 32.852000] random: nonblocking pool is initialized Wed Feb 25 16:33:51 2015 kern.notice kernel: [ 40.812000] jffs2: notice: (286) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found. Wed Feb 25 16:33:51 2015 user.info kernel: [ 40.832000] block: attempting to load /tmp/jffs_cfg/upper/etc/config/fstab Wed Feb 25 16:33:51 2015 user.info kernel: [ 40.912000] block: extroot: not configured Wed Feb 25 16:33:51 2015 kern.notice kernel: [ 42.54] jffs2: notice: (283) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found. Wed Feb 25 16:33:51 2015 user.info kernel: [ 47.672000] block: attempting to load /tmp/jffs_cfg/upper/etc/config/fstab Wed Feb 25 16:33:51 2015 user.info kernel: [ 47.72] block: extroot: not configured Wed Feb 25 16:33:51 2015 kern.info kernel: [ 53.648000] NET: Registered protocol family 10 Wed Feb 25 16:33:51 2015 kern.info kernel: [ 53.672000] zram: Created 1 device(s) ... Wed Feb 25 16:33:51 2015 kern.info kernel: [ 53.68] NET: Registered protocol family 8 Wed Feb 25 16:33:51 2015 kern.info kernel: [ 53.684000] NET: Registered protocol family 20 Wed Feb 25 16:33:51 2015 kern.info kernel: [ 53.70] tun: Universal TUN/TAP device driver, 1.6 Wed Feb 25 16:33:51 2015 kern.info kernel: [ 53.704000] tun: (C) 1999-2004 Max Krasnyansky Wed Feb 25 16:33:51 2015 kern.info kernel: [ 53.724000] sit: IPv6 over IPv4 tunneling driver Wed Feb 25 16:33:51 2015 kern.info kernel: [ 53.744000] PPP generic driver version 2.4.2 Wed Feb 25 16:33:51 2015 kern.info kernel: [ 53.764000] ip6_tables: (C) 2000-2006 Netfilter Core Team Wed Feb 25 16:33:51 2015 kern.info kernel: [ 53.796000] nf_conntrack version 0.5.0 (945 buckets, 3780 max) Wed Feb 25 16:33:51 2015 kern.info kernel: [ 53.896000] IFX MEI Version 5.00.00 Wed Feb 25 16:33:51 2015 kern.warn kernel: [ 53.924000] Infineon CPE API Driver version: DSL CPE API V3.24.4.4 Wed Feb 25 16:33:51 2015 kern.info kernel: [ 54.084000] u32 classifier Wed Feb 25 16:33:51 2015 kern.info kernel: [ 54.088000] input device check on Wed Feb 25 16:33:51 2015 kern.info kernel: [ 54.088000] Actions configured Wed Feb 25 16:33:51 2015 kern.info kernel: [ 54.124000] Mirror/redirect action on Wed Feb 25 16:33:51 2015 kern.info kernel: [ 54.196000] Loading modules backported from Linux version master-2014-11-04-0-gf3660a2 Wed Feb 25 16:33:51 2015 kern.info ker
Re: [OpenWrt-Devel] lantiq v3.18
On Thu, 26 Feb 2015 07:23:20 +0100, John Crispin wrote: > no idea what the poblem is. you'll have to wait till someone comes a > long that has time to debug your problem. Considering that nobody else is working on lantiq, :( ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] lantiq v3.18
On Thu, 2015-02-26 at 09:06 +0100, John Crispin wrote: > you might want to consider the td8970. it works well for many people > but > also has the slow spi flash problem and takes ages the boot. Considering that the whole target is heading for unsupported status, I don't understand how switching to a td8970 would improve things. I'm not sure what work has been done to support MediaTek DSL interfaces after they released driver source, but AFAIK they don't involve VoIP hardware, and the wifi driver is not nearly as mature as Atheros. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Lantiq 3.10 (BB) was lantiq v3.18
On Thu, 26 Feb 2015 16:02:23 +0100, Joerg Jungermann wrote: > Hi, > > I have here multiple TD-W8970 with Annex A and Annex B. > >> m25p80@0 { >> #address-cells = <1>; >> #size-cells = <1>; >> compatible = "s25fl129p0"; >> reg = <0 0>; >> linux,modalias = "m25p80", "mx25l3205d"; >> spi-max-frequency = <100>; > > I increased spi-max-frequency = <5000>. > According to the datasheets I found that is maximum frequency. > > With my 3 models (2x A, 1x B) these settings work with BB (kernel 3.10) well. > I have not yet tested 3.18. > I benchmarked boot up times from spi-flash with my build. > I could lower bootup times (from uboot to init-completed) from 2m01s to 1m18s. > > I suggest backporting this increase of the spi freq to BB. > > best regards I will be very interested to see you try 3.18 and report back, because 3.14 worked fine for me where 3.18 does not. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [RFC] commit message in YAML format for new devices
On Sun, 12 Jan 2020 11:47:29 -1000, Paul Spooren wrote: > All commits adding new devices already include most relevant information > for creating the overview. However it would be convenient if developers > would format their commit messages in a generic format, therefore I'd > propose the following: > > Every commit message for newly added devices must contain a number of > hardware information and steps for an initial installation. > The hardware information should contain at least the following > information, maybe more: > > SoC, flash, ram, wifi, LEDs, buttons, USB, serial, vendor, model, device > tree ID, Ethernet ports Having just pitched this idea to you a few minutes ago, of course I'll be the first to ACK. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 0/5][lantiq] Please make sure this doesn't break other hardware
I have made the Netgear DGN3500 work as it should, but it required some changes that would affect other hardware. If anyone out there has Lantiq hardware supported in trunk, please try this patchset, in whole or in part, and report back what works and what breaks. I'm attaching the whole thing as a blob to this message, and splitting it into 5 patches in the following ones. Signed-off-by: Daniel Gimpelevich Index: target/linux/lantiq/config-default === --- target/linux/lantiq/config-default (revision 36698) +++ target/linux/lantiq/config-default (working copy) @@ -8,7 +8,6 @@ CONFIG_ARCH_SUSPEND_POSSIBLE=y CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y CONFIG_CEVT_R4K=y -CONFIG_CEVT_R4K_LIB=y CONFIG_CLKDEV_LOOKUP=y CONFIG_CPU_BIG_ENDIAN=y CONFIG_CPU_GENERIC_DUMP_TLB=y @@ -22,8 +21,9 @@ CONFIG_CPU_R4K_FPU=y CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y CONFIG_CPU_SUPPORTS_HIGHMEM=y +CONFIG_CRYPTO_HASH=y +CONFIG_CRYPTO_HASH2=y CONFIG_CSRC_R4K=y -CONFIG_CSRC_R4K_LIB=y # CONFIG_DEBUG_PINCTRL is not set CONFIG_DECOMPRESS_LZMA=y CONFIG_DMA_NONCOHERENT=y @@ -50,6 +50,7 @@ CONFIG_HAS_IOPORT=y CONFIG_HAVE_ARCH_JUMP_LABEL=y CONFIG_HAVE_ARCH_KGDB=y +CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y CONFIG_HAVE_CLK=y CONFIG_HAVE_C_RECORDMCOUNT=y CONFIG_HAVE_DEBUG_KMEMLEAK=y @@ -68,6 +69,7 @@ CONFIG_HAVE_MEMBLOCK=y CONFIG_HAVE_MEMBLOCK_NODE_MAP=y CONFIG_HAVE_MOD_ARCH_SPECIFIC=y +CONFIG_HAVE_NET_DSA=y CONFIG_HAVE_OPROFILE=y CONFIG_HAVE_PERF_EVENTS=y CONFIG_HW_HAS_PCI=y @@ -75,7 +77,6 @@ CONFIG_HZ=250 # CONFIG_HZ_100 is not set CONFIG_HZ_250=y -# CONFIG_I2C_MUX_PINCTRL is not set CONFIG_INITRAMFS_SOURCE="" CONFIG_IRQ_CPU=y CONFIG_IRQ_DOMAIN=y @@ -86,8 +87,11 @@ CONFIG_LANTIQ_WDT=y CONFIG_LANTIQ_XRX200=y CONFIG_LEDS_GPIO=y +# CONFIG_LZO_COMPRESS is not set +# CONFIG_LZO_DECOMPRESS is not set CONFIG_MDIO_BOARDINFO=y CONFIG_MIPS=y +# CONFIG_MIPS_HUGE_TLB_SUPPORT is not set CONFIG_MIPS_L1_CACHE_SHIFT=5 # CONFIG_MIPS_MACHINE is not set CONFIG_MIPS_MT_DISABLED=y @@ -122,13 +126,12 @@ # CONFIG_PCIE_LANTIQ is not set CONFIG_PCI_DOMAINS=y CONFIG_PCI_LANTIQ=y +CONFIG_PERCPU_RWSEM=y CONFIG_PERF_USE_VMALLOC=y CONFIG_PHYLIB=y CONFIG_PINCONF=y CONFIG_PINCTRL=y -# CONFIG_PINCTRL_EXYNOS4 is not set CONFIG_PINCTRL_LANTIQ=y -# CONFIG_PINCTRL_SAMSUNG is not set # CONFIG_PINCTRL_SINGLE is not set CONFIG_PINCTRL_XWAY=y CONFIG_PINMUX=y @@ -142,7 +145,6 @@ CONFIG_SERIAL_LANTIQ=y # CONFIG_SOC_AMAZON_SE is not set # CONFIG_SOC_FALCON is not set -# CONFIG_SOC_SVIP is not set CONFIG_SOC_TYPE_XWAY=y CONFIG_SOC_XWAY=y CONFIG_SWAP_IO_SPACE=y Index: target/linux/lantiq/xway/config-default === --- target/linux/lantiq/xway/config-default (revision 36698) +++ target/linux/lantiq/xway/config-default (working copy) @@ -6,6 +6,7 @@ CONFIG_INPUT_POLLDEV=y # CONFIG_ISDN is not set CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_USBDEV=y CONFIG_M25PXX_USE_FAST_READ=y CONFIG_MTD_M25P80=y CONFIG_MTD_NAND=y Index: target/linux/lantiq/xway/target.mk === --- target/linux/lantiq/xway/target.mk (revision 36698) +++ target/linux/lantiq/xway/target.mk (working copy) @@ -3,7 +3,7 @@ BOARDNAME:=XWAY FEATURES:=squashfs jffs2 atm -DEFAULT_PACKAGES+=kmod-leds-gpio kmod-gpio-button-hotplug +DEFAULT_PACKAGES+=kmod-leds-gpio kmod-gpio-button-hotplug linux-atm atm-esi define Target/Description Lantiq XWAY Index: target/linux/lantiq/dts/DGN3500.dtsi === --- target/linux/lantiq/dts/DGN3500.dtsi(revision 36698) +++ target/linux/lantiq/dts/DGN3500.dtsi(working copy) @@ -2,7 +2,7 @@ / { chosen { - bootargs = "console=ttyLTQ0,115200 init=/etc/preinit"; + bootargs-append = "console=ttyLTQ0,115200 init=/etc/preinit"; }; memory@0 { @@ -112,6 +112,13 @@ }; }; + ath9k_eep { + compatible = "ath9k,eeprom"; + ath,eep-flash = <2 0xf000>; + ath,pci-slot = <14>; + ath,eep-swap; + }; + rtl8366rb { compatible = "rtl8366rb"; gpio-sda = <&gpio 35 0>; @@ -144,7 +151,7 @@ gpio-leds { compatible = "gpio-leds"; internet { - label = "inernet"; + label = "internet"; gpios = <&gpio 2 1>; }; dsl { @@ -158,7 +165,6 @@ power { label = "power"; gpios = <&gpio 34 1>; - default-state = "on";
[OpenWrt-Devel] [PATCH 3/5][lantiq] Please make sure this doesn't break other hardware
This patch sets the ESI properly for the Lantiq ATM driver so that things like DHCP over RFC1483 will work correctly. Signed-off-by: Daniel Gimpelevich Index: target/linux/lantiq/ase/target.mk === --- target/linux/lantiq/ase/target.mk (revision 36698) +++ target/linux/lantiq/ase/target.mk (working copy) @@ -3,7 +3,7 @@ BOARDNAME:=Amazon-SE FEATURES:=squashfs jffs2 atm -DEFAULT_PACKAGES+=kmod-pppoa ppp-mod-pppoa linux-atm atm-tools br2684ctl kmod-ltq-dsl-ase ltq-dsl-app +DEFAULT_PACKAGES+=kmod-pppoa ppp-mod-pppoa linux-atm atm-esi atm-tools br2684ctl kmod-ltq-dsl-ase ltq-dsl-app define Target/Description Lantiq ASE Index: target/linux/lantiq/xway/target.mk === --- target/linux/lantiq/xway/target.mk (revision 36698) +++ target/linux/lantiq/xway/target.mk (working copy) @@ -3,7 +3,7 @@ BOARDNAME:=XWAY FEATURES:=squashfs jffs2 atm -DEFAULT_PACKAGES+=kmod-leds-gpio kmod-gpio-button-hotplug +DEFAULT_PACKAGES+=kmod-leds-gpio kmod-gpio-button-hotplug linux-atm atm-esi define Target/Description Lantiq XWAY Index: target/linux/lantiq/base-files/etc/init.d/esi === --- target/linux/lantiq/base-files/etc/init.d/esi (revision 0) +++ target/linux/lantiq/base-files/etc/init.d/esi (revision 0) @@ -0,0 +1,7 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2013 OpenWrt.org + +START=19 +start() { + esi $(printf '%X' $((1+0x$(tr -d : /dev/null || : +} Property changes on: target/linux/lantiq/base-files/etc/init.d/esi ___ Added: svn:executable + * ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 4/5][lantiq] Please make sure this doesn't break other hardware
This patch changes the kernel to make support of the DGN3500 possible and may enhance and/or break support for other devices. It's mostly changes to an existing platform patch, which itself really should be separated out. The remainder (in a separate file) is a device tree enhancement that IMHO is worthy of mainline. It could even go into target/linux/generic here, but for the moment, I am putting it under the lantiq target. Signed-off-by: Daniel Gimpelevich Index: target/linux/lantiq/patches-3.8/0037-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch === --- target/linux/lantiq/patches-3.8/0037-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch (revision 36698) +++ target/linux/lantiq/patches-3.8/0037-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch (working copy) @@ -19,8 +19,10 @@ create mode 100644 arch/mips/lantiq/xway/pci-ath-fixup.c create mode 100644 arch/mips/lantiq/xway/rt_eep.c /dev/null -+++ b/arch/mips/include/asm/mach-lantiq/pci-ath-fixup.h +Index: linux-3.8.12/arch/mips/include/asm/mach-lantiq/pci-ath-fixup.h +=== +--- /dev/null 1970-01-01 00:00:00.0 + linux-3.8.12/arch/mips/include/asm/mach-lantiq/pci-ath-fixup.h 2013-05-23 19:40:28.323008317 -0700 @@ -0,0 +1,6 @@ +#ifndef _PCI_ATH_FIXUP +#define _PCI_ATH_FIXUP @@ -28,9 +30,11 @@ +void ltq_pci_ath_fixup(unsigned slot, u16 *cal_data) __init; + +#endif /* _PCI_ATH_FIXUP */ a/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h -+++ b/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h -@@ -90,5 +90,8 @@ int xrx200_gphy_boot(struct device *dev, +Index: linux-3.8.12/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h +=== +--- linux-3.8.12.orig/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h 2013-05-23 19:39:58.682861338 -0700 linux-3.8.12/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h 2013-05-23 19:40:28.323008317 -0700 +@@ -90,5 +90,8 @@ extern void ltq_pmu_enable(unsigned int module); extern void ltq_pmu_disable(unsigned int module); @@ -39,8 +43,10 @@ + #endif /* CONFIG_SOC_TYPE_XWAY */ #endif /* _LTQ_XWAY_H__ */ a/arch/mips/lantiq/xway/Makefile -+++ b/arch/mips/lantiq/xway/Makefile +Index: linux-3.8.12/arch/mips/lantiq/xway/Makefile +=== +--- linux-3.8.12.orig/arch/mips/lantiq/xway/Makefile 2013-05-23 19:40:28.247007941 -0700 linux-3.8.12/arch/mips/lantiq/xway/Makefile2013-05-23 21:48:16.965035065 -0700 @@ -1,3 +1,6 @@ obj-y := prom.o sysctrl.o clk.o reset.o dma.o gptu.o dcdc.o @@ -48,9 +54,11 @@ +obj-$(CONFIG_PCI) += ath_eep.o rt_eep.o pci-ath-fixup.o + obj-$(CONFIG_XRX200_PHY_FW) += xrx200_phy_fw.o /dev/null -+++ b/arch/mips/lantiq/xway/ath_eep.c -@@ -0,0 +1,206 @@ +Index: linux-3.8.12/arch/mips/lantiq/xway/ath_eep.c +=== +--- /dev/null 1970-01-01 00:00:00.0 + linux-3.8.12/arch/mips/lantiq/xway/ath_eep.c 2013-05-23 21:38:32.758138144 -0700 +@@ -0,0 +1,246 @@ +/* + * Copyright (C) 2011 Luca Olivetti + * Copyright (C) 2011 John Crispin @@ -69,7 +77,10 @@ +#include +#include +#include ++#include ++#include +#include ++#include + +extern int (*ltq_pci_plat_dev_init)(struct pci_dev *dev); +struct ath5k_platform_data ath5k_pdata; @@ -88,32 +99,50 @@ +int __init of_ath9k_eeprom_probe(struct platform_device *pdev) +{ + struct device_node *np = pdev->dev.of_node; -+ struct resource *eep_res, *mac_res; ++ struct resource *eep_res, *mac_res = NULL; + void __iomem *eep, *mac; + int mac_offset; -+ u32 mac_inc = 0, pci_slot = 0; ++ u32 mac_inc = 0, pci_slot = 0, mtd_addr[2]; + int i; + u16 *eepdata, sum, el; ++ struct mtd_info *the_mtd; ++ size_t flash_readlen; + -+ eep_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); -+ mac_res = platform_get_resource(pdev, IORESOURCE_MEM, 1); ++ if (of_property_read_u32_array(np, "ath,eep-flash", mtd_addr, 2) == 0 && ++ (the_mtd = get_mtd_device(NULL, mtd_addr[0])) ++ != ERR_PTR(-ENODEV)) { ++ i = mtd_read(the_mtd, mtd_addr[1], ++ sizeof(ath9k_pdata.eeprom_data), &flash_readlen, ++ (void *) ath9k_pdata.eeprom_data); ++ put_mtd_device(the_mtd); ++ if ((sizeof(ath9k_pdata.eeprom_data) != flash_readlen) || i) { ++ dev_err(&pdev->dev, "failed to load eeprom from mtd\n"); ++ return -ENODEV; ++ } ++ } else { ++ eep_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); ++
[OpenWrt-Devel] [PATCH 2/5][lantiq] Please make sure this doesn't break other hardware
This second patch fixes the DSL sync light so that it's not tied to PPPoE, which is intended to be the "Internet" light. It also adds the kernel config option already used by the LED control in uci-defaults. Lastly, it provides a boot LED sequence suitable for devices with both red and green LEDs for power. Signed-off-by: Daniel Gimpelevich Index: target/linux/lantiq/xway/config-default === --- target/linux/lantiq/xway/config-default (revision 36698) +++ target/linux/lantiq/xway/config-default (working copy) @@ -6,6 +6,7 @@ CONFIG_INPUT_POLLDEV=y # CONFIG_ISDN is not set CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_USBDEV=y CONFIG_M25PXX_USE_FAST_READ=y CONFIG_MTD_M25P80=y CONFIG_MTD_NAND=y Index: target/linux/lantiq/base-files/etc/uci-defaults/01_leds === --- target/linux/lantiq/base-files/etc/uci-defaults/01_leds (revision 36698) +++ target/linux/lantiq/base-files/etc/uci-defaults/01_leds (working copy) @@ -9,7 +9,7 @@ [ -e "/sys/class/leds/wifi" ] && ucidef_set_led_wlan "wifi" "wifi" "wifi" "phy0tpt" [ -e "/sys/class/leds/usb" ] && ucidef_set_led_usbdev "usb" "usb" "usb" "1-1" -[ -e "/sys/class/leds/dsl" ] &&ucidef_set_led_netdev "dsl" "dsl" "dsl" "pppoe-wan" +[ -e "/sys/class/leds/internet" ] && ucidef_set_led_netdev "internet" "internet" "internet" "pppoe-wan" for a in `ls /sys/class/leds/`; do grep -q "\[none\]" /sys/class/leds/$a/trigger Index: target/linux/lantiq/base-files/etc/diag.sh === --- target/linux/lantiq/base-files/etc/diag.sh (revision 36698) +++ target/linux/lantiq/base-files/etc/diag.sh (working copy) @@ -6,6 +6,27 @@ status_led="power" set_state() { + [ -d /sys/class/leds/power2/ ] && { + + case "$1" in + preinit) + led_set_attr "power2" "trigger" "heartbeat" + ;; + init) + status_led_on + ;; + failsafe) + led_off "power2" + status_led_set_timer 100 100 + ;; + done) + status_led_on + led_off "power2" + ;; + esac + return + } + case "$1" in preinit) status_led_set_heartbeat ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 5/5][lantiq] Please make sure this doesn't break other hardware
Lastly, the patch that requires the previous ones to support the DGN3500. Signed-off-by: Daniel Gimpelevich Index: target/linux/lantiq/dts/DGN3500.dtsi === --- target/linux/lantiq/dts/DGN3500.dtsi(revision 36698) +++ target/linux/lantiq/dts/DGN3500.dtsi(working copy) @@ -2,7 +2,7 @@ / { chosen { - bootargs = "console=ttyLTQ0,115200 init=/etc/preinit"; + bootargs-append = "console=ttyLTQ0,115200 init=/etc/preinit"; }; memory@0 { @@ -112,6 +112,13 @@ }; }; + ath9k_eep { + compatible = "ath9k,eeprom"; + ath,eep-flash = <2 0xf000>; + ath,pci-slot = <14>; + ath,eep-swap; + }; + rtl8366rb { compatible = "rtl8366rb"; gpio-sda = <&gpio 35 0>; @@ -144,7 +151,7 @@ gpio-leds { compatible = "gpio-leds"; internet { - label = "inernet"; + label = "internet"; gpios = <&gpio 2 1>; }; dsl { @@ -158,7 +165,6 @@ power { label = "power"; gpios = <&gpio 34 1>; - default-state = "on"; }; power2 { label = "power2"; Index: target/linux/lantiq/base-files/etc/uci-defaults/02_network === --- target/linux/lantiq/base-files/etc/uci-defaults/02_network (revision 36698) +++ target/linux/lantiq/base-files/etc/uci-defaults/02_network (working copy) @@ -72,6 +72,11 @@ VG3503J) ucidef_set_interface_lan 'eth0 eth1' ;; +DGN3500*) + ucidef_set_interface_lan "eth0.1" + ucidef_add_switch "switch0" "1" "1" + ucidef_add_switch_vlan "switch0" "1" "3 2 1 0 5t" + ;; esac [ -z "$(ls /lib/modules/`uname -r`/ltq_atm*)" ] || set_atm_wan "$vpi" "$vci" "$encaps" "$payload" ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 1/5][lantiq] Please make sure this doesn't break other hardware
This first patch fixes unresolved kernel symbols when including the DEU modules. Signed-off-by: Daniel Gimpelevich Index: target/linux/lantiq/config-default === --- target/linux/lantiq/config-default (revision 36698) +++ target/linux/lantiq/config-default (working copy) @@ -8,7 +8,6 @@ CONFIG_ARCH_SUSPEND_POSSIBLE=y CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y CONFIG_CEVT_R4K=y -CONFIG_CEVT_R4K_LIB=y CONFIG_CLKDEV_LOOKUP=y CONFIG_CPU_BIG_ENDIAN=y CONFIG_CPU_GENERIC_DUMP_TLB=y @@ -22,8 +21,9 @@ CONFIG_CPU_R4K_FPU=y CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y CONFIG_CPU_SUPPORTS_HIGHMEM=y +CONFIG_CRYPTO_HASH=y +CONFIG_CRYPTO_HASH2=y CONFIG_CSRC_R4K=y -CONFIG_CSRC_R4K_LIB=y # CONFIG_DEBUG_PINCTRL is not set CONFIG_DECOMPRESS_LZMA=y CONFIG_DMA_NONCOHERENT=y @@ -50,6 +50,7 @@ CONFIG_HAS_IOPORT=y CONFIG_HAVE_ARCH_JUMP_LABEL=y CONFIG_HAVE_ARCH_KGDB=y +CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y CONFIG_HAVE_CLK=y CONFIG_HAVE_C_RECORDMCOUNT=y CONFIG_HAVE_DEBUG_KMEMLEAK=y @@ -68,6 +69,7 @@ CONFIG_HAVE_MEMBLOCK=y CONFIG_HAVE_MEMBLOCK_NODE_MAP=y CONFIG_HAVE_MOD_ARCH_SPECIFIC=y +CONFIG_HAVE_NET_DSA=y CONFIG_HAVE_OPROFILE=y CONFIG_HAVE_PERF_EVENTS=y CONFIG_HW_HAS_PCI=y @@ -75,7 +77,6 @@ CONFIG_HZ=250 # CONFIG_HZ_100 is not set CONFIG_HZ_250=y -# CONFIG_I2C_MUX_PINCTRL is not set CONFIG_INITRAMFS_SOURCE="" CONFIG_IRQ_CPU=y CONFIG_IRQ_DOMAIN=y @@ -86,8 +87,11 @@ CONFIG_LANTIQ_WDT=y CONFIG_LANTIQ_XRX200=y CONFIG_LEDS_GPIO=y +# CONFIG_LZO_COMPRESS is not set +# CONFIG_LZO_DECOMPRESS is not set CONFIG_MDIO_BOARDINFO=y CONFIG_MIPS=y +# CONFIG_MIPS_HUGE_TLB_SUPPORT is not set CONFIG_MIPS_L1_CACHE_SHIFT=5 # CONFIG_MIPS_MACHINE is not set CONFIG_MIPS_MT_DISABLED=y @@ -122,13 +126,12 @@ # CONFIG_PCIE_LANTIQ is not set CONFIG_PCI_DOMAINS=y CONFIG_PCI_LANTIQ=y +CONFIG_PERCPU_RWSEM=y CONFIG_PERF_USE_VMALLOC=y CONFIG_PHYLIB=y CONFIG_PINCONF=y CONFIG_PINCTRL=y -# CONFIG_PINCTRL_EXYNOS4 is not set CONFIG_PINCTRL_LANTIQ=y -# CONFIG_PINCTRL_SAMSUNG is not set # CONFIG_PINCTRL_SINGLE is not set CONFIG_PINCTRL_XWAY=y CONFIG_PINMUX=y @@ -142,7 +145,6 @@ CONFIG_SERIAL_LANTIQ=y # CONFIG_SOC_AMAZON_SE is not set # CONFIG_SOC_FALCON is not set -# CONFIG_SOC_SVIP is not set CONFIG_SOC_TYPE_XWAY=y CONFIG_SOC_XWAY=y CONFIG_SWAP_IO_SPACE=y ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 0/5][lantiq] Please make sure this doesn't break other hardware
On Fri, 2013-05-24 at 15:17 +0200, John Crispin wrote: > Hi, > > few comments > > * the patches are against the wrong base directory The patches are against trunk. Should they not be? > * the descriptions are undescriptives Yes, I already know documentation is not a forte of mine. I tried my best. > * please make sure that each patch only holds one change. a quick look > told me, that they hold more > > John Patch #1 has only one change, from "make kernel_menuconfig" updated from the file simply copied from the 3.7 config. Patch #2 has one change in two files, and a closely related change in a third file. Patch #3 has a single change, applicable across three files. Patch #4 is the big one. It patches the 0037 patchfile in the patches-3.8 directory, containing many changes, but it's largely atomic because the 0037 patchfile itself contains many changes which, as I said in the description, would be more manageable if it were itself separated into multiple patchfiles. Patch #5 is relatively trivial altogether. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 0/5][lantiq] Please make sure this doesn't break other hardware
On Fri, 2013-05-24 at 16:14 +0200, John Crispin wrote: > >> > * the patches are against the wrong base directory > > The patches are against trunk. Should they not be? > > > > its explained in the "how to submit patches" howto. The howto says these patches are against the correct base directory, so I don't know what you mean. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCHv2 1/8][lantiq] make kernel_oldconfig
Seems the existing kernel config for 3.8 was cp'ed from 3.7; this patch is the result of "make kernel_oldconfig" with defaults for new options. Signed-off-by: Daniel Gimpelevich Index: target/linux/lantiq/config-default === --- a/target/linux/lantiq/config-default(revision 36739) +++ b/target/linux/lantiq/config-default(working copy) @@ -8,7 +8,6 @@ CONFIG_ARCH_SUSPEND_POSSIBLE=y CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y CONFIG_CEVT_R4K=y -CONFIG_CEVT_R4K_LIB=y CONFIG_CLKDEV_LOOKUP=y CONFIG_CPU_BIG_ENDIAN=y CONFIG_CPU_GENERIC_DUMP_TLB=y @@ -23,7 +22,6 @@ CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y CONFIG_CPU_SUPPORTS_HIGHMEM=y CONFIG_CSRC_R4K=y -CONFIG_CSRC_R4K_LIB=y # CONFIG_DEBUG_PINCTRL is not set CONFIG_DECOMPRESS_LZMA=y CONFIG_DMA_NONCOHERENT=y @@ -50,6 +48,7 @@ CONFIG_HAS_IOPORT=y CONFIG_HAVE_ARCH_JUMP_LABEL=y CONFIG_HAVE_ARCH_KGDB=y +CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y CONFIG_HAVE_CLK=y CONFIG_HAVE_C_RECORDMCOUNT=y CONFIG_HAVE_DEBUG_KMEMLEAK=y @@ -68,6 +67,7 @@ CONFIG_HAVE_MEMBLOCK=y CONFIG_HAVE_MEMBLOCK_NODE_MAP=y CONFIG_HAVE_MOD_ARCH_SPECIFIC=y +CONFIG_HAVE_NET_DSA=y CONFIG_HAVE_OPROFILE=y CONFIG_HAVE_PERF_EVENTS=y CONFIG_HW_HAS_PCI=y @@ -75,7 +75,6 @@ CONFIG_HZ=250 # CONFIG_HZ_100 is not set CONFIG_HZ_250=y -# CONFIG_I2C_MUX_PINCTRL is not set CONFIG_INITRAMFS_SOURCE="" CONFIG_IRQ_CPU=y CONFIG_IRQ_DOMAIN=y @@ -86,8 +85,11 @@ CONFIG_LANTIQ_WDT=y CONFIG_LANTIQ_XRX200=y CONFIG_LEDS_GPIO=y +# CONFIG_LZO_COMPRESS is not set +# CONFIG_LZO_DECOMPRESS is not set CONFIG_MDIO_BOARDINFO=y CONFIG_MIPS=y +# CONFIG_MIPS_HUGE_TLB_SUPPORT is not set CONFIG_MIPS_L1_CACHE_SHIFT=5 # CONFIG_MIPS_MACHINE is not set CONFIG_MIPS_MT_DISABLED=y @@ -122,13 +124,12 @@ # CONFIG_PCIE_LANTIQ is not set CONFIG_PCI_DOMAINS=y CONFIG_PCI_LANTIQ=y +CONFIG_PERCPU_RWSEM=y CONFIG_PERF_USE_VMALLOC=y CONFIG_PHYLIB=y CONFIG_PINCONF=y CONFIG_PINCTRL=y -# CONFIG_PINCTRL_EXYNOS4 is not set CONFIG_PINCTRL_LANTIQ=y -# CONFIG_PINCTRL_SAMSUNG is not set # CONFIG_PINCTRL_SINGLE is not set CONFIG_PINCTRL_XWAY=y CONFIG_PINMUX=y @@ -142,7 +143,6 @@ CONFIG_SERIAL_LANTIQ=y # CONFIG_SOC_AMAZON_SE is not set # CONFIG_SOC_FALCON is not set -# CONFIG_SOC_SVIP is not set CONFIG_SOC_TYPE_XWAY=y CONFIG_SOC_XWAY=y CONFIG_SWAP_IO_SPACE=y ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCHv2 2/8][lantiq] fix 3.8 kernel config for DEU support
Trying to load the DEU modules results in unresolved symbols. This provides them. This requires the previous patch to be applied first. Signed-off-by: Daniel Gimpelevich --- a/target/linux/lantiq/config-default2013-05-28 02:46:04.156620670 -0700 +++ b/target/linux/lantiq/config-default2013-05-28 02:40:48.595055885 -0700 @@ -21,6 +21,8 @@ CONFIG_CPU_R4K_FPU=y CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y CONFIG_CPU_SUPPORTS_HIGHMEM=y +CONFIG_CRYPTO_HASH=y +CONFIG_CRYPTO_HASH2=y CONFIG_CSRC_R4K=y # CONFIG_DEBUG_PINCTRL is not set CONFIG_DECOMPRESS_LZMA=y ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCHv2 3/8][lantiq] fix LED-handling oversights
An attempt is made to use ucidef_set_led_usbdev without the required kernel config option, provided here, and the PPPoE status is reassigned to the LED that was intended to indicate it, rather than the DSL sync light. Signed-off-by: Daniel Gimpelevich Index: target/linux/lantiq/xway/config-default === --- a/target/linux/lantiq/xway/config-default (revision 36739) +++ b/target/linux/lantiq/xway/config-default (working copy) @@ -6,6 +6,7 @@ CONFIG_INPUT_POLLDEV=y # CONFIG_ISDN is not set CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_USBDEV=y CONFIG_M25PXX_USE_FAST_READ=y CONFIG_MTD_M25P80=y CONFIG_MTD_NAND=y Index: target/linux/lantiq/base-files/etc/uci-defaults/01_leds === --- a/target/linux/lantiq/base-files/etc/uci-defaults/01_leds (revision 36739) +++ b/target/linux/lantiq/base-files/etc/uci-defaults/01_leds (working copy) @@ -9,7 +9,7 @@ [ -e "/sys/class/leds/wifi" ] && ucidef_set_led_wlan "wifi" "wifi" "wifi" "phy0tpt" [ -e "/sys/class/leds/usb" ] && ucidef_set_led_usbdev "usb" "usb" "usb" "1-1" -[ -e "/sys/class/leds/dsl" ] &&ucidef_set_led_netdev "dsl" "dsl" "dsl" "pppoe-wan" +[ -e "/sys/class/leds/internet" ] && ucidef_set_led_netdev "internet" "internet" "internet" "pppoe-wan" for a in `ls /sys/class/leds/`; do grep -q "\[none\]" /sys/class/leds/$a/trigger ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCHv2 5/8][lantiq] set ATM ESI
This patch sets the ESI properly for the Lantiq ATM driver so that things like DHCP over RFC1483 will work correctly. Signed-off-by: Daniel Gimpelevich Index: target/linux/lantiq/ase/target.mk === --- a/target/linux/lantiq/ase/target.mk (revision 36739) +++ b/target/linux/lantiq/ase/target.mk (working copy) @@ -3,7 +3,7 @@ BOARDNAME:=Amazon-SE FEATURES:=squashfs jffs2 atm -DEFAULT_PACKAGES+=kmod-pppoa ppp-mod-pppoa linux-atm atm-tools br2684ctl kmod-ltq-dsl-ase ltq-dsl-app +DEFAULT_PACKAGES+=kmod-pppoa ppp-mod-pppoa linux-atm atm-esi atm-tools br2684ctl kmod-ltq-dsl-ase ltq-dsl-app define Target/Description Lantiq ASE Index: target/linux/lantiq/xway/target.mk === --- a/target/linux/lantiq/xway/target.mk(revision 36739) +++ b/target/linux/lantiq/xway/target.mk(working copy) @@ -3,7 +3,7 @@ BOARDNAME:=XWAY FEATURES:=squashfs jffs2 atm -DEFAULT_PACKAGES+=kmod-leds-gpio kmod-gpio-button-hotplug +DEFAULT_PACKAGES+=kmod-leds-gpio kmod-gpio-button-hotplug linux-atm atm-esi define Target/Description Lantiq XWAY Index: target/linux/lantiq/base-files/etc/init.d/esi === --- a/target/linux/lantiq/base-files/etc/init.d/esi (revision 0) +++ b/target/linux/lantiq/base-files/etc/init.d/esi (revision 0) @@ -0,0 +1,7 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2013 OpenWrt.org + +START=19 +start() { + esi $(printf '%X' $((1+0x$(tr -d : /dev/null || : +} Property changes on: target/linux/lantiq/base-files/etc/init.d/esi ___ Added: svn:executable + * ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCHv2 4/8][lantiq] diag.sh with both red and green power LEDs
This provides a boot LED sequence suitable for devices with both red and green LEDs for power. This assumes no "default-on" settings in the device tree. Signed-off-by: Daniel Gimpelevich Index: target/linux/lantiq/base-files/etc/diag.sh === --- a/target/linux/lantiq/base-files/etc/diag.sh(revision 36739) +++ b/target/linux/lantiq/base-files/etc/diag.sh(working copy) @@ -6,6 +6,26 @@ status_led="power" set_state() { + [ -d /sys/class/leds/power2/ ] && { + + case "$1" in + preinit) + led_set_attr "power2" "trigger" "heartbeat" + ;; + init) + status_led_on + ;; + failsafe) + led_off "power2" + status_led_set_timer 100 100 + ;; + done) + led_off "power2" + ;; + esac + return + } + case "$1" in preinit) status_led_set_heartbeat ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCHv2 6/8][lantiq] wifi calibration from flash
This patch enables retrieving the wifi calibration data from a flash partition. Signed-off-by: Daniel Gimpelevich Index: target/linux/lantiq/patches-3.8/0037-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch === --- a/target/linux/lantiq/patches-3.8/0037-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch (revision 36739) +++ b/target/linux/lantiq/patches-3.8/0037-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch (working copy) @@ -50,7 +50,7 @@ obj-$(CONFIG_XRX200_PHY_FW) += xrx200_phy_fw.o --- /dev/null +++ b/arch/mips/lantiq/xway/ath_eep.c -@@ -0,0 +1,206 @@ +@@ -0,0 +1,246 @@ +/* + * Copyright (C) 2011 Luca Olivetti + * Copyright (C) 2011 John Crispin @@ -69,7 +69,10 @@ +#include +#include +#include ++#include ++#include +#include ++#include + +extern int (*ltq_pci_plat_dev_init)(struct pci_dev *dev); +struct ath5k_platform_data ath5k_pdata; @@ -88,32 +91,50 @@ +int __init of_ath9k_eeprom_probe(struct platform_device *pdev) +{ + struct device_node *np = pdev->dev.of_node; -+ struct resource *eep_res, *mac_res; ++ struct resource *eep_res, *mac_res = NULL; + void __iomem *eep, *mac; + int mac_offset; -+ u32 mac_inc = 0, pci_slot = 0; ++ u32 mac_inc = 0, pci_slot = 0, mtd_addr[2]; + int i; + u16 *eepdata, sum, el; ++ struct mtd_info *the_mtd; ++ size_t flash_readlen; + -+ eep_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); -+ mac_res = platform_get_resource(pdev, IORESOURCE_MEM, 1); ++ if (of_property_read_u32_array(np, "ath,eep-flash", mtd_addr, 2) == 0 && ++ (the_mtd = get_mtd_device(NULL, mtd_addr[0])) ++ != ERR_PTR(-ENODEV)) { ++ i = mtd_read(the_mtd, mtd_addr[1], ++ sizeof(ath9k_pdata.eeprom_data), &flash_readlen, ++ (void *) ath9k_pdata.eeprom_data); ++ put_mtd_device(the_mtd); ++ if ((sizeof(ath9k_pdata.eeprom_data) != flash_readlen) || i) { ++ dev_err(&pdev->dev, "failed to load eeprom from mtd\n"); ++ return -ENODEV; ++ } ++ } else { ++ eep_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); ++ mac_res = platform_get_resource(pdev, IORESOURCE_MEM, 1); + -+ if (!eep_res) { -+ dev_err(&pdev->dev, "failed to load eeprom address\n"); -+ return -ENODEV; ++ if (!eep_res) { ++ dev_err(&pdev->dev, "failed to load eeprom address\n"); ++ return -ENODEV; ++ } ++ if (resource_size(eep_res) != ATH9K_PLAT_EEP_MAX_WORDS) { ++ dev_err(&pdev->dev, "eeprom has an invalid size\n"); ++ return -EINVAL; ++ } ++ ++ eep = ioremap(eep_res->start, resource_size(eep_res)); ++ memcpy_fromio(ath9k_pdata.eeprom_data, eep, ++ ATH9K_PLAT_EEP_MAX_WORDS); + } -+ if (resource_size(eep_res) != ATH9K_PLAT_EEP_MAX_WORDS) { -+ dev_err(&pdev->dev, "eeprom has an invalid size\n"); -+ return -EINVAL; -+ } + -+ eep = ioremap(eep_res->start, resource_size(eep_res)); -+ memcpy_fromio(ath9k_pdata.eeprom_data, eep, ATH9K_PLAT_EEP_MAX_WORDS); -+ + if (of_find_property(np, "ath,eep-swap", NULL)) { + ath9k_pdata.endian_check = true; -+ + dev_info(&pdev->dev, "endian check enabled.\n"); ++ for (i = 0; i < ATH9K_PLAT_EEP_MAX_WORDS; i++) ++ ath9k_pdata.eeprom_data[i] = ++ swab16(ath9k_pdata.eeprom_data[i]); + } + + if (of_find_property(np, "ath,eep-csum", NULL)) { @@ -137,7 +158,9 @@ + } + mac = ioremap(mac_res->start, resource_size(mac_res)); + memcpy_fromio(athxk_eeprom_mac, mac, 6); -+ } else { ++ } else if (ltq_get_eth_mac()) ++ memcpy(athxk_eeprom_mac, ltq_get_eth_mac(), 6); ++ else { + dev_warn(&pdev->dev, "using random mac\n"); + random_ether_addr(athxk_eeprom_mac); + } @@ -176,7 +199,7 @@ +{ + return platform_driver_probe(&ath9k_eeprom_driver, of_ath9k_eeprom_probe); +} -+arch_initcall(of_ath9k_eeprom_init); ++late_initcall(of_ath9k_eeprom_init); + + +static int ath5k_pci_plat_dev_init(struct pci_dev *dev) @@ -188,30 +211,45 @@ +int __init of_ath5k_eeprom_probe(struct platform_device *pdev) +{ + struct device_node *np = pdev->dev.of_node; -+ struct resource *eep_res, *mac_res; ++ struct resource *eep_res, *
[OpenWrt-Devel] [PATCHv2 7/8][lantiq] enable retrieving kernel args from bootloader
This patch is a device tree enhancement that IMHO is worthy of mainline. It could even go into target/linux/generic here, but for the moment, I am putting it under the lantiq target. Signed-off-by: Daniel Gimpelevich Index: target/linux/lantiq/patches-3.8/0304-MIPS-cmdline.patch === --- a/target/linux/lantiq/patches-3.8/0304-MIPS-cmdline.patch (revision 0) +++ b/target/linux/lantiq/patches-3.8/0304-MIPS-cmdline.patch (revision 0) @@ -0,0 +1,12 @@ +--- a/drivers/of/fdt.c b/drivers/of/fdt.c +@@ -677,6 +677,9 @@ int __init early_init_dt_scan_chosen(uns + p = of_get_flat_dt_prop(node, "bootargs", &l); + if (p != NULL && l > 0) + strlcpy(data, p, min((int)l, COMMAND_LINE_SIZE)); ++ p = of_get_flat_dt_prop(node, "bootargs-append", &l); ++ if (p != NULL && l > 0) ++ strlcat(data, p, min(strlen(data) + (int)l, COMMAND_LINE_SIZE)); + + /* +* CONFIG_CMDLINE is meant to be a default in case nothing else ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCHv2 8/8][lantiq] DGN3500 support
This requires all the preceding patches and finishes support for the DGN3500, also removing an obsolete file. Signed-off-by: Daniel Gimpelevich Index: target/linux/lantiq/base-files/lib/preinit/42_athfix === --- a/target/linux/lantiq/base-files/lib/preinit/42_athfix (revision 36739) +++ b/target/linux/lantiq/base-files/lib/preinit/42_athfix (working copy) @@ -1,19 +0,0 @@ -#!/bin/sh - -. /lib/functions/lantiq.sh - -init_atheeprom() { - local board=$(lantiq_board_name) - case $board in - "Netgear DGN3500B") - echo "- loading eeprom -" - dd if=/dev/mtd2 of=/sys/firmware/ath_eeprom bs=1k skip=60 count=4 - echo 0 > /sys/bus/pci/slots/\:00\:0e.0/power - sleep 1 - echo 1 > /sys/bus/pci/rescan - ;; - esac -} - -boot_hook_add preinit_essential init_atheeprom - Index: target/linux/lantiq/base-files/etc/uci-defaults/02_network === --- a/target/linux/lantiq/base-files/etc/uci-defaults/02_network (revision 36739) +++ b/target/linux/lantiq/base-files/etc/uci-defaults/02_network (working copy) @@ -72,6 +72,11 @@ VG3503J) ucidef_set_interface_lan 'eth0 eth1' ;; +DGN3500*) + ucidef_set_interface_lan "eth0.1" + ucidef_add_switch "switch0" "1" "1" + ucidef_add_switch_vlan "switch0" "1" "3 2 1 0 5t" + ;; esac [ -z "$(ls /lib/modules/`uname -r`/ltq_atm*)" ] || set_atm_wan "$vpi" "$vci" "$encaps" "$payload" Index: target/linux/lantiq/dts/DGN3500.dtsi === --- a/target/linux/lantiq/dts/DGN3500.dtsi (revision 36739) +++ b/target/linux/lantiq/dts/DGN3500.dtsi (working copy) @@ -2,7 +2,7 @@ / { chosen { - bootargs = "console=ttyLTQ0,115200 init=/etc/preinit"; + bootargs-append = "console=ttyLTQ0,115200 init=/etc/preinit"; }; memory@0 { @@ -112,6 +112,13 @@ }; }; + ath9k_eep { + compatible = "ath9k,eeprom"; + ath,eep-flash = <2 0xf000>; + ath,pci-slot = <14>; + ath,eep-swap; + }; + rtl8366rb { compatible = "rtl8366rb"; gpio-sda = <&gpio 35 0>; @@ -144,7 +151,7 @@ gpio-leds { compatible = "gpio-leds"; internet { - label = "inernet"; + label = "internet"; gpios = <&gpio 2 1>; }; dsl { @@ -158,7 +165,6 @@ power { label = "power"; gpios = <&gpio 34 1>; - default-state = "on"; }; power2 { label = "power2"; ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCHv2 5/8][lantiq] set ATM ESI
On Tue, 2013-05-28 at 14:21 +0200, John Crispin wrote: > esi is not a default package really. you are the first user in 6 years > that needs it. make it a board specific option. i dont mind it being > default for dgn3500 but other arv baords with 4mb flash dont need to > ship this. It should be board specific to any board capable of RFC1483, which is why I put it in the subtargets capable of that; Florian separated the package out of a metapackage precisely for the purpose of making it trivial enough in size to include anywhere. > this should be in the esi package and not the target folder This script is not a part of the esi utility; it's part of the ATM initialization. I will resubmit the rest of the patches, but so far I remain unconvinced that this one is incorrect, yet I am open to suggestions. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCHv3 1/5][lantiq] fix LED-handling oversights
This reassigns the PPPoE status to the LED that was intended to indicate it, rather than the DSL sync light. Signed-off-by: Daniel Gimpelevich Index: target/linux/lantiq/base-files/etc/uci-defaults/01_leds === --- a/target/linux/lantiq/base-files/etc/uci-defaults/01_leds (revision 36749) +++ b/target/linux/lantiq/base-files/etc/uci-defaults/01_leds (working copy) @@ -9,7 +9,7 @@ [ -e "/sys/class/leds/wifi" ] && ucidef_set_led_wlan "wifi" "wifi" "wifi" "phy0tpt" [ -e "/sys/class/leds/usb" ] && ucidef_set_led_usbdev "usb" "usb" "usb" "1-1" -[ -e "/sys/class/leds/dsl" ] &&ucidef_set_led_netdev "dsl" "dsl" "dsl" "pppoe-wan" +[ -e "/sys/class/leds/internet" ] && ucidef_set_led_netdev "internet" "internet" "internet" "pppoe-wan" for a in `ls /sys/class/leds/`; do grep -q "\[none\]" /sys/class/leds/$a/trigger ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCHv3 2/5][lantiq] postpone PCI and wifi init
This postpones the initialization of PCI and wifi until after the MTD initialization, so that calibration data may be loaded from there. Signed-off-by: Daniel Gimpelevich Index: target/linux/lantiq/patches-3.8/0037-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch === --- a/target/linux/lantiq/patches-3.8/0037-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch (revision 36749) +++ b/target/linux/lantiq/patches-3.8/0037-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch (working copy) @@ -176,7 +176,7 @@ +{ + return platform_driver_probe(&ath9k_eeprom_driver, of_ath9k_eeprom_probe); +} -+arch_initcall(of_ath9k_eeprom_init); ++late_initcall(of_ath9k_eeprom_init); + + +static int ath5k_pci_plat_dev_init(struct pci_dev *dev) @@ -256,7 +256,7 @@ +{ + return platform_driver_probe(&ath5k_eeprom_driver, of_ath5k_eeprom_probe); +} -+device_initcall(of_ath5k_eeprom_init); ++late_initcall(of_ath5k_eeprom_init); --- /dev/null +++ b/arch/mips/lantiq/xway/eth_mac.c @@ -0,0 +1,76 @@ @@ -544,3 +544,11 @@ priv->clk_ppe = clk_get(&pdev->dev, NULL); if (IS_ERR(priv->clk_ppe)) +--- a/arch/mips/pci/pci-lantiq.c b/arch/mips/pci/pci-lantiq.c +@@ -260,4 +260,4 @@ int __init pcibios_init(void) + return ret; + } + +-arch_initcall(pcibios_init); ++late_initcall(pcibios_init); ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCHv3 4/5][lantiq] enable retrieving kernel args from bootloader
This patch is a device tree enhancement that IMHO is worthy of mainline. It allows the bootloader's commandline to be preserved even when the device tree specifies one. Signed-off-by: Daniel Gimpelevich Index: target/linux/generic/patches-3.10/997-device_tree_cmdline.patch === --- a/target/linux/generic/patches-3.10/997-device_tree_cmdline.patch (revision 0) +++ b/target/linux/generic/patches-3.10/997-device_tree_cmdline.patch (revision 0) @@ -0,0 +1,12 @@ +--- a/drivers/of/fdt.c b/drivers/of/fdt.c +@@ -677,6 +677,9 @@ int __init early_init_dt_scan_chosen(uns + p = of_get_flat_dt_prop(node, "bootargs", &l); + if (p != NULL && l > 0) + strlcpy(data, p, min((int)l, COMMAND_LINE_SIZE)); ++ p = of_get_flat_dt_prop(node, "bootargs-append", &l); ++ if (p != NULL && l > 0) ++ strlcat(data, p, min(strlen(data) + (int)l, COMMAND_LINE_SIZE)); + + /* +* CONFIG_CMDLINE is meant to be a default in case nothing else Index: target/linux/generic/patches-3.8/997-device_tree_cmdline.patch === --- a/target/linux/generic/patches-3.8/997-device_tree_cmdline.patch (revision 0) +++ b/target/linux/generic/patches-3.8/997-device_tree_cmdline.patch (revision 0) @@ -0,0 +1,12 @@ +--- a/drivers/of/fdt.c b/drivers/of/fdt.c +@@ -677,6 +677,9 @@ int __init early_init_dt_scan_chosen(uns + p = of_get_flat_dt_prop(node, "bootargs", &l); + if (p != NULL && l > 0) + strlcpy(data, p, min((int)l, COMMAND_LINE_SIZE)); ++ p = of_get_flat_dt_prop(node, "bootargs-append", &l); ++ if (p != NULL && l > 0) ++ strlcat(data, p, min(strlen(data) + (int)l, COMMAND_LINE_SIZE)); + + /* +* CONFIG_CMDLINE is meant to be a default in case nothing else Index: target/linux/generic/patches-3.9/997-device_tree_cmdline.patch === --- a/target/linux/generic/patches-3.9/997-device_tree_cmdline.patch (revision 0) +++ b/target/linux/generic/patches-3.9/997-device_tree_cmdline.patch (revision 0) @@ -0,0 +1,12 @@ +--- a/drivers/of/fdt.c b/drivers/of/fdt.c +@@ -677,6 +677,9 @@ int __init early_init_dt_scan_chosen(uns + p = of_get_flat_dt_prop(node, "bootargs", &l); + if (p != NULL && l > 0) + strlcpy(data, p, min((int)l, COMMAND_LINE_SIZE)); ++ p = of_get_flat_dt_prop(node, "bootargs-append", &l); ++ if (p != NULL && l > 0) ++ strlcat(data, p, min(strlen(data) + (int)l, COMMAND_LINE_SIZE)); + + /* +* CONFIG_CMDLINE is meant to be a default in case nothing else ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCHv3 3/5][lantiq] wifi calibration from MTD
This patch enables retrieving the wifi calibration data from an MTD partition. It requires the previous patch. Signed-off-by: Daniel Gimpelevich --- a/target/linux/lantiq/patches-3.8/0037-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch 2013-05-28 13:41:59.558775919 -0700 +++ b/target/linux/lantiq/patches-3.8/0037-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch 2013-05-28 13:35:39.484891230 -0700 @@ -50,7 +50,7 @@ obj-$(CONFIG_XRX200_PHY_FW) += xrx200_phy_fw.o --- /dev/null +++ b/arch/mips/lantiq/xway/ath_eep.c -@@ -0,0 +1,206 @@ +@@ -0,0 +1,258 @@ +/* + * Copyright (C) 2011 Luca Olivetti + * Copyright (C) 2011 John Crispin @@ -69,7 +69,10 @@ +#include +#include +#include ++#include ++#include +#include ++#include + +extern int (*ltq_pci_plat_dev_init)(struct pci_dev *dev); +struct ath5k_platform_data ath5k_pdata; @@ -87,33 +90,57 @@ + +int __init of_ath9k_eeprom_probe(struct platform_device *pdev) +{ -+ struct device_node *np = pdev->dev.of_node; -+ struct resource *eep_res, *mac_res; ++ struct device_node *np = pdev->dev.of_node, *mtd_np; ++ struct resource *eep_res, *mac_res = NULL; + void __iomem *eep, *mac; + int mac_offset; + u32 mac_inc = 0, pci_slot = 0; + int i; + u16 *eepdata, sum, el; ++ struct mtd_info *the_mtd; ++ size_t flash_readlen; ++ const __be32 *list; ++ const char *part; ++ phandle phandle; ++ ++ if ((list = of_get_property(np, "ath,eep-flash", &i)) && i == 2 * ++ sizeof(*list) && (phandle = be32_to_cpup(list++)) && ++ (mtd_np = of_find_node_by_phandle(phandle)) && ((part = ++ of_get_property(mtd_np, "label", NULL)) || (part = ++ mtd_np->name)) && (the_mtd = get_mtd_device_nm(part)) ++ != ERR_PTR(-ENODEV)) { ++ i = mtd_read(the_mtd, be32_to_cpup(list), ++ sizeof(ath9k_pdata.eeprom_data), &flash_readlen, ++ (void *) ath9k_pdata.eeprom_data); ++ put_mtd_device(the_mtd); ++ if ((sizeof(ath9k_pdata.eeprom_data) != flash_readlen) || i) { ++ dev_err(&pdev->dev, "failed to load eeprom from mtd\n"); ++ return -ENODEV; ++ } ++ } else { ++ eep_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); ++ mac_res = platform_get_resource(pdev, IORESOURCE_MEM, 1); + -+ eep_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); -+ mac_res = platform_get_resource(pdev, IORESOURCE_MEM, 1); ++ if (!eep_res) { ++ dev_err(&pdev->dev, "failed to load eeprom address\n"); ++ return -ENODEV; ++ } ++ if (resource_size(eep_res) != ATH9K_PLAT_EEP_MAX_WORDS) { ++ dev_err(&pdev->dev, "eeprom has an invalid size\n"); ++ return -EINVAL; ++ } + -+ if (!eep_res) { -+ dev_err(&pdev->dev, "failed to load eeprom address\n"); -+ return -ENODEV; -+ } -+ if (resource_size(eep_res) != ATH9K_PLAT_EEP_MAX_WORDS) { -+ dev_err(&pdev->dev, "eeprom has an invalid size\n"); -+ return -EINVAL; ++ eep = ioremap(eep_res->start, resource_size(eep_res)); ++ memcpy_fromio(ath9k_pdata.eeprom_data, eep, ++ ATH9K_PLAT_EEP_MAX_WORDS); + } + -+ eep = ioremap(eep_res->start, resource_size(eep_res)); -+ memcpy_fromio(ath9k_pdata.eeprom_data, eep, ATH9K_PLAT_EEP_MAX_WORDS); -+ + if (of_find_property(np, "ath,eep-swap", NULL)) { + ath9k_pdata.endian_check = true; -+ + dev_info(&pdev->dev, "endian check enabled.\n"); ++ for (i = 0; i < ATH9K_PLAT_EEP_MAX_WORDS; i++) ++ ath9k_pdata.eeprom_data[i] = ++ swab16(ath9k_pdata.eeprom_data[i]); + } + + if (of_find_property(np, "ath,eep-csum", NULL)) { @@ -137,7 +164,9 @@ + } + mac = ioremap(mac_res->start, resource_size(mac_res)); + memcpy_fromio(athxk_eeprom_mac, mac, 6); -+ } else { ++ } else if (ltq_get_eth_mac()) ++ memcpy(athxk_eeprom_mac, ltq_get_eth_mac(), 6); ++ else { + dev_warn(&pdev->dev, "using random mac\n"); + random_ether_addr(athxk_eeprom_mac); + } @@ -187,31 +216,52 @@ + +int __init of_ath5k_eeprom_probe(struct platform_device *pdev) +{ -+ struct device_node *np = pdev->dev.of_node; -+ struct resource *eep_res, *mac_res; ++ struct device_node
[OpenWrt-Devel] [PATCHv3 5/5][lantiq] DGN3500 support
This requires all the preceding patches and finishes support for the DGN3500, also removing an obsolete file. Signed-off-by: Daniel Gimpelevich Index: target/linux/lantiq/base-files/lib/preinit/42_athfix === --- a/target/linux/lantiq/base-files/lib/preinit/42_athfix (revision 36749) +++ b/target/linux/lantiq/base-files/lib/preinit/42_athfix (working copy) @@ -1,19 +0,0 @@ -#!/bin/sh - -. /lib/functions/lantiq.sh - -init_atheeprom() { - local board=$(lantiq_board_name) - case $board in - "Netgear DGN3500B") - echo "- loading eeprom -" - dd if=/dev/mtd2 of=/sys/firmware/ath_eeprom bs=1k skip=60 count=4 - echo 0 > /sys/bus/pci/slots/\:00\:0e.0/power - sleep 1 - echo 1 > /sys/bus/pci/rescan - ;; - esac -} - -boot_hook_add preinit_essential init_atheeprom - Index: target/linux/lantiq/base-files/etc/uci-defaults/02_network === --- a/target/linux/lantiq/base-files/etc/uci-defaults/02_network (revision 36749) +++ b/target/linux/lantiq/base-files/etc/uci-defaults/02_network (working copy) @@ -72,6 +72,11 @@ VG3503J) ucidef_set_interface_lan 'eth0 eth1' ;; +DGN3500*) + ucidef_set_interface_lan "eth0.1" + ucidef_add_switch "switch0" "1" "1" + ucidef_add_switch_vlan "switch0" "1" "3 2 1 0 5t" + ;; esac [ -z "$(ls /lib/modules/`uname -r`/ltq_atm*)" ] || set_atm_wan "$vpi" "$vci" "$encaps" "$payload" Index: target/linux/lantiq/dts/DGN3500.dtsi === --- a/target/linux/lantiq/dts/DGN3500.dtsi (revision 36749) +++ b/target/linux/lantiq/dts/DGN3500.dtsi (working copy) @@ -2,7 +2,7 @@ / { chosen { - bootargs = "console=ttyLTQ0,115200 init=/etc/preinit"; + bootargs-append = "console=ttyLTQ0,115200 init=/etc/preinit"; }; memory@0 { @@ -99,7 +99,7 @@ read-only; }; - partition@2 { + ath9k_cal: partition@2 { reg = <0x2 0x1>; label = "calibration"; read-only; @@ -112,6 +112,13 @@ }; }; + ath9k_eep { + compatible = "ath9k,eeprom"; + ath,eep-flash = <&ath9k_cal 0xf000>; + ath,pci-slot = <14>; + ath,eep-swap; + }; + rtl8366rb { compatible = "rtl8366rb"; gpio-sda = <&gpio 35 0>; @@ -144,7 +151,7 @@ gpio-leds { compatible = "gpio-leds"; internet { - label = "inernet"; + label = "internet"; gpios = <&gpio 2 1>; }; dsl { @@ -158,7 +165,6 @@ power { label = "power"; gpios = <&gpio 34 1>; - default-state = "on"; }; power2 { label = "power2"; ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] Pending lantiq patches
Seems these got forgotten: http://patchwork.openwrt.org/project/openwrt/list/?submitter=235 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH][lantiq] Fixes to athxk EEPROM loading
On Mon, 2013-06-03 at 19:54 +0200, Álvaro Fernández Rojas wrote: > Use platform data array for storing ath5k EEPROM instead of creating another > one. > EEPROM size is 2048 words (2 bytes), so we must read 4096 bytes from flash. > No need to keep the checksum fix now that the EEPROM is loaded completely. > Add a manual eeprom swap for ath9k and keep the endian way. > Use mac-offset property retrieved from the DTS. The lantiq target is now on the 3.8 kernel, so I see no need to patch the patches-3.7 directory. Also, another reminder of the backlog: http://patchwork.openwrt.org/project/openwrt/list/?submitter=235 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH][lantiq] Fixes to athxk EEPROM loading
On Tue, 2013-06-04 at 13:39 +0200, Álvaro Fernández Rojas wrote: > Hello John, > > the patch doesn't fix the DGN3500 eeprom loading, but it's an > outstanding fix we need to make. > I think it's better if we fix what we currently have first and then > add Daniel's patches. > > Regards, > Álvaro > I already have an updated patch on top of your set waiting, but I am out of town at the moment and cannot test it until after my return on Sunday. If your device works properly with your patchset, I think it's safe to commit for now, and when I can test what I have, I can submit that. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] free Linksys E3200
On Tue, 2013-06-11 at 11:00 -0700, Warren Turkal wrote: > Hey openwrt devs, > > I clearly have no time to mess with the the E3200 I have. I have modded the > thing to have a rs232 db9 port. I'd like to offer it for free to anyone > that wants to work on OpenWRT on this device. Any takers? > > wt I'm not familiar with that model. How much RAM and flash, and which target? Any special features, e.g. USB? ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] free Linksys E3200
On Tue, 2013-06-11 at 20:52 +0200, Rafał Miłecki wrote: > 2013/6/11 Daniel Gimpelevich : > > On Tue, 2013-06-11 at 11:00 -0700, Warren Turkal wrote: > >> Hey openwrt devs, > >> > >> I clearly have no time to mess with the the E3200 I have. I have modded the > >> thing to have a rs232 db9 port. I'd like to offer it for free to anyone > >> that wants to work on OpenWRT on this device. Any takers? > >> > >> wt > > > > I'm not familiar with that model. How much RAM and flash, and which > > target? Any special features, e.g. USB? > > Have you tried something called Google? > http://wiki.openwrt.org/toh/linksys/e3200 > http://wikidevi.com/wiki/Linksys_E3200 Looks like a nice update of the WRT350Nv1 I've been meaning to get back to. Pity about the wifi. Wifi was the big issue with the WRT350Nv1 last I tried. I figure I should try it again first to see how trunk or at least AA will function with its 32MB RAM. If it's too tight now, I might be interested, but I no longer have a car, so you'd have to drop it off in that case. I'd strongly prefer one of the TP-Link models Felix has been working on instead, though. I might just order one of those if it comes to that; we'll see within the next few weeks. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH][lantiq] Add support for loading athxk eeproms through mtd
On Thu, 2013-06-13 at 19:18 +0200, Álvaro Fernández Rojas wrote: > This patch enables retrieving the wifi calibration data from an MTD partition. > Try to copy mac address from ethernet before generating a random one. > This fixes DGN3500 ath9k support. You forgot the correction to target/linux/lantiq/dts/DGN3500.dtsi ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH v2][lantiq] Add support for loading athxk eeproms through mtd
On Sat, 2013-06-15 at 18:07 +0200, Álvaro Fernández Rojas wrote: > This patch enables retrieving the wifi calibration data from an MTD partition. > Try to copy mac address from ethernet before generating a random one. > This fixes DGN3500 ath9k support. It should be "ath,eep-endian;" and not "ath,endian;" there. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCHv2 5/8][lantiq] set ATM ESI
I hate being a pest, but this should be added into the record: [Wed 2013-05-29 01:32:07 AM PDT] dape: will need to look into the esi thing [Wed 2013-05-29 01:32:16 AM PDT] the rest looks ok now ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] Initial support for AirLive AIR3GII
On Thu, 2012-11-22 at 15:08 +0100, Cezary Jackiewicz wrote: > AirLive AIR3GII is Ralink RT5350F based device with 100Mbps switch, USB port, > 4MB flash and 32MB ram. > > Works: ethernet (LAN & WAN), wps button, led, USB, sysupgrade > Does not work: wifi (chip RT5350), reset button > > [ 13.39] phy0 -> rt2800_init_eeprom: Error - Invalid RT chipset 0x5350 > detected. > [ 13.40] phy0 -> rt2x00lib_probe_dev: Error - Failed to allocate device. > > Other problem: LAN leds is reverse (lights when not cable connected and vice > versa) I saw "TL-MR3020" on this page, so I ordered it: http://www.rakuten.com/pr/product.aspx?sku=245965249 That turned out to be a misnomer. It's actually this device: http://www.newegg.com/Product/Product.aspx?Item=9SIA0U00H07470 Functionally, the hardware seems similar to the Air3GII, but I would like confirmation from someone who has one of those. This device has a red LED, a green LED, and a blue LED. When running an OpenWrt build for Air3GII, "airlive:green:mobile" (GPIO 9) is the blue LED and "rt2800pci-phy0::radio" is the red LED. The green one comes on when Ethernet is unplugged, and off when plugged back in. I can find no programmatic way to control it. The reset button is GPIO 10. GPIO's 7 and 8 do not appear to have any function. There is a toggle switch labeled "3G" and "DHCP" on the outside, but I have so far not found a way to detect its position programmatically. It has no other buttons, LED's, or switches. Can you please build current trunk for your device and tell me how it differs? Thanks. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] Fix arch-dependent bug in hso module
I've also submitted this upstream. Without it, the module causes an oops on rt5350. Signed-off-by: Daniel Gimpelevich --- .../patches-3.10/005-hso-stack-clobber-fix.patch | 56 .../patches-3.3/005-hso-stack-clobber-fix.patch| 56 .../patches-3.6/005-hso-stack-clobber-fix.patch| 56 .../patches-3.8/005-hso-stack-clobber-fix.patch| 56 .../patches-3.9/005-hso-stack-clobber-fix.patch| 56 5 files changed, 280 insertions(+) create mode 100644 target/linux/generic/patches-3.10/005-hso-stack-clobber-fix.patch create mode 100644 target/linux/generic/patches-3.3/005-hso-stack-clobber-fix.patch create mode 100644 target/linux/generic/patches-3.6/005-hso-stack-clobber-fix.patch create mode 100644 target/linux/generic/patches-3.8/005-hso-stack-clobber-fix.patch create mode 100644 target/linux/generic/patches-3.9/005-hso-stack-clobber-fix.patch diff --git a/target/linux/generic/patches-3.10/005-hso-stack-clobber-fix.patch b/target/linux/generic/patches-3.10/005-hso-stack-clobber-fix.patch new file mode 100644 index 000..3e0e7c1 --- /dev/null +++ b/target/linux/generic/patches-3.10/005-hso-stack-clobber-fix.patch @@ -0,0 +1,56 @@ +diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c +index cba1d46..86292e6 100644 +--- a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c +@@ -2816,13 +2816,16 @@ exit: + static int hso_get_config_data(struct usb_interface *interface) + { + struct usb_device *usbdev = interface_to_usbdev(interface); +- u8 config_data[17]; ++ u8 *config_data = kmalloc(17, GFP_KERNEL); + u32 if_num = interface->altsetting->desc.bInterfaceNumber; + s32 result; + ++ if (!config_data) ++ return -ENOMEM; + if (usb_control_msg(usbdev, usb_rcvctrlpipe(usbdev, 0), + 0x86, 0xC0, 0, 0, config_data, 17, + USB_CTRL_SET_TIMEOUT) != 0x11) { ++ kfree(config_data); + return -EIO; + } + +@@ -2873,6 +2876,7 @@ static int hso_get_config_data(struct usb_interface *interface) + if (config_data[16] & 0x1) + result |= HSO_INFO_CRC_BUG; + ++ kfree(config_data); + return result; + } + +@@ -2886,6 +2890,11 @@ static int hso_probe(struct usb_interface *interface, + struct hso_shared_int *shared_int; + struct hso_device *tmp_dev = NULL; + ++ if (interface->cur_altsetting->desc.bInterfaceClass != 0xFF) { ++ dev_err(&interface->dev, "Not our interface\n"); ++ return -ENODEV; ++ } ++ + if_num = interface->altsetting->desc.bInterfaceNumber; + + /* Get the interface/port specification from either driver_info or from +@@ -2895,10 +2904,6 @@ static int hso_probe(struct usb_interface *interface, + else + port_spec = hso_get_config_data(interface); + +- if (interface->cur_altsetting->desc.bInterfaceClass != 0xFF) { +- dev_err(&interface->dev, "Not our interface\n"); +- return -ENODEV; +- } + /* Check if we need to switch to alt interfaces prior to port +* configuration */ + if (interface->num_altsetting > 1) +-- +1.7.9.5 + diff --git a/target/linux/generic/patches-3.3/005-hso-stack-clobber-fix.patch b/target/linux/generic/patches-3.3/005-hso-stack-clobber-fix.patch new file mode 100644 index 000..3e0e7c1 --- /dev/null +++ b/target/linux/generic/patches-3.3/005-hso-stack-clobber-fix.patch @@ -0,0 +1,56 @@ +diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c +index cba1d46..86292e6 100644 +--- a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c +@@ -2816,13 +2816,16 @@ exit: + static int hso_get_config_data(struct usb_interface *interface) + { + struct usb_device *usbdev = interface_to_usbdev(interface); +- u8 config_data[17]; ++ u8 *config_data = kmalloc(17, GFP_KERNEL); + u32 if_num = interface->altsetting->desc.bInterfaceNumber; + s32 result; + ++ if (!config_data) ++ return -ENOMEM; + if (usb_control_msg(usbdev, usb_rcvctrlpipe(usbdev, 0), + 0x86, 0xC0, 0, 0, config_data, 17, + USB_CTRL_SET_TIMEOUT) != 0x11) { ++ kfree(config_data); + return -EIO; + } + +@@ -2873,6 +2876,7 @@ static int hso_get_config_data(struct usb_interface *interface) + if (config_data[16] & 0x1) + result |= HSO_INFO_CRC_BUG; + ++ kfree(config_data); + return result; + } + +@@ -2886,6 +2890,11 @@ static int hso_probe(struct usb_interface *interface, + struct hso_shared_int *shared_int; + struct hso_device *tmp_dev = NULL; + ++ if (interface->cur_altsetting->desc.bInterfaceClass != 0xFF) { ++
Re: [OpenWrt-Devel] [PATCH] Fix arch-dependent bug in hso module
On Tue, 2013-08-20 at 01:30 +0200, Luka Perkov wrote: > Hi Daniel, > > Please update your patches with better commit message. It should also > contain links to the mailing list and/or patchwork where the patch was > sent (if possible of course). > > Also, patches inside generic should have very detailed description. This > is not the case for many patches at the moment but I plan to work on > this in the (near) future. > > Take a look at the links bellow for an example: > > https://dev.openwrt.org/changeset/37808 > https://dev.openwrt.org/browser/trunk/target/linux/generic/patches-3.10/470-mtd_m25p80_add_pm25_flash_support.patch > > Luka This could actually be taken straight from my upstream submission: https://patchwork.kernel.org/patch/2846700/ ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] Fix arch-dependent bug in hso module
On Tue, 2013-08-20 at 02:30 +0200, Luka Perkov wrote: > Or you could resend the patch. > > Luka I think I'll see what upstream does before I do that. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v2] Fix arch-dependent bug in hso module
Currently, the module causes an oops at least on rt5350. These patches have been accepted upstream at: git://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git Signed-off-by: Daniel Gimpelevich --- .../007-hso-Earlier-catch-of-error-condition.patch | 45 + ...ix-stack-corruption-on-some-architectures.patch | 53 .../007-hso-Earlier-catch-of-error-condition.patch | 45 + ...ix-stack-corruption-on-some-architectures.patch | 53 .../007-hso-Earlier-catch-of-error-condition.patch | 45 + ...ix-stack-corruption-on-some-architectures.patch | 53 .../007-hso-Earlier-catch-of-error-condition.patch | 45 + ...ix-stack-corruption-on-some-architectures.patch | 53 .../007-hso-Earlier-catch-of-error-condition.patch | 45 + ...ix-stack-corruption-on-some-architectures.patch | 53 10 files changed, 490 insertions(+) create mode 100644 target/linux/generic/patches-3.10/007-hso-Earlier-catch-of-error-condition.patch create mode 100644 target/linux/generic/patches-3.10/008-hso-Fix-stack-corruption-on-some-architectures.patch create mode 100644 target/linux/generic/patches-3.3/007-hso-Earlier-catch-of-error-condition.patch create mode 100644 target/linux/generic/patches-3.3/008-hso-Fix-stack-corruption-on-some-architectures.patch create mode 100644 target/linux/generic/patches-3.6/007-hso-Earlier-catch-of-error-condition.patch create mode 100644 target/linux/generic/patches-3.6/008-hso-Fix-stack-corruption-on-some-architectures.patch create mode 100644 target/linux/generic/patches-3.8/007-hso-Earlier-catch-of-error-condition.patch create mode 100644 target/linux/generic/patches-3.8/008-hso-Fix-stack-corruption-on-some-architectures.patch create mode 100644 target/linux/generic/patches-3.9/007-hso-Earlier-catch-of-error-condition.patch create mode 100644 target/linux/generic/patches-3.9/008-hso-Fix-stack-corruption-on-some-architectures.patch diff --git a/target/linux/generic/patches-3.10/007-hso-Earlier-catch-of-error-condition.patch b/target/linux/generic/patches-3.10/007-hso-Earlier-catch-of-error-condition.patch new file mode 100644 index 000..9b31caf --- /dev/null +++ b/target/linux/generic/patches-3.10/007-hso-Earlier-catch-of-error-condition.patch @@ -0,0 +1,45 @@ +From 35e57e1b49a351aa804dab6010cd46ae6112a541 Mon Sep 17 00:00:00 2001 +From: Daniel Gimpelevich +Date: Wed, 21 Aug 2013 01:43:07 -0700 +Subject: [PATCH 1/2] hso: Earlier catch of error condition + +There is no need to get an interface specification if we know it's the +wrong one. + +Signed-off-by: Daniel Gimpelevich +Acked-by: Greg Kroah-Hartman +Signed-off-by: David S. Miller +--- + drivers/net/usb/hso.c |9 + + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c +index cba1d46..5fb36ed 100644 +--- a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c +@@ -2886,6 +2886,11 @@ static int hso_probe(struct usb_interface *interface, + struct hso_shared_int *shared_int; + struct hso_device *tmp_dev = NULL; + ++ if (interface->cur_altsetting->desc.bInterfaceClass != 0xFF) { ++ dev_err(&interface->dev, "Not our interface\n"); ++ return -ENODEV; ++ } ++ + if_num = interface->altsetting->desc.bInterfaceNumber; + + /* Get the interface/port specification from either driver_info or from +@@ -2895,10 +2900,6 @@ static int hso_probe(struct usb_interface *interface, + else + port_spec = hso_get_config_data(interface); + +- if (interface->cur_altsetting->desc.bInterfaceClass != 0xFF) { +- dev_err(&interface->dev, "Not our interface\n"); +- return -ENODEV; +- } + /* Check if we need to switch to alt interfaces prior to port +* configuration */ + if (interface->num_altsetting > 1) +-- +1.7.9.5 + diff --git a/target/linux/generic/patches-3.10/008-hso-Fix-stack-corruption-on-some-architectures.patch b/target/linux/generic/patches-3.10/008-hso-Fix-stack-corruption-on-some-architectures.patch new file mode 100644 index 000..c6da3c1 --- /dev/null +++ b/target/linux/generic/patches-3.10/008-hso-Fix-stack-corruption-on-some-architectures.patch @@ -0,0 +1,53 @@ +From e75dc677ff8d06ffa61bef6fee436227ae5440c6 Mon Sep 17 00:00:00 2001 +From: Daniel Gimpelevich +Date: Wed, 21 Aug 2013 01:43:19 -0700 +Subject: [PATCH 2/2] hso: Fix stack corruption on some architectures + +As Sergei Shtylyov explained in the #mipslinux IRC channel: +[Mon 2013-08-19 12:28:21 PM PDT] guys, are you sure it's not "DMA off stack" case? +[Mon 2013-08-19 12:28:35 PM PDT] it's a known stack corruptor on non-coherent arches +[Mon 2013-08-19 12:31:48 PM PDT] headless: for
[OpenWrt-Devel] [PATCH 1/2] mtd_get_mac_ascii bugfix
The mtd_get_mac_ascii utility function was broken. This fixes it. Signed-off-by: Daniel Gimpelevich Index: package/base-files/files/lib/functions.sh === --- a/package/base-files/files/lib/functions.sh (revision 38679) +++ b/package/base-files/files/lib/functions.sh (working copy) @@ -248,15 +248,13 @@ local part local mac_dirty - . /lib/functions.sh - part=$(find_mtd_part "$mtdname") if [ -z "$part" ]; then echo "mtd_get_mac_ascii: partition $mtdname not found!" >&2 return fi - mac_dirty=$(strings "$part" | sed -n 's/'"$key"'=//p') + mac_dirty=$(strings "$part" | sed -n 's/^'"$key"'=//p') # "canonicalize" mac printf "%02x:%02x:%02x:%02x:%02x:%02x" 0x${mac_dirty//:/ 0x} } ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/2] lantiq: DGN3500 fixups
Just fixing up a few things for the Netgear DGN3500. Signed-off-by: Daniel Gimpelevich Index: target/linux/lantiq/dts/DGN3500.dtsi === --- a/target/linux/lantiq/dts/DGN3500.dtsi (revision 38679) +++ b/target/linux/lantiq/dts/DGN3500.dtsi (working copy) @@ -2,7 +2,7 @@ / { chosen { - bootargs-append = "console=ttyLTQ0,115200 init=/etc/preinit"; + bootargs = "console=ttyLTQ0,115200 init=/etc/preinit"; }; memory@0 { Index: target/linux/lantiq/base-files/etc/uci-defaults/02_network === --- a/target/linux/lantiq/base-files/etc/uci-defaults/02_network (revision 38679) +++ b/target/linux/lantiq/base-files/etc/uci-defaults/02_network (working copy) @@ -78,6 +78,8 @@ ;; DGN3500*) + lan_mac=$(mtd_get_mac_ascii uboot-env ethaddr) + wan_mac=$(macaddr_add "$lan_mac" 1) ucidef_set_interface_lan "eth0.1" ucidef_add_switch "switch0" "1" "1" ucidef_add_switch_vlan "switch0" "1" "3 2 1 0 5t" ___ 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] mtd_get_mac_ascii bugfix
On Fri, 2013-11-08 at 13:24 +0100, Gabor Juhos wrote: > 2013.11.08. 13:20 keltezéssel, Gabor Juhos írta: > > 2013.11.07. 17:23 keltezéssel, Daniel Gimpelevich írta: > >> The mtd_get_mac_ascii utility function was broken. This fixes it. > >> > >> Signed-off-by: Daniel Gimpelevich > > Applied. > > Thanks, > Gabor You changed it from using printf to using tr, which might not be good if colons are missing. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] atheros: /etc/diag.sh for FON2201
In Backfire, the power LED worked normally on the Fonera+, but in Barrier Breaker, it's unused. I can't seem to find a way to differentiate among hardware in the atheros target, so I'm submitting a "FIXME" patch to be further patched with info from other devices. Signed-off-by: Daniel Gimpelevich --- /dev/null 2013-11-09 12:36:28.330833697 -0800 +++ b/target/linux/atheros/base-files/etc/diag.sh 2013-11-10 07:34:45.372612754 -0800 @@ -0,0 +1,27 @@ +#!/bin/sh +# Copyright (C) 2013 OpenWrt.org + +. /lib/functions/leds.sh + +set_state() { + status_led="gpio4" + + [ -d /sys/class/leds/gpio4/ ] && + [ -d /sys/class/leds/gpio7/ ] && { + + case "$1" in + preinit) + led_timer "gpio7" 200 200 + status_led_off + ;; + failsafe) + status_led_blink_failsafe + led_off "gpio7" + ;; + done) + status_led_on + led_off "gpio7" + ;; + esac + } +} ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] lantiq: fix ath9k eeprom loading once and for all
Rather than break IRQ routing by delaying PCI initialization until the calibration data can be loaded, this patch explicitly initializes the ath9k device at a later stage, without ill effects. Gratuitous whitespace removal included, with a quilt refresh. Signed-off-by: Daniel Gimpelevich Index: target/linux/lantiq/patches-3.10/0010-MIPS-lantiq-wifi-and-ethernet-eeprom-handling.patch === --- a/target/linux/lantiq/patches-3.10/0010-MIPS-lantiq-wifi-and-ethernet-eeprom-handling.patch (revision 38842) +++ b/target/linux/lantiq/patches-3.10/0010-MIPS-lantiq-wifi-and-ethernet-eeprom-handling.patch (working copy) @@ -1,24 +1,7 @@ -From 8c19ced548538d964dcfb83bdf9ea9e8fbb7bdb1 Mon Sep 17 00:00:00 2001 -From: John Crispin -Date: Wed, 13 Mar 2013 10:02:58 +0100 -Subject: [PATCH 10/34] MIPS: lantiq: wifi and ethernet eeprom handling - -Signed-off-by: John Crispin - arch/mips/include/asm/mach-lantiq/pci-ath-fixup.h |6 + - .../mips/include/asm/mach-lantiq/xway/lantiq_soc.h |3 + - arch/mips/lantiq/xway/Makefile |2 + - arch/mips/lantiq/xway/ath_eep.c| 237 - arch/mips/lantiq/xway/pci-ath-fixup.c | 109 + - arch/mips/lantiq/xway/rt_eep.c | 60 + - 6 files changed, 417 insertions(+) - create mode 100644 arch/mips/include/asm/mach-lantiq/pci-ath-fixup.h - create mode 100644 arch/mips/lantiq/xway/ath_eep.c - create mode 100644 arch/mips/lantiq/xway/pci-ath-fixup.c - create mode 100644 arch/mips/lantiq/xway/rt_eep.c - /dev/null -+++ b/arch/mips/include/asm/mach-lantiq/pci-ath-fixup.h +Index: linux-3.10.18/arch/mips/include/asm/mach-lantiq/pci-ath-fixup.h +=== +--- /dev/null 1970-01-01 00:00:00.0 + linux-3.10.18/arch/mips/include/asm/mach-lantiq/pci-ath-fixup.h 2013-11-17 08:14:22.16521 -0800 @@ -0,0 +1,6 @@ +#ifndef _PCI_ATH_FIXUP +#define _PCI_ATH_FIXUP @@ -26,9 +9,11 @@ +void ltq_pci_ath_fixup(unsigned slot, u16 *cal_data) __init; + +#endif /* _PCI_ATH_FIXUP */ a/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h -+++ b/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h -@@ -90,5 +90,8 @@ int xrx200_gphy_boot(struct device *dev, +Index: linux-3.10.18/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h +=== +--- linux-3.10.18.orig/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h 2013-11-17 08:14:08.049485517 -0800 linux-3.10.18/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h 2013-11-17 08:14:22.16521 -0800 +@@ -90,5 +90,8 @@ extern void ltq_pmu_enable(unsigned int module); extern void ltq_pmu_disable(unsigned int module); @@ -37,18 +22,22 @@ + #endif /* CONFIG_SOC_TYPE_XWAY */ #endif /* _LTQ_XWAY_H__ */ a/arch/mips/lantiq/xway/Makefile -+++ b/arch/mips/lantiq/xway/Makefile -@@ -2,4 +2,6 @@ obj-y := prom.o sysctrl.o clk.o reset.o +Index: linux-3.10.18/arch/mips/lantiq/xway/Makefile +=== +--- linux-3.10.18.orig/arch/mips/lantiq/xway/Makefile 2013-11-17 08:14:08.009485318 -0800 linux-3.10.18/arch/mips/lantiq/xway/Makefile 2013-11-17 08:56:44.426161908 -0800 +@@ -2,4 +2,6 @@ obj-y += vmmc.o +obj-$(CONFIG_PCI) += ath_eep.o rt_eep.o pci-ath-fixup.o + obj-$(CONFIG_XRX200_PHY_FW) += xrx200_phy_fw.o /dev/null -+++ b/arch/mips/lantiq/xway/ath_eep.c -@@ -0,0 +1,250 @@ +Index: linux-3.10.18/arch/mips/lantiq/xway/ath_eep.c +=== +--- /dev/null 1970-01-01 00:00:00.0 + linux-3.10.18/arch/mips/lantiq/xway/ath_eep.c 2013-11-17 08:57:12.438300807 -0800 +@@ -0,0 +1,256 @@ +/* + * Copyright (C) 2011 Luca Olivetti + * Copyright (C) 2011 John Crispin @@ -87,6 +76,7 @@ + return 0; +} + ++static int ath9k_eep_load; +int __init of_ath9k_eeprom_probe(struct platform_device *pdev) +{ + struct device_node *np = pdev->dev.of_node, *mtd_np; @@ -163,6 +153,12 @@ + if (!of_property_read_u32(np, "ath,pci-slot", &pci_slot)) { + ltq_pci_ath_fixup(pci_slot, ath9k_pdata.eeprom_data); + dev_info(&pdev->dev, "pci slot: %u\n", pci_slot); ++ if (ath9k_eep_load) { ++ struct pci_dev *d = NULL; ++ while ((d = pci_get_device(PCI_VENDOR_ID_ATHEROS, ++ PCI_ANY_ID, d)) != NULL) ++ pci_fixup_device(pci_fixup_early, d); ++ } + } + + dev_info(&pdev->dev, "loaded ath9k eeprom\n"); @@ -183,20 +179,19 @@ + }, +}; + -+static int ath9k_eep_loaded; +static int __init of_ath9k_eeprom_init(void) +{ + int ret = platform_driver
Re: [OpenWrt-Devel] [PATCH] lantiq: fix ath9k eeprom loading once and for all
On Sun, 2013-11-17 at 18:52 +0100, John Crispin wrote: > Hi, > > rather than fix up the patches, could you send a patch that sits on > top > of the existing ones that i can fold myself please ? > > John OK, here is a theoretical file that would sit in target/linux/lantiq/patches-3.10, minus the whitespace fix, which really should be made in the existing patch, otherwise quilt complains. --- a/arch/mips/lantiq/xway/ath_eep.c +++ b/arch/mips/lantiq/xway/ath_eep.c @@ -36,6 +36,7 @@ return 0; } +static int ath9k_eep_load; int __init of_ath9k_eeprom_probe(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node, *mtd_np; @@ -112,6 +113,12 @@ if (!of_property_read_u32(np, "ath,pci-slot", &pci_slot)) { ltq_pci_ath_fixup(pci_slot, ath9k_pdata.eeprom_data); dev_info(&pdev->dev, "pci slot: %u\n", pci_slot); + if (ath9k_eep_load) { + struct pci_dev *d = NULL; + while ((d = pci_get_device(PCI_VENDOR_ID_ATHEROS, + PCI_ANY_ID, d)) != NULL) + pci_fixup_device(pci_fixup_early, d); + } } dev_info(&pdev->dev, "loaded ath9k eeprom\n"); @@ -132,20 +139,19 @@ }, }; -static int ath9k_eep_loaded; static int __init of_ath9k_eeprom_init(void) { int ret = platform_driver_probe(&ath9k_eeprom_driver, of_ath9k_eeprom_probe); - if (!ret) - ath9k_eep_loaded = 1; + if (ret) + ath9k_eep_load = 1; return ret; } static int __init of_ath9k_eeprom_init_late(void) { - if (ath9k_eep_loaded) + if (!ath9k_eep_load) return 0; return platform_driver_probe(&ath9k_eeprom_driver, of_ath9k_eeprom_probe); } @@ -247,4 +253,4 @@ { return platform_driver_probe(&ath5k_eeprom_driver, of_ath5k_eeprom_probe); } -device_initcall(of_ath5k_eeprom_init); +subsys_initcall(of_ath5k_eeprom_init); ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] lantiq and Netgear fixes/enhancements
This corrects a few oversights in mach-netgear.c, adds a diag.sh with per-board conditionals, in line with the uci-defaults "leds" file, fixes the Netgear eth0 MAC address detection, and provides a mechanism for the DSL driver to have a preset MAC address. Signed-off-by: Daniel Gimpelevich Index: target/linux/lantiq/image/Makefile === --- target/linux/lantiq/image/Makefile (revision 34398) +++ target/linux/lantiq/image/Makefile (working copy) @@ -154,7 +154,7 @@ ifeq ($(CONFIG_TARGET_lantiq_ar9),y) Image/BuildKernel/Profile/WBMR=$(call Image/BuildKernel/Template,WBMR,$(xway_cmdline)) -Image/BuildKernel/Profile/DGN3500B=$(call Image/BuildKernel/Template,DGN3500B,$(xway_cmdline)) +Image/BuildKernel/Profile/DGN3500B=$(call Image/BuildKernel/Template,DGN3500B,$(sx76x_cmdline)) Image/BuildKernel/Profile/P2601HNFX=$(call Image/BuildKernel/Template,P2601HNFX,$(xway_cmdline)) Image/BuildKernel/Profile/H201L=$(call Image/BuildKernel/Template,H201L,$(xway_cmdline)) Image/BuildKernel/Profile/FRITZ7320=$(call Image/BuildKernelEVA/Template,FRITZ7320,$(xway_cmdline)) Index: target/linux/lantiq/patches-3.3/0026-cmdline.patch === --- target/linux/lantiq/patches-3.3/0026-cmdline.patch (revision 0) +++ target/linux/lantiq/patches-3.3/0026-cmdline.patch (revision 0) @@ -0,0 +1,10 @@ +--- a/init/main.c b/init/main.c +@@ -123,6 +123,7 @@ + char __initdata boot_command_line[COMMAND_LINE_SIZE]; + /* Untouched saved command line (eg. for /proc) */ + char *saved_command_line; ++EXPORT_SYMBOL(saved_command_line); + /* Command line for parameter parsing */ + static char *static_command_line; + Index: target/linux/lantiq/files-3.3/arch/mips/lantiq/xway/mach-netgear.c === --- target/linux/lantiq/files-3.3/arch/mips/lantiq/xway/mach-netgear.c (revision 34398) +++ target/linux/lantiq/files-3.3/arch/mips/lantiq/xway/mach-netgear.c (working copy) @@ -77,8 +77,8 @@ static struct gpio_led dgn3500_gpio_leds[] __initdata = { - { .name = "soc:green:power", .gpio = 34, .active_low = 1, }, - { .name = "soc:red:power", .gpio = 39, .active_low = 1, }, + { .name = "soc:green:power", .gpio = 34, .active_low = 1, .default_trigger = "default-on" }, + { .name = "soc:red:power", .gpio = 39, .active_low = 1, .default_trigger = "default-on" }, { .name = "soc:orange:wlan", .gpio = 51, .active_low = 1, }, { .name = "soc:green:wps", .gpio = 52, .active_low = 1, }, { .name = "soc:green:usb", .gpio = 22, .active_low = 1, }, @@ -91,7 +91,7 @@ { .desc = "wps", .type = EV_KEY, - .code = BTN_0, + .code = BTN_2, .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL, .gpio = 54, .active_low = 1, @@ -101,6 +101,14 @@ .type = EV_KEY, .code = BTN_1, .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL, + .gpio = 53, + .active_low = 1, + }, + { + .desc = "rfkill", + .type = EV_KEY, + .code = BTN_0, + .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL, .gpio = 36, .active_low = 1, }, @@ -253,5 +261,5 @@ MIPS_MACHINE(LANTIQ_MACH_DGN3500B, "DGN3500B", - "Netgear DGN3500B", + "DGN3500B - Netgear DGN3500 or DGN3500B", dgn3500_init); Index: target/linux/lantiq/base-files/lib/preinit/42_athfix === --- target/linux/lantiq/base-files/lib/preinit/42_athfix (revision 34398) +++ target/linux/lantiq/base-files/lib/preinit/42_athfix (working copy) @@ -5,7 +5,7 @@ init_atheeprom() { local board=$(lantiq_board_name) case $board in - "Netgear DGN3500B") + DGN3500B) echo "- loading eeprom -" dd if=/dev/mtd2 of=/sys/firmware/ath_eeprom bs=1k skip=60 count=4 echo 0 > /sys/bus/pci/slots/\:00\:0e.0/power Index: target/linux/lantiq/base-files/etc/diag.sh === --- target/linux/lantiq/base-files/etc/diag.sh (revision 0) +++ target/linux/lantiq/base-files/etc/diag.sh (revision 0) @@ -0,0 +1,48 @@ +#!/bin/sh +# Copyright (C) 2006-2012 OpenWrt.org + +# This setup gives us 4.5 distinguishable states: +# +# Solid YELLOW: Bootloader running, or kernel hung (timer task stalled) +# Solid RED:preinit +# 5Hz blink:failsafe +# Solid GREEN: normal operation + +. /lib/lantiq.sh + +set_state() { +board=$(lantiq_board_name) +case "$1" in +preinit) +{ +case "$board" in +DGN3500B) +echo none >/sys/class/leds/soc\:green\:power/trigger +
Re: [OpenWrt-Devel] [PATCH] lantiq and Netgear fixes/enhancements
On Wed, 2012-11-28 at 07:53 +0100, John Crispin wrote: > On 28/11/12 02:47, Daniel Gimpelevich wrote: > > This corrects a few oversights in mach-netgear.c, adds a diag.sh with > > per-board conditionals, in line with the uci-defaults "leds" file, fixes > > the Netgear eth0 MAC address detection, and provides a mechanism for the > > DSL driver to have a preset MAC address. > > > > Signed-off-by: Daniel Gimpelevich > > > > > > > > ___ > > openwrt-devel mailing list > > openwrt-devel@lists.openwrt.org > > https://lists.openwrt.org/mailman/listinfo/openwrt-devel > > > please send the patch inline Whoops. Signed-off-by: Daniel Gimpelevich Index: target/linux/lantiq/image/Makefile === --- target/linux/lantiq/image/Makefile (revision 34398) +++ target/linux/lantiq/image/Makefile (working copy) @@ -154,7 +154,7 @@ ifeq ($(CONFIG_TARGET_lantiq_ar9),y) Image/BuildKernel/Profile/WBMR=$(call Image/BuildKernel/Template,WBMR,$(xway_cmdline)) -Image/BuildKernel/Profile/DGN3500B=$(call Image/BuildKernel/Template,DGN3500B,$(xway_cmdline)) +Image/BuildKernel/Profile/DGN3500B=$(call Image/BuildKernel/Template,DGN3500B,$(sx76x_cmdline)) Image/BuildKernel/Profile/P2601HNFX=$(call Image/BuildKernel/Template,P2601HNFX,$(xway_cmdline)) Image/BuildKernel/Profile/H201L=$(call Image/BuildKernel/Template,H201L,$(xway_cmdline)) Image/BuildKernel/Profile/FRITZ7320=$(call Image/BuildKernelEVA/Template,FRITZ7320,$(xway_cmdline)) Index: target/linux/lantiq/patches-3.3/0026-cmdline.patch === --- target/linux/lantiq/patches-3.3/0026-cmdline.patch (revision 0) +++ target/linux/lantiq/patches-3.3/0026-cmdline.patch (revision 0) @@ -0,0 +1,10 @@ +--- a/init/main.c b/init/main.c +@@ -123,6 +123,7 @@ + char __initdata boot_command_line[COMMAND_LINE_SIZE]; + /* Untouched saved command line (eg. for /proc) */ + char *saved_command_line; ++EXPORT_SYMBOL(saved_command_line); + /* Command line for parameter parsing */ + static char *static_command_line; + Index: target/linux/lantiq/files-3.3/arch/mips/lantiq/xway/mach-netgear.c === --- target/linux/lantiq/files-3.3/arch/mips/lantiq/xway/mach-netgear.c (revision 34398) +++ target/linux/lantiq/files-3.3/arch/mips/lantiq/xway/mach-netgear.c (working copy) @@ -77,8 +77,8 @@ static struct gpio_led dgn3500_gpio_leds[] __initdata = { - { .name = "soc:green:power", .gpio = 34, .active_low = 1, }, - { .name = "soc:red:power", .gpio = 39, .active_low = 1, }, + { .name = "soc:green:power", .gpio = 34, .active_low = 1, .default_trigger = "default-on" }, + { .name = "soc:red:power", .gpio = 39, .active_low = 1, .default_trigger = "default-on" }, { .name = "soc:orange:wlan", .gpio = 51, .active_low = 1, }, { .name = "soc:green:wps", .gpio = 52, .active_low = 1, }, { .name = "soc:green:usb", .gpio = 22, .active_low = 1, }, @@ -91,7 +91,7 @@ { .desc = "wps", .type = EV_KEY, - .code = BTN_0, + .code = BTN_2, .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL, .gpio = 54, .active_low = 1, @@ -101,6 +101,14 @@ .type = EV_KEY, .code = BTN_1, .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL, + .gpio = 53, + .active_low = 1, + }, + { + .desc = "rfkill", + .type = EV_KEY, + .code = BTN_0, + .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL, .gpio = 36, .active_low = 1, }, @@ -253,5 +261,5 @@ MIPS_MACHINE(LANTIQ_MACH_DGN3500B, "DGN3500B", -"Netgear DGN3500B", +"DGN3500B - Netgear DGN3500 or DGN3500B", dgn3500_init); Index: target/linux/lantiq/base-files/lib/preinit/42_athfix === --- target/linux/lantiq/base-files/lib/preinit/42_athfix(revision 34398) +++ target/linux/lantiq/base-files/lib/preinit/42_athfix(working copy) @@ -5,7 +5,7 @@ init_atheeprom() { local board=$(lantiq_board_name) case $board in - "Netgear DGN3500B") + DGN3500B) echo "- loading eeprom -" dd if=/dev/mtd2 of=/sys/firmware/ath_eeprom bs=1k skip=60 count=4 echo 0 > /sys/bus/pci/slots/\:00\:0e.0/power Index: target/linux/lantiq/base-files/etc/diag.sh ==
Re: [OpenWrt-Devel] [PATCH] lantiq and Netgear fixes/enhancements
On Wed, 2012-11-28 at 10:09 +, Conor O'Gorman wrote: > This will affect all lantiq atm boards? I specify an ethernet MAC via > the command line, but I don't necessarily want it in the atm. > > > Conor > The existing code leaves the MAC at all zeros. Do you require that instead of the MAC you specify for Ethernet? The latinq ATM driver provides no way to have it be anything other than zeros at the driver level. None. At least on the Netgear, the stock firmware increments the Ethernet address to get the ATM one, and it receives the Ethernet address and no other address on the kernel command line. I will soon be looking at the Gigaset for comparison, but I expect it likely does the same thing. It's perfectly reasonable not to want an increment of the supplied Ethernet address in the ATM, but that implies you have some other MAC you'd like it to have instead. If you can reveal where this MAC comes from and how you'd like to supply it to the driver, that would be a first step to de-uglifying this dirty hack. It really boggles my mind that this has never been discussed before. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] lantiq and Netgear fixes/enhancements
On Wed, 2012-11-28 at 19:35 +, Conor O'Gorman wrote: > Hi Daniel, > > Thank you for consider my comments. > > There are a couple of points I'd make. AFAIK this is only needed for > ethernet bridging over atm. I am not familiar with an ethernet style > mac > being used in straight atm connections. As far as I can see the field > you are setting is only pulled out by the br2684 driver, which is > providing the ethernet veneer. > > I do see that one or two atm drivers get a serial number from their > hardware, and a few more pull up an eeprom value. > > Would some adjustment in br2684 be more appropriate? > > I have no problem with a hack, if it is recognised as such, with some > intention to improve it later. > > Concerning what MAC to apply, yes some variation on the serial number > is > appropriate. I have in the past used the top bits of the available > space, rather than a simple increment, as it avoids bumping into a > similar unit. > > Conor > The br2684 driver seems to expect that the MAC is already on the device before a virtual circuit is created, but it seems to leave the mechanism for doing so to the ATM driver. The only other working ATM driver in OpenWrt is for AR7, and that has always had the MAC set in the driver itself. If you know of a use case within OpenWrt but without br2684 for the lantiq ATM driver specifically, I'd like to hear it. I don't really like inserting code like this into a place like that, but the only alternative I could think of would be even worse: creating a sysfs node in the ATM driver to receive a list of MAC addresses (since the driver can handle more than one interface) from userspace before any virtual circuit is created. RFC. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] lantiq and Netgear fixes/enhancements
On Thu, 2012-11-29 at 00:17 +, David Woodhouse wrote: > I mostly use that with PPPoA, rather than PPPoEoA with the pointless MTU > breakage that that implies. But it does work fine with BR2684 with the > MAC address 00:00:01:00:00:00, which is what it ends up with. > > Do you actually *need* to set the MAC address on the br2684 link? > On circuits that assign an IP with DHCP, it is bound to its MAC address. My ISP, for one, will assign multiple IP's to different MAC addresses on the same circuit, to a point. That many zeros are not likely to pass validation. The stock firmware increments the Ethernet MAC to get the ATM one, which is clearly a sane thing for a DSL router to do. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] lantiq and Netgear fixes/enhancements
On Thu, 2012-11-29 at 00:32 +, Conor O'Gorman wrote: > br2684 picks that address if there is no 'set' mac and if the lower > level provides nothing. It is a valid address, Xerox. Whether or not it is technically valid might be rather open to interpretation at the other end. The validity of a MAC with a Xerox OUI and the rest as zero still has non-zero ambiguity. > I note that br2684 also has an ndo_set_mac_address(), enabling > ifconfig nas0 hw ether OO:UU:II:aa:bb:cc The way that's handled in OpenWrt is manually entering the MAC in /etc/config/network rather than having it correct out-of-the-box. That's _really_ not a solution. > If the adsl/atm headend decides to actually bridge out onto a real > ethernet, then it would be a good idea to have a reasonably unique MAC. > How common is this? I wouldn't think it's too common, but probably would > arise at some point. This is the way my current ISP handles things. This is the way my previous ISP handled things. This is also the way the ISP I had before that one handled things, way back in 2001. Also, for those on static IP's, all ISP's I've ever encountered, except one, handled things this way as well. > It may be appropriate to have it set the mac either from a config option > 'macaddr' like the ethernet bridge, or use a sensible default such as > the system serial/MAC, with or without some adjustment like an increment > or bit flip. > > Conor The config option is already in place, as I said above. The sensible default _is_ the increment, which is what the vast majority of DSL routers do. In most of the AR7 ones, however, this incremented MAC is already a separate boot environment variable. I'm not seeing that on lantiq so far, but I still may. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] lantiq and Netgear fixes/enhancements
On Thu, 2012-11-29 at 10:35 +, Conor O'Gorman wrote: > I don't want to drag this out longer than necessary. You used the phrase > 'hack'. What do you think is the preferred solution? If I had a better one, I would have used it. RFC, again. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] lantiq and Netgear fixes/enhancements
On Thu, 2012-11-29 at 07:40 -0800, Daniel Gimpelevich wrote: > On Thu, 2012-11-29 at 10:35 +, Conor O'Gorman wrote: > > I don't want to drag this out longer than necessary. You used the phrase > > 'hack'. What do you think is the preferred solution? > > If I had a better one, I would have used it. RFC, again. Well, here's a better one; take 2: Signed-off-by: Daniel Gimpelevich Index: target/linux/lantiq/vr9/target.mk === --- target/linux/lantiq/vr9/target.mk (revision 34577) +++ target/linux/lantiq/vr9/target.mk (working copy) @@ -3,7 +3,7 @@ BOARDNAME:=VR9 FEATURES:=squashfs jffs2 atm -DEFAULT_PACKAGES+=kmod-pppoa ppp-mod-pppoa linux-atm atm-tools br2684ctl kmod-ltq-dsl-vr9 ltq-dsl-app swconfig +DEFAULT_PACKAGES+=kmod-pppoa ppp-mod-pppoa linux-atm atm-esi atm-tools br2684ctl kmod-ltq-dsl-vr9 ltq-dsl-app swconfig define Target/Description Lantiq VR9 Index: target/linux/lantiq/image/Makefile === --- target/linux/lantiq/image/Makefile (revision 34577) +++ target/linux/lantiq/image/Makefile (working copy) @@ -154,7 +154,7 @@ ifeq ($(CONFIG_TARGET_lantiq_ar9),y) Image/BuildKernel/Profile/WBMR=$(call Image/BuildKernel/Template,WBMR,$(xway_cmdline)) -Image/BuildKernel/Profile/DGN3500B=$(call Image/BuildKernel/Template,DGN3500B,$(xway_cmdline)) +Image/BuildKernel/Profile/DGN3500B=$(call Image/BuildKernel/Template,DGN3500B,$(sx76x_cmdline)) Image/BuildKernel/Profile/P2601HNFX=$(call Image/BuildKernel/Template,P2601HNFX,$(xway_cmdline)) Image/BuildKernel/Profile/H201L=$(call Image/BuildKernel/Template,H201L,$(xway_cmdline)) Image/BuildKernel/Profile/FRITZ7320=$(call Image/BuildKernelEVA/Template,FRITZ7320,$(xway_cmdline)) Index: target/linux/lantiq/ar9/target.mk === --- target/linux/lantiq/ar9/target.mk (revision 34577) +++ target/linux/lantiq/ar9/target.mk (working copy) @@ -3,7 +3,7 @@ BOARDNAME:=AR9 FEATURES:=squashfs jffs2 atm -DEFAULT_PACKAGES+=kmod-pppoa ppp-mod-pppoa linux-atm atm-tools br2684ctl kmod-ltq-dsl-ar9 ltq-dsl-app \ +DEFAULT_PACKAGES+=kmod-pppoa ppp-mod-pppoa linux-atm atm-esi atm-tools br2684ctl kmod-ltq-dsl-ar9 ltq-dsl-app \ kmod-input-gpio-keys-polled kmod-ledtrig-netdev kmod-leds-gpio kmod-button-hotplug \ swconfig Index: target/linux/lantiq/danube/target.mk === --- target/linux/lantiq/danube/target.mk(revision 34577) +++ target/linux/lantiq/danube/target.mk(working copy) @@ -3,7 +3,7 @@ BOARDNAME:=Danube FEATURES:=squashfs jffs2 atm -DEFAULT_PACKAGES+=kmod-pppoa ppp-mod-pppoa linux-atm atm-tools br2684ctl kmod-ltq-dsl-danube ltq-dsl-app \ +DEFAULT_PACKAGES+=kmod-pppoa ppp-mod-pppoa linux-atm atm-esi atm-tools br2684ctl kmod-ltq-dsl-danube ltq-dsl-app \ kmod-input-gpio-keys-polled kmod-ledtrig-netdev kmod-leds-gpio kmod-button-hotplug \ swconfig Index: target/linux/lantiq/files-3.3/arch/mips/lantiq/xway/mach-netgear.c === --- target/linux/lantiq/files-3.3/arch/mips/lantiq/xway/mach-netgear.c (revision 34577) +++ target/linux/lantiq/files-3.3/arch/mips/lantiq/xway/mach-netgear.c (working copy) @@ -77,8 +77,8 @@ static struct gpio_led dgn3500_gpio_leds[] __initdata = { - { .name = "soc:green:power", .gpio = 34, .active_low = 1, }, - { .name = "soc:red:power", .gpio = 39, .active_low = 1, }, + { .name = "soc:green:power", .gpio = 34, .active_low = 1, .default_trigger = "default-on" }, + { .name = "soc:red:power", .gpio = 39, .active_low = 1, .default_trigger = "default-on" }, { .name = "soc:orange:wlan", .gpio = 51, .active_low = 1, }, { .name = "soc:green:wps", .gpio = 52, .active_low = 1, }, { .name = "soc:green:usb", .gpio = 22, .active_low = 1, }, @@ -91,7 +91,7 @@ { .desc = "wps", .type = EV_KEY, - .code = BTN_0, + .code = KEY_WPS_BUTTON, .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL, .gpio = 54, .active_low = 1, @@ -99,8 +99,16 @@ { .desc = "reset", .type = EV_KEY, - .code = BTN_1, + .code = BTN_0, .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL, + .gpio = 53, + .active_low = 1, + }, + { + .desc = "rfkill", + .type = EV_KEY, + .code = KEY_RFKILL, + .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL, .gpio = 36, .active_lo
Re: [OpenWrt-Devel] [PATCH] lantiq and Netgear fixes/enhancements
On Fri, 2012-12-07 at 12:15 -0800, Daniel Gimpelevich wrote: > On Thu, 2012-11-29 at 07:40 -0800, Daniel Gimpelevich wrote: > > On Thu, 2012-11-29 at 10:35 +, Conor O'Gorman wrote: > > > I don't want to drag this out longer than necessary. You used the phrase > > > 'hack'. What do you think is the preferred solution? > > > > If I had a better one, I would have used it. RFC, again. > > Well, here's a better one; take 2: Whoops; minor oversight. This is the patch as it should be: Signed-off-by: Daniel Gimpelevich Index: target/linux/lantiq/vr9/target.mk === --- target/linux/lantiq/vr9/target.mk (revision 34577) +++ target/linux/lantiq/vr9/target.mk (working copy) @@ -3,7 +3,7 @@ BOARDNAME:=VR9 FEATURES:=squashfs jffs2 atm -DEFAULT_PACKAGES+=kmod-pppoa ppp-mod-pppoa linux-atm atm-tools br2684ctl kmod-ltq-dsl-vr9 ltq-dsl-app swconfig +DEFAULT_PACKAGES+=kmod-pppoa ppp-mod-pppoa linux-atm atm-esi atm-tools br2684ctl kmod-ltq-dsl-vr9 ltq-dsl-app swconfig define Target/Description Lantiq VR9 Index: target/linux/lantiq/image/Makefile === --- target/linux/lantiq/image/Makefile (revision 34577) +++ target/linux/lantiq/image/Makefile (working copy) @@ -154,7 +154,7 @@ ifeq ($(CONFIG_TARGET_lantiq_ar9),y) Image/BuildKernel/Profile/WBMR=$(call Image/BuildKernel/Template,WBMR,$(xway_cmdline)) -Image/BuildKernel/Profile/DGN3500B=$(call Image/BuildKernel/Template,DGN3500B,$(xway_cmdline)) +Image/BuildKernel/Profile/DGN3500B=$(call Image/BuildKernel/Template,DGN3500B,$(sx76x_cmdline)) Image/BuildKernel/Profile/P2601HNFX=$(call Image/BuildKernel/Template,P2601HNFX,$(xway_cmdline)) Image/BuildKernel/Profile/H201L=$(call Image/BuildKernel/Template,H201L,$(xway_cmdline)) Image/BuildKernel/Profile/FRITZ7320=$(call Image/BuildKernelEVA/Template,FRITZ7320,$(xway_cmdline)) Index: target/linux/lantiq/ar9/target.mk === --- target/linux/lantiq/ar9/target.mk (revision 34577) +++ target/linux/lantiq/ar9/target.mk (working copy) @@ -3,7 +3,7 @@ BOARDNAME:=AR9 FEATURES:=squashfs jffs2 atm -DEFAULT_PACKAGES+=kmod-pppoa ppp-mod-pppoa linux-atm atm-tools br2684ctl kmod-ltq-dsl-ar9 ltq-dsl-app \ +DEFAULT_PACKAGES+=kmod-pppoa ppp-mod-pppoa linux-atm atm-esi atm-tools br2684ctl kmod-ltq-dsl-ar9 ltq-dsl-app \ kmod-input-gpio-keys-polled kmod-ledtrig-netdev kmod-leds-gpio kmod-button-hotplug \ swconfig Index: target/linux/lantiq/danube/target.mk === --- target/linux/lantiq/danube/target.mk(revision 34577) +++ target/linux/lantiq/danube/target.mk(working copy) @@ -3,7 +3,7 @@ BOARDNAME:=Danube FEATURES:=squashfs jffs2 atm -DEFAULT_PACKAGES+=kmod-pppoa ppp-mod-pppoa linux-atm atm-tools br2684ctl kmod-ltq-dsl-danube ltq-dsl-app \ +DEFAULT_PACKAGES+=kmod-pppoa ppp-mod-pppoa linux-atm atm-esi atm-tools br2684ctl kmod-ltq-dsl-danube ltq-dsl-app \ kmod-input-gpio-keys-polled kmod-ledtrig-netdev kmod-leds-gpio kmod-button-hotplug \ swconfig Index: target/linux/lantiq/files-3.3/arch/mips/lantiq/xway/mach-netgear.c === --- target/linux/lantiq/files-3.3/arch/mips/lantiq/xway/mach-netgear.c (revision 34577) +++ target/linux/lantiq/files-3.3/arch/mips/lantiq/xway/mach-netgear.c (working copy) @@ -77,8 +77,8 @@ static struct gpio_led dgn3500_gpio_leds[] __initdata = { - { .name = "soc:green:power", .gpio = 34, .active_low = 1, }, - { .name = "soc:red:power", .gpio = 39, .active_low = 1, }, + { .name = "soc:green:power", .gpio = 34, .active_low = 1, .default_trigger = "default-on" }, + { .name = "soc:red:power", .gpio = 39, .active_low = 1, .default_trigger = "default-on" }, { .name = "soc:orange:wlan", .gpio = 51, .active_low = 1, }, { .name = "soc:green:wps", .gpio = 52, .active_low = 1, }, { .name = "soc:green:usb", .gpio = 22, .active_low = 1, }, @@ -91,7 +91,7 @@ { .desc = "wps", .type = EV_KEY, - .code = BTN_0, + .code = KEY_WPS_BUTTON, .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL, .gpio = 54, .active_low = 1, @@ -99,8 +99,16 @@ { .desc = "reset", .type = EV_KEY, - .code = BTN_1, + .code = BTN_0, .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL, + .gpio = 53, + .active_low = 1, + }, + { + .desc = "rfkill", + .type =
Re: [OpenWrt-Devel] [PATCH] lantiq and Netgear fixes/enhancements
On Fri, 2012-12-07 at 12:24 -0800, Daniel Gimpelevich wrote: > On Fri, 2012-12-07 at 12:15 -0800, Daniel Gimpelevich wrote: > > On Thu, 2012-11-29 at 07:40 -0800, Daniel Gimpelevich wrote: > > > On Thu, 2012-11-29 at 10:35 +, Conor O'Gorman wrote: > > > > I don't want to drag this out longer than necessary. You used the phrase > > > > 'hack'. What do you think is the preferred solution? > > > > > > If I had a better one, I would have used it. RFC, again. > > > > Well, here's a better one; take 2: > > Whoops; minor oversight. This is the patch as it should be: Third time's a charm: Signed-off-by: Daniel Gimpelevich Index: target/linux/lantiq/vr9/target.mk === --- target/linux/lantiq/vr9/target.mk (revision 34577) +++ target/linux/lantiq/vr9/target.mk (working copy) @@ -3,7 +3,7 @@ BOARDNAME:=VR9 FEATURES:=squashfs jffs2 atm -DEFAULT_PACKAGES+=kmod-pppoa ppp-mod-pppoa linux-atm atm-tools br2684ctl kmod-ltq-dsl-vr9 ltq-dsl-app swconfig +DEFAULT_PACKAGES+=kmod-pppoa ppp-mod-pppoa linux-atm atm-esi atm-tools br2684ctl kmod-ltq-dsl-vr9 ltq-dsl-app swconfig define Target/Description Lantiq VR9 Index: target/linux/lantiq/image/Makefile === --- target/linux/lantiq/image/Makefile (revision 34577) +++ target/linux/lantiq/image/Makefile (working copy) @@ -154,7 +154,7 @@ ifeq ($(CONFIG_TARGET_lantiq_ar9),y) Image/BuildKernel/Profile/WBMR=$(call Image/BuildKernel/Template,WBMR,$(xway_cmdline)) -Image/BuildKernel/Profile/DGN3500B=$(call Image/BuildKernel/Template,DGN3500B,$(xway_cmdline)) +Image/BuildKernel/Profile/DGN3500B=$(call Image/BuildKernel/Template,DGN3500B,$(sx76x_cmdline)) Image/BuildKernel/Profile/P2601HNFX=$(call Image/BuildKernel/Template,P2601HNFX,$(xway_cmdline)) Image/BuildKernel/Profile/H201L=$(call Image/BuildKernel/Template,H201L,$(xway_cmdline)) Image/BuildKernel/Profile/FRITZ7320=$(call Image/BuildKernelEVA/Template,FRITZ7320,$(xway_cmdline)) Index: target/linux/lantiq/ar9/target.mk === --- target/linux/lantiq/ar9/target.mk (revision 34577) +++ target/linux/lantiq/ar9/target.mk (working copy) @@ -3,7 +3,7 @@ BOARDNAME:=AR9 FEATURES:=squashfs jffs2 atm -DEFAULT_PACKAGES+=kmod-pppoa ppp-mod-pppoa linux-atm atm-tools br2684ctl kmod-ltq-dsl-ar9 ltq-dsl-app \ +DEFAULT_PACKAGES+=kmod-pppoa ppp-mod-pppoa linux-atm atm-esi atm-tools br2684ctl kmod-ltq-dsl-ar9 ltq-dsl-app \ kmod-input-gpio-keys-polled kmod-ledtrig-netdev kmod-leds-gpio kmod-button-hotplug \ swconfig Index: target/linux/lantiq/danube/target.mk === --- target/linux/lantiq/danube/target.mk(revision 34577) +++ target/linux/lantiq/danube/target.mk(working copy) @@ -3,7 +3,7 @@ BOARDNAME:=Danube FEATURES:=squashfs jffs2 atm -DEFAULT_PACKAGES+=kmod-pppoa ppp-mod-pppoa linux-atm atm-tools br2684ctl kmod-ltq-dsl-danube ltq-dsl-app \ +DEFAULT_PACKAGES+=kmod-pppoa ppp-mod-pppoa linux-atm atm-esi atm-tools br2684ctl kmod-ltq-dsl-danube ltq-dsl-app \ kmod-input-gpio-keys-polled kmod-ledtrig-netdev kmod-leds-gpio kmod-button-hotplug \ swconfig Index: target/linux/lantiq/files-3.3/arch/mips/lantiq/xway/mach-netgear.c === --- target/linux/lantiq/files-3.3/arch/mips/lantiq/xway/mach-netgear.c (revision 34577) +++ target/linux/lantiq/files-3.3/arch/mips/lantiq/xway/mach-netgear.c (working copy) @@ -77,8 +77,8 @@ static struct gpio_led dgn3500_gpio_leds[] __initdata = { - { .name = "soc:green:power", .gpio = 34, .active_low = 1, }, - { .name = "soc:red:power", .gpio = 39, .active_low = 1, }, + { .name = "soc:green:power", .gpio = 34, .active_low = 1, .default_trigger = "default-on" }, + { .name = "soc:red:power", .gpio = 39, .active_low = 1, .default_trigger = "default-on" }, { .name = "soc:orange:wlan", .gpio = 51, .active_low = 1, }, { .name = "soc:green:wps", .gpio = 52, .active_low = 1, }, { .name = "soc:green:usb", .gpio = 22, .active_low = 1, }, @@ -91,7 +91,7 @@ { .desc = "wps", .type = EV_KEY, - .code = BTN_0, + .code = KEY_WPS_BUTTON, .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL, .gpio = 54, .active_low = 1, @@ -99,8 +99,16 @@ { .desc = "reset", .type = EV_KEY, - .code = BTN_1, + .code = BTN_0, .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL,
Re: [OpenWrt-Devel] [PATCH] lantiq and Netgear fixes/enhancements
On Fri, 2012-12-07 at 20:56 +, David Woodhouse wrote: > On Fri, 2012-12-07 at 12:34 -0800, Daniel Gimpelevich wrote: > > Index: target/linux/lantiq/base-files/etc/init.d/ifx-esi > > === > > --- target/linux/lantiq/base-files/etc/init.d/ifx-esi (revision 0) > > +++ target/linux/lantiq/base-files/etc/init.d/ifx-esi (revision 0) > > @@ -0,0 +1,11 @@ > > +#!/bin/sh /etc/rc.common > > + > > +START=15 > > + > > +start() { > > + ethmac=`xargs -n 1 echo < /proc/cmdline | grep '^ethaddr=' | sed -e > > 's,ethaddr=,,' -e 's,:,,g'` > > + atmmac=`echo $ethmac | sed 's,..$,,'`$(printf '%06x' > > $((1+0x`echo $ethmac | sed 's,^..,,'`)) | sed 's,.*\(..\)$,\1,') > > + for atmdev in `ls /sys/class/atm`; do > > + esi $atmmac `echo $atmdev | sed 's,[^0-9]*\(.*\)$,\1,'` > > + done > > +} > > It'd be better to put that in /etc/hotplug.d/atm so that you don't have > to worry about the timing of when the atm driver loads at startup, and > it gets done properly if the driver is ever unloaded and reloaded, etc. > OK, but hotplug never generates any atm events, so Felix suggested this instead. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] lantiq and Netgear fixes/enhancements
On Fri, 2012-12-07 at 12:59 -0800, Daniel Gimpelevich wrote: > On Fri, 2012-12-07 at 20:56 +, David Woodhouse wrote: > > On Fri, 2012-12-07 at 12:34 -0800, Daniel Gimpelevich wrote: > > > Index: target/linux/lantiq/base-files/etc/init.d/ifx-esi > > > === > > > --- target/linux/lantiq/base-files/etc/init.d/ifx-esi (revision 0) > > > +++ target/linux/lantiq/base-files/etc/init.d/ifx-esi (revision 0) > > > @@ -0,0 +1,11 @@ > > > +#!/bin/sh /etc/rc.common > > > + > > > +START=15 > > > + > > > +start() { > > > + ethmac=`xargs -n 1 echo < /proc/cmdline | grep '^ethaddr=' | sed > > > -e 's,ethaddr=,,' -e 's,:,,g'` > > > + atmmac=`echo $ethmac | sed 's,..$,,'`$(printf '%06x' > > > $((1+0x`echo $ethmac | sed 's,^..,,'`)) | sed 's,.*\(..\)$,\1,') > > > + for atmdev in `ls /sys/class/atm`; do > > > + esi $atmmac `echo $atmdev | sed 's,[^0-9]*\(.*\)$,\1,'` > > > + done > > > +} > > > > It'd be better to put that in /etc/hotplug.d/atm so that you don't have > > to worry about the timing of when the atm driver loads at startup, and > > it gets done properly if the driver is ever unloaded and reloaded, etc. > > > > OK, but hotplug never generates any atm events, so Felix suggested this > instead. Sorry, final try: (John, feel free to adjust for 3.7 as you see fit.) Signed-off-by: Daniel Gimpelevich Index: target/linux/lantiq/vr9/target.mk === --- target/linux/lantiq/vr9/target.mk (revision 34577) +++ target/linux/lantiq/vr9/target.mk (working copy) @@ -3,7 +3,7 @@ BOARDNAME:=VR9 FEATURES:=squashfs jffs2 atm -DEFAULT_PACKAGES+=kmod-pppoa ppp-mod-pppoa linux-atm atm-tools br2684ctl kmod-ltq-dsl-vr9 ltq-dsl-app swconfig +DEFAULT_PACKAGES+=kmod-pppoa ppp-mod-pppoa linux-atm atm-esi atm-tools br2684ctl kmod-ltq-dsl-vr9 ltq-dsl-app swconfig define Target/Description Lantiq VR9 Index: target/linux/lantiq/image/Makefile === --- target/linux/lantiq/image/Makefile (revision 34577) +++ target/linux/lantiq/image/Makefile (working copy) @@ -154,7 +154,7 @@ ifeq ($(CONFIG_TARGET_lantiq_ar9),y) Image/BuildKernel/Profile/WBMR=$(call Image/BuildKernel/Template,WBMR,$(xway_cmdline)) -Image/BuildKernel/Profile/DGN3500B=$(call Image/BuildKernel/Template,DGN3500B,$(xway_cmdline)) +Image/BuildKernel/Profile/DGN3500B=$(call Image/BuildKernel/Template,DGN3500B,$(sx76x_cmdline)) Image/BuildKernel/Profile/P2601HNFX=$(call Image/BuildKernel/Template,P2601HNFX,$(xway_cmdline)) Image/BuildKernel/Profile/H201L=$(call Image/BuildKernel/Template,H201L,$(xway_cmdline)) Image/BuildKernel/Profile/FRITZ7320=$(call Image/BuildKernelEVA/Template,FRITZ7320,$(xway_cmdline)) Index: target/linux/lantiq/ar9/target.mk === --- target/linux/lantiq/ar9/target.mk (revision 34577) +++ target/linux/lantiq/ar9/target.mk (working copy) @@ -3,7 +3,7 @@ BOARDNAME:=AR9 FEATURES:=squashfs jffs2 atm -DEFAULT_PACKAGES+=kmod-pppoa ppp-mod-pppoa linux-atm atm-tools br2684ctl kmod-ltq-dsl-ar9 ltq-dsl-app \ +DEFAULT_PACKAGES+=kmod-pppoa ppp-mod-pppoa linux-atm atm-esi atm-tools br2684ctl kmod-ltq-dsl-ar9 ltq-dsl-app \ kmod-input-gpio-keys-polled kmod-ledtrig-netdev kmod-leds-gpio kmod-button-hotplug \ swconfig Index: target/linux/lantiq/danube/target.mk === --- target/linux/lantiq/danube/target.mk(revision 34577) +++ target/linux/lantiq/danube/target.mk(working copy) @@ -3,7 +3,7 @@ BOARDNAME:=Danube FEATURES:=squashfs jffs2 atm -DEFAULT_PACKAGES+=kmod-pppoa ppp-mod-pppoa linux-atm atm-tools br2684ctl kmod-ltq-dsl-danube ltq-dsl-app \ +DEFAULT_PACKAGES+=kmod-pppoa ppp-mod-pppoa linux-atm atm-esi atm-tools br2684ctl kmod-ltq-dsl-danube ltq-dsl-app \ kmod-input-gpio-keys-polled kmod-ledtrig-netdev kmod-leds-gpio kmod-button-hotplug \ swconfig Index: target/linux/lantiq/files-3.3/arch/mips/lantiq/xway/mach-netgear.c === --- target/linux/lantiq/files-3.3/arch/mips/lantiq/xway/mach-netgear.c (revision 34577) +++ target/linux/lantiq/files-3.3/arch/mips/lantiq/xway/mach-netgear.c (working copy) @@ -77,8 +77,8 @@ static struct gpio_led dgn3500_gpio_leds[] __initdata = { - { .name = "soc:green:power", .gpio = 34, .active_low = 1, }, - { .name = "soc:red:power", .gpio = 39, .active_low = 1, }, + {