开发用到的常用工具,使能如下选项,libgcc-xilinx和libgcc-xilinx-dev两个库是为了添加libgcc_s.so.1,来使用pthread_exit()函数这两个软件包找不到其实。
Filesystem Packages → base → util-linux util-linux-mkfs
Filesystem Packages → base → e2fsprogs
[*] e2fsprogs
[ ] e2fsprogs-dev
[*] e2fsprogs-mke2fs
[ ] e2fsprogs-dbg
[*] e2fsprogs-resize2fs
[*] e2fsprogs-tune2fs
[ ] libss
[ ] libcomerr
[ ] libext2fs
[ ] libe2p
[*] e2fsprogs-e2fsck
[*] e2fsprogs-badblocks
Filesystem Packages → base → usbutils
Filesystem Packages → base → i2c-tools
Filesystem Packages → net → netcat
Filesystem Packages → console → network → ethtool
关闭
Filesystem Packages → misc → tcf-agent
默认已有
cantools pciutils microcom
petalinux采用yocto来制作跟文件系统,比如iperf3,在petalinux rootfs的menuconfig中是没有的,需要手动配置,iperf3 recipe位置在,
zc@ubuntu:~/program/petalinux-v2018.2-final/components/yocto/source/aarch64/layers/meta-openembedded/meta-oe/recipes-benchmark/iperf3$ ls -l
total 8
drwxr-xr-x 2 zc zc 4096 Jun 8 2018 iperf3
-rw-r--r-- 1 zc zc 1171 Jun 8 2018 iperf3_3.2.bb
在工程的meta-user里添加该软件包,双引号里记得加个空格,
zc@ubuntu:~/project/petalinux/zynqmp-v2018.2/project-spec/meta-user/recipes-core/images$ cat petalinux-image.bbappend
#Note: Mention Each package in individual line
# cascaded representation with line breaks are not valid in this file.
IMAGE_INSTALL_append = " peekpoke"
IMAGE_INSTALL_append = " gpio-demo"
IMAGE_INSTALL_append = " iperf3"
使能该软件包,
zc@ubuntu:~/project/petalinux/zynqmp-v2018.2$ petalinux-config -c rootfs
zc@ubuntu:~/project/petalinux/zynqmp-v2018.2$ petalinux-build
对于petalinux-image-full中的recipes,有sstate locked,在project-spec/meta-user/conf/petalinuxbsp.conf文件中添加SIGGENE_UNLOCKED_RECIPES += "my-recipe"来unlock。
zc@ubuntu:~/project/petalinux/zynqmp-v2018.2$ cat project-spec/meta-user/conf/petalinuxbsp.conf
#User Configuration
#OE_TERMINAL = "tmux"
# Add EXTRA_IMAGEDEPENDS default components
EXTRA_IMAGEDEPENDS_append_zynqmp = " virtual/fsbl virtual/pmu-firmware arm-trusted-firmware"
EXTRA_IMAGEDEPENDS_append_zynq = " virtual/fsbl"
EXTRA_IMAGEDEPENDS_append_microblaze = " virtual/fsboot virtual/elfrealloc"
#Remove all qemu contents
IMAGE_CLASSES_remove = "image-types-xilinx-qemu qemuboot-xilinx"
IMAGE_FSTYPES_remove = "wic.qemu-sd"
EXTRA_IMAGEDEPENDS_remove = "qemu-helper-native virtual/boot-bin"