当前位置: 首页 > 工具软件 > space-sdk > 使用案例 >

QorIQ SDK环境搭建

璩浩广
2023-12-01

SDK文档

nxp官方文档中心:https://nxp.sdlproducts.com/LiveContent/web/pub.xql?c=t&action=home&pub=QorIQ_SDK&lang=en-US

pdf:https://www.nxp.com/docs/en/release-note/QORIQ-SDK-2-0_RN.pdf

先大概浏览一下,发现P1020rdb支持到SDK1.8,所以我们下载1.8版本的SDK

SDK下载

SDK下载地址:https://nxp.flexnetoperations.com/control/frse/product?child_plneID=684021&cert_num=591018117&ver=ARC

选择v1.8,下载E500v2版本的Virtual Host Environment。

SDK安装

下载VirtualBox虚拟机,然后安装,根据SDK文档导入虚拟机镜像,然后启动即可。

这样SDK环境就已经搭建好了

不需要根据SDK文档安装对应的SDK,我们下载的E500的SDK中,环境已经部署好了。

设置主机环境

查看Set Up Host Environment章节,设置好编译环境

Set Up Poky

使用./poky/fsl-setup-poky脚本设置环境变量

  • 查看帮助
$ cd SDK/QorIQ-SDK-V1.8-20150619-yocto/
$ . ./poky/fsl-setup-poky -h
Usage: . fsl-setup-env -m <machine>

    Supported machines
    QorIQ: b4420qds-64b b4420qds b4860qds-64b b4860qds c293pcie ls1021atwr ls1043ardb p2041rdb p3041ds p4080ds p5020ds-64b p5020ds p5040ds-64b p5040ds t1023rdb-64b t1023rdb t1024rdb-64b t1024rdb t1040d4rdb-64b t1040d4rdb t1042d4rdb-64b t1042d4rdb t2080qds-64b t2080qds t2080rdb-64b t2080rdb t4160qds-64b t4160qds t4240qds-64b t4240qds t4240rdb-64b t4240rdb ls1012afrdm-32b ls1012afrdm ls1012ardb-32b ls1012ardb ls1043ardb-32b ls1046ardb-32b ls1046ardb ls2088ardb

  Op  tional parameters:
    * [-m machine]: the target machine to be built.
    * [-b path]:    non-default path of project build folder.
    * [-j jobs]:    number of jobs for make to spawn during the compilation stage.
    * [-t tasks]:   number of BitBake tasks that can be issued in parallel.
    * [-d path]:    non-default path of DL_DIR (downloaded source)
    * [-c path]:    non-default path of SSTATE_DIR (shared state Cache)
    * [-g]:         enable Carrier Grade Linux
    * [-l]:         lite mode. To help conserve disk space, deletes the building
                    directory once the package is built.
    * [-h]:         help
  • 使用-m设置p1020rdb的环境变量

    $ . ./poky/fsl-setup-poky -m p1020rdb
    

Perform Builds

$ build_p1020rdb_release/
$ . SOURCE_THIS

编译目标

$ bitbake <image-target>

Where is one of the following:

  • fsl-image-minimal: contains basic packages to boot up a board
  • fsl-image-core: contains common open source packages and NXP specific packages.
  • fsl-image-full: contains all packages in the full package list.
  • fsl-image-kernelitb: A FIT image comprising the Linux image, dtb and rootfs image.
  • fsl-image-mfgtool: contains all the user space apps needed to deploy the fsl-image-mfgtool image to a USB stick, hard drive, or other large physical media.
  • fsl-image-virt: contains toolkit to interact with the virtualization capabilities of Linux
  • core-image-x11: NXP image with a very basic X11 image with a terminal
  • fsl-toolchain: the cross compiler binary package
  • package-name(usdpaa): build a specific package

我们选择fsl-image-core,开始编译

$ bitbake fsl-image-core

编译目标存放路径

A Yocto Project build produces images that will be located in the following directory:

<sdk-install-dir>/build_<machine>/tmp/deploy/images/<machine>/

The following list shows the typical directory/image files (exact contents depend on the setting of the <IMAGE_FSTYPES> variable):

  • fsl-image-<machine>.ext2.gz.u-boot - ramdisk image that can be loaded with U-Boot
  • fsl-image-<machine>.ext2.gz - gzipped ramdisk image
  • fsl-image-<machine>.tar.gz - gzipped tar archive of the image
  • uImage-<machine>.bin - kernel binary of the image
  • u-boot-<machine>.bin - U-Boot binary image that can be programmed into board Flash
  • uImage-<machine>.dtb - device tree binary (dtb).
  • fsl_fman_ucode_<machine>_<version>.bin - fman ucode for <machine> board
  • hv/hv.uImage - uImage for hypervisor
  • hv-cfg///hv.dtb - dtb for hypervisor
  • rcw//rcw_.bin - rcw

Note: For additional Yocto Project usage information, please refer to the https://www.yoctoproject.org/.

自定义u-boot

修改u-boot配置

通过修改SDK/QorIQ-SDK-V1.8-20150619-yocto/meta-fsl-ppc/conf/machine/相关文件

e.g. UBOOT_CONFIG ??= “nor”

修改u-boot源码

If source code has already been installed, please skip steps 1 & 2 and proceed modifying source code.

  1. $ bitbake -c cleansstate u-boot

    Note:

    Other helpful bitbake cleaning commands:

    bitbake -c clean <target>

    • Removes work directory in build_<machine>/tmp/work

    bitbake -c cleansstate <target>

    • Removes work directory in build_/tmp/work
    • Removes cache files in /sstate-cache/ directory.
  2. $ bitbake -c patch u-boot

  3. $ cd <S> and modify the source code. Follow instructions to “Rebuild U-Boot Image” when you are finished modifying source code.

    Note: Use bitbake -e <package-name> | grep ^S= to get value of <S>, the package source code directory.

To Rebuild U-Boot Image:

  1. $ cd build_<machine>

  2. $ bitbake -c compile -f u-boot

  3. $ bitbake u-boot

    Note: U-Boot image can be found in build_/tmp/deploy/images//

 类似资料: