[meta-xilinx] u-boot/UBIFS

Edward Wingate edwingate8 at gmail.com
Mon Sep 21 13:17:13 PDT 2015


On Mon, Sep 21, 2015 at 12:39 PM, Joe Hershberger
<joe.hershberger at gmail.com> wrote:
> Generally the env will either already there or created at runtime from
> the default environment.
>
>> And how do I tell u-boot that this flash partition contains the
>> environment for it (e.g., set another config item and re-compile
>> u-boot)?
>
> You say "flash partition" here, but it seems like you are trying to
> use UBI to store the env, so I'm assuming that.

No, that's not what I'm trying to do, I don't think.
As I understand it, the u-boot environment can come from these places:
1) It is hard-coded and compiled, so the environment is contained in
the u-boot.elf binary.
2) Specified in text file uEnv.txt when booting from SD card
3) A raw flash partition

I was trying to do #3, flash the u-boot environment to a flash
partition, but am not understanding how to create the flash image and,
once flashed, how to tell u-boot about it.

Now, it seems you're giving me a 4th option: saving the u-boot
environment to a UBI partition.

My ultimate goal is to boot Linux on a custom Zynq 7020 board with
these flash partitions:
mtd0: "qspi-fsbl-bitstream-uboot" (8M)
mtd1: "qspi-uboot-env" (256K)
mtd2: "qspi-device-tree" (256K)
mtd3: "qspi-linux" (4M)
mtd4: "qspi-rootfs" (96M)

The FSBL, bitstream and uboot would be in mtd0.  This would the
BOOT.BIN that Xilinx SDK generates.
The uboot environment would be in mtd1 (the erase block size for my
flash device is 256K, so that's why the unnecessarily large size).
mtd2-4 are the Linux DTB, kernel and RFS that Yocto generates.
The only UBIFS partition would be mtd4 containing the ubifs RFS from Yocto.

My confusion lies in how to create the image for mtd1 and then how to
tell u-boot that its environment can be found there.

But I have been investigating Mike's previous suggestion on creating a
new uboot machine to add UBI support (which I don't specifically need
right now), and I am starting to understand how to do so for my board.
If I can't get anywhere with storing the u-boot env to flash, I think
I could just build a u-boot hardcoded with the environment I need.



More information about the meta-xilinx mailing list