Re: [U-Boot] i.MX35PDK: Starting U-Boot from serial NOR-Flash

Hi Michael,
On Mon, Jul 9, 2012 at 9:57 AM, Hornung, Michael mhornung@init-ka.de wrote:
+++ b/board/freescale/mx35pdk/imximage.cfg
+BOOT_FROM spi
Please see the Freescale U-boot, you missed the initialization of the CS5:
//WEIM config-CS5 init DCDGEN(1, 4, 0xB8002050, 0x0000d843) DCDGEN(1_1, 4, 0xB8002054, 0x22252521) DCDGEN(1_2, 4, 0xB8002058, 0x22220a00)
+# DDR2 init +DATA 4 0xB8001010 0x00000304 +DATA 4 0xB8001010 0x0000030C +DATA 4 0xB8001004 0x007ffc3f +DATA 4 0xB8001000 0x92220000 +DATA 4 0x80000400 0x12345678 +DATA 4 0xB8001000 0xA2220000 +DATA 4 0x80000000 0x87654321 +DATA 4 0x80000000 0x87654321 +DATA 4 0xB8001000 0xB2220000 +DATA 1 0x80000233 0xda +DATA 1 0x82000780 0xda +DATA 1 0x82000400 0xda +DATA 4 0xB8001000 0x82226080 +DATA 4 0xB8001004 0x007ffc3f +DATA 4 0xB800100C 0x007ffc3f +DATA 4 0xB8001010 0x00000304 +DATA 4 0xB8001008 0x00002000
--- a/board/freescale/mx35pdk/lowlevel_init.S +++ b/board/freescale/mx35pdk/lowlevel_init.S
init_sdram_start: /*init_sdram*/
setup_sdram
- /* setup_sdram */
And here the result (output on the serial line):
U-Boot 2012.04.01-00077-g48bcd18-dirty (Jul 09 2012 - 15:22:31)
CPU: Freescale i.MX35 rev 2.1 at 532 MHz. Reset cause: POR I2C: ready
And that's it, no more output after "I2C: ready". Perhaps you have some more hints about what to do?
Most likely it is because it will try to access the network, but you missed to setup the CS5 as per the Freescale U-boot init sequence.
Regards,
Fabio Estevam

On Mon, Jul 9, 2012 at 9:45 PM, Fabio Estevam festevam@gmail.com wrote:
Hi Michael,
Hi Fabio,
On Mon, Jul 9, 2012 at 9:57 AM, Hornung, Michael mhornung@init-ka.de wrote:
+++ b/board/freescale/mx35pdk/imximage.cfg
+BOOT_FROM spi
Please see the Freescale U-boot, you missed the initialization of the CS5:
//WEIM config-CS5 init DCDGEN(1, 4, 0xB8002050, 0x0000d843) DCDGEN(1_1, 4, 0xB8002054, 0x22252521) DCDGEN(1_2, 4, 0xB8002058, 0x22220a00)
...
Most likely it is because it will try to access the network, but you missed to setup the CS5 as per the Freescale U-boot init sequence.
Sorry for that, I really missed it. So here what I did:
+++ b/board/freescale/mx35pdk/imximage.cfg
+#WEIM config-CS5 init +DATA 4 0xB8002050 0x0000d843 +DATA 4 0xB8002054 0x22252521 +DATA 4 0xB8002058 0x22220a00 + # DDR2 init
+++ b/config.mk RELFLAGS= $(PLATFORM_RELFLAGS) -DBGFLAGS= -g # -DDEBUG +DBGFLAGS= -g -DDEBUG
+++ b/board/freescale/mx35pdk/imximage.cfg # spi, sd (the board has no nand neither onenand)
-BOOT_FROM spi +BOOT_FROM sd
According to your advise I burned the image to a SD card and changed BT_MEM_TYPE[1:0] to 00 (SD, MMC, eMMC, or eSD). You are so right, flashing a SD card is a lot easier.
Then compiled a debugging version of U-Boot:
tools/mkimage -n "board/freescale/mx35pdk/imximage.cfg" -T imximage \ -e 0x87800000 -d u-boot.bin u-boot.imx Image Type: Freescale IMX Boot Image Image Ver: 1 (i.MX25/35/51 compatible) Data Size: 273724 Bytes = 267.31 kB = 0.26 MB Load Address: 877ff800 Entry Point: 87800000
and here is the visible ouput to the serial line:
U-Boot 2012.04.01-00081-gc831844 (Jul 10 2012 - 17:45:27)
U-Boot code: 87800000 -> 8783B87C BSS: -> 878422BC CPU: Freescale i.MX35 rev 2.1 at 532 MHz. Reset cause: POR I2C: ready
After some trial and error I came up with the follwing:
+++ b/arch/arm/lib/board.c #if defined(CONFIG_HARD_I2C) || defined(CONFIG_SOFT_I2C) init_func_i2c, #endif - dram_init, /* configure available RAM banks */ + //dram_init, /* configure available RAM banks */ NULL, };
@@ -426,8 +426,8 @@ void board_init_f(ulong bootflag)
gd->bd->bi_baudrate = gd->baudrate; /* Ram ist board specific, so move it to board code ... */ - dram_init_banksize(); - display_dram_config(); /* and display it */ + //dram_init_banksize(); + //display_dram_config(); /* and display it */
gd->relocaddr = addr; gd->start_addr_sp = addr_sp;
After those changes, U-Boot is going a little further:
U-Boot 2012.04.01-00080-gd0921d3-dirty (Jul 10 2012 - 11:31:37)
U-Boot code: 87800000 -> 8783B87C BSS: -> 878422BC CPU: Freescale i.MX35 rev 2.1 at 532 MHz. Reset cause: RST I2C: ready monitor len: 000422BC ramsize: 00000000 TLB table at: 7fff0000 Top of RAM usable for U-Boot at: 7fff0000 Reserving 264k for U-Boot at: 7ffad000 Reserving 1280k for malloc() at: 7fe6d000 Reserving 44 Bytes for Board Info at: 7fe6cfd4 Reserving 120 Bytes for Global Data at: 7fe6cf5c New Stack Pointer is: 7fe6cf50 RAM Configuration: Bank #0: 00000000 0 Bytes Bank #1: 00000000 0 Bytes relocation Offset is: f87ad000
The last (with my very limited knowledge) traceable function call is "relocate_code(addr_sp, id, addr);" from within "arch/arm/lib/board.c".
Maybe you have another idea what to do next?
By the way: Do you use a BDI3000 for debugging and if so, could you please send your board configuration file (.cfg) and your register definitions (.def).
Regards,
Fabio Estevam _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Thank you very much for your help!
With best regards
Michael Hornung

