From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vk0-f48.google.com (mail-vk0-f48.google.com [209.85.213.48]) by mail.openembedded.org (Postfix) with ESMTP id 6B2B473285 for ; Wed, 3 Aug 2016 19:22:38 +0000 (UTC) Received: by mail-vk0-f48.google.com with SMTP id x130so153667850vkc.0 for ; Wed, 03 Aug 2016 12:22:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=jW7FgLxP38h4F7zqi6f9fZ4/kPR7zcou0ivcvS/+qp8=; b=n0uA0wP28HkObUPQUHkvexRLnGiQ2WJX4/+o9m5z+ie6XWl9jq9rlQ6lXFULOolXha oUl4AjGKjXrJDfT/qjWSmbKBHjaHFmnnV919cDrGdMEZKoeaRA4PdUa+bHn5mB5eZk/p 65gHmWQ6e+Vc7TuMyGYBE7fEFc5csHrPMc+Xo3pbc2AK27inez2h4oNnwq9YF+f2jTuy lPLDgy5cbZ48pr6Ks4MoIKWorFdmChDFrqr242BrAepwjvRSU5aYsRJO1l12CBPcMTPU 0MKVf8neB+ZoCDUGf9UXwzC9ctY/YatdXzPisdkEtOwufUCV/NmEEq1rIFV6Cg14+IiM GXHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=jW7FgLxP38h4F7zqi6f9fZ4/kPR7zcou0ivcvS/+qp8=; b=EtyKUgPf5Ht15PzuvlI81+8unqjeFK4zCOhipI+CROmClNUUUzxQRryMmbmcR9uRsP T4q390w78lfGLTRdelZTB0BsU0CtcaRp7qHMQbH3EV3cB1HHLLIRif3nnr4K7fTMej4X sGOfB9R+brM+4DOTWnkryPEwoXs0wfqhbDjHlX8Hi7oct81an84WJ3Xh+C0EUmlXHEoa CuDmcP5rERfTqZdXx+g0155IVl0lMrKT66noTb1QBkX7fqIA8C1E6dQwmMEjCcqY2JBE VHwPmaeJP5Dg0AOkxBtBw4Tp6d/s1DBtfVflH60qucEE6No510N0FlORPmlm9qiOGCiD 2YjA== X-Gm-Message-State: AEkoouufAIUlbM3HQNK2ejkKygtT66/V0W7pjd5NiC9NY7IrlNS8gKKx2gpRrA6K7QupZtzbMIRwGLyPNUblSQ== X-Received: by 10.31.230.194 with SMTP id d185mr33509114vkh.143.1470252158870; Wed, 03 Aug 2016 12:22:38 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.112.2 with HTTP; Wed, 3 Aug 2016 12:22:38 -0700 (PDT) In-Reply-To: References: <175B9BD5-9DEE-4B4C-B9AD-65F1D81438A3@gmail.com> From: Nemicolopterus Crypticus Date: Wed, 3 Aug 2016 12:22:38 -0700 Message-ID: To: Khem Raj Cc: openembedded-core@lists.openembedded.org Subject: Re: multilib support on Jethro: populate_sdk help X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Aug 2016 19:22:40 -0000 Content-Type: multipart/alternative; boundary=94eb2c0954e8a8e93405392fc12e --94eb2c0954e8a8e93405392fc12e Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Ok, I moved past that above error as well. I edited the image recipe, and just commented out the packages that aren't ready for lib32 build yet. Unfortunately, even when I build with lib32- -c populate_sdk, the sysroots for armv7 aren't getting populated. Also, the environment setup script does not work properly. (i.e., the environment variable $CC points to a file that does not exist). Here is the name of the output in tmp/deploy/sdk: poky-glibc-x86_64-lib32--aarch64-toolchain-2.0.1.sh As you can see, the TUNE_PKGARCH is still set to aarch64. In fact, when I first run the bitbake command, this is what I see: $ bitbake lib32- -c populate_sdk Build Configuration: BB_VERSION =3D "1.28.0" BUILD_SYS =3D "x86_64-linux" NATIVELSBSTRING =3D "Ubuntu-14.04" TARGET_SYS =3D "aarch64-poky-linux" MACHINE =3D "qcom-bsp" DISTRO =3D "poky" DISTRO_VERSION =3D "2.0.1" *TUNE_FEATURES =3D "aarch64"* TARGET_FPU =3D "" It seems this is coming from the MACHINE file, which includes this line: require conf/machine/include/arm/arch-armv8.inc That file just has a single line in it: requires conf/machine/include/arm/arch-arm64.inc THAT file immediately sets the DEFAULTTUNE to aarch64. So, how am I supposed to enable armv7 SDK to be built? Shouldn't the DEFAULTTUNE be set to armv7-neon for this to work? Am I missing something simple? I've read through the documentation a few times, but fully admit that bitbake is large and complex and I may be missing something. On Mon, Aug 1, 2016 at 4:05 PM, Nemicolopterus Crypticus < ncrypticus@gmail.com> wrote: > Ok, I've made some progress. > I'm running > $bitbake lib32- -c populate_sdk > > and it proceeds for a while. > We do have a few packages that are not ready to be built as 32-bit, and > those fail as compiler errors. > > Is there a way to temporarily remove them from the list of packages to be > built? > Poking around I found DEFAULT_PREFERENCE*, but that looks like it's not > quite what I'm looking for. > > Is there any easy way to quickly disable a particular package from an > image build? > > * http://www.embeddedlinux.org.cn/OEManual/recipes_defaultpreference.html > > > On Fri, Jul 29, 2016 at 1:30 PM, Nemicolopterus Crypticus < > ncrypticus@gmail.com> wrote: > >> Added: https://bugzilla.yoctoproject.org/show_bug.cgi?id=3D10054 >> >> >> Please let me know if I can try anything else or provide more info. >> >> In the meantime, I'm going to try to disable multilib, and only build th= e >> ARMv7 version of the SDK. >> >> >> On Fri, Jul 29, 2016 at 12:07 PM, Khem Raj wrote: >> >>> >>> On Jul 29, 2016, at 10:48 AM, Nemicolopterus Crypticus < >>> ncrypticus@gmail.com> wrote: >>> >>> Hello all, >>> >>> We are having issues with our generated SDK files. We're using the >>> jethro branch, and have enabled multilib (see relevant portion of >>> local.conf below). >>> >>> I can succesfully run the command to generate the SDK: >>> $ bitbake -c populate_sdk >>> >>> But the output is incorrect. *While the aarch sysroots look good, the >>> sysroots for arm are completely missing. The environment setup script e= nds >>> up pointing to non-existent compilers. *Please let me know if you need >>> more information! >>> >>> >>> Thanks for report. It will be good if you can open a bugzilla entry for >>> this. So it can be tracked. >>> >>> >>> Steps to reproduce: >>> $ bitbake -c populate_sdk >>> $ cp tmp/deploy/sdk/.sh /test/directory >>> $ cd /test/directory >>> $ bash .sh >>> $ ls sysroots/ >>> aarch64-poky-linux/ x86_64-pokysdk-linux/ >>> >>> Note the missing ARM directories. >>> >>> Also, the setup script for arm sets this as the command for compiler: >>> 12 export CC=3D"arm-pokymllib32-linux-gnueabi-gcc >>> >>> But that compiler doesn't exist anywhere in the folder where I installe= d >>> everything, or environment! >>> >>> So it appears that it's not completely or correctly packaging everythin= g >>> for ARMv7. >>> >>> The documentation does mention some environment variables >>> , >>> but it's not clear how those related to multilib. >>> >>> For instance, none of our recipes have "SDKIMAGE_FEATURES" defined, but >>> clearly the aarch64 sysroots are getting populated correctly (we >>> succesfully compiled and ran a simple hello world). >>> >>> *Can anyone point me to an example, or discuss a successful use of >>> "multilib" on the Jethro branch (given desparate brainstorming below), >>> share some more verbose documentation, or ask follow-up questions?* >>> >>> >>> _____________________________________________________________ >>> Desperate brainstorming below: >>> I did find this years-old patch: >>> https://patchwork.openembedded.org/patch/30941/ >>> Notably, the do_populate_sdk method in >>> poky/meta/classes/populate_sdk_base.bbclass iterates over the values li= sted >>> in the MULTILIB_VARIANTS variable: >>> >>> + variants =3D d.getVar("MULTILIB_VARIANTS", True) or ""+ for item in v= ariants.split():+ # Load overrides from 'd' to avoid having to reset the v= alue...+ overrides =3D d.getVar("OVERRIDES", False) + ":virtclass-multilib= -" + item+ localdata.setVar("OVERRIDES", overrides)+ bb.data.update_data(= localdata)+ bb.build.exec_func("create_sdk_files", localdata) >>> >>> >>> >>> The latest version in Jethro does not have anything equivalent to that, >>> but I did not dig deeply into the code or the commit history. >>> >>> >>> >>> >>> ______________________________________________________________ >>> More data: >>> >>> local.conf relevant section: >>> # >>> # Multilib configuration >>> # >>> # This sets any packages preprended with lib32- to be built with >>> # the armv7a tuning (32 bit) instead of 64 bit aarch. >>> # >>> require conf/multilib.conf >>> MULTILIBS =3D "multilib:lib32" >>> DEFAULTTUNE_virtclass-multilib-lib32 =3D "armv7at-neon" >>> -- >>> _______________________________________________ >>> Openembedded-core mailing list >>> Openembedded-core@lists.openembedded.org >>> http://lists.openembedded.org/mailman/listinfo/openembedded-core >>> >>> >>> >> > --94eb2c0954e8a8e93405392fc12e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Ok, I moved past t= hat above error as well. I edited the image recipe, and just commented out = the packages that aren't ready for lib32 build yet.

