diff --git a/package/boot/uboot-tools/uboot-envtools/files/starfive b/package/boot/uboot-tools/uboot-envtools/files/starfive new file mode 100644 index 0000000000..752963d60f --- /dev/null +++ b/package/boot/uboot-tools/uboot-envtools/files/starfive @@ -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 diff --git a/target/linux/starfive/image/Makefile b/target/linux/starfive/image/Makefile index 7099f7592a..11fb09f63c 100644 --- a/target/linux/starfive/image/Makefile +++ b/target/linux/starfive/image/Makefile @@ -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