uboot-envtools: mvebu: update uci defaults for Turris Omnia
authorKlaus Kudielka <klaus.kudielka@gmail.com>
Fri, 27 Dec 2019 18:15:31 +0000 (19:15 +0100)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Sun, 13 Sep 2020 11:56:47 +0000 (13:56 +0200)
On the Turris Omnia 2019, u-boot environment is located at 0xF0000, instead
of 0xC0000. The switch happened with u-boot-omnia package version 2019-04-2
(May 10, 2019).

Check the installed u-boot release, and set the default accordingly.

Signed-off-by: Klaus Kudielka <klaus.kudielka@gmail.com>
[bump PKG_RELEASE, use lower case for hex offset]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
package/boot/uboot-envtools/Makefile
package/boot/uboot-envtools/files/mvebu

index 7d464f8d08b97a19dbb1214189d264415bba3e69..473704053c565dea39c01eecdead6f9bae89212f 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=uboot-envtools
 PKG_DISTNAME:=u-boot
 PKG_VERSION:=2020.04
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:= \
index 8ed1f87ead4660438389858b1427cb5c250f9463..1d3b79b96226762e5896420de4c743985d141362 100644 (file)
@@ -15,7 +15,11 @@ board=$(board_name)
 
 case "$board" in
 cznic,turris-omnia)
-       ubootenv_add_uci_config "/dev/mtd0" "0xC0000" "0x10000" "0x40000"
+       if grep -q 'U-Boot 2015.10-rc2' /dev/mtd0; then
+               ubootenv_add_uci_config "/dev/mtd0" "0xc0000" "0x10000" "0x40000"
+       else
+               ubootenv_add_uci_config "/dev/mtd0" "0xf0000" "0x10000" "0x10000"
+       fi
        ;;
 glinet,gl-mv1000)
        ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x8000" "0x8000" "1"