[yocto] The best way to change target architecture
armccurdy at gmail.com
Tue Jun 6 10:30:44 PDT 2017
On Tue, Jun 6, 2017 at 5:42 AM, Zhuoqun Cheng <czq at 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:
> 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
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
> 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
> Then I tried deleting all the files in the packages-split directory and
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>
> 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!
> yocto mailing list
> yocto at yoctoproject.org
More information about the yocto