2014-06-29 12:38:35 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2016-10-13 10:52:20 +00:00
|
|
|
# Copyright (C) 2014-2016 OpenWrt.org
|
|
|
|
# Copyright (C) 2016 LEDE-Project.org
|
2014-06-29 12:38:35 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
[ -e /etc/config/ubootenv ] && exit 0
|
|
|
|
|
|
|
|
touch /etc/config/ubootenv
|
|
|
|
|
|
|
|
. /lib/uboot-envtools.sh
|
|
|
|
. /lib/functions.sh
|
|
|
|
|
2017-05-12 20:36:07 +00:00
|
|
|
board=$(board_name)
|
2014-06-29 12:38:35 +00:00
|
|
|
|
|
|
|
case "$board" in
|
2019-05-11 17:37:34 +00:00
|
|
|
cznic,turris-omnia)
|
2019-12-27 18:15:31 +00:00
|
|
|
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
|
2017-06-02 16:31:06 +00:00
|
|
|
;;
|
2020-04-26 22:17:07 +00:00
|
|
|
glinet,gl-mv1000)
|
|
|
|
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x8000" "0x8000" "1"
|
|
|
|
;;
|
2018-04-24 06:25:21 +00:00
|
|
|
globalscale,espressobin|\
|
2019-06-07 13:50:50 +00:00
|
|
|
globalscale,espressobin-emmc|\
|
2020-06-01 15:51:37 +00:00
|
|
|
globalscale,espressobin-ultra|\
|
2019-06-07 13:50:50 +00:00
|
|
|
globalscale,espressobin-v7|\
|
2020-09-12 08:28:21 +00:00
|
|
|
globalscale,espressobin-v7-emmc)
|
|
|
|
idx="$(find_mtd_index u-boot-env)"
|
|
|
|
if [ -n "$idx" ]; then
|
|
|
|
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000" "1"
|
|
|
|
else
|
|
|
|
ubootenv_add_uci_config "/dev/mtd0" "0x3f0000" "0x10000" "0x10000" "1"
|
|
|
|
fi
|
|
|
|
;;
|
2020-07-10 17:35:22 +00:00
|
|
|
marvell,armada8040-mcbin-doubleshot|\
|
|
|
|
marvell,armada8040-mcbin-singleshot)
|
2018-04-24 06:25:21 +00:00
|
|
|
ubootenv_add_uci_config "/dev/mtd0" "0x3f0000" "0x10000" "0x10000" "1"
|
|
|
|
;;
|
mvebu: rename Linksys devices based on their common names
The Linksys devices in mvebu target feature a mixed naming,
where parts are based on the official product name (device
node, image; e.g. WRT3200ACM) and parts are based on the
internal code name (DTS file name, compatible, LED labels;
e.g. rango). This inconsistent naming has been perceived
as quite confusing.
A recent attempt by Paul Spooren to harmonize this naming
in kernel has been declined there. However, for us it still
makes sense to apply at least a part of these changes
locally.
Primarily, this patch changes the compatible in DTS and thus
the board name used in various scripts to have them in line
with the device, model and image names. Due to the recent
switch from swconfig to DSA, this allows us to drop
SUPPORTED_DEVICES and thus prevent seamless upgrade between
these incompatible setups.
However, this does not include the LED label rename from
Paul's initial patch: I don't think it's worth keeping the
enormous diff locally for this case, as we can implement
this much easier in 01_leds if we have to live with the
inconsistency anyway.
Signed-off-by: Paul Spooren <mail@aparcar.org>
[rebase, extend to all devices, drop DT LED changes]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-04-10 10:14:21 +00:00
|
|
|
linksys,wrt1200ac|\
|
|
|
|
linksys,wrt1900ac-v2|\
|
|
|
|
linksys,wrt1900acs)
|
2019-05-11 17:37:34 +00:00
|
|
|
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x40000"
|
|
|
|
;;
|
mvebu: rename Linksys devices based on their common names
The Linksys devices in mvebu target feature a mixed naming,
where parts are based on the official product name (device
node, image; e.g. WRT3200ACM) and parts are based on the
internal code name (DTS file name, compatible, LED labels;
e.g. rango). This inconsistent naming has been perceived
as quite confusing.
A recent attempt by Paul Spooren to harmonize this naming
in kernel has been declined there. However, for us it still
makes sense to apply at least a part of these changes
locally.
Primarily, this patch changes the compatible in DTS and thus
the board name used in various scripts to have them in line
with the device, model and image names. Due to the recent
switch from swconfig to DSA, this allows us to drop
SUPPORTED_DEVICES and thus prevent seamless upgrade between
these incompatible setups.
However, this does not include the LED label rename from
Paul's initial patch: I don't think it's worth keeping the
enormous diff locally for this case, as we can implement
this much easier in 01_leds if we have to live with the
inconsistency anyway.
Signed-off-by: Paul Spooren <mail@aparcar.org>
[rebase, extend to all devices, drop DT LED changes]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-04-10 10:14:21 +00:00
|
|
|
linksys,wrt1900ac-v1)
|
2019-05-11 17:37:34 +00:00
|
|
|
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x20000"
|
|
|
|
;;
|
mvebu: rename Linksys devices based on their common names
The Linksys devices in mvebu target feature a mixed naming,
where parts are based on the official product name (device
node, image; e.g. WRT3200ACM) and parts are based on the
internal code name (DTS file name, compatible, LED labels;
e.g. rango). This inconsistent naming has been perceived
as quite confusing.
A recent attempt by Paul Spooren to harmonize this naming
in kernel has been declined there. However, for us it still
makes sense to apply at least a part of these changes
locally.
Primarily, this patch changes the compatible in DTS and thus
the board name used in various scripts to have them in line
with the device, model and image names. Due to the recent
switch from swconfig to DSA, this allows us to drop
SUPPORTED_DEVICES and thus prevent seamless upgrade between
these incompatible setups.
However, this does not include the LED label rename from
Paul's initial patch: I don't think it's worth keeping the
enormous diff locally for this case, as we can implement
this much easier in 01_leds if we have to live with the
inconsistency anyway.
Signed-off-by: Paul Spooren <mail@aparcar.org>
[rebase, extend to all devices, drop DT LED changes]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-04-10 10:14:21 +00:00
|
|
|
linksys,wrt3200acm|\
|
|
|
|
linksys,wrt32x)
|
2019-05-11 17:37:34 +00:00
|
|
|
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
|
|
|
|
;;
|
2019-07-22 11:08:18 +00:00
|
|
|
methode,udpu)
|
|
|
|
ubootenv_add_uci_config "/dev/mtd0" "0x180000" "0x10000" "0x10000"
|
|
|
|
;;
|
2014-06-29 12:38:35 +00:00
|
|
|
esac
|
|
|
|
|
|
|
|
config_load ubootenv
|
|
|
|
config_foreach ubootenv_add_app_config ubootenv
|
|
|
|
|
|
|
|
exit 0
|