Should OpenWrt/LEDE support devices with only 4MB Flash?

[quote="richb-hanover, post:101, topic:1018"]
I haven't thought about "double-NAT from the same subnet range" in a while. Maybe someone can tell me if it should work or not...
[/quote]It will not work. Routing logic goes partially wrong if you have the same subnet on both LAN and WAN side. (It may actually work partially, but half of the packets go missing etc. causing latency, download problems = mysterious opkg problems etc.)

It might be added as a checklist item for the installation instructions, that the WAN should not have 192.168.1.X subnet as that is the default for LAN.

  • If you have upstream WAN (router, ISP) that provides an address from the 192.168.1.X subnet for the LEDE router, you need to change LAN subnet to something else before connecting WAN.

Regarding the default IP address, Alberto's page suggests changing the IP address to something other than 192.168.1.1, and this is the very first thing I do on every install. What are the challenges of making a "wholesale" changes in the default delivered IP address for all LEDE devices to something less common (192.168.1.11 etc)? FYI Gli uses 192.168.8.1.

Regarding the other playground pages in process:

https://lede-project.org/docs/guide-quick-start/standardflashinginstructions
In the section "Installing LEDE System Upgrade" I believe it is relevant to note that the process described assumes Luci is installed. This process does not cover a CLi only device. Should this section be renamed "Installing LEDE System Upgrade with LuCi"?

There is a drastic difference between Rich and Alberto's pages, being that one is written from a UCI perspective (snapshot builds with no Luci) and the other with Luci installed. I believe there need to be 2 clearly defined paths and see Rich has created a blank page for this.
UCI
https://lede-project.org/docs/guide-quick-start/start?rev=1483296792
Luci
https://lede-project.org/docs/guide-quick-start/start

I agree with Rich that going directly to an AP deserves to be separate and that all users should build a standard router first. There already are wiki pages for Dump AP in OpwnWrt, but I am not seeing this on LEDE. https://wiki.openwrt.org/doc/recipes/dumbap

Regarding "Many devices do not have a WAN port", I believe that the standard instructions will work for a single port device up to step 5 here: https://lede-project.org/docs/guide-quick-start/start . Not all single port devices are used as Access Points. There are many "Travel Routers" (HooToo TM-02 and many TP-Links) that are intended to connect to a WISP\AP\STAtion. I think it would be helpful to cover enabling and configuring wireless via UCI. The user will need to know the credentials and security for the WISP\AP\STAtion they wish to connect to. This could be added to the "Router vs Access Point" page content and linked from step 5. For devices with Luci, this can point to an existing(?) wiki.

On this new page https://lede-project.org/docs/guide-quick-start/developmentinstallation can we please add at the top a note about the life cycle of "Snapshot" builds and packages (they change almost daily, packages may be build specific, you may wish to download all the packages for your build w wget to support your particular install going forward). There are a number of users who will adopt snapshot as they need support for a new router not supported in Release 17.01, but also want stability until the next release. This may also need to link to other wikis on extroot and modifying the default package repository.

A number of these comments are based on my experience installing "snapshot" on a HooToo TM-02, with a single LAN and USB.

I think Rich may have incorporated some of this, but I am not clear on how these pages sequence at the moment.

Should we be moving this discussion to the Documentation section here?

Good to know. Saves a lot of experimentation.

And you're right to suggest that the instructions talk about selecting a non-conflicting address range for the WAN port. Thanks.

YES! Thanks for directing us back to the proper topic at: Updating Standard LEDE Installation/Quick Start page

I would recommend against doing double-NAT to use the same address range on both
sides, the confusion it can cause is a real pain.

I've had many years of experience with using double-NAT, sometimes it's needed,
but it would be better to move the default addresses used by LEDE to 192.168.2
if too many devices out there are defaulting to 192.168.0 and 192.168.1.

Another option would be to add some scripting to look at what DHCP address is
offered by the outside, and if it conflicts with the inside, change the inside
to a different address and restart. This would cause a hiccup the first time a
device is hooked up, but should be stable for that location after that point.

David Lang

Thanks for confirming that it doesn't really work.

I am now comfortable with the knowledge that this is a bad thing, and will update the LEDE Installation page with a recommendation to find a different address range from the WAN interface's.

Now that 17.01 is in the box, do we know if any of these devices were not built with LuCi?
If so which ones?

