[U-Boot] problems porting to 2013.x

Hi.
I hope someone can open my eyes on this. We try to port our MX27 board to the new u-boot loader using the SPL code rather then the self hacked NAND->SDRAM.
I'm not able to get anything run. The console stays dead.
Let start here: To see if the second image is booting I tried to load the image using TFTP and memcpy/memcmp it to the TEXT_BASE (0xa7800000) and go. The u-boot-v2 is loaded at 0xa7f00000.
U-Boot 2.0.0-rc9-00188-geb5172d-dirty (Mar 24 2011 - 12:59:07) Board: MX27 NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V 8-bit) Scanning device for bad blocks Bad eraseblock 592 at 0x04a00000 dm9000 i/o: 0xd4000000, id: 0x90000a46 got MAC address from EEPROM: 00:00:00:00:00:00 Using environment in NAND Flash chip id: [2,882,1,01d] mpll: 398999390 Hz spll: 239999725 Hz arm: 265999593 Hz perclk1: 66499898 Hz perclk2: 66499898 Hz perclk3: 66499898 Hz perclk4: 66499898 Hz clkin26: 26000000 Hz ahb: 132999796 Hz ipg: 66499898 Hz Malloc space: 0xa6f00000 -> 0xa7f00000 (size 16 MB) Stack space : 0xa6ef8000 -> 0xa6f00000 (size 32 kB) running /env/bin/init...
uboot:/ tftp u-boot.bin /dev/ram0 phy0: Link is up - 100/Full TFTP from server 10.128.2.105; our IP address is 10.128.2.10 Filename 'u-boot.bin'. Loading: ########################################## done Bytes transferred = 211308 (3396c hex) uboot:/ memcpy -s /dev/ram0 0 0xa7800000 211308 uboot:/ memcmp -s /dev/ram0 0 0xa7800000 211308 OK uboot:/ go 0xa7800000 ## Starting application at 0xA7800000 ...
System.map a7800000 T __image_copy_start a7800000 T _start a7800020 t _undefined_instruction a7800024 t _software_interrupt a7800028 t _prefetch_abort a780002c t _data_abort a7800030 t _not_used a7800034 t _irq a7800038 t _fiq ...
Any Idea?
Chris

On Wednesday, October 09, 2013 01:34 PM, Chris Ruehl wrote:
Hi.
I hope someone can open my eyes on this. We try to port our MX27 board to the new u-boot loader using the SPL code rather then the self hacked NAND->SDRAM.
I'm not able to get anything run. The console stays dead.
Let start here: To see if the second image is booting I tried to load the image using TFTP and memcpy/memcmp it to the TEXT_BASE (0xa7800000) and go. The u-boot-v2 is loaded at 0xa7f00000.
U-Boot 2.0.0-rc9-00188-geb5172d-dirty (Mar 24 2011 - 12:59:07) Board: MX27 NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V 8-bit) Scanning device for bad blocks Bad eraseblock 592 at 0x04a00000 dm9000 i/o: 0xd4000000, id: 0x90000a46 got MAC address from EEPROM: 00:00:00:00:00:00 Using environment in NAND Flash chip id: [2,882,1,01d] mpll: 398999390 Hz spll: 239999725 Hz arm: 265999593 Hz perclk1: 66499898 Hz perclk2: 66499898 Hz perclk3: 66499898 Hz perclk4: 66499898 Hz clkin26: 26000000 Hz ahb: 132999796 Hz ipg: 66499898 Hz Malloc space: 0xa6f00000 -> 0xa7f00000 (size 16 MB) Stack space : 0xa6ef8000 -> 0xa6f00000 (size 32 kB) running /env/bin/init...
uboot:/ tftp u-boot.bin /dev/ram0 phy0: Link is up - 100/Full TFTP from server 10.128.2.105; our IP address is 10.128.2.10 Filename 'u-boot.bin'. Loading: ########################################## done Bytes transferred = 211308 (3396c hex) uboot:/ memcpy -s /dev/ram0 0 0xa7800000 211308 uboot:/ memcmp -s /dev/ram0 0 0xa7800000 211308 OK uboot:/ go 0xa7800000 ## Starting application at 0xA7800000 ...
System.map a7800000 T __image_copy_start a7800000 T _start a7800020 t _undefined_instruction a7800024 t _software_interrupt a7800028 t _prefetch_abort a780002c t _data_abort a7800030 t _not_used a7800034 t _irq a7800038 t _fiq ...
Any Idea?
Chris
More info: I'd compiled the hello_world make[1]: Entering directory `/opt/cross_build/uboot.d/u-boot-git/examples/standalone' arm-linux-gnueabihf-gcc -g -Os -ffunction-sections -fdata-sections -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DCONFIG_SYS_TEXT_BASE=0xa7800000 -DCONFIG_SPL_TEXT_BASE=0xa7400000 -DCONFIG_SPL_PAD_TO=5632 -I/opt/cross_build/uboot.d/u-boot-git/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/armhf/gcc-linaro-arm-linux-gnueabihf-4.8-2013.07-1_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/include -pipe -DCONFIG_ARM -D__ARM__ -marm -mno-thumb-interwork -mabi=aapcs-linux -march=armv5te -Wall -Wstrict-prototypes -fno-stack-protector -Wno-format-nonliteral -Wno-format-security -fstack-usage -fno-toplevel-reorder -o hello_world.o hello_world.c -c arm-linux-gnueabihf-gcc -g -Os -ffunction-sections -fdata-sections -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DCONFIG_SYS_TEXT_BASE=0xa7800000 -DCONFIG_SPL_TEXT_BASE=0xa7400000 -DCONFIG_SPL_PAD_TO=5632 -I/opt/cross_build/uboot.d/u-boot-git/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/armhf/gcc-linaro-arm-linux-gnueabihf-4.8-2013.07-1_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/include -pipe -DCONFIG_ARM -D__ARM__ -marm -mno-thumb-interwork -mabi=aapcs-linux -march=armv5te -Wall -Wstrict-prototypes -fno-stack-protector -Wno-format-nonliteral -Wno-format-security -fstack-usage -fno-toplevel-reorder -o stubs.o stubs.c -c arm-linux-gnueabihf-ld.bfd -r -o libstubs.o stubs.o arm-linux-gnueabihf-ld.bfd -g -Ttext 0xa0000000 \ -o hello_world -e hello_world hello_world.o libstubs.o \ -L/opt/armhf/gcc-linaro-arm-linux-gnueabihf-4.8-2013.07-1_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2 -lgcc arm-linux-gnueabihf-objcopy -O srec hello_world hello_world.srec 2>/dev/null arm-linux-gnueabihf-objcopy -O binary hello_world hello_world.bin 2>/dev/null
same, its not working
uboot:/ tftp hello_world.bin phy0: Link is up - 100/Full TFTP from server 10.128.2.105; our IP address is 10.128.2.10 Filename 'hello_world.bin'. Loading: # done Bytes transferred = 590 (24e hex) uboot:/ go hello_world.bin memmap: Invalid argument uboot:/ cp hello_world.bin /dev/ram0 uboot:/ go /dev/ram0 ## Starting application at 0xA0000000 ...
Thanks for any hint. Chris

