change mtdparts organization, but device still boot up successfully

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

change mtdparts organization, but device still boot up successfully

1,327 Views
stevenyu
Contributor III

Hi,

 

It is a strange situation as in attach log file.

 

The first time device boot up using below mtdparts parameter, and the kernel show related mtd organization.

bootargs=console=ttymxc0,115200 ubi.mtd=3 root=ubi0:rootfs rootfstype=ubifs mtdparts=gpmi-nand:64m(boot),16m(kernel),16m(dtb),-(rootfs)

......

Creating 4 MTD partitions on "gpmi-nand":
0x000000000000-0x000004000000 : "boot"
0x000004000000-0x000005000000 : "kernel"
0x000005000000-0x000006000000 : "dtb"
0x000006000000-0x000008000000 : "rootfs"

.......

root@imx6ull14x14evk:~# cat /proc/mtd
dev: size erasesize name
mtd0: 04000000 00020000 "boot"
mtd1: 01000000 00020000 "kernel"
mtd2: 01000000 00020000 "dtb"
mtd3: 02000000 00020000 "rootfs"
root@imx6ull14x14evk:~#

 

Then, we only modify mtdparts as below and reboot device. However, the device still can boot up successfully using new mtd organization. How can device figure out the original position of kernel/dtb/rootfs in flash ? Any idea?  

 

=> setenv bootargs 'console=ttymxc0,115200 ubi.mtd=3 root=ubi0:rootfs rootfstype=ubifs mtdparts=gpmi-nand:2m(boot),16m(kernel),2m(dtb),-(rootfs)'
=> saveenv
=> print

......

bootargs=console=ttymxc0,115200 ubi.mtd=3 root=ubi0:rootfs rootfstype=ubifs mtdparts=gpmi-nand:2m(boot),16m(kernel),2m(dtb),-(rootfs)

......

 

Creating 4 MTD partitions on "gpmi-nand":
0x000000000000-0x000000200000 : "boot"
0x000000200000-0x000001200000 : "kernel"
0x000001200000-0x000001400000 : "dtb"
0x000001400000-0x000008000000 : "rootfs"

......

root@imx6ull14x14evk:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00200000 00020000 "boot"
mtd1: 01000000 00020000 "kernel"
mtd2: 00200000 00020000 "dtb"
mtd3: 06c00000 00020000 "rootfs"

 

Regards,

Steven Yu

Original Attachment has been moved to: change_partition_size_stillbootup.txt.zip

Labels (1)
0 Kudos
2 Replies

798 Views
igorpadykov
NXP Employee
NXP Employee

Hi Steven

one can look at ubifs organization on

Creating and flashing UBI / UBIFS images - Free Electrons blog 

http://www.phytec.de/fileadmin/user_upload/images/content/1.Products/SOMs/phyCORE-i.MX6/L-814e_2.pdf 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

798 Views
stevenyu
Contributor III

Sorry, we still not catch your comment. Please allow us to ask in more detail.

As we know, the ubifs is only for blocks storage in file system(rootfs), and it should be usable in that partition(rootfs). It should not be able to find kernel/dtb in other partitions. 

If we move the position of kernel/dtb/rootfs as below, does system still be able to find where are the kernel/dtb/rootfs in flash via ubifs?

gpmi-nand:64m(boot),16m(kernel),16m(dtb),-(rootfs)

==>gpmi-nand:2m(boot),16m(kernel),2m(dtb),-(rootfs)

0 Kudos