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下载地址:https://nxp.flexnetoperations.com/control/frse/product?child_plneID=684021&cert_num=591018117&ver=ARC
选择v1.8,下载E500v2版本的Virtual Host Environment。
下载VirtualBox虚拟机,然后安装,根据SDK文档导入虚拟机镜像,然后启动即可。
这样SDK环境就已经搭建好了
不需要根据SDK文档安装对应的SDK,我们下载的E500的SDK中,环境已经部署好了。
查看Set Up Host Environment章节,设置好编译环境
使用./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
$ build_p1020rdb_release/
$ . SOURCE_THIS
$ bitbake <image-target>
Where is one of the following:
我们选择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):
Note: For additional Yocto Project usage information, please refer to the https://www.yoctoproject.org/.
通过修改SDK/QorIQ-SDK-V1.8-20150619-yocto/meta-fsl-ppc/conf/machine/相关文件
e.g. UBOOT_CONFIG ??= “nor”
If source code has already been installed, please skip steps 1 & 2 and proceed modifying source code.
$ bitbake -c cleansstate u-boot
Note:
Other helpful bitbake cleaning commands:
bitbake -c clean <target>
bitbake -c cleansstate <target>
$ bitbake -c patch u-boot
$ 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:
$ cd build_<machine>
$ bitbake -c compile -f u-boot
$ bitbake u-boot
Note: U-Boot image can be found in build_/tmp/deploy/images//