Re: [yocto] Building on MacOS X

2017-01-14 Thread Roger Smith

> On Jan 13, 2017, at 12:50 AM, Clemens Lang  wrote:
> 
> Hi,
> 
> 
>> On 12 Jan 2017, at 23:59, Mark Hatle  wrote:
>> 
>> As far as I know pseudo and the security introduced in 10.11 that affect
>> preloading is likely the biggest technical problem...  everything else is 
>> just
>> "it's not Linux”.
> 
> With System Integrity Protection disabled, pseudo should still work as it did 
> before, if that’s an acceptable step for you.
> 
> If it isn’t, Apple’s new limitations can also be worked around in pseudo by 
> hooking the exec(2) and posix_spawn(2) syscalls, checking if the binary to be 
> executed is under system integrity protection, making a copy without the 
> SIP-bit if it is and transparently running that copy instead. That code would 
> need to be written, though (Let me know if you want to do that, I have the 
> code for a different project.). It’s probably only a matter of time until 
> Apple prevents that from working, too, though, e.g. by making some standard 
> system tools signed binaries that no longer load preloaded libraries.
> 
> 


This topic could have been clarified better, since there are multiple ways to 
“build” Yocto Project in  MacOS X,

Is Building Yocto project on a POSIX system, a desire for the Yocto project? It 
would allow support on all bsd UNIX’s including macOS


There are many teams inside Apple that use Linux systems for one reason or 
another. They would appreciate  building open source tools out the door without 
some other additional overhead.. 

Replacing a platforms POSIX version of tools with gnu versions  because your 
build environment didn’t like it, seems like a step backwards for these types 
of initiatives. 

Curious to know about long term support for POSIX systems. 

Apple spent alot of time and effor years ago to vertify OS X as POSIX compliant.

Roger

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Building on MacOS X

2017-01-12 Thread Roger Smith
 I have Parallels (running on El Capitan the one before Sierra)  and ubuntu 14  
running my current build environment on a MacBook Pro, but boy is the build 
slow… I also worked at Apple for 19 years on drivers inside MacOS X/iOS, so I 
am more than motivated to have this working natively rather than inside any 
container or disk space hogging environment.  As I mentioned I am working with 
the Intel Aero compute board, so slogging though all this fat to build an image 
is a productivity killer.

I think most of the  incompatibilities between Linux and os x (which btw is 
coming from the ios side of the fence unfortunately), can be mitigated with 
boot args or via the command line . Apple’s compiler team had to make llvm 
compatible with gcc, so I am surprised if in 2017, there are compiler issues to 
building for an x86_64 platform with llvm on the Mac . That’s the kind of bug 
Apple likes to fix promptly.. 

As I mentioned, I tried to simply source the oe-init-build-env, and got an 
error that the readlink command that yocto is using is incompatible with the 
bsd version of readlink built into os x. 

i.e when I run .

source oe-init-build-env

I get the error

readlink: illegal option -- f

Which is because on OS X readlink doesn’t specify -f

YNOPSIS
 stat [-FLnq] [-f format | -l | -r | -s | -x] [-t timefmt] [file ...]
 readlink [-n] [file ...]

I didn’t want to go through this level of change in the Yocto sources if (1) 
people don’t care to take changes or (2) it had already been done before.. I 
was curious how far down this rabbit hole people had gone before..

Roger


> On Jan 12, 2017, at 8:50 AM, Andrea Galbusera  wrote:
> 
> On Thu, Jan 12, 2017 at 5:21 PM, Belisko Marek  <mailto:marek.beli...@gmail.com>> wrote:
> On Thu, Jan 12, 2017 at 4:39 PM, Tim Orling
> mailto:timothy.t.orl...@linux.intel.com>> 
> wrote:
> > You can also build using Docker containers:
> > https://github.com/crops/docker-win-mac-docs/wiki 
> > <https://github.com/crops/docker-win-mac-docs/wiki>
> Well the re is other limitation about slow filesystem access from
> docker on osx. There is workaround to use nfs but it's not possible to
> use nfs for building yocto - so it's kind of chicken-egg problem ;)
> 
> I shortly tested the CROPS docker-based setup after watching some 
> presentation at ELCE 2016 in Berlin. It basically worked but I experienced 
> the filesystem slowness your are talking about. I ended up waiting hours to 
> see a simple core-image-minimal build complete (even after giving more cores 
> to docker). One more point is that slightly more complex build scenarios, 
> i.e. building resin.os, also required tweaking docker run parameters for the 
> build container in order to give bitbake access to features like loop devices 
> it needed (not always easily debuggable issues indeed). Turned out I decided 
> to stick with more canonical linux based environments for the moment.
> 
> Anyway, the technology behind CROPS is *very* interesting to me, and I'd like 
> to hear from people closely involved (Tim?) what the state of the art is and 
> what we can expect to see in the near future. IIRC, the roadmap for Yocto 2.3 
> release was supposed to resurrect the Eclipse plugin and adopt CROPS as an 
> alternative for running eSDK in a seamless way on different development host 
> OSs. Beside from the images on docker hub and the github projects that didn't 
> have high activity in the latest months, I hardly find discussions and 
> documentation on the whole approach. Isn't this hot enough anymore or are 
> there big issues that will prevent this technology from taking off. I often 
> manage SDKs for Windows-minded developers and I strongly yearn to find a 
> better approach to help them feel at home while building stuff for OE/Yocto 
> based systems... 
> 
>  
> >
> > On Jan 12, 2017, at 7:34 AM, Burton, Ross  > <mailto:ross.bur...@intel.com>> wrote:
> >
> >
> > On 12 January 2017 at 15:14, Roger Smith  > <mailto:ro...@sentientblue.com>> wrote:
> >>
> >> Is there any documentation for running the Yocto build system on Mac OS X
> >> or macOS as Apple now calls it? I am working with the Intel Aero board.
> >> Before I go down the rabbit hole of fixing issues like this one (and I am
> >> using the bash shell), I’d like to know if anyone has build it on os x
> >> before.
> >
> >
> > If you install all of the GNU tools using brew or similar and put them first
> > on $PATH then you can get bitbake started.  Then you need to stub out the
> > linux-specific bits in bitbake.  I've previously started on this work
> > already
> > (http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=ross/

[yocto] Building on MacOS X

2017-01-12 Thread Roger Smith
Is there any documentation for running the Yocto build system on Mac OS X or 
macOS as Apple now calls it? I am working with the Intel Aero board. Before I 
go down the rabbit hole of fixing issues like this one (and I am using the bash 
shell), I’d like to know if anyone has build it on os x before.

thanks


source oe-init-build-env
readlink: illegal option -- f
usage: readlink [-n] [file ...]
-bash: /scripts/oe-buildenv-internal: No such file or directory-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto