From patchwork Wed Feb 4 14:37:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 436355 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 8B4E1140172 for ; Thu, 5 Feb 2015 01:45:10 +1100 (AEDT) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 1372028BFD1; Wed, 4 Feb 2015 15:39:56 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 4C7E628BF4C for ; Wed, 4 Feb 2015 15:38:58 +0100 (CET) X-policyd-weight: using cached result; rate:hard: -4.2 Received: from mail.free-electrons.com (down.free-electrons.com [37.187.137.238]) by arrakis.dune.hu (Postfix) with ESMTP for ; Wed, 4 Feb 2015 15:38:53 +0100 (CET) Received: by mail.free-electrons.com (Postfix, from userid 106) id 27B2B897; Wed, 4 Feb 2015 15:41:31 +0100 (CET) Received: from localhost (col31-4-88-188-83-94.fbx.proxad.net [88.188.83.94]) by mail.free-electrons.com (Postfix) with ESMTPSA id 0DD38602; Wed, 4 Feb 2015 15:40:11 +0100 (CET) From: Maxime Ripard To: Florian Fainelli , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Luka Perkov , Imre Kaloz Date: Wed, 4 Feb 2015 15:37:03 +0100 Message-Id: <1423060626-17088-6-git-send-email-maxime.ripard@free-electrons.com> X-Mailer: git-send-email 2.2.2 In-Reply-To: <1423060626-17088-1-git-send-email-maxime.ripard@free-electrons.com> References: <1423060626-17088-1-git-send-email-maxime.ripard@free-electrons.com> Cc: Thomas Petazzoni , openwrt-devel@lists.openwrt.org, Sudhakar Gundubogula Subject: [OpenWrt-Devel] [PATCH v2 5/8] mvebu: Add a subprofile for boards based on a small NOR X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" Some boards only come with a small NOR on it, where UBI isn't a good solution because of its overhead. Add a new subprofile for such boards, that rely on the mtd split framework instead. Signed-off-by: Maxime Ripard --- target/linux/mvebu/image/Makefile | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/target/linux/mvebu/image/Makefile b/target/linux/mvebu/image/Makefile index 7076e876e06c..a8fc4de134f8 100644 --- a/target/linux/mvebu/image/Makefile +++ b/target/linux/mvebu/image/Makefile @@ -77,6 +77,31 @@ define UBINORProfile endef # $(1): Profile Name +# $(2): DTB Name +# $(3): Erase Block Size +define NORProfile + define Image/BuildKernel/Profile/$(1) + $(call Image/Build/DTB,$(2)) + ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) + $(call Image/Build/Profile,$(1)/Initramfs) + endif + endef + + define Image/Build/Profile/$(1)/Initramfs + $(call Image/Build/DTB,$(2),-initramfs) + endef + + define Image/Build/Profile/$(1)/squashfs + ( \ + dd if=$(KDIR)/uImage-$(2) bs=$(3) conv=sync; \ + dd if=$(KDIR)/root.squashfs bs=$(3) conv=sync; \ + ) > $$(BIN_DIR)/$$(IMG_PREFIX)-$(2)-squashfs-firmware.bin + endef + + PROFILES_LIST += $(1) +endef + +# $(1): Profile Name # $(2): Sub Profiles list define MultiProfile define Image/BuildKernel/Profile/$(1)