From 54398adfc32804b01d7b00dfd366815350087153 Mon Sep 17 00:00:00 2001 From: juhosg Date: Fri, 1 Feb 2013 15:50:52 +0000 Subject: package/uboot-envtools: add OpenMesh MR600v2 support Signed-off-by: Marek Lindner Signed-off-by: Gabor Juhos git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35432 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/boot/uboot-envtools/files/ar71xx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'package/boot/uboot-envtools') diff --git a/package/boot/uboot-envtools/files/ar71xx b/package/boot/uboot-envtools/files/ar71xx index 8cf04297f..124cfb6e2 100644 --- a/package/boot/uboot-envtools/files/ar71xx +++ b/package/boot/uboot-envtools/files/ar71xx @@ -16,7 +16,8 @@ board=$(ar71xx_board_name) case "$board" in all0258n | \ cap4200ag | \ -mr600) +mr600 | \ +mr600v2) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000" ;; alfa-ap96 | \ -- cgit v1.2.3 From 97c5ef7932b19491ddb271b41a5c2ae3e9189502 Mon Sep 17 00:00:00 2001 From: juhosg Date: Sat, 2 Feb 2013 17:01:52 +0000 Subject: uboot-envtools: add config for the Edimax BR-6425 board Signed-off-by: Yuval Adam Signed-off-by: Gabor Juhos git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35464 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/boot/uboot-envtools/files/ramips | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'package/boot/uboot-envtools') diff --git a/package/boot/uboot-envtools/files/ramips b/package/boot/uboot-envtools/files/ramips index 65cd49cf1..3599f6852 100644 --- a/package/boot/uboot-envtools/files/ramips +++ b/package/boot/uboot-envtools/files/ramips @@ -21,6 +21,11 @@ all5002) ;; esac +br6425) + ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000" + ;; +esac + config_load ubootenv config_foreach ubootenv_add_app_config ubootenv -- cgit v1.2.3 From 533bd2dc31e7506e729250f6b0e0255fc2cb617f Mon Sep 17 00:00:00 2001 From: luka Date: Fri, 1 Mar 2013 13:46:01 +0000 Subject: ar71xx: add support for Buffalo WZR 600DHP Signed-off-by: Luka Perkov git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35840 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/boot/uboot-envtools/files/ar71xx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'package/boot/uboot-envtools') diff --git a/package/boot/uboot-envtools/files/ar71xx b/package/boot/uboot-envtools/files/ar71xx index 124cfb6e2..03549fad1 100644 --- a/package/boot/uboot-envtools/files/ar71xx +++ b/package/boot/uboot-envtools/files/ar71xx @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (C) 2011-2012 OpenWrt.org +# Copyright (C) 2011-2013 OpenWrt.org # [ -e /etc/config/ubootenv ] && exit 0 @@ -27,6 +27,10 @@ om2p-hs | \ om2p-lc) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x40000" ;; +wzr-hp-ag300h | \ +wzr-600dhp) + ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x10000" "0x10000" + ;; esac config_load ubootenv -- cgit v1.2.3 From 258492a6b21de107f885b050c11013a6f61f961e Mon Sep 17 00:00:00 2001 From: luka Date: Sun, 3 Mar 2013 21:59:35 +0000 Subject: [package] uboot-env: wzr-600dhp uses wzr-hp-ag300h name git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35866 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/boot/uboot-envtools/files/ar71xx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'package/boot/uboot-envtools') diff --git a/package/boot/uboot-envtools/files/ar71xx b/package/boot/uboot-envtools/files/ar71xx index 03549fad1..1803a9fe6 100644 --- a/package/boot/uboot-envtools/files/ar71xx +++ b/package/boot/uboot-envtools/files/ar71xx @@ -27,8 +27,7 @@ om2p-hs | \ om2p-lc) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x40000" ;; -wzr-hp-ag300h | \ -wzr-600dhp) +wzr-hp-ag300h) ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x10000" "0x10000" ;; esac -- cgit v1.2.3 From 4b14bb66eae15c201536383c8f8702e3ce9f21ff Mon Sep 17 00:00:00 2001 From: luka Date: Fri, 15 Mar 2013 01:36:53 +0000 Subject: [package] uboot-envtools: upgrade to version 2013.01.01 Signed-off-by: Luka Perkov git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36033 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/boot/uboot-envtools/Makefile | 26 +++-- .../patches/001-crc32_func_signature.patch | 130 --------------------- .../boot/uboot-envtools/patches/002-makefile.patch | 44 ------- .../uboot-envtools/patches/003-nor-eraselen.patch | 14 --- .../patches/004-allow_mac_change.patch | 21 ---- 5 files changed, 15 insertions(+), 220 deletions(-) delete mode 100644 package/boot/uboot-envtools/patches/001-crc32_func_signature.patch delete mode 100644 package/boot/uboot-envtools/patches/002-makefile.patch delete mode 100644 package/boot/uboot-envtools/patches/003-nor-eraselen.patch delete mode 100644 package/boot/uboot-envtools/patches/004-allow_mac_change.patch (limited to 'package/boot/uboot-envtools') diff --git a/package/boot/uboot-envtools/Makefile b/package/boot/uboot-envtools/Makefile index 74da5ea12..55aaf885f 100644 --- a/package/boot/uboot-envtools/Makefile +++ b/package/boot/uboot-envtools/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2012 OpenWrt.org +# Copyright (C) 2006-2013 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -9,17 +9,16 @@ include $(TOPDIR)/rules.mk PKG_NAME:=uboot-envtools PKG_DISTNAME:=u-boot -PKG_VERSION:=2012.04.01 +PKG_VERSION:=2013.01.01 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=ftp://ftp.denx.de/pub/u-boot -PKG_MD5SUM:=192bb231082d9159fb6e16de3039b6b2 -PKG_BUILD_DEPENDS:=zlib +PKG_MD5SUM:=73939f78606f89a1775c7e9acb2ca617 -include $(INCLUDE_DIR)/package.mk +PKG_BUILD_DIR:=$(BUILD_DIR)/u-boot-$(PKG_VERSION) -TAR_OPTIONS+= --strip-components=3 -C $(PKG_BUILD_DIR) $(PKG_DISTNAME)-$(PKG_VERSION)/tools/env +include $(INCLUDE_DIR)/package.mk define Package/uboot-envtools SECTION:=utils @@ -32,10 +31,15 @@ define Package/uboot-envtools/description This package includes tools to read and modify U-Boot bootloader environment. endef -define Build/Prepare - mkdir -p $(PKG_BUILD_DIR) - tar xvjf $(DL_DIR)/$(PKG_SOURCE) --strip-components=2 -C $(PKG_BUILD_DIR) $(PKG_DISTNAME)-$(PKG_VERSION)/lib/crc32.c - $(call Build/Prepare/Default) +define Build/Configure +endef + +define Build/Compile + touch $(PKG_BUILD_DIR)/include/config.h + $(MAKE) -C $(PKG_BUILD_DIR) \ + HOSTCC="$(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gcc" \ + HOSTSTRIP="$(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)strip" \ + env endef define Package/uboot-envtools/conffiles @@ -45,7 +49,7 @@ endef define Package/uboot-envtools/install $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/fw_printenv $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/env/fw_printenv $(1)/usr/sbin ln -s fw_printenv $(1)/usr/sbin/fw_setenv $(INSTALL_DIR) $(1)/lib $(INSTALL_DATA) ./files/uboot-envtools.sh $(1)/lib diff --git a/package/boot/uboot-envtools/patches/001-crc32_func_signature.patch b/package/boot/uboot-envtools/patches/001-crc32_func_signature.patch deleted file mode 100644 index f68f29ea0..000000000 --- a/package/boot/uboot-envtools/patches/001-crc32_func_signature.patch +++ /dev/null @@ -1,130 +0,0 @@ ---- a/crc32.c -+++ b/crc32.c -@@ -8,21 +8,16 @@ - * For conditions of distribution and use, see copyright notice in zlib.h - */ - --#ifndef USE_HOSTCC --#include --#endif --#include --#include -+#include -+#include -+ -+#include "zlib.h" - --#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) --#include --#endif --#include "u-boot/zlib.h" - - #define local static - #define ZEXPORT /* empty */ - --#define tole(x) cpu_to_le32(x) -+#define tole(x) __constant_cpu_to_le32(x) - - #ifdef DYNAMIC_CRC_TABLE - -@@ -151,7 +146,7 @@ tole(0xb40bbe37L), tole(0xc30c8ea1L), to - - #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() - { -@@ -183,7 +178,7 @@ uint32_t ZEXPORT crc32_no_comp(uint32_t - if (crc_table_empty) - make_crc_table(); - #endif -- crc = cpu_to_le32(crc); -+ crc = __cpu_to_le32(crc); - /* Align it */ - if (((long)b) & 3 && len) { - uint8_t *p = (uint8_t *)b; -@@ -212,11 +207,11 @@ uint32_t ZEXPORT crc32_no_comp(uint32_t - } while (--len); - } - -- return le32_to_cpu(crc); -+ return __le32_to_cpu(crc); - } - #undef DO_CRC - --uint32_t ZEXPORT crc32 (uint32_t crc, const Bytef *p, uInt len) -+uint32_t ZEXPORT uboot_crc32 (uint32_t crc, const Bytef *p, uInt len) - { - return crc32_no_comp(crc ^ 0xffffffffL, p, len) ^ 0xffffffffL; - } -@@ -239,12 +234,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 -@@ -34,6 +34,7 @@ - #include - #include - #include -+#include - - #ifdef MTD_OLD - # include -@@ -212,13 +213,14 @@ static char default_environment[] = { - static int flash_io (int mode); - static char *envmatch (char * s1, char * s2); - static int parse_config (void); -+uint32_t uboot_crc32 (uint32_t crc, const Bytef *p, uInt len); - - #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); -@@ -348,7 +350,7 @@ int fw_env_close(void) - /* - * 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)) { -@@ -1116,7 +1118,7 @@ int fw_env_open(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) { -@@ -1160,7 +1162,7 @@ int fw_env_open(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; - diff --git a/package/boot/uboot-envtools/patches/002-makefile.patch b/package/boot/uboot-envtools/patches/002-makefile.patch deleted file mode 100644 index b18bff6e7..000000000 --- a/package/boot/uboot-envtools/patches/002-makefile.patch +++ /dev/null @@ -1,44 +0,0 @@ ---- a/Makefile -+++ b/Makefile -@@ -21,34 +21,17 @@ - # MA 02111-1307 USA - # - --include $(TOPDIR)/config.mk -- --HOSTSRCS := $(SRCTREE)/lib/crc32.c fw_env.c fw_env_main.c -+SRCS := crc32.c fw_env.c fw_env_main.c - HEADERS := fw_env.h - --# Compile for a hosted environment on the target --HOSTCPPFLAGS = -idirafter $(SRCTREE)/include \ -- -idirafter $(OBJTREE)/include2 \ -- -idirafter $(OBJTREE)/include \ -- -DUSE_HOSTCC -- --ifeq ($(MTD_VERSION),old) --HOSTCPPFLAGS += -DMTD_OLD --endif -- --all: $(obj)fw_printenv -- --# Some files complain if compiled with -pedantic, use HOSTCFLAGS_NOPED --$(obj)fw_printenv: $(HOSTSRCS) $(HEADERS) -- $(HOSTCC) $(HOSTCFLAGS_NOPED) $(HOSTLDFLAGS) -o $@ $(HOSTSRCS) -+CPPFLAGS := -Wall $(CFLAGS) - --clean: -- rm -f $(obj)fw_printenv -+all: fw_printenv - --######################################################################### -+fw_printenv: $(SRCS) $(HEADERS) -+ $(CC) $(CPPFLAGS) $(SRCS) -o fw_printenv - --include $(TOPDIR)/rules.mk -- --sinclude $(obj).depend -+clean: -+ rm -f fw_printenv - - ######################################################################### diff --git a/package/boot/uboot-envtools/patches/003-nor-eraselen.patch b/package/boot/uboot-envtools/patches/003-nor-eraselen.patch deleted file mode 100644 index c6eb59a72..000000000 --- a/package/boot/uboot-envtools/patches/003-nor-eraselen.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/fw_env.c -+++ b/fw_env.c -@@ -790,7 +790,10 @@ static int flash_write_buf (int dev, int - erase_offset = (offset / blocklen) * blocklen; - - /* Maximum area we may use */ -- erase_len = top_of_range - erase_offset; -+ if (mtd_type == MTD_NANDFLASH) -+ erase_len = top_of_range - erase_offset; -+ else -+ erase_len = blocklen; - - blockstart = erase_offset; - /* Offset inside a block */ diff --git a/package/boot/uboot-envtools/patches/004-allow_mac_change.patch b/package/boot/uboot-envtools/patches/004-allow_mac_change.patch deleted file mode 100644 index b7d600b69..000000000 --- a/package/boot/uboot-envtools/patches/004-allow_mac_change.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- a/fw_env.c -+++ b/fw_env.c -@@ -46,8 +46,6 @@ - - #include "fw_env.h" - --#include -- - #define WHITESPACE(c) ((c == '\t') || (c == ' ')) - - #define min(x, y) ({ \ -@@ -401,9 +399,7 @@ int fw_env_write(char *name, char *value - if ( - (strcmp(name, "serial#") == 0) || - ((strcmp(name, "ethaddr") == 0) --#if defined(CONFIG_OVERWRITE_ETHADDR_ONCE) && defined(CONFIG_ETHADDR) - && (strcmp(oldval, MK_STR(CONFIG_ETHADDR)) != 0) --#endif /* CONFIG_OVERWRITE_ETHADDR_ONCE && CONFIG_ETHADDR */ - ) ) { - fprintf (stderr, "Can't overwrite \"%s\"\n", name); - errno = EROFS; -- cgit v1.2.3 From 8e45a9be1cbc078186e200c20057b43f284329e6 Mon Sep 17 00:00:00 2001 From: luka Date: Thu, 11 Apr 2013 16:04:31 +0000 Subject: This adds Gateworks Laguna family board support. Note that some Laguna boards have SPI flash and others have NOR flash, thus the size/erasesize are detected dynamically. Signed-off-by: Tim Harvey git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36313 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/boot/uboot-envtools/Makefile | 4 ++++ package/boot/uboot-envtools/files/cns3xxx | 28 ++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 package/boot/uboot-envtools/files/cns3xxx (limited to 'package/boot/uboot-envtools') diff --git a/package/boot/uboot-envtools/Makefile b/package/boot/uboot-envtools/Makefile index 55aaf885f..ded9678be 100644 --- a/package/boot/uboot-envtools/Makefile +++ b/package/boot/uboot-envtools/Makefile @@ -69,6 +69,10 @@ ifneq ($(CONFIG_TARGET_ramips),) $(INSTALL_DIR) $(1)/etc/uci-defaults $(INSTALL_BIN) ./files/ramips $(1)/etc/uci-defaults/uboot-envtools endif +ifneq ($(CONFIG_TARGET_cns3xxx),) + $(INSTALL_DIR) $(1)/etc/uci-defaults + $(INSTALL_BIN) ./files/cns3xxx $(1)/etc/uci-defaults/uboot-envtools +endif endef $(eval $(call BuildPackage,uboot-envtools)) diff --git a/package/boot/uboot-envtools/files/cns3xxx b/package/boot/uboot-envtools/files/cns3xxx new file mode 100644 index 000000000..a56be15c5 --- /dev/null +++ b/package/boot/uboot-envtools/files/cns3xxx @@ -0,0 +1,28 @@ +#!/bin/sh +# +# Copyright (C) 2013 OpenWrt.org +# + +[ -e /etc/config/ubootenv ] && exit 0 + +touch /etc/config/ubootenv + +. /lib/cns3xxx.sh +. /lib/uboot-envtools.sh +. /lib/functions.sh + +board=$(cns3xxx_board_name) + +case "$board" in +laguna) + # Laguna uboot env size/erasesize vary depending on NOR vs SPI FLASH + size=$(grep mtd1 /proc/mtd | awk '{print $2}') + erasesize=$(grep mtd1 /proc/mtd | awk '{print $3}') + ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x$size" "0x$erasesize" + ;; +esac + +config_load ubootenv +config_foreach ubootenv_add_app_config ubootenv + +exit 0 -- cgit v1.2.3 From 57b0768426e902ec1807370dfae37874962fb0f5 Mon Sep 17 00:00:00 2001 From: luka Date: Mon, 20 May 2013 08:52:44 +0000 Subject: [package] uboot-envtools: upgrade to 2013.04 git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36665 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/boot/uboot-envtools/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'package/boot/uboot-envtools') diff --git a/package/boot/uboot-envtools/Makefile b/package/boot/uboot-envtools/Makefile index ded9678be..2d0f6b798 100644 --- a/package/boot/uboot-envtools/Makefile +++ b/package/boot/uboot-envtools/Makefile @@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=uboot-envtools PKG_DISTNAME:=u-boot -PKG_VERSION:=2013.01.01 +PKG_VERSION:=2013.04 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=ftp://ftp.denx.de/pub/u-boot -PKG_MD5SUM:=73939f78606f89a1775c7e9acb2ca617 +PKG_MD5SUM:=21bf962d69938ed4ed783b792b2b074e PKG_BUILD_DIR:=$(BUILD_DIR)/u-boot-$(PKG_VERSION) -- cgit v1.2.3