From patchwork Fri Jan 8 10:33:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeffy Chen X-Patchwork-Id: 7984141 Return-Path: X-Original-To: patchwork-linux-rockchip@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id BD7A4BEEE5 for ; Fri, 8 Jan 2016 10:34:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DF27B20122 for ; Fri, 8 Jan 2016 10:34:01 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0ABCA20120 for ; Fri, 8 Jan 2016 10:34:01 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aHUMq-00030M-JQ; Fri, 08 Jan 2016 10:34:00 +0000 Received: from regular1.263xmail.com ([211.150.99.132]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aHUMn-0002t7-On for linux-rockchip@lists.infradead.org; Fri, 08 Jan 2016 10:33:59 +0000 Received: from jeffy.chen?rock-chips.com (unknown [192.168.167.105]) by regular1.263xmail.com (Postfix) with SMTP id 52E9B9022; Fri, 8 Jan 2016 18:33:31 +0800 (CST) X-263anti-spam: KSV:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 4 X-ADDR-CHECKED: 0 Received: from mae.263xmail.com (unknown [121.42.206.105]) by smtp.263.net (Postfix) with ESMTP id F32671FD65; Fri, 8 Jan 2016 18:33:27 +0800 (CST) Received: from cjf?rock-chips.com (localhost [127.0.0.1]) by mae.263xmail.com (Postfix) with SMTP id 957F51AB3A9; Fri, 8 Jan 2016 18:33:32 +0800 (CST) X-MAE-MAIL_UID: 00568f907c085d77@maes@4032e3b633d17df8 X-MAE-ID: 139.129.105.77 X-RL-SENDER: jeffy.chen@rock-chips.com X-LOGIN-NAME: jeffy.chen@rock-chips.com X-SENDER-IP: 58.22.7.114 X-SENDER: cjf@rock-chips.com From: Jeffy Chen To: u-boot@lists.denx.de Subject: [PATCH v2 5/6] rockchip: kylin: Enable boot with android boot image Date: Fri, 8 Jan 2016 18:33:31 +0800 Message-Id: <1452249212-25183-6-git-send-email-jeffy.chen@rock-chips.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1452249212-25183-1-git-send-email-jeffy.chen@rock-chips.com> References: <1452249212-25183-1-git-send-email-jeffy.chen@rock-chips.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160108_023358_810372_F14B93CA X-CRM114-Status: UNSURE ( 4.70 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-rockchip@lists.infradead.org, sjg@chromium.org, Jeffy Chen , huang lin MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The android kernel is using appended dtb by default, and store ramdisk right after kernel & dtb. So we needs to relocate ramdisk, and use atags to pass params. Signed-off-by: Jeffy Chen Acked-by: Simon Glass --- Changes in v2: None include/configs/kylin_rk3036.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/include/configs/kylin_rk3036.h b/include/configs/kylin_rk3036.h index b750b26..49997ec 100644 --- a/include/configs/kylin_rk3036.h +++ b/include/configs/kylin_rk3036.h @@ -35,6 +35,29 @@ #undef CONFIG_EXTRA_ENV_SETTINGS #define CONFIG_EXTRA_ENV_SETTINGS \ "partitions=" PARTS_DEFAULT \ + "mmcdev=0\0" \ + "mmcpart=5\0" \ + "loadaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ + +#define CONFIG_ANDROID_BOOT_IMAGE +#define CONFIG_SYS_BOOT_RAMDISK_HIGH +#define CONFIG_SYS_HUSH_PARSER + +#undef CONFIG_BOOTCOMMAND +#define CONFIG_BOOTCOMMAND \ + "mmc dev ${mmcdev}; if mmc rescan; then " \ + "part start mmc ${mmcdev} ${mmcpart} boot_start;" \ + "part size mmc ${mmcdev} ${mmcpart} boot_size;" \ + "mmc read ${loadaddr} ${boot_start} ${boot_size};" \ + "bootm start ${loadaddr}; bootm ramdisk;" \ + "bootm prep; bootm go;" \ + "fi;" \ + +/* Enable atags */ +#define CONFIG_SYS_BOOTPARAMS_LEN (64*1024) +#define CONFIG_INITRD_TAG +#define CONFIG_SETUP_MEMORY_TAGS +#define CONFIG_CMDLINE_TAG #endif