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

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

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.

-> "add LuCI minimal"


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


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!

│ │
│ 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.

No this is wrong.
Some Makefiles make uses of the switch.

find . -type f -name Makefile -exec grep "CONFIG_IPV6" '{}' ; -print

When i start a new config, select my target, disable the ipv6 config in global config,
save the config, make defconfig and go trough my config file i cant find any ipv6 packages there.
Except uhdpcd.

I tried with

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

I finally got rid of luci-proto-ipv6 but am still getting libip6tc pulled in.

Again, I think this is a dependency issue:

root@LEDE:~# opkg remove libip6tc
No packages removed.
Collected errors:
 * print_dependents_warning: Package libip6tc is depended upon by packages:
 * print_dependents_warning:    firewall
 * print_dependents_warning:    iptables
 * print_dependents_warning: These might cease to work if package libip6tc is removed.

 * print_dependents_warning: Force removal of this package with --force-depends.
 * print_dependents_warning: Force removal of this package and its dependents
 * print_dependents_warning: with --force-removal-of-dependent-packages.

Thats strange.
On my build system libip6tc doesn't have such dependencies.

Do you use latest git source or a tagged release?

I downaloaded the ImageBuilder from here and I'd say it's an official stable release.
I wouldn't use git unless there's some strong reason, like bleeding edge features I need or a big bug fixed.