Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
17 years ago

Trying to get u-boot to boot my image

Hi hopefully someone can help and may I say thanks in advance!!!

my configuration

Cyclone III EP3C25

EPCS16 0x08001000 0x080017ff

SDRAM 0x00000000 0x01ffffff

TEXT_BASE 0x01FB0000

# define CFG_RESET_ADDR 0x08001000 /* Hard-reset address */

# define CFG_EXCEPTION_ADDR 0x0C000020 /* Exception entry point*/

# define CFG_NIOS_SYSID_BASE 0x08002800 /* System id address */

# define CFG_NIOS_EPCSBASE (0x08001000 + 0x400) /* EPCS register base */

So I build u-boot to produce the elf file and then :-

//# Creating .flash file for the FPGA configuration

sof2flash --epcs --input=mainboard.sof --output=mainboard.flash

//# Converting UBoot elf to FLASH file

elf2flash --epcs --after=mainboard.flash --input=u-boot.elf --output=u-boot.flash

//# Programming flash with u-boot

nios2-flash-programmer --epcs --base=0x08001400 u-boot.flash --debug

//# Programming flash with the FPGA configuration

nios2-flash-programmer --epcs --base=0x08001400 mainboard.flash --debug --go

U-boot starts and looks like this:-

U-Boot 1.3.2 (Nov 5 2009 – 11:45:20)

CPU : Nios-II

SYSID : 0ca68f29, Fri Oct 23 11:59:28 2009-11-05

BOARD : EP-3C25

*** Warning – bad CRC, using default environment

==>

now a create my image file

nios2-elf-objcopy --remove-section .entry -O binary ScrougeMain.elf Scrouge.bin

gzip -9 -c Scrouge.bin > Scrouge.gz

u-boot/tools/mkimage.exe -d Scrouge.gz -A nios2 -O linux -T kernel -n "EP-3C25" -a 00000000 -e 00000000 -C gzip Scrouge.img

Now I transfer my image by Kermit (I haven’t tried to get the network stuff working yet) over the serial port

loadb 0x01000000 then do the Kermit stuff and the output is

# # Total Size = 0x0004e808 = 321544 Bytes

# # Start Addr = 0x01000000

==>

So if I now issue an image info command I get the following

## Checking Image at 01000000 ...

Image Name: EP-3C25

Image Type: Nios-II Linux Kernel Image (gzip compressed)

Data Size: 321480 Bytes = 313.9 kB

Load Address: 00000000

Entry Point: 00000000

Verifying Checksum ... OK

==>

So now I want to test my image before I try and store it in the EPCS so I issue the bootm command and the following is displayed

## Booting image at 01000000 ...

Image Name: EP-3C25

Image Type: Nios-II Linux Kernel Image (gzip compressed)

Data Size: 321480 Bytes = 313.9 kB

Load Address: 00000000

Entry Point: 00000000

Verifying Checksum ... OK

Uncompressing Kernel Image ... OK

And then nothing happens
No RepliesBe the first to reply

Recent Discussions