From e202c713ce390fb78e154a1dff1de85f2fd830c8 Mon Sep 17 00:00:00 2001 From: Jose Miguel Sanchez Sanabria Date: Thu, 20 Sep 2018 16:27:44 +0200 Subject: IGEP0046DL/Q Boot Algorithm: Added video args for kernel support when trying to use a display Changed a bit the boot algorith so that bootdir is by default empty and mmcpart is by default 1 this will change when booting a firmware because uEnv.txt is now responsible for indicating that zimage and dtb are in p2 (mmcpart=2) of folder /boot/ (bootdir) Signed-off-by: Jose Miguel Sanchez Sanabria --- include/configs/igep0046.h | 41 ++++++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/include/configs/igep0046.h b/include/configs/igep0046.h index 4f963e0..c131d00 100644 --- a/include/configs/igep0046.h +++ b/include/configs/igep0046.h @@ -192,12 +192,21 @@ #define EMMC_ENV "" #endif + +#define VIDEO_ARGS "${video_args}" +#define VIDEO_ARGS_SCRIPT "run video_args_script; " + + #ifndef VIDEO_ARGS #define VIDEO_ARGS "" +else +#define VIDEO_ARGS "${video_args}" #endif #ifndef VIDEO_ARGS_SCRIPT #define VIDEO_ARGS_SCRIPT "" +#else +#define VIDEO_ARGS_SCRIPT "run video_args_script; " #endif #if defined(CONFIG_MX6DL) @@ -207,6 +216,7 @@ "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \ "fdt_addr=0x18000000\0" \ "boot_fdt=try\0" \ + "bootdir=\0" \ "ip_dyn=no\0" \ "console=" CONSOLE_DEV "\0" \ "fdt_high=0xffffffff\0" \ @@ -246,11 +256,11 @@ "mmcargs=setenv bootargs console=${console},${baudrate} " \ "root=${mmcroot} " \ VIDEO_ARGS "\0" \ - "loadbootenv=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${bootenv}\0" \ + "loadbootenv=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${bootdir}${bootenv}\0" \ "importbootenv=echo Importing environment from mmc ...; " \ "env import -t ${loadaddr} ${filesize}\0" \ - "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \ - "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ + "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${bootdir}${image}\0" \ + "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${bootdir}${fdt_file}\0" \ "mmcboot=echo Booting from mmc ...; " \ VIDEO_ARGS_SCRIPT \ "run mmcargs; " \ @@ -270,8 +280,8 @@ "sataargs=setenv bootargs console=${console},${baudrate} " \ "root=${sataroot} " \ VIDEO_ARGS "\0" \ - "loadimagesata=fatload sata 0:1 ${loadaddr} ${image}\0" \ - "loadfdtsata=fatload sata 0:1 ${fdt_addr} ${fdt_file}\0" \ + "loadimagesata=fatload sata 0:1 ${loadaddr} ${bootdir}${image}\0" \ + "loadfdtsata=fatload sata 0:1 ${fdt_addr} ${bootdir}${fdt_file}\0" \ "sataboot=echo Booting from sata ...; " \ VIDEO_ARGS_SCRIPT \ "run sataargs; " \ @@ -319,11 +329,11 @@ "fi;\0" #define CONFIG_BOOTCOMMAND \ - "echo Try first mmc (SD)...; " \ + "echo Try first mmc 1 (SD)...; " \ "mmc dev ${mmcdev};" \ "if mmc rescan; then " \ "if run loadbootenv; then " \ - "echo Loaded environment from ${bootenv};" \ + "echo Loaded environment from ${bootdir}${bootenv};" \ "run importbootenv;" \ "fi;" \ "if run loadimage; then " \ @@ -336,7 +346,7 @@ "mmc dev ${mmcdev};" \ "if mmc rescan; then " \ "if run loadbootenv; then " \ - "echo Loaded environment from ${bootenv};" \ + "echo Loaded environment from ${bootdir}${bootenv};" \ "run importbootenv;" \ "fi;" \ "if run loadimage; then " \ @@ -349,6 +359,7 @@ #if defined(CONFIG_MX6Q) #define CONFIG_EXTRA_ENV_SETTINGS \ "bootenv=uEnv.txt\0" \ + "bootdir=\0" \ "image=zImage\0" \ "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \ "fdt_addr=0x18000000\0" \ @@ -392,11 +403,11 @@ "mmcargs=setenv bootargs console=${console},${baudrate} " \ "root=${mmcroot} " \ VIDEO_ARGS "\0" \ - "loadbootenv=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${bootenv}\0" \ + "loadbootenv=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${bootdir}${bootenv}\0" \ "importbootenv=echo Importing environment from mmc ...; " \ "env import -t ${loadaddr} ${filesize}\0" \ - "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \ - "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ + "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${bootdir}${image}\0" \ + "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${bootdir}${fdt_file}\0" \ "mmcboot=echo Booting from mmc ...; " \ VIDEO_ARGS_SCRIPT \ "run mmcargs; " \ @@ -416,8 +427,8 @@ "sataargs=setenv bootargs console=${console},${baudrate} " \ "root=${sataroot} " \ VIDEO_ARGS "\0" \ - "loadimagesata=fatload sata 0:1 ${loadaddr} ${image}\0" \ - "loadfdtsata=fatload sata 0:1 ${fdt_addr} ${fdt_file}\0" \ + "loadimagesata=fatload sata 0:1 ${loadaddr} ${bootdir}${image}\0" \ + "loadfdtsata=fatload sata 0:1 ${fdt_addr} ${bootdir}${fdt_file}\0" \ "sataboot=echo Booting from sata ...; " \ VIDEO_ARGS_SCRIPT \ "run sataargs; " \ @@ -469,7 +480,7 @@ "mmc dev ${mmcdev};" \ "if mmc rescan; then " \ "if run loadbootenv; then " \ - "echo Loaded environment from ${bootenv};" \ + "echo Loaded environment from ${bootdir}${bootenv};" \ "run importbootenv;" \ "fi;" \ "if run loadimage; then " \ @@ -487,7 +498,7 @@ "mmc dev ${mmcdev};" \ "if mmc rescan; then " \ "if run loadbootenv; then " \ - "echo Loaded environment from ${bootenv};" \ + "echo Loaded environment from ${bootdir}${bootenv};" \ "run importbootenv;" \ "fi;" \ "if run loadimage; then " \ -- cgit v1.1