On Wednesday, October 09, 2013 02:29 PM, Chris Ruehl wrote:
On Wednesday, October 09, 2013 01:34 PM, Chris Ruehl wrote:
Hi.
I hope someone can open my eyes on this. We try to port our MX27 board to the new u-boot loader using the SPL code rather then the self hacked NAND->SDRAM.
I'm not able to get anything run. The console stays dead.
Let start here: To see if the second image is booting I tried to load the image using TFTP and memcpy/memcmp it to the TEXT_BASE (0xa7800000) and go. The u-boot-v2 is loaded at 0xa7f00000.
U-Boot 2.0.0-rc9-00188-geb5172d-dirty (Mar 24 2011 - 12:59:07) Board: MX27 NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V 8-bit) Scanning device for bad blocks Bad eraseblock 592 at 0x04a00000 dm9000 i/o: 0xd4000000, id: 0x90000a46 got MAC address from EEPROM: 00:00:00:00:00:00 Using environment in NAND Flash chip id: [2,882,1,01d] mpll: 398999390 Hz spll: 239999725 Hz arm: 265999593 Hz perclk1: 66499898 Hz perclk2: 66499898 Hz perclk3: 66499898 Hz perclk4: 66499898 Hz clkin26: 26000000 Hz ahb: 132999796 Hz ipg: 66499898 Hz Malloc space: 0xa6f00000 -> 0xa7f00000 (size 16 MB) Stack space : 0xa6ef8000 -> 0xa6f00000 (size 32 kB) running /env/bin/init...
uboot:/ tftp u-boot.bin /dev/ram0 phy0: Link is up - 100/Full TFTP from server 10.128.2.105; our IP address is 10.128.2.10 Filename 'u-boot.bin'. Loading: ########################################## done Bytes transferred = 211308 (3396c hex) uboot:/ memcpy -s /dev/ram0 0 0xa7800000 211308 uboot:/ memcmp -s /dev/ram0 0 0xa7800000 211308 OK uboot:/ go 0xa7800000 ## Starting application at 0xA7800000 ...
System.map a7800000 T __image_copy_start a7800000 T _start a7800020 t _undefined_instruction a7800024 t _software_interrupt a7800028 t _prefetch_abort a780002c t _data_abort a7800030 t _not_used a7800034 t _irq a7800038 t _fiq ...
Any Idea?
Chris
More info: I'd compiled the hello_world make[1]: Entering directory `/opt/cross_build/uboot.d/u-boot-git/examples/standalone' arm-linux-gnueabihf-gcc -g -Os -ffunction-sections -fdata-sections -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DCONFIG_SYS_TEXT_BASE=0xa7800000 -DCONFIG_SPL_TEXT_BASE=0xa7400000 -DCONFIG_SPL_PAD_TO=5632 -I/opt/cross_build/uboot.d/u-boot-git/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/armhf/gcc-linaro-arm-linux-gnueabihf-4.8-2013.07-1_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/include -pipe -DCONFIG_ARM -D__ARM__ -marm -mno-thumb-interwork -mabi=aapcs-linux -march=armv5te -Wall -Wstrict-prototypes -fno-stack-protector -Wno-format-nonliteral -Wno-format-security -fstack-usage -fno-toplevel-reorder -o hello_world.o hello_world.c -c arm-linux-gnueabihf-gcc -g -Os -ffunction-sections -fdata-sections -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DCONFIG_SYS_TEXT_BASE=0xa7800000 -DCONFIG_SPL_TEXT_BASE=0xa7400000 -DCONFIG_SPL_PAD_TO=5632 -I/opt/cross_build/uboot.d/u-boot-git/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/armhf/gcc-linaro-arm-linux-gnueabihf-4.8-2013.07-1_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/include -pipe -DCONFIG_ARM -D__ARM__ -marm -mno-thumb-interwork -mabi=aapcs-linux -march=armv5te -Wall -Wstrict-prototypes -fno-stack-protector -Wno-format-nonliteral -Wno-format-security -fstack-usage -fno-toplevel-reorder -o stubs.o stubs.c -c arm-linux-gnueabihf-ld.bfd -r -o libstubs.o stubs.o arm-linux-gnueabihf-ld.bfd -g -Ttext 0xa0000000 \ -o hello_world -e hello_world hello_world.o libstubs.o \ -L/opt/armhf/gcc-linaro-arm-linux-gnueabihf-4.8-2013.07-1_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2 -lgcc arm-linux-gnueabihf-objcopy -O srec hello_world hello_world.srec 2>/dev/null arm-linux-gnueabihf-objcopy -O binary hello_world hello_world.bin 2>/dev/null
same, its not working
uboot:/ tftp hello_world.bin phy0: Link is up - 100/Full TFTP from server 10.128.2.105; our IP address is 10.128.2.10 Filename 'hello_world.bin'. Loading: # done Bytes transferred = 590 (24e hex) uboot:/ go hello_world.bin memmap: Invalid argument uboot:/ cp hello_world.bin /dev/ram0 uboot:/ go /dev/ram0 ## Starting application at 0xA0000000 ...
Thanks for any hint. Chris
Hi,
while I study the nand_spl.c jump to the mxc_nand_spl.c the page count is calculated ( page = from / CONFIG_SYS_NAND_PAGE_SIZE ) where from is the CONFIG_SYS_NAND_U_BOOT_OFFS
that means: #define CONFIG_SPL_PAD_TO 6144 /* must match CONFIG_SYS_NAND_PAGE_SIZE boundery */ #define CONFIG_SYS_NAND_U_BOOT_OFFS CONFIG_SPL_PAD_TO
or some funny things happen to the u-boot.bin image in ram ..
comments welcome.
Chris

