前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >专栏 >petalinux常用命令整理「建议收藏」

petalinux常用命令整理「建议收藏」

作者头像
全栈程序员站长
发布2022-10-01 15:28:06
发布2022-10-01 15:28:06
2.2K00
代码可运行
举报
运行总次数:0
代码可运行

大家好,又见面了,我是你们的朋友全栈君。

代码语言:javascript
代码运行次数:0
运行
复制
#source settings.sh
#source components/yocto/source/aarch64/environment-setup-aarch64-xilinx-linux
#source components/yocto/source/aarch64/layers/core/oe-init-build-env
#export PATH=/home/work/petalinux/tools/hsm/bin:$PATH
#bitbake fsbl -c cleansstate
#bitbake fsbl
ZYNQMP_CONSOLE=cadence1
$cat QSPI_R5_0.bif
the_ROM_image:
{
[fsbl_config] r5_single
[bootloader] R5_FSBL.elf
[destination_cpu=r5-0] R5_core0_hello_world.elf
}
$ bootgen -r -w –image ./QSPI_R5_0.bif -o Boot.bin
$ cat SD.bif
the_ROM_image:
{
[fsbl_config] a5x_x64
[bootloader] ron_a53_fsbl.elf
[destination_cpu=a5x-0] A53_core0_hello_world.elf
}
$ bootgen -r -w -image SD.bif -o Boot.bin
UltraZed IO Carrier Card
#/etc/init.d/openbsd-inetd restart
petalinux的一些命令:
消除编译时的警告信息:
# petalinux-util --webtalk off
创建新工程:
#petalinux-create --type project --template zynqMP --name /home/work/tp0805
bsp创建工程
#petalinux-create -t project -s <path-to-bsp>
配置命令:
#petalinux-config --get-hw-description=/home/work/tp0805/hdf
#petalinux-config --get-hw-description=/home/ucas/yinhonggen/hdf
清理:
#petalinux-build -x distclean
#petalinux-build -x mrproper  /*清理的最彻底,包括build, image文件夹都将被清理掉*/
打包BOOT的命令:
#petalinux-package --force --boot --fsbl zynqmp_fsbl.elf --fpga design_1_wrapper.bit --pmufw pmufw.elf --atf bl31.elf --uboot
#petalinux-package --boot --fpga system.bit --u-boot --kernel
#petalinux-package --boot --fpga system.bit --u-boot
#petalinux-package --boot --fpga system.bit --u-boot --add system.dtb --offset 0x01440000 --kernel --add rootfs.jffs2 --offset 0x02460000  --force
#petalinux-build -s
#petalinux-package --sysroot
petalinux-build -x package  //To regenerate the image.ub, Image and rootfs.cpio.gz
petalinux-build -c device-tree -x mrproper
petalinux-build -c device-tree
petalinux-build -c arm-trusted-firmware
petalinux-build -c bootloader
petalinux-build -c kernel
petalinux-build -c u-boot
petalinux-build -c device-tree -x mrproper
First create the application
$ petalinux-create -t apps -n myapp --enable
petalinux-build -c rootfs
petalinux-create -t apps --template install --name myapp --enable
Rebuild PetaLinux project for the Linux application
You can rebuild the whole project,rootfs or just the application
$ petalinux-build
$ petalinux-build -c rootfs
$ petalinux-build -c rootfs/myapp
To add Linux user libraries to your rootfs.
$ petalinux-create -t libs -n mylib --enable
The above command will create a Linux user library "mylib" in "components/libs/mylib"
$ petalinux-build -c rootfs/mylib
PetaLinux uses library priorities to decide the compilation sequence of the user libraries.
To specify the priority of you library
$ petalinux-create -t libs -n mylib --enable --priority X
X is the priority of your library."1" has the highest priority which will be built first.
Please find the available priorities from with the "--help" of "petalinux-create -t libs".
#zcat rootfs.cpio.gz | cpio -idmv 
#zcat rootfs.cpio.gz | fakeroot cpio -idmv 
#cpio -idmv < rootfs.cpio 
#find ./* | cpio -H newc -o > rootfs.cpio (或者 find ./* | cpio -H tar -o > rootfs.cpio)
#gzip rootfs.cpio
System Configuration/Yocto Settings中,Add pre-mirror url、Local sstate feeds settings设置为本地地址,格式如下:
Add pre-mirror url:
file:///petalinux/sstate-rel-v2018.2/downloads
Local sstate feeds settings:
/petalinux/sstate-rel-v2018.2/aarch64
本地资源为sstate-rel-v2018.2文件夹。

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/194718.html原文链接:https://javaforall.cn

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2022年9月12日 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档