- Embedded Linux Development Using Yocto Project Cookbook(Second Edition)
- Alex González
- 192字
- 2021-06-30 19:21:31
Getting ready
We will use a Yocto toolchain to build the U-Boot source externally from the Yocto build system. The Yocto project has precompiled SDKs for both 32- and 64-bit hosts for the machines supported by Poky. You can download them from http://downloads.yoctoproject.org/releases/yocto/yocto-2.4/toolchain/.
Unfortunately, since version 2.1, it does not offer a precompiled SDK for i.MX6-based machines.
Instead, let's build an SDK using our existing Yocto Project installation:
$ cd /opt/yocto/fsl-community-bsp $ source setup-environment wandboard $ bitbake core-image-minimal -c populate_sdk
We will learn more about Yocto's SDKs in Chapter 4, Application Development.
Execute the installation script from a new shell to avoid problems with the environment setup:
$ cd /opt/yocto/fsl-community-bsp/wandboard/tmp/deploy/sdk/ $ ./poky-glibc-x86_64-core-image-minimal-cortexa9hf-neon-toolchain-2.4.sh
Accept the default installation location. It is recommended not to change the default location to avoid relocation issues.
Now we need to download the U-Boot source:
- Find the upstream Git repository:
$ bitbake -e u-boot-fslc | grep ^SRC_URI= SRC_URI="git://github.com/Freescale/u-boot-fslc.git;branch=2017.11+fslc file://0001-02_01-Add-a-custom-wandboard-custom-machine.patch"
- Clone U-Boot's source from its upstream repository:
$ cd /opt/yocto/ $ git clone git://github.com/Freescale/u-boot-fslc.git $ cd u-boot-fslc
$ git checkout -b 2017.11+fslc origin/2017.11+fslc.