OpenWrt Forum Archive

Topic: USB compile on a 4 mb router with Barrier Braker

The content of this topic has been archived on 23 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I have managed to compile and install Barrier-Braker 14.07 with USB+Luci on a 4 mb ar71xx router.
Now I am able to use an USB memory stick as an ftp server storage device.
However I ended up with  very little space left : 76 kB

root@OpenWrt:~# df
Filesystem           1K-blocks      Used Available Use% Mounted on
rootfs                    1088      1012        76  93% /
/dev/root                 1792      1792         0 100% /rom
tmpfs                    14556       676     13880   5% /tmp
/dev/mtdblock5            1088      1012        76  93% /overlay
overlayfs:/overlay        1088      1012        76  93% /
tmpfs                      512         0       512   0% /dev

Here is the list of installed packages:

base-files - 156-r48549
block-mount - 2015-02-25.1-914b023e71559e033ec5a1f9840511eb1ccaf386
busybox - 1.22.1-3
dnsmasq - 2.71-5
dropbear - 2014.63-2
firewall - 2014-09-19
fstools - 2015-02-25.1-914b023e71559e033ec5a1f9840511eb1ccaf386
hostapd-common - 2014-06-03.1-3
ip6tables - 1.4.21-1
iptables - 1.4.21-1
iw - 3.15-1
iwinfo - 51
jshn - 2014-08-04-dffbc09baf71b294185a36048166d00066d433b5
jsonfilter - 2014-06-19-cdc760c58077f44fc40adbbe41e1556a67c1b9a9
kernel - 3.10.49-1-d11f945ed41eb604ca96e8be8c1c516c
kmod-ath - 3.10.49+2014-05-22-1
kmod-ath9k - 3.10.49+2014-05-22-1
kmod-ath9k-common - 3.10.49+2014-05-22-1
kmod-cfg80211 - 3.10.49+2014-05-22-1
kmod-crypto-aes - 3.10.49-1
kmod-crypto-arc4 - 3.10.49-1
kmod-crypto-core - 3.10.49-1
kmod-fs-vfat - 3.10.49-1
kmod-gpio-button-hotplug - 3.10.49-1
kmod-ip6tables - 3.10.49-1
kmod-ipt-conntrack - 3.10.49-1
kmod-ipt-core - 3.10.49-1
kmod-ipt-nat - 3.10.49-1
kmod-ipt-nathelper - 3.10.49-1
kmod-ipv6 - 3.10.49-1
kmod-ledtrig-usbdev - 3.10.49-1
kmod-lib-crc-ccitt - 3.10.49-1
kmod-mac80211 - 3.10.49+2014-05-22-1
kmod-nls-base - 3.10.49-1
kmod-nls-cp437 - 3.10.49-1
kmod-nls-iso8859-1 - 3.10.49-1
kmod-scsi-core - 3.10.49-1
kmod-usb-core - 3.10.49-1
kmod-usb-ohci - 3.10.49-1
kmod-usb-storage - 3.10.49-1
kmod-usb2 - 3.10.49-1
libblobmsg-json - 2014-08-04-dffbc09baf71b294185a36048166d00066d433b5
libc - 0.9.33.2-1
libgcc - 4.8-linaro-1
libip4tc - 1.4.21-1
libip6tc - 1.4.21-1
libiwinfo - 51
libiwinfo-lua - 51
libjson-c - 0.11-2
libjson-script - 2014-08-04-dffbc09baf71b294185a36048166d00066d433b5
liblua - 5.1.5-1
libnl-tiny - 0.1-3
libubox - 2014-08-04-dffbc09baf71b294185a36048166d00066d433b5
libubus - 2014-09-17-4c4f35cf2230d70b9ddd87638ca911e8a563f2f3
libubus-lua - 2014-09-17-4c4f35cf2230d70b9ddd87638ca911e8a563f2f3
libuci - 2014-04-11.1-1
libuci-lua - 2014-04-11.1-1
libxtables - 1.4.21-1
lua - 5.1.5-1
luci - 0.12+svn-r10530-1
luci-app-firewall - 0.12+svn-r10530-1
luci-base - 0.12+svn-r10530-1
luci-lib-nixio - 0.12+svn-r10530-1
luci-mod-admin-full - 0.12+svn-r10530-1
luci-proto-ppp - 0.12+svn-r10530-1
luci-theme-bootstrap - 0.12+svn-r10530-1
mtd - 20
netifd - 2014-09-08.1-46c569989f984226916fec28dd8ef152a664043e
odhcp6c - 2014-12-10-722226c4f1d45c8bf4ac9189523738abcf7d648f
odhcpd - 2014-09-25-a6e2953843eaf6c93764f9feef10466e7a84ec85
opkg - 9c97d5ecd795709c8584e972bfdf3aee3a5b846d-7
procd - 2014-09-15-c1a558f7d0c1e6c1ffa5a47d557a7b45205eef1d
swconfig - 10
uboot-envtools - 2014.04-4
ubox - 2015-02-25.1-31f0ff358b360ee461d845c1b3b5e5d38fa27925
ubus - 2014-09-17-4c4f35cf2230d70b9ddd87638ca911e8a563f2f3
ubusd - 2014-09-17-4c4f35cf2230d70b9ddd87638ca911e8a563f2f3
uci - 2014-04-11.1-1
uhttpd - 2014-08-25-dabd7dea6445aaa0e5b8d9add1872fa7393b3a85
uhttpd-mod-ubus - 2014-08-25-dabd7dea6445aaa0e5b8d9add1872fa7393b3a85
vsftpd - 3.0.2-6
wpad-mini - 2014-06-03.1-3

