RE: Booting Linux from an ACE File

2008-05-19 Thread Stephen Neuendorffer


 -Original Message-
 From: [EMAIL PROTECTED]
[mailto:linuxppc-embedded-
 [EMAIL PROTECTED] On Behalf Of mojtaba
 Sent: Friday, May 16, 2008 4:58 AM
 To: linuxppc-embedded@ozlabs.org
 Subject: Booting Linux from an ACE File
 
 Dear all,
 
 Could you please explain what happens exactly when Linux is booting
from a
 compact flash?

The systemAce file is essentially a script of JTAG commands, some of
which target the FPGA with configuration data and some target the
PowerPC/microblaze with memory write commands.

 To my few knowledge, the Linux compressed image will be copied
somewhere in
 memory, will be uncompressed and the control will jump to the
beginning
 address of the Linux kernel.
 
 Is there any boot loader that copies the Linux compressed image to the
 memory?

Essentially SystemAce does this for you and jumps to the Linux
bootwrapper code which begins decompressing the kernel.

 Where in memory does it put the Linux kernel? For example, if I have 2
DDRs
 in my hardware, in which of them it will be put the kernel?

The kernel is compiled at a particular address, typically targetting
whatever memory is low in the system.  I believe the default target
address is 0x4.  So whatever DDR memory lives at this address will
be targetted.

 Can I set the kernel location in memory manually?

If you change how the bootwrapper code and linker script work, yes.

 Might be an stupid question but: Is it possible for the kernel to be
half in
 BRAMS and half in DDR?

There have been some recent patches on the microblaze mailing lists that
attempt to put some of the latency-critical code (exception handlers and
the like) in BRAM.  Doing this is likely pretty architecture specific,
since you probably have a particular goal in mind.

Steve

This email and any attachments are intended for the sole use of the named 
recipient(s) and contain(s) confidential information that may be proprietary, 
privileged or copyrighted under applicable law. If you are not the intended 
recipient, do not read, copy, or forward this email message or any attachments. 
Delete this email message and any attachments immediately.


___
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded


Booting Linux from an ACE File

2008-05-16 Thread mojtaba
Dear all,

Could you please explain what happens exactly when Linux is booting from a
compact flash?

To my few knowledge, the Linux compressed image will be copied somewhere in
memory, will be uncompressed and the control will jump to the beginning
address of the Linux kernel.

Is there any boot loader that copies the Linux compressed image to the
memory?

Where in memory does it put the Linux kernel? For example, if I have 2 DDRs
in my hardware, in which of them it will be put the kernel?

Can I set the kernel location in memory manually?

Might be an stupid question but: Is it possible for the kernel to be half in
BRAMS and half in DDR?

Regards,
Moji

___
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded


Re: Booting Linux from an ACE File

2008-05-16 Thread Marco Stornelli

mojtaba ha scritto:

Dear all,

Could you please explain what happens exactly when Linux is booting from a
compact flash?

To my few knowledge, the Linux compressed image will be copied somewhere in
memory, will be uncompressed and the control will jump to the beginning
address of the Linux kernel.

Is there any boot loader that copies the Linux compressed image to the
memory?

Where in memory does it put the Linux kernel? For example, if I have 2 DDRs
in my hardware, in which of them it will be put the kernel?

Can I set the kernel location in memory manually?

Might be an stupid question but: Is it possible for the kernel to be half in
BRAMS and half in DDR?

Regards,
Moji

___
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded



 Is there any boot loader that copies the Linux compressed image to the
 memory?

Yes there are several boot-loader for example U-Boot.

 Where in memory does it put the Linux kernel? For example, if I have 
2 DDRs in my hardware, in which of them it will be put the kernel?


The kernel usually is copied at the start of the memory, so if you have 
mapped the address 0x in the first bank, here will be copied it.


 Can I set the kernel location in memory manually?

Yes but usually it's not needed and you have to be carefully to modify it.
___
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded


Re: Booting Linux from an ACE File

2008-05-16 Thread Grant Likely
On Fri, May 16, 2008 at 5:57 AM, mojtaba [EMAIL PROTECTED] wrote:
 Dear all,

 Could you please explain what happens exactly when Linux is booting from a
 compact flash?

 To my few knowledge, the Linux compressed image will be copied somewhere in
 memory, will be uncompressed and the control will jump to the beginning
 address of the Linux kernel.

There are several methods to do this.

Option 1 is to pass the kernel zImage.elf to genace so that it gets
wrapped up into the ace file itself and is loaded into RAM by the
SystemACE on FPGA initialization.  However, this requires that your
FPGA design gets RAM initialized before the SysACE starts squirting in
the Linux image (which isn't always the case).  This option is also
slow.

Option 2 is to use an small bootloader blob (I think Xilinx has a
technote with something suitable) loaded into BRAM that reads the CF
card and copies a Linux image (hint; build a simpleImage when using
arch/powerpc) off the CF and into RAM.  This method boots the system
faster, but requires a little bit more work.

Cheers,
g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
___
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded