With regards to:
https://community.nxp.com/t5/T-Series/T1040RDB-Failed-to-mount-UBIFS/m-p/398737#M113%22
I can successfully do everything in this post except for this last little bit (the most important part):
4. Please check ubi rootfs bootarts
=>setenv bootargs ubi.mtd=<MTD_num> root=ubi0_0 rw rootfstype=ubifs console=ttyS0,115200 init=/init
=>tftpboot $loadaddr uImage-ubi.bin
=>tftpboot $fdtaddr l <dtb_file>
=>bootm $loadaddr - $fdtaddr
Is it possible that the compiled kernel is somehow overwriting my bootargs and just booting a "tmpfs" (initramfs)
I'm currently using a kernel initramfs image - but can't seem to build a ubi specific kernel image
Please refer to the following example on LS1043ARDB.
Please build Linux Kernel Image with CONFIG_MTD_UBI=y.
Boot the target board with the following Kernel command line.
Kernel command line: root=/dev/mmcblk0p4 rw rootdelay=10 console=ttyS0,115200 ramdisk_size=0x10000000 mtdparts=60000000.nor:1m(nor_bank0_rcw),2m(nor_bank0_uboot),13m(nor_bank0_uboot_env),48m(nor_bank0_itb),1m(nor_bank4_rcw),2m(nor_bank4_uboot),13m(nor_bank4_uboot_env),48m(nor_Usertest);7e800000.flash:1m(nand_uboot),1m(nand_uboot_env),60m(nand_Usertest);spi0.0:1m(uboot),5m(kernel),1m(dtb),9m(dspi_Usertest)
In Linux, do the following operation to deploy ubi rootfs.
root@localhost:~# zcat /proc/config.gz | grep CONFIG_MTD_UBI=y
CONFIG_MTD_UBI=y
root@localhost:~# mtdinfo /dev/mtd10
mtd10
Name: nand_Usertest
Type: nand
Eraseblock size: 131072 bytes, 128.0 KiB
Amount of eraseblocks: 480 (62914560 bytes, 60.0 MiB)
Minimum input/output unit size: 2048 bytes
Sub-page size: 2048 bytes
OOB size: 64 bytes
Character device major/minor: 90:20
Bad blocks are allowed: true
Device is writable: true
root@localhost:~# flash_erase /dev/mtd10 0 0
root@localhost:~# ubiattach /dev/ubi_ctrl -m 10
root@localhost:~# cat /sys/class/ubi/ubi0/max_vol_count
128
root@localhost:~# ubimkvol /dev/ubi0 -N ubi_rootfs -S 128
root@localhost:~# mount -t ubifs ubi0_0 /tmp
root@localhost:~# cp rootfs.tgz /tmp
root@localhost:~# cd /tmp
root@localhost:~# tar -xzvf rootfs.tgz
Reboot the target board, in u-boot configure bootargs as the following.
=> setenv bootargs ubi.mtd=10 root=ubi0_0 rw rootfstype=ubifs rootdelay=10 console=ttyS0,115200 mtdparts=60000000.nor:1m(nor_bank0_rcw),2m(nor_bank0_uboot),13m(nor_bank0_uboot_env),48m(nor_bank0_itb),1m(nor_bank4_rcw),2m(nor_bank4_uboot),13m(nor_bank4_uboot_env),48m(nor_Usertest)\;7e800000.flash:1m(nand_uboot),1m(nand_uboot_env),60m(nand_Usertest)\;spi0.0:1m(uboot),5m(kernel),1m(dtb),9m(dspi_Usertest)
=> tftp 0x82000000 Image
=> tftp 0x8f000000 fsl-ls1043a-rdb-sdk.dtb
=> booti 0x82000000 - 0x8f000000