http://www.right.com.cn/forum/thread-75309-1-1.html
trunk/tools/firmware-utils/src/mktplinkfw.c 只修改fw_max_len为0xfc0000,16M flash .id = "4M", .fw_max_len = 0xfc0000, .kernel_la = 0x80060000, .kernel_ep = 0x80060000, .rootfs_ofs = 0x140000, 新版只用改fw的大小,分区表会自动认,不用像老版自己定义每个分区大小了。 |
==========================================================
trunk/tools/firmware-utils/src/mktplinkfw.c
点击(此处)折叠或打开
- static struct flash_layout layouts[] = {
- {
- .id = "4M",
- .fw_max_len = 0x3c0000,
- .kernel_la = 0x80060000,
- .kernel_ep = 0x80060000,
- .rootfs_ofs = 0x140000,
- }, {
- .id = "4Mlzma",
- .fw_max_len = 0x3c0000,
- .kernel_la = 0x80060000,
- .kernel_ep = 0x80060000,
- .rootfs_ofs = 0x100000,
- }, {
- .id = "8M",
- .fw_max_len = 0x7c0000,
- .kernel_la = 0x80060000,
- .kernel_ep = 0x80060000,
- .rootfs_ofs = 0x140000,
- }, {
- .id = "8Mlzma",
- .fw_max_len = 0x7c0000,
- .kernel_la = 0x80060000,
- .kernel_ep = 0x80060000,
- .rootfs_ofs = 0x100000,
- }, {
- /* terminating entry */
- }
- };
-
- static struct board_info boards[] = {
- {
- .id = "TL-MR3020v1",
- .hw_id = HWID_TL_MR3020_V1,
- .hw_rev = 1,
- .layout_id = "4Mlzma",
- }, {
- .id = "TL-MR3220v1",
- .hw_id = HWID_TL_MR3220_V1,
- .hw_rev = 1,
- .layout_id = "4M",
- }, {
- .id = "TL-MR3420v1",
- .hw_id = HWID_TL_MR3420_V1,
- .hw_rev = 1,
- .layout_id = "4M",
- }, {
- .id = "TL-WA701Nv1",
- .hw_id = HWID_TL_WA701N_V1,
- .hw_rev = 1,
- .layout_id = "4M",
- }, {
- .id = "TL-WA901NDv1",
- .hw_id = HWID_TL_WA901ND_V1,
- .hw_rev = 1,
- .layout_id = "4M",
- }, {
- .id = "TL-WA901NDv2",
- .hw_id = HWID_TL_WA901ND_V2,
- .hw_rev = 1,
- .layout_id = "4M",
- }, {
- .id = "TL-WR741NDv1",
- .hw_id = HWID_TL_WR741ND_V1,
- .hw_rev = 1,
- .layout_id = "4M",
- }, {
- .id = "TL-WR741NDv4",
- .hw_id = HWID_TL_WR741ND_V4,
- .hw_rev = 1,
- .layout_id = "4Mlzma",
- }, {
- .id = "TL-WR740Nv1",
- .hw_id = HWID_TL_WR740N_V1,
- .hw_rev = 1,
- .layout_id = "4M",
- }, {
- .id = "TL-WR740Nv3",
- .hw_id = HWID_TL_WR740N_V3,
- .hw_rev = 1,
- .layout_id = "4M",
- }, {
- .id = "TL-WR743NDv1",
- .hw_id = HWID_TL_WR743ND_V1,
- .hw_rev = 1,
- .layout_id = "4M",
- }, {
- .id = "TL-WR841Nv1.5",
- .hw_id = HWID_TL_WR841N_V1_5,
- .hw_rev = 2,
- .layout_id = "4M",
- }, {
- .id = "TL-WR841NDv3",
- .hw_id = HWID_TL_WR841ND_V3,
- .hw_rev = 3,
- .layout_id = "4M",
- }, {
- .id = "TL-WR841NDv5",
- .hw_id = HWID_TL_WR841ND_V5,
- .hw_rev = 1,
- .layout_id = "4M",
- }, {
- .id = "TL-WR841NDv7",
- .hw_id = HWID_TL_WR841ND_V7,
- .hw_rev = 1,
- .layout_id = "4M",
- }, {
- .id = "TL-WR941NDv2",
- .hw_id = HWID_TL_WR941ND_V2,
- .hw_rev = 2,
- .layout_id = "4M",
- }, {
- .id = "TL-WR941NDv4",
- .hw_id = HWID_TL_WR941ND_V4,
- .hw_rev = 1,
- .layout_id = "4M",
- }, {
- .id = "TL-WR1043NDv1",
- .hw_id = HWID_TL_WR1043ND_V1,
- .hw_rev = 1,
- .layout_id = "8M",
- }, {
- .id = "TL-WR2543Nv1",
- .hw_id = HWID_TL_WR2543N_V1,
- .hw_rev = 1,
- .layout_id = "8Mlzma",
- }, {
- .id = "TL-WR703Nv1",
- .hw_id = HWID_TL_WR703N_V1,
- .hw_rev = 1,
- .layout_id = "4Mlzma",//-->8Mlzma
- }, {
- /* terminating entry */
- }
- };
Part Three: Compile your openwrt firmware:
1. Checkout trunk and update feeds as other common tutorials
2. Modify Openwrt code to support and partition your flash:
/trunk/tools/firmware-utils/src/mktplinkfw.c
fw_max_len = 0x7c0000 /* for 8M Flash, use 0xfc0000 for 16M flash*/
3. menuconfig and make your image as common tutorials. save the image openwrt-ar71xx-generic-tl-mr3420-v1-squashfs-factory.bin for future usage.
4. back up your 64k art (wirelss driver data, without it your wireless does not work.) this is important! you can also use the backup one from other tp-link ar7241 chipset routers.
http://www.right.com.cn/forum/thread-75309-1-1.html