[meta-xilinx] problem with using ubifs in u-boot on zynq7000
Edward Wingate
edwingate8 at gmail.com
Mon Nov 16 12:06:35 PST 2015
On Mon, Nov 16, 2015 at 11:04 AM, avallash <avallash at o2.pl> wrote:
> I’m executing following cmds in u-boot:
>
> U-Boot-PetaLinux> sf probe 0 0 0
>
> SF: Detected S25FL512S_256K with page size 512 Bytes, erase size 256 KiB,
> total 64 MiB
>
> here is one thing I noticed – from http://www.wiki.xilinx.com/U-boot I get
> that the correct response should include creating a device (most probably
> nor0) which we do not get
>
> uboot> sf probe 0 0 0
>
> SF: Detected N25Q128 with page size 256, total 16 MiB
>
> 16384 KiB N25Q128 at 0:0 is now current device
This is because you have a different flash device than the example in the wiki.
MTD doesn't work with SPI flash devices (which yours appear to be)
unless you use a u-boot with the driver referenced here:
http://u-boot.10912.n7.nabble.com/SPI-NOR-MTD-s-td178723.html#a178726
This driver is in the latest u-boot-xlnx. I've been using it and
MTD/UBIFS works with my SPI flash from u-boot.
> the ubi or ubifs commands fail on mtdparts, and when I call mtdparts I get:
>
> U-Boot-PetaLinux> mtdparts
>
> mtdids: incorrect <dev-num>
>
> Am I using incorrect device alias so that there is a problem with mtdids?
>
> Is there some different naming convention in Xilinx u-boot?
>
> Am I probing incorrectly and therefore do not get device listed?
>
> Do you know any other procedure to read from ubifs partition, or at least
> attach ubi? I got some info that on yocto built u-boot (not Xilinx platform)
> this approach works.
I set my mtdids to "nor0=spi32764.0". I got those numbers from the
boot log during Linux bootup when it detects the SPI flash.
> Note: There is no problem in accessing the raw flash itself (I can copy the
> data from sapre partition to ram) and I boot to kernel without any problems.
> Also, I can r/w access ubifs volume in linux.
>
> Note: The partition layout is as described in mtdparts command, where boot
> is fsbl + fpga bitstream + u-boot, bootenv is some custom parameterization
> data that may be used during boot, kernel is fit image of kernel + dtb + ram
> root fs, spare is formatted to ubi and on top of that ubifs.
>
>
> hope someone can push me in the right direction,
You should go through the "u-boot/UBIFS" thread from September here:
https://lists.yoctoproject.org/pipermail/meta-xilinx/2015-September/thread.html
Joe H., Mike L. and others here helped me tremendously in getting
UBIFS to work in u-boot and in clarifying an overall flash
partitioning/programming strategy using UBIFS.
More information about the meta-xilinx
mailing list