From patchwork Thu Mar 28 17:07:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Maciej Nowak X-Patchwork-Id: 1068470 X-Patchwork-Delegate: hauke@hauke-m.de 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=fail (p=none dis=none) header.from=o2.pl Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="TDe1aAH7"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=o2.pl header.i=@o2.pl header.b="SxOjbA6r"; 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 44VWV21RmHz9sNq for ; Fri, 29 Mar 2019 04:06:02 +1100 (AEDT) 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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:References: In-Reply-To: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:List-Owner; bh=IKEdRws6Sj0X4YvUKnRzqCYegsj1cAHRzJLIgb7LWNI=; b=TDe1aAH7bC1g/Ls2rK7wR3pIdV M0c/hU61Z/Usxz87Fydd/m7LBnXw+ACk+HJlZdNtGxSjXT/6X9ck07gXwKc0rILH/Ze40NGUe1poZ NC6/ZekVIiqYovDPKpgN3cvPYL3KikubuUQQE9tmA+H+fhQQc40zfSWAhUsez6atX6IPMzv/pOkGZ UgueDF9+/obFOlgF/mu4Xu5CxRRYsC2qZ//BFpkLS+XLNPS9n0u8fBh1YI22bj+9fDus5fIzPlUo6 S7KGd5i2AcMoMmE6SEyyJ+NPGZOd76B+A6FH2dRIXyh6sCA3c9X23wYJOoqcKnooAuzev0ENyutJg +JU4dvAg==; 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 1h9YTH-0000ts-L5; Thu, 28 Mar 2019 17:05:43 +0000 Received: from mx-out.tlen.pl ([193.222.135.158]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h9YT2-0000fa-Lj for openwrt-devel@lists.openwrt.org; Thu, 28 Mar 2019 17:05:32 +0000 Received: (wp-smtpd smtp.tlen.pl 18960 invoked from network); 28 Mar 2019 18:05:26 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=o2.pl; s=1024a; t=1553792726; bh=MqnicftRN1gr8UacJyyBbd0TgV2GTXsuh7DHRB2JqpY=; h=From:To:Subject; b=SxOjbA6r4rRszQD72c20H1O0KsxGcKiqpgxXZi9HEJqfVOpoqFL2ZHKcSDFvAIuAq cdIA/cCgcwJ0dHI2Emllpglpj0az8AcOCWnAxMX86vYmuUiYDMA4M6v1pU2WOerXLD L5Im5V4Yia/MBdMyig/TRNgAFTfYZW4+91ugyHcY= Received: from 131.ip-164-132-48.eu (HELO localhost.localdomain) (tomek_n@o2.pl@[164.132.48.131]) (envelope-sender ) by smtp.tlen.pl (WP-SMTPD) with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP for ; 28 Mar 2019 18:05:26 +0100 From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Date: Thu, 28 Mar 2019 18:07:05 +0100 Message-Id: <20190328170711.3564-2-tomek_n@o2.pl> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190328170711.3564-1-tomek_n@o2.pl> References: <20190321185727.3239-1-tomek_n@o2.pl> <20190328170711.3564-1-tomek_n@o2.pl> MIME-Version: 1.0 X-WP-MailID: 4024e456cbe9711ef7d488b960523a1d X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000000 [YRNE] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190328_100528_872048_3D5D2CA8 X-CRM114-Status: UNSURE ( 7.02 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tomek_n[at]o2.pl) -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid Subject: [OpenWrt-Devel] [PATCH v2 1/7] mvebu: make bootfs size for sdcard image configurable 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: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Let's take this oportunity to implement boot-part and rootfs-part feature flags. Signed-off-by: Tomasz Maciej Nowak --- config/Config-images.in | 2 +- target/linux/mvebu/Makefile | 2 +- target/linux/mvebu/image/Makefile | 16 ++++++---------- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/config/Config-images.in b/config/Config-images.in index 6610601d55..9daaf74915 100644 --- a/config/Config-images.in +++ b/config/Config-images.in @@ -272,7 +272,7 @@ menu "Target Images" config TARGET_ROOTFS_PARTSIZE int "Root filesystem partition size (in MB)" - depends on GRUB_IMAGES || USES_ROOTFS_PART || TARGET_ROOTFS_EXT4FS || TARGET_mvebu || TARGET_omap || TARGET_rb532 || TARGET_sunxi || TARGET_uml + depends on GRUB_IMAGES || USES_ROOTFS_PART || TARGET_ROOTFS_EXT4FS || TARGET_omap || TARGET_rb532 || TARGET_sunxi || TARGET_uml default 256 help Select the root filesystem partition size. diff --git a/target/linux/mvebu/Makefile b/target/linux/mvebu/Makefile index ee76c0b776..a920f6db7d 100644 --- a/target/linux/mvebu/Makefile +++ b/target/linux/mvebu/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk BOARD:=mvebu BOARDNAME:=Marvell EBU Armada -FEATURES:=fpu usb pci pcie gpio nand squashfs ramdisk +FEATURES:=fpu usb pci pcie gpio nand squashfs ramdisk boot-part rootfs-part SUBTARGETS:=cortexa9 cortexa53 cortexa72 MAINTAINER:=Imre Kaloz diff --git a/target/linux/mvebu/image/Makefile b/target/linux/mvebu/image/Makefile index be01623e86..88790777d9 100644 --- a/target/linux/mvebu/image/Makefile +++ b/target/linux/mvebu/image/Makefile @@ -19,12 +19,6 @@ define Build/dtb $(call Image/BuildDTB,$(DTS_DIR)/$(DEVICE_DTS).dts,$@.dtb) endef -# SD-Card Images: -# these values are optimized for a 4GB labeled sdcard that actually holds 7744512 sectors of 512 byte -# MBR: 2048 sectors -# Partition 1: 32768 sectors -# Partition 2: 98304 sectors (configurable) - define Build/boot-scr rm -f $@-boot.scr sed -e 's#@ROOT@#$(SIGNATURE)#g' \ @@ -34,7 +28,7 @@ endef define Build/boot-img rm -f $@.boot - mkfs.fat -C $@.boot 16384 + mkfs.fat -C $@.boot $$(( $(CONFIG_TARGET_KERNEL_PARTSIZE) * 1024 )) $(foreach dts,$(DEVICE_DTS), mcopy -i $@.boot $(DTS_DIR)/$(dts).dtb ::$(dts).dtb;) mcopy -i $@.boot $(IMAGE_KERNEL) ::$(KERNEL_NAME) -mcopy -i $@.boot $@-boot.scr ::boot.scr @@ -46,26 +40,28 @@ define Build/boot-img-ext4 $(foreach dts,$(DEVICE_DTS), $(CP) $(DTS_DIR)/$(dts).dtb $@.boot;) $(CP) $(IMAGE_KERNEL) $@.boot/$(KERNEL_NAME) -$(CP) $@-boot.scr $@.boot/boot.scr - make_ext4fs -J -l 16384K $@.bootimg $@.boot + make_ext4fs -J -l $(CONFIG_TARGET_KERNEL_PARTSIZE)M $@.bootimg $@.boot endef define Build/sdcard-img if [ -n "$(UBOOT)" ]; then UBOOT="$(STAGING_DIR_IMAGE)/$(UBOOT)"; fi; \ + BOOTFS_SIZE=$$(( $(CONFIG_TARGET_KERNEL_PARTSIZE) * 1024 * 2 )); \ ROOTFS_SIZE=$$(( $(CONFIG_TARGET_ROOTFS_PARTSIZE) * 1024 * 2 )); \ SIGNATURE="$(SIGNATURE)" \ ./gen_mvebu_sdcard_img.sh $@ \ $$UBOOT \ - c 32768 $@.boot \ + c $$BOOTFS_SIZE $@.boot \ 83 $$ROOTFS_SIZE $(IMAGE_ROOTFS) endef define Build/sdcard-img-ext4 if [ -n "$(UBOOT)" ]; then UBOOT="$(STAGING_DIR_IMAGE)/$(UBOOT)"; fi; \ + BOOTFS_SIZE=$$(( $(CONFIG_TARGET_KERNEL_PARTSIZE) * 1024 * 2 )); \ ROOTFS_SIZE=$$(( $(CONFIG_TARGET_ROOTFS_PARTSIZE) * 1024 * 2 )); \ SIGNATURE="$(SIGNATURE)" \ ./gen_mvebu_sdcard_img.sh $@ \ $$UBOOT \ - 83 32768 $@.bootimg \ + 83 $$BOOTFS_SIZE $@.bootimg \ 83 $$ROOTFS_SIZE $(IMAGE_ROOTFS) endef