From patchwork Mon Jul 9 17:09:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Maclean X-Patchwork-Id: 941469 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=monkeh.net Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="gREmgk0K"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41PWzD60sSz9rxs for ; Tue, 10 Jul 2018 03:09:42 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:Message-Id:Date:To: From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=3x3itR49cVX6Zwaby8dJoQiMdzi94cqsQeNtQOiadHg=; b=gREmgk0K19GEgr WOOOSNzISvoG46UPzKdzyV3eqqMkOLcHvtyO64YWcPA9f8UQ6iMqgMLiJ46nv4vZiiFpLj15xCqEc F4+7ehKzbIN7pi4EKtymWF8oCb0Xu0Y0lPAWPuL2JzpL0pEx3JVyBF1iU7F5+OlnEFcpJQy836wlG kIcHtZQk/8u629DS7MGeMgTYcvAHHOdcrnas4Tjt8FWEgDio78eE2Aa3pL9Y+Fm432omw53xeoBx+ FQg1b7In+6kP87imNbMvbygMaR0uBYD2qy7gItfR8zkHDoQlfOSFkLGB9k9k6eew7YAanIVgIaA8E UcMbhiJnztYEvF6bhX8g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fcZfP-0004ws-I7; Mon, 09 Jul 2018 17:09:39 +0000 Received: from monkeh.net ([88.97.98.50] helo=mail.monkeh.net) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fcZfL-0004v8-Vi for openwrt-devel@lists.openwrt.org; Mon, 09 Jul 2018 17:09:37 +0000 Received: from terra.home.monkeh.net (unknown [172.16.0.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: monkeh@monkeh.net) by mail.monkeh.net (Postfix) with ESMTPSA id 9FE3B30B586 for ; Mon, 9 Jul 2018 17:09:18 +0000 (UTC) From: Alex Maclean To: openwrt-devel@lists.openwrt.org Date: Mon, 9 Jul 2018 18:09:05 +0100 Message-Id: <20180709170905.10605-1-monkeh@monkeh.net> X-Mailer: git-send-email 2.18.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180709_100936_316783_DC57DE95 X-CRM114-Status: GOOD ( 11.41 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record Subject: [OpenWrt-Devel] [PATCH v2] config: extend small_flash feature X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Extend the small_flash feature to disable swap, core dumps, and kernel debug info, and change the squashfs block size to 1024KiB. Also change squashfs fragment cache to 2 for small_flash to ease memory usage. Signed-off-by: Alex Maclean --- config/Config-images.in | 1 + config/Config-kernel.in | 11 ++++++++--- target/linux/generic/config-3.18 | 2 +- target/linux/generic/config-4.14 | 2 +- target/linux/generic/config-4.9 | 2 +- 5 files changed, 12 insertions(+), 6 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 d2d1909956..4edccebea3 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" @@ -133,7 +133,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. @@ -226,7 +226,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" @@ -806,3 +806,8 @@ config KERNEL_DEVKMEM Say Y here if you want to support the /dev/kmem device. The /dev/kmem device is rarely used, but can be used for certain kind of kernel debugging operations. + +config KERNEL_SQUASHFS_FRAGMENT_CACHE_SIZE + int "Number of squashfs fragments cached" + default 2 if (SMALL_FLASH && !LOW_MEMORY_FOOTPRINT) + default 3 diff --git a/target/linux/generic/config-3.18 b/target/linux/generic/config-3.18 index 0f66960fdc..41f68cd582 100644 --- a/target/linux/generic/config-3.18 +++ b/target/linux/generic/config-3.18 @@ -3817,7 +3817,7 @@ CONFIG_SQUASHFS=y # CONFIG_SQUASHFS_DECOMP_MULTI is not set CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y # CONFIG_SQUASHFS_DECOMP_SINGLE is not set -# CONFIG_SQUASHFS_EMBEDDED is not set +CONFIG_SQUASHFS_EMBEDDED=y # CONFIG_SQUASHFS_FILE_CACHE is not set CONFIG_SQUASHFS_FILE_DIRECT=y CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 diff --git a/target/linux/generic/config-4.14 b/target/linux/generic/config-4.14 index 3ed2fed7a6..6843ef3a56 100644 --- a/target/linux/generic/config-4.14 +++ b/target/linux/generic/config-4.14 @@ -4685,7 +4685,7 @@ CONFIG_SQUASHFS=y # CONFIG_SQUASHFS_DECOMP_MULTI is not set CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y # CONFIG_SQUASHFS_DECOMP_SINGLE is not set -# CONFIG_SQUASHFS_EMBEDDED is not set +CONFIG_SQUASHFS_EMBEDDED=y # CONFIG_SQUASHFS_FILE_CACHE is not set CONFIG_SQUASHFS_FILE_DIRECT=y CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 diff --git a/target/linux/generic/config-4.9 b/target/linux/generic/config-4.9 index 83abfdc8ff..e7cf5e4361 100644 --- a/target/linux/generic/config-4.9 +++ b/target/linux/generic/config-4.9 @@ -4403,7 +4403,7 @@ CONFIG_SQUASHFS=y # CONFIG_SQUASHFS_DECOMP_MULTI is not set CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y # CONFIG_SQUASHFS_DECOMP_SINGLE is not set -# CONFIG_SQUASHFS_EMBEDDED is not set +CONFIG_SQUASHFS_EMBEDDED=y # CONFIG_SQUASHFS_FILE_CACHE is not set CONFIG_SQUASHFS_FILE_DIRECT=y CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3