{"id":863,"date":"2019-06-17T10:48:22","date_gmt":"2019-06-17T09:48:22","guid":{"rendered":"http:\/\/www.netquote.it\/nqmain\/?p=863"},"modified":"2019-06-17T10:48:22","modified_gmt":"2019-06-17T09:48:22","slug":"tp-link-mr3420-setup-openwrt-v18-06","status":"publish","type":"post","link":"https:\/\/www.netquote.it\/nqmain\/2019\/06\/tp-link-mr3420-setup-openwrt-v18-06\/","title":{"rendered":"TP-Link MR3420 setup OpenWRT v18.06"},"content":{"rendered":"<p><a href=\"http:\/\/en.wikipedia.org\/wiki\/OpenWrt\">OpenWrt<\/a> is a powerful Linux distribution for embedded devices. Especially for routers with reduced memory and performance. This objective has contributed to an extreme level of optimization of this distribution, allowing also a high margin of flexibility and really easy setup.<br \/>This distribution usually fits on many embedded devices, the complete list can be found at this link: <a href=\"http:\/\/wiki.openwrt.org\/toh\/start\">http:\/\/wiki.openwrt.org\/toh\/start<\/a><\/p>\n<p>Don&#8217;t expect magics from this configuration, you can&#8217;t install all the available software, simply because we don&#8217;t have enough RAM \/ ROM memory. Sometimes it is possible to overcome some limitations, for example extending the RAM memory with the ZRAM or SWAP file, extending the root filesystem with a USB flash memory device. However, a stable and robust configuration requires a careful evaluation of the installed services and their impact on system resources. Software as imagemagick or ffmpeg, which tries to allocate a large amount of memory, will likely fail with the segmentation error.<br \/>However, everything comes from source and everything is customizable. You can even avoid to install web interface and configure everything by ssh console and <a href=\"https:\/\/openwrt.org\/docs\/guide-user\/base-system\/uci\">UCI<\/a> command line tool, or build your own web GUI or Service supported by a solid and flexible cross-build system.<br \/>Thanks to the excellent work of all OpenWrt team, time to time, we have a new and fresh release to build.<br \/>Check your system requirements first: <a href=\"http:\/\/wiki.openwrt.org\/doc\/howto\/buildroot.exigence\">http:\/\/wiki.openwrt.org\/doc\/howto\/buildroot.exigence<\/a><br \/>This new release includes linux kernel updates, different security and bug fixes.<\/p>\n<p><em>Clone v18.06 branche:<\/em><\/p>\n<pre>git clone -b openwrt-18.06 git:\/\/git.openwrt.org\/openwrt\/openwrt.git openwrt-18.06<\/pre>\n<p><em>Or master branche:<\/em><\/p>\n<pre>git clone git:\/\/git.openwrt.org\/openwrt\/openwrt.git openwrt<\/pre>\n<p><em>Next, update feeds:<\/em><\/p>\n<pre>cd openwrt-18.06\/<br \/>.\/scripts\/feeds update -a<\/pre>\n<p><em>Configure build system:<\/em><\/p>\n<pre>make menuconfig<\/pre>\n<p><em>Select router options:<\/em><br \/><a href=\"http:\/\/www.netquote.it\/nqmain\/wp-content\/uploads\/Screenshot-from-2019-05-26-15-32-14.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-866\" src=\"http:\/\/www.netquote.it\/nqmain\/wp-content\/uploads\/Screenshot-from-2019-05-26-15-32-14.png\" alt=\"\" width=\"808\" height=\"550\" srcset=\"https:\/\/www.netquote.it\/nqmain\/wp-content\/uploads\/Screenshot-from-2019-05-26-15-32-14.png 808w, https:\/\/www.netquote.it\/nqmain\/wp-content\/uploads\/Screenshot-from-2019-05-26-15-32-14-150x102.png 150w, https:\/\/www.netquote.it\/nqmain\/wp-content\/uploads\/Screenshot-from-2019-05-26-15-32-14-300x204.png 300w, https:\/\/www.netquote.it\/nqmain\/wp-content\/uploads\/Screenshot-from-2019-05-26-15-32-14-768x523.png 768w\" sizes=\"auto, (max-width: 808px) 100vw, 808px\" \/><\/a><em>Install LUCI web interface:<\/em><\/p>\n<pre>.\/scripts\/feeds install luci<\/pre>\n<p><em>Select Luci web interface from menuconfig:<\/em><\/p>\n<pre>LuCI ---&gt; \u00a01. Collections ---&gt; \u00a0&lt;*&gt; luci<\/pre>\n<p>Choose packages carefully, because we have only 4mb of storage. This amount of memory is enough for many specialized device with a limited set of features like a router or AP. In order to take advantage of many of the packages provided by OpenWrt, it is essential to extend the memory with external USB storage. Blockmount package and root overlay filesystem can do this trick: <a href=\"https:\/\/openwrt.org\/docs\/techref\/block_mount\">https:\/\/openwrt.org\/docs\/techref\/block_mount<\/a><\/p>\n<p><em>Select block-mount:<\/em><\/p>\n<pre>Base system ---&gt;\u00a0 &lt;*&gt; block-mount<br \/>Kernel modules ---&gt;\u00a0 USB Support ---&gt;\u00a0 &lt;*&gt; kmod-usb-storage<br \/>Kernel modules ---&gt;\u00a0 Filesystems ---&gt;\u00a0 &lt;*&gt; kmod-fs-ext4<\/pre>\n<p>Another solution is to remove all ip-v6 support. Is configured by default and also supported from kernel side. Hacking on Kernel configuration is especially useful when support for specific hardware is required or simply to enable debugging features or <span lang=\"en\" tabindex=\"0\">disable something to save space.\u00a0<\/span><\/p>\n<p><em>Linux kernel configuration:<\/em><\/p>\n<pre>make kernel_menuconfig<\/pre>\n<p>Careful with kernel settings, most of them are unsafe. Don&#8217;t touch things, if you are not aware about what are they really doing. <span lang=\"en\" tabindex=\"0\">At best, you&#8217;ll get a slow kernel with a lot of useless code.<\/span><\/p>\n<p><em>Build firmware:<\/em><\/p>\n<pre>make -j8<\/pre>\n<p>Finally, we can find all binary files in \u201cbin\/targets\/ar71xx\/tiny\/\u201d<\/p>\n<pre>1,2K giu 13 12:04 config.seed<br \/>2,8K giu 13 12:07 openwrt-ar71xx-tiny-device-tl-mr3420-v1.manifest<br \/>2,7M giu 13 12:07 openwrt-ar71xx-tiny-root.squashfs<br \/>3,8M giu 13 12:07 openwrt-ar71xx-tiny-tl-mr3420-v1-squashfs-factory.bin<br \/>3,6M giu 13 12:07 openwrt-ar71xx-tiny-tl-mr3420-v1-squashfs-sysupgrade.bin<br \/>1,2M giu 13 12:07 openwrt-ar71xx-tiny-uImage-lzma.bin<br \/>3,5M giu 13 12:07 openwrt-ar71xx-tiny-vmlinux.bin<br \/>3,5M giu 13 12:07 openwrt-ar71xx-tiny-vmlinux.elf<br \/>1,2M giu 13 12:07 openwrt-ar71xx-tiny-vmlinux.lzma<br \/>1,2M giu 13 12:07 openwrt-ar71xx-tiny-vmlinux-lzma.elf<br \/>4,0K giu 13 12:07 packages<br \/>1,1K giu 13 12:07 sha256sums<\/pre>\n<p>To program the device for the first time is sufficient to upload &#8220;factory.bin&#8221; to the router, from it&#8217;s own classic web interface as usual. For s<span lang=\"en\" tabindex=\"0\">ubsequent upgrades from LUCI web interface use &#8220;sysupgrade.bin&#8221;. <\/span><\/p>\n<div id=\"KnM9nf\"><span lang=\"en\" tabindex=\"0\">Wait for the router to reboot, connect to &#8220;192.168.1.1&#8221; with any browser or ssh, then you will be able to set up root password. First Login: <a title=\"http:\/\/wiki.openwrt.org\/doc\/howto\/firstlogin\" href=\"http:\/\/wiki.openwrt.org\/doc\/howto\/firstlogin\">http:\/\/wiki.openwrt.org\/doc\/howto\/firstlogin<\/a><br \/><\/span><\/div>\n<div>\u00a0<\/div>\n<p><em>Next topics:<\/em><br \/>1) Serial debug console<br \/>2) Customize your build<br \/>3) Remote development<\/p>\n<p><em>Reference:<\/em><br \/>All documentation and howto: <a href=\"http:\/\/wiki.openwrt.org\/doc\/start\">http:\/\/wiki.openwrt.org\/doc\/start<\/a><br \/>Multiple builds in one single checkout: <a title=\"http:\/\/wiki.openwrt.org\/doc\/devel\/env\" href=\"http:\/\/wiki.openwrt.org\/doc\/devel\/env\">http:\/\/wiki.openwrt.org\/doc\/devel\/env<\/a><br \/>Detailed build instructions:\u00a0<a title=\"http:\/\/wiki.openwrt.org\/doc\/howto\/build\" href=\"http:\/\/wiki.openwrt.org\/doc\/howto\/build\">http:\/\/wiki.openwrt.org\/doc\/howto\/build<\/a><br \/>Easy patch management:\u00a0<a title=\"http:\/\/wiki.openwrt.org\/doc\/devel\/patches\" href=\"http:\/\/wiki.openwrt.org\/doc\/devel\/patches\">http:\/\/wiki.openwrt.org\/doc\/devel\/patches<\/a><br \/>Creating packages:\u00a0<a title=\"http:\/\/wiki.openwrt.org\/doc\/devel\/packages\" href=\"http:\/\/wiki.openwrt.org\/doc\/devel\/packages\">http:\/\/wiki.openwrt.org\/doc\/devel\/packages<\/a><\/p>\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>OpenWrt is a powerful Linux distribution for embedded devices. Especially for routers with reduced memory and performance. This objective has<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[13],"class_list":["post-863","post","type-post","status-publish","format-standard","hentry","category-openwrt","tag-openwrt"],"_links":{"self":[{"href":"https:\/\/www.netquote.it\/nqmain\/wp-json\/wp\/v2\/posts\/863","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.netquote.it\/nqmain\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.netquote.it\/nqmain\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.netquote.it\/nqmain\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.netquote.it\/nqmain\/wp-json\/wp\/v2\/comments?post=863"}],"version-history":[{"count":22,"href":"https:\/\/www.netquote.it\/nqmain\/wp-json\/wp\/v2\/posts\/863\/revisions"}],"predecessor-version":[{"id":956,"href":"https:\/\/www.netquote.it\/nqmain\/wp-json\/wp\/v2\/posts\/863\/revisions\/956"}],"wp:attachment":[{"href":"https:\/\/www.netquote.it\/nqmain\/wp-json\/wp\/v2\/media?parent=863"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.netquote.it\/nqmain\/wp-json\/wp\/v2\/categories?post=863"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.netquote.it\/nqmain\/wp-json\/wp\/v2\/tags?post=863"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}