From patchwork Wed Aug 26 15:48:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Dechesne X-Patchwork-Id: 52731 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by patches.linaro.org (Postfix) with ESMTPS id 8FF5522E9E for ; Wed, 26 Aug 2015 15:49:14 +0000 (UTC) Received: by lbck9 with SMTP id k9sf63547962lbc.0 for ; Wed, 26 Aug 2015 08:49:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :mime-version:content-type:content-transfer-encoding:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list; bh=vCaqjpnun4xWMivKcp7qWJYNC3DJA7P1wfN/mE8uZ5w=; b=L+LvONbcn+fzp2fRRQ1jYQ7xaJmdeSfQki6cCy9wRUQfUtSVhCY7wTgExXmYwICMBE MxpJMNYryEjiTj/0NMGUewb/vJCxHGhPiTHrWEQUQiQ359CJCgeR9k0KlfqOjJFyNEgz IblqAfD9mfoh6qtl1OuwR0cbif2NjYcldigtg+AztxGB5KBb/c1gX8M0GQc7YB8MYBpW B8QJzotRZZy5UvfUu/iNoeGry3BNLy7sq2k8dWTrgGQKDYgq1I9RdFvgmv3OZTSb0kAB Ubv3BIott7IMPL9DIb2WTZxflt2IACitBGPNqfZoFDpImv+D6v8RrXvO5hjs2ZKTProz 4fZg== X-Gm-Message-State: ALoCoQl78e4E67M8DriPUgk3GbI0NzDXY+tR5Y7HnJ44wI5IyuRusog7DjRVW7YRqmUKn/8H2UYq X-Received: by 10.112.167.201 with SMTP id zq9mr10331349lbb.2.1440604153613; Wed, 26 Aug 2015 08:49:13 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.37.137 with SMTP id y9ls733094laj.60.gmail; Wed, 26 Aug 2015 08:49:13 -0700 (PDT) X-Received: by 10.152.21.196 with SMTP id x4mr30880922lae.117.1440604153453; Wed, 26 Aug 2015 08:49:13 -0700 (PDT) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com. [209.85.215.53]) by mx.google.com with ESMTPS id xi9si19061773lbb.4.2015.08.26.08.49.13 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Aug 2015 08:49:13 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) client-ip=209.85.215.53; Received: by labns7 with SMTP id ns7so4700071lab.0 for ; Wed, 26 Aug 2015 08:49:13 -0700 (PDT) X-Received: by 10.112.141.136 with SMTP id ro8mr31336490lbb.88.1440604153350; Wed, 26 Aug 2015 08:49:13 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.162.200 with SMTP id yc8csp4009121lbb; Wed, 26 Aug 2015 08:49:12 -0700 (PDT) X-Received: by 10.66.222.68 with SMTP id qk4mr69257518pac.96.1440604152246; Wed, 26 Aug 2015 08:49:12 -0700 (PDT) Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id kh9si39228624pad.30.2015.08.26.08.49.11; Wed, 26 Aug 2015 08:49:12 -0700 (PDT) Received-SPF: pass (google.com: domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Received: from mail.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id DDE4E76DDB; Wed, 26 Aug 2015 15:49:07 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wi0-f180.google.com (mail-wi0-f180.google.com [209.85.212.180]) by mail.openembedded.org (Postfix) with ESMTP id 50F6176A51 for ; Wed, 26 Aug 2015 15:48:56 +0000 (UTC) Received: by wicja10 with SMTP id ja10so19362210wic.1 for ; Wed, 26 Aug 2015 08:48:56 -0700 (PDT) X-Received: by 10.180.11.176 with SMTP id r16mr13272836wib.87.1440604136586; Wed, 26 Aug 2015 08:48:56 -0700 (PDT) Received: from hackbox.linaro.org ([81.128.185.36]) by smtp.gmail.com with ESMTPSA id ir5sm4457290wjb.23.2015.08.26.08.48.55 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 26 Aug 2015 08:48:56 -0700 (PDT) From: Nicolas Dechesne To: openembedded-core@lists.openembedded.org Date: Wed, 26 Aug 2015 16:48:29 +0100 Message-Id: <1440604110-4306-3-git-send-email-nicolas.dechesne@linaro.org> X-Mailer: git-send-email 2.3.5 In-Reply-To: <1440604110-4306-1-git-send-email-nicolas.dechesne@linaro.org> References: <1440604110-4306-1-git-send-email-nicolas.dechesne@linaro.org> Cc: Nicolas Dechesne Subject: [OE-core] [RFC PATCH 2/2] image_types.bbclass: add support for fastboot image type X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: nicolas.dechesne@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Fastboot images are images that can be flashed using the fastboot protocol implemented in many popular bootloader for SBCs or even real world products (such as Android phones and tablets). This image type was implemented in meta-smartphone, and is being moved in oe-core. Signed-off-by: Nicolas Dechesne --- meta/classes/image_types.bbclass | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass index 8547574..4c53dc9 100644 --- a/meta/classes/image_types.bbclass +++ b/meta/classes/image_types.bbclass @@ -156,6 +156,19 @@ IMAGE_CMD_ubifs = "mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_ EXTRA_IMAGECMD = "" +FASTBOOT_PARTITION_SIZE ?= "16384" + +IMAGE_CMD_ext4.fastboot () { + if [ ${ROOTFS_SIZE} -lt ${FASTBOOT_PARTITION_SIZE} ]; then + make_ext4fs -l `expr ${FASTBOOT_PARTITION_SIZE} \* 1024` \ + ${EXTRA_IMAGECMD} \ + ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext4.fastboot \ + ${IMAGE_ROOTFS} + else + bbfatal "Rootfs is too small for partition (Rootfs Actual Size: ${ROOTFS_SIZE}, Partition size: ${FASTBOOT_PARTITION_SIZE})" + fi +} + inherit siteinfo JFFS2_ENDIANNESS ?= "${@base_conditional('SITEINFO_ENDIANNESS', 'le', '-l', '-b', d)}" JFFS2_ERASEBLOCK ?= "0x40000" @@ -167,6 +180,7 @@ EXTRA_IMAGECMD_ext3 ?= "-i 4096" EXTRA_IMAGECMD_ext4 ?= "-i 4096" EXTRA_IMAGECMD_btrfs ?= "" EXTRA_IMAGECMD_elf ?= "" +EXTRA_IMAGECMD_ext4.fastboot ?= "-s -b 4096" IMAGE_DEPENDS = "" IMAGE_DEPENDS_jffs2 = "mtd-utils-native" @@ -182,6 +196,7 @@ IMAGE_DEPENDS_elf = "virtual/kernel mkelfimage-native" IMAGE_DEPENDS_ubi = "mtd-utils-native" IMAGE_DEPENDS_ubifs = "mtd-utils-native" IMAGE_DEPENDS_multiubi = "mtd-utils-native" +IMAGE_DEPENDS_ext4.fastboot = "android-tools-native" # This variable is available to request which values are suitable for IMAGE_FSTYPES IMAGE_TYPES = " \ @@ -201,6 +216,7 @@ IMAGE_TYPES = " \ vdi \ qcow2 \ elf \ + ext4.fastboot \ " COMPRESSIONTYPES = "gz bz2 lzma xz lz4 sum"