[OpenWrt-Devel] [PATCH] config: extend small_flash feature
Alex Maclean
monkeh at monkeh.net
Wed May 30 09:21:37 EDT 2018
Extend the small_flash feature to disable swap, core dumps, and
kernel debug info, and change the squashfs block size to 1024KiB.
This saves approximately 18K in the kernel image on ath79, and 64K in
the rootfs.
Signed-off-by: Alex Maclean <monkeh at monkeh.net>
---
config/Config-images.in | 1 +
config/Config-kernel.in | 6 +++---
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/config/Config-images.in b/config/Config-images.in
index 90e873edb8..07ef619e70 100644
--- a/config/Config-images.in
+++ b/config/Config-images.in
@@ -149,6 +149,7 @@ menu "Target Images"
int "Block size (in KiB)"
depends on TARGET_ROOTFS_SQUASHFS
default 64 if LOW_MEMORY_FOOTPRINT
+ default 1024 if (SMALL_FLASH && !LOW_MEMORY_FOOTPRINT)
default 256
menuconfig TARGET_ROOTFS_UBIFS
diff --git a/config/Config-kernel.in b/config/Config-kernel.in
index 0cbe5e8351..8eb954e1a5 100644
--- a/config/Config-kernel.in
+++ b/config/Config-kernel.in
@@ -31,7 +31,7 @@ config KERNEL_CRASHLOG
config KERNEL_SWAP
bool "Support for paging of anonymous memory (swap)"
- default y
+ default y if !SMALL_FLASH
config KERNEL_DEBUG_FS
bool "Compile the kernel with debug filesystem enabled"
@@ -112,7 +112,7 @@ config KERNEL_DEBUG_KERNEL
config KERNEL_DEBUG_INFO
bool "Compile the kernel with debug information"
- default y
+ default y if !SMALL_FLASH
select KERNEL_DEBUG_KERNEL
help
This will compile your kernel and modules with debug information.
@@ -205,7 +205,7 @@ config KERNEL_COREDUMP
config KERNEL_ELF_CORE
bool "Enable process core dump support"
select KERNEL_COREDUMP
- default y
+ default y if !SMALL_FLASH
config KERNEL_PROVE_LOCKING
bool "Enable kernel lock checking"
--
2.17.0
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list