Re: [Balloon] Build FPGA image from source

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Wookey
Date:  
To: Patrick Doyle
Subject: Re: [Balloon] Build FPGA image from source
+++ Patrick Doyle [2011-05-24 15:56 -0400]:
> Hi Team!
>
> I have updated (mostly) the vhdl directory to build the FPGA image
> from source using the Xilinx 13.1 tools.(*) Attached is a patchfile
> showing what I changed.


Cool. The jed and xsvf shouldn't be in svn IMHO, so they wouldn't need
reverting. They should only be in the releases, as generated files,
like other binaries. Some others in the team prefer to have
out-of-date binaries checked in than doing things properly :-)

Perhaps your svn revert is useful compromise on this point.

> Can anybody tell me why Makefile.local is under revision control?
> Shouldn't that be something that I own locally and modify as I see
> fit?


That certainly used to be the case, but since r1133 Makefile.local
seems to be something completely different, which doesn't look like
local config . Are you working from trunk or the 1.0 branch release?

> Anyway, this patch assumes that XILINX-TOOLS is set in Makefile.local
> and that it points to the local Xilinx installation. It also assumes
> that you're running something recent enough that you need to source
> settings32.sh instead of settings.sh.


What's the difference? I don't have the (unfeasibly fat) Xilinx tools
on this machine,

> I don't know when Xilinx made
> that change, not having been playing in the Xilinx playpen for the
> last few years. It also probably assumes a whole slew of options that
> are more recent than the 8.x or 9.x revision upon which things have
> been built in the past. I got all of the default options by importing
> the existing project into ISE, compiling it, and extracting the
> options out of the log files.
>
> With these changes, I can do a
>
> $ make fpga
>
> in either the top level or the package/vhdl directory & rebuild the
> FPGA code.


Excellent. I'm glad someone else is interested in having this working.
The other hardware people on the team use the Windows tools, and
aren't very bothered about being able to do a proper 'make' release of
the code.

The big problem here is that since Xilinx turned the project files
froma sensible list of the files to a huge mess of concatenated
source+binary bits it's very hard to keep the project and build files
in sync, and for both the GUI and the 'make' build systems to produce
matching output we need them to stay synced. If we could solve this
everyone would be happy.

> (*) Why 13.1? Because that's what I happened to download when I said
> to myself, "I need to go get some Xilinx tools". I know some folks
> like to run one release behind the latest (especially for Xilinx
> tools) and it doesn't appear that we're doing anything that really
> needs the latest & greatest from Xilinx, but that's what I've got.


This doesn't matter for the 'make' build, but it does matter for the GUI
tools because if one runs a newer version then the tools convert the
project file forward to a new incompatible format. If they check that
in, then immediately no-one else can build the files with downloading
another 3GB of software.

For this reason the project tries to stick with one version of the
tools that keeps everyone happy. If Xilinx didn't write such
badly-behaved tools our lives would be a lot easier.

> Index: Makefile.local
> ===================================================================
> --- Makefile.local    (revision 1572)
> +++ Makefile.local    (working copy)
> @@ -1,3 +1,5 @@
> +export XILINX-TOOLS=/opt/Xilinx/13.1/ISE_DS


I'm not sure if this is still the right place for this. Nick, how do
such locally-configured vars work in the new menuconfig scheme?


>  default: cpld fpga
>  ifdef XILINX-TOOLS
> -    #$(shell . $(XILINX-TOOLS)/settings.sh)
>      ./build_cpld $(XILINX-TOOLS) && mv -f l3cpld.jed cpld/
>  else
> -    # ***************************************************************
> -    # ** Your CPLD image is out of date. You need to regenerate it **
> -    # **      with the XILINX tools. Specify path to these in      **
> -    # **      XILINX-TOOLS in Makefile.local to automate this      **
> -    # ***************************************************************
> +    @echo "***************************************************************"
> +    @echo "** Your CPLD image is out of date. You need to regenerate it **"
> +    @echo "**      with the XILINX tools. Specify path to these in      **"
> +    @echo "**      XILINX-TOOLS in Makefile.local to automate this      **"
> +    @echo "***************************************************************"


We didn't used to need the echo because make prints out comment lines
in executed targets. Doesn't this make it appear twice?


Other than that, nice cleanup. I'd like to run it all in a separate
build dir so we didn't get piles of temp files cluttering up the
checkout. It would make things clearer (and avoid the issue with .jed
and xsvf files in svn). But I didn't get that far. It's not possible
(so far as I can tell, and I tried) to tell the tools to 'put all
files over there' - it has to be done the other way round: cd to build
dir and refer to files in the checkout.

Unless anyone violently objects I'll check this in.

Wookey
--
Principal hats: Linaro, Emdebian, Wookware, Balloonboard, ARM
http://wookware.org/