]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ARM: uniphier: allow to source boot script before distro-boot
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Wed, 19 Dec 2018 11:03:14 +0000 (20:03 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Sat, 29 Dec 2018 02:38:34 +0000 (11:38 +0900)
Some users might need additional setups before booting the kernel.
If there is found a file 'boot.scr', run it before invoking the
distro boot command.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
configs/uniphier_ld4_sld8_defconfig
configs/uniphier_v7_defconfig
configs/uniphier_v8_defconfig
include/configs/uniphier.h

index bede166efa7f90ed3ba9475380ee8fd8f510dfd7..98a001707029fd123c556a25a661077eb403471f 100644 (file)
@@ -9,7 +9,7 @@ CONFIG_ARCH_UNIPHIER_LD4_SLD8=y
 CONFIG_MICRO_SUPPORT_CARD=y
 CONFIG_NR_DRAM_BANKS=3
 # CONFIG_ARCH_FIXUP_FDT_MEMORY is not set
-CONFIG_BOOTCOMMAND="run ${bootdev}boot"
+CONFIG_BOOTCOMMAND="run ${bootdev}script; run ${bootdev}boot"
 CONFIG_LOGLEVEL=6
 CONFIG_SPL_NAND_SUPPORT=y
 CONFIG_SPL_NOR_SUPPORT=y
index be4ab7c0cf2715557bc3c5b318c7637a9184e03a..bba8e180a5cdc2ad68c5ee7beb54144614bfa010 100644 (file)
@@ -8,7 +8,7 @@ CONFIG_SPL=y
 CONFIG_MICRO_SUPPORT_CARD=y
 CONFIG_NR_DRAM_BANKS=3
 # CONFIG_ARCH_FIXUP_FDT_MEMORY is not set
-CONFIG_BOOTCOMMAND="run ${bootdev}boot"
+CONFIG_BOOTCOMMAND="run ${bootdev}script; run ${bootdev}boot"
 CONFIG_LOGLEVEL=6
 CONFIG_SPL_NAND_SUPPORT=y
 CONFIG_SPL_NOR_SUPPORT=y
index 6f7c269f84962df18af64e5bf79ea6e3f80de5bf..df6c5119b058d62dce3f68615af18424cab39f4c 100644 (file)
@@ -7,7 +7,7 @@ CONFIG_ARCH_UNIPHIER_V8_MULTI=y
 CONFIG_MICRO_SUPPORT_CARD=y
 CONFIG_NR_DRAM_BANKS=3
 # CONFIG_ARCH_FIXUP_FDT_MEMORY is not set
-CONFIG_BOOTCOMMAND="run ${bootdev}boot"
+CONFIG_BOOTCOMMAND="run ${bootdev}script; run ${bootdev}boot"
 CONFIG_LOGLEVEL=6
 CONFIG_CMD_CONFIG=y
 CONFIG_CMD_IMLS=y
index 7d14c31e0f00413ce27f1d460876a0827164f7eb..1e509ce9ad7bdd158e28e74a0c8dbe229dac3839 100644 (file)
 #define        CONFIG_EXTRA_ENV_SETTINGS                               \
        "netdev=eth0\0"                                         \
        "initrd_high=0xffffffffffffffff\0"                      \
+       "script=boot.scr\0" \
        "scriptaddr=0x85000000\0"                               \
        "nor_base=0x42000000\0"                                 \
        "emmcboot=mmcsetn && run bootcmd_mmc${mmc_first_dev}\0" \
        "nandboot=run bootcmd_ubifs0\0" \
        "norboot=run tftpboot\0" \
        "usbboot=run bootcmd_usb0\0" \
+       "emmcscript=setenv devtype mmc && " \
+               "mmcsetn && " \
+               "setenv devnum ${mmc_first_dev} && " \
+               "run loadscript_fat\0" \
+       "nandscript=echo Running ${script} from ubi ... && " \
+               "ubi part UBI && " \
+               "ubifsmount ubi0:boot && " \
+               "ubifsload ${loadaddr} ${script} && " \
+               "source\0" \
+       "norscript=echo Running ${script} from tftp ... && " \
+               "tftpboot ${script} &&" \
+               "source\0" \
+       "usbscript=usb start && " \
+               "setenv devtype usb && " \
+               "setenv devnum 0 && " \
+               "run loadscript_fat\0" \
+       "loadscript_fat=echo Running ${script} from ${devtype}${devnum} ... && " \
+               "load ${devtype} ${devnum}:1 ${loadaddr} ${script} && " \
+               "source\0" \
        "sramupdate=setexpr tmp_addr $nor_base + 0x50000 &&"    \
                "tftpboot $tmp_addr $second_image && " \
                "setexpr tmp_addr $nor_base + 0x70000 && " \