Ulrich Hoffmann | 2 Feb 2009 16:46
Picon
Gravatar

Booting design from flash then FS-Boot, U-Boot, Kernel

Hi,
	I'm about to port Petalinux to the Spartan 3A Starter Kit (Rev D)  
Board.

I followed the Petalinux documentation closely and created a  
Microblaze design with
fs-boot and also flashed u-boot and the kernel image fine. I can now  
boot
Petalinux when I freshly download the Microblaze design via the JTAG
interface (USB-Cable).

What I would like to have is a Microblaze configuration that loads  
into the
FPGA from SPI flash at reset time.

I used IMPACT to put the bitstream in the ATMEL AT45DB161D serial
flash. On reset it indeeds downloads Microblaze and fs-boot so that I  
can
see its boot message:

  =================================================
FS-BOOT First Stage Bootloader (c) 2006 PetaLogix
=================================================
FS-BOOT: System initialisation completed.
FS-BOOT: Booting from FLASH. Press 's' for image download.
FS-BOOT: Booting image...

then nothing happens.

If I interrupt the boot process and press 's'. I can download
(Continue reading)

Deepak Yadav | 3 Feb 2009 07:50
Favicon

RE: Booting design from flash then FS-Boot, U-Boot, Kernel

Hi Ulrich,
         I am also try to port Petalinux on Spartan 3A Starter Kit .But
unable to find any linux prints on terminal  except FS_Boot prints. Can you
tell me the steps which you follows.

I am following these steps

1.Take spartum 3E-500 REVC linux kernel code.

2.Generate Kconfig for Spartum 3A board.

3.Copy this Kconfig in spartum 3E-500 REVC code.

4.Build Kernel.

5.Boot FS boot from RAM.

6.Copy kernel image(image.bin) in ram start address by using dow command.

7.Con at start address.

Thanks
Deepak

-----Original Message-----
From: owner-microblaze-uclinux@...
[mailto:owner-microblaze-uclinux@...] On Behalf Of Ulrich
Hoffmann
Sent: Monday, February 02, 2009 9:17 PM
To: microblaze-uclinux@...
(Continue reading)

Ulrich Hoffmann | 3 Feb 2009 11:30
Picon
Gravatar

Re: Booting design from flash then FS-Boot, U-Boot, Kernel

Hi Deepak,
	good to know, that you try to do the same thing :-)

I currently do not work with XMD, but given my problem I probably
will :-)

I currently use the petalinux-v0.30-rc1 - file from the web page.

I very closely followed the description in

http://developer.petalogix.com/wiki/BoardGuides/Custom/Tutorial

I ran petalinux-new-platform - Script, to create a new hardware platform
directory for the Xilinx Spartan 3A Starter Kit Rev D board that I have
and for a Linux 2.6 kernel.

Then I also built a specific Microblaze design for the Spartan 3A
Start Kit with UARTLite, parallel Flash support and EthernetLite
using the BSB (Base System Builder) and I included FS-Boot
in BRAM in this design. So, when I download the bitstream of
this design it runs FS-Boot and shows its messages on the serial
console. As the Spartan 3A starter kit has a smaller FPGA, I hat to
reduce the cache size from 8K as proposed in the tutorial to 2K
(for both ICache and DCache).

To build Petalinux (and U-Boot)  I first ran the script
peta-linux-autoconfig and then went through all the options that
are mentioned in the tutorial. The 2.6 Kernel options are
at different places than described in the tutorial, so you have to
do some searching....
(Continue reading)

Deepak Yadav | 3 Feb 2009 14:43
Favicon

RE: Booting design from flash then FS-Boot, U-Boot, Kernel

Hi Ulrich,
          Thanks for giving input. But I have one problem. I build hardware
project for Spartum 3A on window machine with os option as petalinux. After
building hardware I pick Kconfig file from there and copy manually on
Spartum3E500_REVC platform code.

After all this I build my kernel as steps mention in you document.

Is these step ok ?

Thanks
Deepak

-----Original Message-----
From: owner-microblaze-uclinux@...
[mailto:owner-microblaze-uclinux@...] On Behalf Of Ulrich
Hoffmann
Sent: Tuesday, February 03, 2009 4:01 PM
To: microblaze-uclinux@...
Subject: Re: [microblaze-uclinux] Booting design from flash then FS-Boot,
U-Boot, Kernel

Hi Deepak,
	good to know, that you try to do the same thing :-)

I currently do not work with XMD, but given my problem I probably
will :-)

I currently use the petalinux-v0.30-rc1 - file from the web page.

(Continue reading)

Michal Simek | 3 Feb 2009 15:02
Picon
Favicon

Re: Booting design from flash then FS-Boot, U-Boot, Kernel

Hi Deepak,

> Hi Ulrich,
>           Thanks for giving input. But I have one problem. I build hardware
> project for Spartum 3A on window machine with os option as petalinux. After
> building hardware I pick Kconfig file from there and copy manually on
> Spartum3E500_REVC platform code.
> 
> After all this I build my kernel as steps mention in you document.
> 
> Is these step ok ?

yes, Just one small fix. You should do dos2unix conversion for removing CR-LF
line ending.

Regards,
Michal

> Thanks
> Deepak
> 
> 
> 
> 
> -----Original Message-----
> From: owner-microblaze-uclinux@...
> [mailto:owner-microblaze-uclinux@...] On Behalf Of Ulrich
> Hoffmann
> Sent: Tuesday, February 03, 2009 4:01 PM
> To: microblaze-uclinux@...
(Continue reading)