Hi Michael,
On Tue, Jul 10, 2012 at 4:08 PM, Hornung, Michael mhornung@init-ka.de wrote:
gd->bd->bi_baudrate = gd->baudrate; /* Ram ist board specific, so move it to board code ... */
dram_init_banksize();
display_dram_config(); /* and display it */
//dram_init_banksize();
//display_dram_config(); /* and display it */
Hmmm... it doesn't sound like a good idea to remove such lines.
Have you had any progress on this?
I am back to the office and can try to help you on this.
Regards,
Fabio Estevam

On Thu, Jul 26, 2012 at 10:32 PM, Fabio Estevam festevam@gmail.com wrote:
Hi Michael,
Hi Fabio,
good to hear from you.
On Tue, Jul 10, 2012 at 4:08 PM, Hornung, Michael mhornung@init-ka.de wrote:
gd->bd->bi_baudrate = gd->baudrate; /* Ram ist board specific, so move it to board code ... */
dram_init_banksize();
display_dram_config(); /* and display it */
//dram_init_banksize();
//display_dram_config(); /* and display it */
Hmmm... it doesn't sound like a good idea to remove such lines.
Have you had any progress on this?
Unfortunately I had no time to look into the matter any further, but I'll try again this week.
I am back to the office and can try to help you on this.
Thank you so much, I'll be going on asking questions, soon.
Regards,
Fabio Estevam _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
With best regards
Michael Hornung