Afaik none have LuCI disabled? I think it will be up to the owners to verify if 1) images for their model are available (ie the RC fits into the allocated space) or 2) if there's enough free space after installation to be actually usable.

I guess the best way to start is to analyse the resultant binaries and find those binaries with the largest size
Basically the best chance of Shrinking LEDE is to start with Optimizing for Size for the largest binaries (by stripping out unused function)
If we cut a bit from each binary we can have substantial savings when we sum it up

To start with busybox should be build for size since I tested building for speed makes no difference in performance
https://git.lede-project.org/?p=source.git;a=blob;f=package/utils/busybox/Config-default

config BUSYBOX_DEFAULT_ASH_OPTIMIZE_FOR_SIZE
bool
default n <-- Should be y

[lede@lede root-ar71xx]$ tree -h | grep 'K'
├── [4.0K] bin
│ ├── [522K] busybox
│ ├── [9.3K] config_generate
│ ├── [1.5K] ipcalc.sh
│ ├── [151K] opkg
│ ├── [ 12K] ubus
│ ├── [ 16K] uclient-fetch
├── [4.0K] etc
│ │ ├── [1.3K] 01_leds
│ │ ├── [1.4K] 02_network
│ │ ├── [4.1K] firewall
│ │ └── [3.7K] uhttpd
│ ├── [7.4K] diag.sh
│ ├── [1.3K] dnsmasq.conf
│ │ │ └── [3.3K] 10-ath9k-eeprom
│ │ │ └── [1.2K] 10-ar922x-led-fix
│ ├── [1.3K] hotplug.json
│ ├── [4.0K] init.d
│ │ ├── [1.1K] boot
│ │ ├── [ 21K] dnsmasq
│ │ ├── [4.4K] dropbear
│ │ ├── [3.2K] led
│ │ ├── [2.4K] log
│ │ ├── [2.6K] network
│ │ ├── [2.1K] sysntpd
│ │ ├── [1.0K] system
│ │ ├── [4.7K] uhttpd
│ ├── [4.0K] modules.d
│ │ └── [4.0K] keys
│ ├── [1.4K] profile
│ ├── [2.5K] protocols
│ ├── [2.4K] rc.common
│ ├── [4.0K] rc.d
│ │ ├── [ 21] K10gpio_switch -> ../init.d/gpio_switch
│ │ ├── [ 18] K50dropbear -> ../init.d/dropbear
│ │ ├── [ 16] K85odhcpd -> ../init.d/odhcpd
│ │ ├── [ 13] K89log -> ../init.d/log
│ │ ├── [ 17] K90network -> ../init.d/network
│ │ ├── [ 20] K90sysfixtime -> ../init.d/sysfixtime
│ │ ├── [ 14] K98boot -> ../init.d/boot
│ │ ├── [ 16] K99umount -> ../init.d/umount
│ ├── [2.9K] services
│ ├── [1.3K] sysctl.conf
│ └── [4.0K] uci-defaults
│ ├── [1.6K] 03_network-switchX-migration
│ ├── [1.3K] 04_led_migration
├── [4.0K] lib
│ ├── [ 19K] ar71xx.sh
│ │ └── [3.6K] uci.sh
│ ├── [4.0K] functions
│ │ ├── [1.1K] leds.sh
│ │ ├── [6.9K] network.sh
│ │ ├── [1.8K] preinit.sh
│ │ ├── [9.2K] procd.sh
│ │ ├── [2.7K] service.sh
│ │ ├── [2.4K] system.sh
│ │ └── [ 12K] uci-defaults.sh
│ ├── [7.9K] functions.sh
│ ├── [8.2K] libblobmsg_json.so
│ ├── [600K] libc.so
│ ├── [ 33K] libfstools.so
│ ├── [ 75K] libgcc_s.so.1
│ ├── [ 12K] libjson_script.so
│ ├── [4.1K] libsetlbf.so
│ ├── [ 45K] libubox.so
│ ├── [ 24K] libubus.so
│ ├── [ 41K] libuci.so
│ ├── [ 17K] libvalidate.so
│ │ └── [4.0K] 4.4.47
│ │ ├── [ 27K] ath9k_common.ko
│ │ ├── [363K] ath9k_hw.ko
│ │ ├── [130K] ath9k.ko
│ │ ├── [ 24K] ath.ko
│ │ ├── [282K] cfg80211.ko
│ │ ├── [ 13K] compat.ko
│ │ ├── [2.0K] crc-ccitt.ko
│ │ ├── [ 41K] ehci-hcd.ko
│ │ ├── [7.4K] ehci-platform.ko
│ │ ├── [ 11K] gpio-button-hotplug.ko
│ │ ├── [2.9K] ip6table_filter.ko
│ │ ├── [3.3K] ip6table_mangle.ko
│ │ ├── [ 15K] ip6_tables.ko
│ │ ├── [2.7K] ip6t_REJECT.ko
│ │ ├── [3.0K] iptable_filter.ko
│ │ ├── [3.0K] iptable_mangle.ko
│ │ ├── [3.0K] iptable_nat.ko
│ │ ├── [ 15K] ip_tables.ko
│ │ ├── [2.3K] ipt_MASQUERADE.ko
│ │ ├── [2.6K] ipt_REJECT.ko
│ │ ├── [4.7K] ledtrig-usbport.ko
│ │ ├── [505K] mac80211.ko
│ │ ├── [ 10K] nf_conntrack_ipv4.ko
│ │ ├── [ 11K] nf_conntrack_ipv6.ko
│ │ ├── [2.4K] nf_defrag_ipv4.ko
│ │ ├── [9.5K] nf_defrag_ipv6.ko
│ │ ├── [5.0K] nf_log_common.ko
│ │ ├── [7.1K] nf_log_ipv4.ko
│ │ ├── [7.1K] nf_log_ipv6.ko
│ │ ├── [6.2K] nf_nat_ipv4.ko
│ │ ├── [ 15K] nf_nat.ko
│ │ ├── [3.1K] nf_nat_masquerade_ipv4.ko
│ │ ├── [2.1K] nf_nat_redirect.ko
│ │ ├── [3.6K] nf_reject_ipv4.ko
│ │ ├── [4.2K] nf_reject_ipv6.ko
│ │ ├── [6.7K] nls_base.ko
│ │ ├── [ 10K] ppp_async.ko
│ │ ├── [ 34K] ppp_generic.ko
│ │ ├── [ 14K] pppoe.ko
│ │ ├── [3.4K] pppox.ko
│ │ ├── [ 21K] sch_cake.ko
│ │ ├── [6.2K] slhc.ko
│ │ ├── [4.5K] usb-common.ko
│ │ ├── [161K] usbcore.ko
│ │ ├── [ 18K] x_tables.ko
│ │ ├── [1.7K] xt_comment.ko
│ │ ├── [3.8K] xt_conntrack.ko
│ │ ├── [2.7K] xt_limit.ko
│ │ ├── [2.4K] xt_LOG.ko
│ │ ├── [1.8K] xt_mac.ko
│ │ ├── [2.1K] xt_mark.ko
│ │ ├── [2.6K] xt_multiport.ko
│ │ ├── [2.8K] xt_nat.ko
│ │ ├── [2.1K] xt_REDIRECT.ko
│ │ ├── [2.2K] xt_state.ko
│ │ ├── [4.9K] xt_TCPMSS.ko
│ │ ├── [3.3K] xt_tcpudp.ko
│ │ └── [3.6K] xt_time.ko
│ ├── [4.0K] netifd
│ │ ├── [2.6K] dhcp.script
│ │ ├── [6.4K] dhcpv6.script
│ │ ├── [ 20K] hostapd.sh
│ │ ├── [8.3K] netifd-proto.sh
│ │ ├── [6.0K] netifd-wireless.sh
│ │ │ ├── [2.4K] dhcp.sh
│ │ │ ├── [3.6K] dhcpv6.sh
│ │ │ └── [7.1K] ppp.sh
│ │ └── [ 19K] mac80211.sh
│ │ ├── [1.6K] config.sh
│ ├── [4.0K] preinit
│ │ ├── [1.4K] 05_set_iface_mac_ar71xx
│ │ ├── [2.8K] 10_indicate_preinit
│ │ ├── [2.5K] 30_failsafe_wait
│ │ ├── [1.3K] 82_patch_ath10k
│ ├── [4.0K] upgrade
│ │ ├── [7.9K] common.sh
│ │ ├── [3.6K] merakinand.sh
│ │ ├── [7.5K] openmesh.sh
│ │ └── [ 13K] platform.sh
│ └── [3.0K] mac80211.sh
├── [4.0K] sbin
│ ├── [4.1K] askfirst
│ ├── [109K] fw3
│ ├── [1.3K] ifup
│ ├── [ 17K] init
│ ├── [8.2K] jffs2reset
│ ├── [ 16K] kmodloader
│ ├── [ 13K] logd
│ ├── [ 13K] logread
│ ├── [4.1K] mount_root
│ ├── [ 37K] mtd
│ ├── [167K] netifd
│ ├── [ 74K] procd
│ ├── [ 53K] rpcd
│ ├── [ 21K] swconfig
│ ├── [6.2K] sysupgrade
│ ├── [ 29K] ubusd
│ ├── [ 12K] uci
│ ├── [8.2K] udevtrigger
│ ├── [8.1K] validate_data
│ └── [4.5K] wifi
│ ├── [4.0K] bin
│ │ ├── [8.2K] fwtool
│ │ ├── [4.1K] getrandom
│ │ ├── [ 16K] iwinfo
│ │ ├── [ 12K] jshn
│ │ ├── [ 20K] jsonfilter
│ │ ├── [ 12K] lua
│ │ ├── [ 16K] luci-bwc
│ │ ├── [ 24K] usign
│ ├── [4.0K] lib
│ │ ├── [ 25K] libip4tc.so.0.1.0
│ │ ├── [ 25K] libip6tc.so.0.1.0
│ │ ├── [ 21K] libiptext4.so
│ │ ├── [ 21K] libiptext6.so
│ │ ├── [ 59K] libiptext.so
│ │ ├── [ 58K] libiwinfo.so
│ │ ├── [ 37K] libjson-c.so.2.0.2
│ │ ├── [177K] liblua.so.5.1.5
│ │ ├── [ 33K] libnl-tiny.so
│ │ ├── [ 20K] libuclient.so
│ │ ├── [ 41K] libxtables.so.10.0.0
│ │ │ ├── [ 24K] iwinfo.so
│ │ │ ├── [4.0K] luci
│ │ │ │ │ └── [5.9K] datatypes.lua
│ │ │ │ ├── [ 27K] cbi.lua
│ │ │ │ │ ├── [4.0K] admin
│ │ │ │ │ │ ├── [7.9K] network.lua
│ │ │ │ │ │ ├── [3.7K] status.lua
│ │ │ │ │ │ ├── [8.2K] system.lua
│ │ │ │ │ │ └── [1.2K] uci.lua
│ │ │ │ ├── [ 14K] dispatcher.lua
│ │ │ │ │ │ ├── [1.4K] conditionals.lua
│ │ │ │ │ │ ├── [1.1K] date.lua
│ │ │ │ │ │ └── [1.4K] mime.lua
│ │ │ │ │ └── [7.6K] protocol.lua
│ │ │ │ ├── [3.7K] http.lua
│ │ │ │ ├── [ 24K] ip.so
│ │ │ │ ├── [ 12K] jsonc.so
│ │ │ │ ├── [3.2K] ltn12.lua
│ │ │ │ │ │ ├── [4.0K] admin_network
│ │ │ │ │ │ │ ├── [9.9K] dhcp.lua
│ │ │ │ │ │ │ ├── [2.5K] iface_add.lua
│ │ │ │ │ │ │ ├── [ 12K] ifaces.lua
│ │ │ │ │ │ │ ├── [3.5K] network.lua
│ │ │ │ │ │ │ ├── [2.4K] proto_6in4.lua
│ │ │ │ │ │ │ ├── [1.5K] proto_6rd.lua
│ │ │ │ │ │ │ ├── [1.5K] proto_ahcp.lua
│ │ │ │ │ │ │ ├── [2.9K] proto_aiccu.lua
│ │ │ │ │ │ │ ├── [1.3K] proto_dhcp.lua
│ │ │ │ │ │ │ ├── [1.3K] proto_dhcpv6.lua
│ │ │ │ │ │ │ ├── [1.1K] proto_hnet.lua
│ │ │ │ │ │ │ ├── [1.2K] proto_l2tp.lua
│ │ │ │ │ │ │ ├── [2.0K] proto_map.lua
│ │ │ │ │ │ │ ├── [2.5K] proto_ppp.lua
│ │ │ │ │ │ │ ├── [2.6K] proto_pppoe.lua
│ │ │ │ │ │ │ ├── [2.7K] proto_pppossh.lua
│ │ │ │ │ │ │ ├── [2.2K] proto_pptp.lua
│ │ │ │ │ │ │ ├── [1.8K] proto_static.lua
│ │ │ │ │ │ │ ├── [2.8K] routes.lua
│ │ │ │ │ │ │ ├── [5.8K] vlan.lua
│ │ │ │ │ │ │ ├── [3.8K] wifi_add.lua
│ │ │ │ │ │ │ └── [ 34K] wifi.lua
│ │ │ │ │ │ ├── [4.0K] admin_system
│ │ │ │ │ │ │ ├── [2.7K] admin.lua
│ │ │ │ │ │ │ ├── [1.9K] backupfiles.lua
│ │ │ │ │ │ │ │ ├── [3.4K] mount.lua
│ │ │ │ │ │ │ │ └── [1.4K] swap.lua
│ │ │ │ │ │ │ ├── [6.6K] fstab.lua
│ │ │ │ │ │ │ ├── [1.2K] ipkg.lua
│ │ │ │ │ │ │ ├── [3.2K] leds.lua
│ │ │ │ │ │ │ ├── [1.9K] startup.lua
│ │ │ │ │ │ │ └── [4.4K] system.lua
│ │ │ │ │ │ └── [4.0K] firewall
│ │ │ │ │ │ ├── [3.2K] forward-details.lua
│ │ │ │ │ │ ├── [2.9K] forwards.lua
│ │ │ │ │ │ ├── [7.5K] rule-details.lua
│ │ │ │ │ │ ├── [5.6K] rules.lua
│ │ │ │ │ │ ├── [5.0K] zone-details.lua
│ │ │ │ │ │ └── [1.7K] zones.lua
│ │ │ │ │ ├── [7.8K] firewall.lua
│ │ │ │ │ ├── [3.1K] ipkg.lua
│ │ │ │ │ ├── [4.0K] network
│ │ │ │ │ │ └── [1.6K] proto_ppp.lua
│ │ │ │ │ ├── [ 36K] network.lua
│ │ │ │ │ └── [2.5K] uci.lua
│ │ │ │ │ ├── [1.1K] cgi.lua
│ │ │ │ │ └── [1.3K] uhttpd.lua
│ │ │ │ │ ├── [3.8K] iptparser.lua
│ │ │ │ │ │ ├── [ 15K] tzdata.lua
│ │ │ │ │ │ └── [3.3K] tzoffset.lua
│ │ │ │ ├── [9.1K] sys.lua
│ │ │ │ │ └── [ 16K] parser.so
│ │ │ │ ├── [1.3K] template.lua
│ │ │ │ │ ├── [4.2K] firewall.lua
│ │ │ │ │ ├── [3.5K] status.lua
│ │ │ │ │ └── [1.5K] webadmin.lua
│ │ │ │ ├── [ 17K] util.lua
│ │ │ │ └── [4.0K] view
│ │ │ │ ├── [4.0K] admin_network
│ │ │ │ │ ├── [3.8K] diagnostics.htm
│ │ │ │ │ ├── [7.8K] iface_overview.htm
│ │ │ │ │ ├── [2.2K] iface_status.htm
│ │ │ │ │ ├── [4.2K] lease_status.htm
│ │ │ │ │ ├── [1.1K] switch_status.htm
│ │ │ │ │ ├── [4.9K] wifi_join.htm
│ │ │ │ │ ├── [ 15K] wifi_overview.htm
│ │ │ │ │ └── [2.6K] wifi_status.htm
│ │ │ │ ├── [4.0K] admin_status
│ │ │ │ │ ├── [8.1K] bandwidth.htm
│ │ │ │ │ ├── [ 11K] connections.htm
│ │ │ │ │ ├── [ 25K] index.htm
│ │ │ │ │ ├── [4.8K] iptables.htm
│ │ │ │ │ ├── [8.4K] load.htm
│ │ │ │ │ ├── [4.9K] routes.htm
│ │ │ │ │ └── [ 12K] wireless.htm
│ │ │ │ ├── [4.0K] admin_system
│ │ │ │ │ ├── [1.5K] applyreboot.htm
│ │ │ │ │ ├── [4.1K] flashops.htm
│ │ │ │ │ ├── [8.0K] packages.htm
│ │ │ │ │ ├── [1.6K] reboot.htm
│ │ │ │ │ └── [1.7K] upgrade.htm
│ │ │ │ │ ├── [2.3K] changelog.htm
│ │ │ │ │ ├── [1.7K] changes.htm
│ │ │ │ ├── [4.0K] cbi
│ │ │ │ │ ├── [1.3K] apply_xhr.htm
│ │ │ │ │ ├── [1.1K] delegator.htm
│ │ │ │ │ ├── [2.6K] filebrowser.htm
│ │ │ │ │ ├── [1.7K] firewall_zoneforwards.htm
│ │ │ │ │ ├── [4.0K] firewall_zonelist.htm
│ │ │ │ │ ├── [1.3K] lvalue.htm
│ │ │ │ │ ├── [2.3K] map.htm
│ │ │ │ │ ├── [1.3K] mvalue.htm
│ │ │ │ │ ├── [3.0K] network_ifacelist.htm
│ │ │ │ │ ├── [3.0K] network_netlist.htm
│ │ │ │ │ ├── [1.2K] nsection.htm
│ │ │ │ │ ├── [1.0K] nullsection.htm
│ │ │ │ │ ├── [2.1K] simpleform.htm
│ │ │ │ │ ├── [5.7K] tblsection.htm
│ │ │ │ │ ├── [2.0K] tsection.htm
│ │ │ │ │ ├── [1.9K] ucisection.htm
│ │ │ │ │ ├── [1.4K] upload.htm
│ │ │ │ │ └── [4.1K] wireless_modefreq.htm
│ │ │ │ │ ├── [4.0K] cbi_addforward.htm
│ │ │ │ │ ├── [4.2K] cbi_addrule.htm
│ │ │ │ │ └── [2.8K] cbi_addsnat.htm
│ │ │ │ ├── [2.1K] sysauth.htm
│ │ │ │ └── [5.8K] header.htm
│ │ │ │ ├── [3.6K] fs.lua
│ │ │ │ └── [5.7K] util.lua
│ │ │ ├── [ 81K] nixio.so
│ │ │ ├── [ 20K] ubus.so
│ │ │ └── [ 16K] uci.so
│ │ │ ├── [ 16K] info
│ │ │ │ ├── [2.4K] base-files.list
│ │ │ │ ├── [1.5K] busybox.list
│ │ │ │ ├── [5.2K] luci-base.list
│ │ │ │ ├── [3.1K] luci-mod-admin-full.list
│ │ │ └── [ 20K] status
│ │ │ └── [ 25K] rp-pppoe.so
│ │ └── [ 16K] uhttpd_ubus.so
│ ├── [4.0K] sbin
│ │ ├── [233K] dnsmasq
│ │ ├── [223K] dropbear
│ │ ├── [109K] iw
│ │ ├── [ 45K] odhcp6c
│ │ ├── [ 73K] odhcpd
│ │ ├── [1.0K] opkg-key
│ │ ├── [261K] pppd
│ │ ├── [ 53K] uhttpd
│ │ ├── [714K] wpad
│ │ └── [ 70K] xtables-multi
│ │ └── [3.8K] hardware.txt
│ │ └── [4.7K] jshn.sh
│ └── [1.3K] default.script
│ ├── [ 42K] cascade.css
│ ├── [1.1K] favicon.ico
│ ├── [3.2K] html5.js
└── [4.0K] resources
├── [4.0K] cbi
├── [ 18K] cbi.js
├── [4.0K] icons
│ ├── [1.7K] loading.gif
│ ├── [1.1K] port_up.png
│ ├── [1.5K] wifi_big_disabled.png
│ ├── [2.2K] wifi_big.png
├── [1.0K] load.svg
└── [2.8K] xhr.js

