EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: EPICS cross compile with buildroot problems
From: Andrew Johnson <[email protected]>
To: Tom Slejko <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Mon, 3 Jun 2013 15:30:31 -0500 (CDT)
Hi Tom,

A quick response to your last paragraph questions, the build system let's you write programs for the host that generate other programs for the target, so it has to have built the host programs before it can run them during the later cross-build of the target.

You need to tell the build system not to build your targets for the host architecture, or rather to only build them for the other target. When the two use the same OS your Makefile can't just say
  PROD_Linux += myprog
but it can say
  ifeq $(T_A),linux-buildroot
    PROD += myprog
  endif
or something similar (I think that's the right syntax but I'm away from work at the moment).

HTH,

- Andrew

-- 
Sent from my iPad

On Jun 3, 2013, at 5:33 AM, Tom Slejko <[email protected]> wrote:

> Hi all, 
> 
> I have been integrating EPICS base, as well some modules and extensions into buildroot (buildroot.uclibc.org), but I am having some problems since EPICS cross-compilation build system is a bit above my understanding. Note that for us, even if we are building x86 target on x86 host we need to cross-compile since we are linking against uClibc on the target and not glibc.
> 
> My current approach is the following;
> 
> -detect buildroot target arch
> 
> Depending on buildroot target arch a script makes a copy of the closest architecture (lets assume that target arch is linux-x86), creates apropriate CONFIG_SITE.Common.xxx file and sets the correct GNU_DIR and CMPLR_PREFIX and CMPLR_SUFFIX variables.
> 
> -cp COMMON.Common.linux-x86 COMMON.Common.linux-buildroot
> -touch COMMON_SITE.Common.linux-buildroot 
> -fix COMMON_SITE.Common.linux-buildroot
> 
> and finally fix the main CONFIG_SITE and set CROSS_COMPILER_TARGET_ARCHS=linux-buildroot to include linux-buildroot. 
> 
> The base and modules (asyn, sequencer,..) now build fine and run as expected, on both host and target machines. 
> 
> But here comes the problem; some application require some external libraries, for example a device userspace library. If this library is available for both host and target, there is no problem, however if it is only available for TARGET than we can not build our application, since the build system always insists on building the EPICS_HOST_ARCH architecture first. So even if I run "make build.linux-buildroot" the build system will first try to build the linux-x86_64 which will fail since the required library is not available. I tried completely disabling building EPICS_HOST_ARCH in CONFIG_COMMON, but that simply results in an: No rule to make linux-x86_64 needed by linux-buildroot error. 
> 
> Why is EPICS_HOST_ARCH a dependency for CROSS_TARGET? Have I missed something? After all our cross-target also compiles whole base system, so there shouldn't be any need for building host binaries within the app. How should I tackle this problem? I know I must be missing something, but I am just not sure what... 
> 
> 
> Thanks in advance, 
> 
> Tom Slejko
> 


References:
EPICS cross compile with buildroot problems Tom Slejko

Navigate by Date:
Prev: RE: SEQ with dynamic assignment of PV in array variable Emmanuel Mayssat
Next: RE: SEQ with dynamic assignment of PV in array variable Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: EPICS cross compile with buildroot problems Hu, Yong
Next: Using Wind River's ICE 2 On-Chip Debugger with EPICS Ron Sluiter
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 20 Apr 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·