Deepak Yadav | 3 Feb 2009 15:24
Favicon

RE: Booting design from flash then FS-Boot, U-Boot, Kernel

Hi Ulrich,
          Thanks once again. I will already do dos2unix for Kconfig file
which I copy .

Is it possible to you just send me the code which you run for Spartum 3A

Thanks
Deepak

-----Original Message-----
From: owner-microblaze-uclinux@...
[mailto:owner-microblaze-uclinux@...] On Behalf Of Michal Simek
Sent: Tuesday, February 03, 2009 7:32 PM
To: microblaze-uclinux@...
Subject: Re: [microblaze-uclinux] Booting design from flash then FS-Boot,
U-Boot, Kernel

Hi Deepak,

> Hi Ulrich,
>           Thanks for giving input. But I have one problem. I build
hardware
> project for Spartum 3A on window machine with os option as petalinux.
After
> building hardware I pick Kconfig file from there and copy manually on
> Spartum3E500_REVC platform code.
> 
> After all this I build my kernel as steps mention in you document.
> 
> Is these step ok ?
(Continue reading)

Ulrich Hoffmann | 7 Feb 2009 20:39
Picon
Gravatar

Re: Booting design from flash then FS-Boot, U-Boot, Kernel

Hi Deepak,

I uploaded the Microblaze design and the uboot and Petalinux images
for the Spartan 3A Starter Kit to

http://www.xlerb.de/transfer/Spartan3AStarterKit-MicroblazeDesign.zip

and

http://www.xlerb.de/transfer/Spartan3AStarterKit-Petalinux-0.30-rc1.zip

I'll keep them online for a couple of days.

You can try loading these into your board in order to verify that your  
board
is fine and your serial line is configured correctly.

Next would be to create design and kernel by yourself....

Regards,
		Ulrich

Am 03.02.2009 um 15:24 schrieb Deepak Yadav:

> Hi Ulrich,
>          Thanks once again. I will already do dos2unix for Kconfig  
> file
> which I copy .
>
> Is it possible to you just send me the code which you run for  
(Continue reading)

John Williams | 3 Feb 2009 03:30
Picon
Picon
Favicon

Re: Booting design from flash then FS-Boot, U-Boot, Kernel

Hi Ulrich,

On Tue, Feb 3, 2009 at 1:46 AM, Ulrich Hoffmann <uho@...> wrote:
>
> I followed the Petalinux documentation closely and created a Microblaze
> design with
> fs-boot and also flashed u-boot and the kernel image fine. I can now boot
> Petalinux when I freshly download the Microblaze design via the JTAG
> interface (USB-Cable).

You're off to a good start

> What I would like to have is a Microblaze configuration that loads into the
> FPGA from SPI flash at reset time.

So, FPGA configuration from SPI flash, and u-boot/linux kernel from
parallel flash?

The SPI and parallel flash interfaces overlap some pins, for example
AB20 is spi_MISO and FLASH_D15.  This is why Base System Builder lets
you instantiate either SPI flash or parallel flash.
But, from a configuration perspective, it shouldn't matter - after
configuration the pins revert to user IO.  So, configuration via SPI
then access to parallel flash post-config should be fine.

You might need to do some lower level debugging to find out what's going on.

Also, try configuring the FPGA from SPI, then use XMD or
petalinux-jtag-boot to download u-boot directly into DDR and run it.
Does it work, and can it acess the (parallel) flash using the flinfo,
(Continue reading)

Ulrich Hoffmann | 3 Feb 2009 11:41
Picon
Gravatar

Re: Booting design from flash then FS-Boot, U-Boot, Kernel

Hi John,
	thanks for your hints.

My design uses just parallel Flash. I only want to configure the FPGA  
from
SPI flash. As I understand and as you said, after configuration the  
parallel flash
should be available to the design (Microblaze in this case).

> You might need to do some lower level debugging to find out what's  
> going on.

Yes - but how can I debug this at a lower level? Or is the lower level  
this:

> Also, try configuring the FPGA from SPI, then use XMD or
> petalinux-jtag-boot to download u-boot directly into DDR and run it.
> Does it work, and can it acess the (parallel) flash using the flinfo,
> and erase commands?

I have not looked at XMD too much so I have to learn, how to use it.
Loading U-Boot this way directly in RAM is certainly a good way to
proceed.  This could give me a good indication of what is going on.

I will give it a try - but unfortunately I will be away from my  
development
system for a couple of days, though. I can probably report my findings
next weekend.

Regards,
(Continue reading)

Ulrich Hoffmann | 7 Feb 2009 20:01
Picon
Gravatar

Re: Booting design from flash then FS-Boot, U-Boot, Kernel

Hi John,
	
	I tried to load u-boot with XMD, here are my findings:

When I configure the FPGA via JTAG, u-boot loads fine
and boots the linux kernel.

When I configure the FPAG via SPI, u-boot loads and
elf_verify signals no error, but XMD-run does not show
any output at all in my serial console :-(

So - configuring from SPI flash and then booting from parallel
NOR flash on the Spartan 3A starter kit remains an open issue here....

However, I found a way to boot the kernel on power on nevertheless:

I tried to configure the FPGA from platform flash XF04S (using the
correct jumper settings from the manual) and programmed the
platform flash with the bitstream using IMPACT.

This works!

The FPGA is configured from platform flash including fs-boot,
this boots u-boot from parallel NOR flash
which then boots the linux kernel right into the login prompt.

So - in this configuration the Spartan 3A Starter Kit becomes
a self contained PetaLinux computer that boots on power on :-)

Great!
(Continue reading)


Gmane