Maybe it would be a good idea to increase the default SQUASHFS_BLOCK_SIZE? Switching from 256 to 1024 can easily bring 100KB+ on 4MB.

1 Like

For those devices with 4MB flash and USB port(s), when the time comes that the firmware >4MB, is it possible to make available by default a package which will require and automatically flash some of the extra packages onto an external USB stick so that can enjoy a little more lifetime with relative ease?

Cheers.

[quote="amq, post:112, topic:1018, full:true"]
Maybe it would be a good idea to increase the default SQUASHFS_BLOCK_SIZE? Switching from 256 to 1024 can easily bring 100KB+ on 4MB.
[/quote]Squashfs with bigger block size uses more RAM, see here, maybe for devices with 32MiB it does not impact much, someone needs to check this.
the file setting that is here
and they have already a LOW_FLASH config, that is only used to disable symbol table information in kernel here

So I think that by turning the above in

	config TARGET_SQUASHFS_BLOCK_SIZE
		int "Block size (in KiB)"
		depends on TARGET_ROOTFS_SQUASHFS
                default 1024 if LOW_FLASH           
		default 64 if LOW_MEMORY_FOOTPRINT
                default 256

should change the default for low flash devices that don't have also low ram (=less than 32 MiB), then someone has to add this "low_flash" property in the FEATURE makefile variable to all devices that have 4 MiB of flash and are not tagged with LOW_FLASH already (it's not set per-device but only some classes of devices have this, for example the TP-Link pocket routers don't have that property enabled)