Hi Fabio,
Have you had any progress on this?
I had some progress on my issue, here a summary of what I did:
- I configured a SD-Card as described in doc/README.imximage - I did the following changes to the U-Boot sources:
+++ b/board/freescale/mx35pdk/imximage.cfg
+BOOT_FROM sd
+#WEIM config-CS5 init +DATA 4 0xB8002050 0x0000d843 +DATA 4 0xB8002054 0x22252521 +DATA 4 0xB8002058 0x22220a00 + +# DDR2 init +DATA 4 0xB8001010 0x00000304 +DATA 4 0xB8001010 0x0000030C +DATA 4 0xB8001004 0x007ffc3f +DATA 4 0xB8001000 0x92220000 +DATA 4 0x80000400 0x12345678 +DATA 4 0xB8001000 0xA2220000 +DATA 4 0x80000000 0x87654321 +DATA 4 0x80000000 0x87654321 +DATA 4 0xB8001000 0xB2220000 +DATA 1 0x80000233 0xda +DATA 1 0x82000780 0xda +DATA 1 0x82000400 0xda +DATA 4 0xB8001000 0x82226080 +DATA 4 0xB8001004 0x007ffc3f +DATA 4 0xB800100C 0x007ffc3f +DATA 4 0xB8001010 0x00000304 +DATA 4 0xB8001008 0x00002000
+++ b/boards.cfg
-mx35pdk arm arm1136 - freescale mx35 +mx35pdk arm arm1136 - freescale mx35 mx35pdk:IMX_CONFIG=board/freescale/mx35pdk/imximage.cfg
+++ b/include/configs/mx35pdk.h
-#define CONFIG_SYS_TEXT_BASE 0xA0000000 +#define CONFIG_SYS_TEXT_BASE 0x87800000
+++ b/config.mk
-DBGFLAGS= -g # -DDEBUG +DBGFLAGS= -g -DDEBUG
This ended up as described earlier, with an U-Boot promp stoppping with the following output:
CPU: Freescale i.MX35 rev 2.1 at 532 MHz. Reset cause: POR I2C: ready
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);*/
gd->ram_size = size1 + size2;
And here the result:
U-Boot 2012.07-00024-g181e4a3 (Aug 02 2012 - 09:49:35)
U-Boot code: 87800000 -> 8783ACC8 BSS: -> 87841704 CPU: Freescale i.MX35 rev 2.1 at 532 MHz. Reset cause: POR I2C: ready monitor len: 00041704 ramsize: 08000000 TLB table at: 87ff0000 Top of RAM usable for U-Boot at: 87ff0000 Reserving 261k for U-Boot at: 87fae000 Reserving 1280k for malloc() at: 87e6e000 Reserving 40 Bytes for Board Info at: 87e6dfd8 Reserving 120 Bytes for Global Data at: 87e6df60 New Stack Pointer is: 87e6df50 RAM Configuration: Bank #0: 80000000 128 MiB Bank #1: 90000000 128 MiB relocation Offset is: 007ae000 dram_bank_mmu_setup: bank: 0 dram_bank_mmu_setup: bank: 1 monitor flash len: 00041508 Now running in RAM - U-Boot at: 87fae000 Flash: flash detect cfi fwc addr a0000000 cmd f0 f0 8bit x 8 bit fwc addr a0000000 cmd ff ff 8bit x 8 bit fwc addr a0000055 cmd 98 98 8bit x 8 bit is= cmd 51(Q) addr a0000010 is= 14 51 fwc addr a0000555 cmd 98 98 8bit x 8 bit is= cmd 51(Q) addr a0000010 is= 14 51 fwc addr a0000000 cmd f0 f0f0 16bit x 8 bit fwc addr a0000000 cmd ff ffff 16bit x 8 bit fwc addr a00000aa cmd 98 9898 16bit x 8 bit is= cmd 51(Q) addr a0000020 is= 0051 5151 fwc addr a0000aaa cmd 98 9898 16bit x 8 bit is= cmd 51(Q) addr a0000020 is= 0051 5151 fwc addr a0000000 cmd f0 00f0 16bit x 16 bit fwc addr a0000000 cmd ff 00ff 16bit x 16 bit fwc addr a00000aa cmd 98 0098 16bit x 16 bit is= cmd 51(Q) addr a0000020 is= 0051 0051 is= cmd 52(R) addr a0000022 is= 0052 0052 is= cmd 59(Y) addr a0000024 is= 0059 0059 device interface is 2 found port 2 chip 2 port 16 bits chip 16 bits 00 : 51 52 59 02 00 40 00 00 00 00 00 27 36 00 00 06 QRY..@.....'6... 10 : 06 09 13 03 05 03 02 1a 02 00 06 00 01 ff 01 00 ................ 20 : 02 00 00 00 00 00 00 00 00 00 00 00 00 8b fb 87 ................ fwc addr a0000000 cmd f0 00f0 16bit x 16 bit fwc addr a0000aaa cmd aa 00aa 16bit x 16 bit fwc addr a0000554 cmd 55 0055 16bit x 16 bit fwc addr a0000aaa cmd 90 0090 16bit x 16 bit fwc addr a0000000 cmd f0 00f0 16bit x 16 bit fwc addr a00000aa cmd 98 0098 16bit x 16 bit manufacturer is 2 manufacturer id is 0x1 device id is 0x227e device id2 is 0x2301 cfi version is 0x3133 size_ratio 1 port 16 bits chip 16 bits found 1 erase regions erase region 0: 0x020001ff erase_region_count = 512 erase_region_size = 131072 fwc addr a0000000 cmd f0 00f0 16bit x 16 bit flash_protect ON: from 0xA0000000 to 0xA0041507 fwc addr a0000000 cmd 70 0070 16bit x 16 bit flash_is_busy: 0 protect on 0 fwc addr a0020000 cmd 70 0070 16bit x 16 bit flash_is_busy: 0 protect on 1 fwc addr a0040000 cmd 70 0070 16bit x 16 bit flash_is_busy: 0 protect on 2 flash_protect ON: from 0xA0080000 to 0xA009FFFF fwc addr a0080000 cmd 70 0070 16bit x 16 bit flash_is_busy: 0 protect on 4 flash_protect ON: from 0xA00A0000 to 0xA00BFFFF fwc addr a00a0000 cmd 70 0070 16bit x 16 bit flash_is_busy: 0 protect on 5 64 MiB NAND: 4096 MiB Destroy Hash Table: 87fe94c4 table = (null) Create Hash Table: N=512 INSERT: table 87fe94c4, filled 1/521 rv 87e90f44 ==> name="addip" value="if test -n ${ipdyn};then run addip_dyn;else run addip_sta;fi" INSERT: table 87fe94c4, filled 2/521 rv 87e90a34 ==> name="addip_dyn" value="setenv bootargs ${bootargs} ip=dhcp" INSERT: table 87fe94c4, filled 3/521 rv 87e91028 ==> name="addip_sta" value="setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:${netdev}:off panic=1" INSERT: table 87fe94c4, filled 4/521 rv 87e90a70 ==> name="addmisc" value="setenv bootargs ${bootargs} ${misc}" INSERT: table 87fe94c4, filled 5/521 rv 87e91898 ==> name="addmtd" value="setenv bootargs ${bootargs} ${mtdparts}" INSERT: table 87fe94c4, filled 6/521 rv 87e91ad8 ==> name="addtty" value="setenv bootargs ${bootargs} console=ttymxc0,${baudrate}" INSERT: table 87fe94c4, filled 7/521 rv 87e90e60 ==> name="baudrate" value="115200" INSERT: table 87fe94c4, filled 8/521 rv 87e91eec ==> name="bootargs_nfs" value="setenv bootargs console=ttymxc0,${baudrate} root=/dev/nfs ip=${ipaddr} rw nfsroot=${serverip}:${rootpath}" INSERT: table 87fe94c4, filled 9/521 rv 87e910dc ==> name="bootcmd" value="run net_nfs" INSERT: table 87fe94c4, filled 10/521 rv 87e915e0 ==> name="bootdelay" value="3" INSERT: table 87fe94c4, filled 11/521 rv 87e912bc ==> name="bootfile" value="/3stack/uImage" INSERT: table 87fe94c4, filled 12/521 rv 87e91058 ==> name="ethact" value="smc911x-0" INSERT: table 87fe94c4, filled 13/521 rv 87e90cec ==> name="ethaddr" value="00:04:9f:01:2f:9a" INSERT: table 87fe94c4, filled 14/521 rv 87e90b24 ==> name="ethprime" value="smc911x" INSERT: table 87fe94c4, filled 15/521 rv 87e909d4 ==> name="flash_nfs" value="run bootargs_nfs; nand read ${loadaddr} 0x300000 0x200000; bootm" INSERT: table 87fe94c4, filled 16/521 rv 87e9173c ==> name="flash_self" value="run ramargs addip addtty addmtd addmisc;bootm ${kernel_addr} ${ramdisk_addr}" INSERT: table 87fe94c4, filled 17/521 rv 87e91928 ==> name="hostname" value=""mx35pdk"" INSERT: table 87fe94c4, filled 18/521 rv 87e91e68 ==> name="ipaddr" value="192.168.1.10" INSERT: table 87fe94c4, filled 19/521 rv 87e91118 ==> name="kernel_addr_r" value="80800000" INSERT: table 87fe94c4, filled 20/521 rv 87e915d4 ==> name="load" value="tftp ${loadaddr} ${u-boot}" INSERT: table 87fe94c4, filled 21/521 rv 87e914fc ==> name="loadaddr" value="0x80800000" INSERT: table 87fe94c4, filled 22/521 rv 87e90854 ==> name="net_nfs" value="tftp ${load_addr} ${bootfile}; run bootargs_nfs; bootm ${load_addr}" INSERT: table 87fe94c4, filled 23/521 rv 87e913d0 ==> name="net_self_load" value="tftp ${kernel_addr_r} ${bootfile};tftp ${ramdisk_addr_r} ${ramdisk_file};" INSERT: table 87fe94c4, filled 24/521 rv 87e91f34 ==> name="netdev" value="eth0" INSERT: table 87fe94c4, filled 25/521 rv 87e90950 ==> name="nfsargs" value="setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath}" INSERT: table 87fe94c4, filled 26/521 rv 87e90704 ==> name="ramargs" value="setenv bootargs root=/dev/ram rw" INSERT: table 87fe94c4, filled 27/521 rv 87e918f8 ==> name="ramdisk_file" value=""mx35pdk"/uRamdisk" INSERT: table 87fe94c4, filled 28/521 rv 87e91664 ==> name="rootpath" value="/opt/eldk-5.2.1/armv6/rootfs-qte-sdk" INSERT: table 87fe94c4, filled 29/521 rv 87e90fa4 ==> name="serverip" value="192.168.1.1" INSERT: table 87fe94c4, filled 30/521 rv 87e91340 ==> name="stderr" value="serial" INSERT: table 87fe94c4, filled 31/521 rv 87e90e00 ==> name="stdin" value="serial" INSERT: table 87fe94c4, filled 32/521 rv 87e91850 ==> name="stdout" value="serial" INSERT: table 87fe94c4, filled 33/521 rv 87e91af0 ==> name="u-boot" value=""mx35pdk"/u-boot.bin" INSERT: table 87fe94c4, filled 34/521 rv 87e91ef8 ==> name="uboot_addr" value="0xa0000000" INSERT: table 87fe94c4, filled 35/521 rv 87e91040 ==> name="upd" value="if run load;then echo Updating u-boot;if run update;then echo U-Boot updated;else echo Error updating u-boot !;echo Board without bootloader !!;fi;else echo U-Boot not downloaded..exiting;fi" INSERT: table 87fe94c4, filled 36/521 rv 87e910f4 ==> name="update" value="protect off ${uboot_addr} +40000;erase ${uboot_addr} +40000;cp.b ${loadaddr} ${uboot_addr} ${filesize}" INSERT: free(data = 87e706d0) INSERT: done In: serial Out: serial Err: serial Board: MX35 PDK 2.0 Net: eth_init: fec_probe(bd) fec_mii_setspeed: mii_speed 0000001a smc911x-0, FEC ### main_loop entered: bootdelay=3
### main_loop: bootcmd="run net_nfs" Hit any key to stop autoboot: 0 MX35 U-Boot >
U-Boot is running now (any idea why?), but unfortunately it does not run the kernel:
MX35 U-Boot > run net_nfs Trying smc911x-0 smc911x: detected LAN9217 controller smc911x: phy initialized smc911x: MAC 00:04:9f:01:2f:9a TFTP blocksize = 1468, timeout = 5000 ms Using smc911x-0 device TFTP from server 192.168.1.1; our IP address is 192.168.1.10 Filename '/3stack/uImage'. Load address: 0x80800000 Loading: send option "timeout 5" Got OACK: timeout 5 Blocksize ack: 1468, 1468 ################################################################# ################################################################# ######### done Bytes transferred = 2036440 (1f12d8 hex) CACHE: Misaligned operation at range [80800000, 809f12d8] ## Current stack ends at 0x87e6dbf8 * kernel: default image load address = 0x80800000 ## Booting kernel from Legacy Image at 80800000 ... Image Name: Linux-2.6.31-00203-g63769bf Created: 2012-05-15 10:06:22 UTC Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 2036376 Bytes = 1.9 MiB Load Address: 80008000 Entry Point: 80008000 Verifying Checksum ... OK kernel data at 0x80800040, len = 0x001f1298 (2036376) ## No init Ramdisk ramdisk start = 0x00000000, ramdisk end = 0x00000000 Loading Kernel Image ... OK OK kernel loaded at 0x80008000, end = 0x801f9298 using: ATAGS ## Transferring control to Linux (at address 80008000)...
Starting kernel ...
Uncompressing Linux...................................................................................................................................... done, booting the kernel.
And that's it, no more kernel output.
Here my environment
addip=if test -n ${ipdyn};then run addip_dyn;else run addip_sta;fi addip_dyn=setenv bootargs ${bootargs} ip=dhcp addip_sta=setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:${netdev}:off panic=1 addmisc=setenv bootargs ${bootargs} ${misc} addmtd=setenv bootargs ${bootargs} ${mtdparts} addtty=setenv bootargs ${bootargs} console=ttymxc0,${baudrate} baudrate=115200 bootargs_nfs=setenv bootargs console=ttymxc0,${baudrate} root=/dev/nfs ip=${ipaddr} rw nfsroot=${serverip}:${rootpath} bootcmd=run net_nfs bootdelay=3 bootfile=/3stack/uImage ethact=smc911x-0 ethaddr=00:04:9f:01:2f:9a ethprime=smc911x flash_nfs=run bootargs_nfs; nand read ${loadaddr} 0x300000 0x200000; bootm flash_self=run ramargs addip addtty addmtd addmisc;bootm ${kernel_addr} ${ramdisk_addr} hostname="mx35pdk" ipaddr=192.168.1.10 kernel_addr_r=80800000 load=tftp ${loadaddr} ${u-boot} loadaddr=0x80800000 net_nfs=tftp ${load_addr} ${bootfile}; run bootargs_nfs; bootm ${load_addr} net_self_load=tftp ${kernel_addr_r} ${bootfile};tftp ${ramdisk_addr_r} ${ramdisk_file}; netdev=eth0 nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath} ramargs=setenv bootargs root=/dev/ram rw ramdisk_file="mx35pdk"/uRamdisk rootpath=/opt/eldk-5.2.1/armv6/rootfs-qte-sdk serverip=192.168.1.1 stderr=serial stdin=serial stdout=serial u-boot="mx35pdk"/u-boot.bin uboot_addr=0xa0000000 upd=if run load;then echo Updating u-boot;if run update;then echo U-Boot updated;else echo Error updating u-boot !;echo Board without bootloader !!;fi;else echo U-Boot not downloaded..exiting;fi update=protect off ${uboot_addr} +40000;erase ${uboot_addr} +40000;cp.b ${loadaddr} ${uboot_addr} ${filesize}
Doing changes to the environment is not possible, the command "saveenv" ends up with an endless loop of the following message:
MX35 U-Boot > saveenv Saving Environment to Flash... Protect off A00A0000 ... A00BFFFF Un-Protecting sectors 5..5 in bank 1 fwc addr a00a0000 cmd 70 0070 16bit x 16 bit flash_is_busy: 0 . done Un-Protected 1 sectors Protect off A0080000 ... A009FFFF Un-Protecting sectors 4..4 in bank 1 fwc addr a0080000 cmd 70 0070 16bit x 16 bit flash_is_busy: 0 . done Un-Protected 1 sectors EXPORT table = 87fe94c4, htab.size = 521, htab.filled = 36, size = 131067 Unsorted: n=36 0: 87e90704 ==> ramargs => setenv bootargs root=/dev/ram rw 1: 87e90854 ==> net_nfs => tftp ${load_addr} ${bootfile}; run bootargs_nfs; bootm ${load_addr} 2: 87e90950 ==> nfsargs => setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath} 3: 87e909d4 ==> flash_nfs => run bootargs_nfs; nand read ${loadaddr} 0x300000 0x200000; bootm 4: 87e90a34 ==> addip_dyn => setenv bootargs ${bootargs} ip=dhcp 5: 87e90a70 ==> addmisc => setenv bootargs ${bootargs} ${misc} 6: 87e90b24 ==> ethprime => smc911x 7: 87e90cec ==> ethaddr => 00:04:9f:01:2f:9a 8: 87e90e00 ==> stdin => serial 9: 87e90e60 ==> baudrate => 115200 10: 87e90f44 ==> addip => if test -n ${ipdyn};then run addip_dyn;else run addip_sta;fi 11: 87e90fa4 ==> serverip => 192.168.1.1 12: 87e91028 ==> addip_sta => setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:${netdev}:off panic=1 13: 87e91040 ==> upd => if run load;then echo Updating u-boot;if run update;then echo U-Boot updated;else echo Error updating u-boot !;echo Board without bootloader !!;fi;else echo U-Boot not downloaded..exiting;fi 14: 87e91058 ==> ethact => smc911x-0 15: 87e910dc ==> bootcmd => run net_nfs 16: 87e910f4 ==> update => protect off ${uboot_addr} +40000;erase ${uboot_addr} +40000;cp.b ${loadaddr} ${uboot_addr} ${filesize} 17: 87e91118 ==> kernel_addr_r => 80800000 18: 87e912bc ==> bootfile => /3stack/uImage 19: 87e91340 ==> stderr => serial 20: 87e913d0 ==> net_self_load => tftp ${kernel_addr_r} ${bootfile};tftp ${ramdisk_addr_r} ${ramdisk_file}; 21: 87e914fc ==> loadaddr => 0x80800000 22: 87e915d4 ==> load => tftp ${loadaddr} ${u-boot} 23: 87e915e0 ==> bootdelay => 3 24: 87e91664 ==> rootpath => /opt/eldk-5.2.1/armv6/rootfs-qte-sdk 25: 87e9173c ==> flash_self => run ramargs addip addtty addmtd addmisc;bootm ${kernel_addr} ${ramdisk_addr} 26: 87e91850 ==> stdout => serial 27: 87e91898 ==> addmtd => setenv bootargs ${bootargs} ${mtdparts} 28: 87e918f8 ==> ramdisk_file => "mx35pdk"/uRamdisk 29: 87e91928 ==> hostname => "mx35pdk" 30: 87e91ad8 ==> addtty => setenv bootargs ${bootargs} console=ttymxc0,${baudrate} 31: 87e91af0 ==> u-boot => "mx35pdk"/u-boot.bin 32: 87e91e68 ==> ipaddr => 192.168.1.10 33: 87e91eec ==> bootargs_nfs => setenv bootargs console=ttymxc0,${baudrate} root=/dev/nfs ip=${ipaddr} rw nfsroot=${serverip}:${rootpath} 34: 87e91ef8 ==> uboot_addr => 0xa0000000 35: 87e91f34 ==> netdev => eth0 Erasing Flash... A0080000 ... A009FFFF ...Erase Flash from 0xa0080000 to 0xa009ffff in Bank # 1 fwc addr a0080aaa cmd aa 00aa 16bit x 16 bit fwc addr a0080554 cmd 55 0055 16bit x 16 bit fwc addr a0080aaa cmd 80 0080 16bit x 16 bit fwc addr a0080aaa cmd aa 00aa 16bit x 16 bit fwc addr a0080554 cmd 55 0055 16bit x 16 bit fwc addr a0080000 cmd 30 0030 16bit x 16 bit flash_is_busy: 1 flash_is_busy: 1 flash_is_busy: 1 ...
Could you please give me some hits what to do next?
With best regards
Michael Hornung

