Flashing rootfs from u-boot in imx6ull

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Flashing rootfs from u-boot in imx6ull

311 Views
divakaran
Contributor I

 

Hi Team,

I have been working on a project which uses the Toradex Colibri IMX6ULL. I have flashed a custom Linux distro to the SOM which was built using Yocto.
Also I have configured the setup so that it can be loaded using NFS and TFTP.
Now I am trying to find a way to write the kernel, RootFS directly to the flash from u-boot.
So for that I have setup the TFTP server, copied the kernel image(zImage), device tree file(dtb) and the root filesystem(image.tar.xz) into the memory via TFTP from the
build machine. Then I am loading it to the NAND flash by doing the following steps from u-boot :

ubi part ubi;

nand erase.part ubi setenv filesize 7F2728;

ubi write ${kernel_addr_r} kernel ${filesize} setenv filesize 1F24954;

ubi write ${rootfs_addr_r} rootfs ${filesize} setenv filesize B6FC ;

ubi write ${fdt_addr_r} dtb ${filesize}

Then on ‘boot’, the Kernel is loading up, but then after 2-3 seconds, ‘Kernel Panic’ happens and in the boot logs, the following error is displayed:

[ 2.166253] ubi0: scanning is finished
[ 2.170427] ubi0 error: ubi_read_volume_table: the layout volume was not found
[ 2.179401] ubi0 error: ubi_attach_mtd_dev: failed to attach mtd4, error -22
[ 2.186650] UBI error: cannot attach mtd4
[ 2.192931] input: gpio-keys as /devices/platform/gpio-keys/input/input0
[ 2.203612] VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0): error -19
[ 2.211838] Please append a correct "root=" boot option; here are the available partitions:
 

Kindly look into the above issue and advise a proper method for flashing the RFS.

I had raised a query in Toradex, but could not find any solutions which matches with our requirements

Thanks in Advance.

Labels (1)
0 Kudos
Reply
1 Reply

257 Views
jimmychan
NXP TechSupport
NXP TechSupport

I think you need something like "ubimkvol" to create the volume.

0 Kudos
Reply