All of lore.kernel.org
 help / color / mirror / Atom feed
* The best way to change target architecture
@ 2017-06-06 12:42 Zhuoqun Cheng
  2017-06-06 14:05 ` Khem Raj
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Zhuoqun Cheng @ 2017-06-06 12:42 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 1632 bytes --]

Hi Yocto Experts,

I'm fairly new to Yocto and I've already tried my best to search for
answers, but not happy with what I found.

So here's the situation I've got:

I'm using yocto to build the intel aero board image, following this link:
https://github.com/intel-aero/meta-intel-aero/wiki/Quickstart-Guide#yocto-for-intel-aero

Everything worked fine, until I wanted to change the target architecture
from the default 64-bit x86 to 32-bit x86. What I did is three steps:
1. do a clean: bitbake -c clean intel-aero-image
2. change configuration, from "require conf/machine/intel-corei7-64.conf"
to "require conf/machine/intel-core2-32.conf" in the file
"meta-intel-aero/conf/machine/intel-aero.conf"
3. do a build: bitbake intel-aero-image

Unfortunately, I got loads of errors, like "ERROR:
linux-yocto-4.4.60+gitAUTOINC+2cc78e92f4-r0 do_package_qa: QA Issue:
Architecture did not match (3 to 62) on
work/core2-32-intel-common-poky-linux/linux-yocto/4.4.60+gitAUTOINC+2cc78e92f4-r0/packages-split/kernel-module-gspca-kinect/lib/modules/4.4.60-yocto-standard/kernel/drivers/media/usb/gspca/gspca_kinect.ko
[arch]
"

Then I tried deleting all the files in the packages-split directory and
rebuilding. It passed building the kernel (even though failed because some
other package's arch mismatch), but those file I deleted never got
generated again! Now I'm a bit worried.

So I guess my question is:
What is the correct procedures to follow to reuse a poky folder (already
built once) for a different target architecture? I'm happy to accept any
links and suggested readings.

Thanks a lot!
Tom.

[-- Attachment #2: Type: text/html, Size: 2075 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: The best way to change target architecture
  2017-06-06 12:42 The best way to change target architecture Zhuoqun Cheng
@ 2017-06-06 14:05 ` Khem Raj
  2017-06-06 15:59 ` Leonardo Sandoval
  2017-06-06 17:30 ` Andre McCurdy
  2 siblings, 0 replies; 7+ messages in thread
From: Khem Raj @ 2017-06-06 14:05 UTC (permalink / raw)
  To: Zhuoqun Cheng; +Cc: yocto@yoctoproject.org

