20180126_jeffrey - silenceuncrio/diary GitHub Wiki

0910

整理一下待會可以分享的東西

1430

搞定 m360 linux bootup

commit b11fca5b81efd24944e60556f0c7c1aefff52f70
Refs: [develop], {origin/develop}
Author: jeffrey <[email protected]>
Date:   Fri Jan 26 14:27:57 2018 +0800

    do not merge the '/etc/preinit' from ours
    - maybe it is come from 579X project(openwrt base) but not suitable for m360

1650

發現目前的 firmware 不管是 upgrade 到 2Gb(256MB) NAND Flash 或是 1Gb(128MB) NAND Flash 都能順利的跑起來

實在是蠻奇妙的

看來蠻值得投資時間來了解 OpenWrt 到底是怎麼辦到這件事的

紀錄一下自己的實驗數據

1g nand flash board + mitrastar firmware

1g nand flash board + mitrastar firmware



[    2.792000] Creating 5 MTD partitions on "MT7621-NAND":
[    2.804000] 0x000000000000-0x000007f80000 : "ALL"
[    2.812000] 0x000000000000-0x000000080000 : "Bootloader"
[    2.824000] 0x000000080000-0x000000100000 : "Config"
[    2.836000] 0x000000100000-0x000000140000 : "Factory"
[    2.848000] 0x000000140000-0x000007f80000 : "firmware"
[    2.860000] 0x0000002be7b5-0x000007f80000 : "rootfs"
[    2.868000] mtd: partition "rootfs" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[    2.900000] mtd: partition "rootfs_data" created automatically, ofs=0x600000, len=0x7980000
[    2.916000] 0x000000600000-0x000007f80000 : "rootfs_data"
[    2.928000] [mtk_nand] probe successfully!
[    2.936000] rootfs = 2be7b5 to 600000



root@OpenWrt:/# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 07f80000 00020000 "ALL"
mtd1: 00080000 00020000 "Bootloader"
mtd2: 00080000 00020000 "Config"
mtd3: 00040000 00020000 "Factory"
mtd4: 07e40000 00020000 "firmware"
mtd5: 07cc184b 00020000 "rootfs"
mtd6: 07980000 00020000 "rootfs_data"
root@OpenWrt:/# cat /proc/partitions
major minor  #blocks  name

  31        0     130560 mtdblock0
  31        1        512 mtdblock1
  31        2        512 mtdblock2
  31        3        256 mtdblock3
  31        4     129280 mtdblock4
  31        5     127750 mtdblock5
  31        6     124416 mtdblock6

1g nand flash board + proscend firmware

1g nand flash board + proscend firmware



[    2.808000] Creating 5 MTD partitions on "MT7621-NAND":
[    2.816000] 0x000000000000-0x000007f80000 : "ALL"
[    2.828000] 0x000000000000-0x000000080000 : "Bootloader"
[    2.840000] 0x000000080000-0x000000100000 : "Config"
[    2.852000] 0x000000100000-0x000000140000 : "Factory"
[    2.864000] 0x000000140000-0x000007f80000 : "firmware"
[    2.876000] 0x0000002cc418-0x000007f80000 : "rootfs"
[    2.884000] mtd: partition "rootfs" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[    2.924000] mtd: partition "rootfs_data" created automatically, ofs=0xdc0000, len=0x71c0000
[    2.940000] 0x000000dc0000-0x000007f80000 : "rootfs_data"
[    2.952000] [mtk_nand] probe successfully!
[    2.960000] rootfs = 2cc418 to dc0000



root@M360-P:/# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 07f80000 00020000 "ALL"
mtd1: 00080000 00020000 "Bootloader"
mtd2: 00080000 00020000 "Config"
mtd3: 00040000 00020000 "Factory"
mtd4: 07e40000 00020000 "firmware"
mtd5: 07cb3be8 00020000 "rootfs"
mtd6: 071c0000 00020000 "rootfs_data"
root@M360-P:/# cat /proc/partitions
major minor  #blocks  name

  31        0     130560 mtdblock0
  31        1        512 mtdblock1
  31        2        512 mtdblock2
  31        3        256 mtdblock3
  31        4     129280 mtdblock4
  31        5     127694 mtdblock5
  31        6     116480 mtdblock6

2g nand flash board + mitrastar firmware

2g nand flash board + mitrastar firmware



[    3.212000] Creating 5 MTD partitions on "MT7621-NAND":
[    3.224000] 0x000000000000-0x00000ff80000 : "ALL"
[    3.236000] 0x000000000000-0x000000080000 : "Bootloader"
[    3.244000] 0x000000080000-0x000000100000 : "Config"
[    3.256000] 0x000000100000-0x000000140000 : "Factory"
[    3.268000] 0x000000140000-0x00000ff80000 : "firmware"
[    3.280000] 0x0000002be7b5-0x00000ff80000 : "rootfs"
[    3.292000] mtd: partition "rootfs" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[    3.320000] mtd: partition "rootfs_data" created automatically, ofs=0x600000, len=0xf980000
[    3.336000] 0x000000600000-0x00000ff80000 : "rootfs_data"
[    3.348000] [mtk_nand] probe successfully!
[    3.360000] rootfs = 2be7b5 to 600000



root@OpenWrt:/# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 0ff80000 00020000 "ALL"
mtd1: 00080000 00020000 "Bootloader"
mtd2: 00080000 00020000 "Config"
mtd3: 00040000 00020000 "Factory"
mtd4: 0fe40000 00020000 "firmware"
mtd5: 0fcc184b 00020000 "rootfs"
mtd6: 0f980000 00020000 "rootfs_data"
root@OpenWrt:/# cat /proc/partitions
major minor  #blocks  name

  31        0     261632 mtdblock0
  31        1        512 mtdblock1
  31        2        512 mtdblock2
  31        3        256 mtdblock3
  31        4     260352 mtdblock4
  31        5     258822 mtdblock5
  31        6     255488 mtdblock6

2g nand flash board + proscend firmware

2g nand flash board + proscend firmware



[    3.220000] Creating 5 MTD partitions on "MT7621-NAND":
[    3.228000] 0x000000000000-0x00000ff80000 : "ALL"
[    3.240000] 0x000000000000-0x000000080000 : "Bootloader"
[    3.252000] 0x000000080000-0x000000100000 : "Config"
[    3.260000] 0x000000100000-0x000000140000 : "Factory"
[    3.272000] 0x000000140000-0x00000ff80000 : "firmware"
[    3.288000] 0x0000002cc418-0x00000ff80000 : "rootfs"
[    3.296000] mtd: partition "rootfs" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[    3.336000] mtd: partition "rootfs_data" created automatically, ofs=0xdc0000, len=0xf1c0000
[    3.352000] 0x000000dc0000-0x00000ff80000 : "rootfs_data"
[    3.364000] [mtk_nand] probe successfully!
[    3.372000] rootfs = 2cc418 to dc0000



root@M360-P:/# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 0ff80000 00020000 "ALL"
mtd1: 00080000 00020000 "Bootloader"
mtd2: 00080000 00020000 "Config"
mtd3: 00040000 00020000 "Factory"
mtd4: 0fe40000 00020000 "firmware"
mtd5: 0fcb3be8 00020000 "rootfs"
mtd6: 0f1c0000 00020000 "rootfs_data"
root@M360-P:/# cat /proc/partitions
major minor  #blocks  name

  31        0     261632 mtdblock0
  31        1        512 mtdblock1
  31        2        512 mtdblock2
  31        3        256 mtdblock3
  31        4     260352 mtdblock4
  31        5     258766 mtdblock5
  31        6     247552 mtdblock6