Just wondering about about leaving out  any "ip6" , "ipt" or kmod-crypto"  packages ?

Any suggestions will be welcomed !

Thanks!

You can re-compile your firmware image and tick off the "IPv6" support. This inherently disables quite many packages, such as ip6tables, kmod-ip6tables, kmod-ipv6 and libip6tc.

Do not just uninstall these packages. You will need to compile the kernel without IPv6 support completely, so as to disable the feature. Otherwise you might end in a situation where you have IPv6 at kernel level, but no IPv6-related firewall, NAT module or anything else. This would render your router (and network behind it) vulnerable.

thanks for the suggestion
I will do make kernel_menuconfig and disable anything with "ip6" in name
also I did not include LUCI into compilation, installed it after,
maybe if it will be included, there will be some space saved?

I did a fresh compile to include LUCI + USB and  try to remove IP6 related.
Compile gave me error about firewall is missing IP6tables,
Restarted again with IP6 related left at defaults and all went well.
After flash, Luci+Wireless+Usb works and still have 304 kb left for something else.
I will stop here, because this is good enough for an old 4 Mb routers (D-LINK DIR-615-C1, TP-LINK TL-WR941ND, TL-WR740/741N(D))



root@OpenWrt:/# df
Filesystem           1K-blocks      Used Available Use% Mounted on
rootfs                     768       464       304  60% /
/dev/root                 2048      2048         0 100% /rom
tmpfs                    14556        96     14460   1% /tmp
/dev/mtdblock5             768       464       304  60% /overlay
overlayfs:/overlay         768       464       304  60% /
tmpfs                      512         0       512   0% /dev
/dev/sda1              3924432   3237620    686812  82% /usb


