Sign In

Don't have a Xilinx account yet?

  • Choose to receive important news and product information
  • Gain access to special content
  • Personalize your web experience on Xilinx.com

Create Account

Username

Password

Forgot your password?
XClose Panel
Xilinx Home
Reply
Regular Visitor
mportola
Posts: 30
Registered: ‎02-10-2012
0

Can't run compiled Linux on QEMU

Hello,

 

I tried compiling the Linux from the GIT repository, following the instructions from the wiki : http://wiki.xilinx.com/zynq-linux , with the Codesourcey toolchain 

 

First problem: the Makefile looks for tools with the suffix arm-xilinxa9-linux-gnueabi-, but the ones provided by Codesource have prefix arm-xilinx-linux-gnueabi (no "a9"). A few aliases and the kernel compiles, generating a zImage file. 

 

Second problem: when I launch Qemu Ithe image does not load: I get this error message instead of "Uncompressing linux..." : 

 

Unknown cp14 read op1:0 crn:0 crm:O op2:0

 

....what did I do wrong? Is it the toolchain?

 

Thanks,

 

Michele

Expert Contributor
linnj
Posts: 1,038
Registered: ‎09-10-2008
0

Re: Can't run compiled Linux on QEMU

Hi Michele,

 

The wiki page, which follows here, shows how to setup for the tools.

 

http://wiki.xilinx.com/zynq-tools

 

I'm not sure what Makefile you are referring to as we require you to setup the environment for the tools?

 

On the 2nd problem, maybe we have an issue we haven't seen yet as the kernel is changing very rapidly.  Does the kernel that we provide in the tar file of the prebuilt image work for you?

 

Thanks

John

John Linn
Regular Visitor
mportola
Posts: 30
Registered: ‎02-10-2012
0

Re: Can't run compiled Linux on QEMU

It is the Makefile in the root directory of the Linux coming from the Xilinx GIT repository (cloned this morning), and yes I using the tools coming from the http://wiki.xilinx.com/zynq-tools  wiki.  So I think the mismatch in the tool suffix must come from the Makefile...

 

For the second problem: everything works fine with the prebuilt image. I am trying to rebuild it because in my project I need to change some entry in the Exception Table, and I cannot do it in runtime.

 

Thanks,

 

Michele

 

Expert Contributor
linnj
Posts: 1,038
Registered: ‎09-10-2008
0

Re: Can't run compiled Linux on QEMU

Just to be clear, what linux repository, linux-2.6-xlnx?

 

I don't see anything related to Linux in that Makefile in the root directory, but maybe I'm not seeing the same thing you are.

 

Thanks

John

John Linn
Expert Contributor
linnj
Posts: 1,038
Registered: ‎09-10-2008
0

Re: Can't run compiled Linux on QEMU

On the 2nd issue it sounds like the kernel has changed and is now breaking the ARM model in QEMU.

 

I'll write up a CR against it, but for now I don't have a quick fix.  Typically this involves making the model not crash for that access to a register.

 

Is this the head of the QEMU tree from xilinx?

 

Thanks

John

John Linn
Expert Contributor
linnj
Posts: 1,038
Registered: ‎09-10-2008
0

Re: Can't run compiled Linux on QEMU

Did you download the qemu and build it or use the prebuilt?

I'm seeing on the old version of qemu it does this, but not on the new version. But I'm wondering if the release got hosed?

Thanks.
John Linn
Expert Contributor
linnj
Posts: 1,038
Registered: ‎09-10-2008
0

Re: Can't run compiled Linux on QEMU

Looks like you have the older version of qemu, you need to update from the git server at Xilinx or from the prebuilt link on the wiki page again. We did update the qemu prebuilts in march of this year and we didnt' version that tar ball as it should have been I think.

You can confirm this by running arm-softmmu/qemu-system-arm --help | more and look at the 1st line, the latest version is 1.0.50 and the older version is 0.14.0 I believe.

Sorry for the inconvenience.
John Linn
Regular Visitor
mportola
Posts: 30
Registered: ‎02-10-2012
0

Re: Can't run compiled Linux on QEMU

Thanks,

once updated QEMU everything works fine. 

 

Now I just have to find where the exception table is defined: I usually do it drectly in GCC, but as the sources are not avaiable I am looking for another way of doing it...any idea? 

 

Michele