Here can be added more such config options if using LOW_FLASH is not good (I'd rather avoid disabling the symbol table in kernel).

[quote="loyukfai, post:113, topic:1018, full:true"]
For those devices with 4MB flash and USB port(s), when the time comes that the firmware >4MB, is it possible to make available by default a package which will require and automatically flash some of the extra packages onto an external USB stick so that can enjoy a little more lifetime with relative ease?[/quote]It's possible (I've seen this done with some openwrt builds using custom kernel commandline to set this) but has never been done as default setup in OpenWRT/LEDE.
You keep only the kernel/initramfs in the internal flash and you set this kernel for looking for the rootfs in the USB. It would require you to flash the kernel-only firmware image to the device, and to use a PC to write the rootfs image on a flash drive with dd or with other windows tools like rufus.

EDIT: in case you don't know the sizes, currently a MR-3020 (common minirouter with USB and 4MiB of flash) has a kernel/initramfs that occupies 1.3 MiB, while the full flashable image with Luci included occupies 3.4 MiB, so if you move the rootfs on a USB drive you suddenly have a ton of space for the kernel alone.

1 Like

Personally, I would like to see a option for a simple way to get a "Medium" build or an "Access Point" build (no built in support for PPOE, firewalls, NAT and the attendant "routerish" things out of the box).
I have a fair number of access points at work that are NanoStation Loco M2s that just need to handle vlans and multiple wireless networks. They will never need PPOE and while luci is nice some times, it is faster to configure them with SSH.

