element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • More
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • More
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • More
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • More
  • Store
    Store
    • Visit Your Store
    • Choose Another Store
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
Avnet Boards Forums
  • Products
  • Dev Tools
  • Avnet Boards Community
  • Avnet Boards Forums
  • More
  • Cancel
Avnet Boards Forums
General Petalinux and MicroZed BSP problems (2019.1)
  • Forums
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Avnet Boards Forums requires membership for participation - click to join
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 7 replies
  • Subscribers 45 subscribers
  • Views 482 views
  • Users 0 members are here
  • microzed
  • petalinux
  • getopicszedboard_forum
Related

Petalinux and MicroZed BSP problems (2019.1)

Fred27
Fred27 over 2 years ago

It's great to see an update to the BSPs for the Microzed and other boards. I'm trying to get to grips with Petalinux for the MicroZed and it seemed a bit odd that until recently the latest BSP was for 2018.2.

 

I'm still having issues with the 2019.1 MicroZed 7010 BSP and I was wondering if the problem is likely to be the BSP or Petalinux installation. I eventually managed to install Petalinux successfully on a clean Ubuntu 18.04.3 LTS VM. (There a few tweaks to the UG1144 guide I needed but I eventually got there.)

 

I've copied mz7010_fmccc_2019_1.bsp over. I successfully ran

petalinux-create -t project -s mz7010_fmccc_2019_1.bsp

 

I was trying to follow the simplest route to check petalinux is working as intended by following https://forums.xilinx.com/t5/Xcell-Daily-Blog-Archived/Adam-Taylor-s-MicroZed-Chronicles-Part-54-Peta-Linux-SDK-for-the/…

 

I then cd'd into the newly created mz7010_fmccc_2019.1 folder and ran

petalinux-boot --qemu --prebuilt 3

 