On Tue, Jun 6, 2017 at 5:42 AM, Zhuoqun Cheng <czq@bu.edu> wrote:
> Hi Yocto Experts,
>
> I'm fairly new to Yocto and I've already tried my best to search for
> answers, but not happy with what I found.
>
> So here's the situation I've got:
>
> I'm using yocto to build the intel aero board image, following this link:
> https://github.com/intel-aero/meta-intel-aero/wiki/Quickstart-Guide#yocto-for-intel-aero
>
> Everything worked fine, until I wanted to change the target architecture
> from the default 64-bit x86 to 32-bit x86. What I did is three steps:
> 1. do a clean: bitbake -c clean intel-aero-image
> 2. change configuration, from "require conf/machine/intel-corei7-64.conf" to
> "require conf/machine/intel-core2-32.conf" in the file
> "meta-intel-aero/conf/machine/intel-aero.conf"
> 3. do a build: bitbake intel-aero-image
>
> Unfortunately, I got loads of errors, like "ERROR:
> linux-yocto-4.4.60+gitAUTOINC+2cc78e92f4-r0 do_package_qa: QA Issue:
> Architecture did not match (3 to 62) on
> work/core2-32-intel-common-poky-linux/linux-yocto/4.4.60+gitAUTOINC+2cc78e92f4-r0/packages-split/kernel-module-gspca-kinect/lib/modules/4.4.60-yocto-standard/kernel/drivers/media/usb/gspca/gspca_kinect.ko
> [arch]
> "
>
> Then I tried deleting all the files in the packages-split directory and
> rebuilding. It passed building the kernel (even though failed because some
> other package's arch mismatch), but those file I deleted never got generated
> again! Now I'm a bit worried.
>
> So I guess my question is:
> What is the correct procedures to follow to reuse a poky folder (already
> built once) for a different target architecture? I'm happy to accept any
> links and suggested readings.
>

there already is a definition for 32bit machine, if you want a pure
32bit rootfs all you need
to do is set MACHINE = "intel-core2-32" in local.conf


> Thanks a lot!
> Tom.
>
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: The best way to change target architecture
  2017-06-06 12:42 The best way to change target architecture Zhuoqun Cheng
  2017-06-06 14:05 ` Khem Raj
@ 2017-06-06 15:59 ` Leonardo Sandoval
  2017-06-06 16:12   ` Zhuoqun Cheng
  2017-06-06 17:30 ` Andre McCurdy
  2 siblings, 1 reply; 7+ messages in thread
From: Leonardo Sandoval @ 2017-06-06 15:59 UTC (permalink / raw)
  To: Zhuoqun Cheng; +Cc: yocto

On Tue, 2017-06-06 at 08:42 -0400, Zhuoqun Cheng wrote:
> Hi Yocto Experts,
> 
> 
> I'm fairly new to Yocto and I've already tried my best to search for
> answers, but not happy with what I found.
> 
> 
> So here's the situation I've got: 
> 
> 
> I'm using yocto to build the intel aero board image, following this
> link:
> https://github.com/intel-aero/meta-intel-aero/wiki/Quickstart-Guide#yocto-for-intel-aero
> 
> 
> 
> Everything worked fine, until I wanted to change the target
> architecture from the default 64-bit x86 to 32-bit x86. What I did is
> three steps:
> 1. do a clean: bitbake -c clean intel-aero-image
> 2. change configuration, from "require
> conf/machine/intel-corei7-64.conf" to "require
> conf/machine/intel-core2-32.conf" in the file
> "meta-intel-aero/conf/machine/intel-aero.conf"
> 3. do a build: bitbake intel-aero-image
> 
Did you change the MACHINE var?



> 
> Unfortunately, I got loads of errors, like "ERROR: linux-yocto-4.4.60
> +gitAUTOINC+2cc78e92f4-r0 do_package_qa: QA Issue: Architecture did
> not match (3 to 62) on
> work/core2-32-intel-common-poky-linux/linux-yocto/4.4.60+gitAUTOINC
> +2cc78e92f4-r0/packages-split/kernel-module-gspca-kinect/lib/modules/4.4.60-yocto-standard/kernel/drivers/media/usb/gspca/gspca_kinect.ko [arch]
> "
> 
> 
> Then I tried deleting all the files in the packages-split directory
> and rebuilding. It passed building the kernel (even though failed
> because some other package's arch mismatch), but those file I deleted
> never got generated again! Now I'm a bit worried.
> 
> 
> So I guess my question is:
> What is the correct procedures to follow to reuse a poky folder
> (already built once) for a different target architecture? I'm happy to
> accept any links and suggested readings.
> 
> 
> Thanks a lot!
> Tom.
> 
> 
> -- 
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: The best way to change target architecture
  2017-06-06 15:59 ` Leonardo Sandoval
@ 2017-06-06 16:12   ` Zhuoqun Cheng
  0 siblings, 0 replies; 7+ messages in thread
From: Zhuoqun Cheng @ 2017-06-06 16:12 UTC (permalink / raw)
  To: Leonardo Sandoval, Khem Raj; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 3213 bytes --]

Hi Leo and Khem,

I just changed the MACHINE var to "intel-core2-32" (I assume it's the one
in build/conf/local.conf. It was read-only and I added write permission)
and it still gives me the same error.

Here's some info that might be useful, before I change, when I do build, it
prints:

Build Configuration:
BB_VERSION        = "1.30.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "universal"
TARGET_SYS        = "i686-poky-linux"
MACHINE           = "intel-aero"
DISTRO            = "poky-aero"
DISTRO_VERSION    = "1.4.0-dev"
TUNE_FEATURES     = "m32 core2"
TARGET_FPU        = ""

After change:

Build Configuration:
BB_VERSION        = "1.30.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "universal"
TARGET_SYS        = "i686-poky-linux"
MACHINE           = "intel-core2-32"
DISTRO            = "poky-aero"
DISTRO_VERSION    = "1.4.0-dev"
TUNE_FEATURES     = "m32 core2"
TARGET_FPU        = ""

Thanks,
Tom.

On Tue, Jun 6, 2017 at 11:59 AM, Leonardo Sandoval <
leonardo.sandoval.gonzalez@linux.intel.com> wrote:

> On Tue, 2017-06-06 at 08:42 -0400, Zhuoqun Cheng wrote:
> > Hi Yocto Experts,
> >
> >
> > I'm fairly new to Yocto and I've already tried my best to search for
> > answers, but not happy with what I found.
> >
> >
> > So here's the situation I've got:
> >
> >
> > I'm using yocto to build the intel aero board image, following this
> > link:
> > https://github.com/intel-aero/meta-intel-aero/wiki/
> Quickstart-Guide#yocto-for-intel-aero
> >
> >
> >
> > Everything worked fine, until I wanted to change the target
> > architecture from the default 64-bit x86 to 32-bit x86. What I did is
> > three steps:
> > 1. do a clean: bitbake -c clean intel-aero-image
> > 2. change configuration, from "require
> > conf/machine/intel-corei7-64.conf" to "require
> > conf/machine/intel-core2-32.conf" in the file
> > "meta-intel-aero/conf/machine/intel-aero.conf"
> > 3. do a build: bitbake intel-aero-image
> >
> Did you change the MACHINE var?
>
>
>
> >
> > Unfortunately, I got loads of errors, like "ERROR: linux-yocto-4.4.60
> > +gitAUTOINC+2cc78e92f4-r0 do_package_qa: QA Issue: Architecture did
> > not match (3 to 62) on
> > work/core2-32-intel-common-poky-linux/linux-yocto/4.4.60+gitAUTOINC
> > +2cc78e92f4-r0/packages-split/kernel-module-gspca-kinect/
> lib/modules/4.4.60-yocto-standard/kernel/drivers/media/usb/gspca/gspca_kinect.ko
> [arch]
> > "
> >
> >
> > Then I tried deleting all the files in the packages-split directory
> > and rebuilding. It passed building the kernel (even though failed
> > because some other package's arch mismatch), but those file I deleted
> > never got generated again! Now I'm a bit worried.
> >
> >
> > So I guess my question is:
> > What is the correct procedures to follow to reuse a poky folder
> > (already built once) for a different target architecture? I'm happy to
> > accept any links and suggested readings.
> >
> >
> > Thanks a lot!
> > Tom.
> >
> >
> > --
> > _______________________________________________
> > yocto mailing list
> > yocto@yoctoproject.org
> > https://lists.yoctoproject.org/listinfo/yocto
>
>
>

[-- Attachment #2: Type: text/html, Size: 4909 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: The best way to change target architecture
  2017-06-06 12:42 The best way to change target architecture Zhuoqun Cheng
  2017-06-06 14:05 ` Khem Raj
  2017-06-06 15:59 ` Leonardo Sandoval
@ 2017-06-06 17:30 ` Andre McCurdy
  2017-06-06 23:09   ` Zhuoqun Cheng
  2 siblings, 1 reply; 7+ messages in thread
From: Andre McCurdy @ 2017-06-06 17:30 UTC (permalink / raw)
  To: Zhuoqun Cheng; +Cc: Yocto discussion list

On Tue, Jun 6, 2017 at 5:42 AM, Zhuoqun Cheng <czq@bu.edu> wrote:
> Hi Yocto Experts,
>
> I'm fairly new to Yocto and I've already tried my best to search for
> answers, but not happy with what I found.
>
> So here's the situation I've got:
>
> I'm using yocto to build the intel aero board image, following this link:
> https://github.com/intel-aero/meta-intel-aero/wiki/Quickstart-Guide#yocto-for-intel-aero
>
> Everything worked fine, until I wanted to change the target architecture
> from the default 64-bit x86 to 32-bit x86. What I did is three steps:
> 1. do a clean: bitbake -c clean intel-aero-image

Note that running the clean task for the final image doesn't have any
affect on the packages which go into that image, so this step doesn't
actually do very much.

> 2. change configuration, from "require conf/machine/intel-corei7-64.conf" to
> "require conf/machine/intel-core2-32.conf" in the file
> "meta-intel-aero/conf/machine/intel-aero.conf"

Here you are changing the target architecture but keeping the machine
name the same. In theory it should work, but it probably isn't well
tested...

> 3. do a build: bitbake intel-aero-image
>
> Unfortunately, I got loads of errors, like "ERROR:
> linux-yocto-4.4.60+gitAUTOINC+2cc78e92f4-r0 do_package_qa: QA Issue:
> Architecture did not match (3 to 62) on
> work/core2-32-intel-common-poky-linux/linux-yocto/4.4.60+gitAUTOINC+2cc78e92f4-r0/packages-split/kernel-module-gspca-kinect/lib/modules/4.4.60-yocto-standard/kernel/drivers/media/usb/gspca/gspca_kinect.ko
> [arch]
> "
>
> Then I tried deleting all the files in the packages-split directory and
> rebuilding.

Manually deleting anything within a recipe's working directory isn't
really recommended. Better to run the clean (or cleansstate) task for
that recipe instead, e.g. in this case:

  bitbake -c cleansstate linux-yocto

> It passed building the kernel (even though failed because some
> other package's arch mismatch), but those file I deleted never got generated
> again! Now I'm a bit worried.

It's quite normal that build artefacts will not be generated again if
a recipe has been successfully built once before, since build results
are stored in sstate cache. To force a particular recipe to be
rebuilt, you can use:

  bitbake -c cleansstate <recipe>
  bitbake <recipe>

> So I guess my question is:
> What is the correct procedures to follow to reuse a poky folder (already
> built once) for a different target architecture? I'm happy to accept any
> links and suggested readings.

The normal way to recover from the kind of problems you are seeing
would be to remove the entire tmp directory (and if that still doesn't
work, then manually run the cleansstate task for any individual
recipes which still fail to build).

> Thanks a lot!
> Tom.
>
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: The best way to change target architecture
  2017-06-06 17:30 ` Andre McCurdy
@ 2017-06-06 23:09   ` Zhuoqun Cheng
  2017-06-06 23:16     ` Zhuoqun Cheng
  0 siblings, 1 reply; 7+ messages in thread
From: Zhuoqun Cheng @ 2017-06-06 23:09 UTC (permalink / raw)
  To: Andre McCurdy; +Cc: Yocto discussion list

[-- Attachment #1: Type: text/plain, Size: 3457 bytes --]

Thanks, Andre! That explains a lot.
I got rid of the entire tmp directory and then rebuilt. And unfortunately
I'm still running into the same problem...
Looking at the error again (see below)


On Tue, Jun 6, 2017 at 1:30 PM, Andre McCurdy <armccurdy@gmail.com> wrote:

> On Tue, Jun 6, 2017 at 5:42 AM, Zhuoqun Cheng <czq@bu.edu> wrote:
> > Hi Yocto Experts,
> >
> > I'm fairly new to Yocto and I've already tried my best to search for
> > answers, but not happy with what I found.
> >
> > So here's the situation I've got:
> >
> > I'm using yocto to build the intel aero board image, following this link:
> > https://github.com/intel-aero/meta-intel-aero/wiki/
> Quickstart-Guide#yocto-for-intel-aero
> >
> > Everything worked fine, until I wanted to change the target architecture
> > from the default 64-bit x86 to 32-bit x86. What I did is three steps:
> > 1. do a clean: bitbake -c clean intel-aero-image
>
> Note that running the clean task for the final image doesn't have any
> affect on the packages which go into that image, so this step doesn't
> actually do very much.
>
> > 2. change configuration, from "require conf/machine/intel-corei7-64.conf"
> to
> > "require conf/machine/intel-core2-32.conf" in the file
> > "meta-intel-aero/conf/machine/intel-aero.conf"
>
> Here you are changing the target architecture but keeping the machine
> name the same. In theory it should work, but it probably isn't well
> tested...
>
> > 3. do a build: bitbake intel-aero-image
> >
> > Unfortunately, I got loads of errors, like "ERROR:
> > linux-yocto-4.4.60+gitAUTOINC+2cc78e92f4-r0 do_package_qa: QA Issue:
> > Architecture did not match (3 to 62) on
> > work/core2-32-intel-common-poky-linux/linux-yocto/4.4.60+
> gitAUTOINC+2cc78e92f4-r0/packages-split/kernel-module-
> gspca-kinect/lib/modules/4.4.60-yocto-standard/kernel/
> drivers/media/usb/gspca/gspca_kinect.ko
> > [arch]
> > "
> >
> > Then I tried deleting all the files in the packages-split directory and
> > rebuilding.
>
> Manually deleting anything within a recipe's working directory isn't
> really recommended. Better to run the clean (or cleansstate) task for
> that recipe instead, e.g. in this case:
>
>   bitbake -c cleansstate linux-yocto
>
> > It passed building the kernel (even though failed because some
> > other package's arch mismatch), but those file I deleted never got
> generated
> > again! Now I'm a bit worried.
>
> It's quite normal that build artefacts will not be generated again if
> a recipe has been successfully built once before, since build results
> are stored in sstate cache. To force a particular recipe to be
> rebuilt, you can use:
>
>   bitbake -c cleansstate <recipe>
>   bitbake <recipe>
>
> > So I guess my question is:
> > What is the correct procedures to follow to reuse a poky folder (already
> > built once) for a different target architecture? I'm happy to accept any
> > links and suggested readings.
>
> The normal way to recover from the kind of problems you are seeing
> would be to remove the entire tmp directory (and if that still doesn't
> work, then manually run the cleansstate task for any individual
> recipes which still fail to build).
>
> > Thanks a lot!
> > Tom.
> >
> >
> > --
> > _______________________________________________
> > yocto mailing list
> > yocto@yoctoproject.org
> > https://lists.yoctoproject.org/listinfo/yocto
> >
>

[-- Attachment #2: Type: text/html, Size: 4744 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: The best way to change target architecture
  2017-06-06 23:09   ` Zhuoqun Cheng
@ 2017-06-06 23:16     ` Zhuoqun Cheng
  0 siblings, 0 replies; 7+ messages in thread
From: Zhuoqun Cheng @ 2017-06-06 23:16 UTC (permalink / raw)
  To: Andre McCurdy; +Cc: Yocto discussion list

[-- Attachment #1: Type: text/plain, Size: 4111 bytes --]

Sorry for the previous message. Accidentally sent it out.

Thanks, Andre! That explains a lot.
I got rid of the entire tmp directory and then rebuilt. And unfortunately
I'm still running into the same problem...
I entered the directory shown in the error and did a 'file' on the
binaries. They are all x86-64 binary. Now I wonder why in the
core2-32-intel-commom-poke-linux folder exists 64 bit binaries?
What configuration could I have messed up?

Thanks,
Tom.


On Tue, Jun 6, 2017 at 7:09 PM, Zhuoqun Cheng <czq@bu.edu> wrote:

> Thanks, Andre! That explains a lot.
> I got rid of the entire tmp directory and then rebuilt. And unfortunately
> I'm still running into the same problem...
> Looking at the error again (see below)
>
>
> On Tue, Jun 6, 2017 at 1:30 PM, Andre McCurdy <armccurdy@gmail.com> wrote:
>
>> On Tue, Jun 6, 2017 at 5:42 AM, Zhuoqun Cheng <czq@bu.edu> wrote:
>> > Hi Yocto Experts,
>> >
>> > I'm fairly new to Yocto and I've already tried my best to search for
>> > answers, but not happy with what I found.
>> >
>> > So here's the situation I've got:
>> >
>> > I'm using yocto to build the intel aero board image, following this
>> link:
>> > https://github.com/intel-aero/meta-intel-aero/wiki/Quickstar
>> t-Guide#yocto-for-intel-aero
>> >
>> > Everything worked fine, until I wanted to change the target architecture
>> > from the default 64-bit x86 to 32-bit x86. What I did is three steps:
>> > 1. do a clean: bitbake -c clean intel-aero-image
>>
>> Note that running the clean task for the final image doesn't have any
>> affect on the packages which go into that image, so this step doesn't
>> actually do very much.
>>
>> > 2. change configuration, from "require conf/machine/intel-corei7-64.conf"
>> to
>> > "require conf/machine/intel-core2-32.conf" in the file
>> > "meta-intel-aero/conf/machine/intel-aero.conf"
>>
>> Here you are changing the target architecture but keeping the machine
>> name the same. In theory it should work, but it probably isn't well
>> tested...
>>
>> > 3. do a build: bitbake intel-aero-image
>> >
>> > Unfortunately, I got loads of errors, like "ERROR:
>> > linux-yocto-4.4.60+gitAUTOINC+2cc78e92f4-r0 do_package_qa: QA Issue:
>> > Architecture did not match (3 to 62) on
>> > work/core2-32-intel-common-poky-linux/linux-yocto/4.4.60+git
>> AUTOINC+2cc78e92f4-r0/packages-split/kernel-module-gspca-
>> kinect/lib/modules/4.4.60-yocto-standard/kernel/drivers/
>> media/usb/gspca/gspca_kinect.ko
>> > [arch]
>> > "
>> >
>> > Then I tried deleting all the files in the packages-split directory and
>> > rebuilding.
>>
>> Manually deleting anything within a recipe's working directory isn't
>> really recommended. Better to run the clean (or cleansstate) task for
>> that recipe instead, e.g. in this case:
>>
>>   bitbake -c cleansstate linux-yocto
>>
>> > It passed building the kernel (even though failed because some
>> > other package's arch mismatch), but those file I deleted never got
>> generated
>> > again! Now I'm a bit worried.
>>
>> It's quite normal that build artefacts will not be generated again if
>> a recipe has been successfully built once before, since build results
>> are stored in sstate cache. To force a particular recipe to be
>> rebuilt, you can use:
>>
>>   bitbake -c cleansstate <recipe>
>>   bitbake <recipe>
>>
>> > So I guess my question is:
>> > What is the correct procedures to follow to reuse a poky folder (already
>> > built once) for a different target architecture? I'm happy to accept any
>> > links and suggested readings.
>>
>> The normal way to recover from the kind of problems you are seeing
>> would be to remove the entire tmp directory (and if that still doesn't
>> work, then manually run the cleansstate task for any individual
>> recipes which still fail to build).
>>
>> > Thanks a lot!
>> > Tom.
>> >
>> >
>> > --
>> > _______________________________________________
>> > yocto mailing list
>> > yocto@yoctoproject.org
>> > https://lists.yoctoproject.org/listinfo/yocto
>> >
>>
>
>

[-- Attachment #2: Type: text/html, Size: 6047 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-06-06 23:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-06 12:42 The best way to change target architecture Zhuoqun Cheng
2017-06-06 14:05 ` Khem Raj
2017-06-06 15:59 ` Leonardo Sandoval
2017-06-06 16:12   ` Zhuoqun Cheng
2017-06-06 17:30 ` Andre McCurdy
2017-06-06 23:09   ` Zhuoqun Cheng
2017-06-06 23:16     ` Zhuoqun Cheng

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.