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.mapa7800000 T __image_copy_starta7800000 T _starta7800020 t _undefined_instructiona7800024 t _software_interrupta7800028 t _prefetch_aborta780002c t _data_aborta7800030 t _not_useda7800034 t _irqa7800038 t _fiq
...
Any Idea?
Chris
Quoted 63 lines · Chris Ruehl
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 theTEXT_BASE(0xa7800000) and go. The u-boot-v2 is loaded at0xa7f00000.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 at0x04a00000
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/ram000xa7800000211308 uboot:/ memcmp -s/dev/ram000xa7800000211308
OK
uboot:/ go0xa7800000
## Starting application at0xA7800000...System.map
a7800000T__image_copy_starta7800000T_starta7800020t_undefined_instructiona7800024t_software_interrupta7800028t_prefetch_aborta780002ct_data_aborta7800030t_not_useda7800034t_irqa7800038t_fiq
...
Quoted 4 lines
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
Quoted 120 lines · Chris Ruehl
Quoted 63 lines · Chris Ruehl
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 theTEXT_BASE(0xa7800000) and go. The u-boot-v2 is loaded at0xa7f00000.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 at0x04a00000
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/ram000xa7800000211308 uboot:/ memcmp -s/dev/ram000xa7800000211308
OK
uboot:/ go0xa7800000
## Starting application at0xA7800000...System.map
a7800000T__image_copy_starta7800000T_starta7800020t_undefined_instructiona7800024t_software_interrupta7800028t_prefetch_aborta780002ct_data_aborta7800030t_not_useda7800034t_irqa7800038t_fiq
...Quoted 4 lines
Any Idea?
Chris
More info:
I'd compiled thehello_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(quoted diff) +0
-4-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(quoted diff) +0
-4-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 -carm-linux-gnueabihf-gcc -g -Os -ffunction-sections -fdata-sections
(quoted diff) +0
-4-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(quoted diff) +0
-4-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 -carm-linux-gnueabihf-ld.bfd -r -o libstubs.o stubs.o arm-linux-gnueabihf-ld.bfd -g -Ttext
0xa0000000\(quoted diff) +0
-3-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 -lgccarm-linux-gnueabihf-objcopy -O srec
hello_worldhello_world.srec 2>/dev/null
arm-linux-gnueabihf-objcopy -O binaryhello_worldhello_world.bin 2>/dev/nullsame, 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 at0xA0000000...
Quoted 2 lines
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,
Quoted 7 lines · Chris Ruehl
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:
Regards,
Fabio Estevam
Quoted 11 lines
Hi Chris,
Quoted 7 lines · Chris Ruehl
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.
Quoted 8 lines
I would suggest you to look to an existing mx27 supported in mainline, like Armadeus' ap27 for example:
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