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

简介:

本人在编译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了。



目录
相关文章
|
6月前
|
Python
已解决:_tkinter.TcLError: couldn’t recognize data in image file “Image/nakamuraan.gif”
已解决:_tkinter.TcLError: couldn’t recognize data in image file “Image/nakamuraan.gif”
208 1
|
7月前
|
人工智能 C++ Windows
[NextJs] 解决 Failed to load SWC binary for win32/64
快速解决 Next.js 在 Windows 下运行时 SWC Binary 报错的方法,包括安装 Microsoft Visual C++ Redistributable 和确认处理器架构。
|
8月前
|
Ubuntu iOS开发 MacOS
Could not enumerate video devices (or none found).解决办法
Could not enumerate video devices (or none found).解决办法
112 0
|
分布式计算 IDE Hadoop
Big Data Tools插件使用
Big Data Tools插件使用
485 0
|
程序员 iOS开发 开发者
iOS开发:程序打包提示Ignoring file XXX missing required architecture arm7 in file XXX错误
前段时间在开发过程中遇到一个iOS打包报错Ignoring file XXX missing required architecture arm7 in file XXX的问题,然后回想了一下问题所在,是因为集成了ijk播放器插件,然后ijk三方库不支持arm7造成的报错。
199 0
iOS开发:程序打包提示Ignoring file XXX missing required architecture arm7 in file XXX错误
MAC编译OpenJDK8:error: ‘&&‘ within ‘||‘ [-Werror,-Wlogical-op-parentheses]
MAC编译OpenJDK8:error: ‘&&‘ within ‘||‘ [-Werror,-Wlogical-op-parentheses]
105 0