Any ideas? Am I using the BSP correctly? Is my Petalinux installation OK? I'm not sure where to go from here and google didn't help much either.

  • Reply
  • Cancel
  • Cancel
  • charlieatwork
    charlieatwork over 2 years ago

    I've got the same problem (with a 7010 PicoZed).  Also 2019.1.
    Can anyone provide a solution or hints please?

    I resolved the tftp warning shown in screenshot by installing tfptd-hpa rather than tftpd.    It's the qemu vlan vs netdev issue I'm asking about and the segmentation fault.



    • Cancel
    • Vote Up 0 Vote Down
    • Reply
    • Cancel
  • narrucmot
    narrucmot over 2 years ago

    I notice you mention you are running PetaLinux 2019.2 on an Ubuntu v18.04.3 host.  Technically this is an unsupported OS.  Xilinx UG1144 states that "Ubuntu Linux Workstation/Server 16.04.5, 16.04.6, 18.04.1,18.04.02 (64-bit)" is supported:

    This may or may not be your issue, but we have seen strange failures happen when later Ubuntu versions (v18.04.3, v18.04.4) are used.

     

    It may also be a strange qemu error.  I must admit I rarely use qemu, so I am not much help here.  A quick "petalinux qemu 'vlan' is deprecated. please use 'netdev' instead" Google search turned up this:
    https://forums.xilinx.com/t5/Embedded-Linux/Petalinux-fails-to-boot-on-QEMU/td-p/805730

     

    If you have a MicroZed handy it may be easiest to copy the built image.ub and boot.bin to an SD card and physically test your OS image.  Alternatively you can also try booting via JTAG:

     

    I hope this helps.  Good luck!

     

    --Tom

    • Cancel
    • Vote Up 0 Vote Down
    • Reply
    • Cancel
  • charlieatwork
    charlieatwork over 2 years ago in reply to narrucmot

    Hello.. Thank you Tom for your response.  I'd not payed attention to the minor number within the host Ubuntu VM so I've started again butI'm still struggling to get going with PetaLinux.

     

    I've resolved two of the three problems shown in Fred Murphy's original post (that I was also stuck with):

    1) The "no tftp" server problem is resolved by installing tftpd-hpa and ensuring it's running.

    2) The vlan is deprecated message is resolved by using the "exact correct" host Ubunutu version.  In may case I was using 18.04.4 but I should have been using 18.04.2.

     

    But I'm stuck with the segmentation fault.

     

    I'm following document UG1144 2019.2.

    I've an Ubuntu 18.04.2 Virtual Machine onto which I've installed the prerequisite Linux packages and PetaLinux 2019.2.

     

    I've not configured or built a new kernel; so far I'm only attempting to run in QEMU the prebuilt kernel provided by Avnet's pz7010_fmc2_2019_2.bsp for Avnet's PicoZed board.

     

    I've installed the BSP but when I then run petalinux-boot --qemu --prebuilt 3  I get a segmentation fault within a second or two:

     

    INFO: sourcing build tools

    INFO: The image provided is a zImage

    INFO: TCP PORT is free

    INFO: Starting arm QEMU

    INFO:  qemu-system-aarch64 -M arm-generic-fdt-7series -machine linux=on   -serial /dev/null -serial mon:stdio -display none -kernel /home/charlie/pz7010_fmc2_2019_2/build/qemu_image.elf -gdb tcp::9000 -dtb /home/charlie/pz7010_fmc2_2019_2/pre-built/linux/images/system.dtb  -net nic,netdev=eth0 -netdev user,id=eth0,tftp=/tftpboot -net nic -device loader,addr=0xf8000008,data=0xDF0D,data-len=4 -device loader,addr=0xf8000140,data=0x00500801,data-len=4 -device loader,addr=0xf800012c,data=0x1ed044d,data-len=4 -device loader,addr=0xf8000108,data=0x0001e008,data-len=4 -device loader,addr=0xF8000910,data=0xF,data-len=0x4 

    Segmentation fault (core dumped)

     

    I'm pretty sure I've got OS and package versions correct so what am I doing wrong?  Any ideas on how to troubleshoot?  Is there a tight compatibility between Avnet's BSP for the Picozed and Xilinx's PetaLinx?   I've not yet got hardware available and was hoping to make progress on the OS and software front by using a VM with QEMU.

     

    Regards

    Charlie

    • Cancel
    • Vote Up 0 Vote Down
    • Reply
    • Cancel
  • narrucmot
    narrucmot over 2 years ago in reply to charlieatwork

    Here is where I admit that I have never had much luck using the PetaLinux 'petalinux-boot --jtag --prebuilt 3' command and I don't often use qemu.  I normally do a test boot on mICROzED using JTAG:

    $ petalinux-boot --jtag --kernel --fpga --bitstream ./images/linux/system.bit --verbose

     

    The caveats to JTAG boot are that a)you have to physically have the target board connected via JTAG and UART and b)this works best if the OS image (kernel + rootfs) is small.  Both of these can be met with the MicroZed.

     

    As far as using qemu goes, you might try searching/inquiring the Xilinx forums.  A quick "prebuilt 3 qemu segmentation fault" Google search turned up these links:

    https://github.com/Xilinx/qemu/issues/30

    https://forums.xilinx.com/t5/Embedded-Development-Tools/QEMU-segmentation-fault/td-p/918931

     

    I hope this helps.

     

    --Tom

    • Cancel
    • Vote Up 0 Vote Down
    • Reply
    • Cancel
  • charlieatwork
    charlieatwork over 2 years ago in reply to narrucmot

    Thanks Tom, appreciated.

    I'll keep battling whilst waiting for a board to arrive.  I'll report back with the solution :-)   or otherwise :-(

    • Cancel
    • Vote Up 0 Vote Down
    • Reply
    • Cancel
  • charlieatwork
    charlieatwork over 2 years ago in reply to charlieatwork

    I've still not cracked the segmentation fault when attempting to use QEMU.  I guess it is probably to do with versions of various packages in my Linux VM.  This post describes my set-up and some of the problems and solutions I've needed so far - in case it helps others.....

     

    I'm following:

    VirtualBox and Linux VM Installation Guide v2018.3

    from http://zedboard.org/sites/default/files/design/VirtualBox_Installation_Guide_2018_3_v1_12.zip

    and

    UG1144 (v2019.2) October 30, 2019
    from https://www.xilinx.com/support/documentation/sw_manuals/xilinx2019_2/ug1144-petalinux-tools-reference-guide.pdf
    Which in turn points to:
         https://www.xilinx.com/Attachment/2019.2_PetaLinux_Package_List.xlsx 
         which lists version details for the Linux VM packages.

     

    I'm using:

    A VM with Ubuntu 18.04.2 desktop
    from http://old-releases.ubuntu.com/releases/18.04.2/ubuntu-18.04.2-desktop-amd64.iso

     

    PetaLinux 19.2

    from https://www.xilinx.com/member/forms/download/xef.html?filename=petalinux-v2019.2-final-installer.run

     

    Avenet's PicoZed 2019.2 BSP

    from http://downloads.element14.com/downloads/zedboard/picozed/pz7020_fmc2_2019_2.zip

     

     

    I've not installed Xilinx Vivado/SDK because I don't think I need it until I'm changing the hardware configuration from the default in the BSP.

     

     

    I can do a petalinux-build and also a petalinux-build -x mrproper; petalinux-build without any errors or warnings.

    Previous issues with tftpd and vlan (when using QEMU) have been solved as described earlier in this thread.


    Additional problems solved include:

     

    • When doing a petalinux --config or --build

    Failed to create a file in SSTATE_DIR: Permission denied.

    You could try using /home/training/git/avnet/petalinux/scripts/../cache/2019_2/sstate_arm in SSTATE_MIRRORS rather than as an SSTATE_CACHE.

    This was solved by editing project-spec/meta-user/conf/petalinuxbsp.conf

    as described in https://www.element14.com/community/message/294260/l/re-minized-bsp-20192-error#294260

     

    • When doing a petalinux-build the following error is seen:

    [Errno 21] Is a directory: '/home/charlie/pz7010_fmc2_2019_2/images/linux/pxelinux.cfg'

    Fix is here: https://www.xilinx.com/support/answers/73581.html

     

     

    However I still get this segmentation fault:

    ~/pz7010_fmc2_2019_2$   petalinux-boot --qemu --prebuilt 3

    INFO: sourcing build tools

    INFO: The image provided is a zImage

    INFO: TCP PORT is free

    INFO: Starting arm QEMU

    INFO:  qemu-system-aarch64 -M arm-generic-fdt-7series -machine linux=on   -serial /dev/null -serial mon:stdio -display none -kernel /home/charlie/pz7010_fmc2_2019_2/build/qemu_image.elf -gdb tcp::9000 -dtb /home/charlie/pz7010_fmc2_2019_2/pre-built/linux/images/system.dtb  -net nic,netdev=eth0 -netdev user,id=eth0,tftp=/tftpboot -net nic -device loader,addr=0xf8000008,data=0xDF0D,data-len=4 -device loader,addr=0xf8000140,data=0x00500801,data-len=4 -device loader,addr=0xf800012c,data=0x1ed044d,data-len=4 -device loader,addr=0xf8000108,data=0x0001e008,data-len=4 -device loader,addr=0xF8000910,data=0xF,data-len=0x4 

    Segmentation fault (core dumped)

     

    I notice that the Ubuntu 18.04.2 kernel version and a couple of package versions do not exactly match the versions given in https://www.xilinx.com/Attachment/2019.2_PetaLinux_Package_List.xlsx   for Ubuntu 18.004.2. 

    e.g.

    uname -r shows kernel: 5.3.0-62-generic rather than 5.0.0-31-generic

     

    Sigh!   I'll go round the loop again, perhaps next time with Ubuntu 18.04.1, to see if I can get a VM which is compatible with the QEMU supplied in PetaLinux 2019.2.

     

    Or is there something else I'm doing wrong?

    • Cancel
    • Vote Up 0 Vote Down
    • Reply
    • Cancel
  • charlieatwork
    charlieatwork over 2 years ago in reply to charlieatwork

    Here's an update on my progress in case it helps others:

    I'm aiming to build a new Linux OS image and user-space application to run on the Arm9 of a Zync 7000.  And I'm intending to use an Avnet PicoZed board (which is currently in the post).  But I'm new to this SoC and PetaLinux and am struggling to get off the ground.

    I've installed a Host Ubuntu Virtual Box and within that PetaLinux 19.02 (and sourced the settings.sh).  I've installed Avenet's PicoZed 2019.2 BSP (petalinux-create -t project -s <the .bsp file>).  But when I run petalinux-boot --qemu --prebuilt 3 the QEMU crashes with a segmentation fault without any sign of a boot commencing just like in the original post of this thread.

    I've been stuck on this for a while thinking it's to do with the Host Linux VM version and versions of packages.  I've tried both Ubuntu 18.04.1 and 18.04.2.  With the 18.04.1 I was able to get the Linux Kernel and packages to more closely match the versions in https://www.xilinx.com/Attachment/2019.2_PetaLinux_Package_List.xlsx.  I understand that Ubuntu 18.04.2 has HWE enabled that means it automatically upgrades the Kernel to a newer version (see https://wiki.ubuntu.com/Kernel/LTSEnablementStack ) I thought that could be why my QEMU crashes.  However....

    On both Ubuntu 18.04.1 and 18.04.2 with PetaLinux 2019.2 using Avenet's pz7010_fmc2_2019_2.bsp the QEMU crashes when running --prebuilt 3 (and 2) whereas for Xilinx's xilinx-zc702-v2019.2-final.bsp runs fine.  This points the finger away from my Host Ubuntu VM and PetaLinux install and towards the Avnet PicoZed BSP and it's prebuilt image....

    I'll continue investigating.  Can anyone suggest next steps to get me up and running on the 7010 PicoZed (in QEMU whilst I wait for the board to arrive) please?



    • Cancel
    • Vote Up 0 Vote Down
    • Reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2022 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • Facebook
  • Twitter
  • linkedin
  • YouTube