[meta-xilinx] ramdisk format for booti command in u-boot

Sandeep Gundlupet Raju SANDEEPG at xilinx.com
Fri Jan 12 15:38:50 PST 2018


Hi Giordon,

I have some steps tested in 2017.1 with JFFS2 you can use this as reference. I used SD card to load the images to RAM and then program it.

---------
BOOT.bin:
---------
ZynqMP> fatload mmc 0 0x10000000 qspi_BOOT.bin
ZynqMP> sf probe 0 0 0
ZynqMP> sf erase 0x0 0x1E00000
ZynqMP> sf write 0x10000000 0x0 ${filesize}

----------
For Image:
----------
ZynqMP> fatload mmc 0 0x10000000 Image.bin
ZynqMP> sf erase 0x1E40000 0xF00000
ZynqMP> sf write 0x10000000 0x1E40000 ${filesize}

--------
For DTB:
--------
ZynqMP> fatload mmc 0 0x10000000 system.dtb
ZynqMP> sf erase 0x2d40000 0x20000
ZynqMP> sf write 0x10000000 0x2d40000 ${filesize}

-----------
For RootFS:
-----------
ZynqMP> fatload mmc 0 0x10000000 rootfs.jffs2
ZynqMP> sf erase 0x2d60000 0x6F0000
ZynqMP> sf write 0x10000000 0x2d60000 ${filesize}

ZynqMP> setenv qspiboot "setenv bootargs earlycon clk_ignore_unused root=/dev/mtdblock3 rw rootwait rootfstype=jffs2"
ZynqMP> saveenv
ZynqMP> run qspiboot

Thanks,
Sandeep

From: Giordon Stark [mailto:gstark at cern.ch]
Sent: Friday, January 12, 2018 4:20 PM
To: Sandeep Gundlupet Raju <SANDEEPG at xilinx.com>
Cc: meta-xilinx at yoctoproject.org
Subject: Re: [meta-xilinx] ramdisk format for booti command in u-boot

Hi Sandeep,

So I don't have `mmc` in u-boot at all. Here's my attempt at trying to do it by setting root=/dev/mtd3 where that was supposedly pointing to the QSPI flash partition I made with the rootfs in it: https://gist.github.com/kratsg/33dd03d49d6c8580587410160f79243a

&qspi {
    flash0: flash at 0 {
        compatible = "micron,mt25qu02g";
        reg = <0x0>;
        #address-cells = <1>;
        #size-cells = <1>;
        spi-max-frequency = <50000000>;
        partition at qspi-fsbl-uboot {
                  label = "qspi-fsbl-uboot";
                  reg = <0x0 0x2000000>;
        };
        partition at qspi-linux {
                  label = "qspi-linux";
                  reg = <0x2000000 0x2000000>;
        };
        partition at qspi-device-tree {
                  label = "qspi-device-tree";
                  reg = <0x4000000 0x2000000>;
        };
        partition at qspi-rootfs {
                  label = "qspi-rootfs";
                  reg = <0x6000000 0x2000000>;
        };
        partition at qspi-bitstream {
                  label = "qspi-bitstream";
                  reg = <0x8000000 0x2000000>;
        };
    };
};

I'm not sure why I'm struggling so much with this part and I can't find anything I'm doing wrong based on the various guides and posts, but it seems like the partitions in the QSPI aren't being created as I expected. Posts/guides like:

- https://forums.xilinx.com/t5/Embedded-Linux/QSPI-FLASH-file-system-mount-error/td-p/759963
- https://forums.xilinx.com/t5/Embedded-Linux/Booting-Linux-PL-bitstream-from-Zynq-QSPI/td-p/521617
- http://www.wiki.xilinx.com/Zynq+QSPI+Driver
- http://www.wiki.xilinx.com/Zynq+UltraScale+MPSoC+Non+Secure+Boot

Thanks,

Giordon

On Sat, Jan 13, 2018 at 12:09 AM Sandeep Gundlupet Raju <SANDEEPG at xilinx.com<mailto:SANDEEPG at xilinx.com>> wrote:
Hi Giordon,

Thanks,
Sandeep

From: meta-xilinx-bounces at yoctoproject.org<mailto:meta-xilinx-bounces at yoctoproject.org> [mailto:meta-xilinx-bounces at yoctoproject.org<mailto:meta-xilinx-bounces at yoctoproject.org>] On Behalf Of Giordon Stark
Sent: Wednesday, January 10, 2018 9:48 AM
To: meta-xilinx at yoctoproject.org<mailto:meta-xilinx at yoctoproject.org>
Subject: [meta-xilinx] ramdisk format for booti command in u-boot

Hi all,

Initially, I tried the bootm command, and found the Image format to be incorrect.. so then I switched to the booti command, and I get this:

> booti 0x200000 0x7000000 0x1000000
Bad Linux ARM64 Image magic!

I do something like the following to set things up:

> setenv ip no
> setenv autoload no
> setenv serverip 192.168.1.100
> dhcp
> tftpboot 0x200000 Image
> tftpboot 0x7000000 zynq-base-gfex-prototype3.tar.gz
> tftpboot 0x1000000 gfex-prototype3.dtb

Three questions:

1) Is there a different image format I should be using? If so, what is it?
2) are the addresses here arbitrary?
3) if I run without the initrd (passing '-' as the second parameter instead), it gets to a point where it cannot open a root device (we have no working SD card): https://gist.github.com/kratsg/b5630a23aa3b71161da833fcad07eaaf - how to fix this? Having `bootargs=boot=ram0` or something similar did not work.

Try similar to this command.
# mmc dev 0 && mmcinfo && load mmc 0:1 0x80000 Image.bin && load mmc 0:1 0x4000000 system.dtb && load mmc 0:1 0x6000000 rootfs.cpio.gz && booti 0x80000 - 0x4000000

Thanks,

Giordon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/meta-xilinx/attachments/20180112/04e04d73/attachment-0001.html>


More information about the meta-xilinx mailing list