From: Lukasz Majewski Date: Fri, 11 May 2018 16:50:59 +0200 Subject: [U-Boot] [PATCH v1 01/21] display5: factory: Add support for BOOT_FROM = FACTORY switch In-Reply-To: <20180511145119.20942-1-lukma@denx.de> References: <20180511145119.20942-1-lukma@denx.de> Message-ID: <20180511145119.20942-2-lukma@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- include/configs/display5.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/include/configs/display5.h b/include/configs/display5.h index 9cd2fdf683..67a1318e4f 100644 --- a/include/configs/display5.h +++ b/include/configs/display5.h @@ -100,7 +100,11 @@ #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 \ @@ -279,6 +283,9 @@ "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=" \ -- 2.11.0