From 649230306040264cc749ad2bfb68d6d21a2921ed Mon Sep 17 00:00:00 2001 From: "sw.multimedia" Date: Wed, 29 Sep 2021 18:52:52 +0800 Subject: TF Image: modify uboot env variable to support booting from tf card Signed-off-by: sw.multimedia Signed-off-by: Curry Zhang --- configs/starfive_jh7100_starlight_smode_defconfig | 1 + include/configs/starfive-jh7100.h | 4 ++++ 2 files changed, 5 insertions(+) mode change 100644 => 100755 include/configs/starfive-jh7100.h diff --git a/configs/starfive_jh7100_starlight_smode_defconfig b/configs/starfive_jh7100_starlight_smode_defconfig index 36f579b5a9..2ce18f2592 100644 --- a/configs/starfive_jh7100_starlight_smode_defconfig +++ b/configs/starfive_jh7100_starlight_smode_defconfig @@ -32,6 +32,7 @@ CONFIG_AUTOBOOT_DELAY_STR="f" CONFIG_AUTOBOOT_STOP_STR="v" CONFIG_AUTOBOOT_KEYED_CTRLC=y # CONFIG_USE_BOOTCOMMAND is not set +# CONFIG_BOOTCOMMAND="run mmcsetup; run fdtsetup; run fatenv; echo 'running boot2...'; run boot2" CONFIG_USE_PREBOOT=y CONFIG_PREBOOT="run mmcbootenv" CONFIG_DEFAULT_FDT_FILE="starfive/jh7100-beaglev-starlight.dtb" diff --git a/include/configs/starfive-jh7100.h b/include/configs/starfive-jh7100.h old mode 100644 new mode 100755 index 590e7b6db4..71c311eaaf --- a/include/configs/starfive-jh7100.h +++ b/include/configs/starfive-jh7100.h @@ -66,6 +66,10 @@ #define CONFIG_EXTRA_ENV_SETTINGS \ STARLIGHT_FEDORA_BOOTENV \ + "mmcsetup=mmc part\0" \ + "fdtsetup=fdt addr ${fdtcontroladdr}\0" \ + "fatenv=setenv fileaddr a0000000; fatload mmc 0:1 ${fileaddr} u74_uEnv.txt;" \ + "env import -t ${fileaddr} ${filesize}\0" \ "loadaddr=0xa0000000\0" \ "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \ "ext4bootenv=ext4load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootenv}\0" \ -- cgit v1.2.3