From 08d7985b5345fbb6832ab6156f5b8e23c39fc914 Mon Sep 17 00:00:00 2001 From: Jagan Teki Date: Wed, 21 Dec 2016 12:00:20 +0100 Subject: configs: engicam: Increase nand kernel partition size Increase the nand kernel partition size, for supporting large uImage files, maximum 8MiB. Cc: Stefano Babic Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki --- include/configs/imx6ul_geam.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/configs/imx6ul_geam.h') diff --git a/include/configs/imx6ul_geam.h b/include/configs/imx6ul_geam.h index 48b1120910..787da08260 100644 --- a/include/configs/imx6ul_geam.h +++ b/include/configs/imx6ul_geam.h @@ -130,7 +130,7 @@ # define CONFIG_MTD_PARTITIONS # define MTDIDS_DEFAULT "nand0=nand" # define MTDPARTS_DEFAULT "mtdparts=nand:2m(spl),2m(uboot)," \ - "1m(env),4m(kernel),1m(dtb),-(rootfs)" + "1m(env),8m(kernel),1m(dtb),-(rootfs)" # define CONFIG_APBH_DMA # define CONFIG_APBH_DMA_BURST -- cgit From bfd96402c2d06a6c032cb792521ee4356ea370be Mon Sep 17 00:00:00 2001 From: Jagan Teki Date: Wed, 21 Dec 2016 12:00:21 +0100 Subject: imx6: engicam: Use bootm instead of bootz Boot Linux with uImage instead of zImage, so update bootz with bootm. Cc: Stefano Babic Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki --- include/configs/imx6ul_geam.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include/configs/imx6ul_geam.h') diff --git a/include/configs/imx6ul_geam.h b/include/configs/imx6ul_geam.h index 787da08260..7c8a420d0d 100644 --- a/include/configs/imx6ul_geam.h +++ b/include/configs/imx6ul_geam.h @@ -37,7 +37,7 @@ /* Default environment */ #define CONFIG_EXTRA_ENV_SETTINGS \ "script=boot.scr\0" \ - "image=zImage\0" \ + "image=uImage\0" \ "console=ttymxc0\0" \ "fdt_high=0xffffffff\0" \ "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \ @@ -59,16 +59,16 @@ "run mmcargs; " \ "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ "if run loadfdt; then " \ - "bootz ${loadaddr} - ${fdt_addr}; " \ + "bootm ${loadaddr} - ${fdt_addr}; " \ "else " \ "if test ${boot_fdt} = try; then " \ - "bootz; " \ + "bootm; " \ "else " \ "echo WARN: Cannot load the DT; " \ "fi; " \ "fi; " \ "else " \ - "bootz; " \ + "bootm; " \ "fi\0" #define CONFIG_BOOTCOMMAND \ -- cgit From 8342577148091109a4ef190050831ab72136e74c Mon Sep 17 00:00:00 2001 From: Jagan Teki Date: Wed, 21 Dec 2016 12:00:22 +0100 Subject: configs: engicam: Rename nand with gpmi-name in mtdparts gpmi-nand is the proper name used in nand driver from Linux for all imx related nand boards, so rename mtdparts name as gpmi-nand instead of nand, this will eventually reflects all nand info to Linux from u-boot like mtdparts. Cc: Stefano Babic Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki --- include/configs/imx6ul_geam.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/configs/imx6ul_geam.h') diff --git a/include/configs/imx6ul_geam.h b/include/configs/imx6ul_geam.h index 7c8a420d0d..e925c8f55d 100644 --- a/include/configs/imx6ul_geam.h +++ b/include/configs/imx6ul_geam.h @@ -128,8 +128,8 @@ # define CONFIG_MTD_DEVICE # define CONFIG_CMD_MTDPARTS # define CONFIG_MTD_PARTITIONS -# define MTDIDS_DEFAULT "nand0=nand" -# define MTDPARTS_DEFAULT "mtdparts=nand:2m(spl),2m(uboot)," \ +# define MTDIDS_DEFAULT "nand0=gpmi-nand" +# define MTDPARTS_DEFAULT "mtdparts=gpmi-nand:2m(spl),2m(uboot)," \ "1m(env),8m(kernel),1m(dtb),-(rootfs)" # define CONFIG_APBH_DMA -- cgit From 8a9c775afff9e6dcf46aa75051d277c5efc578df Mon Sep 17 00:00:00 2001 From: Jagan Teki Date: Wed, 21 Dec 2016 12:00:24 +0100 Subject: defconfigs: engicam: Enable UBI commands Create ubifs.img: $ mkfs.ubifs -q -r /rootfs -m 4096 -e 253952 -c 7936 -o ubifs.img Write ubifs.img: --------------- icorem6qdl> nand erase.part rootfs icorem6qdl> ubi part rootfs icorem6qdl> ubi create rootfs icorem6qdl> ext4load mmc 0:2 ${loadaddr} ubifs.img 166592512 bytes read in 8091 ms (19.6 MiB/s) icorem6qdl> ubi write ${loadaddr} rootfs ${filesize} 166592512 bytes written to volume rootfs icorem6qdl> ubifsmount ubi0:rootfs Cc: Stefano Babic Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki --- include/configs/imx6ul_geam.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/configs/imx6ul_geam.h') diff --git a/include/configs/imx6ul_geam.h b/include/configs/imx6ul_geam.h index e925c8f55d..3e26a810e4 100644 --- a/include/configs/imx6ul_geam.h +++ b/include/configs/imx6ul_geam.h @@ -132,6 +132,11 @@ # define MTDPARTS_DEFAULT "mtdparts=gpmi-nand:2m(spl),2m(uboot)," \ "1m(env),8m(kernel),1m(dtb),-(rootfs)" +/* UBI */ +# define CONFIG_CMD_UBIFS +# define CONFIG_RBTREE +# define CONFIG_LZO + # define CONFIG_APBH_DMA # define CONFIG_APBH_DMA_BURST # define CONFIG_APBH_DMA_BURST8 -- cgit From ddd90660df134793573f89538fc4865762aab8b4 Mon Sep 17 00:00:00 2001 From: Jagan Teki Date: Wed, 21 Dec 2016 12:00:25 +0100 Subject: imx6: engicam: Add nandboot env support Add config options for booting Linux from NAND in UBI format. Cc: Stefano Babic Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki --- include/configs/imx6ul_geam.h | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'include/configs/imx6ul_geam.h') diff --git a/include/configs/imx6ul_geam.h b/include/configs/imx6ul_geam.h index 3e26a810e4..507e743488 100644 --- a/include/configs/imx6ul_geam.h +++ b/include/configs/imx6ul_geam.h @@ -46,9 +46,12 @@ "mmcdev=0\0" \ "mmcpart=1\0" \ "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \ + "nandroot=ubi0:rootfs rootfstype=ubifs\0" \ "mmcautodetect=yes\0" \ "mmcargs=setenv bootargs console=${console},${baudrate} " \ "root=${mmcroot}\0" \ + "ubiargs=setenv bootargs console=${console},${baudrate} " \ + "ubi.mtd=5 root=${nandroot} ${mtdparts}\0" \ "loadbootscript=" \ "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ "bootscript=echo Running bootscript from mmc ...; " \ @@ -69,9 +72,22 @@ "fi; " \ "else " \ "bootm; " \ - "fi\0" + "fi\0" \ + "nandboot=echo Booting from nand ...; " \ + "if mtdparts; then " \ + "echo Starting nand boot ...; " \ + "else " \ + "mtdparts default; " \ + "fi; " \ + "run ubiargs; " \ + "nand read ${loadaddr} kernel 0x800000; " \ + "nand read ${fdt_addr} dtb 0x100000; " \ + "bootm ${loadaddr} - ${fdt_addr}\0" -#define CONFIG_BOOTCOMMAND \ +#ifdef CONFIG_NAND_MXS +# define CONFIG_BOOTCOMMAND "run nandboot" +#else +# define CONFIG_BOOTCOMMAND \ "mmc dev ${mmcdev};" \ "mmc dev ${mmcdev}; if mmc rescan; then " \ "if run loadbootscript; then " \ @@ -82,6 +98,7 @@ "fi; " \ "fi; " \ "fi" +#endif /* Miscellaneous configurable options */ #define CONFIG_SYS_MEMTEST_START 0x80000000 -- cgit From ada832f8f5a4168e495332ca33a5723224255cc5 Mon Sep 17 00:00:00 2001 From: Jagan Teki Date: Wed, 21 Dec 2016 12:00:26 +0100 Subject: defconfigs: imx6: engicam: Enable FIT Enable Flattened Image Tree support for all Engicam boards. Cc: Stefano Babic Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki --- include/configs/imx6ul_geam.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/configs/imx6ul_geam.h') diff --git a/include/configs/imx6ul_geam.h b/include/configs/imx6ul_geam.h index 507e743488..5a4f29112d 100644 --- a/include/configs/imx6ul_geam.h +++ b/include/configs/imx6ul_geam.h @@ -120,6 +120,13 @@ #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_INIT_RAM_ADDR + \ CONFIG_SYS_INIT_SP_OFFSET) +/* FIT */ +#ifdef CONFIG_FIT +# define CONFIG_HASH_VERIFY +# define CONFIG_SHA1 +# define CONFIG_SHA256 +#endif + /* UART */ #ifdef CONFIG_MXC_UART # define CONFIG_MXC_UART_BASE UART1_BASE -- cgit From 8098b8cb3f15c8b203de133106e4bce4b8fe956d Mon Sep 17 00:00:00 2001 From: Jagan Teki Date: Wed, 21 Dec 2016 12:00:27 +0100 Subject: configs: engicam: Enable CONFIG_IMAGE_FORMAT_LEGACY Enabling FIT along with Signature will make bootm to not-understanding u-boot legacy image formats like uImage, etc. So this patch enabling legacy image format for backward compatibility. Cc: Stefano Babic Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki --- include/configs/imx6ul_geam.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/configs/imx6ul_geam.h') diff --git a/include/configs/imx6ul_geam.h b/include/configs/imx6ul_geam.h index 5a4f29112d..a8ee4014b7 100644 --- a/include/configs/imx6ul_geam.h +++ b/include/configs/imx6ul_geam.h @@ -125,6 +125,7 @@ # define CONFIG_HASH_VERIFY # define CONFIG_SHA1 # define CONFIG_SHA256 +# define CONFIG_IMAGE_FORMAT_LEGACY #endif /* UART */ -- cgit From 29005ba05c69ae1ec348ca4098b3390f42e974ef Mon Sep 17 00:00:00 2001 From: Jagan Teki Date: Wed, 21 Dec 2016 12:00:28 +0100 Subject: configs: engicam: Cleanup on mmcboot env - Add tab space - remove exctra 'mmc dev ${mmcdev}' Cc: Stefano Babic Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki --- include/configs/imx6ul_geam.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'include/configs/imx6ul_geam.h') diff --git a/include/configs/imx6ul_geam.h b/include/configs/imx6ul_geam.h index a8ee4014b7..8d91fed082 100644 --- a/include/configs/imx6ul_geam.h +++ b/include/configs/imx6ul_geam.h @@ -88,16 +88,15 @@ # define CONFIG_BOOTCOMMAND "run nandboot" #else # define CONFIG_BOOTCOMMAND \ - "mmc dev ${mmcdev};" \ - "mmc dev ${mmcdev}; if mmc rescan; then " \ - "if run loadbootscript; then " \ - "run bootscript; " \ - "else " \ + "if mmc rescan; then " \ + "if run loadbootscript; then " \ + "run bootscript; " \ + "else " \ "if run loadimage; then " \ "run mmcboot; " \ "fi; " \ - "fi; " \ - "fi" + "fi; " \ + "fi" #endif /* Miscellaneous configurable options */ -- cgit From 66d1d687e49aafc3ea1fcc46cf83d8191f5602fc Mon Sep 17 00:00:00 2001 From: Jagan Teki Date: Wed, 21 Dec 2016 12:00:29 +0100 Subject: configs: engicam: Add fitboot env support Add FIT image booting from MMC device, during MMC bootcmd u-boot env script look for bootscript, else fit image or else finally look for legacy image uImage. Cc: Stefano Babic Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki --- include/configs/imx6ul_geam.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'include/configs/imx6ul_geam.h') diff --git a/include/configs/imx6ul_geam.h b/include/configs/imx6ul_geam.h index 8d91fed082..23fa3ee162 100644 --- a/include/configs/imx6ul_geam.h +++ b/include/configs/imx6ul_geam.h @@ -38,6 +38,7 @@ #define CONFIG_EXTRA_ENV_SETTINGS \ "script=boot.scr\0" \ "image=uImage\0" \ + "fit_image=fit.itb\0" \ "console=ttymxc0\0" \ "fdt_high=0xffffffff\0" \ "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \ @@ -58,6 +59,10 @@ "source\0" \ "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \ "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ + "loadfit=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${fit_image}\0" \ + "fitboot=echo Booting FIT image from mmc ...; " \ + "run mmcargs; " \ + "bootm ${loadaddr}\0" \ "mmcboot=echo Booting from mmc ...; " \ "run mmcargs; " \ "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ @@ -92,8 +97,12 @@ "if run loadbootscript; then " \ "run bootscript; " \ "else " \ - "if run loadimage; then " \ - "run mmcboot; " \ + "if run loadfit; then " \ + "run fitboot; " \ + "else " \ + "if run loadimage; then " \ + "run mmcboot; " \ + "fi; " \ "fi; " \ "fi; " \ "fi" -- cgit