Aaron Z

FYI: I added the 4/32 warning now at the top of all dataentries matching these conditions:
Flash=1 or 4
RAM=16 or 32

1 Like

Now running an access point build (from git, snapshot) on 4 MB flash/16MB ram WRT54G v2.2 brcm47xx. Flashed it from a tftpd version of 8.09 owrt. Removed all firewall, logd (in busybox), odhcpd, dnsmasq, ppp, luci options:

-ip6tables
-iptables
-firewall
-kmod-ip6tables
-kmod-ipt-conntrack
-kmod-ipt-nat
-kmod-ipt-core
-kmod-nf-ipt6
-kmod-nf-conntrack6

-kmod-nf-nat
-kmod-nf-conntrack
-kmod-nf-ipt
-dnsmasq
-logd (busybox, sysntpd)
-odhcp6c
-odhcpd
-ppp
-kmod-ppp

The following are enabled:
kmod-b43
kmod-b43legacy (not required)
kmod-cfg80211
kmod-mac80211
iwinfo (not required)
b43legacy-firmware (not required)
wpad-mini
iw
hostapd-common
and, for management,
openssh-sftp-server

After
echo 3> /proc/sys/vm/drop_caches

I get this the following on
free:
total used free shared buffers cached
Mem: 12588 10868 1720 80 636 2068
-/+ buffers/cache: 8164 4424
Swap: 0 0 0

There seem to be a significant portion of cache and buffers which is not flushable.
zram doesn't do much, you gain at most 500 kB, at which point major slowdowns occur. I can put about 3000 kB on the /tmp drive from /dev/urandom with dd before the system runs really low on memory (with zram) There is about 332kB of space left on the flash.

This may work properly as access point. opkg works when using the built bin folder on a local web server.

Vlan, ipv6 support remain intact, but no gui. All normally external modules are still as external packages.

Hi all,
what are the differences beteween tiny and generic images?
I haven't found any information in the wiki.

Thanks
Lorenzo

Low spec devices (4 MB flash) have been split out into the new ar71xx-tiny sub-target, which makes it possible to use a different (stripped-down) (kernel-)config for these devices, it buys them a little more time - but probably not much.

why isn't there a dir-615 e3/e4 ?

Sorry if it's been asked before, but there is no builds for TL-WR720N at https://downloads.openwrt.org/releases/18.06.0/targets/ar71xx/tiny/ ?

Cheers.