QQ群:852283276
微信:arm80x86
微信公众号:青儿创客基地
B站:主页 https://space.bilibili.com/208826118
安装SDK2.0,
$ sudo mount -o loop QorIQ-SDK-<version>-<target>-<yyyymmdd>-yocto.iso /mnt/cdrom
$ /mnt/cdrom/install
安装更新,安装过程中提示输入SDK安装路径,
$ tar -xjf SDK-V2.0-1703.tar.bz2
$ ./SDK-V2.0-1703/install
编译输出的镜像文件在build_t2080rdb-64b/tmp/deploy/images/t2080rdb-64b/
中,
$ . ./fsl-setup-env -m t2080rdb-64b
$ bitbake fsl-image-core
打包内核,根文件系统和设备树,
$ bitbake fsl-image-kernelitb
获取u-boot源代码,
$ bitbake -c cleansstate u-boot
$ bitbake -c patch u-boot
此时可更改源代码并编译,
$ bitbake -c compile -f u-boot
$ bitbake u-boot
获取内核源代码,
$ bitbake -c cleansstate virtual/kernel
$ bitbake -c patch virtual/kernel
此时可更改源代码并编译,
$ bitbake -c menuconfig virtual/kernel
$ bitbake -c compile -f virtual/kernel
$ bitbake virtual/kernel
获取软件源代码,
$ bitbake usdpaa-apps -c patch -f
$ bitbake skmm-host -c patch -f
$ bitbake skmm-ep -c patch -f
此时可更改源代码并编译,
$ bitbake -c compile -f usdpaa-apps
使用Yocto定制根文件系统,缩小文件系统大小,放入Nor Flash后,加快启动速度,
# Copyright (C) 2015 Qe.Ltd
require fsl-image-minimal.bb
SUMMARY = "Small image commonly used for manufacturing or other small image needs."
DESCRIPTION = "Small image which only includes essential manufacturing \
packages to deploy other big images to large physical media, such as \
a USB stick or a hard drive."
LICENSE = "MIT"
IMAGE_FSTYPES += " ext4.gz ext4.gz.u-boot"
IMAGE_INSTALL_append = " \
packagegroup-core-ssh-openssh \
packagegroup-fsl-mfgtools \
e2fsprogs-badblocks \
e2fsprogs-e2fsck \
e2fsprogs-tune2fs \
i2c-tools \
pciutils \
ethtool \
iperf3 \
"
DPAA_PKGS = " \
eth-config \
fmc \
usdpaa \
usdpaa-apps \
dpa-offload \
hypervisor-partman \
"
DPAA_PKGS_e500v2 = ""
DPAA_PKGS_remove_e6500 = "hypervisor-partman"
DPAA_PKGS_append_e6500 = " lib64-hypervisor-partman"
PMETOOLS ?= "pme-tools"
PMETOOLS_e500v2 = ""
RDEPENDS_${PN}_append_qoriq = "\
merge-files \
${DPAA_PKGS} \
"
RDEPENDS_${PN}_append_qoriq-ppc = "\
apptrk \
asf \
${PMETOOLS} \
"
# NOTE: Remove the conditional pkc-host inclusion and all traces of c29x_pkc
# DISTRO_FEATURE if pkc-host no longer requires customized cryptodev patches
RDEPENDS_${PN}_append_qoriq-ppc = "\
${@base_contains('DISTRO_FEATURES', 'c29x_pkc', 'pkc-host', '', d)} \
"
RDEPENDS_${PN}_append_e500v2 = " \
cantest \
fsl-pme \
libppc \
testfloat \
"
RDEPENDS_${PN}_append_e500mc = " \
libppc \
"
RDEPENDS_${PN}_append_e6500-64b = " ceetm"
每次编译的镜像都带了时间了,被坑过,用SDK提供的链接,
$ cp tmp/deploy/images/t2080rdb-64b/fsl-image-zc-t2080rdb-64b.ext2.gz ~/program/fdk/bsp/t2080/rootfs-v2.0.ext2.gz
$ cp tmp/deploy/images/t2080rdb-64b/fsl-image-zc-t2080rdb-64b.ext2.gz ~/program/fdk/bsp/t2080/rootfs-raw-v2.0.ext2.gz
$ cp tmp/deploy/images/t2080rdb-64b/fsl-image-zc-t2080rdb-64b.ext4.gz ~/program/fdk/bsp/t2080/rootfs-raw-v2.0.ext4.gz
改进一下QorIQ-SDK-V2.0-20160527-yocto/sources/meta-freescale/recipes-fsl/packagegroups
,
# Copyright (C) 2015 Qe.Ltd
# Released under the MIT license (see COPYING.MIT for the terms)
SUMMARY = "Freescale Package group for zc tools"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
inherit packagegroup
PACKAGES = "${PN}"
RDEPENDS_${PN} = " \
e2fsprogs \
e2fsprogs-badblocks \
e2fsprogs-e2fsck \
e2fsprogs-tune2fs \
i2c-tools \
pciutils \
ethtool \
iperf3 \
"
DPAA_PKGS = " \
eth-config \
fmc \
usdpaa \
usdpaa-apps \
dpa-offload \
hypervisor-partman \
"
DPAA_PKGS_e500v2 = ""
DPAA_PKGS_remove_e6500 = "hypervisor-partman"
DPAA_PKGS_append_e6500 = " lib64-hypervisor-partman"
PMETOOLS ?= "pme-tools"
PMETOOLS_e500v2 = ""
RDEPENDS_${PN}_append_qoriq = "\
merge-files \
${DPAA_PKGS} \
"
RDEPENDS_${PN}_append_qoriq-ppc = "\
apptrk \
asf \
${PMETOOLS} \
"
# NOTE: Remove the conditional pkc-host inclusion and all traces of c29x_pkc
# DISTRO_FEATURE if pkc-host no longer requires customized cryptodev patches
RDEPENDS_${PN}_append_qoriq-ppc = "\
${@base_contains('DISTRO_FEATURES', 'c29x_pkc', 'pkc-host', '', d)} \
"
RDEPENDS_${PN}_append_e500v2 = " \
cantest \
fsl-pme \
libppc \
testfloat \
"
RDEPENDS_${PN}_append_e500mc = " \
libppc \
"
RDEPENDS_${PN}_append_e6500-64b = " ceetm"
RDEPENDS_${PN}_append_t2080rdb-64b = " \
skmm-ep \
skmm-host \
"
skmm需要修改*.bb
文件,
COMPATIBLE_MACHINE = "(t2080rdb-64b|p4080ds|t4240qds|c293pcie)" #ep
COMPATIBLE_MACHINE = "(t2080rdb-64b|p4080ds|t4240qds)" #host
加上,
# Copyright (C) 2015 Qe.Ltd
require fsl-image-mfgtool.bb
SUMMARY = "Small image commonly used for manufacturing or other small image needs."
DESCRIPTION = "Small image which only includes essential manufacturing \
packages to deploy other big images to large physical media, such as \
a USB stick or a hard drive."
LICENSE = "MIT"
IMAGE_INSTALL_append = " \
packagegroup-fsl-tools-zc \
"
IMAGE_FSTYPES += " ext4.gz ext4.gz.u-boot"
此时编译命令变为,
$ bitbake fsl-image-zc
可以直接到官网下载QorIQ Linux SDK v2.0 PPC64E6500 IMAGE.iso
文件中包含工具链,也可以自己编译,
$ bitbake fsl-toolchain
$ cd build_t2080rdb-64b/tmp/deploy/sdk
$ ./fsl-qoriq-glibc-x86_64-ppc64e6500-toolchain-2.0.sh
$ ./fsl-qoriq-glibc-x86_64-ppce6500-toolchain-2.0.sh
# /mnt/hgfs/E/fsl-qoriq-glibc-x86_64-ppce6500-toolchain-2.0.sh -y -d QorIQ-SDK-V2.0-20160527-yocto/fsl-qoriq/2.0/ppc
# /mnt/hgfs/E/fsl-qoriq-glibc-x86_64-ppc64e6500-toolchain-2.0.sh -y -d QorIQ-SDK-V2.0-20160527-yocto/fsl-qoriq/2.0/ppc64
$ ./fsl-qoriq-glibc-x86_64-ppc64e6500-toolchain-2.0.sh -h
Usage: fsl-qoriq-glibc-x86_64-ppc64e6500-toolchain-2.0.sh [-y] [-d <dir>]
-y Automatic yes to all prompts
-d <dir> Install the SDK to <dir>
======== Extensible SDK only options ============
-n Do not prepare the build system
======== Advanced DEBUGGING ONLY OPTIONS ========
-S Save relocation scripts
-R Do not relocate executables
-D use set -x to see what is going on
$ ./fsl-qoriq-glibc-x86_64-ppc64e6500-toolchain-2.0.sh -y -d ./ppc64