美文网首页
PetaLinux开发流程

PetaLinux开发流程

作者: 非鱼知乐 | 来源:发表于2019-10-19 04:47 被阅读0次

    1. Create a new project

    petalinux-create -t project --template zynq -n $(project_name)
    

    or

    petalinux-create -t project -s $(bsp_file)
    

    2. Import hardware information

    petalinux-config --get-hw-description=$(path_to_hdf)
    

    The .hdf file is usually in $(project_name).sdk folder.

    3. Create a new application

    petalinux-create -t apps -n $(app_name)
    

    4. Configure kernel

    petalinux-config -c kernel
    

    5. Configure rootfs

    petalinux-config -c rootfs
    

    Select modules/apps to be enabled.

    6. Build

    petalinux-build
    

    7. Create BOOT.bin

    petalinux-package --boot --fsbl images/linux/zynq_fsbl.elf --fpga images/linux/system.bit --u-boot --force
    

    or

    create a file, e.g., boot.bif, with

    image : {
            [bootloader] images/linux/zynq_fsbl.elf
            images/linux/system.bit
            images/linux/u-boot.elf
    }
    

    And then, run command:

    bootgen -image boot.bif -o i BOOT.BIN -w on
    

    8. Boot file system from SD card

    a) Change configuration

    When reading hardware configuration

    petalinux-config --get-hw-description=xxx
    

    Select Image Packaging Configuration \rightarrow Root filesystem type (INITRAMFS) \rightarrow SD card

    Or when configuring:

    petalinux-config
    

    Select Image Packaging Configuration \rightarrow Root filesystem type. Select SD card as the RootFS type.

    petalinux-build
    petalinux-package --boot --fsbl images/linux/zynq_fsbl.elf --fpga images/linux/system.bit --u-boot --force
    

    b) Prepare SD card

    cp /tftpboot/BOOT.BIN /media/username/BOOT/.
    cp /tftpboot/image.ub /media/username/BOOT/.
    sudo cp -a /path-to-compiled-rootfs/* /media/username/rootfs/.
    

    相关文章

      网友评论

          本文标题:PetaLinux开发流程

          本文链接:https://www.haomeiwen.com/subject/wxlgmctx.html