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)
committerRISCi_ATOM <bob@bobcall.me>
Sun, 6 Dec 2020 06:33:56 +0000 (01:33 -0500)
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>
(cherry picked from commit 04d3b517dc3301e0148a2ce811ffc136568b04bd)

package/boot/uboot-envtools/Makefile
package/boot/uboot-envtools/files/mvebu

index 71b842b96eb3df8c1e4e978f7b192186e37e3879..2245bda46464499df0aa95bf1e830df3c5b6c1e6 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=uboot-envtools
 PKG_DISTNAME:=u-boot
 PKG_VERSION:=2018.03
-PKG_RELEASE:=3
+PKG_RELEASE:=3.1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.xz
index c2e746d959c9c219962dd6a5dd1d00a0c0d89829..89fef9ea073e5dbbc1c350019c305099aefd536c 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
        ;;
 globalscale,espressobin|\
 globalscale,espressobin-emmc|\