LoginSignup
3
1

More than 1 year has passed since last update.

G-cluster の フラッシュメモリアドレスマップ

Last updated at Posted at 2021-08-29

image.png

オンボードのチップ:

あと860113 502 130129 とマーキングされた謎WiFiChipがありますが、内部の Linux で lsmod とすると


ath6kl_sdio           177554  0
mac80211              205075  0
cfg80211              158436  2 ath6kl_sdio,mac80211
compat                 14631  3 ath6kl_sdio,mac80211,cfg80211

と出てくるので、Atheros AR6103とかそこらへんぽいです。

シリアルTTY

dlink/kernel-patch/nand.c などから、以下のように調査。

offset size 名称 名称 書き込み
+0x0000000 128K miniloader mtd3 writable
+0x0020000 512K u-boot1 mtd4 read only
+0x00A0000 512K u-boot2 mtd5 read only
+0x0120000 128K nvram_factory mtd6 read only
+0x0140000 256K marlin mtd7 writable
+0x0180000 128K factory_hdr mtd8 read only
+0x01A0000 128K factory_bak_hdr mtd9 read only
+0x01C0000 256K kernel_hdr mtd10 read only
+0x0200000 2M splash mtd11 read only
+0x0400000 32M factory mtd12 read only "Factory File System":backup of mtd14?
+0x2400000 32K kernel mtd13 read only
+0x2408000 56.5M filesystem mtd14 read only
+0x5C88000 3M blob mtd15 writtable
+0x5F88000 残り全部? reserve mtd16 read only
+0x0000000 全部? full mtd17 writable

mtdデバイスのマッピングは 起動モードなどで多少変更があるようだ。

dlink/kernel-patch/nand.c からの定義部分を抜粋



static struct mtd_partition cnc_nand_partitions[] = {
        {
                .name           = "miniloader",
                .offset         = 0,
                .size           = SZ_128K,
                .mask_flags     = MTD_WRITEABLE,
        }, {
                .name           = "u-boot1",
                .offset         = MTDPART_OFS_APPEND,
                .size           = SZ_512K,
                .mask_flags     = 0,/*Read only*/
        }, {
                .name           = "u-boot2",
                .offset         = MTDPART_OFS_APPEND,組み込み
                .size           = SZ_512K,
                .mask_flags     = 0,
        }, {
                .name           = "nvram_factory",
                .offset         = MTDPART_OFS_APPEND,
                .size           = SZ_128K,
                .mask_flags     = 0,/*Read only*/
        }, {
                .name           = "marlin",
                .offset         = MTDPART_OFS_APPEND,
                .size           = SZ_256K,
                .mask_flags     = MTD_WRITEABLE,
        }, {
                .name           = "factory_hdr",
                .offset         = MTDPART_OFS_APPEND,
                .size           = SZ_128K,
                .mask_flags     = 0,
        }, {
                .name           = "factory_bak_hdr",
                .offset         = MTDPART_OFS_APPEND,
                .size           = SZ_128K,
                .mask_flags     = 0,
        }, {
                .name           = "kernel_hdr",
                .offset         = MTDPART_OFS_APPEND,
                .size           = SZ_256K,
                .mask_flags     = 0,
        }, {
                .name           = "splash",
                .offset         = MTDPART_OFS_APPEND,
                .size           = SZ_2M,
                .mask_flags     = 0,
        }, {
                .name           = "factory",
                .offset         = MTDPART_OFS_APPEND,
                .size           = SZ_32M,
                .mask_flags     = 0,
        }, {
                .name           = "kernel",
                .offset         = MTDPART_OFS_APPEND,
                .size           = SZ_32M,
                .mask_flags     = 0,
        }, {
                .name           = "filesystem",
                .offset         = MTDPART_OFS_APPEND,
                .size           = SZ_48M + SZ_8M + SZ_512K,
                .mask_flags     = 0,
        }, {
                .name           = "blob",
                .offset         = MTDPART_OFS_APPEND,
                .size           = SZ_2M + SZ_1M,
                .mask_flags     = MTD_WRITEABLE,
        }, {
                .name           = "reserve",
                .offset         = MTDPART_OFS_APPEND,
                .size           = MTDPART_SIZ_FULL,
                .mask_flags     = 0,
        }, {
                .name           = "full",
                .offset         = 0,
                .size           = MTDPART_SIZ_FULL,
                .mask_flags     = MTD_WRITEABLE,
        }

};



cf., cat /proc/mtd


dev:    size   erasesize  name
mtd0: 0000c000 00001000 "miniloader"
mtd1: 00002000 00001000 "uboot-env1"
mtd2: 00002000 00001000 "uboot-env2"
mtd3: 00020000 00020000 "miniloader"
mtd4: 00080000 00020000 "u-boot1"
mtd5: 00080000 00020000 "u-boot2"
mtd6: 00020000 00020000 "nvram_factory"
mtd7: 00040000 00020000 "marlin"
mtd8: 00020000 00020000 "factory_hdr"
mtd9: 00020000 00020000 "factory_bak_hdr"
mtd10: 00040000 00020000 "kernel_hdr"
mtd11: 00200000 00020000 "splash"
mtd12: 02000000 00020000 "factory"
mtd13: 02000000 00020000 "kernel"
mtd14: 03880000 00020000 "filesystem"
mtd15: 00300000 00020000 "blob"
mtd16: 00080000 00020000 "reserve"
mtd17: 08000000 00020000 "full"

その他

U-boot で表示されるロゴ格納箇所? 4400000 から 1c2010 バイト

ワークショップ用に書き換えたファームウェアでの、U-boot での起動アドレス


bootm_image=nand read ${RAM} 2400000 18e0000; bootm ${RAM}

3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1