sercomm : mtd setup!
Kernel boot magic : 0;1;1
Creating 20 MTD partitions on "brcmnand.0":
0x000000000000-0x000000200000 : "CfeROM"
0x000000200000-0x000000600000 : "CfeRAM1"
0x000000600000-0x000000a00000 : "CfeRAM2"
0x000000a00000-0x000000aa0000 : "FlashMAP"
0x000000aa0000-0x000000b40000 : "SN"
0x000000b40000-0x000000c80000 : "Protect"
0x000000c80000-0x000002800000 : "Rootfs1"
0x000002800000-0x000003480000 : "Lib1"
0x000003480000-0x000005000000 : "Rootfs2"
0x000005000000-0x000005c80000 : "Lib2"
0x000005c80000-0x000005d20000 : "Bootflg"
0x000005d20000-0x000005dc0000 : "Rootfs1_Info"
0x000005dc0000-0x000005e60000 : "Lib1_Info"
0x000005e60000-0x000005f00000 : "Rootfs2_Info"
0x000005f00000-0x000005fa0000 : "Lib2_Info"
0x000005fa0000-0x000006220000 : "XMLConfig"
0x000006220000-0x0000064a0000 : "Erasable_XML_CFG"
0x0000064a0000-0x000006e00000 : "AppData"
0x000006e00000-0x000006f40000 : "Yaffs"
0x000006f40000-0x000008000000 : "Reserve"
Donc c'est un bout de code spécifique qui détermine les partitions, le "Kernel boot magic : 0;1;1" vient de "Bootflg".
Dans tous les cas, le bootloader a déjà dû lire Bootflg, pour savoir où charger le kernel (filestruct_full.bin dans Rootfs1 ou Rootfs2).
ubi0: attaching mtd6
ubi0: scanning is finished
ubi0: attached mtd6 (name "Rootfs1", size 27 MiB)
ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
ubi0: good PEBs: 220, bad PEBs: 0, corrupted PEBs: 0
ubi0: user volume: 2, internal volumes: 1, max. volumes count: 128
ubi0: max/mean erase counter: 1/0, WL threshold: 4096, image sequence number: 901840304
ubi0: available PEBs: 113, total reserved PEBs: 107, PEBs reserved for bad PEB handling: 5
ubi0: background thread "ubi_bgt0d" started, PID 402
ubi1: attaching mtd7
ubi1: scanning is finished
ubi1: attached mtd7 (name "Lib1", size 12 MiB)
ubi1: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
ubi1: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
ubi1: VID header offset: 2048 (aligned 2048), data offset: 4096
ubi1: good PEBs: 100, bad PEBs: 0, corrupted PEBs: 0
ubi1: user volume: 1, internal volumes: 1, max. volumes count: 128
ubi1: max/mean erase counter: 1/0, WL threshold: 4096, image sequence number: 309480860
ubi1: available PEBs: 61, total reserved PEBs: 39, PEBs reserved for bad PEB handling: 4
ubi1: background thread "ubi_bgt1d" started, PID 417
block ubiblock0_0: created from ubi0:0(rootfs_ubifs)
VFS: Mounted root (squashfs filesystem) readonly on device 254:0.
devtmpfs: mounted
SC: mount libs(/dev/mtdblock22) to /mnt/rootfs, ret=0
Là encore il y a du code spécifique pour initialiser ubi, l'équivalent de "ubi.mtd=6 ubi.block=0,rootfs_ubifs root=/dev/ubiblock_0_0 ubi.mtd=7".
C'est peut-être gluebi qui crée les mtd20 / mtd21 / mtd22, et bizarrement pour le montage des libs leur code spécifique utilise /dev/mtdblock22 (au lieu de faire "ubi.block=1,lib_squashfs" et d'utiliser /dev/ubiblock_1_0).