Linux 2.6 from git.xilinx and XUPV2P
Hi all,
I'm a beginner in Xilinx & Linux world and I'm getting a bit loose. I'm
trying to run linux kernel 2.6 that I downloaded from the xilinx git server on the PPC405 of the Xilinx university program Virtex II Pro (XUPV2P for the search engine) board, and I'm using the compiler ELDK 4.1 (I' ve just read this compiler may cause some error so I'll change it, and try the 4.0 version) and I'm getting a lot of compilation error and warning.
I think this is what I should use, Does anybody if I have to patch this kernel or if it is still prepatched??
My compiler can find some definitions like TASK_SIZE or CONFIG_KERNEL_START, now I'm solving it writting the values manually , I google for the error and make the definition where it's needed, but I don't think this is a good idea ;). I think this definitions should be defined in the .config file, because I found the values I wrote on a posted message in this list.
Maybe somebody could guide me a bit through this kernel compilation, or send me .config file running. I don't know if a revision in the project is a good way, to put things in situation for beginers.
Thanks, any info would be interesting.
Signature · 2 lines
View this message in context: http://www.nabble.com/Linux-2.6-from-git.xilinx-and-XUPV2P-tp14274035p14274035.html Sent from the linuxppc-embedded mailing list archive at Nabble.com.
Quoted 9 lines · greenlean
Hi all,
I'm a beginner in Xilinx & Linux world and I'm getting a bit loose. I'm
trying to run linux kernel 2.6 that I downloaded from the xilinx git server on the PPC405 of the Xilinx university program Virtex II Pro (XUPV2P for the search engine) board, and I'm using the compiler ELDK 4.1 (I' ve just read this compiler may cause some error so I'll change it, and try the 4.0 version) and I'm getting a lot of compilation error and warning.
Hmm. I use ELDK 4.1 daily and I've not had any problems on the virtex. What compile errors are you getting?
Quoted 2 lines
I think this is what I should use, Does anybody if I have to patch this kernel or if it is still prepatched??
The xilinx git tree should be ready to go without patches. In fact, the mainline Linux tree supports the Virtex powerpc. All that is missing is some of the device drivers (EMAC, TEMAC).
Quoted 5 lines
My compiler can find some definitions like
TASK_SIZEorCONFIG_KERNEL_START, now I'm solving it writting the values manually , I google for the error and make the definition where it's needed, but I don't think this is a good idea ;). I think this definitions should be defined in the .config file, because I found the values I wrote on a posted message in this list.
You should *not* need to do this. The following should compile a working kernel for the ml300 reference design (using ELDK):
$ export ARCH=ppc $ export CROSS_COMPILE=ppc_4xx- $ make ml300_defconfig $ make
Quoted 4 lines
Maybe somebody could guide me a bit through this kernel compilation, or send me .config file running. I don't know if a revision in the project is a good way, to put things in situation for beginers.
hint: look in arch/ppc/configs for working .config files.
Quoted 2 lines
Thanks, any info would be interesting.
I've collected some of my notes here:
http://wiki.secretlab.ca/index.php/Linux_on_Xilinx_Virtex
Hope this helps,
g.
Signature · 4 lines
Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd. [email protected] (403) 399-0195
Hi!
Unfortunately, at this point, git.xilinx.com is not 'beginner friendly'. There is a rather complicated set of things that has to be coordinated between EDK and the linux kernel. Also, many EDK designs will simply not work with the Linux drivers. Today, it is primarily a place for us to collaborate with the open source community on new development, hence it also is perhaps less stable than a beginner really wants.
That said:
git.xilinx.com includes all the common EDK drivers. The only thing you should need to add is the xparameters file. Today, this requires generating the Board Support Package from a recent version of EDK, using the linux_2_6 OS support and copied into arch/ppc/platforms/4xx/xparameters/. Then whenever you run make use ARCH=3Dppc.
This appnote shows how to use the linux_2.6 BSP:
http://www.xilinx.com/support/documentation/application_notes/xapp969.pd
f
There are also several websites with more information about 'rolling your own' Linux kernel and root file system (google some combination of 'xilinx' 'virtex' 'ml310' 'ml300' and 'linux'):
http://www.crhc.uiuc.edu/IMPACT/gsrc/hardwarelab/docs/kernel-HOWTO.html
http://www.klingauf.com/v2p/index.phtml
http://www.soe.ucsc.edu/~rios/ml310/ml310_linux.htm
http://www.cs.washington.edu/research/lis/empart/xup_ppc_linux.shtml
http://splish.ee.byu.edu/projects/LinuxFPGA/index.htm
Personally, EDK4.1 works fine for me. It may be that you are configuring lots of features in the kernel. A good start would be the ml300_defconfig.
Steve
Quoted 60 lines
-----Original Message-----
From:=20 [email protected] =20 [mailto:linuxppc-embedded-bounces+stephen=3Dneuendorffer.name@oz labs.org] On Behalf Of greenlean
Sent: Tuesday, December 11, 2007 5:32 AM
To: [email protected]
Subject: Linux 2.6 from git.xilinx and XUPV2P
=20
=20
Hi all,
=20
I'm a beginner in Xilinx & Linux world and I'm getting a bit=20
loose. I'm
trying to run linux kernel 2.6 that I downloaded from the=20 xilinx git server
on the PPC405 of the Xilinx university program Virtex II Pro=20 (XUPV2P for the
search engine) board, and I'm using the compiler ELDK 4.1=20 (I' ve just read
this compiler may cause some error so I'll change it, and try the 4.0 version) and I'm getting a lot of compilation error and warning.=20 =20
I think this is what I should use, Does anybody if I have to=20 patch this
kernel or if it is still prepatched??
=20
My compiler can find some definitions likeTASK_SIZEor=20CONFIG_KERNEL_START,
now I'm solving it writting the values manually , I google=20 for the error
and make the definition where it's needed, but I don't think=20 this is a good
idea ;). I think this definitions should be defined in the=20 .config file,
because I found the values I wrote on a posted message in this list. =20
Maybe somebody could guide me a bit through this kernel=20 compilation, or send
me .config file running. I don't know if a revision in the=20 project is a good
way, to put things in situation for beginers.=20
=20
Thanks, any info would be interesting.=20
=20
=20
=20
--=20
View this message in context:=20
http://www.nabble.com/Linux-2.6-from-git.xilinx-and-XUPV2P-tp1
4274035p14274035.html
Sent from the linuxppc-embedded mailing list archive at Nabble.com. =20
_______________________________________________
Linuxppc-embedded mailing list [email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
=20
=20
Quoted 30 lines · greenlean
Thanks both for the response, I've allready visited some of the links.
Yes, you was right it's easear than I think, my problem was the .config file. Now, I have generated it from
ml300_defconfigand after some changes it compiles, but I've two question:* I've chosen as platform the XUPV2P in Machine Type, instead of ML300,
so the xparameters file that I'm using is thexparameters_xupv2p.h, but the xparameters file generated by the EDK isxparameters_ml300despite I told it to use XUPV2P, so I can't overwrite it...Should I use the
xparameters_ml300generated by EDK or thexparameters_xupv2pincluded in the git kernel tree?. I can't compile with the edk'sxparameters_ml300file because there's some definition that the compiler can't find, so I'm using thexparameters_xupv2p.* Second, if I compile using the
xparameters_xupv2p, when I do the dow
command to download the image to the board, the xmd shell tell me:XMD% dow zImage.elf
Failed to download ELF fileERROR(1053): UNABLE to Read Elf File. The Elf File Maybe Corrupted
: zImage.elf
Maybe this error is due to the above asumption??. I'll post this second one on xilinx-support maybe it's realted with my system.....
Signature · 2 lines
View this message in context: http://www.nabble.com/Linux-2.6-from-git.xilinx-and-XUPV2P-tp14274035p14299307.html Sent from the linuxppc-embedded mailing list archive at Nabble.com.
The xparameters file is specific to your hardware design. You should change the name of the generated xparameters file to match xparameters_xupv2p.h=20
Unfortunately, it's sort of an historical artifact that it was done this way... In reality, all the different xparameters files should really just be one, since only one can be active at a time.
The last error sounds like you haven't actually generated an elf file? have you tried running objdump on it?
Steve
Quoted 68 lines
-----Original Message-----
From:=20 [email protected] =20 [mailto:linuxppc-embedded-bounces+stephen=3Dneuendorffer.name@oz labs.org] On Behalf Of greenlean
Sent: Wednesday, December 12, 2007 9:05 AM
To: [email protected]
Subject: Re: Linux 2.6 from git.xilinx and XUPV2P
=20
=20
=20
=20Quoted 2 lines · greenlean
=20
Thanks both for the response, I've allready visited some of=20the links.=20
Quoted 2 lines
=20
Yes, you was right it's easear than I think, my problem was=20the .config
Quoted 1 line
file. Now, I have generated it from
ml300_defconfigand=20after some changes
Quoted 3 lines
it compiles, but I've two question:
=20
* I've chosen as platform the XUPV2P in Machine Type,=20instead of ML300,
Quoted 1 line
so the xparameters file that I'm using is the=20
xparameters_xupv2p.h, butQuoted 1 line
the xparameters file generated by the EDK is=20
xparameters_ml300despite IQuoted 4 lines
told it to use XUPV2P, so I can't overwrite it...=20 =20
Should I use thexparameters_ml300generated by EDK or thexparameters_xupv2pincluded in the git kernel tree?. I=20can't compile with
Quoted 1 line
the edk's
xparameters_ml300file because there's some=20definition that the
Quoted 3 lines
compiler can't find, so I'm using the
xparameters_xupv2p. =20
* Second, if I compile using thexparameters_xupv2p, when=20I do the dow
Quoted 6 lines
command to download the image to the board, the xmd shell tell me:
=20XMD% dow zImage.elf
Failed to download ELF file
=20
ERROR(1053): UNABLE to Read Elf File. The Elf File=20Maybe Corrupted
Quoted 2 lines
: zImage.elf
Maybe this error is due to the above asumption??. I'll post=20this second
Quoted 4 lines
one on xilinx-support maybe it's realted with my system..... =20
=20
=20=20
--=20
View this message in context:=20
http://www.nabble.com/Linux-2.6-from-git.xilinx-and-XUPV2P-tp1
4274035p14299307.html
Sent from the linuxppc-embedded mailing list archive at Nabble.com. =20
_______________________________________________
Linuxppc-embedded mailing list [email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
=20
=20
I'm going to generate the kernel using the file generated by EDK, and if I still have the same problem I'll tell you, maybe the problem is realted with the xparamters configuration file, I don't want to waste your time.
I think I should change my category from beginner to beginest .. :)
I'm not sure how to use objdump or better what to search in the elf file, but I've used readelf to extract some info:
$ppc_4xx-readelf -h zImage.elf
ELF Header:
Magic: 7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00
Class: ELF32 Data: 2's complement, big endian Version: 1 (current) OS/ABI: UNIX - System V ABI Version: 0 Type: EXEC (Executable file) Machine: PowerPC Version: 0x1 Entry point address: 0x400000 Start of program headers: 52 (bytes into file) Start of section headers: 1048856 (bytes into file) Flags: 0x0 Size of this header: 52 (bytes) Size of program headers: 32 (bytes) Number of program headers: 2 Size of section headers: 40 (bytes) Number of section headers: 17
Section header string table index: 14
Everything seems to be fine..... I really don't know.
Quoted 89 lines · Stephen Neuendorffer
The xparameters file is specific to your hardware design. You should change the name of the generated xparameters file to match
xparameters_xupv2p.hUnfortunately, it's sort of an historical artifact that it was done this way... In reality, all the different xparameters files should really just be one, since only one can be active at a time.
The last error sounds like you haven't actually generated an elf file? have you tried running objdump on it?
Steve
Quoted 47 lines
-----Original Message-----
From:
[email protected][mailto:linuxppc-embedded-bounces+stephen=neuendorffer.name@oz labs.org] On Behalf Of greenlean
Sent: Wednesday, December 12, 2007 9:05 AM
To: [email protected]
Subject: Re: Linux 2.6 from git.xilinx and XUPV2PQuoted 2 lines · greenlean
Thanks both for the response, I've allready visited some of
the links.
Quoted 2 lines
Yes, you was right it's easear than I think, my problem was
the .config
Quoted 1 line
file. Now, I have generated it from
ml300_defconfigandafter some changes
Quoted 3 lines
it compiles, but I've two question:
* I've chosen as platform the XUPV2P in Machine Type,
instead of ML300,
Quoted 1 line
so the xparameters file that I'm using is the
xparameters_xupv2p.h, butQuoted 1 line
the xparameters file generated by the EDK is
xparameters_ml300despite IQuoted 4 lines
told it to use XUPV2P, so I can't overwrite it...
Should I use the
xparameters_ml300generated by EDK or thexparameters_xupv2pincluded in the git kernel tree?. Ican't compile with
Quoted 1 line
the edk's
xparameters_ml300file because there's somedefinition that the
Quoted 3 lines
compiler can't find, so I'm using the
xparameters_xupv2p.* Second, if I compile using the
xparameters_xupv2p, whenI do the dow
Quoted 6 lines
command to download the image to the board, the xmd shell tell me:
XMD% dow zImage.elf
Failed to download ELF fileERROR(1053): UNABLE to Read Elf File. The Elf File
Quoted 21 lines
Maybe Corrupted
Quoted 2 lines
: zImage.elf
Maybe this error is due to the above asumption??. I'll postthis second
Quoted 4 lines
one on xilinx-support maybe it's realted with my system.....
Signature · 9 lines
View this message in context: http://www.nabble.com/Linux-2.6-from-git.xilinx-and-XUPV2P-tp1 4274035p14299307.html Sent from the linuxppc-embedded mailing list archive at Nabble.com. _______________________________________________ Linuxppc-embedded mailing list [email protected] https://ozlabs.org/mailman/listinfo/linuxppc-embedded_______________________________________________
Linuxppc-embedded mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
Signature · 2 lines
View this message in context: http://www.nabble.com/Linux-2.6-from-git.xilinx-and-XUPV2P-tp14274035p14312417.html Sent from the linuxppc-embedded mailing list archive at Nabble.com.
OK, now this morning (I'm working in Spain) I compiled the kernel using the xparameters_xupv2p.h generated by edk, everything is OK, only a few warnings.
But as I told you yesterday I have the same problem, the xdm shell tell me that it can't read the file, maybe it is corrupted, the error reported is the ERROR(1053) I don't Know what it means.
Following your steps I try to verify that the elf file generated is an elf file, I used the ppc_4xx-readelf -h zImage.elf command and it told me this result:
$ppc_4xx-readelf -h arch/ppc/boot/images/zImage.elf ELF Header:
Magic: 7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00
Class: ELF32 Data: 2's complement, big endian Version: 1 (current) OS/ABI: UNIX - System V ABI Version: 0 Type: EXEC (Executable file) Machine: PowerPC Version: 0x1 Entry point address: 0x400000 Start of program headers: 52 (bytes into file) Start of section headers: 1017144 (bytes into file) Flags: 0x0 Size of this header: 52 (bytes) Size of program headers: 32 (bytes) Number of program headers: 2 Size of section headers: 40 (bytes) Number of section headers: 17
Section header string table index: 14
I'm not sure about what I supossed to do with objdump, any instruction about what to look for, because objdump works fine, it show me the instruction.
I'm going to search about the elf file, to ensure this is a good elf file.
Quoted 89 lines · Stephen Neuendorffer
The xparameters file is specific to your hardware design. You should change the name of the generated xparameters file to match
xparameters_xupv2p.hUnfortunately, it's sort of an historical artifact that it was done this way... In reality, all the different xparameters files should really just be one, since only one can be active at a time.
The last error sounds like you haven't actually generated an elf file? have you tried running objdump on it?
Steve
Quoted 47 lines
-----Original Message-----
From:
[email protected][mailto:linuxppc-embedded-bounces+stephen=neuendorffer.name@oz labs.org] On Behalf Of greenlean
Sent: Wednesday, December 12, 2007 9:05 AM
To: [email protected]
Subject: Re: Linux 2.6 from git.xilinx and XUPV2PQuoted 2 lines · greenlean
Thanks both for the response, I've allready visited some of
the links.
Quoted 2 lines
Yes, you was right it's easear than I think, my problem was
the .config
Quoted 1 line
file. Now, I have generated it from
ml300_defconfigandafter some changes
Quoted 3 lines
it compiles, but I've two question:
* I've chosen as platform the XUPV2P in Machine Type,
instead of ML300,
Quoted 1 line
so the xparameters file that I'm using is the
xparameters_xupv2p.h, butQuoted 1 line
the xparameters file generated by the EDK is
xparameters_ml300despite IQuoted 4 lines
told it to use XUPV2P, so I can't overwrite it...
Should I use the
xparameters_ml300generated by EDK or thexparameters_xupv2pincluded in the git kernel tree?. Ican't compile with
Quoted 1 line
the edk's
xparameters_ml300file because there's somedefinition that the
Quoted 3 lines
compiler can't find, so I'm using the
xparameters_xupv2p.* Second, if I compile using the
xparameters_xupv2p, whenI do the dow
Quoted 6 lines
command to download the image to the board, the xmd shell tell me:
XMD% dow zImage.elf
Failed to download ELF fileERROR(1053): UNABLE to Read Elf File. The Elf File
Quoted 21 lines
Maybe Corrupted
Quoted 2 lines
: zImage.elf
Maybe this error is due to the above asumption??. I'll postthis second
Quoted 4 lines
one on xilinx-support maybe it's realted with my system.....
Signature · 9 lines
View this message in context: http://www.nabble.com/Linux-2.6-from-git.xilinx-and-XUPV2P-tp1 4274035p14299307.html Sent from the linuxppc-embedded mailing list archive at Nabble.com. _______________________________________________ Linuxppc-embedded mailing list [email protected] https://ozlabs.org/mailman/listinfo/linuxppc-embedded_______________________________________________
Linuxppc-embedded mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
Signature · 2 lines
View this message in context: http://www.nabble.com/Linux-2.6-from-git.xilinx-and-XUPV2P-tp14274035p14313943.html Sent from the linuxppc-embedded mailing list archive at Nabble.com.