Re: [OpenWrt-Devel] [PATCH] ar71xx/all0258n: fix partition layout
2011.10.27. 2:42 keltezéssel, Daniel Golle írta: A miscalculation in the original patch makes OpenWrt destroy the failsafe image. Signed-off-by: Daniel Golle dgo...@allnet.de Applied, thanks! Gabor ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] base-files/sysupgrade: add more busybox applet symlinks to ramdisk
2011.10.27. 4:12 keltezéssel, Daniel Golle írta: Adds symlinks for printf and wc to make life happier in the sysupgrade ramdisk. Also make code more readable by escaping that overly long line. Signed-off-by: Daniel Golle dgo...@allnet.de Applied, thanks! Gabor ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] ar71xx/all0258n: sysupgrade support
Hi Daniel, 2011.10.27. 4:41 keltezéssel, Daniel Golle írta: U-Boot on the ALL0258N needs offset, size and md5 for kernel and rootfs to be stored in the U-Boot environment. If the checksums don't match during boot, a failsafe-system is booted instead. This patch adds a board-specific sysupgrade hack for the all0258n which calculates and updates the checksums for the U-Boot environment. I also fixed the aparently wrong magic-check for ap121 as obviously $magic_long was ment when comparing with 68737173 and not $magic. Good catch! However this change should go into a separate patch. Gabor ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] busybox ntpd vs rdate (r28612)
Hi Felix, I understand the rationale of the change from busybox to ntpd in standard. Does that mean though that the ntpd package has to be chosen in the .config file or is ntpd really integrated into busybox, making the ntpd client package obsolete? Please advise. Regards Hanno Schupp ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] busybox ntpd vs rdate (r28612)
I am not Felix but as I did the change, let me answer here. I understand the rationale of the change from busybox to ntpd in standard. Does that mean though that the ntpd package has to be chosen in the .config file No. or is ntpd really integrated into busybox, making the ntpd client package obsolete? Yes, unless you need a full featured NTP suite for a particular reason, in this case installing full ntpd will remove the busybox one in postinstall so that they do not clash - this is similar to how BusyBox wget vs. GNU wget is handled. ~ Jow ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Multiwan qos (big qos-script modification)
Nobody use multiwan with qos? please! Le 20/10/2011 20:48, Etienne Champetier a écrit : Hello everyone I've seen that there is qos related code in the multiwan script, so i've a question: -How do we configure the qos with multiwan (i haven't seen anything in the documentation or ...) I'm also using wifidog (captive portal) on another router, and wifidog use iptables MARK target (as qos-scripts and multiwan) and is thus incompatible with qos-scripts . I was wondering if it will help if qos-scripts was only using CLASSIFY target (and why it doesn't use it but i think it's related to it non existance in 2.4 kernel) Thanks in advance Etienne Champetier ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] package/uboot-envtools: generate config-file from UCI and remove fw_setenv symlink
Hi Luka! On Thu, Oct 27, 2011 at 10:33:25AM +0200, Luka Perkov wrote: On Thu, Oct 27, 2011 at 02:49:00AM +0200, Daniel Golle wrote: /etc/fw_env.config in case it doesn't exist yet and we got settings in uci. Is the init script the right approach? I like the uci idea, but running init script at every boot to write the same settings each time seams like a waste of resources to me. This script creates the config-file writes the values only if the file doesn't exist yet values exist in UCI. Once this is done, it would usually just check a single [ -e /etc/fw_env.config ] and then exit, as the file exists. If there is no /etc/config/ubootenv at all (that's the other 99% of boots case) config_load wouldn't do much as it can't find the config and config_foreach would just do nothing. /etc/init.d/defconfig works in a very similar fashion and checks against *all* files in /etc/$board/defconfig. I don't see how we could do that in any much more efficient way which doesn't make it more ugly. One option would be to create the file out of /etc/uci-defaults/*, which would be slightly more efficient but as the name says uci-defaults I'd consider that (directly writing a config file) as an abusive way of utilizing /etc/uci-defaults/. Maybe to rewrite it and call it fw_getconf? In that case you should add it as option in 'make menuconfig'. For the sake of PFY protection don't install the fw_setenv symlink. I think this is wrong, symlink should be created. If you want this create a package that wont have this, for example uboot-envtools-readonly. Agreed, this should be a menuconfig option like create fw_setenv symlink. I'll update the patch accordingly and post it in a few moments. Cheers Daniel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCHv2] package/uboot-envtools: generate config-file from UCI and make fw_setenv symlink optional
This adds an init-script for generating /etc/fw_env.config from UCI in case it doesn't exist yet. I also made the creation of the fw_set-symlink option, so it can be disabled in user-builds so only people who know what they are doing will mess with uboot-env Ah, and zlib is a build-dependency, but in runtime zlib is not required, see root@OpenWrt:/# ldd /usr/sbin/fw_printenv libgcc_s.so.1 = /lib/libgcc_s.so.1 (0x2abb2000) libc.so.0 = /lib/libc.so.0 (0x2abd4000) ld-uClibc.so.0 = /lib/ld-uClibc.so.0 (0x2ab9a000) I therefore made it PKG_BUILD_DEPENDS instead of PKG_DEPENDS. Signed-off-by: Daniel Golle dgo...@allnet.de Index: package/uboot-envtools/files/uboot-envtools.init === --- package/uboot-envtools/files/uboot-envtools.init(revision 0) +++ package/uboot-envtools/files/uboot-envtools.init(revision 0) @@ -0,0 +1,31 @@ +#!/bin/sh /etc/rc.common +# (C) 2011 OpenWrt.org +# Creates /etc/fw_env.conf for fw_printenv (and fw_setenv) + +START=80 + +create_fwenv_config() { + local dev + local offset + local envsize + local secsize + local numsec + + config_get dev $1 dev + config_get offset $1 offset 0x + config_get envsize $1 envsize + config_get secsize $1 secsize + config_get numsec $1 numsec + + cat /etc/fw_env.config EOF +# MTD device name Device offset Env. size Flash sector size Number of sectors +$dev $offset $envsize$secsize $numsec +EOF +} + +start() { + [ ! -e /etc/fw_env.config ] { + config_load ubootenv + config_foreach create_fwenv_config ubootenv + } +} Property changes on: package/uboot-envtools/files/uboot-envtools.init ___ Added: svn:executable + * Index: package/uboot-envtools/Makefile === --- package/uboot-envtools/Makefile (revision 28625) +++ package/uboot-envtools/Makefile (working copy) @@ -10,7 +10,7 @@ PKG_NAME:=uboot-envtools PKG_DISTNAME:=u-boot PKG_VERSION:=2011.06 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=ftp://ftp.denx.de/pub/u-boot @@ -24,18 +24,27 @@ SECTION:=utils CATEGORY:=Utilities TITLE:=read/modify U-Boot bootloader environment - DEPENDS:= +zlib URL:=http://www.denx.de/wiki/U-Boot + PKG_BUILD_DEPENDS:=zlib endef define Package/uboot-envtools/description This package includes tools to read and modify U-Boot bootloader environment. endef +define Package/uboot-envtools/config +config PACKAGE_uboot-envtools_setenv_symlink +bool create fw_setenv symlink (write support) +endef + define Package/uboot-envtools/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_BUILD_DIR)/fw_printenv $(1)/usr/sbin/ - ln -sf fw_printenv $(1)/usr/sbin/fw_setenv + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/uboot-envtools.init $(1)/etc/init.d/uboot-envtools +ifneq ($(CONFIG_PACKAGE_uboot-envtools_setenv_symlink),) + ln -s fw_printenv $(1)/usr/sbin/fw_setenv +endif endef define Build/Prepare ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] ipkg-make-index: replace awk calls with stat and cut (from coreutils)
Hi all, this patch replaces awk calls with stat and cut, which are both included in coreutils. Thanks, -Raphaël --- scripts/ipkg-make-index.sh.orig 2011-10-27 16:08:33.149886769 +0200 +++ scripts/ipkg-make-index.sh 2011-10-27 16:13:25.593893720 +0200 @@ -12,8 +12,8 @@ which md5sum /dev/null 21 || alias md for pkg in `find $pkg_dir -name '*.ipk' | sort`; do echo Generating index for package $pkg 2 - file_size=$(ls -l $pkg | awk '{print $5}') - md5sum=$(md5sum $pkg | awk '{print $1}') + file_size=$(stat -c %s $pkg) + md5sum=$(md5sum $pkg | cut -d' ' -f1) # Take pains to make variable value sed-safe sed_safe_pkg=`echo $pkg | sed -e 's/^\.\///g' -e 's/\\//\\//g'` tar -xzOf $pkg ./control.tar.gz | tar xzOf - ./control | sed -e s/^Description:/Filename: $sed_safe_pkg\\ ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCHv2] package/uboot-envtools: generate config-file from UCI and make fw_setenv symlink optional
Hi Daniel, please check, if this really creates multiple entries in /etc/fw_env.config if they are defined in the uci config. This is required for (other) boards using a redundant environment. I think, your current code will only leave a file with the last entry (each call to create_fwenv_config will overwrite the file) Please correct ;-) Thanks, Thomas Original-Nachricht Datum: Thu, 27 Oct 2011 16:39:49 +0200 Von: Daniel Golle dgo...@allnet.de An: OpenWrt Development List openwrt-devel@lists.openwrt.org Betreff: [OpenWrt-Devel] [PATCHv2] package/uboot-envtools: generate config-file from UCI and make fw_setenv symlink optional This adds an init-script for generating /etc/fw_env.config from UCI in case it doesn't exist yet. I also made the creation of the fw_set-symlink option, so it can be disabled in user-builds so only people who know what they are doing will mess with uboot-env Ah, and zlib is a build-dependency, but in runtime zlib is not required, see root@OpenWrt:/# ldd /usr/sbin/fw_printenv libgcc_s.so.1 = /lib/libgcc_s.so.1 (0x2abb2000) libc.so.0 = /lib/libc.so.0 (0x2abd4000) ld-uClibc.so.0 = /lib/ld-uClibc.so.0 (0x2ab9a000) I therefore made it PKG_BUILD_DEPENDS instead of PKG_DEPENDS. Signed-off-by: Daniel Golle dgo...@allnet.de Index: package/uboot-envtools/files/uboot-envtools.init === --- package/uboot-envtools/files/uboot-envtools.init (revision 0) +++ package/uboot-envtools/files/uboot-envtools.init (revision 0) @@ -0,0 +1,31 @@ +#!/bin/sh /etc/rc.common +# (C) 2011 OpenWrt.org +# Creates /etc/fw_env.conf for fw_printenv (and fw_setenv) + +START=80 + +create_fwenv_config() { + local dev + local offset + local envsize + local secsize + local numsec + + config_get dev $1 dev + config_get offset $1 offset 0x + config_get envsize $1 envsize + config_get secsize $1 secsize + config_get numsec $1 numsec + + cat /etc/fw_env.config EOF +# MTD device nameDevice offset Env. size Flash sector size Number of sectors +$dev $offset $envsize$secsize $numsec +EOF +} + +start() { + [ ! -e /etc/fw_env.config ] { + config_load ubootenv + config_foreach create_fwenv_config ubootenv + } +} Property changes on: package/uboot-envtools/files/uboot-envtools.init ___ Added: svn:executable + * Index: package/uboot-envtools/Makefile === --- package/uboot-envtools/Makefile (revision 28625) +++ package/uboot-envtools/Makefile (working copy) @@ -10,7 +10,7 @@ PKG_NAME:=uboot-envtools PKG_DISTNAME:=u-boot PKG_VERSION:=2011.06 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=ftp://ftp.denx.de/pub/u-boot @@ -24,18 +24,27 @@ SECTION:=utils CATEGORY:=Utilities TITLE:=read/modify U-Boot bootloader environment - DEPENDS:= +zlib URL:=http://www.denx.de/wiki/U-Boot + PKG_BUILD_DEPENDS:=zlib endef define Package/uboot-envtools/description This package includes tools to read and modify U-Boot bootloader environment. endef +define Package/uboot-envtools/config +config PACKAGE_uboot-envtools_setenv_symlink +bool create fw_setenv symlink (write support) +endef + define Package/uboot-envtools/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_BUILD_DIR)/fw_printenv $(1)/usr/sbin/ - ln -sf fw_printenv $(1)/usr/sbin/fw_setenv + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/uboot-envtools.init $(1)/etc/init.d/uboot-envtools +ifneq ($(CONFIG_PACKAGE_uboot-envtools_setenv_symlink),) + ln -s fw_printenv $(1)/usr/sbin/fw_setenv +endif endef define Build/Prepare ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel -- Zwei Dinge sind unendlich: Das Universum und die menschliche Dummheit. Aber bei dem Universum bin ich mir nicht ganz sicher. A. Einstein ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCHv2] package/uboot-envtools: generate config-file from UCI and make fw_setenv symlink optional
On 10/27/2011 04:51 PM, Thomas Langer wrote: Hi Daniel, please check, if this really creates multiple entries in /etc/fw_env.config if they are defined in the uci config. This is required for (other) boards using a redundant environment. I think, your current code will only leave a file with the last entry (each call to create_fwenv_config will overwrite the file) You are right, I forgot about that there are boards with redundant environment and yes, in that case we want them both in fw_env.config. Updated patch will come in a few minutes. Thank you! Cheers Daniel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCHv3] package/uboot-envtools: generate config-file from UCI and make fw_setenv symlink optional
On Thu, Oct 27, 2011 at 04:51:57PM +0200, Thomas Langer wrote: please check, if this really creates multiple entries in /etc/fw_env.config if they are defined in the uci config. This is required for (other) boards using a redundant environment. Updated the init-script accordingly, multiple environments are now appended to /etc/fw_env.config. Signed-off-by: Daniel Golle dgo...@allnet.de Index: package/uboot-envtools/files/uboot-envtools.init === --- package/uboot-envtools/files/uboot-envtools.init(revision 0) +++ package/uboot-envtools/files/uboot-envtools.init(revision 0) @@ -0,0 +1,27 @@ +#!/bin/sh /etc/rc.common +# (C) 2011 OpenWrt.org +# Creates /etc/fw_env.conf for fw_printenv (and fw_setenv) + +START=80 + +create_fwenv_config() { + local dev + local offset + local envsize + local secsize + local numsec + config_get dev $1 dev + config_get offset $1 offset 0x + config_get envsize $1 envsize + config_get secsize $1 secsize + config_get numsec $1 numsec + echo $dev $offset $envsize $secsize$numsec /etc/fw_env.config +} + +start() { + [ ! -e /etc/fw_env.config ] { + echo # MTD device name Device offset Env. size Flash sector size Number of sectors /etc/fw_env.config + config_load ubootenv + config_foreach create_fwenv_config ubootenv + } +} Property changes on: package/uboot-envtools/files/uboot-envtools.init ___ Added: svn:executable + * Index: package/uboot-envtools/Makefile === --- package/uboot-envtools/Makefile (revision 28625) +++ package/uboot-envtools/Makefile (working copy) @@ -10,7 +10,7 @@ PKG_NAME:=uboot-envtools PKG_DISTNAME:=u-boot PKG_VERSION:=2011.06 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=ftp://ftp.denx.de/pub/u-boot @@ -24,18 +24,27 @@ SECTION:=utils CATEGORY:=Utilities TITLE:=read/modify U-Boot bootloader environment - DEPENDS:= +zlib URL:=http://www.denx.de/wiki/U-Boot + PKG_BUILD_DEPENDS:=zlib endef define Package/uboot-envtools/description This package includes tools to read and modify U-Boot bootloader environment. endef +define Package/uboot-envtools/config +config PACKAGE_uboot-envtools_setenv_symlink +bool create fw_setenv symlink +endef + define Package/uboot-envtools/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_BUILD_DIR)/fw_printenv $(1)/usr/sbin/ - ln -sf fw_printenv $(1)/usr/sbin/fw_setenv + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/uboot-envtools.init $(1)/etc/init.d/uboot-envtools +ifneq ($(CONFIG_PACKAGE_uboot-envtools_setenv_symlink),) + ln -s fw_printenv $(1)/usr/sbin/fw_setenv +endif endef define Build/Prepare ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] ipkg-make-index: replace awk calls with stat and cut (from coreutils)
On Thursday 27 October 2011 16:45:11 Raphaël HUCK wrote: Hi all, this patch replaces awk calls with stat and cut, which are both included in coreutils. Have you verified this works on BDS platforms, as well as MacOSX? -- Florian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] busybox ntpd vs rdate (r28612)
On 21:59, Jo-Philipp Wich wrote: or is ntpd really integrated into busybox, making the ntpd client package obsolete? Yes, unless you need a full featured NTP suite for a particular reason, in this case installing full ntpd will remove the busybox one in postinstall so that they do not clash - this is similar to how BusyBox wget vs. GNU wget is handled. ~ Jow If I understood you correctly, it is enough to just use the busybox ntpd and no ntpclient package needs to be selected separately? Is there any need for luci-app-ntpc in the build or can it also be left out? Is the needed config built-in into /admin_system/system.lua as suggested by LuCI check-in 7798? ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] busybox ntpd vs rdate (r28612)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi. If I understood you correctly, it is enough to just use the busybox ntpd and no ntpclient package needs to be selected separately? Yes. Is there any need for luci-app-ntpc in the build or can it also be left out? Can be left out. Is the needed config built-in into /admin_system/system.lua as suggested by LuCI check-in 7798? Yes. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk6pj4AACgkQdputYINPTPOZbgCeInXrZUeXS8J6GSdvX5cnHUAd rRcAoJjF2YIXo9QEDjiNdlU54FjU+EX9 =kxXG -END PGP SIGNATURE- ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel