修改:code
tools/firmware-utils/src/mktplinkfw2.c
static struct flash_layout layouts[] = { { .id = "8Mltq", .fw_max_len = 0x7a0000, .kernel_la = 0x80002000, .kernel_ep = 0x80002000, .rootfs_ofs = 0x140000, }, { .id = "12Mmtk",//這裏改了 .fw_max_len = 0xC00000, .kernel_la = 0x80000000, .kernel_ep = 0x80000000, .rootfs_ofs = 0x140000, }, { /* terminating entry */ } }; static struct board_info boards[] = { { .id = "TD-W8970v1", .hw_id = 0x89700001, .hw_rev = 1, .layout_id = "8Mltq", }, { .id = "ArcherC20i", .hw_id = 0xc2000001, .hw_rev = 58, .layout_id = "12Mmtk",//這裏改了 .hdr_ver = 3, .endian_swap = true, }, { /* terminating entry */ } };
過程:首先grep搜索這個錯誤,有好幾個文件有,修改每個,把文件名打印出來(其實報錯的時候有提示文件名,我沒注意);flash
而後把相關的數字、字符打印出來:編譯
ERR("rootfs image is too big from -> mktplinkfw2.c board_id=%s, layout_id=%s, layout->fw_max_len=%d", board_id, layout_id,layout->fw_max_len);class
編譯一次,我就知道解決方法了,
搜索