element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • 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
  • Settings
Avnet Boards Forums
  • Products
  • Dev Tools
  • Avnet Boards Community
  • Avnet Boards Forums
  • More
  • Cancel
Avnet Boards Forums
Ultrazed Hardware Design Install Ubuntu on UltraZed-EG - Bad ARM64 Image magic!
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Avnet Boards Forums to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 11 replies
  • Subscribers 326 subscribers
  • Views 2702 views
  • Users 0 members are here
  • Ubuntu
  • petalinux
  • ultrazed-eg
  • SD card
Related

Install Ubuntu on UltraZed-EG - Bad ARM64 Image magic!

rd@nrgsystems.com
rd@nrgsystems.com over 6 years ago

Hi there! I am not sure what the problem is here:

 

I created boot image using Vivado and PetaLinux 2018.3 tools build flow, copied the boot image and ubuntu-16.04.4-minimal-armhf-2018–03–26 rootfs to a SD card (BOOT and rootfs partitions) but Then I get the following message when it's booting up:

 

...

reading system.dtb

33975 bytes read in 18 ms (1.8 MiB/s)

Bad Linux ARM64 Image magic!

ZynqMP>

It seems the boot image that is on partition 1 (fat32: BOOT), is still telling the MPSoC to find the Linux file system from it's default location, and not from the partition 2 (ext4: rootfs) of the SD card or I am totally wrong.

 

Can you please help me to resolve this issue?

 

Thanks,

Rd.

  • Sign in to reply
  • Cancel

Top Replies

  • rd@nrgsystems.com
    rd@nrgsystems.com over 6 years ago in reply to rd@nrgsystems.com +1
    Hi Josh, This is now resolved! Looking at the on-screen logs more closely, I noticed the boot process uses the mmcblk1p2 for SD drive and not the mmcblk0p2 so I updated the PetaLinux project configuration…
