Re: [OpenWrt-Devel] [PATCH] upgrade uboot-envtools
Can we get either this or the equivalent I posted in [OpenWrt-Devel] [PATCH 2/5] new board: Allnet ALL0258N commited in trunk? If not, what's wrong with it? Cheers Daniel On 09/06/2011 12:51 AM, Luka Perkov wrote: Upgrade uboot-envtools to the newest version, add example config file and refresh patches. Signed-off-by: Luka Perkov openwrt --to-- lukaperkov.net --- Index: package/uboot-envtools/patches/001-crc32_func_signature.patch === --- package/uboot-envtools/patches/001-crc32_func_signature.patch (revision 28179) +++ package/uboot-envtools/patches/001-crc32_func_signature.patch (working copy) @@ -1,125 +0,0 @@ a/crc32.c -+++ b/crc32.c -@@ -8,11 +8,7 @@ - * For conditions of distribution and use, see copyright notice in zlib.h - */ - --#ifndef USE_HOSTCC /* Shut down ANSI does not permit... warnings */ --#include common.h --#else - #include stdint.h --#endif - - #if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) - #include watchdog.h -@@ -136,7 +132,7 @@ local const uint32_t crc_table[256] = { - - #if 0 - /* = -- * This function can be used by asm versions of crc32() -+ * This function can be used by asm versions of uboot_crc32() - */ - const uint32_t * ZEXPORT get_crc_table() - { -@@ -154,7 +150,7 @@ const uint32_t * ZEXPORT get_crc_table() - #define DO8(buf) DO4(buf); DO4(buf); - - /* = */ --uint32_t ZEXPORT crc32 (uint32_t crc, const Bytef *buf, uInt len) -+uint32_t ZEXPORT uboot_crc32 (uint32_t crc, const Bytef *buf, uInt len) - { - #ifdef DYNAMIC_CRC_TABLE - if (crc_table_empty) -@@ -217,12 +213,12 @@ uint32_t ZEXPORT crc32_wd (uint32_t crc, - chunk = end - curr; - if (chunk chunk_sz) - chunk = chunk_sz; --crc = crc32 (crc, curr, chunk); -+crc = uboot_crc32 (crc, curr, chunk); - curr += chunk; - WATCHDOG_RESET (); - } - #else --crc = crc32 (crc, buf, len); -+crc = uboot_crc32 (crc, buf, len); - #endif - - return crc; a/fw_env.c -+++ b/fw_env.c -@@ -216,9 +216,9 @@ static int parse_config (void); - #if defined(CONFIG_FILE) - static int get_config (char *); - #endif --static inline ulong getenvsize (void) -+static inline uint32_t getenvsize (void) - { --ulong rc = CONFIG_ENV_SIZE - sizeof (long); -+uint32_t rc = CONFIG_ENV_SIZE - sizeof (uint32_t); - - if (HaveRedundEnv) - rc -= sizeof (char); -@@ -437,7 +437,7 @@ int fw_setenv (int argc, char *argv[]) - /* - * Update CRC - */ --*environment.crc = crc32 (0, (uint8_t *) environment.data, ENV_SIZE); -+*environment.crc = uboot_crc32 (0, (uint8_t *) environment.data, ENV_SIZE); - - /* write environment back to flash */ - if (flash_io (O_RDWR)) { -@@ -627,7 +627,7 @@ static int flash_write_buf (int dev, int - data = malloc (erase_len); - if (!data) { - fprintf (stderr, -- Cannot malloc %u bytes: %s\n, -+ Cannot malloc %zu bytes: %s\n, - erase_len, strerror (errno)); - return -1; - } -@@ -883,11 +883,11 @@ static char *envmatch (char * s1, char * - static int env_init (void) - { - int crc0, crc0_ok; --char flag0; -+unsigned char flag0; - void *addr0; - - int crc1, crc1_ok; --char flag1; -+unsigned char flag1; - void *addr1; - - struct env_image_single *single; -@@ -923,7 +923,7 @@ static int env_init (void) - if (flash_io (O_RDONLY)) - return -1; - --crc0 = crc32 (0, (uint8_t *) environment.data, ENV_SIZE); -+crc0 = uboot_crc32 (0, (uint8_t *) environment.data, ENV_SIZE); - crc0_ok = (crc0 == *environment.crc); - if (!HaveRedundEnv) { - if (!crc0_ok) { -@@ -964,7 +964,7 @@ static int env_init (void) - return -1; - } - --crc1 = crc32 (0, (uint8_t *) redundant-data, ENV_SIZE); -+crc1 = uboot_crc32 (0, (uint8_t *) redundant-data, ENV_SIZE); - crc1_ok = (crc1 == redundant-crc); - flag1 = redundant-flags; - a/fw_env.h -+++ b/fw_env.h -@@ -47,8 +47,10 @@ - ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; \ - bootm - -+# include stdint.h -+ - extern int fw_printenv(int argc, char *argv[]); - extern char *fw_getenv (char *name); - extern int fw_setenv (int argc, char *argv[]); - --extern unsigned long crc32 (unsigned long, const unsigned char *, unsigned); -+extern uint32_t uboot_crc32 (uint32_t, const unsigned char *, unsigned); Index:
Re: [OpenWrt-Devel] [PATCH] correct fair traffic sharing support in qos-scripts
On 25/09/11 01:21 PM, Dave Taht wrote: I am pleased to see this basic improvement to qos-scripts. I will be testing this patch soon in the cerowrt-1.0rc7 series if it doesn't get committed to openwrt head soon. Any luck? ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] packages: version bump iproute2 to 2.6.39
On Tuesday 09 August 2011 19:48:31 Daniel Mierswa wrote: Signed-off-by: Daniel Mierswa impu...@impulze.org --- Applied in r28378, thanks! -- Florian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] modifying source code in OpenWrt
When I modify the files in the following folder and make deliberate syntax errors and then do a make $make package/mac80211/{clean,compile} V=99 folder : openwrt/src/klatch/*build_dir*/*toolchain-mips_r2_gcc* -4.5-linaro_uClibc-0.9.32/linux-2.6.39.4/drivers/net/wireless/ath/ath9k I don't get any compilation errors ! I tried modifying and writing syntactically wrong code in other folder also, but no compilation errors, openwrt/src/klatch/*build_dir*/*linux-ar71xx_generic* /linux-2.6.39.4/drivers/net/wireless/ath/ath9k. Which source file shall i make changes to ? Does Openwrt take the files directly from dl/ folder and untars it every time it compiles ? Please help in resolving the issue Abhinav ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] Add port mirroring/monitoring capability to rtl8366rb switch
This patch adds swlib attributes to the RTL8366RB switch/PHY found in the TL-WR1043ND router that allow to mirror ethernet packets to a monitor port. I have a patch for LuCIs vlan.lua available. Is it enough to post it here or is there a different mailing list for LuCI enhancements? Signed-off-by: Colin Leitner colin.leit...@googlemail.com Index: target/linux/generic-2.6/files/drivers/net/phy/rtl8366rb.c === --- target/linux/generic-2.6/files/drivers/net/phy/rtl8366rb.c (Revision 28372) +++ target/linux/generic-2.6/files/drivers/net/phy/rtl8366rb.c (Arbeitskopie) @@ -4,6 +4,7 @@ * Copyright (C) 2009-2010 Gabor Juhos juh...@openwrt.org * Copyright (C) 2010 Antti Seppälä a.sepp...@gmail.com * Copyright (C) 2010 Roman Yeryomin ro...@advem.lv + * Copyright (C) 2011 Colin Leitner colin.leit...@googlemail.com * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published @@ -21,7 +22,7 @@ #include rtl8366_smi.h #define RTL8366RB_DRIVER_DESC Realtek RTL8366RB ethernet switch driver -#define RTL8366RB_DRIVER_VER 0.2.3 +#define RTL8366RB_DRIVER_VER 0.2.4 #define RTL8366RB_PHY_NO_MAX 4 #define RTL8366RB_PHY_PAGE_MAX 7 @@ -43,6 +44,17 @@ /* Port Enable Control register */ #define RTL8366RB_PECR 0x0001 +/* Port Mirror Control Register */ +#define RTL8366RB_PMCR 0x0007 +#define RTL8366RB_PMCR_SOURCE_PORT(_x) (_x) +#define RTL8366RB_PMCR_SOURCE_PORT_MASK0x000f +#define RTL8366RB_PMCR_MONITOR_PORT(_x)((_x) 4) +#define RTL8366RB_PMCR_MONITOR_PORT_MASK 0x00f0 +#define RTL8366RB_PMCR_MIRROR_RX BIT(8) +#define RTL8366RB_PMCR_MIRROR_TX BIT(9) +#define RTL8366RB_PMCR_MIRROR_SPC BIT(10) +#define RTL8366RB_PMCR_MIRROR_ISO BIT(11) + /* Switch Security Control registers */ #define RTL8366RB_SSCR00x0002 #define RTL8366RB_SSCR10x0003 @@ -933,6 +945,180 @@ return 0; } +static int rtl8366rb_sw_set_mirror_rx_enable(struct switch_dev *dev, + const struct switch_attr *attr, + struct switch_val *val) +{ + struct rtl8366_smi *smi = sw_to_rtl8366_smi(dev); + u32 data; + + if (val-value.i) + data = RTL8366RB_PMCR_MIRROR_RX; + else + data = 0; + + return rtl8366_smi_rmwr(smi, RTL8366RB_PMCR, RTL8366RB_PMCR_MIRROR_RX, data); +} + +static int rtl8366rb_sw_get_mirror_rx_enable(struct switch_dev *dev, + const struct switch_attr *attr, + struct switch_val *val) +{ + struct rtl8366_smi *smi = sw_to_rtl8366_smi(dev); + u32 data; + + rtl8366_smi_read_reg(smi, RTL8366RB_PMCR, data); + if (data RTL8366RB_PMCR_MIRROR_RX) + val-value.i = 1; + else + val-value.i = 0; + + return 0; +} + +static int rtl8366rb_sw_set_mirror_tx_enable(struct switch_dev *dev, + const struct switch_attr *attr, + struct switch_val *val) +{ + struct rtl8366_smi *smi = sw_to_rtl8366_smi(dev); + u32 data; + + if (val-value.i) + data = RTL8366RB_PMCR_MIRROR_TX; + else + data = 0; + + return rtl8366_smi_rmwr(smi, RTL8366RB_PMCR, RTL8366RB_PMCR_MIRROR_TX, data); +} + +static int rtl8366rb_sw_get_mirror_tx_enable(struct switch_dev *dev, + const struct switch_attr *attr, + struct switch_val *val) +{ + struct rtl8366_smi *smi = sw_to_rtl8366_smi(dev); + u32 data; + + rtl8366_smi_read_reg(smi, RTL8366RB_PMCR, data); + if (data RTL8366RB_PMCR_MIRROR_TX) + val-value.i = 1; + else + val-value.i = 0; + + return 0; +} + +static int rtl8366rb_sw_set_monitor_isolation_enable(struct switch_dev *dev, + const struct switch_attr *attr, + struct switch_val *val) +{ + struct rtl8366_smi *smi = sw_to_rtl8366_smi(dev); + u32 data; + + if (val-value.i) + data = RTL8366RB_PMCR_MIRROR_ISO; + else + data = 0; + + return rtl8366_smi_rmwr(smi, RTL8366RB_PMCR, RTL8366RB_PMCR_MIRROR_ISO, data); +} + +static int rtl8366rb_sw_get_monitor_isolation_enable(struct switch_dev *dev, + const struct switch_attr *attr, + struct switch_val *val) +{ + struct rtl8366_smi *smi = sw_to_rtl8366_smi(dev); + u32 data; + + rtl8366_smi_read_reg(smi, RTL8366RB_PMCR, data); + if (data
[OpenWrt-Devel] [PATCH] Update radvd to 1.8.2
Signed-off-by: Andy Silverman andre...@hotmail.com Index: feeds/packages/ipv6/radvd/Makefile === --- feeds/packages/ipv6/radvd/Makefile (revision 28379) +++ feeds/packages/ipv6/radvd/Makefile (working copy) @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=radvd -PKG_VERSION:=1.8.1 +PKG_VERSION:=1.8.2 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://v6web.litech.org/radvd/dist \ http://download.sourcemage.org/mirror -PKG_MD5SUM:=4bccb2c5b1f805548f582a2017f8bad2 +PKG_MD5SUM:=ac8a862d2b232d25ea2622274a2da8a4 PKG_INSTALL:=1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] modifying source code in OpenWrt
Hi, I'm not sure what Jonas is referencing when he says that quilt does not work in mac80211. It works fine. # make package/mac80211/{clean,prepare} V=99 QUILT=1 # cd build_dir/linux-ar71xx_generic/compat-wireless-2011-08-10/ # quilt push -a # quilt new my_changes.patch # quilt edit drivers/net/wireless/ath/ath9k/files # quilt refresh # cd ../../../ make package/mac80211/update Your patch will be there. I've been making compat-wireless patches out of Trunk all day. On Fri, Oct 7, 2011 at 10:58 AM, abhinav narain abhinavnarai...@gmail.comwrote: When I modify the files in the following folder and make deliberate syntax errors and then do a make $make package/mac80211/{clean,compile} V=99 folder : openwrt/src/klatch/*build_dir*/*toolchain-mips_r2_gcc* -4.5-linaro_uClibc-0.9.32/linux-2.6.39.4/drivers/net/wireless/ath/ath9k I don't get any compilation errors ! I tried modifying and writing syntactically wrong code in other folder also, but no compilation errors, openwrt/src/klatch/*build_dir*/*linux-ar71xx_generic* /linux-2.6.39.4/drivers/net/wireless/ath/ath9k. Which source file shall i make changes to ? Does Openwrt take the files directly from dl/ folder and untars it every time it compiles ? Please help in resolving the issue Abhinav ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] modifying source code in OpenWrt
To address your actual question (sorry, I meant for the first reply to be in your other thread, though it is related), when you make clean a package it will remove the source from build_dir and extract the tarball from dl. So, if you make any changes to the extracted and patched source directly in the build_dir and then make clean, your changes are deleted. You should use the quilt process documented in the wiki; it has tips for recompiling a package to test your changes without having to make clean. Also, please try the quilt steps I posted in the first reply... they should work, and using quilt to do this will make your life much easier :) On Fri, Oct 7, 2011 at 10:58 AM, abhinav narain abhinavnarai...@gmail.comwrote: When I modify the files in the following folder and make deliberate syntax errors and then do a make $make package/mac80211/{clean,compile} V=99 folder : openwrt/src/klatch/*build_dir*/*toolchain-mips_r2_gcc* -4.5-linaro_uClibc-0.9.32/linux-2.6.39.4/drivers/net/wireless/ath/ath9k I don't get any compilation errors ! I tried modifying and writing syntactically wrong code in other folder also, but no compilation errors, openwrt/src/klatch/*build_dir*/*linux-ar71xx_generic* /linux-2.6.39.4/drivers/net/wireless/ath/ath9k. Which source file shall i make changes to ? Does Openwrt take the files directly from dl/ folder and untars it every time it compiles ? Please help in resolving the issue Abhinav ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] modifying source code in OpenWrt
I am sorry but I am new to OpenWrt and have doubts not cleared for days. Are you referring to http://wiki.openwrt.org/doc/devel/patches Adding kernel patches subsection ? I haven't found any other related documentation actually. Also, I want to include a bunch of .h header files where i am defining my own structures. Which Makefiles should I add this file ? I don't want to pollute the OpenWrt tree by adding these files in the current tree. Can I give somewhere the location from where these files can be fixed ? There is no documentation on this. PS: According to you I should do : cd build_dir/linux-*/linux-2.* modify the ath9k driver here then, make target/linux/update V=99 and then move the linux-ar71xx image to the router for testing ! ! I hope I got this right. Abhinav On Fri, Oct 7, 2011 at 4:17 PM, Adam Porter porter.a...@gmail.com wrote: To address your actual question (sorry, I meant for the first reply to be in your other thread, though it is related), when you make clean a package it will remove the source from build_dir and extract the tarball from dl. So, if you make any changes to the extracted and patched source directly in the build_dir and then make clean, your changes are deleted. You should use the quilt process documented in the wiki; it has tips for recompiling a package to test your changes without having to make clean. Also, please try the quilt steps I posted in the first reply... they should work, and using quilt to do this will make your life much easier :) On Fri, Oct 7, 2011 at 10:58 AM, abhinav narain abhinavnarai...@gmail.com wrote: When I modify the files in the following folder and make deliberate syntax errors and then do a make $make package/mac80211/{clean,compile} V=99 folder : openwrt/src/klatch/*build_dir*/*toolchain-mips_r2_gcc* -4.5-linaro_uClibc-0.9.32/linux-2.6.39.4/drivers/net/wireless/ath/ath9k I don't get any compilation errors ! I tried modifying and writing syntactically wrong code in other folder also, but no compilation errors, openwrt/src/klatch/*build_dir*/*linux-ar71xx_generic* /linux-2.6.39.4/drivers/net/wireless/ath/ath9k. Which source file shall i make changes to ? Does Openwrt take the files directly from dl/ folder and untars it every time it compiles ? Please help in resolving the issue Abhinav ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel