在编译mr3420的固件时,添加了luci、jamvm,但是最终编译的固件“openwrt-ar71xx-generic-tl-mr3420-v1-squashfs-factory.bin”的大小仅仅只有3.1MB,为何会如此小巧,心生疑惑下把该固件烧录到路由中,发现luci和java虚拟机都没有添加上去,然后才发现是固件生成失败了。提示如下:

/bin/ar71xx/openwrt-ar71xx-generic-tl-mr3420-v1-squashfs-factory.bin

[mktplinkfw] kernel length aligned to 1164800 [mktplinkfw] error:

images are too big

根据提示可知是生成的固件大于flash的容量,所以要修改flash的大小。

找到/target/linux/ar71xx/image/Makefile ,进行修改。

这里ar71xx具体应该视当前的硬件平台而定,例如MT7688则是ramips

打开Makefile,搜索找到mr3420内容相关的位置,可以看到这里把RAM设置为64M,串口波特率设置为115200,猜测了一下最后的4M可能会有问题,按照实际的路由的flash大小改为16M。

$(eval $(call SingleProfile,TPLINK,64kraw,RNXN360RT,rnx-n360rt,TL-WR941ND,ttyS0,115200,0x09410002,0x00420001,4M))
$(eval $(call SingleProfile,TPLINK,64kraw,TLMR3220V1,tl-mr3220-v1,TL-MR3220,ttyS0,115200,0x32200001,1,4M))
#$(eval $(call SingleProfile,TPLINK,64kraw,TLMR3420V1,tl-mr3420-v1,TL-MR3420,ttyS0,115200,0x34200001,1,4M))
$(eval $(call SingleProfile,TPLINK,64kraw,TLMR3420V1,tl-mr3420-v1,TL-MR3420,ttyS0,115200,0x34200001,1,16M))
$(eval $(call SingleProfile,TPLINK,64kraw,TLWA701NV1,tl-wa701n-v1,TL-WA901ND,ttyS0,115200,0x07010001,1,4M))
$(eval $(call SingleProfile,TPLINK,64kraw,TLWA730REV1,tl-wa730rev1,TL-WA901ND,ttyS0,115200,0x07300001,1,4M))
$(eval $(call SingleProfile,TPLINK,64kraw,TLWA7510NV1,tl-wa7510n,TL-WA7510N,ttyS0,115200,0x75100001,1,4M))
$(eval $(call SingleProfile,TPLINK,64kraw,TLWA801NV1,tl-wa801nd-v1,TL-WA901ND,ttyS0,115200,0x08010001,1,4M))
$(eval $(call SingleProfile,TPLINK,64kraw,TLWA830RV1,tl-wa830re-v1,TL-WA901ND,ttyS0,115200,0x08300010,1,4M))
$(eval $(call SingleProfile,TPLINK,64kraw,TLWA901NV1,tl-wa901nd-v1,TL-WA901ND,ttyS0,115200,0x09010001,1,4M))
$(eval $(call SingleProfile,TPLINK,64kraw,TLWA901NV2,tl-wa901nd-v2,TL-WA901ND-v2,ttyS0,115200,0x09010002,1,4M))

完成以上修改之后重新编译openwrt,得到的固件不再是3.1M,已经将近13M,烧录到路由器,发现Luci和java虚拟机都正常添加。

-rw-r--r-- 1 root root      872  6月 29 09:04 md5sums
-rw-r--r-- 1 root root 11927552 6月 29 09:04 openwrt-ar71xx-generic-root.squashfs
-rw-r--r-- 1 root root 11796484 6月 29 09:04 openwrt-ar71xx-generic-root.squashfs-64k
-rw-r--r-- 1 root root 16252928 6月 28 17:20 openwrt-ar71xx-generic-tl-mr3420-v1-squashfs-factory.bin
-rw-r--r-- 1 root root 12976132 6月 28 17:20 openwrt-ar71xx-generic-tl-mr3420-v1-squashfs-sysupgrade.bin
-rw-r--r-- 1 root root 1601316 6月 29 09:04 openwrt-ar71xx-generic-uImage-gzip.bin
-rw-r--r-- 1 root root 1156912 6月 29 09:04 openwrt-ar71xx-generic-uImage-lzma.bin
-rwxr-xr-x 1 root root 3509468 6月 29 09:04 openwrt-ar71xx-generic-vmlinux.bin
-rwxr-xr-x 1 root root 3514532 6月 29 09:04 openwrt-ar71xx-generic-vmlinux.elf
-rw-r--r-- 1 root root 1638400 6月 29 09:04 openwrt-ar71xx-generic-vmlinux.gz
-rw-r--r-- 1 root root 1179648 6月 29 09:04 openwrt-ar71xx-generic-vmlinux.lzma
-rwxr-xr-x 1 root root 1228877 6月 29 09:04 openwrt-ar71xx-generic-vmlinux-lzma.elf
drwxr-xr-x 8 root root 4096 6月 28 14:14 packages
-rw-r--r-- 1 root root 1352 6月 29 09:04 sha256sums