On 8/2/12, Michael Hornung mhornung.linux@gmail.com wrote:
Hi Fabio,
Have you had any progress on this?
I had some progress on my issue, here a summary of what I did:
- I configured a SD-Card as described in doc/README.imximage
- I did the following changes to the U-Boot sources:
+++ b/board/freescale/mx35pdk/imximage.cfg
+BOOT_FROM sd
+#WEIM config-CS5 init +DATA 4 0xB8002050 0x0000d843 +DATA 4 0xB8002054 0x22252521 +DATA 4 0xB8002058 0x22220a00
+# DDR2 init +DATA 4 0xB8001010 0x00000304 +DATA 4 0xB8001010 0x0000030C +DATA 4 0xB8001004 0x007ffc3f +DATA 4 0xB8001000 0x92220000 +DATA 4 0x80000400 0x12345678 +DATA 4 0xB8001000 0xA2220000 +DATA 4 0x80000000 0x87654321 +DATA 4 0x80000000 0x87654321 +DATA 4 0xB8001000 0xB2220000 +DATA 1 0x80000233 0xda +DATA 1 0x82000780 0xda +DATA 1 0x82000400 0xda +DATA 4 0xB8001000 0x82226080 +DATA 4 0xB8001004 0x007ffc3f +DATA 4 0xB800100C 0x007ffc3f +DATA 4 0xB8001010 0x00000304 +DATA 4 0xB8001008 0x00002000
+++ b/boards.cfg
-mx35pdk arm arm1136 - freescale mx35 +mx35pdk arm arm1136 - freescale mx35 mx35pdk:IMX_CONFIG=board/freescale/mx35pdk/imximage.cfg
+++ b/include/configs/mx35pdk.h
-#define CONFIG_SYS_TEXT_BASE 0xA0000000 +#define CONFIG_SYS_TEXT_BASE 0x87800000
+++ b/config.mk
-DBGFLAGS= -g # -DDEBUG +DBGFLAGS= -g -DDEBUG
Didn't you also had to remove the init_sdram call in lowlevel_init.S ?
This ended up as described earlier, with an U-Boot promp stoppping with the following output:
CPU: Freescale i.MX35 rev 2.1 at 532 MHz. Reset cause: POR I2C: ready
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.
gd->ram_size = size1 + size2;
And here the result:
U-Boot 2012.07-00024-g181e4a3 (Aug 02 2012 - 09:49:35)
U-Boot code: 87800000 -> 8783ACC8 BSS: -> 87841704 CPU: Freescale i.MX35 rev 2.1 at 532 MHz. Reset cause: POR I2C: ready monitor len: 00041704 ramsize: 08000000 TLB table at: 87ff0000 Top of RAM usable for U-Boot at: 87ff0000 Reserving 261k for U-Boot at: 87fae000 Reserving 1280k for malloc() at: 87e6e000 Reserving 40 Bytes for Board Info at: 87e6dfd8 Reserving 120 Bytes for Global Data at: 87e6df60 New Stack Pointer is: 87e6df50 RAM Configuration: Bank #0: 80000000 128 MiB Bank #1: 90000000 128 MiB relocation Offset is: 007ae000 dram_bank_mmu_setup: bank: 0 dram_bank_mmu_setup: bank: 1 monitor flash len: 00041508 Now running in RAM - U-Boot at: 87fae000 Flash: flash detect cfi fwc addr a0000000 cmd f0 f0 8bit x 8 bit fwc addr a0000000 cmd ff ff 8bit x 8 bit fwc addr a0000055 cmd 98 98 8bit x 8 bit is= cmd 51(Q) addr a0000010 is= 14 51 fwc addr a0000555 cmd 98 98 8bit x 8 bit is= cmd 51(Q) addr a0000010 is= 14 51 fwc addr a0000000 cmd f0 f0f0 16bit x 8 bit fwc addr a0000000 cmd ff ffff 16bit x 8 bit fwc addr a00000aa cmd 98 9898 16bit x 8 bit is= cmd 51(Q) addr a0000020 is= 0051 5151 fwc addr a0000aaa cmd 98 9898 16bit x 8 bit is= cmd 51(Q) addr a0000020 is= 0051 5151 fwc addr a0000000 cmd f0 00f0 16bit x 16 bit fwc addr a0000000 cmd ff 00ff 16bit x 16 bit fwc addr a00000aa cmd 98 0098 16bit x 16 bit is= cmd 51(Q) addr a0000020 is= 0051 0051 is= cmd 52(R) addr a0000022 is= 0052 0052 is= cmd 59(Y) addr a0000024 is= 0059 0059 device interface is 2 found port 2 chip 2 port 16 bits chip 16 bits 00 : 51 52 59 02 00 40 00 00 00 00 00 27 36 00 00 06 QRY..@.....'6... 10 : 06 09 13 03 05 03 02 1a 02 00 06 00 01 ff 01 00 ................ 20 : 02 00 00 00 00 00 00 00 00 00 00 00 00 8b fb 87 ................ fwc addr a0000000 cmd f0 00f0 16bit x 16 bit fwc addr a0000aaa cmd aa 00aa 16bit x 16 bit fwc addr a0000554 cmd 55 0055 16bit x 16 bit fwc addr a0000aaa cmd 90 0090 16bit x 16 bit fwc addr a0000000 cmd f0 00f0 16bit x 16 bit fwc addr a00000aa cmd 98 0098 16bit x 16 bit manufacturer is 2 manufacturer id is 0x1 device id is 0x227e device id2 is 0x2301 cfi version is 0x3133 size_ratio 1 port 16 bits chip 16 bits found 1 erase regions erase region 0: 0x020001ff erase_region_count = 512 erase_region_size = 131072 fwc addr a0000000 cmd f0 00f0 16bit x 16 bit flash_protect ON: from 0xA0000000 to 0xA0041507 fwc addr a0000000 cmd 70 0070 16bit x 16 bit flash_is_busy: 0 protect on 0 fwc addr a0020000 cmd 70 0070 16bit x 16 bit flash_is_busy: 0 protect on 1 fwc addr a0040000 cmd 70 0070 16bit x 16 bit flash_is_busy: 0 protect on 2 flash_protect ON: from 0xA0080000 to 0xA009FFFF fwc addr a0080000 cmd 70 0070 16bit x 16 bit flash_is_busy: 0 protect on 4 flash_protect ON: from 0xA00A0000 to 0xA00BFFFF fwc addr a00a0000 cmd 70 0070 16bit x 16 bit flash_is_busy: 0 protect on 5 64 MiB NAND: 4096 MiB Destroy Hash Table: 87fe94c4 table = (null) Create Hash Table: N=512 INSERT: table 87fe94c4, filled 1/521 rv 87e90f44 ==> name="addip" value="if test -n ${ipdyn};then run addip_dyn;else run addip_sta;fi" INSERT: table 87fe94c4, filled 2/521 rv 87e90a34 ==> name="addip_dyn" value="setenv bootargs ${bootargs} ip=dhcp" INSERT: table 87fe94c4, filled 3/521 rv 87e91028 ==> name="addip_sta" value="setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:${netdev}:off panic=1" INSERT: table 87fe94c4, filled 4/521 rv 87e90a70 ==> name="addmisc" value="setenv bootargs ${bootargs} ${misc}" INSERT: table 87fe94c4, filled 5/521 rv 87e91898 ==> name="addmtd" value="setenv bootargs ${bootargs} ${mtdparts}" INSERT: table 87fe94c4, filled 6/521 rv 87e91ad8 ==> name="addtty" value="setenv bootargs ${bootargs} console=ttymxc0,${baudrate}" INSERT: table 87fe94c4, filled 7/521 rv 87e90e60 ==> name="baudrate" value="115200" INSERT: table 87fe94c4, filled 8/521 rv 87e91eec ==> name="bootargs_nfs" value="setenv bootargs console=ttymxc0,${baudrate} root=/dev/nfs ip=${ipaddr} rw nfsroot=${serverip}:${rootpath}" INSERT: table 87fe94c4, filled 9/521 rv 87e910dc ==> name="bootcmd" value="run net_nfs" INSERT: table 87fe94c4, filled 10/521 rv 87e915e0 ==> name="bootdelay" value="3" INSERT: table 87fe94c4, filled 11/521 rv 87e912bc ==> name="bootfile" value="/3stack/uImage" INSERT: table 87fe94c4, filled 12/521 rv 87e91058 ==> name="ethact" value="smc911x-0" INSERT: table 87fe94c4, filled 13/521 rv 87e90cec ==> name="ethaddr" value="00:04:9f:01:2f:9a" INSERT: table 87fe94c4, filled 14/521 rv 87e90b24 ==> name="ethprime" value="smc911x" INSERT: table 87fe94c4, filled 15/521 rv 87e909d4 ==> name="flash_nfs" value="run bootargs_nfs; nand read ${loadaddr} 0x300000 0x200000; bootm" INSERT: table 87fe94c4, filled 16/521 rv 87e9173c ==> name="flash_self" value="run ramargs addip addtty addmtd addmisc;bootm ${kernel_addr} ${ramdisk_addr}" INSERT: table 87fe94c4, filled 17/521 rv 87e91928 ==> name="hostname" value=""mx35pdk"" INSERT: table 87fe94c4, filled 18/521 rv 87e91e68 ==> name="ipaddr" value="192.168.1.10" INSERT: table 87fe94c4, filled 19/521 rv 87e91118 ==> name="kernel_addr_r" value="80800000" INSERT: table 87fe94c4, filled 20/521 rv 87e915d4 ==> name="load" value="tftp ${loadaddr} ${u-boot}" INSERT: table 87fe94c4, filled 21/521 rv 87e914fc ==> name="loadaddr" value="0x80800000" INSERT: table 87fe94c4, filled 22/521 rv 87e90854 ==> name="net_nfs" value="tftp ${load_addr} ${bootfile}; run bootargs_nfs; bootm ${load_addr}" INSERT: table 87fe94c4, filled 23/521 rv 87e913d0 ==> name="net_self_load" value="tftp ${kernel_addr_r} ${bootfile};tftp ${ramdisk_addr_r} ${ramdisk_file};" INSERT: table 87fe94c4, filled 24/521 rv 87e91f34 ==> name="netdev" value="eth0" INSERT: table 87fe94c4, filled 25/521 rv 87e90950 ==> name="nfsargs" value="setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath}" INSERT: table 87fe94c4, filled 26/521 rv 87e90704 ==> name="ramargs" value="setenv bootargs root=/dev/ram rw" INSERT: table 87fe94c4, filled 27/521 rv 87e918f8 ==> name="ramdisk_file" value=""mx35pdk"/uRamdisk" INSERT: table 87fe94c4, filled 28/521 rv 87e91664 ==> name="rootpath" value="/opt/eldk-5.2.1/armv6/rootfs-qte-sdk" INSERT: table 87fe94c4, filled 29/521 rv 87e90fa4 ==> name="serverip" value="192.168.1.1" INSERT: table 87fe94c4, filled 30/521 rv 87e91340 ==> name="stderr" value="serial" INSERT: table 87fe94c4, filled 31/521 rv 87e90e00 ==> name="stdin" value="serial" INSERT: table 87fe94c4, filled 32/521 rv 87e91850 ==> name="stdout" value="serial" INSERT: table 87fe94c4, filled 33/521 rv 87e91af0 ==> name="u-boot" value=""mx35pdk"/u-boot.bin" INSERT: table 87fe94c4, filled 34/521 rv 87e91ef8 ==> name="uboot_addr" value="0xa0000000" INSERT: table 87fe94c4, filled 35/521 rv 87e91040 ==> name="upd" value="if run load;then echo Updating u-boot;if run update;then echo U-Boot updated;else echo Error updating u-boot !;echo Board without bootloader !!;fi;else echo U-Boot not downloaded..exiting;fi" INSERT: table 87fe94c4, filled 36/521 rv 87e910f4 ==> name="update" value="protect off ${uboot_addr} +40000;erase ${uboot_addr} +40000;cp.b ${loadaddr} ${uboot_addr} ${filesize}" INSERT: free(data = 87e706d0) INSERT: done In: serial Out: serial Err: serial Board: MX35 PDK 2.0 Net: eth_init: fec_probe(bd) fec_mii_setspeed: mii_speed 0000001a smc911x-0, FEC ### main_loop entered: bootdelay=3
### main_loop: bootcmd="run net_nfs" Hit any key to stop autoboot: 0 MX35 U-Boot >
U-Boot is running now (any idea why?), but unfortunately it does not run the kernel:
MX35 U-Boot > run net_nfs Trying smc911x-0 smc911x: detected LAN9217 controller smc911x: phy initialized smc911x: MAC 00:04:9f:01:2f:9a TFTP blocksize = 1468, timeout = 5000 ms Using smc911x-0 device TFTP from server 192.168.1.1; our IP address is 192.168.1.10 Filename '/3stack/uImage'. Load address: 0x80800000 Loading: send option "timeout 5" Got OACK: timeout 5 Blocksize ack: 1468, 1468 ################################################################# ################################################################# ######### done Bytes transferred = 2036440 (1f12d8 hex) CACHE: Misaligned operation at range [80800000, 809f12d8] ## Current stack ends at 0x87e6dbf8 * kernel: default image load address = 0x80800000 ## Booting kernel from Legacy Image at 80800000 ... Image Name: Linux-2.6.31-00203-g63769bf Created: 2012-05-15 10:06:22 UTC Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 2036376 Bytes = 1.9 MiB Load Address: 80008000 Entry Point: 80008000 Verifying Checksum ... OK kernel data at 0x80800040, len = 0x001f1298 (2036376) ## No init Ramdisk ramdisk start = 0x00000000, ramdisk end = 0x00000000 Loading Kernel Image ... OK OK kernel loaded at 0x80008000, end = 0x801f9298 using: ATAGS ## Transferring control to Linux (at address 80008000)...
Starting kernel ...
Uncompressing Linux...................................................................................................................................... done, booting the kernel.
And that's it, no more kernel output.
Here my environment
addip=if test -n ${ipdyn};then run addip_dyn;else run addip_sta;fi addip_dyn=setenv bootargs ${bootargs} ip=dhcp addip_sta=setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:${netdev}:off panic=1 addmisc=setenv bootargs ${bootargs} ${misc} addmtd=setenv bootargs ${bootargs} ${mtdparts} addtty=setenv bootargs ${bootargs} console=ttymxc0,${baudrate} baudrate=115200 bootargs_nfs=setenv bootargs console=ttymxc0,${baudrate} root=/dev/nfs ip=${ipaddr} rw nfsroot=${serverip}:${rootpath} bootcmd=run net_nfs bootdelay=3 bootfile=/3stack/uImage ethact=smc911x-0 ethaddr=00:04:9f:01:2f:9a ethprime=smc911x flash_nfs=run bootargs_nfs; nand read ${loadaddr} 0x300000 0x200000; bootm flash_self=run ramargs addip addtty addmtd addmisc;bootm ${kernel_addr} ${ramdisk_addr} hostname="mx35pdk" ipaddr=192.168.1.10 kernel_addr_r=80800000 load=tftp ${loadaddr} ${u-boot} loadaddr=0x80800000 net_nfs=tftp ${load_addr} ${bootfile}; run bootargs_nfs; bootm ${load_addr} net_self_load=tftp ${kernel_addr_r} ${bootfile};tftp ${ramdisk_addr_r} ${ramdisk_file}; netdev=eth0 nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath} ramargs=setenv bootargs root=/dev/ram rw ramdisk_file="mx35pdk"/uRamdisk rootpath=/opt/eldk-5.2.1/armv6/rootfs-qte-sdk serverip=192.168.1.1 stderr=serial stdin=serial stdout=serial u-boot="mx35pdk"/u-boot.bin uboot_addr=0xa0000000 upd=if run load;then echo Updating u-boot;if run update;then echo U-Boot updated;else echo Error updating u-boot !;echo Board without bootloader !!;fi;else echo U-Boot not downloaded..exiting;fi update=protect off ${uboot_addr} +40000;erase ${uboot_addr} +40000;cp.b ${loadaddr} ${uboot_addr} ${filesize}
Doing changes to the environment is not possible, the command "saveenv" ends up with an endless loop of the following message:
MX35 U-Boot > saveenv Saving Environment to Flash... Protect off A00A0000 ... A00BFFFF Un-Protecting sectors 5..5 in bank 1 fwc addr a00a0000 cmd 70 0070 16bit x 16 bit flash_is_busy: 0 . done Un-Protected 1 sectors Protect off A0080000 ... A009FFFF Un-Protecting sectors 4..4 in bank 1 fwc addr a0080000 cmd 70 0070 16bit x 16 bit flash_is_busy: 0 . done Un-Protected 1 sectors EXPORT table = 87fe94c4, htab.size = 521, htab.filled = 36, size = 131067 Unsorted: n=36 0: 87e90704 ==> ramargs => setenv bootargs root=/dev/ram rw 1: 87e90854 ==> net_nfs => tftp ${load_addr} ${bootfile}; run bootargs_nfs; bootm ${load_addr} 2: 87e90950 ==> nfsargs => setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath} 3: 87e909d4 ==> flash_nfs => run bootargs_nfs; nand read ${loadaddr} 0x300000 0x200000; bootm 4: 87e90a34 ==> addip_dyn => setenv bootargs ${bootargs} ip=dhcp 5: 87e90a70 ==> addmisc => setenv bootargs ${bootargs} ${misc} 6: 87e90b24 ==> ethprime => smc911x 7: 87e90cec ==> ethaddr => 00:04:9f:01:2f:9a 8: 87e90e00 ==> stdin => serial 9: 87e90e60 ==> baudrate => 115200 10: 87e90f44 ==> addip => if test -n ${ipdyn};then run addip_dyn;else run addip_sta;fi 11: 87e90fa4 ==> serverip => 192.168.1.1 12: 87e91028 ==> addip_sta => setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:${netdev}:off panic=1 13: 87e91040 ==> upd => if run load;then echo Updating u-boot;if run update;then echo U-Boot updated;else echo Error updating u-boot !;echo Board without bootloader !!;fi;else echo U-Boot not downloaded..exiting;fi 14: 87e91058 ==> ethact => smc911x-0 15: 87e910dc ==> bootcmd => run net_nfs 16: 87e910f4 ==> update => protect off ${uboot_addr} +40000;erase ${uboot_addr} +40000;cp.b ${loadaddr} ${uboot_addr} ${filesize} 17: 87e91118 ==> kernel_addr_r => 80800000 18: 87e912bc ==> bootfile => /3stack/uImage 19: 87e91340 ==> stderr => serial 20: 87e913d0 ==> net_self_load => tftp ${kernel_addr_r} ${bootfile};tftp ${ramdisk_addr_r} ${ramdisk_file}; 21: 87e914fc ==> loadaddr => 0x80800000 22: 87e915d4 ==> load => tftp ${loadaddr} ${u-boot} 23: 87e915e0 ==> bootdelay => 3 24: 87e91664 ==> rootpath => /opt/eldk-5.2.1/armv6/rootfs-qte-sdk 25: 87e9173c ==> flash_self => run ramargs addip addtty addmtd addmisc;bootm ${kernel_addr} ${ramdisk_addr} 26: 87e91850 ==> stdout => serial 27: 87e91898 ==> addmtd => setenv bootargs ${bootargs} ${mtdparts} 28: 87e918f8 ==> ramdisk_file => "mx35pdk"/uRamdisk 29: 87e91928 ==> hostname => "mx35pdk" 30: 87e91ad8 ==> addtty => setenv bootargs ${bootargs} console=ttymxc0,${baudrate} 31: 87e91af0 ==> u-boot => "mx35pdk"/u-boot.bin 32: 87e91e68 ==> ipaddr => 192.168.1.10 33: 87e91eec ==> bootargs_nfs => setenv bootargs console=ttymxc0,${baudrate} root=/dev/nfs ip=${ipaddr} rw nfsroot=${serverip}:${rootpath} 34: 87e91ef8 ==> uboot_addr => 0xa0000000 35: 87e91f34 ==> netdev => eth0 Erasing Flash... A0080000 ... A009FFFF ...Erase Flash from 0xa0080000 to 0xa009ffff in Bank # 1 fwc addr a0080aaa cmd aa 00aa 16bit x 16 bit fwc addr a0080554 cmd 55 0055 16bit x 16 bit fwc addr a0080aaa cmd 80 0080 16bit x 16 bit fwc addr a0080aaa cmd aa 00aa 16bit x 16 bit fwc addr a0080554 cmd 55 0055 16bit x 16 bit fwc addr a0080000 cmd 30 0030 16bit x 16 bit flash_is_busy: 1 flash_is_busy: 1 flash_is_busy: 1 ...
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
Cced Stefano in case he has any suggestions.
Regards,
Fabio Estevam