Unfort= unately, even when I build with lib32-<image name> -c populate_sdk, t= he sysroots for armv7 aren't getting populated. Also, the environment s= etup script does not work properly. (i.e., the environment variable $CC poi= nts to a file that does not exist).

Here is the name of the ou= tput in tmp/deploy/sdk:
poky-glibc-x86_64-lib32-<image name>-aarch64-toolchain-2.0.1.sh
=
As you can see, the TUNE_PKGARCH is still set to aarch64. In fact= , when I first run the bitbake command, this is what I see:
$ bitb= ake lib32-<image name> -c populate_sdk
Build Configuration:
BB_= VERSION=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D "1.28.0"BUILD_SYS=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D "x86_64= -linux"
NATIVELSBSTRING=C2=A0=C2=A0 =3D "Ubuntu-14.04"TARGET_SYS=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D "aarch64-pok= y-linux"
MACHINE=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 =3D "qcom-bsp"
DISTRO=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D "poky"
DISTRO_VERSION= =C2=A0=C2=A0=C2=A0 =3D "2.0.1"
TUNE_FEATURES=C2=A0=C2= =A0=C2=A0=C2=A0 =3D "aarch64"
TARGET_FPU=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D ""

It seems this = is coming from the MACHINE file, which includes this line:
require conf/= machine/include/arm/arch-armv8.inc

