From cdd6361649ea85092d4bd2acd6405203d0d9a0ae Mon Sep 17 00:00:00 2001 From: Luka Perkov Date: Thu, 29 Aug 2013 23:06:29 +0000 Subject: [PATCH] uboot-envtools: update to v2013.07 SVN-Revision: 37857 --- package/boot/uboot-envtools/Makefile | 6 +-- ...edundant-env-support-for-MTD_ABSENT.patch} | 13 +++++- ...writing-environment-for-mtd-devices.patch} | 40 +++++++++++-------- 3 files changed, 38 insertions(+), 21 deletions(-) rename package/boot/uboot-envtools/patches/{110-add-support-for-MTD_ABSENT.patch => 0001-fw_env-add-redundant-env-support-for-MTD_ABSENT.patch} (60%) rename package/boot/uboot-envtools/patches/{115-writing-environment-for-mtd-devices.patch => 0002-fw_env-fix-writing-environment-for-mtd-devices.patch} (74%) diff --git a/package/boot/uboot-envtools/Makefile b/package/boot/uboot-envtools/Makefile index 38c52180c73..b9c8461d588 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.07-rc1 -PKG_RELEASE:=2 +PKG_VERSION:=2013.07 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=ftp://ftp.denx.de/pub/u-boot -PKG_MD5SUM:=9b14d9a8981ce2e429956af7cc96996e +PKG_MD5SUM:=8445162690052e6afd4b8f87af2bb557 PKG_BUILD_DIR:=$(BUILD_DIR)/u-boot-$(PKG_VERSION) diff --git a/package/boot/uboot-envtools/patches/110-add-support-for-MTD_ABSENT.patch b/package/boot/uboot-envtools/patches/0001-fw_env-add-redundant-env-support-for-MTD_ABSENT.patch similarity index 60% rename from package/boot/uboot-envtools/patches/110-add-support-for-MTD_ABSENT.patch rename to package/boot/uboot-envtools/patches/0001-fw_env-add-redundant-env-support-for-MTD_ABSENT.patch index dd98b45d8f3..d373e134243 100644 --- a/package/boot/uboot-envtools/patches/110-add-support-for-MTD_ABSENT.patch +++ b/package/boot/uboot-envtools/patches/0001-fw_env-add-redundant-env-support-for-MTD_ABSENT.patch @@ -1,13 +1,22 @@ -tools/fw_env: add redundant env support for MTD_ABSENT +From: Oliver Metz +Subject: [PATCH v2 1/2] fw_env: add redundant env support for MTD_ABSENT Signed-off-by: Oliver Metz +Tested-by: Luka Perkov --- + +v1 -> v2: + * correct spelling of redundant + +http://lists.denx.de/pipermail/u-boot/2013-August/161694.html +http://patchwork.ozlabs.org/patch/270993/ + tools/env/fw_env.c | 3 +++ 1 file changed, 3 insertions(+) --- a/tools/env/fw_env.c +++ b/tools/env/fw_env.c -@@ -1164,6 +1164,9 @@ int fw_env_open(void) +@@ -1152,6 +1152,9 @@ int fw_env_open(void) } else if (DEVTYPE(dev_current) == MTD_UBIVOLUME && DEVTYPE(!dev_current) == MTD_UBIVOLUME) { environment.flag_scheme = FLAG_INCREMENTAL; diff --git a/package/boot/uboot-envtools/patches/115-writing-environment-for-mtd-devices.patch b/package/boot/uboot-envtools/patches/0002-fw_env-fix-writing-environment-for-mtd-devices.patch similarity index 74% rename from package/boot/uboot-envtools/patches/115-writing-environment-for-mtd-devices.patch rename to package/boot/uboot-envtools/patches/0002-fw_env-fix-writing-environment-for-mtd-devices.patch index 96d0fd98921..ebfe0e48d80 100644 --- a/package/boot/uboot-envtools/patches/115-writing-environment-for-mtd-devices.patch +++ b/package/boot/uboot-envtools/patches/0002-fw_env-fix-writing-environment-for-mtd-devices.patch @@ -1,9 +1,18 @@ -tools/fw_env: fix writing environment for mtd devices +From: Oliver Metz +Subject: [PATCH v2 2/2] fw_env: fix writing environment for mtd devices Signed-off-by: Oliver Metz +Tested-by: Luka Perkov --- - tools/env/fw_env.c | 71 ++++++++++++++++++++++++++++++++---------------------- - 1 file changed, 42 insertions(+), 29 deletions(-) + +v1 -> v2: + * fix checkpatch.pl warnings + +http://lists.denx.de/pipermail/u-boot/2013-August/161695.html +http://patchwork.ozlabs.org/patch/270994/ + + tools/env/fw_env.c | 70 ++++++++++++++++++++++++++++++++---------------------- + 1 file changed, 42 insertions(+), 28 deletions(-) --- a/tools/env/fw_env.c +++ b/tools/env/fw_env.c @@ -23,12 +32,12 @@ Signed-off-by: Oliver Metz + block_seek = 0; + write_total = blocklen; + } else { -+ blocklen = DEVESIZE (dev); ++ blocklen = DEVESIZE(dev); - top_of_range = ((DEVOFFSET(dev) / blocklen) + - ENVSECTORS (dev)) * blocklen; + top_of_range = ((DEVOFFSET(dev) / blocklen) + -+ ENVSECTORS (dev)) * blocklen; ++ ENVSECTORS(dev)) * blocklen; - erase_offset = (offset / blocklen) * blocklen; + erase_offset = (offset / blocklen) * blocklen; @@ -54,8 +63,8 @@ Signed-off-by: Oliver Metz - blocklen) * blocklen; + /* + * Data size we actually write: from the start of the block -+ * to the start of the data, then count bytes of data, and to the -+ * end of the block ++ * to the start of the data, then count bytes of data, and ++ * to the end of the block + */ + write_total = ((block_seek + count + blocklen - 1) / + blocklen) * blocklen; @@ -80,27 +89,26 @@ Signed-off-by: Oliver Metz - } + if (mtd_type != MTD_ABSENT) { + erase.start = blockstart; -+ ioctl (fd, MEMUNLOCK, &erase); ++ ioctl(fd, MEMUNLOCK, &erase); + /* These do not need an explicit erase cycle */ + if (mtd_type != MTD_DATAFLASH) -+ if (ioctl (fd, MEMERASE, &erase) != 0) { -+ fprintf (stderr, "MTD erase error on %s: %s\n", -+ DEVNAME (dev), -+ strerror (errno)); ++ if (ioctl(fd, MEMERASE, &erase) != 0) { ++ fprintf(stderr, ++ "MTD erase error on %s: %s\n", ++ DEVNAME(dev), strerror(errno)); + return -1; + } + } if (lseek (fd, blockstart, SEEK_SET) == -1) { fprintf (stderr, -@@ -862,8 +875,8 @@ static int flash_write_buf (int dev, int - DEVNAME (dev), strerror (errno)); +@@ -863,7 +876,8 @@ static int flash_write_buf (int dev, int return -1; } -- + - ioctl (fd, MEMLOCK, &erase); + if (mtd_type != MTD_ABSENT) -+ ioctl (fd, MEMLOCK, &erase); ++ ioctl(fd, MEMLOCK, &erase); processed += blocklen; block_seek = 0;