How to strip the IPv6 stuff to make room in a tiny device?

Good!
Unlucklily it requires me to know exactly which package names I need to replace to the terse

- remove all related elements to iptables
- remove dhcp servers

Which is more or less what I tried last time in OpenWRT.
But it's still a starting point.
TAL!

I've been looking into a build w/out IPv6 support as well. I started a list of packages installed by default (on my Netgear R6100) that I think are IPv6-related:

ip6tables kmod-ip6tables kmod-nf-conntrack6 kmod-nf-ipt6 odhcp6c luci-proto-ipv6

I'm not sure if this list is complete or if these packages can be safely omitted from a custom build though as I have yet to try this...

1 Like

I think I can add:

libip6tc

I am little bit concerned, anyway, as last time I tried it with OpenWRT I ended up with an unusable box!

In regards to the original "suggestion" I wouldn't strip all related elements to iptables and dhcp servers, though.
Having a WAN with DHCP client or a LAN with a DHCP server is too common to ditch it!
I think that the "trimming list" needs some major rework.

1 Like

Please keep in mind that these lines are filed under "If the device has 16MB or less of RAM", which is not true for the TL-MR3020.

I am more concerned with the room in the flash storage, though. It's 4MB and I'd like to pack more USB stuff...

See also "Make image" problem where jow gives this example parameters for the imagebuilder:

make image PROFILE=tl-wr941nd-v6 PACKAGES="uhttpd uhttpd-mod-ubus libiwinfo-lua luci-base luci-app-firewall luci-mod-admin-full luci-theme-bootstrap luci-app-commands luci-app-watchcat -ppp -ppp-mod-pppoe -ip6tables -odhcp6c -kmod-ipv6 -kmod-ip6tables"

with luci-app-commands and luci-app-watchcat being specific to the user in the above mentioned thread, i.e. they can be ommitted.

1 Like

Thanks @jow and @tmomas !
I'll give that a look later.

It took some time but I did it, with v17.01.4.
My command is:

make image PROFILE=tl-mr3020-v1 PACKAGES="uhttpd uhttpd-mod-ubus libiwinfo-lua luci-base luci-ssl luci-app-firewall luci-mod-admin-full luci-theme-bootstrap luci-app-commands luci-app-watchcat -ppp -ppp-mod-pppoe -luci-proto-ppp -luci-proto-ipv6 -ip6tables -odhcp6c -kmod-ipv6 -kmod-ip6tables -libip6tc"

The only thing is that I cannot get rid of luci-proto-ipv6 and luci-proto-ppp despite I am asking explicitly to exclude them. There needs to be something requiring them back.
Any idea?

luci-ssl seems to depend on luci which in turn depends on luci-proto-ipv6 and luci-proto-ppp.

Depends: libc, uhttpd, uhttpd-mod-ubus, luci-mod-admin-full, luci-theme-bootstrap, luci-app-firewall, luci-proto-ppp, libiwinfo-lua, luci-proto-ipv6

1 Like

Thanks.
If I don't install luci-ssl and just luci, I don't get luci-proto-ipv6 and luci-proto-ppp pulled in.
So it could be that it's luci-ssl to depend upon luci-proto-ipv6 and luci-proto-ppp ...
Where are those dependencies recorded?
In the package source?

Include only needed luci components, not full luci package.

https://lede-project.org/faq/before_installation#which_packages_can_i_safely_remove_to_save_space

-> "add LuCI minimal"

2 Likes

I have to keep luci-ssl and can ditch luci-app-commands luci-app-watchcat.
So I rebuilt the image but I sill get both libip6tc and luci-proto-ipv6 pulled in for about 22Kb or storage.
I think that luci-ssl shouldn't rely on the these two packages if all other IPv6 stuff has been disabled.

Both luci and luci-ssl are empty meta packages that depend on a number of components for easier installation. If you omit luci-ssl and/or luci you can freely deselect components like luci-proto-ipv6.

1 Like

Thanks Jo.
I see:

Package: luci
Version: git-18.030.55557-ee31999-1
Depends: libc, uhttpd, uhttpd-mod-ubus, luci-mod-admin-full, luci-theme-bootstrap, luci-app-firewall, luci-proto-ppp, libiwinfo-lua, luci-proto-ipv6

Package: luci-ssl
Version: git-18.030.55557-ee31999-1
Depends: libc, luci, libustream-mbedtls, px5g

But I am not sure whether I break anything by leaving luci-proto-ppp and luci-proto-ipv6 out.
Any idea?

Nope, omitting these protocols will not break the common functionality of LuCI - you'll just lose the ability to configure PPP or IPv6 interfaces.

1 Like

It's the firewall package to require those IPv6 bits:

Package: luci-app-firewall
Version: git-18.030.55557-ee31999-1
Depends: libc, firewall

and

Package: firewall
Version: 2017-05-27-a4d98aea-1
Depends: libc, libubox, libubus, libuci, libip4tc, libip6tc, libxtables, kmod-ipt-core, kmod-ipt-conntrack, kmod-ipt-nat

I will try a little bit harder... :wink:
It ain't easy.
Maybe the IPv6 stuff should be packed together in a few separate packages. But this seems to be another story.

I think, there is also an option to disable ipv6 support in the global build options.

Hmm... Any hint?
I will try and find out, but I think the package dependencies will prevail!

CONFIG_IPV6: │
│ │
│ Enables IPv6 support in kernel (builtin) and packages. │
│ │
│ │
│ Symbol: IPV6 [=n] │
│ Type : boolean │
│ Prompt: Enable IPv6 support in packages │
│ Location: │
│ -> Global build settings

That CONFIG_IPV6 switch is in the kernel configuration.
That wouldn't stop the IPv6 packages to be pulled in, anyway.
Disabling IPv6 in the kernel would save some room, indeed.
But the trick is clearly in the package dependencies: those should be modified.