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
474 Views
Registered: ‎10-18-2018

Unexpected MTD partitions after QSPI-booting Petalinux

Jump to solution

Hello there,


I want to use multiboot/fallback features on ZedBoard (Petalinux 2017-1). In order to accomplish that, I've booted it with QSPI-boot mode (BOOT.BIN resides there). I haven't touched flash partition options and they are on default. I expect to see only "boot", "bootenv", "kernel" and "spare" partitions on the flash (as only those partitions exist on petalinux-config menu as default); but there are some unexpected partitions as follows:

root@plnx_arm:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00100000 00010000 "qspi-fsbl-uboot"
mtd1: 00500000 00010000 "qspi-linux"
mtd2: 00020000 00010000 "qspi-device-tree"
mtd3: 005e0000 00010000 "qspi-rootfs"
mtd4: 00400000 00010000 "qspi-bitstream"
mtd5: 00500000 00010000 "boot"
mtd6: 00020000 00010000 "bootenv"
mtd7: 00a80000 00010000 "kernel"
mtd8: 01060000 00010000 "spare"

I've compared the contents of these partitions, and as far as I can see, both "boot" and "qspi-fsbl-uboot" contains the "BOOT.BIN". Moreover, due to "qspi-fsbl-uboot" has not enough space, "BOOT.BIN" of its ends in "qspi-linux" partition. Other partitions are mostly empty.

 

It seems like there exists a fallback mechanism already, though I've never set something related to it. I need only last 4 partitions to be exist ("boot", "bootenv", "kernel", "spare"); because I'll switch back to a custom board after testing on ZedBoard.

 

Thanks for any help.

0 Kudos
1 Solution

Accepted Solutions
Moderator
Moderator
388 Views
Registered: ‎04-24-2017

Re: Unexpected MTD partitions after QSPI-booting Petalinux

Jump to solution

Hi @f.m.dostoevsky-the-embedder,

 

Below partition highlighted in red is generated from this dtsi https://github.com/Xilinx/device-tree-xlnx/blob/master/device_tree/data/kernel_dtsi/2017.1/BOARD/zedboard.dtsi#L26-L59 and green one from petalinux-config. 

 

AFAIK this is fixed in 2017.3 onwards.

 

root@plnx_arm:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00100000 00010000 "qspi-fsbl-uboot"
mtd1: 00500000 00010000 "qspi-linux"
mtd2: 00020000 00010000 "qspi-device-tree"
mtd3: 005e0000 00010000 "qspi-rootfs"
mtd4: 00400000 00010000 "qspi-bitstream"
mtd5: 00500000 00010000 "boot"
mtd6: 00020000 00010000 "bootenv"
mtd7: 00a80000 00010000 "kernel"
mtd8: 01060000 00010000 "spare"

 

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
4 Replies
Xilinx Employee
Xilinx Employee
427 Views
Registered: ‎06-27-2017

Re: Unexpected MTD partitions after QSPI-booting Petalinux

Jump to solution

Hi @f.m.dostoevsky-the-embedder,

 

Please check your device tree node for QSPI flash. It will have the list of partitions to be created.

Also check in boot logs for partitions created while booting.

 

 

Regards
Kranthi
--------------------------
Don't forget to reply, kudo, and accept as solution.

Best Regards
Kranthi
--------------------------
Don't forget to reply, kudo, and accept as solution.
0 Kudos
392 Views
Registered: ‎10-18-2018

Re: Unexpected MTD partitions after QSPI-booting Petalinux

Jump to solution

Boot logs shows the same 9 partitions detected.

 

This is from "<petalinux_path>/components/plnx_workspace/device-tree-generation/system-conf.dtsi"

 

&qspi {
        u-boot,dm-pre-reloc;
        #address-cells = <1>;
        #size-cells = <0>;
        flash0: flash@0 {
                compatible = "micron,m25p80";
                reg = <0x0>;
                #address-cells = <1>;
                #size-cells = <1>;
                spi-max-frequency = <50000000>;
                partition@0x00000000 {
                        label = "boot";
                        reg = <0x00000000 0x00500000>;
                };
                partition@0x00500000 {
                        label = "bootenv";
                        reg = <0x00500000 0x00020000>;
                };
                partition@0x00520000 {
                        label = "kernel";
                        reg = <0x00520000 0x00a80000>;
                };
                partition@0x00fa0000 {
                        label = "spare";
                        reg = <0x00fa0000 0x00000000>;
                };
        };
};

And this is from "<petalinux_path>/components/plnx_workspace/device-tree-generation/zedboard.dtsi"

&qspi {
        u-boot,dm-pre-reloc;
        is-dual = <0>;
        num-cs = <1>;
        flash@0 {
                compatible = "n25q128a11";
                reg = <0x0>;
                spi-tx-bus-width = <1>;
                spi-rx-bus-width = <4>;
                spi-max-frequency = <50000000>;
                #address-cells = <1>;
                #size-cells = <1>;
                partition@qspi-fsbl-uboot {
                        label = "qspi-fsbl-uboot";
                        reg = <0x0 0x100000>;
                };
                partition@qspi-linux {
                        label = "qspi-linux";
                        reg = <0x100000 0x500000>;
                };
                partition@qspi-device-tree {
                        label = "qspi-device-tree";
                        reg = <0x600000 0x20000>;
                };
                partition@qspi-rootfs {
                        label = "qspi-rootfs";
                        reg = <0x620000 0x5E0000>;
                };
                partition@qspi-bitstream {
                        label = "qspi-bitstream";
                        reg = <0xC00000 0x400000>;
                };
        };
};

 

petalinux-config overwrites the modifications even if I remove the "qspi-*" ones. Its weird to me that I just see 4 ("boot", "bootenv", "kernel", "spare") partitions in petalinux-config menu. Anyway, I haven't tried compiling directly after removing "qspi" lines from related dtsi file (without a petalinux-config in between those two events).

 

As fallback doesn't care about partition names, writing BOOT.BIN to some arbitrary places in NOR flash just works. In my case, I wrote on mtd1 (update image) and mtd3 (golden image). I don't have a problem with this issue right now, however, I just wonder the "why".

 

Regards,

 

Dosto

0 Kudos
Moderator
Moderator
389 Views
Registered: ‎04-24-2017

Re: Unexpected MTD partitions after QSPI-booting Petalinux

Jump to solution

Hi @f.m.dostoevsky-the-embedder,

 

Below partition highlighted in red is generated from this dtsi https://github.com/Xilinx/device-tree-xlnx/blob/master/device_tree/data/kernel_dtsi/2017.1/BOARD/zedboard.dtsi#L26-L59 and green one from petalinux-config. 

 

AFAIK this is fixed in 2017.3 onwards.

 

root@plnx_arm:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00100000 00010000 "qspi-fsbl-uboot"
mtd1: 00500000 00010000 "qspi-linux"
mtd2: 00020000 00010000 "qspi-device-tree"
mtd3: 005e0000 00010000 "qspi-rootfs"
mtd4: 00400000 00010000 "qspi-bitstream"
mtd5: 00500000 00010000 "boot"
mtd6: 00020000 00010000 "bootenv"
mtd7: 00a80000 00010000 "kernel"
mtd8: 01060000 00010000 "spare"

 

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
362 Views
Registered: ‎10-18-2018

Re: Unexpected MTD partitions after QSPI-booting Petalinux

Jump to solution

I didn't know it was a bug of my Petalinux 2017.1.

 

Thanks a lot,

 

Dosto

0 Kudos