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
Using Xilinx Tools Forum How to generate a image.ub with a custom DTB using petalinux
  • 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
  • State Verified Answer
  • Replies 5 replies
  • Subscribers 335 subscribers
  • Views 3888 views
  • Users 0 members are here
Related

How to generate a image.ub with a custom DTB using petalinux

oscargomezf
oscargomezf over 8 years ago

Hi everyone,

 

I would like to generate an image.ub file with petalinux, but I need to include a custom dtb file.

 

Is there anyway to do that?

 

Brest regards.

  • Sign in to reply
  • Cancel
  • oscargomezf
    0 oscargomezf over 8 years ago

    I've tried to boot the kernel, device tree and rootfs from u-boot, but it doesn't work and I dont' know why.

    I've saved the uImage (Kernel), system.dtb (device tree) and uramdisk.image.gz(rootfs)  int the sd card, and then I've tried to boot directly with the following commands:

    U-Boot-PetaLinux> load mmc 0 0x3000000 uImage;
    reading uImage
    6121832 bytes read in 1087 ms (5.4 MiB/s)
     
    U-Boot-PetaLinux> load mmc 0 0x2A00000 system.dtb;
    reading system.dtb
    11540 bytes read in 18 ms (626 KiB/s)
     
    U-Boot-PetaLinux> load mmc 0 0x2000000 uramdisk.image.gz;
      reading uramdisk.image.gz
      803686 bytes read in 163 ms (4.7 MiB/s)
       
    But I've got the following error when I 've tried the bootm command:
     
    U-Boot-PetaLinux> bootm 0x3000000 0x2000000 0x2A00000;
      Wrong Image Format for bootm command
      ERROR: can't get kernel image!
       
      Could anyone help me? I don't why I've got this error.
       
      Best regards.
     
     
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • narrucmot
    0 narrucmot over 8 years ago

    You could follow the instructions on pg. 23 of the Xilinx PetaLinux Tools Workflow Tutorial UG1156 (http://www.xilinx.com/support/documentation/sw_manuals/xilinx2016_2/ug1156-petalinux-tools-workflow-tutorial.pdf) to test booting your kernel and custom dtb with qemu.

    For building a PetaLinux image with your custom dtb you would need to replace the default dtb with your custom dtb in the
    subsystems/linux/configs/device-tree folder of your PetaLinux project and then rebuild the image.

     

    --Tom

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Reject Answer
    • Cancel
  • oscargomezf
    0 oscargomezf over 8 years ago in reply to narrucmot

    Hi narrucmot,

     

    I'm trying to boot from mmc  or tftp (with the command tftp, instead of fatload mmc 0), but it didn't work. Do you know why?

    From mmc:

    U-Boot-PetaLinux> fatload mmc 0 0x3000000 uImage;
    reading uImage
    6121832 bytes read in 1087 ms (5.4 MiB/s)

     

    U-Boot-PetaLinux> fatload mmc 0 0x2A00000 system.dtb;
    reading system.dtb
    11540 bytes read in 18 ms (626 KiB/s)

     

    U-Boot-PetaLinux> fatload mmc 0 0x2000000 uramdisk.image.gz;
    reading uramdisk.image.gz
    803686 bytes read in 163 ms (4.7 MiB/s)

     

    But I've got the following error when I 've tried the bootm command:

    U-Boot-PetaLinux> bootm 0x3000000 0x2000000 0x2A00000;
    Wrong Image Format for bootm command
    ERROR: can't get kernel image!

    I made the uImage using the mkimage:

    mkimage -A arm -O linux -T kernel -C none -a 0x8000 -e 0x8000 -n "Linux kernel" -d zImage uImage

     

    Do you have any suggestion?

     

    Best regards.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • oscargomezf
    0 oscargomezf over 8 years ago in reply to narrucmot

    Hi Tom,

     

    But I didn't find any dtb file in the folder: subsystems/linux/configs/device-tree

     

    Best regards.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • oscargomezf
    0 oscargomezf over 8 years ago in reply to narrucmot

    Hi Tom,

     

    I've tried to copy my .dts file and overwrite the subsystems/linux/configs/device-tree/system-top.dts and now it works fine.

     

    Thank you very much. Best regards.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • 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 © 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