cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
rmugridge
Observer
Observer
3,972 Views
Registered: ‎08-22-2012

Building Linux for Zynq

Jump to solution

Hi,

 

I'm getting started with a ZC702 board and am new to Linux as well and am having problems building Linux for the ZC702.

 

I've installed Ubuntu (12.04 LTS) in a VMWare virtual machine running on Win 7.  I've installed the ARM GNU tools and set them up (with no errors) as indicated on the Xilinx wiki site for Zynq.  I've got a copy of the linux sources from the Xilinx Git server using the command "git clone git://git.xilinx.com/linux-2.6-xlnx.git", which I'm accessing from Ubuntu using a shared drive from Win 7.

 

However, when I try and configure the kernel using "make ARCH=arm xilinx_zynq_defconfig", I get loads of errors...

 

/mnt/hgfs/D/Sources/Git/linux-2.6-xlnx/scripts/kconfig/lxdialog/check-lxdialog.sh: line 3: $'\r': command not found
/mnt/hgfs/D/Sources/Git/linux-2.6-xlnx/scripts/kconfig/lxdialog/check-lxdialog.sh: line 5: syntax error near unexpected token `$'\r''
/mnt/hgfs/D/Sources/Git/linux-2.6-xlnx/scripts/kconfig/lxdialog/check-lxdialog.s': line 5: `ldflags()
/mnt/hgfs/D/Sources/Git/linux-2.6-xlnx/scripts/kconfig/check.sh: line 15: syntax error: unexpected end of file
/mnt/hgfs/D/Sources/Git/linux-2.6-xlnx/scripts/kconfig/lxdialog/check-lxdialog.sh: line 3: $'\r': command not found
/mnt/hgfs/D/Sources/Git/linux-2.6-xlnx/scripts/kconfig/lxdialog/check-lxdialog.sh: line 5: syntax error near unexpected token `$'\r''
/mnt/hgfs/D/Sources/Git/linux-2.6-xlnx/scripts/kconfig/lxdialog/check-lxdialog.s': line 5: `ldflags()
/mnt/hgfs/D/Sources/Git/linux-2.6-xlnx/scripts/kconfig/check.sh: line 15: syntax error: unexpected end of file
/mnt/hgfs/D/Sources/Git/linux-2.6-xlnx/scripts/kconfig/lxdialog/check-lxdialog.sh: line 3: $'\r': command not found
/mnt/hgfs/D/Sources/Git/linux-2.6-xlnx/scripts/kconfig/lxdialog/check-lxdialog.sh: line 5: syntax error near unexpected token `$'\r''
/mnt/hgfs/D/Sources/Git/linux-2.6-xlnx/scripts/kconfig/lxdialog/check-lxdialog.s': line 5: `ldflags()
/mnt/hgfs/D/Sources/Git/linux-2.6-xlnx/scripts/kconfig/check.sh: line 15: syntax error: unexpected end of file
/mnt/hgfs/D/Sources/Git/linux-2.6-xlnx/scripts/kconfig/lxdialog/check-lxdialog.sh: line 3: $'\r': command not found
/mnt/hgfs/D/Sources/Git/linux-2.6-xlnx/scripts/kconfig/lxdialog/check-lxdialog.sh: line 5: syntax error near unexpected token `$'\r''
/mnt/hgfs/D/Sources/Git/linux-2.6-xlnx/scripts/kconfig/lxdialog/check-lxdialog.s': line 5: `ldflags()
/mnt/hgfs/D/Sources/Git/linux-2.6-xlnx/scripts/kconfig/check.sh: line 15: syntax error: unexpected end of file
arch/arm/Kconfig:94: syntax error
arch/arm/Kconfig:93: unknown option "The"
arch/arm/Kconfig:94: unknown option "bus"

 

...and so on.

 

Can anyone enlighten me as to what I've done wrong or not done?

 

Thanks,

 

Robin

 

0 Kudos
1 Solution

Accepted Solutions
rmugridge
Observer
Observer
4,823 Views
Registered: ‎08-22-2012

Hi,

 

Thanks Norman.  I tried copying the sources across to the Ubuntu partition and still got the failure.  I then downloaded a snapshot tarball of the 14.2 TRD and this successfully built from the Ubuntu partition.  If I get time, I might try and isolate whether it's the head version that caused me problems or whether my head version had become corrupted in the various things I had tried.

 

Anyway, I now have a built image file - now all I've got to do is figure out what to do with it (before I start trying to configure it).  Any tips or help with using the image would be welcome.

 

Robin

View solution in original post

0 Kudos
3 Replies
austin
Scholar
Scholar
3,960 Views
Registered: ‎02-27-2008

Robin,


I have heard that you need to direct the compiler to compile for the ARM A9....not the x86 in your Linux workstation.


I am not as far along as you, but my next step is bringing up all the programming tools on my Linux box (RedHat).

 

Right now I am fighting PA, and the base system builder demo designs which are installed on my Windows XP laptop (which I use for downloading to the ZC702) and which has the Teraterm usb terminal for the board.

 

So, keep posting, and I hope others who have already gotten past these hudles will post back with what might be our problems....

Austin Lesea
Principal Engineer
Xilinx San Jose
0 Kudos
norman_wong
Scholar
Scholar
3,953 Views
Registered: ‎05-28-2012

I don't think you have gotten as far as cross-compiling for the target. I think the error is happening just running the host side shell scripts and compiling the host side tools. I would guess that your source got corrupted. I'd suggest

- Downloading a snapshot tarball instead of a "git clone". A lot faster.

- Also choose a stable release like "14.2" instead of the "head" release.

- Try using the Linux partition that Ubuntu is on. The shared drive is probably a FAT32 that may cause problems with Linux specific stuff like case-senstivity and line endings.

 

0 Kudos
rmugridge
Observer
Observer
4,824 Views
Registered: ‎08-22-2012

Hi,

 

Thanks Norman.  I tried copying the sources across to the Ubuntu partition and still got the failure.  I then downloaded a snapshot tarball of the 14.2 TRD and this successfully built from the Ubuntu partition.  If I get time, I might try and isolate whether it's the head version that caused me problems or whether my head version had become corrupted in the various things I had tried.

 

Anyway, I now have a built image file - now all I've got to do is figure out what to do with it (before I start trying to configure it).  Any tips or help with using the image would be welcome.

 

Robin

View solution in original post

0 Kudos