UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Adventurer
Adventurer
9,643 Views
Registered: ‎01-21-2014

How do I create image.ub?

I followed the following link and got uimage

 

http://www.wiki.xilinx.com/Build+Kernel

 

Now I need image.ub and BOOT.BIn

 

BOOT.BIN I am already having and I know it can be created by the command petalinux-package  

Now I need to create an image.ub having kernel and filesystem.

I am having my own initramfs.cpio and uimage and would like  to make an image.ub.

 

Any advice ? .  

0 Kudos
7 Replies
Adventurer
Adventurer
9,642 Views
Registered: ‎01-21-2014

Re: How do I create image.ub?

This link 

 

http://www.wiki.xilinx.com/Zynq-7000+AP+SoC+Ubuntu+Desktop+on+Peta+Linux+Tech+Tip

 

says 

 

image.ub = peta Linux image consists of kernel image, device tree blob and minimal rootfs

 

But no mention of how to make this image.ub.

0 Kudos
Explorer
Explorer
9,616 Views
Registered: ‎02-18-2014

Re: How do I create image.ub?

petalinux-build

 

ug980-petalinux-board-bringup would be a resource to look at

0 Kudos
Xilinx Employee
Xilinx Employee
9,609 Views
Registered: ‎09-10-2008

Re: How do I create image.ub?

Hi,

 

It seems like your mixing in non-Petalinux flow with Petalinux flow.  Petalinux allows you to point to a different kernel tree or u-boot tree and build it.  I would probably do that (configure Petalinux to point to a different area).  

 

In the kernel configuration, using Petalinux, you can also point it to a different cpio image for your root filesystem. The kernel build combines the cpio image with the kernel image. The image.ub is a FIT image which is documented in the u-boot tree (doc/uImage.FIT).

 

Thanks.

Newbie lucywill
Newbie
9,581 Views
Registered: ‎04-22-2014

Re: How do I create image.ub?


@justinlh wrote:

petalinux-build

 

ug980-petalinux-board-bringup would be a resource to look at on create image.ub


thank you, i will have a look at this resource.  do you have any tutorial that can teach me how to create such image, i am a new learner.

0 Kudos
Explorer
Explorer
3,875 Views
Registered: ‎05-28-2014

Re: How do I create image.ub?

I have the same issue.

Is there a way to manually (not with petalinux) create image.ub in petalinux (from kernel and rootfs, so that we can first modify rootfs manually) "?

 

Thank you

0 Kudos
Moderator
Moderator
3,825 Views
Registered: ‎04-24-2017

Re: How do I create image.ub?

Hi @ransh,

 

Below is the steps to create FIT image(image.ub) from command line without using petalinux. Make sure you change the ARCH for arm or aarch64 depending on your use case.

 

1. Create a fitImage.its file and add below content

$ vim fitImage.its
/dts-v1/;
 
/ {
    description = "U-Boot fitImage for plnx_aarch64 kernel";
    #address-cells = <1>;
 
    images {
        kernel@0 {
            description = "Linux Kernel";
            data = /incbin/("/<PATH-TO-KERNEL-IMAGE>/zcu102-zynqmp/Image");
            type = "kernel";
            arch = "arm64";
            os = "linux";
            compression = "none";
            load = <0x80000>;
            entry = <0x80000>;
            hash@1 {
                algo = "sha1";
            };
        };
        fdt@0 {
            description = "Flattened Device Tree blob";
            data = /incbin/("/<PATH-TO-DTB>/zcu102-zynqmp/zcu102-zynqmp-system.dtb");
            type = "flat_dt";
            arch = "arm64";
            compression = "none";
            hash@1 {
                algo = "sha1";
            };
        };
        ramdisk@0 {
            description = "ramdisk";
            data = /incbin/("/<PATH-TO-ROOTFS-IMAGE>/zcu102-zynqmp/zcu102-zynqmp.cpio.gz");
            type = "ramdisk";
            arch = "arm64";
            os = "linux";
            compression = "none";
            hash@1 {
                algo = "sha1";
            };
        };
    };
    configurations {
        default = "conf@1";
        conf@1 {
            description = "Boot Linux kernel with FDT blob + ramdisk";
            kernel = "kernel@0";
            fdt = "fdt@0";
            ramdisk = "ramdisk@0";
            hash@1 {
                algo = "sha1";
            };
        };
        conf@2 {
            description = "Boot Linux kernel with FDT blob";
            kernel = "kernel@0";
            fdt = "fdt@0";
            hash@1 {
                algo = "sha1";
            };
        };
    };
};

2. Run mkimage command to generate the FIT image(image.ub). Make sure you install this u-boot tools package

$ mkimage -f fitImage.its image.ub

Note: Make sure you source the dtc tools path else you see this error

$ mkimage -f fitImage.its image.ub
sh: 1: dtc: not found
mkimage: Can't read image.ub.tmp: Invalid argument
mkimage Can't add hashes to FIT blob
$

 

 

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
Visitor hanni_xu
Visitor
1,054 Views
Registered: ‎05-03-2018

Re: How do I create image.ub?

reference to 'run.do_image_xilinx_fitimage'.

0 Kudos