From owner-freebsd-embedded@freebsd.org Thu Aug 6 02:51:35 2015 Return-Path: Delivered-To: freebsd-embedded@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C14399B3436; Thu, 6 Aug 2015 02:51:35 +0000 (UTC) (envelope-from m.vale@live.com.au) Received: from COL004-OMC4S14.hotmail.com (col004-omc4s14.hotmail.com [65.55.34.216]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "*.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 97047134D; Thu, 6 Aug 2015 02:51:35 +0000 (UTC) (envelope-from m.vale@live.com.au) Received: from COL130-W16 ([65.55.34.199]) by COL004-OMC4S14.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Wed, 5 Aug 2015 19:50:28 -0700 X-TMN: [BiFhrLDouE4RV3WtP5T7PWjmy62aaUUw] X-Originating-Email: [m.vale@live.com.au] Message-ID: Content-Type: multipart/mixed; boundary="_e1e9dfa6-1295-45a5-a56d-b4b57896ae12_" From: Michael Vale To: Adrian Chadd , "bapt@freebsd.org" , "freebsd-mips@freebsd.org" , "freebsd-arm@freebsd.org" , "freebsd-embedded@freebsd.org" Subject: Multi Arch ELF binary/object compiling, linking and more Date: Thu, 6 Aug 2015 13:20:27 +1030 Importance: Normal MIME-Version: 1.0 X-OriginalArrivalTime: 06 Aug 2015 02:50:28.0090 (UTC) FILETIME=[A6C7EDA0:01D0CFF2] X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Aug 2015 02:51:36 -0000 --_e1e9dfa6-1295-45a5-a56d-b4b57896ae12_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable You can try and read my lyrics off of this paper before I lay 'emBut you wo= n't take the sting out these words before I say 'emCause ain't no way I'ma = let you stop me from causing mayhemWhen I say I'ma do something I do it=2CI= don't give a damn what you think=2CI'm doing this for me=2C so fuck the wo= rldFeed it beans=2C it's gassed up=2C if it thinks it's stopping mehttps://= www.youtube.com/watch?v=3Dj5-yKhDd64s Hey=2C Okay here it is. It's not complete yet=2C but I'm throwing it out there wh= ile I have the chance. One can specify the build machine's arch type with ARCH=3D=2C the host (and= in turn the build machine if one is not set) with X_BUILD_FOR=3D and also = finally the target with TARGET=3D. You can choose to set all three to the = same arch as the target=2C or whatever pleases you. Surely if you're smart= and doing some wicked fancy things you can benefit from setting different = archs accordingly=2C if you're accessing these binaries and objects from a = central storage and utilising resources over a network. EDIT: What I forgot to mention is=2C to utilize "cross-compiling" allows on= e to run the same binaries and objects on multiple architectures. So one w= ould think the build variable would have to be one of the machine compiling= the binaries and objects but that is not the case=2C it has other purposes= too. It has been clear in the GNU and FreeBSD way of things that by retai= ning the build variable as the one you compile the binary on and setting th= e HOST variable defines what "other" (sic.) architecture the binaries or ob= ject execute on when infact by setting HOST=2C you also tend to automatical= ly adjust TARGET to suit. The light on this matter is that you can infact = set an intermediate HOST architecture to the TARGET that allows building ta= sks assigned to the BUILD variable=2C 'hosting' and 'operating' on the HOST= architecture and native execution on the TARGET. Don't think for one mome= nt though that you can't set all three BUILD=2C HOST and TARGET to the TARG= ET architecture and use that binary or object as a development utility=2C h= ost or native on the desired platform/architecture. The work is rather complete=2C I've managed to build asterisk=2C kismet and= different X11/Xorg servers and all their dependencies. I haven't begun on slimming down the stage outfits into something suitable = for embedded flashing and packaging. https://www.youtube.com/watch?v=3DBE9CXWV1alg - Michael. = --_e1e9dfa6-1295-45a5-a56d-b4b57896ae12_ Content-Type: application/octet-stream Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="bsd.port.mk-thurs-aug6" LS0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/PQkJLi8ke0NPTkZJR1VSRV9TQ1JJUFR9Ci1DT05GSUdVUkVfVEFSR0VU Pz0JJHtBUkNIfS1wb3J0YmxkLSR7T1BTWVM6dGx9JHtPU1JFTH0KK0NPTkZJR1VSRV9UQVJHRVQ/ PQkke0FSQ0h9LSR7T1BTWVM6dGx9CiBDT05GSUdVUkVfVEFSR0VUOj0JJHtDT05GSUdVUkVfVEFS R0VUOlMvLS1idWlsZD0vL30KIENPTkZJR1VSRV9MT0c/PQkJY29uZmlnLmxvZwogCkBAIC0yNTY3 LDcgKzI1OTEsMTAgQEAKIENPTkZJR19TSVRFPz0JCSR7UE9SVFNESVJ9L1RlbXBsYXRlcy9jb25m aWcuc2l0ZQogQ09ORklHVVJFX0FSR1MrPQktLXByZWZpeD0ke0dOVV9DT05GSUdVUkVfUFJFRklY fSAkJHtfTEFURV9DT05GSUdVUkVfQVJHU30KIC5pZiBkZWZpbmVkKFhfQlVJTERfRk9SKQotQ09O RklHVVJFX0FSR1MrPQktLWhvc3Q9JHtYX0JVSUxEX0ZPUn0KK0NPTkZJR1VSRV9BUkdTKz0JLS1o b3N0PSR7WF9CVUlMRF9GT1J9LXBvcnRibGQtJHtPUFNZUzp0bH0ke09TUkVMfQorLmVuZGlmCisu aWYgZGVmaW5lZChUQVJHRVQpCitDT05GSUdVUkVfQVJHUys9ICAgICAgICAtLXRhcmdldD0ke1RB UkdFVH0tJHtPUFNZUzp0bH0KIC5lbmRpZgogQ09ORklHVVJFX0VOVis9CQlDT05GSUdfU0lURT0k e0NPTkZJR19TSVRFfSBsdF9jdl9zeXNfbWF4X2NtZF9sZW49JHtDT05GSUdVUkVfTUFYX0NNRF9M RU59CiBIQVNfQ09ORklHVVJFPQkJeWVzCg== --_e1e9dfa6-1295-45a5-a56d-b4b57896ae12_-- From owner-freebsd-embedded@freebsd.org Thu Aug 6 02:57:52 2015 Return-Path: Delivered-To: freebsd-embedded@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 32C529B35B2; Thu, 6 Aug 2015 02:57:52 +0000 (UTC) (envelope-from m.vale@live.com.au) Received: from COL004-OMC4S6.hotmail.com (col004-omc4s6.hotmail.com [65.55.34.208]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "*.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0C11D1500; Thu, 6 Aug 2015 02:57:51 +0000 (UTC) (envelope-from m.vale@live.com.au) Received: from COL130-W38 ([65.55.34.200]) by COL004-OMC4S6.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Wed, 5 Aug 2015 19:56:45 -0700 X-TMN: [RjoGN3pMdsG3IktsyQj/V097WMCXkWx2] X-Originating-Email: [m.vale@live.com.au] Message-ID: From: Michael Vale To: Adrian Chadd , "bapt@freebsd.org" , "freebsd-mips@freebsd.org" , "freebsd-arm@freebsd.org" , "freebsd-embedded@freebsd.org" Subject: RE: Multi Arch ELF binary/object compiling, linking and more Date: Thu, 6 Aug 2015 13:26:45 +1030 Importance: Normal In-Reply-To: References: MIME-Version: 1.0 X-OriginalArrivalTime: 06 Aug 2015 02:56:45.0211 (UTC) FILETIME=[879006B0:01D0CFF3] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Aug 2015 02:57:52 -0000 Sorry=2C there is more. I forgot to mention that you can set X_SYSROOT at = the command line so ports can find the appropriate system headers to build = from as a part of your firmware. You can also set DESTDIR to a valid jail = and set CHROOTED to YES (more on that later) or NO=3Dand specify a subdirec= tory within your jail to isolate your compilations from what would be a for= eign HOST environment. Or you can do what I did and edir Warden to create = a mips template built from freebsd sources and push your host environment o= ut into the build environment and have the jail contain only the firmware k= ernel and userland + the results of any ports you compile and install into = that jail with DESTDIR CHROOTED=3Dyes From: m.vale@live.com.au To: adrian@freebsd.org=3B bapt@freebsd.org=3B freebsd-mips@freebsd.org=3B f= reebsd-arm@freebsd.org=3B freebsd-embedded@freebsd.org Subject: Multi Arch ELF binary/object compiling=2C linking and more Date: Thu=2C 6 Aug 2015 13:20:27 +1030 =0A= =0A= =0A= You can try and read my lyrics off of this paper before I lay 'emBut you wo= n't take the sting out these words before I say 'emCause ain't no way I'ma = let you stop me from causing mayhemWhen I say I'ma do something I do it=2CI= don't give a damn what you think=2CI'm doing this for me=2C so fuck the wo= rldFeed it beans=2C it's gassed up=2C if it thinks it's stopping mehttps://= www.youtube.com/watch?v=3Dj5-yKhDd64s Hey=2C Okay here it is. It's not complete yet=2C but I'm throwing it out there wh= ile I have the chance. One can specify the build machine's arch type with ARCH=3D=2C the host (and= in turn the build machine if one is not set) with X_BUILD_FOR=3D and also = finally the target with TARGET=3D. You can choose to set all three to the = same arch as the target=2C or whatever pleases you. Surely if you're smart= and doing some wicked fancy things you can benefit from setting different = archs accordingly=2C if you're accessing these binaries and objects from a = central storage and utilising resources over a network. EDIT: What I forgot to mention is=2C to utilize "cross-compiling" allows on= e to run the same binaries and objects on multiple architectures. So one w= ould think the build variable would have to be one of the machine compiling= the binaries and objects but that is not the case=2C it has other purposes= too. It has been clear in the GNU and FreeBSD way of things that by retai= ning the build variable as the one you compile the binary on and setting th= e HOST variable defines what "other" (sic.) architecture the binaries or ob= ject execute on when infact by setting HOST=2C you also tend to automatical= ly adjust TARGET to suit. The light on this matter is that you can infact = set an intermediate HOST architecture to the TARGET that allows building ta= sks assigned to the BUILD variable=2C 'hosting' and 'operating' on the HOST= architecture and native execution on the TARGET. Don't think for one mome= nt though that you can't set all three BUILD=2C HOST and TARGET to the TARG= ET architecture and use that binary or object as a development utility=2C h= ost or native on the desired platform/architecture. The work is rather complete=2C I've managed to build asterisk=2C kismet and= different X11/Xorg servers and all their dependencies. I haven't begun on slimming down the stage outfits into something suitable = for embedded flashing and packaging. https://www.youtube.com/watch?v=3DBE9CXWV1alg - Michael. =