That file just has a single= line in it:
=C2=A0requires conf/machine/include/arm/arch-arm64.inc
<= br>THAT file immediately sets the DEFAULTTUNE to aarch64.

So, = how am I supposed to enable armv7 SDK to be built? Shouldn't the DEFAUL= TTUNE be set to armv7-neon for this to work?
Am I missing somethin= g simple? I've read through the documentation a few times, but fully ad= mit that bitbake is large and complex and I may be missing something.



On Mon, Aug 1, 2016 at 4:05 PM, Nemicolopte= rus Crypticus <ncrypticus@gmail.com> wrote:
Ok, I've made some= progress.
I'm running
$bitbake lib32-<image name> -c popu= late_sdk

and it proceeds for a while.
We do have a few packages t= hat are not ready to be built as 32-bit, and those fail as compiler errors.=

Is there a way to temporarily remove them from the list of pa= ckages to be built?
Poking around I found DEFAULT_PREFERENCE*, but= that looks like it's not quite what I'm looking for.

= Is there any easy way to quickly disable a particular package from an image= build?

On Fri, Jul 29, 2016 at 1:30 PM, Nemicolopterus Crypticus = <ncrypticus@gmail.com> wrote:
Please let me kno= w if I can try anything else or provide more info.

In the= meantime, I'm going to try to disable multilib, and only build the ARM= v7 version of the SDK.


