]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
display5: factory: Add support for BOOT_FROM = FACTORY switch
authorLukasz Majewski <lukma@denx.de>
Fri, 11 May 2018 14:50:59 +0000 (16:50 +0200)
committerStefano Babic <sbabic@denx.de>
Mon, 18 Jun 2018 13:42:38 +0000 (15:42 +0200)
When BOOT_FROM = FACTORY, then the LEG's factory setup is performed.

This code relies on boot_nfs u-boot command, so it shall be adjusted
appropriately (e.g. provide proper fitImage file).

Signed-off-by: Lukasz Majewski <lukma@denx.de>
include/configs/display5.h

index cff689420e75855f5c7bfa45ac60ab6ae6bdb285..c6a46c8707ddef51e7cacad0abf2557849d27d67 100644 (file)
 #define CONFIG_BAUDRATE                        115200
 
 #ifndef CONFIG_BOOTCOMMAND
-#define CONFIG_BOOTCOMMAND "run boot_mmc"
+#define CONFIG_BOOTCOMMAND "if test ${BOOT_FROM} = FACTORY; then " \
+            "run factory_nfs;" \
+       "else " \
+            "run boot_mmc;" \
+       "fi"
 #endif
 
 #define PARTS_DEFAULT \
        "up=run tftp_sf_SPL; run tftp_sf_uboot\0" \
        "download_kernel=" \
                "tftpboot ${loadaddr} ${kernel_file};\0" \
+       "factory_nfs=" \
+            "echo BOOT: FACTORY (LEG);" \
+            "run boot_nfs\0" \
        "boot_kernel_recovery=" KERNEL_RECOVERY_PROCEDURE "\0" \
        "boot_swu_recovery=" SWUPDATE_RECOVERY_PROCEDURE "\0" \
        "recovery=" \