码迷,mamicode.com
首页 > 其他好文 > 详细

OpenWrt [mktplinkfw] *** error: images are too big

时间:2015-05-03 16:09:48      阅读:218      评论:0      收藏:0      [点我收藏+]

标签:

本人在编译OpenWrt,可能是选多了,导致最后报错:

make[5]: [install] Error 255 (ignored)
/home/hevake_lcj/Workspace/OpenWRT/trunk/staging_dir/host/bin/mktplinkfw -H 0x07400004 -W 1 -F 4Mlzma -N OpenWrt -V r45594  -s -X 0x40000 -k     /home/hevake_lcj/Workspace/OpenWRT/trunk/build_dir/target-mips_34kc_uClibc-0.9.33.2/linux-ar71xx_generic/tmp/vmlinux-tl-wr740n-v4.bin.lzma -r     /home/hevake_lcj/Workspace/OpenWRT/trunk/build_dir/target-mips_34kc_uClibc-0.9.33.2/linux-ar71xx_generic/root.squashfs-raw -a 0x4 -j -o     /home/hevake_lcj/Workspace/OpenWRT/trunk/bin/ar71xx/openwrt-ar71xx-generic-tl-wr740n-v4-squashfs-sysupgrade.bin
[mktplinkfw] kernel length aligned to 1132396
[mktplinkfw] *** error: images are too big

意思就是编译出来的内核超出了Flash的容量。

本人注意到第2行的命令:

... mktplinkfw -H 0x07400004 -W 1 -F 4Mlzma -N OpenWrt -V r45594  -s -X 0x40000 -k ...

其中 "4Mlzma" 特别明显。

我们的目标机是改进版的 TP-Link WR740,Flash 8M, RAM 64M。这么说来,这个 "4Mlzma" 应该改成 "8Mlzma" 才合适。

那该在哪儿改呢?

这是我改后的patch文件:

Index: target/linux/ar71xx/image/Makefile
===================================================================
--- target/linux/ar71xx/image/Makefile  (revision 45594)
+++ target/linux/ar71xx/image/Makefile  (working copy)
@@ -1497,7 +1497,7 @@
 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR710NV1,tl-wr710n-v1,TL-WR710N,ttyATH0,115200,0x07100001,1,8Mlzma))
 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR710NV2,tl-wr710n-v2,TL-WR710N,ttyATH0,115200,0x07100002,1,4Mlzma))
 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR720NV3,tl-wr720n-v3,TL-WR720N-v3,ttyATH0,115200,0x07200103,1,4Mlzma))
-$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR740NV4,tl-wr740n-v4,TL-WR741ND-v4,ttyATH0,115200,0x07400004,1,4Mlzma))
+$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR740NV4,tl-wr740n-v4,TL-WR741ND-v4,ttyATH0,115200,0x07400004,1,8Mlzma))
 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR741NV4,tl-wr741nd-v4,TL-WR741ND-v4,ttyATH0,115200,0x07410004,1,4Mlzma))
 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR743NV2,tl-wr743nd-v2,TL-WR741ND-v4,ttyATH0,115200,0x07430002,1,4Mlzma))
 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWA750,tl-wa750re-v1,TL-WA750RE,ttyS0,115200,0x07500001,1,4Mlzma))
(END)

再编译,就OK了。

OpenWrt [mktplinkfw] *** error: images are too big

标签:

原文地址:http://my.oschina.net/hevakelcj/blog/409962

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!