From ca0d6a45da0a36898e61e71385737d30b92f10f3 Mon Sep 17 00:00:00 2001 From: Igor Pecovnik Date: Thu, 13 Apr 2017 17:01:43 +0200 Subject: [PATCH] Add configuration for setting uboot environment from userspace with: fw_setenv fw_printenv SUNXI, tested on A20 and H3 --- config/sources/sunxi_common.inc | 1 + makeboarddeb.sh | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/config/sources/sunxi_common.inc b/config/sources/sunxi_common.inc index 5b15fd5cfd..16a578db5d 100644 --- a/config/sources/sunxi_common.inc +++ b/config/sources/sunxi_common.inc @@ -8,6 +8,7 @@ BOOTPATCHDIR="u-boot-sunxi" UBOOT_TARGET_MAP=';;u-boot-sunxi-with-spl.bin' UBOOT_ALT_GCC='> 6.1' +UBOOT_FW_ENV='0x88000,0x20000' # /etc/fw_env.config offset and env size HAS_UUID_SUPPORT=yes BOOTDELAY=0 diff --git a/makeboarddeb.sh b/makeboarddeb.sh index 111851616d..9b6ae04c56 100644 --- a/makeboarddeb.sh +++ b/makeboarddeb.sh @@ -270,6 +270,13 @@ create_board_package() install -m 755 $SRC/lib/scripts/h3consumption $destination/usr/bin fi + # add configuration for setting uboot environment from userspace with: fw_setenv fw_printenv + if [[ -n $UBOOT_FW_ENV ]]; then + UBOOT_FW_ENV=($(tr ',' ' ' <<< "$UBOOT_FW_ENV")) + echo "# Device to access offset env size" > $destination/etc/fw_env.config + echo "/dev/mmcblk ${UBOOT_FW_ENV[0]} ${UBOOT_FW_ENV[1]}" >> $destination/etc/fw_env.config + fi + # log2ram - systemd compatible ramlog alternative cp $SRC/lib/scripts/log2ram/LICENSE.log2ram $destination/usr/share/log2ram/LICENSE cp $SRC/lib/scripts/log2ram/log2ram.service $destination/lib/systemd/system/log2ram.service