修改:
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搜索这个错误,有好几个文件有,修改每一个,把文件名打印出来(其实报错的时候有提示文件名,我没注意);
然后把相关的数字、字符打印出来:
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);
编译一次,我就知道解决方法了,