cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Explorer
Explorer
6,823 Views
Registered: ‎02-27-2014

Petalinu-build and ramdisk.image.gz

To boot petalinux I used to follow the following steps:

1- petalinux-build

this creates image.ub

2- petalinux-package --boot --fsbl <zynq_fsbl.elf >  --fpga <download.bit  >  --uboot

This gives a BOOT.BIN file
 
Now I would simply program the two images: image.ub and BOOT.BIN in flash , and it will work fine.

Now I have a requirement modifying root filesystem. 

I want to understand in the above steps where is ramdisk.image.gz involved? Is there any default ramdisk.image.gz  which is being used when I am performing step 1?  Or ramdisk image is created when I am building? If it is so which folder? 
 
I have seen the link :
 
 
And have understood how to modify the filesystem. But unable to understad wrt above steps,  what will I do once I get a modified ramdisk 
0 Kudos
7 Replies
Highlighted
Xilinx Employee
Xilinx Employee
6,812 Views
Registered: ‎12-17-2007

PetaLinux builds a custom ramdisk for you as part of petalinux-build. It uses the settings you specify for the RootFS in the petalinux-config -c rootfs command.
-------------------------------------------
this space intentionally left blank
0 Kudos
Highlighted
Explorer
Explorer
6,799 Views
Registered: ‎02-27-2014

 

1- Is the rootfs formed by petalinux-config -c rootfs  saved in Xilinix-14.../images as rootfs.cpio?  if no then where ?

 

2- Where is the source code of rootfs that gets compiled when petalinux-build runs ?

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
6,787 Views
Registered: ‎12-17-2007

A1) Yes, the rootfs.cpio file is the root filesystem in a packaged format

 

A2) I am not sure what you're asking for this one.  For non-custom binaries, the files are drawn out of the binaries repo located in $PETALINUX/components/packages-repo/plnx-repo/dists/default/main/<architecture>

-------------------------------------------
this space intentionally left blank
0 Kudos
Highlighted
Explorer
Explorer
6,779 Views
Registered: ‎02-27-2014

Thanks for your reply. 

 

In 2) I am just asking that if .cpio file is the result of compilation (the output file from the compiler), there must be a source code (the input to the compiler) corresponding  to this.

I will look into the location you mentioned, though.  

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
6,775 Views
Registered: ‎12-17-2007

As I mentioned, they are not compiled on-the-fly.  For the default apps/libraries/modules available in the RootFS menuconfig, they are pre-built binaries that come from the apt repository location I mentioned.  These are assembled into the final RootFS that comes out of the petalinux-build process.

 

Again, as of 2013.04, nothing is compiled from source other than the following:

 

1) UBOOT

2) Linux kernel

3) your own custom apps/libs/modules

-------------------------------------------
this space intentionally left blank
0 Kudos
Highlighted
Visitor
Visitor
6,705 Views
Registered: ‎04-01-2014

Hello,

 

How do you modify the size of the RootFS? Is there a setting in Petalinux menuconfig or the size is adapted according to the packages selected to be inserted in the file system? I am trying to fit a Petalinux in a reduced RAM system (~32MB).

 

Thanks

0 Kudos
Highlighted
Scholar
Scholar
2,336 Views
Registered: ‎06-23-2014

@tmcdowe I am crossing my fingers that you are still around, get wind of this post, and are able to help me.

 

I have a legacy PetaLinux 2012.12 system that I'm trying to deal with.  I can't upgrade.  I have to stay with 2012.12.  Furthermore, this legacy system seems to be designed not at all like any doc I can find.  (I can't even remember at this point if I ever found 2012.12 doc.)

 

My GOAL is to update the file system on the target, which of course comes from flash and into a ramdisk.  I have figured out how to build a romfs.cpio file with new content.  Now I need to know how to get that onto the target hardware flash.  Any guidance?

 

(Note that I already figured out how to get a new bitstream into the flash.  It involved "petalinux-package-firmware" on my linux host VM, and "upgrade-firmware" on the target.  I had thought the image.ub file going into "petalinux-package-firmware" contained the file system, but now I'm doubting this.  I went so far as now I can make image.ub from MyProject.dts, via "petalinux-create-bootimage".  But, again, I now think this doesn't contain the ramdisk image.  Today I realized romfs.cpio really contains the file system.  I built one successfully.  But now I don't see any clues how to get it onto the target flash.  What's worse, the test target is no longer in my lab, but remote, so I can't simply look at it again to get clues.)

 

Thanks VERY much.

0 Kudos