From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Hornung Date: Fri, 3 Aug 2012 10:03:00 +0200 Subject: [U-Boot] i.MX35PDK: Starting U-Boot from serial NOR-Flash In-Reply-To: References: <334319B2EBE0B144BAE1402B79D82DC5D31358D5@srvpegasus> <334319B2EBE0B144BAE1402B79D82DC5D31358DF@srvpegasus> <334319B2EBE0B144BAE1402B79D82DC5D31E1CB9@srvpegasus> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Fabio, >> > > Didn't you also had to remove the init_sdram call in lowlevel_init.S ? > No, I didn't change it since it seems not to make any difference. Hope we're talking about the same, I changed the following and it did not make any difference whether it was commented or not: +++ b/board/freescale/mx35pdk/lowlevel_init.S init_sdram_start: /*init_sdram*/ - setup_sdram +/* setup_sdram */ >> >> Then I did the following change: >> >> +++ b/board/freescale/mx35pdk/mx35pdk.c >> >> size1 = get_ram_size((void *)PHYS_SDRAM_1, PHYS_SDRAM_1_SIZE); >> - size2 = get_ram_size((void *)PHYS_SDRAM_2, PHYS_SDRAM_2_SIZE); >> + size2 = 0; >> + /*size2 = get_ram_size((void *)PHYS_SDRAM_2, PHYS_SDRAM_2_SIZE);*/ > > I think we should not touch this. > Hey, but it works (halfways) :-) >> Could you please give me some hits what to do next? > > Can you please try to remove #define CONFIG_ENV_IS_IN_FLASH and insert: > > #define CONFIG_SYS_NO_FLASH > > #define CONFIG_ENV_OFFSET (6 * 64 * 1024) > #define CONFIG_ENV_SIZE (8 * 1024) > #define CONFIG_ENV_IS_IN_MMC > #define CONFIG_SYS_MMC_ENV_DEV A first quick try ended up with the following (I'll try harder today: In file included from cmd_bootm.c:81:0: /home/hmi/source/bootloader/u-boot/include/mtd/cfi_flash.h:174:22: error: unknown type name 'flash_info_t' /home/hmi/source/bootloader/u-boot/include/mtd/cfi_flash.h:174:43: error: unknown type name 'flash_sect_t' cmd_bootm.c:82:1: error: unknown type name 'flash_info_t' cmd_bootm.c: In function 'do_imls': cmd_bootm.c:1164:2: error: unknown type name 'flash_info_t' cmd_bootm.c:1171:11: error: request for member 'flash_id' in something not a structure or union cmd_bootm.c:1171:25: error: 'FLASH_UNKNOWN' undeclared (first use in this function) cmd_bootm.c:1171:25: note: each undeclared identifier is reported only once for each function it appears in cmd_bootm.c:1173:23: error: request for member 'sector_count' in something not a structure or union cmd_bootm.c:1175:22: error: request for member 'start' in something not a structure or union make[1]: *** [cmd_bootm.o] Error 1 make[1]: Leaving directory `/home/hmi/source/bootloader/u-boot/common' make: *** [common/libcommon.o] Error 2 The changes I made are as follows: +++ b/include/configs/mx35pdk.h +/* #define CONFIG_ENV_SECT_SIZE (128 * 1024) #define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE +*/ -#define CONFIG_ENV_IS_IN_FLASH +/* #define CONFIG_ENV_IS_IN_FLASH */ +#define CONFIG_SYS_NO_FLASH +#define CONFIG_ENV_OFFSET (6 * 64 * 1024) +#define CONFIG_ENV_SIZE (8 * 1024) +#define CONFIG_ENV_IS_IN_MMC +#define CONFIG_SYS_MMC_ENV_DEV Then I tried a second run with commented #define CONFIG_SYS_NO_FLASH: +/* #define CONFIG_SYS_NO_FLASH */ This ended up with the following: no-stack-protector -Wno-format-nonliteral -Wno-format-security -fstack-usage -o env_mmc.o env_mmc.c -c env_mmc.c: In function 'write_env': env_mmc.c:90:55: error: expected expression before ',' token env_mmc.c: In function 'saveenv': env_mmc.c:101:9: error: too few arguments to function 'find_mmc_device' /home/hmi/source/bootloader/u-boot/include/mmc.h:269:13: note: declared here env_mmc.c:115:57: error: expected expression before ')' token env_mmc.c: In function 'read_env': env_mmc.c:134:54: error: expected expression before ',' token env_mmc.c: In function 'env_relocate_spec': env_mmc.c:144:9: error: too few arguments to function 'find_mmc_device' /home/hmi/source/bootloader/u-boot/include/mmc.h:269:13: note: declared here make[1]: *** [env_mmc.o] Error 1 make[1]: Leaving directory `/home/hmi/source/bootloader/u-boot-hmi/common' make: *** [common/libcommon.o] Error 2 I am running Ubuntu 12.04 and ELDK 5.2.1 by the way. U-boot version is latest from http://git.denx.de/u-boot.git > > Cced Stefano in case he has any suggestions. > Thank you very much for your help, Fabio and Stefano. > Regards, > > Fabio Estevam With best regards Michael Hornung