From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id D20D1E003C1; Thu, 12 Jan 2017 09:41:22 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,HTML_MESSAGE, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [109.224.233.103 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 HTML_MESSAGE BODY: HTML included in message Received: from pamail.gradwell.com (linmainlb.pa.thw.gradwell.net [109.224.233.103]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 64D01E00A37 for ; Thu, 12 Jan 2017 09:41:13 -0800 (PST) Received: (qmail 29467 invoked from network); 12 Jan 2017 17:41:13 -0000 Received: from unknown (HELO ?10.0.1.192?) (roger@sentientblue.com@[73.231.167.180]) by 192.168.50.232 with ESMTPSA (DHE-RSA-AES256-SHA encrypted, authenticated); 12 Jan 2017 17:41:12 -0000 From: Roger Smith Message-Id: <448FE605-0D5E-4057-BF49-9EFFBC5CB8DD@sentientblue.com> Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Date: Thu, 12 Jan 2017 09:41:10 -0800 References: <990F24BD-1C6F-4985-8E33-0C8E5B59E84A@linux.intel.com> To: "yocto@yoctoproject.org" In-Reply-To: X-Mailer: Apple Mail (2.3124) Subject: Re: Building on MacOS X X-BeenThere: yocto@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Discussion of all things Yocto Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2017 17:41:22 -0000 Content-Type: multipart/alternative; boundary="Apple-Mail=_250F3C5B-3A7C-4398-9216-104B1E36BD11" --Apple-Mail=_250F3C5B-3A7C-4398-9216-104B1E36BD11 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 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=E2=80=A6 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=E2=80=99s = 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=E2=80=99s the kind of bug Apple likes to fix = promptly..=20 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.=20 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=E2=80=99t specify -f YNOPSIS stat [-FLnq] [-f format | -l | -r | -s | -x] [-t timefmt] [file = ...] readlink [-n] [file ...] I didn=E2=80=99t want to go through this level of change in the Yocto = sources if (1) people don=E2=80=99t 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: >=20 > On Thu, Jan 12, 2017 at 5:21 PM, Belisko Marek = > wrote: > On Thu, Jan 12, 2017 at 4:39 PM, Tim Orling > > wrote: > > You can also build using Docker containers: > > 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 ;) >=20 > 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. >=20 > 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...=20 >=20 > =20 > > > > On Jan 12, 2017, at 7:34 AM, Burton, Ross > wrote: > > > > > > On 12 January 2017 at 15:14, Roger Smith > 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=E2=80=99d 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=3Dross/darw= in = ). > > The next step is figuring out how to configure OE to build and link = natively > > on OSX using LLVM instead of GCC. > > > > However all of this is mostly academic because in Sierra (iirc) = onwards > > there is tighter security on processes, which means that pseudo = won't work > > even if you port it to macOS. > > > > So unless you fancy some non-trivial engineering the short version = is just > > use something like Docker to run a Linux system on your Mac. > > > > Ross > > -- > > _______________________________________________ > > yocto mailing list > > yocto@yoctoproject.org > > https://lists.yoctoproject.org/listinfo/yocto = > > > > > > > > -- > > _______________________________________________ > > yocto mailing list > > yocto@yoctoproject.org > > https://lists.yoctoproject.org/listinfo/yocto = > > >=20 > marek >=20 > -- > as simple and primitive as possible > ------------------------------------------------- > Marek Belisko - OPEN-NANDRA > Freelance Developer >=20 > Ruska Nova Ves 219 | Presov, 08005 Slovak Republic > Tel: +421 915 052 184 > skype: marekwhite > twitter: #opennandra > web: http://open-nandra.com > -- > _______________________________________________ > yocto mailing list > yocto@yoctoproject.org > https://lists.yoctoproject.org/listinfo/yocto = >=20 > --=20 > _______________________________________________ > yocto mailing list > yocto@yoctoproject.org > https://lists.yoctoproject.org/listinfo/yocto = --Apple-Mail=_250F3C5B-3A7C-4398-9216-104B1E36BD11 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
 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=E2=80=A6 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=E2=80=99s 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=E2=80=99s 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=E2=80=99t specify -f

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

I = didn=E2=80=99t want to go through this level of change in the Yocto = sources if (1) people don=E2=80=99t 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 <gizero@gmail.com> wrote:

On Thu, Jan 12, 2017 at = 5:21 PM, Belisko Marek <marek.belisko@gmail.com> wrote:
On = Thu, Jan 12, 2017 at 4:39 PM, Tim Orling
<timothy.t.orling@linux.intel.com> = wrote:
> You can also build using Docker containers:
> 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 <ross.burton@intel.com> wrote:
>
>
> On 12 January 2017 at 15:14, Roger = Smith <roger@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=E2=80=99d 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=3Dross/darwin).
> The next step = is figuring out how to configure OE to build and link natively
> on OSX using LLVM instead of GCC.
>
> However all of this is mostly academic because in Sierra = (iirc) onwards
> there is tighter security on = processes, which means that pseudo won't work
> even if = you port it to macOS.
>
> So unless = you fancy some non-trivial engineering the short version is just
> use something like Docker to run a Linux system on your = Mac.
>
> Ross
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
>>
> --
> = _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>

marek

--
as simple = and primitive as possible
-------------------------------------------------
Marek Belisko - = OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
twitter: #opennandra
web: http://open-nandra.com
--
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

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

= --Apple-Mail=_250F3C5B-3A7C-4398-9216-104B1E36BD11--