From 7be4f7938878826267a2779e55b37870ef0b5621 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Fri, 16 Dec 2016 11:18:32 -0200 Subject: udoo_neo: Remove USDHC3 entry Commit c94981efa20cc58 ("udoo_neo: Remove USDHC3 support") removed the SDHC3 support, but missed to remove the entry from the usdhc_cfg structure, so just remove it. Signed-off-by: Fabio Estevam --- board/udoo/neo/neo.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/board/udoo/neo/neo.c b/board/udoo/neo/neo.c index 688b522ce3..c5058b4542 100644 --- a/board/udoo/neo/neo.c +++ b/board/udoo/neo/neo.c @@ -389,9 +389,8 @@ int board_early_init_f(void) return 0; } -static struct fsl_esdhc_cfg usdhc_cfg[2] = { +static struct fsl_esdhc_cfg usdhc_cfg[1] = { {USDHC2_BASE_ADDR, 0, 4}, - {USDHC3_BASE_ADDR, 0, 4}, }; #define USDHC2_PWR_GPIO IMX_GPIO_NR(6, 1) -- cgit From 99f49fdd5dcdd1930e1f7b469ab6882c92a0ce4b Mon Sep 17 00:00:00 2001 From: Sven Ebenfeld Date: Sun, 6 Nov 2016 16:37:54 +0100 Subject: arm: imx: remove bmode , hdmidet and dek commands from SPL These files are blowing up the SPL and should not be required there as the SPL delivers no command console. Because building fails for mx27 and mx31 machines with SPL build, we remove the linker flag for them from the Makefile. Nothing is built for them to be linked in that directory. Cc: sbabic@denx.de v2 Changes: - Remove mx27 and mx31 from Makefile during SPL build as nothing is built for them in that directory. And removing the commands with the libs-y directive lead to linker failures. e.g. "armv5te-ld.bfd: cannot find arch/arm/imx-common/built-in.o: No such file or directory)" Signed-off-by: Sven Ebenfeld Reviewed-by: George McCollister Tested-by: George McCollister --- arch/arm/Makefile | 2 +- arch/arm/imx-common/Makefile | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/Makefile b/arch/arm/Makefile index ef4f69d377..4b8bf80c40 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -95,7 +95,7 @@ libs-y += arch/arm/cpu/ libs-y += arch/arm/lib/ ifeq ($(CONFIG_SPL_BUILD),y) -ifneq (,$(CONFIG_MX23)$(CONFIG_MX28)$(CONFIG_MX35)$(filter $(SOC), mx25 mx27 mx5 mx6 mx7 mx31 mx35)) +ifneq (,$(CONFIG_MX23)$(CONFIG_MX28)$(CONFIG_MX35)$(filter $(SOC), mx25 mx5 mx6 mx7 mx35)) libs-y += arch/arm/imx-common/ endif else diff --git a/arch/arm/imx-common/Makefile b/arch/arm/imx-common/Makefile index 1873185fa2..03b3c124b3 100644 --- a/arch/arm/imx-common/Makefile +++ b/arch/arm/imx-common/Makefile @@ -34,9 +34,11 @@ endif ifeq ($(SOC),$(filter $(SOC),vf610)) obj-y += ddrmc-vf610.o endif +ifneq ($(CONFIG_SPL_BUILD),y) obj-$(CONFIG_CMD_BMODE) += cmd_bmode.o obj-$(CONFIG_CMD_HDMIDETECT) += cmd_hdmidet.o obj-$(CONFIG_CMD_DEKBLOB) += cmd_dek.o +endif PLUGIN = board/$(BOARDDIR)/plugin -- cgit From 15b505b0553da2d8a99ae5c1d14968e87f5c6bef Mon Sep 17 00:00:00 2001 From: Sven Ebenfeld Date: Sun, 6 Nov 2016 16:37:55 +0100 Subject: arm: imx: add HAB authentication of image to SPL boot When using HAB as secure boot mechanism on Wandboard, the chain of trust breaks immediately after the SPL. As this is not checking the authenticity of the loaded image before jumping to it. The HAB status output will not be implemented in SPL as it adds a lot of strings that are only required in debug cases. With those it exceeds the maximum size of the available OCRAM (69 KiB). The SPL MISC driver support must be enabled, so that the driver can use OTP fuse to check if HAB is enabled. Cc: sbabic@denx.de v2-Changes: None Signed-off-by: Sven Ebenfeld Reviewed-by: George McCollister Tested-by: George McCollister --- arch/arm/imx-common/hab.c | 129 ++++++++++++++++++---------------- arch/arm/imx-common/spl.c | 25 +++++++ arch/arm/imx-common/spl_sd.cfg | 10 +++ arch/arm/include/asm/imx-common/hab.h | 2 + include/configs/mx6_common.h | 3 + 5 files changed, 110 insertions(+), 59 deletions(-) diff --git a/arch/arm/imx-common/hab.c b/arch/arm/imx-common/hab.c index 6731825060..7449487f0d 100644 --- a/arch/arm/imx-common/hab.c +++ b/arch/arm/imx-common/hab.c @@ -110,6 +110,10 @@ * +------------+ + CSF_PAD_SIZE */ +static bool is_hab_enabled(void); + +#if !defined(CONFIG_SPL_BUILD) + #define MAX_RECORD_BYTES (8*1024) /* 4 kbytes */ struct record { @@ -257,22 +261,6 @@ uint8_t hab_engines[16] = { -1 }; -bool is_hab_enabled(void) -{ - struct imx_sec_config_fuse_t *fuse = - (struct imx_sec_config_fuse_t *)&imx_sec_config_fuse; - uint32_t reg; - int ret; - - ret = fuse_read(fuse->bank, fuse->word, ®); - if (ret) { - puts("\nSecure boot fuse read error\n"); - return ret; - } - - return (reg & IS_HAB_ENABLED_BIT) == IS_HAB_ENABLED_BIT; -} - static inline uint8_t get_idx(uint8_t *list, uint8_t tgt) { uint8_t idx = 0; @@ -359,6 +347,68 @@ int get_hab_status(void) return 0; } +int do_hab_status(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +{ + if ((argc != 1)) { + cmd_usage(cmdtp); + return 1; + } + + get_hab_status(); + + return 0; +} + +static int do_authenticate_image(cmd_tbl_t *cmdtp, int flag, int argc, + char * const argv[]) +{ + ulong addr, ivt_offset; + int rcode = 0; + + if (argc < 3) + return CMD_RET_USAGE; + + addr = simple_strtoul(argv[1], NULL, 16); + ivt_offset = simple_strtoul(argv[2], NULL, 16); + + rcode = authenticate_image(addr, ivt_offset); + + return rcode; +} + +U_BOOT_CMD( + hab_status, CONFIG_SYS_MAXARGS, 1, do_hab_status, + "display HAB status", + "" + ); + +U_BOOT_CMD( + hab_auth_img, 3, 0, do_authenticate_image, + "authenticate image via HAB", + "addr ivt_offset\n" + "addr - image hex address\n" + "ivt_offset - hex offset of IVT in the image" + ); + + +#endif /* !defined(CONFIG_SPL_BUILD) */ + +static bool is_hab_enabled(void) +{ + struct imx_sec_config_fuse_t *fuse = + (struct imx_sec_config_fuse_t *)&imx_sec_config_fuse; + uint32_t reg; + int ret; + + ret = fuse_read(fuse->bank, fuse->word, ®); + if (ret) { + puts("\nSecure boot fuse read error\n"); + return ret; + } + + return (reg & IS_HAB_ENABLED_BIT) == IS_HAB_ENABLED_BIT; +} + uint32_t authenticate_image(uint32_t ddr_start, uint32_t image_size) { uint32_t load_addr = 0; @@ -400,7 +450,9 @@ uint32_t authenticate_image(uint32_t ddr_start, uint32_t image_size) (void *)(ddr_start + ivt_offset+IVT_SIZE), 4, 0x10, 0); +#if !defined(CONFIG_SPL_BUILD) get_hab_status(); +#endif puts("\nCalling authenticate_image in ROM\n"); printf("\tivt_offset = 0x%x\n", ivt_offset); @@ -449,7 +501,9 @@ uint32_t authenticate_image(uint32_t ddr_start, uint32_t image_size) hab_caam_clock_enable(0); +#if !defined(CONFIG_SPL_BUILD) get_hab_status(); +#endif } else { puts("hab fuse not enabled\n"); } @@ -459,46 +513,3 @@ uint32_t authenticate_image(uint32_t ddr_start, uint32_t image_size) return result; } - -int do_hab_status(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) -{ - if ((argc != 1)) { - cmd_usage(cmdtp); - return 1; - } - - get_hab_status(); - - return 0; -} - -static int do_authenticate_image(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) -{ - ulong addr, ivt_offset; - int rcode = 0; - - if (argc < 3) - return CMD_RET_USAGE; - - addr = simple_strtoul(argv[1], NULL, 16); - ivt_offset = simple_strtoul(argv[2], NULL, 16); - - rcode = authenticate_image(addr, ivt_offset); - - return rcode; -} - -U_BOOT_CMD( - hab_status, CONFIG_SYS_MAXARGS, 1, do_hab_status, - "display HAB status", - "" - ); - -U_BOOT_CMD( - hab_auth_img, 3, 0, do_authenticate_image, - "authenticate image via HAB", - "addr ivt_offset\n" - "addr - image hex address\n" - "ivt_offset - hex offset of IVT in the image" - ); diff --git a/arch/arm/imx-common/spl.c b/arch/arm/imx-common/spl.c index bdcda7de93..c86b6f83b8 100644 --- a/arch/arm/imx-common/spl.c +++ b/arch/arm/imx-common/spl.c @@ -12,6 +12,7 @@ #include #include #include +#include #if defined(CONFIG_MX6) /* determine boot device from SRC_SBMR1 (BOOT_CFG[4:1]) or SRC_GPR9 register */ @@ -90,3 +91,27 @@ u32 spl_boot_mode(const u32 boot_device) } } #endif + +#if defined(CONFIG_SECURE_BOOT) + +__weak void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image) +{ + typedef void __noreturn (*image_entry_noargs_t)(void); + + image_entry_noargs_t image_entry = + (image_entry_noargs_t)(unsigned long)spl_image->entry_point; + + debug("image entry point: 0x%X\n", spl_image->entry_point); + + /* HAB looks for the CSF at the end of the authenticated data therefore, + * we need to subtract the size of the CSF from the actual filesize */ + if (authenticate_image(spl_image->load_addr, + spl_image->size - CONFIG_CSF_SIZE)) { + image_entry(); + } else { + puts("spl: ERROR: image authentication unsuccessful\n"); + hang(); + } +} + +#endif diff --git a/arch/arm/imx-common/spl_sd.cfg b/arch/arm/imx-common/spl_sd.cfg index 5fc3e8af38..14c135c549 100644 --- a/arch/arm/imx-common/spl_sd.cfg +++ b/arch/arm/imx-common/spl_sd.cfg @@ -4,5 +4,15 @@ * SPDX-License-Identifier: GPL-2.0+ */ +#define __ASSEMBLY__ +#include + IMAGE_VERSION 2 BOOT_FROM sd + +/* + * Secure boot support + */ +#ifdef CONFIG_SECURE_BOOT +CSF CONFIG_CSF_SIZE +#endif \ No newline at end of file diff --git a/arch/arm/include/asm/imx-common/hab.h b/arch/arm/include/asm/imx-common/hab.h index dab6789b10..e0ff459d53 100644 --- a/arch/arm/include/asm/imx-common/hab.h +++ b/arch/arm/include/asm/imx-common/hab.h @@ -145,4 +145,6 @@ typedef void hapi_clock_init_t(void); /* ----------- end of HAB API updates ------------*/ +uint32_t authenticate_image(uint32_t ddr_start, uint32_t image_size); + #endif diff --git a/include/configs/mx6_common.h b/include/configs/mx6_common.h index 3bb939ecf0..6e9b871103 100644 --- a/include/configs/mx6_common.h +++ b/include/configs/mx6_common.h @@ -98,6 +98,9 @@ #define CONFIG_FSL_CAAM #define CONFIG_CMD_DEKBLOB #define CONFIG_SYS_FSL_SEC_LE +#ifdef CONFIG_SPL_BUILD +#define CONFIG_SPL_DRIVERS_MISC_SUPPORT +#endif #endif #endif -- cgit From d21bd69b6e95ca7824941e7f527871cd5c63c7f7 Mon Sep 17 00:00:00 2001 From: Sven Ebenfeld Date: Sun, 6 Nov 2016 16:37:56 +0100 Subject: tools: mkimage: add firmware-ivt image type for HAB verification When we want to use Secure Boot with HAB from SPL over U-Boot.img, we need to append the IVT to the image and leave space for the CSF. Images generated as firmware_ivt can directly be signed using the Freescale code signing tool. For creation of a CSF, mkimage outputs the correct HAB Blocks for the image. The changes to the usual firmware image class are quite small, that is why I implemented that directly into the default_image. Cc: sbabic@denx.de v2-Changes: None Signed-off-by: Sven Ebenfeld Reviewed-by: George McCollister Tested-by: George McCollister --- Makefile | 9 ++++++++- common/image.c | 6 ++++++ include/image.h | 1 + tools/default_image.c | 10 ++++++++-- tools/mkimage.c | 32 ++++++++++++++++++++++++++++++++ 5 files changed, 55 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 08749644f4..ecd824da2b 100644 --- a/Makefile +++ b/Makefile @@ -763,7 +763,11 @@ ALL-$(CONFIG_RAMBOOT_PBL) += u-boot.pbl endif endif ALL-$(CONFIG_SPL) += spl/u-boot-spl.bin +ifeq ($(CONFIG_MX6)$(CONFIG_SECURE_BOOT), yy) +ALL-$(CONFIG_SPL_FRAMEWORK) += u-boot-ivt.img +else ALL-$(CONFIG_SPL_FRAMEWORK) += u-boot.img +endif ALL-$(CONFIG_TPL) += tpl/u-boot-tpl.bin ALL-$(CONFIG_OF_SEPARATE) += u-boot.dtb ifeq ($(CONFIG_SPL_FRAMEWORK),y) @@ -938,6 +942,9 @@ else MKIMAGEFLAGS_u-boot.img = -A $(ARCH) -T firmware -C none -O u-boot \ -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \ -n "U-Boot $(UBOOTRELEASE) for $(BOARD) board" +MKIMAGEFLAGS_u-boot-ivt.img = -A $(ARCH) -T firmware_ivt -C none -O u-boot \ + -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \ + -n "U-Boot $(UBOOTRELEASE) for $(BOARD) board" endif MKIMAGEFLAGS_u-boot-dtb.img = $(MKIMAGEFLAGS_u-boot.img) @@ -951,7 +958,7 @@ MKIMAGEFLAGS_u-boot-spl.kwb = -n $(srctree)/$(CONFIG_SYS_KWD_CONFIG:"%"=%) \ MKIMAGEFLAGS_u-boot.pbl = -n $(srctree)/$(CONFIG_SYS_FSL_PBL_RCW:"%"=%) \ -R $(srctree)/$(CONFIG_SYS_FSL_PBL_PBI:"%"=%) -T pblimage -u-boot-dtb.img u-boot.img u-boot.kwb u-boot.pbl: \ +u-boot-dtb.img u-boot.img u-boot.kwb u-boot.pbl u-boot-ivt.img: \ $(if $(CONFIG_SPL_LOAD_FIT),u-boot-nodtb.bin dts/dt.dtb,u-boot.bin) FORCE $(call if_changed,mkimage) diff --git a/common/image.c b/common/image.c index 909dbed1f2..8c35327745 100644 --- a/common/image.c +++ b/common/image.c @@ -166,6 +166,7 @@ static const table_entry_t uimage_type[] = { { IH_TYPE_ZYNQMPIMAGE, "zynqmpimage", "Xilinx ZynqMP Boot Image" }, { IH_TYPE_FPGA, "fpga", "FPGA Image" }, { IH_TYPE_TEE, "tee", "Trusted Execution Environment Image",}, + { IH_TYPE_FIRMWARE_IVT, "firmware_ivt", "Firmware with HABv4 IVT" }, { -1, "", "", }, }; @@ -365,6 +366,11 @@ void image_print_contents(const void *ptr) printf("%s Offset = 0x%08lx\n", p, data); } } + } else if (image_check_type(hdr, IH_TYPE_FIRMWARE_IVT)) { + printf("HAB Blocks: 0x%08x 0x0000 0x%08x\n", + image_get_load(hdr) - image_get_header_size(), + image_get_size(hdr) + image_get_header_size() + - 0x1FE0); } } diff --git a/include/image.h b/include/image.h index 575f5927f7..05376783fb 100644 --- a/include/image.h +++ b/include/image.h @@ -280,6 +280,7 @@ enum { IH_TYPE_FPGA, /* FPGA Image */ IH_TYPE_VYBRIDIMAGE, /* VYBRID .vyb Image */ IH_TYPE_TEE, /* Trusted Execution Environment OS Image */ + IH_TYPE_FIRMWARE_IVT, /* Firmware Image with HABv4 IVT */ IH_TYPE_COUNT, /* Number of image types */ }; diff --git a/tools/default_image.c b/tools/default_image.c index 6e4ae14ec7..4e5568e06a 100644 --- a/tools/default_image.c +++ b/tools/default_image.c @@ -25,7 +25,7 @@ static image_header_t header; static int image_check_image_types(uint8_t type) { if (((type > IH_TYPE_INVALID) && (type < IH_TYPE_FLATDT)) || - (type == IH_TYPE_KERNEL_NOLOAD)) + (type == IH_TYPE_KERNEL_NOLOAD) || (type == IH_TYPE_FIRMWARE_IVT)) return EXIT_SUCCESS; else return EXIT_FAILURE; @@ -89,6 +89,7 @@ static void image_set_header(void *ptr, struct stat *sbuf, int ifd, { uint32_t checksum; time_t time; + uint32_t imagesize; image_header_t * hdr = (image_header_t *)ptr; @@ -98,11 +99,16 @@ static void image_set_header(void *ptr, struct stat *sbuf, int ifd, sbuf->st_size - sizeof(image_header_t)); time = imagetool_get_source_date(params, sbuf->st_mtime); + if (params->type == IH_TYPE_FIRMWARE_IVT) + /* Add size of CSF minus IVT */ + imagesize = sbuf->st_size - sizeof(image_header_t) + 0x1FE0; + else + imagesize = sbuf->st_size - sizeof(image_header_t); /* Build new header */ image_set_magic(hdr, IH_MAGIC); image_set_time(hdr, time); - image_set_size(hdr, sbuf->st_size - sizeof(image_header_t)); + image_set_size(hdr, imagesize); image_set_load(hdr, params->addr); image_set_ep(hdr, params->ep); image_set_dcrc(hdr, checksum); diff --git a/tools/mkimage.c b/tools/mkimage.c index 49d5d1ed70..f48135ff79 100644 --- a/tools/mkimage.c +++ b/tools/mkimage.c @@ -9,6 +9,7 @@ */ #include "mkimage.h" +#include "imximage.h" #include #include @@ -508,6 +509,37 @@ int main(int argc, char **argv) } else { copy_file(ifd, params.datafile, pad_len); } + if (params.type == IH_TYPE_FIRMWARE_IVT) { + /* Add alignment and IVT */ + uint32_t aligned_filesize = (params.file_size + 0x1000 + - 1) & ~(0x1000 - 1); + flash_header_v2_t ivt_header = { { 0xd1, 0x2000, 0x40 }, + params.addr, 0, 0, 0, params.addr + + aligned_filesize + - tparams->header_size, + params.addr + aligned_filesize + - tparams->header_size + + 0x20, 0 }; + int i = params.file_size; + for (; i < aligned_filesize; i++) { + if (write(ifd, &i, 1) != 1) { + fprintf(stderr, + "%s: Write error on %s: %s\n", + params.cmdname, + params.imagefile, + strerror(errno)); + exit(EXIT_FAILURE); + } + } + if (write(ifd, &ivt_header, sizeof(flash_header_v2_t)) + != sizeof(flash_header_v2_t)) { + fprintf(stderr, "%s: Write error on %s: %s\n", + params.cmdname, + params.imagefile, + strerror(errno)); + exit(EXIT_FAILURE); + } + } } /* We're a bit of paranoid */ -- cgit From 3de6c7fc00b3ee3723992506363749d8b726de95 Mon Sep 17 00:00:00 2001 From: Sven Ebenfeld Date: Sun, 6 Nov 2016 16:37:57 +0100 Subject: doc: imx6: add section for secure boot with SPL Cc: sbabic@denx.de Signed-off-by: Sven Ebenfeld Reviewed-by: George McCollister --- doc/README.imx6 | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/doc/README.imx6 b/doc/README.imx6 index 73b8b0beff..add1d809d3 100644 --- a/doc/README.imx6 +++ b/doc/README.imx6 @@ -138,3 +138,51 @@ c The last "c" command tells kermit (from ckermit package in most distros) to switch from command line mode to communication mode, and when the script is finished, the U-Boot prompt is shown in the same shell. + +3. Using Secure Boot on i.MX6 machines with SPL support +------------------------------------------------------- + +This version of U-Boot is able to build a signable version of the SPL +as well as a signable version of the U-Boot image. The signature can +be verified through High Assurance Boot (HAB). + +CONFIG_SECURE_BOOT is needed to build those two binaries. +After building, you need to create a command sequence file and use +Freescales Code Signing Tool to sign both binaries. After creation, +the mkimage tool outputs the required information about the HAB Blocks +parameter for the CSF. + +More information about the CSF and HAB can be found in the AN4581. +https://cache.freescale.com/files/32bit/doc/app_note/AN4581.pdf + +We don't want to explain how to create a PKI tree or SRK table as +this is well explained in the Application Note. + +Example Output of the SPL (imximage) creation: + Image Type: Freescale IMX Boot Image + Image Ver: 2 (i.MX53/6/7 compatible) + Mode: DCD + Data Size: 61440 Bytes = 60.00 kB = 0.06 MB + Load Address: 00907420 + Entry Point: 00908000 + HAB Blocks: 00907400 00000000 0000cc00 + +Example Output of the u-boot-ivt.img (firmware_ivt) creation: + Image Name: U-Boot 2016.11-rc1-31589-g2a4411 + Created: Sat Nov 5 21:53:28 2016 + Image Type: ARM U-Boot Firmware with HABv4 IVT (uncompressed) + Data Size: 352192 Bytes = 343.94 kB = 0.34 MB + Load Address: 17800000 + Entry Point: 00000000 + HAB Blocks: 0x177fffc0 0x0000 0x00054020 + +The CST (Code Signing Tool) can be downloaded from NXP. +# Compile CSF and create signature +./cst --o csf-u-boot.bin < command_sequence_uboot.csf +./cst --o csf-SPL.bin < command_sequence_spl.csf +# Append compiled CSF to Binary +cat SPL csf-SPL.bin > SPL-signed +cat u-boot-ivt.img csf-u-boot.bin > u-boot-signed.img + +These two signed binaries can be used on an i.MX6 in closed +configuration when the according SRK Table Hash has been flashed. \ No newline at end of file -- cgit From 1f6a664802a4044779b9aebe03b9af6d2745de5f Mon Sep 17 00:00:00 2001 From: Sven Ebenfeld Date: Sun, 6 Nov 2016 16:37:58 +0100 Subject: Makefile: preserve output for images that can contain HAB Blocks To being able to sign created binaries, we need to know the HAB Blocks for that image. Especially for the imximage type the HAB Blocks are only available during creation of the image. We want to preserve the information until we get to sign the files. In the verbose case we still get them printed out instead of writing to log files. Cc: sbabic@denx.de v2-Changes: - No usage of MKIMAGEOUTPUT_$(@F) macro. - Predefine default value /dev/null in every involved Makefile. Signed-off-by: Sven Ebenfeld Reviewed-by: George McCollister Tested-by: George McCollister --- .gitignore | 2 +- Makefile | 6 +++++- arch/arm/imx-common/Makefile | 4 ++++ doc/README.imx6 | 3 ++- scripts/Makefile.lib | 3 ++- scripts/Makefile.spl | 4 +++- 6 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 33abbd3d07..7fac5b3c74 100644 --- a/.gitignore +++ b/.gitignore @@ -31,7 +31,7 @@ # Top-level generic files # /MLO* -/SPL +/SPL* /System.map /u-boot* /boards.cfg diff --git a/Makefile b/Makefile index ecd824da2b..72ab5c049a 100644 --- a/Makefile +++ b/Makefile @@ -813,9 +813,11 @@ cmd_zobjcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@ quiet_cmd_efipayload = OBJCOPY $@ cmd_efipayload = $(OBJCOPY) -I binary -O $(EFIPAYLOAD_BFDTARGET) -B $(EFIPAYLOAD_BFDARCH) $< $@ +MKIMAGEOUTPUT ?= /dev/null + quiet_cmd_mkimage = MKIMAGE $@ cmd_mkimage = $(objtree)/tools/mkimage $(MKIMAGEFLAGS_$(@F)) -d $< $@ \ - $(if $(KBUILD_VERBOSE:1=), >/dev/null) + $(if $(KBUILD_VERBOSE:1=), >$(MKIMAGEOUTPUT)) quiet_cmd_cat = CAT $@ cmd_cat = cat $(filter-out $(PHONY), $^) > $@ @@ -945,6 +947,8 @@ MKIMAGEFLAGS_u-boot.img = -A $(ARCH) -T firmware -C none -O u-boot \ MKIMAGEFLAGS_u-boot-ivt.img = -A $(ARCH) -T firmware_ivt -C none -O u-boot \ -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \ -n "U-Boot $(UBOOTRELEASE) for $(BOARD) board" +u-boot-ivt.img: MKIMAGEOUTPUT = u-boot-ivt.img.log +CLEAN_FILES += u-boot-ivt.img.log u-boot-dtb.imx.log SPL.log u-boot.imx.log endif MKIMAGEFLAGS_u-boot-dtb.img = $(MKIMAGEFLAGS_u-boot.img) diff --git a/arch/arm/imx-common/Makefile b/arch/arm/imx-common/Makefile index 03b3c124b3..da53f627a1 100644 --- a/arch/arm/imx-common/Makefile +++ b/arch/arm/imx-common/Makefile @@ -68,6 +68,7 @@ $(IMX_CONFIG): %.cfgtmp: % FORCE MKIMAGEFLAGS_u-boot.imx = -n $(filter-out $(PLUGIN).bin $< $(PHONY),$^) -T imximage \ -e $(CONFIG_SYS_TEXT_BASE) +u-boot.imx: MKIMAGEOUTPUT = u-boot.imx.log u-boot.imx: u-boot.bin $(IMX_CONFIG) $(PLUGIN).bin FORCE $(call if_changed,mkimage) @@ -75,6 +76,7 @@ u-boot.imx: u-boot.bin $(IMX_CONFIG) $(PLUGIN).bin FORCE ifeq ($(CONFIG_OF_SEPARATE),y) MKIMAGEFLAGS_u-boot-dtb.imx = -n $(filter-out $(PLUGIN).bin $< $(PHONY),$^) -T imximage \ -e $(CONFIG_SYS_TEXT_BASE) +u-boot-dtb.imx: MKIMAGEOUTPUT = u-boot-dtb.imx.log u-boot-dtb.imx: u-boot-dtb.bin $(IMX_CONFIG) $(PLUGIN).bin FORCE $(call if_changed,mkimage) @@ -83,6 +85,8 @@ endif MKIMAGEFLAGS_SPL = -n $(filter-out $(PLUGIN).bin $< $(PHONY),$^) -T imximage \ -e $(CONFIG_SPL_TEXT_BASE) +SPL: MKIMAGEOUTPUT = SPL.log + SPL: spl/u-boot-spl.bin $(IMX_CONFIG) $(PLUGIN).bin FORCE $(call if_changed,mkimage) diff --git a/doc/README.imx6 b/doc/README.imx6 index add1d809d3..0e00968731 100644 --- a/doc/README.imx6 +++ b/doc/README.imx6 @@ -150,7 +150,8 @@ CONFIG_SECURE_BOOT is needed to build those two binaries. After building, you need to create a command sequence file and use Freescales Code Signing Tool to sign both binaries. After creation, the mkimage tool outputs the required information about the HAB Blocks -parameter for the CSF. +parameter for the CSF. During the build, the information is preserved +in log files named as the binaries. (SPL.log and u-boot-ivt.log). More information about the CSF and HAB can be found in the AN4581. https://cache.freescale.com/files/32bit/doc/app_note/AN4581.pdf diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 348de2dbf8..13c975b8a4 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -487,6 +487,7 @@ cmd_xzmisc = (cat $(filter-out FORCE,$^) | \ # # mkimage # --------------------------------------------------------------------------- +MKIMAGEOUTPUT ?= /dev/null quiet_cmd_mkimage = MKIMAGE $@ cmd_mkimage = $(objtree)/tools/mkimage $(MKIMAGEFLAGS_$(@F)) -d $< $@ \ - $(if $(KBUILD_VERBOSE:1=), >/dev/null) + $(if $(KBUILD_VERBOSE:1=), >$(MKIMAGEOUTPUT)) diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl index f379713ad3..c962bbca2c 100644 --- a/scripts/Makefile.spl +++ b/scripts/Makefile.spl @@ -119,9 +119,11 @@ LDPPFLAGS += \ $(shell $(LD) --version | \ sed -ne 's/GNU ld version \([0-9][0-9]*\)\.\([0-9][0-9]*\).*/-DLD_MAJOR=\1 -DLD_MINOR=\2/p') +MKIMAGEOUTPUT ?= /dev/null + quiet_cmd_mkimage = MKIMAGE $@ cmd_mkimage = $(objtree)/tools/mkimage $(MKIMAGEFLAGS_$(@F)) -d $< $@ \ - $(if $(KBUILD_VERBOSE:1=), >/dev/null) + $(if $(KBUILD_VERBOSE:1=), >$(MKIMAGEOUTPUT)) MKIMAGEFLAGS_MLO = -T omapimage -a $(CONFIG_SPL_TEXT_BASE) -- cgit From 5a25b712026012f64e1264f1aa1ead26cd6b1366 Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Fri, 2 Dec 2016 13:43:03 +0800 Subject: imx: thermal: Kconfig: add MX7 The thermal drivers support i.MX6 and i.MX7, add MX7 in Kconfig file. Signed-off-by: Peng Fan Cc: Stefano Babic --- drivers/thermal/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig index f0ffbb3083..886f5fa546 100644 --- a/drivers/thermal/Kconfig +++ b/drivers/thermal/Kconfig @@ -10,7 +10,7 @@ if DM_THERMAL config IMX_THERMAL bool "Temperature sensor driver for Freescale i.MX SoCs" - depends on MX6 + depends on MX6 || MX7 help Support for Temperature Monitor (TEMPMON) found on Freescale i.MX SoCs. It supports one critical trip point and one passive trip point. The -- cgit From 5d3a28abe4a1fa17798049b084f7f7fcd2da2b40 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Thu, 15 Dec 2016 20:10:08 -0200 Subject: udoo_neo: Use 'fdtfile' variable name 'fdtfile' is the preferred name for the variable that contains the device tree blob according to the README file. It also makes it consistent with other i.MX boards that use config_distro, so change it accordingly. Signed-off-by: Fabio Estevam --- include/configs/udoo_neo.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/configs/udoo_neo.h b/include/configs/udoo_neo.h index aec39db6c1..915d0f054d 100644 --- a/include/configs/udoo_neo.h +++ b/include/configs/udoo_neo.h @@ -34,21 +34,21 @@ #define CONFIG_EXTRA_ENV_SETTINGS \ "fdt_high=0xffffffff\0" \ "initrd_high=0xffffffff\0" \ - "fdt_file=undefined\0" \ + "fdtfile=undefined\0" \ "fdt_addr=0x83000000\0" \ "ip_dyn=yes\0" \ "mmcdev=0\0" \ "mmcrootfstype=ext4\0" \ "findfdt="\ "if test $board_name = BASIC; then " \ - "setenv fdt_file imx6sx-udoo-neo-basic.dtb; fi; " \ + "setenv fdtfile imx6sx-udoo-neo-basic.dtb; fi; " \ "if test $board_name = BASICKS; then " \ - "setenv fdt_file imx6sx-udoo-neo-basic.dtb; fi; " \ + "setenv fdtfile imx6sx-udoo-neo-basic.dtb; fi; " \ "if test $board_name = FULL; then " \ - "setenv fdt_file imx6sx-udoo-neo-full.dtb; fi; " \ + "setenv fdtfile imx6sx-udoo-neo-full.dtb; fi; " \ "if test $board_name = EXTENDED; then " \ - "setenv fdt_file imx6sx-udoo-neo-extended.dtb; fi; " \ - "if test $fdt_file = UNDEFINED; then " \ + "setenv fdtfile imx6sx-udoo-neo-extended.dtb; fi; " \ + "if test $fdtfile = UNDEFINED; then " \ "echo WARNING: Could not determine dtb to use; fi; \0" \ "kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \ "pxefile_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \ -- cgit From 25aaebdb123b1c59c95d5515a06f14537a870855 Mon Sep 17 00:00:00 2001 From: Kevin Hilman Date: Fri, 16 Dec 2016 13:08:10 -0800 Subject: ARM: imx7s-warp: enable USB gadget ethernet Enable USB gadget ethernet by default to have networking capabilities. Tested using DHCP and TFTP to transfer kernel, DT, ramdisk. Cc: Fabio Estevam Signed-off-by: Kevin Hilman --- board/warp7/warp7.c | 14 ++++++++++++++ configs/warp7_defconfig | 5 +++++ include/configs/warp7.h | 7 +++++++ 3 files changed, 26 insertions(+) diff --git a/board/warp7/warp7.c b/board/warp7/warp7.c index da9afb4ccd..df8e9da6f9 100644 --- a/board/warp7/warp7.c +++ b/board/warp7/warp7.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include "../freescale/common/pfuze.h" @@ -138,6 +139,19 @@ int power_init_board(void) } #endif +int board_eth_init(bd_t *bis) +{ + int ret = 0; + +#ifdef CONFIG_USB_ETHER + ret = usb_eth_initialize(bis); + if (ret < 0) + printf("Error %d registering USB ether.\n", ret); +#endif + + return ret; +} + int board_init(void) { /* address of boot parameters */ diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig index 0f0ec99e50..81acd8ff15 100644 --- a/configs/warp7_defconfig +++ b/configs/warp7_defconfig @@ -35,3 +35,8 @@ CONFIG_G_DNL_MANUFACTURER="FSL" CONFIG_G_DNL_VENDOR_NUM=0x0525 CONFIG_G_DNL_PRODUCT_NUM=0xa4a5 CONFIG_OF_LIBFDT=y + +CONFIG_CMD_NET=y +CONFIG_NET_RANDOM_ETHADDR=y +CONFIG_CMD_DHCP=y + diff --git a/include/configs/warp7.h b/include/configs/warp7.h index d3b0c5e0d6..f4a92319eb 100644 --- a/include/configs/warp7.h +++ b/include/configs/warp7.h @@ -38,6 +38,7 @@ "script=boot.scr\0" \ "image=zImage\0" \ "console=ttymxc0\0" \ + "ethact=usb_ether\0" \ "fdt_high=0xffffffff\0" \ "initrd_high=0xffffffff\0" \ "fdt_file=imx7s-warp.dtb\0" \ @@ -145,4 +146,10 @@ #define CONFIG_SYS_DFU_DATA_BUF_SIZE SZ_16M #define DFU_DEFAULT_POLL_TIMEOUT 300 +#define CONFIG_USB_ETHER +#define CONFIG_USB_ETH_CDC +#define CONFIG_USB_ETH_RNDIS +#define CONFIG_USBNET_HOST_ADDR "de:ad:be:af:00:00" +#define CONFIG_USBNET_DEV_ADDR "de:ad:be:af:00:01" + #endif -- cgit From cfb37772a1a5ce011651ac67d1c6abb77687ab89 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Mon, 26 Dec 2016 23:04:41 -0200 Subject: mx6qsabreauto: Fix the EIM clock for the mx6qp variant On the MX6Q the aclk_eim_slow_podf field is '1' after POR, while on the MX6DQP it is '3'. This makes the EIM clock to be only 66MHz on the mx6qp variant, instead of 132 MHz. Instead of relying on the POR values for the CSMR1 register, make sure to manually configure the clk_eim_slow_sel field as '00' so that EIM clock is derived from AXI clock and the aclk_eim_slow_podf field as '1' so that EIM clock can be AXI clock divided by 2. This way a consistent EIM clock frequency is configured for all the mx6 variants. Signed-off-by: Fabio Estevam Acked-by: Peng Fan --- board/freescale/mx6qsabreauto/mx6qsabreauto.c | 28 +++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/board/freescale/mx6qsabreauto/mx6qsabreauto.c b/board/freescale/mx6qsabreauto/mx6qsabreauto.c index 5fca4d11e0..51bbbc4cdf 100644 --- a/board/freescale/mx6qsabreauto/mx6qsabreauto.c +++ b/board/freescale/mx6qsabreauto/mx6qsabreauto.c @@ -231,6 +231,33 @@ static void eimnor_cs_setup(void) set_chipselect_size(CS0_128); } +static void eim_clk_setup(void) +{ + struct mxc_ccm_reg *imx_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR; + int cscmr1, ccgr6; + + + /* Turn off EIM clock */ + ccgr6 = readl(&imx_ccm->CCGR6); + ccgr6 &= ~(0x3 << 10); + writel(ccgr6, &imx_ccm->CCGR6); + + /* + * Configure clk_eim_slow_sel = 00 --> derive clock from AXI clk root + * and aclk_eim_slow_podf = 01 --> divide by 2 + * so that we can have EIM at the maximum clock of 132MHz + */ + cscmr1 = readl(&imx_ccm->cscmr1); + cscmr1 &= ~(MXC_CCM_CSCMR1_ACLK_EMI_SLOW_MASK | + MXC_CCM_CSCMR1_ACLK_EMI_SLOW_PODF_MASK); + cscmr1 |= (1 << MXC_CCM_CSCMR1_ACLK_EMI_SLOW_PODF_OFFSET); + writel(cscmr1, &imx_ccm->cscmr1); + + /* Turn on EIM clock */ + ccgr6 |= (0x3 << 10); + writel(ccgr6, &imx_ccm->CCGR6); +} + static void setup_iomux_eimnor(void) { imx_iomux_v3_setup_multiple_pads(eimnor_pads, ARRAY_SIZE(eimnor_pads)); @@ -519,6 +546,7 @@ int board_early_init_f(void) #ifdef CONFIG_NAND_MXS setup_gpmi_nand(); #endif + eim_clk_setup(); return 0; } -- cgit 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/imx6qdl_icore.h | 2 +- include/configs/imx6ul_geam.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/configs/imx6qdl_icore.h b/include/configs/imx6qdl_icore.h index 204e96e017..0125385707 100644 --- a/include/configs/imx6qdl_icore.h +++ b/include/configs/imx6qdl_icore.h @@ -131,7 +131,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 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 --- configs/imx6dl_icore_mmc_defconfig | 1 - configs/imx6dl_icore_nand_defconfig | 1 - configs/imx6dl_icore_rqs_mmc_defconfig | 1 - configs/imx6q_icore_mmc_defconfig | 1 - configs/imx6q_icore_nand_defconfig | 1 - configs/imx6q_icore_rqs_mmc_defconfig | 1 - configs/imx6ul_geam_mmc_defconfig | 1 - configs/imx6ul_geam_nand_defconfig | 1 - include/configs/imx6qdl_icore.h | 8 ++++---- include/configs/imx6qdl_icore_rqs.h | 8 ++++---- include/configs/imx6ul_geam.h | 8 ++++---- 11 files changed, 12 insertions(+), 20 deletions(-) diff --git a/configs/imx6dl_icore_mmc_defconfig b/configs/imx6dl_icore_mmc_defconfig index f17fdca1cf..dc9012819f 100644 --- a/configs/imx6dl_icore_mmc_defconfig +++ b/configs/imx6dl_icore_mmc_defconfig @@ -16,7 +16,6 @@ CONFIG_DEFAULT_FDT_FILE="imx6dl-icore.dtb" CONFIG_SPL=y CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="icorem6qdl> " -CONFIG_CMD_BOOTZ=y # CONFIG_CMD_IMLS is not set CONFIG_CMD_MEMTEST=y CONFIG_CMD_MMC=y diff --git a/configs/imx6dl_icore_nand_defconfig b/configs/imx6dl_icore_nand_defconfig index 16d9d2d2e8..400097da28 100644 --- a/configs/imx6dl_icore_nand_defconfig +++ b/configs/imx6dl_icore_nand_defconfig @@ -15,7 +15,6 @@ CONFIG_SPL=y CONFIG_SPL_DMA_SUPPORT=y CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="icorem6qdl> " -CONFIG_CMD_BOOTZ=y # CONFIG_CMD_IMLS is not set CONFIG_CMD_MEMTEST=y CONFIG_CMD_NAND=y diff --git a/configs/imx6dl_icore_rqs_mmc_defconfig b/configs/imx6dl_icore_rqs_mmc_defconfig index c3044b4d83..a362fb24f2 100644 --- a/configs/imx6dl_icore_rqs_mmc_defconfig +++ b/configs/imx6dl_icore_rqs_mmc_defconfig @@ -15,7 +15,6 @@ CONFIG_DEFAULT_FDT_FILE="imx6dl-icore-rqs.dtb" CONFIG_SPL=y CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="icorem6qdl-rqs> " -CONFIG_CMD_BOOTZ=y # CONFIG_CMD_IMLS is not set CONFIG_CMD_MEMTEST=y CONFIG_CMD_MMC=y diff --git a/configs/imx6q_icore_mmc_defconfig b/configs/imx6q_icore_mmc_defconfig index f9cee87779..a948791165 100644 --- a/configs/imx6q_icore_mmc_defconfig +++ b/configs/imx6q_icore_mmc_defconfig @@ -16,7 +16,6 @@ CONFIG_DEFAULT_FDT_FILE="imx6q-icore.dtb" CONFIG_SPL=y CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="icorem6qdl> " -CONFIG_CMD_BOOTZ=y # CONFIG_CMD_IMLS is not set CONFIG_CMD_MEMTEST=y CONFIG_CMD_MMC=y diff --git a/configs/imx6q_icore_nand_defconfig b/configs/imx6q_icore_nand_defconfig index 5221a719a8..ba9a976e98 100644 --- a/configs/imx6q_icore_nand_defconfig +++ b/configs/imx6q_icore_nand_defconfig @@ -15,7 +15,6 @@ CONFIG_SPL=y CONFIG_SPL_DMA_SUPPORT=y CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="icorem6qdl> " -CONFIG_CMD_BOOTZ=y # CONFIG_CMD_IMLS is not set CONFIG_CMD_MEMTEST=y CONFIG_CMD_NAND=y diff --git a/configs/imx6q_icore_rqs_mmc_defconfig b/configs/imx6q_icore_rqs_mmc_defconfig index 1fbebc3877..a895cca8d4 100644 --- a/configs/imx6q_icore_rqs_mmc_defconfig +++ b/configs/imx6q_icore_rqs_mmc_defconfig @@ -15,7 +15,6 @@ CONFIG_DEFAULT_FDT_FILE="imx6q-icore-rqs.dtb" CONFIG_SPL=y CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="icorem6qdl-rqs> " -CONFIG_CMD_BOOTZ=y # CONFIG_CMD_IMLS is not set CONFIG_CMD_MEMTEST=y CONFIG_CMD_MMC=y diff --git a/configs/imx6ul_geam_mmc_defconfig b/configs/imx6ul_geam_mmc_defconfig index 4740de5834..e8cc82600a 100644 --- a/configs/imx6ul_geam_mmc_defconfig +++ b/configs/imx6ul_geam_mmc_defconfig @@ -15,7 +15,6 @@ CONFIG_DEFAULT_FDT_FILE="imx6ul-geam-kit.dtb" CONFIG_SPL=y CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="geam6ul> " -CONFIG_CMD_BOOTZ=y # CONFIG_CMD_IMLS is not set CONFIG_CMD_MEMTEST=y CONFIG_CMD_MMC=y diff --git a/configs/imx6ul_geam_nand_defconfig b/configs/imx6ul_geam_nand_defconfig index 4eb72b8b10..fe40b58491 100644 --- a/configs/imx6ul_geam_nand_defconfig +++ b/configs/imx6ul_geam_nand_defconfig @@ -14,7 +14,6 @@ CONFIG_SPL=y CONFIG_SPL_DMA_SUPPORT=y CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="geam6ul> " -CONFIG_CMD_BOOTZ=y # CONFIG_CMD_IMLS is not set CONFIG_CMD_MEMTEST=y CONFIG_CMD_NAND=y diff --git a/include/configs/imx6qdl_icore.h b/include/configs/imx6qdl_icore.h index 0125385707..d57c73e906 100644 --- a/include/configs/imx6qdl_icore.h +++ b/include/configs/imx6qdl_icore.h @@ -38,7 +38,7 @@ #define CONFIG_EXTRA_ENV_SETTINGS \ "script=boot.scr\0" \ "splashpos=m,m\0" \ - "image=zImage\0" \ + "image=uImage\0" \ "console=ttymxc3\0" \ "fdt_high=0xffffffff\0" \ "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \ @@ -60,16 +60,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 \ diff --git a/include/configs/imx6qdl_icore_rqs.h b/include/configs/imx6qdl_icore_rqs.h index 01215631b6..0f39dcbf35 100644 --- a/include/configs/imx6qdl_icore_rqs.h +++ b/include/configs/imx6qdl_icore_rqs.h @@ -33,7 +33,7 @@ /* Default environment */ #define CONFIG_EXTRA_ENV_SETTINGS \ "script=boot.scr\0" \ - "image=zImage\0" \ + "image=uImage\0" \ "console=ttymxc3\0" \ "fdt_high=0xffffffff\0" \ "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \ @@ -55,16 +55,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 \ 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/imx6qdl_icore.h | 4 ++-- include/configs/imx6ul_geam.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/configs/imx6qdl_icore.h b/include/configs/imx6qdl_icore.h index d57c73e906..3848a6f045 100644 --- a/include/configs/imx6qdl_icore.h +++ b/include/configs/imx6qdl_icore.h @@ -129,8 +129,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 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 3a22808f76502b0f953fb749a34b1b7d9bc3e4da Mon Sep 17 00:00:00 2001 From: Jagan Teki Date: Wed, 21 Dec 2016 12:00:23 +0100 Subject: defconfigs: engicam: Enable MMC commands in nand For writing Linux or rootfs on to NAND, the best suitable way is to use MMC commands since MMC driver by default enabled by mx6_common.h, hence enabled MMC commands in nand defconfigs. Cc: Stefano Babic Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki --- configs/imx6dl_icore_nand_defconfig | 5 +++++ configs/imx6q_icore_nand_defconfig | 5 +++++ configs/imx6ul_geam_nand_defconfig | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/configs/imx6dl_icore_nand_defconfig b/configs/imx6dl_icore_nand_defconfig index 400097da28..a1915963f4 100644 --- a/configs/imx6dl_icore_nand_defconfig +++ b/configs/imx6dl_icore_nand_defconfig @@ -17,12 +17,17 @@ CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="icorem6qdl> " # CONFIG_CMD_IMLS is not set CONFIG_CMD_MEMTEST=y +CONFIG_CMD_MMC=y CONFIG_CMD_NAND=y CONFIG_CMD_I2C=y CONFIG_CMD_GPIO=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y CONFIG_CMD_CACHE=y +CONFIG_CMD_EXT4=y +CONFIG_CMD_EXT4_WRITE=y +CONFIG_CMD_FAT=y +CONFIG_CMD_FS_GENERIC=y # CONFIG_BLK is not set CONFIG_SYS_I2C_MXC=y # CONFIG_DM_MMC_OPS is not set diff --git a/configs/imx6q_icore_nand_defconfig b/configs/imx6q_icore_nand_defconfig index ba9a976e98..511bd53e8c 100644 --- a/configs/imx6q_icore_nand_defconfig +++ b/configs/imx6q_icore_nand_defconfig @@ -17,12 +17,17 @@ CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="icorem6qdl> " # CONFIG_CMD_IMLS is not set CONFIG_CMD_MEMTEST=y +CONFIG_CMD_MMC=y CONFIG_CMD_NAND=y CONFIG_CMD_I2C=y CONFIG_CMD_GPIO=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y CONFIG_CMD_CACHE=y +CONFIG_CMD_EXT4=y +CONFIG_CMD_EXT4_WRITE=y +CONFIG_CMD_FAT=y +CONFIG_CMD_FS_GENERIC=y # CONFIG_BLK is not set CONFIG_SYS_I2C_MXC=y # CONFIG_DM_MMC_OPS is not set diff --git a/configs/imx6ul_geam_nand_defconfig b/configs/imx6ul_geam_nand_defconfig index fe40b58491..749145ab5b 100644 --- a/configs/imx6ul_geam_nand_defconfig +++ b/configs/imx6ul_geam_nand_defconfig @@ -16,11 +16,16 @@ CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="geam6ul> " # CONFIG_CMD_IMLS is not set CONFIG_CMD_MEMTEST=y +CONFIG_CMD_MMC=y CONFIG_CMD_NAND=y CONFIG_CMD_GPIO=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y CONFIG_CMD_CACHE=y +CONFIG_CMD_EXT4=y +CONFIG_CMD_EXT4_WRITE=y +CONFIG_CMD_FAT=y +CONFIG_CMD_FS_GENERIC=y # CONFIG_BLK is not set # CONFIG_DM_MMC_OPS is not set CONFIG_NAND_MXS=y -- 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 --- configs/imx6dl_icore_nand_defconfig | 1 + configs/imx6q_icore_nand_defconfig | 1 + configs/imx6ul_geam_nand_defconfig | 1 + include/configs/imx6qdl_icore.h | 5 +++++ include/configs/imx6ul_geam.h | 5 +++++ 5 files changed, 13 insertions(+) diff --git a/configs/imx6dl_icore_nand_defconfig b/configs/imx6dl_icore_nand_defconfig index a1915963f4..3304049b86 100644 --- a/configs/imx6dl_icore_nand_defconfig +++ b/configs/imx6dl_icore_nand_defconfig @@ -19,6 +19,7 @@ CONFIG_SYS_PROMPT="icorem6qdl> " CONFIG_CMD_MEMTEST=y CONFIG_CMD_MMC=y CONFIG_CMD_NAND=y +CONFIG_CMD_UBI=y CONFIG_CMD_I2C=y CONFIG_CMD_GPIO=y CONFIG_CMD_MII=y diff --git a/configs/imx6q_icore_nand_defconfig b/configs/imx6q_icore_nand_defconfig index 511bd53e8c..c3134a6d07 100644 --- a/configs/imx6q_icore_nand_defconfig +++ b/configs/imx6q_icore_nand_defconfig @@ -19,6 +19,7 @@ CONFIG_SYS_PROMPT="icorem6qdl> " CONFIG_CMD_MEMTEST=y CONFIG_CMD_MMC=y CONFIG_CMD_NAND=y +CONFIG_CMD_UBI=y CONFIG_CMD_I2C=y CONFIG_CMD_GPIO=y CONFIG_CMD_MII=y diff --git a/configs/imx6ul_geam_nand_defconfig b/configs/imx6ul_geam_nand_defconfig index 749145ab5b..96252cb8ee 100644 --- a/configs/imx6ul_geam_nand_defconfig +++ b/configs/imx6ul_geam_nand_defconfig @@ -18,6 +18,7 @@ CONFIG_SYS_PROMPT="geam6ul> " CONFIG_CMD_MEMTEST=y CONFIG_CMD_MMC=y CONFIG_CMD_NAND=y +CONFIG_CMD_UBI=y CONFIG_CMD_GPIO=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y diff --git a/include/configs/imx6qdl_icore.h b/include/configs/imx6qdl_icore.h index 3848a6f045..55eb100eef 100644 --- a/include/configs/imx6qdl_icore.h +++ b/include/configs/imx6qdl_icore.h @@ -133,6 +133,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 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/imx6qdl_icore.h | 21 +++++++++++++++++++-- include/configs/imx6ul_geam.h | 21 +++++++++++++++++++-- 2 files changed, 38 insertions(+), 4 deletions(-) diff --git a/include/configs/imx6qdl_icore.h b/include/configs/imx6qdl_icore.h index 55eb100eef..9d5951fbfb 100644 --- a/include/configs/imx6qdl_icore.h +++ b/include/configs/imx6qdl_icore.h @@ -47,9 +47,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 ...; " \ @@ -70,9 +73,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 " \ @@ -83,6 +99,7 @@ "fi; " \ "fi; " \ "fi" +#endif /* Miscellaneous configurable options */ #define CONFIG_SYS_MEMTEST_START 0x80000000 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 --- configs/imx6dl_icore_mmc_defconfig | 3 +++ configs/imx6dl_icore_nand_defconfig | 3 +++ configs/imx6dl_icore_rqs_mmc_defconfig | 3 +++ configs/imx6q_icore_mmc_defconfig | 3 +++ configs/imx6q_icore_nand_defconfig | 3 +++ configs/imx6q_icore_rqs_mmc_defconfig | 3 +++ configs/imx6ul_geam_mmc_defconfig | 3 +++ configs/imx6ul_geam_nand_defconfig | 3 +++ include/configs/imx6qdl_icore.h | 7 +++++++ include/configs/imx6qdl_icore_rqs.h | 7 +++++++ include/configs/imx6ul_geam.h | 7 +++++++ 11 files changed, 45 insertions(+) diff --git a/configs/imx6dl_icore_mmc_defconfig b/configs/imx6dl_icore_mmc_defconfig index dc9012819f..9e8af0a13c 100644 --- a/configs/imx6dl_icore_mmc_defconfig +++ b/configs/imx6dl_icore_mmc_defconfig @@ -16,6 +16,9 @@ CONFIG_DEFAULT_FDT_FILE="imx6dl-icore.dtb" CONFIG_SPL=y CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="icorem6qdl> " +CONFIG_FIT=y +CONFIG_FIT_VERBOSE=y +CONFIG_FIT_SIGNATURE=y # CONFIG_CMD_IMLS is not set CONFIG_CMD_MEMTEST=y CONFIG_CMD_MMC=y diff --git a/configs/imx6dl_icore_nand_defconfig b/configs/imx6dl_icore_nand_defconfig index 3304049b86..da1f6f6b4b 100644 --- a/configs/imx6dl_icore_nand_defconfig +++ b/configs/imx6dl_icore_nand_defconfig @@ -15,6 +15,9 @@ CONFIG_SPL=y CONFIG_SPL_DMA_SUPPORT=y CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="icorem6qdl> " +CONFIG_FIT=y +CONFIG_FIT_VERBOSE=y +CONFIG_FIT_SIGNATURE=y # CONFIG_CMD_IMLS is not set CONFIG_CMD_MEMTEST=y CONFIG_CMD_MMC=y diff --git a/configs/imx6dl_icore_rqs_mmc_defconfig b/configs/imx6dl_icore_rqs_mmc_defconfig index a362fb24f2..3b10e99aca 100644 --- a/configs/imx6dl_icore_rqs_mmc_defconfig +++ b/configs/imx6dl_icore_rqs_mmc_defconfig @@ -14,6 +14,9 @@ CONFIG_BOOTDELAY=3 CONFIG_DEFAULT_FDT_FILE="imx6dl-icore-rqs.dtb" CONFIG_SPL=y CONFIG_HUSH_PARSER=y +CONFIG_FIT=y +CONFIG_FIT_VERBOSE=y +CONFIG_FIT_SIGNATURE=y CONFIG_SYS_PROMPT="icorem6qdl-rqs> " # CONFIG_CMD_IMLS is not set CONFIG_CMD_MEMTEST=y diff --git a/configs/imx6q_icore_mmc_defconfig b/configs/imx6q_icore_mmc_defconfig index a948791165..370768e0c8 100644 --- a/configs/imx6q_icore_mmc_defconfig +++ b/configs/imx6q_icore_mmc_defconfig @@ -15,6 +15,9 @@ CONFIG_BOOTDELAY=3 CONFIG_DEFAULT_FDT_FILE="imx6q-icore.dtb" CONFIG_SPL=y CONFIG_HUSH_PARSER=y +CONFIG_FIT=y +CONFIG_FIT_VERBOSE=y +CONFIG_FIT_SIGNATURE=y CONFIG_SYS_PROMPT="icorem6qdl> " # CONFIG_CMD_IMLS is not set CONFIG_CMD_MEMTEST=y diff --git a/configs/imx6q_icore_nand_defconfig b/configs/imx6q_icore_nand_defconfig index c3134a6d07..a5a3fc4c99 100644 --- a/configs/imx6q_icore_nand_defconfig +++ b/configs/imx6q_icore_nand_defconfig @@ -14,6 +14,9 @@ CONFIG_DEFAULT_FDT_FILE="imx6q-icore.dtb" CONFIG_SPL=y CONFIG_SPL_DMA_SUPPORT=y CONFIG_HUSH_PARSER=y +CONFIG_FIT=y +CONFIG_FIT_VERBOSE=y +CONFIG_FIT_SIGNATURE=y CONFIG_SYS_PROMPT="icorem6qdl> " # CONFIG_CMD_IMLS is not set CONFIG_CMD_MEMTEST=y diff --git a/configs/imx6q_icore_rqs_mmc_defconfig b/configs/imx6q_icore_rqs_mmc_defconfig index a895cca8d4..8df4ef0ca8 100644 --- a/configs/imx6q_icore_rqs_mmc_defconfig +++ b/configs/imx6q_icore_rqs_mmc_defconfig @@ -14,6 +14,9 @@ CONFIG_BOOTDELAY=3 CONFIG_DEFAULT_FDT_FILE="imx6q-icore-rqs.dtb" CONFIG_SPL=y CONFIG_HUSH_PARSER=y +CONFIG_FIT=y +CONFIG_FIT_VERBOSE=y +CONFIG_FIT_SIGNATURE=y CONFIG_SYS_PROMPT="icorem6qdl-rqs> " # CONFIG_CMD_IMLS is not set CONFIG_CMD_MEMTEST=y diff --git a/configs/imx6ul_geam_mmc_defconfig b/configs/imx6ul_geam_mmc_defconfig index e8cc82600a..2b53b418b3 100644 --- a/configs/imx6ul_geam_mmc_defconfig +++ b/configs/imx6ul_geam_mmc_defconfig @@ -14,6 +14,9 @@ CONFIG_BOOTDELAY=3 CONFIG_DEFAULT_FDT_FILE="imx6ul-geam-kit.dtb" CONFIG_SPL=y CONFIG_HUSH_PARSER=y +CONFIG_FIT=y +CONFIG_FIT_VERBOSE=y +CONFIG_FIT_SIGNATURE=y CONFIG_SYS_PROMPT="geam6ul> " # CONFIG_CMD_IMLS is not set CONFIG_CMD_MEMTEST=y diff --git a/configs/imx6ul_geam_nand_defconfig b/configs/imx6ul_geam_nand_defconfig index 96252cb8ee..99bc2128a4 100644 --- a/configs/imx6ul_geam_nand_defconfig +++ b/configs/imx6ul_geam_nand_defconfig @@ -13,6 +13,9 @@ CONFIG_DEFAULT_FDT_FILE="imx6ul-geam-kit.dtb" CONFIG_SPL=y CONFIG_SPL_DMA_SUPPORT=y CONFIG_HUSH_PARSER=y +CONFIG_FIT=y +CONFIG_FIT_VERBOSE=y +CONFIG_FIT_SIGNATURE=y CONFIG_SYS_PROMPT="geam6ul> " # CONFIG_CMD_IMLS is not set CONFIG_CMD_MEMTEST=y diff --git a/include/configs/imx6qdl_icore.h b/include/configs/imx6qdl_icore.h index 9d5951fbfb..2c07a9b140 100644 --- a/include/configs/imx6qdl_icore.h +++ b/include/configs/imx6qdl_icore.h @@ -121,6 +121,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 UART4_BASE diff --git a/include/configs/imx6qdl_icore_rqs.h b/include/configs/imx6qdl_icore_rqs.h index 0f39dcbf35..c36359be72 100644 --- a/include/configs/imx6qdl_icore_rqs.h +++ b/include/configs/imx6qdl_icore_rqs.h @@ -99,6 +99,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 UART4_BASE 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/imx6qdl_icore.h | 1 + include/configs/imx6qdl_icore_rqs.h | 1 + include/configs/imx6ul_geam.h | 1 + 3 files changed, 3 insertions(+) diff --git a/include/configs/imx6qdl_icore.h b/include/configs/imx6qdl_icore.h index 2c07a9b140..f25f364078 100644 --- a/include/configs/imx6qdl_icore.h +++ b/include/configs/imx6qdl_icore.h @@ -126,6 +126,7 @@ # define CONFIG_HASH_VERIFY # define CONFIG_SHA1 # define CONFIG_SHA256 +# define CONFIG_IMAGE_FORMAT_LEGACY #endif /* UART */ diff --git a/include/configs/imx6qdl_icore_rqs.h b/include/configs/imx6qdl_icore_rqs.h index c36359be72..ee25882089 100644 --- a/include/configs/imx6qdl_icore_rqs.h +++ b/include/configs/imx6qdl_icore_rqs.h @@ -104,6 +104,7 @@ # define CONFIG_HASH_VERIFY # define CONFIG_SHA1 # define CONFIG_SHA256 +# define CONFIG_IMAGE_FORMAT_LEGACY #endif /* UART */ 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/imx6qdl_icore.h | 14 +++++++------- include/configs/imx6qdl_icore_rqs.h | 14 +++++++------- include/configs/imx6ul_geam.h | 13 ++++++------- 3 files changed, 20 insertions(+), 21 deletions(-) diff --git a/include/configs/imx6qdl_icore.h b/include/configs/imx6qdl_icore.h index f25f364078..2c255e23dc 100644 --- a/include/configs/imx6qdl_icore.h +++ b/include/configs/imx6qdl_icore.h @@ -89,16 +89,16 @@ # 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 " \ + "mmc dev ${mmcdev};" \ + "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 */ diff --git a/include/configs/imx6qdl_icore_rqs.h b/include/configs/imx6qdl_icore_rqs.h index ee25882089..6f297c1941 100644 --- a/include/configs/imx6qdl_icore_rqs.h +++ b/include/configs/imx6qdl_icore_rqs.h @@ -68,16 +68,16 @@ "fi\0" #define CONFIG_BOOTCOMMAND \ - "mmc dev ${mmcdev};" \ - "mmc dev ${mmcdev}; if mmc rescan; then " \ - "if run loadbootscript; then " \ - "run bootscript; " \ - "else " \ + "mmc dev ${mmcdev};" \ + "if mmc rescan; then " \ + "if run loadbootscript; then " \ + "run bootscript; " \ + "else " \ "if run loadimage; then " \ "run mmcboot; " \ "fi; " \ - "fi; " \ - "fi" + "fi; " \ + "fi" /* Miscellaneous configurable options */ #define CONFIG_SYS_MEMTEST_START 0x80000000 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/imx6qdl_icore.h | 13 +++++++++++-- include/configs/imx6qdl_icore_rqs.h | 13 +++++++++++-- include/configs/imx6ul_geam.h | 13 +++++++++++-- 3 files changed, 33 insertions(+), 6 deletions(-) diff --git a/include/configs/imx6qdl_icore.h b/include/configs/imx6qdl_icore.h index 2c255e23dc..eb83d237ed 100644 --- a/include/configs/imx6qdl_icore.h +++ b/include/configs/imx6qdl_icore.h @@ -39,6 +39,7 @@ "script=boot.scr\0" \ "splashpos=m,m\0" \ "image=uImage\0" \ + "fit_image=fit.itb\0" \ "console=ttymxc3\0" \ "fdt_high=0xffffffff\0" \ "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \ @@ -59,6 +60,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 " \ @@ -94,8 +99,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" diff --git a/include/configs/imx6qdl_icore_rqs.h b/include/configs/imx6qdl_icore_rqs.h index 6f297c1941..6f7195d901 100644 --- a/include/configs/imx6qdl_icore_rqs.h +++ b/include/configs/imx6qdl_icore_rqs.h @@ -34,6 +34,7 @@ #define CONFIG_EXTRA_ENV_SETTINGS \ "script=boot.scr\0" \ "image=uImage\0" \ + "fit_image=fit.itb\0" \ "console=ttymxc3\0" \ "fdt_high=0xffffffff\0" \ "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \ @@ -51,6 +52,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 " \ @@ -73,8 +78,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" 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 From 1e80e13bf7a4defa916775aaf82edd7ed542342f Mon Sep 17 00:00:00 2001 From: Jagan Teki Date: Wed, 21 Dec 2016 12:02:13 +0100 Subject: imx6ul: geam6ul: Add MAINTAINERS for nand_defconfig Add Jagan as MAINTAINERS of configs/imx6ul_geam_nand_defconfig Cc: Stefano Babic Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki --- board/engicam/geam6ul/MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/board/engicam/geam6ul/MAINTAINERS b/board/engicam/geam6ul/MAINTAINERS index 66914509a1..079370ccb9 100644 --- a/board/engicam/geam6ul/MAINTAINERS +++ b/board/engicam/geam6ul/MAINTAINERS @@ -4,3 +4,4 @@ S: Maintained F: board/engicam/geam6ul F: include/configs/imx6ul_geam.h F: configs/imx6ul_geam_mmc_defconfig +F: configs/imx6ul_geam_nand_defconfig -- cgit From 696386e5f372795e5c49a21fb83ab87a97a4d43f Mon Sep 17 00:00:00 2001 From: Jagan Teki Date: Wed, 21 Dec 2016 22:14:46 +0100 Subject: imx6ul: geam6ul: Enable I2C support Enable I2C support for Engicam GEAM6UL NAND module. Cc: Stefano Babic Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki --- configs/imx6ul_geam_nand_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/imx6ul_geam_nand_defconfig b/configs/imx6ul_geam_nand_defconfig index 99bc2128a4..448529a920 100644 --- a/configs/imx6ul_geam_nand_defconfig +++ b/configs/imx6ul_geam_nand_defconfig @@ -26,6 +26,7 @@ CONFIG_CMD_GPIO=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y CONFIG_CMD_CACHE=y +CONFIG_CMD_I2C=y CONFIG_CMD_EXT4=y CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_FAT=y @@ -36,5 +37,6 @@ CONFIG_NAND_MXS=y CONFIG_FEC_MXC=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX6=y +CONFIG_SYS_I2C_MXC=y CONFIG_MXC_UART=y CONFIG_IMX_THERMAL=y -- cgit From 7c4f0ff81e6fc3b58b8af5f64c3da98624e40132 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Mon, 2 Jan 2017 08:44:04 -0200 Subject: udoo: neo: Fix indentation The standard way is to put ifdef/endif in the very first column. Signed-off-by: Fabio Estevam --- board/udoo/neo/neo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/board/udoo/neo/neo.c b/board/udoo/neo/neo.c index c5058b4542..530c45f600 100644 --- a/board/udoo/neo/neo.c +++ b/board/udoo/neo/neo.c @@ -349,9 +349,9 @@ int board_init(void) /* Active high for ncp692 */ gpio_direction_output(IMX_GPIO_NR(4, 16) , 1); - #ifdef CONFIG_SYS_I2C_MXC +#ifdef CONFIG_SYS_I2C_MXC setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1); - #endif +#endif return 0; } -- cgit