root@OpenWrt:/# opkg list-installed
base-files - 156-r48549
block-mount - 2015-02-25.1-914b023e71559e033ec5a1f9840511eb1ccaf386
busybox - 1.22.1-3
dnsmasq - 2.71-5
dropbear - 2014.63-2
firewall - 2014-09-19
fstools - 2015-02-25.1-914b023e71559e033ec5a1f9840511eb1ccaf386
hostapd-common - 2014-06-03.1-3
ip6tables - 1.4.21-1
iptables - 1.4.21-1
iw - 3.15-1
iwinfo - 51
jshn - 2014-08-04-dffbc09baf71b294185a36048166d00066d433b5
jsonfilter - 2014-06-19-cdc760c58077f44fc40adbbe41e1556a67c1b9a9
kernel - 3.10.49-1-d11f945ed41eb604ca96e8be8c1c516c
kmod-ath - 3.10.49+2014-05-22-1
kmod-ath9k - 3.10.49+2014-05-22-1
kmod-ath9k-common - 3.10.49+2014-05-22-1
kmod-cfg80211 - 3.10.49+2014-05-22-1
kmod-crypto-aes - 3.10.49-1
kmod-crypto-arc4 - 3.10.49-1
kmod-crypto-core - 3.10.49-1
kmod-fs-vfat - 3.10.49-1
kmod-gpio-button-hotplug - 3.10.49-1
kmod-ip6tables - 3.10.49-1
kmod-ipt-conntrack - 3.10.49-1
kmod-ipt-core - 3.10.49-1
kmod-ipt-nat - 3.10.49-1
kmod-ipt-nathelper - 3.10.49-1
kmod-ipv6 - 3.10.49-1
kmod-lib-crc-ccitt - 3.10.49-1
kmod-mac80211 - 3.10.49+2014-05-22-1
kmod-nls-base - 3.10.49-1
kmod-nls-cp437 - 3.10.49-1
kmod-nls-iso8859-1 - 3.10.49-1
kmod-scsi-core - 3.10.49-1
kmod-usb-core - 3.10.49-1
kmod-usb-ohci - 3.10.49-1
kmod-usb-storage - 3.10.49-1
kmod-usb-uhci - 3.10.49-1
kmod-usb2 - 3.10.49-1
libblobmsg-json - 2014-08-04-dffbc09baf71b294185a36048166d00066d433b5
libc - 0.9.33.2-1
libgcc - 4.8-linaro-1
libip4tc - 1.4.21-1
libip6tc - 1.4.21-1
libiwinfo - 51
libiwinfo-lua - 51
libjson-c - 0.11-2
libjson-script - 2014-08-04-dffbc09baf71b294185a36048166d00066d433b5
liblua - 5.1.5-1
libnl-tiny - 0.1-3
libubox - 2014-08-04-dffbc09baf71b294185a36048166d00066d433b5
libubus - 2014-09-17-4c4f35cf2230d70b9ddd87638ca911e8a563f2f3
libubus-lua - 2014-09-17-4c4f35cf2230d70b9ddd87638ca911e8a563f2f3
libuci - 2014-04-11.1-1
libuci-lua - 2014-04-11.1-1
libxtables - 1.4.21-1
lua - 5.1.5-1
luci - 0.12+svn-r10530-1
luci-app-firewall - 0.12+svn-r10530-1
luci-base - 0.12+git-16.038.38474-0d510b2-1
luci-lib-nixio - 0.12+svn-r10530-1
luci-mod-admin-full - 0.12+git-16.038.38474-0d510b2-1
luci-proto-ppp - 0.12+svn-r10530-1
luci-theme-bootstrap - 0.12+git-16.038.38474-0d510b2-1
mtd - 20
netifd - 2014-09-08.1-46c569989f984226916fec28dd8ef152a664043e
odhcp6c - 2014-12-10-722226c4f1d45c8bf4ac9189523738abcf7d648f
odhcpd - 2014-09-25-a6e2953843eaf6c93764f9feef10466e7a84ec85
opkg - 9c97d5ecd795709c8584e972bfdf3aee3a5b846d-7
procd - 2014-09-15-c1a558f7d0c1e6c1ffa5a47d557a7b45205eef1d
swconfig - 10
uboot-envtools - 2014.04-4
ubox - 2015-02-25.1-31f0ff358b360ee461d845c1b3b5e5d38fa27925
ubus - 2014-09-17-4c4f35cf2230d70b9ddd87638ca911e8a563f2f3
ubusd - 2014-09-17-4c4f35cf2230d70b9ddd87638ca911e8a563f2f3
uci - 2014-04-11.1-1
uhttpd - 2014-08-25-dabd7dea6445aaa0e5b8d9add1872fa7393b3a85
uhttpd-mod-ubus - 2014-08-25-dabd7dea6445aaa0e5b8d9add1872fa7393b3a85
vsftpd - 3.0.2-6
wpad-mini - 2014-06-03.1-3
root@OpenWrt:/#

The discussion might have continued from here.