On Fri, Jul 29, 2016 at 12:07 PM, Khem R= aj <raj.khem@gmail.com> wrote:

On Jul 29, 2016, at 10:48 AM, Nemicolopterus Crypticus <<= a href=3D"mailto:ncrypticus@gmail.com" target=3D"_blank">ncrypticus@gmail.c= om> wrote:

Hello all,
We are having issues with our=20 generated SDK files. We're using the jethro branch, and have enabled=20 multilib (see relevant portion of local.conf below).

I ca= n succesfully run the command to generate the SDK:
$ bitbake = <recipe name> -c populate_sdk

But the output is inc= orrect. While the aarch sysroots look good, the sysroots for arm are completely=20 missing. The environment setup script ends up pointing to non-existent=20 compilers. Please let me know if you need more information!

Thanks for report. It wil= l be good if you can open a bugzilla entry for this. So it can be tracked.<= /div>
Steps to reproduce:
$ bitbake <recipe name>= -c populate_sdk
$ cp tmp/deploy/sdk/<sdk-script>.sh /t= est/directory
$ cd /test/directory
$ bash <s= dk-script>.sh
$ ls sysroots/
aarch64-poky-linux/=C2=A0= =C2=A0 x86_64-pokysdk-linux/

Note the missing ARM direct= ories.

Also, the setup script for arm sets this as the co= mmand for compiler:
=C2=A012 export CC=3D"arm-pokymllib32-linux-gnu= eabi-gcc

But that compiler doesn't exist anywhere in = the folder where I installed everything, or environment!

= So it appears that it's not completely or correctly packaging everythin= g for ARMv7.

The documentation does mention some environment variables, but = it's not clear how those related to multilib.

For instance, none of our recipes have "SDKIMAGE_FEATURES" defined, = but=20 clearly the aarch64 sysroots are getting populated correctly (we=20 succesfully compiled and ran a simple hello world).

Ca= n anyone point me to an example, or discuss a successful use of=20 "multilib" on the Jethro branch (given desparate brainstorming be= low),=20 share some more verbose documentation, or ask follow-up questions?
<= /div>


______________________________________________= _______________
Desperate brainstorming below:
= I did find this years-old patch: https://patchwork.openembedded.org/patc= h/30941/
Notably, the do_populate_sdk method in poky/meta= /classes/populate_sdk_base.bbclass iterates over the values listed in the M= ULTILIB_VARIANTS variable:

+	variants =3D d.getVar("=
MULTILIB_VARIANTS", True) or ""
+	for item in variants.split():
+		# Load overrides from 'd' to avoid having to reset the val=
ue...
+		overrides =3D d.getVar("OVERRIDES", False) + ":virt=
class-multilib-" + item
+		localdata.setVar("OVERRIDES", overrides)
+		bb.data.update_data(localdata)
+		bb.build.exec_func("create_sdk_files", localdata)=


The latest version in Jethro does not h= ave anything equivalent to that, but I did not dig deeply into the code or = the commit history.




_________________________= _____________________________________
More data:

local.conf relevant section:
#
# Multilib configuration#
# This sets any packages preprended with lib32- to be built with
= # the armv7a tuning (32 bit) instead of 64 bit aarch.
#
require conf/= multilib.conf
MULTILIBS =3D "multilib:lib32"
DEFAULTTUNE_vi= rtclass-multilib-lib32 =3D "armv7at-neon"
= --
_______________________________________________
Openembedded-core= mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-co= re




--94eb2c0954e8a8e93405392fc12e--