Ultra96基础学习篇——(6)PetaLinux创建BOOT.bin升级版

本文详细介绍如何在Ultra96开发板上配置PetaLinux开发环境,包括安装必要的软件包、设置硬件参数、调整启动配置等关键步骤,帮助初学者快速上手。

开发板:Ultra96

Xilinx Vivado:2018.2

PetaLinux:2018.2

Ubuntu:16.04


如上一篇最后提到的,最初接触PetaLinux也不懂,只能去尝试去找资料。我是通过用ZCU102的一个BSP去生成工程时,读到了其中的README,找到了如何去配置相应的开发板,只介绍Ultra96的相关配置问题。


对于README

其关于Ultra96的配置主要如下

 5. ultra96 board
     $ cat >>  project-spec/meta-user/recipes-core/images/petalinux-image.bbappend <<EOF
    IMAGE_INSTALL_append = " peekpoke"
    IMAGE_INSTALL_append = " gpio-demo"
    IMAGE_INSTALL_append = " packagegroup-base-extended"
    IMAGE_INSTALL_append = " cmake"
    IMAGE_INSTALL_append = " lmsensors-sensorsdetect"
    IMAGE_INSTALL_append = " python-pyserial"
    IMAGE_INSTALL_append = " libftdi"
    IMAGE_INSTALL_append = " python3-pip"
    IMAGE_INSTALL_append = " iperf3"
    IMAGE_INSTALL_append = " packagegroup-petalinux-ultra96-webapp"
    IMAGE_INSTALL_append = " packagegroup-petalinux-v4lutils"
    IMAGE_INSTALL_append = " packagegroup-petalinux-96boards-sensors"
    IMAGE_INSTALL_append = " packagegroup-petalinux-x11"
    IMAGE_INSTALL_append = " packagegroup-petalinux-matchbox"
EOF

     $ petalinux-config -c rootfs
       Select following packages and save it
       packagegroup-base-extended
       cmake
       lmsensors-sensorsdetect
       packagegroup-petalinux-self-hosted
       packagegroup-petalinux
       git
       python-pyserial
       libftdi
       python3-pip
       iperf3
       packagegroup-petalinux-ultra96-webapp
       packagegroup-petalinux-v4lutils
       packagegroup-petalinux-96boards-sensors
       packagegroup-petalinux-x11
       packagegroup-petalinux-matchbox
                        
      $petalinux-config
       Select CONFIG_SUBSYSTEM_SERIAL_PSU_UART_1_SELECT
       Select CONFIG_SUBSYSTEM_ROOTFS_SD
       Enter xilinx_zynqmp_zcu100_revB_defconfig to SUBSYSTEM_UBOOT_CONFIG_TARGET for ultra96 boards
       Enter zcu100-revc for MACHINE_NAME option  ( DTG board paramater)
       Enter "ultra96-zynqmp" for YOCTO_MACHINE_NAME option.

      $ petalinux-config -c u-boot
       Change CONFIG_BOOTDELAY to 2 and then enable below configs and save.
       CONFIG_NET
       CONFIG_NET_TFTP_VARS
       CONFIG_NET_RANDOM_ETHADDR
       CONFIG_CMD_NET
       CONFIG_CMD_PING
       CONFIG_CMD_DHCP
       CONFIG_CMD_TFTPPUT
       CONFIG_CMD_NFS

        $ Optional configurations.
        If prebuilt kernel image is more than 128M, jtag boot command "petalinux-boot             
        --jtag/--qemu --prebuilt 3 would not work due to overlap between kernel image 
        & linux-boot.elf (bl33 used in jtag mode).So, to overcome this issue, BL33 
        entry address (U-boot and linux-boot.elf start/load address) is changed to
        0x10080000. This is done through:

        $petalinux-config
        Enter 0x10080000 to CONFIG_SUBSYSTEM_ZYNQMP_PRELOADED_BL33_BASE.

        $petalinux-config -c u-boot
        Enter 0x10080000 to CONFIG_SYS_TEXT_BASE.

其实就是说在petalinux-config时候进行相应的配置就行,这样看的话就简单了。创建工程,根据README进行配置:

petalinux-create --type project --template zynqMP --name Ultra96_0
cd Ultra96_0
cd project-spec/meta-user/recipes-core/images/

(1)对petalinux-image.bbappend文件进行添加:

(2)petalinux-config

在(1)中执行完后保存退出,然后继续config

cd ../../../
petalinux-config --get-hw-description=./

主要做以下配置

Subsystem AUTO Hardware Settings  ——>Serial Settings  ——> Primary stdin/stdout (psu_uart_1)

Image Packaging Configuration  ——> Root filesystem type (INITRAMFS)  ——>INITRAMFS

u-boot Configuration ——>(xilinx_zynqmp_zcu102_rev1_0_defconfig) u-boot config target ——> xilinx_zynqmp_zcu100_revC_defconfig

DTG Settings ——> MACHINE NAME——>zcu100-revc

Yocto Settings——>(plnx-zynqmp) YOCTO_MACHINE_NAME ——>ultra96-zynqmp

配置完成,保存退出。

(2)执行congfig rootfs

petalinux-config -c rootfs

其中,apps,user package全选

Petalinux Package Groups中选择packagegroup-petalinux和packagegroup-petalinux-self-hosted

Filesystem Packages中选择console——>utils——>git

注:后面如果系统起不来,一直在重启的情况,在这里去掉下面四项:

lmsensors-sensorsdetect

packagegroup-petalinux-self-hosted

packagegroup-petalinux-ultra96-webapp

packagegroup-petalinux-96boards-sensors

(4)config u-boot

执行petalinux-config -c u-boot,根据README进行配置

petalinux-config -c u-boot

选中Networking Support,并全选其中内容,

CONFIG_BOOTDELAY 配置为2,

Command Line  interface——>Network commands——>选择bootp  tftpboot,tftp put,nfs三项。

保存退出,执行

petalinux-build

build时间取决于网络好坏及电脑配置,build完成状态如下:

接下来生成BOOT.bin即可

cd images/linux
petalinux-package --boot --fsbl zynqmp_fsbl.elf --u-boot u-boot.elf --pmufw pmufw.elf --fpga system.bit --force

这样就大功告成了,只是GUI有点简单而已,这个可以自己移植一个系统,然后使用Petalinux生成的boot即可。

关于boot的初选项,好多都可以在petalinux-config的时候配置,具体需要什么添加即可。


基础内容感觉差不多就这些,刚入门也找不着什么门道,后续再记录分享~~~

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值