From patchwork Thu Mar 21 18:57:21 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: 1060392 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="cuMlVem3"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=o2.pl header.i=@o2.pl header.b="UxnTcZWV"; 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 44QGHC52p0z9sQr for ; Fri, 22 Mar 2019 05:56:55 +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=cuMlVem3ma4QW+YQ6WlK9G3vBv e9e+UziqYjh0UYyjiLBnaLDnb/leg9Y83gXgyJ9TDdU+PJPA2SstwL1VgE1QTccDMN1NY5zqhMEPt 9sPhnSFluBOrVa94KCja0ICdzL8EpKngOGl2d0tdUqwdPIpI+nw6vsExafjP0wbc5SETjSDHB70Ot L6X4npCrKNL03MyLvdrEbl+p+CsWxUtpAFVATvRj3q88JOMPhdni1k7TpaEgvk1C8QaxnTZj8Gb7T 1fAnbPk1End44l1zRrvKGx+Rs4feEmYHjIUNaFVcaCk0ZqgmF2o1TfUcKNvlyozaTQmjxVohKXS/6 jY9rskAw==; 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 1h72rq-0003j6-CO; Thu, 21 Mar 2019 18:56:42 +0000 Received: from mx-out.tlen.pl ([193.222.135.175]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h72re-0003Wr-NZ for openwrt-devel@lists.openwrt.org; Thu, 21 Mar 2019 18:56:32 +0000 Received: (wp-smtpd smtp.tlen.pl 15965 invoked from network); 21 Mar 2019 19:56:27 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=o2.pl; s=1024a; t=1553194587; bh=MqnicftRN1gr8UacJyyBbd0TgV2GTXsuh7DHRB2JqpY=; h=From:To:Subject; b=UxnTcZWVok44aACtXCtKhVF5h3DImDy/6ujQwpBynyfDaGvOVeod7ZAyIALnYvMd+ mgjoCcfsFtHQtsRxEQs/bzfwJsrk0UrtUMxsI8TF4tO2rodvodhThYDqRCG5Vv7xwB YmIdymmWDJnSH5Rev3IF5/ICRx7Jf8Vhp023EXc8= 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 ; 21 Mar 2019 19:56:27 +0100 From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Date: Thu, 21 Mar 2019 19:57:21 +0100 Message-Id: <20190321185727.3239-2-tomek_n@o2.pl> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190321185727.3239-1-tomek_n@o2.pl> References: <20190321185727.3239-1-tomek_n@o2.pl> MIME-Version: 1.0 X-WP-MailID: 3a00b8c1389a79b7ce056bc33f445c1f X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000000 [geM0] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190321_115630_925855_D5EAE8B6 X-CRM114-Status: UNSURE ( 7.10 ) 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 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [193.222.135.175 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tomek_n[at]o2.pl) -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 -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain Subject: [OpenWrt-Devel] [PATCH 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