Parents
  • jafoste4
    jafoste4 over 6 years ago

    Hi Rd,

     

    What is on your BOOT partition and your EXT4 partition?

     

     

    -Josh

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • rd@nrgsystems.com
    rd@nrgsystems.com over 6 years ago in reply to jafoste4

    Hi Josh,

     

    The BOOT partition contains the "my-custom-bsp-project/images/linux/*" files (BOOT.bin, u-boot.bin, system.dtb, system.bit, etc.) from the BSP project which was successfully created, configured, and built using the PetaLinux build flow. The EXT4 partition contains the "ubuntu-16.04.2-minimal-armhf-2017-06-18.tar.xz" distribution.

     

    Does this answer your question?

     

    Thanks,

    Rd.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • jafoste4
    jafoste4 over 6 years ago in reply to rd@nrgsystems.com

    Hi Rd,

     

    Where did you get the "ubuntu-16.04.2-minimal-armhf-2017-06-18.tar.xz" distribution? Typically I put rootfs.tar.gz contents I created with my petalinux build.

     

    -Josh

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • rd@nrgsystems.com
    rd@nrgsystems.com over 6 years ago in reply to jafoste4

    Hi Josh,

     

    I got the "ubuntu-16.04.2-minimal-armhf-2017-06-18.tar.xz from the https://rcn-ee.com/rootfs/eewiki/minfs/ and copied its rootfs to the EXT4 partition.

     

    Thanks,

    Rd.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • jafoste4
    jafoste4 over 6 years ago in reply to rd@nrgsystems.com

    Hi Rd,

     

    That would be your issue, you need to include the rootfs.tar.gz on the ext4 partition that is generated during your petalinux build.

     

    -Josh

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • rd@nrgsystems.com
    rd@nrgsystems.com over 6 years ago in reply to jafoste4

    Hi Josh,

     

    But I want to have the UltraZed boots Ubuntu not PetaLinux. Basically, I followed the instructions from the following link and created kernel images for an UltraZed hardware design.

     

    https://medium.com/developments-and-implementations-on-zynq-7000-ap/install-ubuntu-16-04-lts-on-zynq-zc702-using-petalin…

     

    Thanks,

    Rd.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • jafoste4
    jafoste4 over 6 years ago in reply to rd@nrgsystems.com

    Hi Rd,

     

    Thanks for clarifying, I am not too familiar with creating an ubuntu enviroment. I take it you extracted the yar.gz files as well?

     

    -Josh

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • rd@nrgsystems.com
    rd@nrgsystems.com over 6 years ago in reply to jafoste4

    Hi Josh,

     

    Thanks for your patience. I did extract the rootfs then copied the files to the ext4 partition using the following command:

     

    sudo tar xfvp ./*-*-*-armhf-*/armhf-rootfs-*.tar -C /media/rootfs/

     

    This properly copies the rootfs files to the second partition of the SD card but I guess the problem is, the boot partition does point the MPSoC to the second partition to find the Ubuntu files.

     

    Thanks,

    Rd.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • rd@nrgsystems.com
    rd@nrgsystems.com over 6 years ago in reply to rd@nrgsystems.com

    Hi Josh,

     

    This time I used the UltraZed IO Board Design File BSP and and created the boot image using the PetaLinux tools build flow, then I copied the boot image to the 1st partition and Ubuntu rootfs files to the second. Now I get the following message:

     

    ...

    [    3.659749] Hardware name: xlnx,zynqmp (DT)

    [    3.663913] Call trace:

    [    3.666353] [<ffffff8008088c58>] dump_backtrace+0x0/0x368

    [    3.671729] [<ffffff8008088fd4>] show_stack+0x14/0x20

    [    3.676764] [<ffffff8008a165f8>] dump_stack+0x9c/0xbc

    [    3.681798] [<ffffff800809bdc0>] panic+0x11c/0x274

    [    3.686572] [<ffffff8008d61124>] mount_block_root+0x1a8/0x27c

    [    3.692300] [<ffffff8008d61430>] mount_root+0x11c/0x134

    [    3.697508] [<ffffff8008d615b4>] prepare_namespace+0x16c/0x1b4

    [    3.703324] [<ffffff8008d60d44>] kernel_init_freeable+0x1b8/0x1d8

    [    3.709401] [<ffffff8008a28960>] kernel_init+0x10/0x100

    [    3.714608] [<ffffff8008084a90>] ret_from_fork+0x10/0x18

    [    3.719903] SMP: stopping secondary CPUs

    [    3.723807] Kernel Offset: disabled

    [    3.727278] CPU features: 0x002004

    [    3.730662] Memory Limit: none

    [    3.733704] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,2)

     

    Any idea?

     

    Best,

    Rd.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • rd@nrgsystems.com
    rd@nrgsystems.com over 6 years ago in reply to rd@nrgsystems.com

    Hi Josh,

     

    This is now resolved!

     

    Looking at the on-screen logs more closely, I noticed the boot process uses the mmcblk1p2 for SD drive and not the mmcblk0p2 so I updated the PetaLinux project configuration using the petalinux-config accordingly.

     

    - Go to Image Packaging Configurations and set ‘Device node of SD device’ option to ‘mmcblk1p2’

     

    Then I found the posts below which are basically stating that the SD is configured read-only for some reason and needs to be writable.

     

    - Added the "diable-wp" to the sdhci1 section in the "petalinux-project-path/project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi:

     

    /* SD1 with level shifter */
    &sdhci1 {
    status = "okay";
    max-frequency = <50000000>;
    no-1-8-v;             /* for 1.0 silicon */
    disable-wp;

    };

     

    - Rebooted and the problem is gone.

     

    Please refer to the following links for more information:

     

    Issues with loading rootfs from SD Card | Zedboard

     

    https://forums.xilinx.com/t5/Embedded-Development-Tools/Beginners-problems-with-Ultrazed-eg/td-p/800802

     

    UltraZed IOCC SD Card RO | Zedboard

     

    Best,

    Rd.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • 100padudle
    100padudle over 6 years ago in reply to rd@nrgsystems.com

    Hello Rd,

     

    It looks like you succeeded where I am failing.  I am trying to boot an Ultrazed-EG card from the SD card on the Avnet IO carrier using Petalinux 2019.1.  I have configured petalinux for sd card = mmcblk1 and fixed the disable-wp problem in the BSP but boot still hangs waiting on mmcblk1p2 to mount.

     

    Have you done anything with later Petalinux distros? Do you have any additional advice?

     

    Thanks,

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • 100padudle
    100padudle over 6 years ago in reply to rd@nrgsystems.com

    Hello Rd,

     

    It looks like you succeeded where I am failing.  I am trying to boot an Ultrazed-EG card from the SD card on the Avnet IO carrier using Petalinux 2019.1.  I have configured petalinux for sd card = mmcblk1 and fixed the disable-wp problem in the BSP but boot still hangs waiting on mmcblk1p2 to mount.

     

    Have you done anything with later Petalinux distros? Do you have any additional advice?

     

    Thanks,

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
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 © 2025 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

  • X
  • Facebook
  • linkedin
  • YouTube