From patchwork Mon Apr 16 20:32:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Protsenko X-Patchwork-Id: 133492 Delivered-To: patch@linaro.org Received: by 10.46.84.18 with SMTP id i18csp3971527ljb; Mon, 16 Apr 2018 13:32:38 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/3Ey8qeASQZOQk8khQI61V8ASk1xIad7YmdsrC+M4aMu0TYHAEgAJCSte6b+RKKrxCIcXn X-Received: by 10.80.148.75 with SMTP id q11mr12141312eda.70.1523910758735; Mon, 16 Apr 2018 13:32:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523910758; cv=none; d=google.com; s=arc-20160816; b=z/BsCtYiqDGfzsha84XMQnLSdpfqpE6RHplQHpY4+EUo7vokIUZ8VrxUph+ElwKqEp L5Tv1vxZk6W2M+wTNYv32wWSpD+4y0KA4usiBGN9QkR7AW8uxTu8wpAi3NwqwcjODRPH OgChnM0Xb39TOm6q14BR1Nh2z9NkOa+bfUC+xZkAdE8LWLwBjC6qBcR1vocqWbBXB6vQ p22hVZL7Pjupt5loCZRbeQgJ+HGQStgdxH0x6JNHPfKIuYt2VqX642nQChQrNbnkW2sa Ko+rEJp1OqeXR+zABLjT1E8rjMKpBxg5Y1YtP8kYoWrq+B3Jkj/cyWsonioKLpWXN2qb QkcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:message-id:date:to:from :dkim-signature:arc-authentication-results; bh=RRzMeENI9i/7fTbsZKe/9EcFHjCROnuL74022FrLPmQ=; b=Cu13iR8j0y+GsM+fqblfCgUtZAEjl5VY0Yj9GPSz3zGZVWNfl6jvvNGUQ0lqlcDKC8 1yBEEtzubBe+zMEJqaDAk2XUSSPz5v7yLFl6bB7AEJMveWDojWXOOC4GusHfTB0eXFGQ 11s9C7YUfp1cN2gP7XBQnOcOu/1wZGPkdDHd8Uw0LUNWiTFUvadVRGnIc5Eh9JgX/ZnP PeYzfIfM0E0qnDknb0U1Bgy6ZRAEom7kFtcc1gfkqdlZ+9rJyw8fLjDCr0Xy/Csmv29Q Fz/MdLpoT7/IBB5J08Yw4F8GByJb+bfYh9m2VFbp5YooJ03vYXq3Z5tm+p7EPtr1jFyg E3zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=jsxz62vN; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id r14si5377160edm.281.2018.04.16.13.32.37; Mon, 16 Apr 2018 13:32:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=jsxz62vN; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id 9B66EC21E36; Mon, 16 Apr 2018 20:32:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id E2670C21D74; Mon, 16 Apr 2018 20:32:34 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id F3E97C21DB5; Mon, 16 Apr 2018 20:32:32 +0000 (UTC) Received: from mail-lf0-f47.google.com (mail-lf0-f47.google.com [209.85.215.47]) by lists.denx.de (Postfix) with ESMTPS id CA123C21D4A for ; Mon, 16 Apr 2018 20:32:31 +0000 (UTC) Received: by mail-lf0-f47.google.com with SMTP id j68-v6so24032698lfg.13 for ; Mon, 16 Apr 2018 13:32:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=7foFZcmSM3Op3KUKsD+eyucI8+pakCb1AhzKY7ZqeMI=; b=jsxz62vNVT4iy1Sdsk7qFS/IV4XuTgTBK8N1wru2Ryf0/ifdnHCW8ACikNtzN7TS5z /HXTVhyDv+F/PPPdFKLJzon709fF4wxpqd6WqvPf/jt8B9nCgBR2ZR80PTJawczY9u78 9zDK6npQOegtlLKUa6HKru6Kf8qTvNw3muXDs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=7foFZcmSM3Op3KUKsD+eyucI8+pakCb1AhzKY7ZqeMI=; b=ITgVUrUffHIKvZRZOYAJMf9rX5USEOeEzLmppiSVq1VrI1eKn1yyS8hAdvlV97KtQ/ Hryd1Zk/WHs2btPK8fKA2sBMUCXZy1eeTAodEvRDl8usEUXDmfbooI63l+f5Vgv4BejD ATH218kM6p1t3Yyncjt3M6Erk+Nya3EEe6X9+mu9L8JxsCS1asOJ4fGoDsh3TxUjYjyv 2BOS+hliIZOl+91TOfiesz7GFtGRQTUG/pSXbbnXLZOZMX/R71wnAkKvdSThUMH2njGk q3tTlb/SiHNNFexALBV0M1nYCUHXLl5fR7sudL3CxFy1yTtAqazAtt/ura44dlqqRHKW LlBA== X-Gm-Message-State: ALQs6tB2wmPauzQoorIj6bU5uE4RrB7h9Jx/p6lhtLTTJGxLXUQWiCVY USwJbEpTau42t9y4MurI+xLVDREfK+k= X-Received: by 2002:a19:a949:: with SMTP id s70-v6mr14994647lfe.53.1523910750763; Mon, 16 Apr 2018 13:32:30 -0700 (PDT) Received: from localhost ([195.238.92.132]) by smtp.gmail.com with ESMTPSA id f24sm2266777ljj.76.2018.04.16.13.32.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Apr 2018 13:32:29 -0700 (PDT) From: Sam Protsenko To: u-boot@lists.denx.de Date: Mon, 16 Apr 2018 23:32:22 +0300 Message-Id: <20180416203227.26523-1-semen.protsenko@linaro.org> X-Mailer: git-send-email 2.17.0 Cc: Amit Pundir , Tom Rini , Praneeth Bajjuri , John Stultz , Sumit Semwal Subject: [U-Boot] [PATCH 0/5] Use Android DT image format for TI boards X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Android documentation recommends using new image format for storing dtb and dtbo files: [1]. Using that format, we can pack several dtb files to dtb.img, and also pack several dtbo files to dtbo.img. Then those images should be flashed to eMMC partitions, called "dtb" and "dtbo" respectively. This patch series introduces support for mentioned Android DT image format, adds "dtimg" command to deal with that image format from U-Boot shell, and provides new Android boot scheme to TI boards (AM57x and DRA7 boards). So with this patch series we will have next procedure for Android boot: 1. Read next images from eMMC partitions to RAM: - boot.img - dtb.img - dtbo.img 2. Take addresses of desired dtb/dtbo files from that images (for current board) 3. Apply dtbo overlays to main dtb, if needed 4. Boot the kernel from Android boot image, using resulting dtb It was tested on X15 and AM57x EVM boards. [1] https://source.android.com/devices/architecture/dto/partitions Sam Protsenko (5): common: Add support for Android DT image cmd: Add dtimg command arm: ti: boot: Extract PARTS_DEFAULT to boot.h arm: ti: boot: Add dtbo partition for Android boot arm: ti: boot: Implement Android boot using DT image format board/ti/common/Kconfig | 1 + cmd/Kconfig | 8 ++ cmd/Makefile | 1 + cmd/dtimg.c | 142 ++++++++++++++++++++++++++++++ common/Makefile | 4 + common/image-android-dt.c | 134 ++++++++++++++++++++++++++++ configs/am57xx_evm_defconfig | 1 + configs/am57xx_hs_evm_defconfig | 1 + configs/dra7xx_evm_defconfig | 1 + configs/dra7xx_hs_evm_defconfig | 1 + include/configs/am57xx_evm.h | 25 ------ include/configs/cl-som-am57x.h | 2 + include/configs/cm_t54.h | 2 + include/configs/dra7xx_evm.h | 25 ------ include/configs/ti_armv7_common.h | 1 + include/dt_table.h | 46 ++++++++++ include/environment/ti/boot.h | 68 ++++++++++++-- include/image-android-dt.h | 18 ++++ 18 files changed, 422 insertions(+), 59 deletions(-) create mode 100644 cmd/dtimg.c create mode 100644 common/image-android-dt.c create mode 100644 include/dt_table.h create mode 100644 include/image-android-dt.h