starfive: add ubootenv support
The VF2 boards store their ubootenv on /dev/mtd1 which is a SPI flash partition. Add support for reading this partition in uboot-envtools, and add the package into the VF2 image. Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
This commit is contained in:
parent
3a550f766c
commit
d37289d0b8
26
package/boot/uboot-tools/uboot-envtools/files/starfive
Normal file
26
package/boot/uboot-tools/uboot-envtools/files/starfive
Normal file
@ -0,0 +1,26 @@
|
||||
#
|
||||
# Copyright (C) 2017 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
[ -e /etc/config/ubootenv ] && exit 0
|
||||
|
||||
touch /etc/config/ubootenv
|
||||
|
||||
. /lib/uboot-envtools.sh
|
||||
. /lib/functions.sh
|
||||
|
||||
board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
starfive,visionfive-2-v1.3b)
|
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
|
||||
;;
|
||||
esac
|
||||
|
||||
config_load ubootenv
|
||||
config_foreach ubootenv_add_app_config ubootenv
|
||||
|
||||
exit 0
|
||||
@ -60,7 +60,7 @@ define Device/visionfive2-v1.3b
|
||||
DEVICE_VENDOR := StarFive
|
||||
DEVICE_MODEL := VisionFive2 v1.3b
|
||||
DEVICE_DTS := starfive/jh7110-starfive-visionfive-2-v1.3b
|
||||
DEVICE_PACKAGES := kmod-eeprom-at24 kmod-leds-gpio
|
||||
DEVICE_PACKAGES := kmod-eeprom-at24 kmod-leds-gpio uboot-envtools
|
||||
endef
|
||||
TARGET_DEVICES += visionfive2-v1.3b
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user