Out of space - my ideas
Posted: Sun Apr 17, 2016 5:26 am
Hi,
I will write my ideas about how to cope with small flash size.
1.
There is a parameter for squashfs called blocksize.
If you increase it (from 256k to 512k or 1024k), filesystem will take less space (few %) but boot time (and access time to noncached files) will increase.
It could be helpful, where there is no other way to reduce used space for filesystem - for example on 4MB-flash routers.
Replace
CONFIG_TARGET_SQUASHFS_BLOCK_SIZE=256
with
CONFIG_TARGET_SQUASHFS_BLOCK_SIZE=1024
in target/(...)/config file.
2.
I also think, that CONFIG_PACKAGE_wireless-tools=y is not used anymore - am I right?
3.
Settings for kernel could be tweaked,
Replace:
CONFIG_KERNEL_KALLSYMS=y
CONFIG_KERNEL_DEBUG_KERNEL=y
CONFIG_KERNEL_DEBUG_INFO=y
# CONFIG_STRIP_KERNEL_EXPORTS is not set
with:
# CONFIG_KERNEL_KALLSYMS is not set
# CONFIG_KERNEL_DEBUG_KERNEL is not set
# CONFIG_KERNEL_DEBUG_INFO is not set
CONFIG_STRIP_KERNEL_EXPORTS=y
It should be done only on production releases (not beta), as all kernel crashes/warns will not include symbols - crash dumps would be undebuggable.
CONFIG_STRIP_KERNEL_EXPORTS is worth to mention:
It could (probably will) make impossible to load OpenWRT modules for hardware not included in Gargoyle build. But it is that way now (OpenWRT has other kernel version).
4.
And there is similar setting for userspace - CONFIG_USE_MKLIBS. If you enable it, you will be not able to run (probable most of) the OpenWRT software (packages from their official repos); and only the build packages could be installed (so you will get only Gargoyle repo usable).
You could save lot of space.. that's the way Tomato firmwares could include OpenVPN on 4MB-builds.
Replace
# CONFIG_USE_MKLIBS is not set
with
CONFIG_USE_MKLIBS=y
5.
For VPN builds, you can disable cyassl and let everything use OpenSSL.
---
I am sure that 1, 2, 5, of my points can be safely enabled.
You can also use point 3 for production builds (1.10 etc.)
I will write my ideas about how to cope with small flash size.
1.
There is a parameter for squashfs called blocksize.
If you increase it (from 256k to 512k or 1024k), filesystem will take less space (few %) but boot time (and access time to noncached files) will increase.
It could be helpful, where there is no other way to reduce used space for filesystem - for example on 4MB-flash routers.
Replace
CONFIG_TARGET_SQUASHFS_BLOCK_SIZE=256
with
CONFIG_TARGET_SQUASHFS_BLOCK_SIZE=1024
in target/(...)/config file.
2.
I also think, that CONFIG_PACKAGE_wireless-tools=y is not used anymore - am I right?
3.
Settings for kernel could be tweaked,
Replace:
CONFIG_KERNEL_KALLSYMS=y
CONFIG_KERNEL_DEBUG_KERNEL=y
CONFIG_KERNEL_DEBUG_INFO=y
# CONFIG_STRIP_KERNEL_EXPORTS is not set
with:
# CONFIG_KERNEL_KALLSYMS is not set
# CONFIG_KERNEL_DEBUG_KERNEL is not set
# CONFIG_KERNEL_DEBUG_INFO is not set
CONFIG_STRIP_KERNEL_EXPORTS=y
It should be done only on production releases (not beta), as all kernel crashes/warns will not include symbols - crash dumps would be undebuggable.
CONFIG_STRIP_KERNEL_EXPORTS is worth to mention:
It could (probably will) make impossible to load OpenWRT modules for hardware not included in Gargoyle build. But it is that way now (OpenWRT has other kernel version).
4.
And there is similar setting for userspace - CONFIG_USE_MKLIBS. If you enable it, you will be not able to run (probable most of) the OpenWRT software (packages from their official repos); and only the build packages could be installed (so you will get only Gargoyle repo usable).
You could save lot of space.. that's the way Tomato firmwares could include OpenVPN on 4MB-builds.
Replace
# CONFIG_USE_MKLIBS is not set
with
CONFIG_USE_MKLIBS=y
5.
For VPN builds, you can disable cyassl and let everything use OpenSSL.
---
I am sure that 1, 2, 5, of my points can be safely enabled.
You can also use point 3 for production builds (1.10 etc.)