Sorry, you need to enable JavaScript to visit this website.

What to do with microzed_7010_7020_petalinux_SD_images

Unsolved
4 posts / 0 new
knifter's picture
knifter
Junior(1)
What to do with microzed_7010_7020_petalinux_SD_images

I'm trying to find an example SD-card image to start modifying. I have only 1 application binary and a .bit file to put in there and make it auto-start.
From the forum I read anywhere that I need the microzed_7010_7020_petalinux_SD_images.zip archive which I downloaded. However I have no idea what to do with this. I contains a folder sd_image which contains files which should be on the first partition of an SD-Card. I get what the FSBL, ramdisk, u-boot etc is for. But I can't find the root filesystem which it'll use. I don't want to boot from ramdisk as I wish to modify files while booted. I want a writeable root filesystem. 
 
Also I don't get why the rest of the archive contains a basic Vivado project with some sdk files for the FSBL.
Isn't there some example .img file I can directly write to an SD card (Like RedPitaya images do), which just boots? Am I missing something here? Or is there a manual somewhere on what to do with this image?
(For my level of understanding: I made my FSBL, configured u-boot and booted from QSPI all fine. I get what those do. But it is to small to contain my application and bit file as well so I would like to boot from QSPI or SD (doesnt matter) and have root filesystem on the SD which I can write to while booted. I rather not start compiling a complete (peta)linux distro just for this sake, that sounds like an unnecessary amount work).
 
Thanks,
Tijs

narrucmot's picture
narrucmot
Moderator(1)
Read/write filesystem in PetaLinux

Hi Tijs,

PetaLinux can be configured to use a partition on a SD card or eMMC as a read/write root file system.  See Xilinx UG1144 for details:

https://www.xilinx.com/support/documentation/sw_manuals/xilinx2017_1/ug1...

By default, PetaLinux is configured and built to mount a RAMdisk root filesystem, and this RAMdisk image is built into the image.ub file that is launched by u-boot.

I believe, per Xilinx UG1144, once the rootfs.cpio file is written to the ext4-formatted partition on the SD card you should be able to copy the binary of your Linux application there and run it when PetaLinux is booted.  This of course assumes your application was built with a compatible toolchain and the required libraries are also present.

I hope this helps.

--Tom

 

knifter's picture
knifter
Junior(1)
Thank you for you answer. The

Thank you for you answer. The document proved usefull.
I've decided to keep with the ramdisk for now and modify that, although updates will be tougher as the ramdisk needs to be modified instead of just an upload.
What was unable to do so far was to boot from this SD-card. As a workaround I've modified the u-boot in QSPI to use sdboot. It works but it doesnt feel nice that it won't boot the FSBL from the SD. Shouldn't it be in some special position (in the beginning I assume) of the SD-card instead of just copied over?
Still working on it..
 
 

knifter's picture
knifter
Junior(1)
Solved

Just for anyone reading this later: I've implemented it like this:
I unpacked the ramdisk, modified fstab to mount the sd-card at bootup. Then added a initrd script which runs a start.sh script on the sd-card. My application and .bit file are on the sd-card. 
This has the advantage that I can change the application and bitfile on-the-fly with for example SSH without having to modify (unpack, repack, wrap, upload) the uramdisk image everytime I need an update.
I didn't get the sd-card to boot so I used a FSBL and u-boot in the QPSI to boot it which does work.