Hi Chris,
On Wed, Oct 9, 2013 at 2:34 AM, Chris Ruehl chris.ruehl@gtsys.com.hk wrote:
Hi.
I hope someone can open my eyes on this. We try to port our MX27 board to the new u-boot loader using the SPL code rather then the self hacked NAND->SDRAM.
I'm not able to get anything run. The console stays dead.
I would suggest you to look to an existing mx27 supported in mainline, like Armadeus' ap27 for example:
http://git.denx.de/?p=u-boot.git;a=commitdiff;h=bcc05c7aeb5507125b463fca3c98...
Regards,
Fabio Estevam

Hi Chris,
On Wed, Oct 9, 2013 at 2:34 AM, Chris Ruehlchris.ruehl@gtsys.com.hk wrote:
Hi.
I hope someone can open my eyes on this. We try to port our MX27 board to the new u-boot loader using the SPL code rather then the self hacked NAND->SDRAM.
I'm not able to get anything run. The console stays dead.
I would suggest you to look to an existing mx27 supported in mainline, like Armadeus' ap27 for example:
http://git.denx.de/?p=u-boot.git;a=commitdiff;h=bcc05c7aeb5507125b463fca3c98...
Regards,
Fabio Estevam
Hi,
I had a quick look and many things match.. I think I have to spend a couple of days for study more details.
thanks Chris
participants (2)
-
Chris Ruehl
-
Fabio Estevam