测试Petalinux BSP镜像参考例子

FPGA/ASIC技术

190人已加入

描述

测试预构建Petalinux镜像

现在,你可以尝试一个预构建参考例。这是通过petalinux-boot 工具来实现的。petalinux-boot可以在物理硬件或者QEMU上启动参考例子。

在硬件上测试预编译镜像

Petalinux BSP包括一个预构建FPGAbitstream文件,可以令你在你的硬件上快速启动Linux。

从SD卡中启动镜像(Zynq系列设备)

步骤: 

1. 在主机上挂载你的sd卡。
2. 复制 /pre-built/linux/images/目录下的文件到SD卡中第一个FAT分区。
* BOOT.BIN
* image.ub
3. 连接串口。
4. 打开主机串口,设置波特率115200。
5. 板子关电。
6. 设置启动模式sd卡启动.
7. 插入SD卡。
8. 板子上电。
9. 观察串口。
10. 用户和密码都是root。

JTAG启动

1. 板子关电。
2. 连接JTAG线到主机。
3. 链接串口
4. 连接网络到本地网络
5. 对于zynq系列板子,保证启动模式为JATG模式。
6. 上电。
7. 打开主机端口。
8. 运行petalinux-boot命令如下:

petalinux-boot –jtag –prebuilt 3

在QEMU中测试预先的镜像

Petalinux提供QEMU支持,可以让软件在一个不需要硬件的仿真环境下测试。
1. 切换到工程目录,启动预构建的内核镜像。

petalinux-boot –qemu –prebuilt 3
* The –prebuilt 1 performs a Level 1 (FPGA bitstream) boot. This option is not valid for QEMU.
* A Level 2 boot includes U-Boot.
* A Level 3 boot includes a pre-built Linux image.

测试重构建镜像

在硬件上

Use petalinux-boot to boot the U-Boot
$ petalinux-boot –jtag –u-boot –fpga –bitstream
Use petalinux-boot to boot the kernel
$ petalinux-boot –jtag –kernel –fpga –bitstream

在QEMU上

Use petalinux-boot –qemu command to test the newly built software image:
$ petalinux-boot –qemu –kernel
The system boot messages will be shown on the console where QEMU is running
TIP:
To exit QEMU, press Ctrl+A together, release and then press X.

打开APP阅读更多精彩内容
声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉

全部0条评论

快来发表一下你的评论吧 !

×
20
完善资料,
赚取积分