[meta-xilinx] Confusing instructions for SD card booting

Nathan Rossi nathan.rossi at xilinx.com
Wed Apr 16 18:39:39 PDT 2014


> -----Original Message-----
> From: meta-xilinx-bounces at yoctoproject.org [mailto:meta-xilinx-
> bounces at yoctoproject.org] On Behalf Of Rich Wilson
> Sent: Thursday, April 17, 2014 8:00 AM
> To: meta-xilinx at yoctoproject.org
> Subject: [meta-xilinx] Confusing instructions for SD card booting
> 
> I'm just a beginner here, so I'm easily confused...
> 
> The BOOT.sdcard file tells me that I need the following files:
> 
> * Kernel:     uImage
> * Root FS:    core-image-minimal-<machine name>.ext2.gz.u-boot
> * Devicetree: uImage-<machine name>.dtb
> 
> Looking at my generated files, I see uImage and uImage-zedboard-zynq7.dtb.
> But for the Root FS, I see
> the following possibilities:
> 
> core-image-minimal-zedboard-zynq7.ext3
> and
> core-image-minimal-zedboard-zynq7.tar.bz2
> and the longer-named files they are linked to.
> 
> Can u-boot handle the .tar.bz2 file? Or do I need to manually create a .gz
> file?

The .tar.bz2 is just a rootfs tarball the kernel will not recognize this as a ramdisk, if you are booting linux with your rootfs as a ramdisk you will need to ensure that you provide a rootfs as a valid initramfs or initrd type. These include ext* and cpio.

In order for u-boot to load the rootfs you will need to ensure to have it in the u-boot format. Yocto will handle this for you, just make sure you pick the rootfs image type as a "*.u-boot" image.

> 
> If I'm trying to avoid the uEnv.txt file, what should I rename it to?

To avoid the uEnv.txt always rename the rootfs to "uramdisk.image.gz" whether it’s a cpio, ext2, etc (even if it is not gzipped). Also don't forget to rename the device tree to "devicetree.dtb".

> 
> Do I have a misconfiguration somewhere causing the wrong files to be
> generated?

Possibly, the machines in meta-xilinx should all by default generate the "ext2.gz.u-boot" rootfs images. However make sure that you have "ext2.gz.u-boot" and/or "cpio.gz.u-boot" in the IMAGE_FSTYPES variable (set in your machine conf or in your local conf).

For example add the following to your local.conf:

IMAGE_FSTYPES += "cpio.gz.u-boot ext2.gz.u-boot"

Doing this should cause Yocto to generate:

core-image-minimal-zedboard-zynq7.cpio.gz.u-boot
core-image-minimal-zedboard-zynq7.ext2.gz.u-boot

Pick one of these, rename it and put it on the first partition of the sd card.

# cp core-image-minimal-zedboard-zynq7.ext2.gz.u-boot <sd-card>/uramdisk.image.gz
Or
# cp core-image-minimal-zedboard-zynq7.cpio.gz.u-boot <sd-card>/uramdisk.image.gz

Regards,
Nathan





More information about the meta-xilinx mailing list