Openwrt:编译固件提示[mktplinkfw] error: images are too big 错误的更多相关文章

  1. 运行git提示xcrun: error: invalid active developer path错误

    运行git提示xcrun: error: invalid active developer path错误 是xcode的原因 运行如下命令解决: xcode-select --install

  2. YUM安装东西提示PYCURL ERROR 6 - "Couldn't错误的解决办法

    执行yum install命令时提示PYCURL ERROR 6 - "Couldn't resolve host 错误,原来是dns设置出错,具体错误代码:  Loaded plugins ...

  3. 在win10 64位下编译,提示[C++ Error] E2075 Incorrect project override option: (x86)\borland\cbuilder6\lib\vcl60.csm

    options->compiler  右边有个file name 改下就好了从$(BCB)\lib\vcl60.csm 改为c:\PROGRA~1\borland\CBUILD~1\lib\vc ...

  4. Linux编译内核提示'make menuconfig' requires the ncurses libraries错误

    原来使用的ubuntu 11.10系统由于误操作,导致系统崩溃,重新安装了ubuntu 11.10: 在编译内核的时候,提示如下错误: dingq@wd-u1110:~/hwsvn/2sw/1prj_ ...

  5. YUM安装提示PYCURL ERROR 6 - "Couldn't错误的解决办法

    当编译PHP时出现如下错误时,找不到头绪 这时,打开DNS   vim /etc/resolv.conf   添加一行nameserver 192.168.1.1 完成上一步,则解决该问题 或者:ec ...

  6. maven 项目编译时候提示:Error building POM (may not be this project's POM).

    编译时候提示Error building POM (may not be this project's POM)的错误,具体信息如下: [0] 'dependencies.dependency.ver ...

  7. OpenWRT 编译 error GNU libiconv not in use but included iconv.h is from...

    OpenWRT 编译 error GNU libiconv not in use but included iconv.h is from... 编译的时候碰到一个常见的错误,但是却在一个陌生的地方爆 ...

  8. 解决编译时出错提示: 'error: array must be initialized with a brace-enclosed initializer' 的错误

    编译出现这个错误的原因非常简单编译的标准不相同.如果用stdc90,这个就可以直接编译通过了. 下面是代码例子: ...... ] = NULL;或者 :char cmd[256] = '\0'; . ...

  9. 【Redis】 make编译是提示 make cc Command not found

    在linux系统上对redis源码进行编译时提示提示“make cc Command not found,make: *** [adlist.o] Error 127”. 这是由于系统没有安装gcc环 ...

随机推荐

  1. Python openpyxl使用操作和openpyxl操作

    前言 本文的文字及图片来源于网络,仅供学习.交流使用,不具有任何商业用途,版权归原作者所有,如有问题请及时联系我们以作处理. PS:如有需要Python学习资料的小伙伴可以加点击下方链接自行获取htt ...

  2. stand up meeting 11/20/2015

    3组员 今日工作 工作耗时/h 明日计划 计划耗时/h 冯晓云 将输出string里的翻译合理取分为动名词等各种词性,按约定格式返回,按热度排列,但每一个词性下的解释仍然是由“$$”分词:对于查询词为 ...

  3. asp.net core webapi 配置跨域处理

    在Startup.cs文件中的ConfigureServices方法中加入如下代码: //配置跨域处理 services.AddCors(options => { options.AddPoli ...

  4. java 一维数组的总结笔记

    数组 1. 一位数组的声明方式 type[] array Name 或 type arrayName[];(推荐使用第二种) 错误的声明方式 //int[5] intErrorArray;错误的 // ...

  5. 轻量级mysql安装教程-避免采坑

    1:安装包获取 安装了很多次,来来回回踩,踩出了一片光明大道,简单好用. 百度网盘获取:链接:https://pan.baidu.com/s/13frFBTODaMeADZOHj5KdJQ 提取码:a ...

  6. java redis面试专题(附答案)

    1.什么是Redis?简述它的优缺点? Redis的全称是:Remote Dictionary.Server,本质上是一个Key-Value类型的内存数据库,很像 memcached,整个数据库统统加 ...

  7. 设置 cipher suite

    https://man.openbsd.org/SSL_CTX_set_cipher_list.3#ECDHE SSL_CTX_set_cipher_list() sets the list of a ...

  8. fseek 在以字符串模式打开的文件中工作不正常 [MSDN]

    For streams opened in text mode, fseek and _fseeki64 have limited use, because carriage return-linef ...

  9. 对 ThreadLocal 的了解(一)

    Threadlocal ThreadLocal 在我个人理解范围内,主要作用是在同一个线程里面,去共享某个数据给这个线程在不同的阶段去使用. 本次使用范围 在集成 pageOffice 在线 word ...

  10. 非阻塞算法(Lock-Free)的实现

    目录 非阻塞的栈 非阻塞的链表 非阻塞算法(Lock-Free)的实现 上篇文章我们讲到了使用锁会带来的各种缺点,本文将会讲解如何使用非阻塞算法.非阻塞算法一般会使用CAS来协调线程的操作. 虽然非阻 ...