On 02/08/2012 14:55, Fabio Estevam wrote:
On 8/2/12, Michael Hornung mhornung.linux@gmail.com wrote:
Hi Fabio,
Hi Michael,
Starting kernel ...
Uncompressing Linux...................................................................................................................................... done, booting the kernel.
And that's it, no more kernel output.
At this point, there is no difference for u-boot starting the kernel if it has booted in external or internal mode. It seems an unrelated issue.
On mx35pdk you can reset the board without powerd off. You should check the address in kernel for the log buffer (__log_buf in System.map) and then check it after a reset in u-boot with the "md" command. If we are lucky, the RAM does not lose its values. Better will be if you have a JTAG debugger and can you check inside memory directly when the kernel hangs without rebooting.
Here my environment
addip=if test -n ${ipdyn};then run addip_dyn;else run addip_sta;fi addip_dyn=setenv bootargs ${bootargs} ip=dhcp addip_sta=setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:${netdev}:off panic=1 addmisc=setenv bootargs ${bootargs} ${misc} addmtd=setenv bootargs ${bootargs} ${mtdparts} addtty=setenv bootargs ${bootargs} console=ttymxc0,${baudrate} baudrate=115200 bootargs_nfs=setenv bootargs console=ttymxc0,${baudrate} root=/dev/nfs
Depending on the kernel version, ttymxc0 could be wrong. Have you checked it ?
Best regards, Stefano Babic

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

On 03/08/2012 10:03, Michael Hornung wrote:
Hi Fabio,
Hi Michael,
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 */
Because the RAM is already set up via the imximage.
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) :-)
It depends on your mx35pdk. The board can be equipped with one or two banks. If it works commenting these lines, it means that in your imximage.cfg you set only one bank. The setup_sdram() sets both banks.
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:
Mmhh...you had already a running u-boot - your problem is moved, because the kernel is not correctly started.
I think you should start from this condition (the running u-boot) and try to understand where the kernel hangs. This can be of course something related to u-boot and in u-boot code, but trying to disable things that worked can be completelky unrelated.
By the way, if you set CONFIG_SYS_NO_FLASH, you should also set that the environment is embedded (that means, you have only the default) and deactivate the flash driver (CONFIG_CFI).
Best regards, Stefano Babic
participants (4)
-
Fabio Estevam
-
Hornung, Michael
-
Michael Hornung
-
Stefano Babic