uClinux on Spartan 3

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hi.
I want to install uClinux on a Spartan 3 XC3S1000.
Now I need auto-config.in file to compile uClinux distro!
But...How to generate this file "auto-config.in"?
What I need?
I'm using EDK 8.1i sp2 on Windows XP.

Thanks


Re: uClinux on Spartan 3
Hi Lancer,


Quoted text here. Click to load it

Take a look at developer.petalogix.com - there are quick start guides,
complete documentation, tutorials and all sort of things to get you going.

If you take a look at the MSS file in some of the reference designs we
provide (e.g. S3E-1600 or -500 boards), you'll see how the "OS" section
defines which memory device to use, the IO peripherals and so on.

The auto-config.in file is generated during the EDK project build phase
(libgen).  Then there is a petalinux helper script called
petalinux-copy-autoconfig that automatically copies it across from the
EDK HW directory into the correct place in the uClinux SW tree.

One thing to note, Windows is not a supported environment for building
Microblaze / uClinux systems.  It may be one day, but for now you'll
need a Linux box or virtual machine to build the embedded Linux software.

Regards,

Regards,

John

Re: uClinux on Spartan 3

First of all, thanks for your reply (and sorry for my english, I'm an
italian student...)

Quoted text here. Click to load it

...but petalogix provide petalinux documentations, isn't it?

Quoted text here. Click to load it

I've downloaded examples at this link:
http://www.petalogix.com/resources/reference_designs/xilinx

Quoted text here. Click to load it

I'm using Slack 11 machine to build uClinux, and Win XP SP2 machine
with Xilinx tools to build Microblaze project.
When I begin a project, I specify the repository path
(edk_user_repository) that I've downloaded there:
http://www.petalogix.com/resources/downloads/uclinux-bsp (BSP uClinux
package)
Then I build my Microblaze (for my Spartan 3 XC3S1000) e then I specify
in "Software Platform Settings" the uClinux OS.
Then I launch the libgen, and always I obtain this error message:

"ERROR:MDT - ERROR FROM TCL:- uclinux () - ERROR :: No MAIN_MEMORY
peripheral or
   START/SIZE parameters specified
       while executing
   "error "ERROR :: $""
       (procedure "do_manual_memory_setup" line 14)
       invoked from within
   "do_manual_memory_setup $config_file $os_handle $param_prefix
$config_prefix"
       (procedure "do_memory_setup" line 14)
       invoked from within
   "do_memory_setup $config_file $os_handle "MAIN_MEMORY"
CONFIG_XILINX_ERAM"
       (procedure "::sw_uclinux_v1_00_d::generate" line 22)
       invoked from within
   "::sw_uclinux_v1_00_d::generate 42422920"

Copying Library Files ...

ERROR:MDT - Error while running "generate" for processor
microblaze_0...

make: *** [microblaze_0/lib/libxil.a] Error 2

Done!"


What does it means?
Thank you very much

Regards


Re: uClinux on Spartan 3
Hi Lancer,


Quoted text here. Click to load it

Yes - and PetaLinux is how we advise people to get started now.  It
includes Linux source tree, compiler tool chains, reference designs and
helper scripts - basically all in one rather than getting bits and
pieces from all over the place.

Quoted text here. Click to load it

That should be fine - make sure you do a dos2unix conversion on the
auto-config.in file when you copy it from Windows -> Linux.

Quoted text here. Click to load it

A typical MSS OS section will look like this:

BEGIN OS
  PARAMETER OS_NAME = uclinux
  PARAMETER OS_VER = 1.00.d
  PARAMETER PROC_INSTANCE = microblaze_0
  PARAMETER stdout = RS232_Uart
  PARAMETER stdin = RS232_Uart
  PARAMETER LMB_MEMORY = ilmb_cntlr
  PARAMETER MAIN_MEMORY = DDR_SDRAM_32Mx64
  PARAMETER main_memory_bank = 0
END

You must substitute the instance name of your DDR/SDRAM controller into
the "MAIN_MEMORY=" line, and similarly for the stdout/stdin selections.

The error message you received suggests that you have not specified the
MAIN_MEMORY paramter in your MSS file.

You can use the XPS GUI to specifiy all of this - once you have chosen
the uClinux BSP, then you move to the next tab to customise it.  It will
present options to you for setting the main_memory peripheral and so on.

I hope this helps,

Regards,

John

Re: uClinux on Spartan 3


Quoted text here. Click to load it

Ok, many thanks, in XPS I've set main memory on SRAM_256Kx32, main
memory bank on 0, and flash memory on none (I'm using spartan 3
XC3S1000). Is it correct?
Flash memory should be none? XC3S1000 has XCF04S (4 Mbit)
configuration PROM. But I'm unable to set it in Software Platform
Settings...
Although this, now XPS has generated auto-config.in, I've set it in
UNIX format, and put it in uclinux-auto folder.
Make dep ends with no error, but make ends with /fs/binfmt_flat.c
error in function decompress_exec...
I don't know why...
Do you know what kind of problem is this?

Many thanks

Regards


Re: uClinux on Spartan 3
Hi Lancer,


Quoted text here. Click to load it

1M of SRAM won't be sufficient for a simple kernel bringup.   It can be
done if you execute the kernel from flash and other little tricks, but I
wouldn't recommend it for a first attempt.

But otherwise, in principle your settings sound correct.

Quoted text here. Click to load it

That's correct, it is intended for access to conventional parallel flash
on the board, accessed via an opb_emc memory controller.

Quoted text here. Click to load it

If you post the error output from the compiler I might be able to help.

I suggest you purchase one of the S3E-50 or -160 starter kits to get a
platform that will happily run embedded Linux on the MicroBlaze.  These
boards have plenty of memory and were more or less designed with
MicroBlaze/Linux in mind.

Also, I suggest you subscribe to the microblaze-uclinux mailing list -
there's a greater concentration of people able to assist there than here
on comp.arch.fpga.  Details here:

http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux/Mailing_List

Regards,

John

Re: uClinux on Spartan 3
Quoted text here. Click to load it
the compiler I might be able to help.
Quoted text here. Click to load it

Ok, as soon as it possible, I'll post it.

Quoted text here. Click to load it

S3 Starter board isn't mine, I'm using it in University Lab.
But we have also XUPV2P, that run very well uclinux, but my work it's
to port uclinux on S3...
Do you think is it possible?

Quoted text here. Click to load it

I'm already subscribed :-)

Many thanks

Regards


Re: uClinux on Spartan 3

Quoted text here. Click to load it

Sure, it's possible, but as I said your 1M memory limit will be
challenging.  Kernel boot from flash is supported in the kernel and
petalinux distribution - once you have selected your vendor/platform
combo, in "Kernel settings -> Processor options", choose "ROM" for the
memory model, instead of RAM.

You'll need to enter the start address and size of the flash region that
will host the kernel image.  The kernel link script will be
automatically adjusted to link it from the correct address.

To boot the board you'll have to write the image into the flash memory.
  You can use the EDK's flash_writer XMD/TCL scripts for this.

Finally, to boot the board just use PetaLinux's fs-boot or some trivial
bootloader to jump to the correct start address in flash.

Having to write the kernel inrto flash each time you rebuild might get
painful, but it's possible.

Regards,

John


Site Timeline