I use the Colibri imx7 with the toradex uboot version 2016.11
I added new enviroment parameters to generate additional volumes in the partition ubi
Partition overview
mtdparts=mtdparts=gpmi-nand:512k(mx7-bcb),1536k(u-boot1),1536k(u-boot2),512k(u-boot-env),-(ubi)
Additional volumes
addvolume1=ubi part ubi; ubi createvol kernel ${nand_kernel_size}; ubi createvol dtb ${nand_devicetree_size}; ubi createvol rootfs ${nand_rootfs_size}; ubi createvol update_rootfs ${nand_rootfs_size};
addvolume2=ubi part ubi; ubi createvol dtsapp ${nand_dtsvolume_size}; ubi createvol update_dtsapp ${nand_dtsvolume_size}; ubi createvol dtscfg ${nand_dtsvolume_size}; ubi createvol update_dtscfg ${nand_dtsvolume_size};
We have a separate flash command for each ubi volume
See below some examples
flashKernel=ubi part ubi; ubi remove kernel; ubi createvol kernel ${nand_kernel_size}; dhcp ${loadaddr} ${path_tftp}${img_kernel}; ubi write ${loadaddr} kernel ${filesize};
flashDeviceTree=ubi part ubi; ubi remove dtb; ubi createvol dtb ${nand_devicetree_size}; dhcp ${loadaddr} ${path_tftp}${img_devicetree}; ubi write ${loadaddr} dtb ${filesize};
flashRootFs=ubi part ubi; ubi remove rootfs; ubi createvol rootfs ${nand_rootfs_size}; ubi remove update_rootfs; ubi createvol update_rootfs ${nand_rootfs_size}; dhcp ${loadaddr} ${path_tftp}${img_rootfs}; ubi write ${loadaddr} rootfs ${filesize};
All flash commands are working, but with the Kernel and the Devicetree flash I have a problem. When I make a run flashKernel and boot the system I receive the error : **ERROR: Did not find a cmdline Flattened Device Tree Could not find a valid device tree **
And when I flash the devicetree and start the system I receive the error message: Bad Linux ARM zImage magic!
Strange is, I don’t have this problem, when I erase the complete ubi part and make all volumes new und then flash the kernel, but as soon as I have booted the system and press reset and try to do the flash command I have the described problem.
I allready have tried to make the volumes static, but this did not change anything