From patchwork Thu Mar 21 08:50:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 182 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 8FDC53F9BA for ; Thu, 21 Mar 2019 09:50:17 +0100 (CET) Received: by mail-pg1-f197.google.com with SMTP id m17sf5050831pgk.3 for ; Thu, 21 Mar 2019 01:50:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1553158215; cv=pass; d=google.com; s=arc-20160816; b=ioc5CyueKUIWzSZjiqJ7bL2oAMXwe7f1xQJLUsfq77iWn+YNidGRVPQ9VzgpIMHcCU WY82cjdjptBfAMil2PUkHIYKxBEll+rtqunRMggBPOol95Z6gEuXKEXpFU7XCIhVEPVd yPOHQ/wmQX5TJy1Z/QEHzYMKR8kISWGKOZ9BPoWKn8K6fzjvO7sDvQPh5Z3ImSeVgyxG i9ZARL+gd03pMRkPFSWZzIoY0iCA/wQZBKG+8acwfvgYX5Ek/kY/Ts2vM31Vx9xv5Pqu Q6NJ7tG9E+6DS+QyjtF61eIasc5RdZW398NwygBkVo1JeAxhNObCHIBV1wKPE5tWaCw3 d43g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:message-id:date:subject:cc:to :from:dkim-signature; bh=JNZOeKodTrQuEE/8u+UYAtGEQTQe73M7wp556677yho=; b=lNe7365DR7ukbINMQkvM6eJPYO6VuVfVIYl8MXWE+Yml6NGHVjfxnw6vy6dDDNTFgN 7yVY968adYaZcHIfhMOjPUajxRQs490RsfPsFktVEL00pLG0955M1/ueHWlEWDf/ycZT 3hicUkuneqICDHSm8MDk9TJ3H+v1M0nH2+/Zijq4sMZDZGKSCoLs6DHMe3kckrHpsDH+ 4g/fL9QdUjbffKXBLwlMz0n4un1B4JV+OU0NYFJtHXKGG05Mi4L+8GlTXoup3rqOMDww jMzQoR0alZX4GepfFKbGFZUPbyFJPoMqKtE2imjXpuQS99g0+mm0jxKSOV3e1Cl3LqtC N/Ow== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Bavzh351; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=JNZOeKodTrQuEE/8u+UYAtGEQTQe73M7wp556677yho=; b=NslOhq/YS7y3+fueuGBDb+WOLX7+IxDKDyW0DF4/R4jKPr0OhXqghFJ0+6c+E1yDx2 2Bict9nBiUekJvW8ov+2POrRytZ3FwlkVRSDNx4wNar4V1X+PUyPazwPsoKKQ969lt4B ZSsJgYfgYHPIu+DwS5M14dRhrwTm9xOt/7qj4= 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:mime-version :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help :list-archive:list-unsubscribe; bh=JNZOeKodTrQuEE/8u+UYAtGEQTQe73M7wp556677yho=; b=jjFbE8ztPPuKjY5xPZZweS1liQrOekkvAfratZWDyoeBmUA4cR4ifZxCAzmWM/myx7 8CtZpKzl+nitDodHFn9vv+SMoIWRp8yII4jS9/zNaxKMSred1l62090JpOh+e446Nawx txg5SWn3iQ4zgRLzpvArAwBW94g3co0AnAr0g3L6zMqdcMsvcD1wO5xriwHMgCRjhAo1 ZrpABCCVEtlI2de+/YZjNXGGEylZVOcbprsIasboUUjQd3S0eaRhTJTB1wcovYuxzK5T 6CAEwvu0RaAPtZWYbD3CkExIhtXfNzu4jcE37OOZfH6zrHNkHUaiMafjQmT6lXC/wEmi P3Rw== X-Gm-Message-State: APjAAAVKzwH6PYthznQqtZdkb1m3rweExgRJKWMrfMdf82cnsskNcY1L LcAtuc8lK9yUqHDFJkIlwYaQk70u X-Google-Smtp-Source: APXvYqy0Lo87RPVH1bfryDixwUVy/+zaUGWdiLxljCLGjPLbVg/aN/TVoYF6OEY/0lUn8BEqxM5aiA== X-Received: by 2002:a62:6fc6:: with SMTP id k189mr99498pfc.66.1553158215416; Thu, 21 Mar 2019 01:50:15 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:aa7:92d1:: with SMTP id k17ls2009365pfa.8.gmail; Thu, 21 Mar 2019 01:50:15 -0700 (PDT) X-Received: by 2002:a63:f412:: with SMTP id g18mr2298462pgi.444.1553158215053; Thu, 21 Mar 2019 01:50:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553158215; cv=none; d=google.com; s=arc-20160816; b=c4YXfhkYM3kcJqYABpaWixV86bOuwsHX8TSxQC677UPSHnJxPJpnOs5bIUwRgRC0MP ZSOgWObhagU9uubqSUVPxP1GoObJe4VRi4/81akdmRqTSSBsmfmV6VFjKm9vmgDiQkQb 95nA5gmu2tC0XwkbFfVll1NITj8ecjknV4MOrb75JIiUKOEVmZjf5iFhxxfzH8TyBDAr i0lcFiiwo+yW+btzBOSy9C8lovyLGM2oUJLyHRt8XNsiBgmIUmqmbpsEfXLCx5htd3Nl K/2v8eDuNS+ASxIQ0a7JuvNhv3AA8K2HmDSMmxxnZhWAJIPPgvJaB2PfNQf6Pnml9u04 Pz0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=ChBaxoByXNgJtUhVhBXxmlTapGx/52sqE7fJltwbea0=; b=DuPjeJB4pWZIr/XKjc4FWIqypsTQcueIk1mma+hCgfE01xXAnp0hiCarf+BUGxHeXG cbYuo3oM6q8zSFW+SkH3mxkakQTOK2Jenc6ais9pYd7+kRhY6SArjV8odu+WhI50bDEv +3mfjx/qRyHQgGfWqg0xmFUbTPZBUPlIVxRebkDZKx7tT/pXlEWIq8PpheFv4avbzca8 Za5XMEShAA7Wl62+qnMOVoeL1nz3lKkDsmGF1qGNMN1PGj+G8nhrxtwq93UdF9WurObc O3Z3i9NJ82ISYTokKbbYWKxUcyRn9XeiQRNR+dwJvfDGTtOVbh/OC9UM0qhUUsd0phhu JcRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Bavzh351; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id w19sor6142290ply.45.2019.03.21.01.50.14 for (Google Transport Security); Thu, 21 Mar 2019 01:50:14 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a17:902:9341:: with SMTP id g1mr2407356plp.80.1553158214092; Thu, 21 Mar 2019 01:50:14 -0700 (PDT) Received: from localhost.localdomain ([49.206.202.234]) by smtp.gmail.com with ESMTPSA id n82sm9682663pfi.63.2019.03.21.01.50.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Mar 2019 01:50:13 -0700 (PDT) From: Jagan Teki To: Shyam Saini Cc: Michael Trimarchi , linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 1/2] board: engicam: Handle mmc recovery partition, root Date: Thu, 21 Mar 2019 14:20:01 +0530 Message-Id: <20190321085002.21084-1-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Bavzh351; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Since i.CoreM6 support recovery boot via bootcount, update the mmcpart and mmcroot dynamically based on used mmc partition layout instead statically defined in include/configs. Signed-off-by: Jagan Teki --- board/engicam/common/board.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/board/engicam/common/board.c b/board/engicam/common/board.c index 7486f0ac2d..571d36fc63 100644 --- a/board/engicam/common/board.c +++ b/board/engicam/common/board.c @@ -19,12 +19,20 @@ static void mmc_late_init(void) { char cmd[32]; char mmcblk[32]; + unsigned long bootcount = bootcount_load() + 1; + unsigned long bootlimit = env_get_ulong("bootlimit", 10, 0); u32 dev_no = mmc_get_env_dev(); + u32 mmcpart = 1; env_set_ulong("mmcdev", dev_no); + if (bootlimit && bootcount > bootlimit) + mmcpart = 3; + + env_set_ulong("mmcpart", mmcpart); + /* Set mmcblk env */ - sprintf(mmcblk, "/dev/mmcblk%dp2 rootwait rw", dev_no); + sprintf(mmcblk, "/dev/mmcblk%dp%d rootwait rw", dev_no, mmcpart + 1); env_set("mmcroot", mmcblk); sprintf(cmd, "mmc dev %d", dev_no); From patchwork Thu Mar 21 08:50:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 183 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 9A7D93F9BA for ; Thu, 21 Mar 2019 09:50:21 +0100 (CET) Received: by mail-pf1-f198.google.com with SMTP id m10sf4972815pfj.4 for ; Thu, 21 Mar 2019 01:50:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1553158220; cv=pass; d=google.com; s=arc-20160816; b=0U3VKFGSbLlx/KaJuzNsRqY7EvH8tywFMCND1xTFaKPeYOpGjuQh5kEddieV7NHddZ PPLt7vXALQL0GUwKFoSowTjWrzQ4prIJLHT1EofdUsmLAPnbBHB1JiVY+JN3pHzubiGk kDM1OhPfsi6+mU1lUsmWdWba1aiHL6GO7QOcLTdGpei+FPmAN5hC7Vw2Ovfm24lU/EXO ujK85znDrhJ4G4BhSTmO58ZB2tO8PzsfEnDfYdnUlP67nxJjMp7oCQIiH0t/4QmWhSkQ LW9RAIGdHqBEQro5cTzt+jQvzmikiOFykIBvFx+Jada29sO4GO0LJM7xYiABsppVaX9L cnnA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=2Kw2hvguxwMqZ3+BYZbd9a+qlbq4h7dLlzZoB/gcW4M=; b=MOQlc0nZLccs4Gw8h3C3HnZi+Uf83ANnuW9XzlNLj17ZFBqKT47DRT839hbY0y465/ y/R7SjSftc6B4N45ACyZDzvfsaPS+ES5mz3nKJvvVDw0rA7qYId2wPXLhWTkNCq6hdVN ENBcPKhcChJ8eGadwXdnmEvStnOVFVbneE1fjA+Ot2m5+IcI4mG6BYi5u+3wwr9fiGWX hWeXTnKHinXbFihRPBMr1PHr/uH122o+Tnha5+8xXszhfoQHC2HqsjCG44cHKzZh3zN/ aw2t33JGufhhHl10lXvyP8bGhHocYH40pZ09Qey9qnGXzfjoI2uGKp1aMfoOdTs9W4ij cezg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ipW7E9Ff; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=2Kw2hvguxwMqZ3+BYZbd9a+qlbq4h7dLlzZoB/gcW4M=; b=CS1ztdPouzTVQtGfhRT41zQDZHOtFtaEYhfAOfEE+TNbOV87T0EjrGi6Lh2zwwXeRx jd8IPu1cC9KxWRTS+KXXeali1KBGVyBWRKcpmNDIhH30VEaKqfLwFmytp/Muid0jwhdW Vjl5bwGLsh+gEh+mH/hKo5kUBWA+N98OkQGqc= 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:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=2Kw2hvguxwMqZ3+BYZbd9a+qlbq4h7dLlzZoB/gcW4M=; b=O7WUPqNKSK4mQ76YCCE9gOVeOdXibmf7yfWk2pYTQV4RUk/9ACus3CVGVXA/zaITWE ri9NPJwhT1s1YBVC9P/Cl0QND2v7TvKDUEK5uSivpW+LkQdqNw3Bg+a4rM2lUw1jVRkZ Ju24N1/tBLVYxyOUWq9R8LzIh1LN5hRTEk30AOnhYhoXDiKH12OBmrjAiDvc1MnQdcGO eCB38OGKtAlVcsb698TpPHRF0w2iy+oiNAIePQ6tDbsFLLQrlw5RXiqaVqapghgAAfgW RIMPjtXTQTEcsiEssYCVJUMnar+3iMFtwmRYy39nGrz89aXxAUnDGRWIX0Xi7gw1FZ32 PxYQ== X-Gm-Message-State: APjAAAV6HIZt3tAScC6qqe4E7HVBsZuVPxFcLshnbEZ1braHmG7EXhEL UnLKntk2VIeL0jkR/UKDRVTCmnIn X-Google-Smtp-Source: APXvYqyRwglzYBUf7xuRE+Ad40QUnPLmBmrKX//SHReWlLwi/dIahZSVhGFxc66QGrNrflMJB4aUkw== X-Received: by 2002:aa7:8010:: with SMTP id j16mr111662pfi.122.1553158220131; Thu, 21 Mar 2019 01:50:20 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:5788:: with SMTP id i8ls2105969pfj.0.gmail; Thu, 21 Mar 2019 01:50:19 -0700 (PDT) X-Received: by 2002:a62:1c87:: with SMTP id c129mr2223495pfc.94.1553158219726; Thu, 21 Mar 2019 01:50:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553158219; cv=none; d=google.com; s=arc-20160816; b=o2F7TqoXLsYQvvgJFekhGkpbYUo5YmVqA2wlZVjkEcxS6Ww0EJ9DSUAJfvmAd+1K0l O5Edz/8eQFtqcAHioFfqo+QneIH71idVgF4YE4zsjucTPaAP1zmlAJgvwE9YwHAXJST1 YTCz3+gWvPPyUP+ICoGRQqpWEi+YvU8gQBLg0SkGMS270l33aNvgGVRsxahiNX82Mp+0 s0NniAzDveyCYui7uM6RsXLJsw0BJIwE63TaeZLgfG6PCl/VEmSxpagLG9g6+mAylZgk jHeBO74DNQgmJ+iBmy7HVragMQ2XrNj6bzroQDhjcaTiZoYra87gdZQ49la9KP5QNjzG 1qmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=moQ6DA1Sz9nLP1cqUIaxntlrulmnXT0VyxymuQc8ibI=; b=tC0RsD/rffFoxfUP93YpG+65VrCWDDGfiEeYvnX0QBf2DE2ZlhNhTIjyXgb57MwBSH mCzZNQlNhWAJcr0r7laGyL77hgKUj80yLKuh5JQZuUe1Ddi2eihGjZPVdCRDfLf+t4Od plMJE5sxQSBWStBOZQ/pD0dH75x7+YQ415sYGXDxr13m91datvTGZEUlfoadRvhAPV2l FnKS3hfB/iTKG3TwbiYBnkm7WdX+NJLQ/Bd59i2NkeQphxXvifIFoQeiqtNqPMSx3MyX VCcUpwngx5LMBzFSVA6wsZzNLo4rp+MjovNluhL/sH676AkxLLmBR9AEaEDxEu3RYSUx f5/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ipW7E9Ff; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id go11sor6255352plb.58.2019.03.21.01.50.19 for (Google Transport Security); Thu, 21 Mar 2019 01:50:19 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a17:902:8a84:: with SMTP id p4mr2359072plo.2.1553158219442; Thu, 21 Mar 2019 01:50:19 -0700 (PDT) Received: from localhost.localdomain ([49.206.202.234]) by smtp.gmail.com with ESMTPSA id n82sm9682663pfi.63.2019.03.21.01.50.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Mar 2019 01:50:18 -0700 (PDT) From: Jagan Teki To: Shyam Saini Cc: Michael Trimarchi , linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 2/2] configs: imx6-engicam: Update the recoveryboot setting Date: Thu, 21 Mar 2019 14:20:02 +0530 Message-Id: <20190321085002.21084-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190321085002.21084-1-jagan@amarulasolutions.com> References: <20190321085002.21084-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ipW7E9Ff; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Since recovery boot on mmc can get the mmcpart and mmcroot dynamically, drop the static definitions and handle it properly. Signed-off-by: Jagan Teki --- include/configs/imx6-engicam.h | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/include/configs/imx6-engicam.h b/include/configs/imx6-engicam.h index 571852d803..56b3c7503e 100644 --- a/include/configs/imx6-engicam.h +++ b/include/configs/imx6-engicam.h @@ -43,30 +43,20 @@ "fdt_addr=" FDT_ADDR "\0" \ "boot_fdt=try\0" \ "mmcpart=1\0" \ - "recovery_device=0\0" \ - "recovery_part=2\0" \ - "recovery_root=/dev/mmcblk0p2 rootwait rw\0" \ "nandroot=ubi0:rootfs rootfstype=ubifs\0" \ "mmcautodetect=yes\0" \ "mmcargs=setenv bootargs console=${console},${baudrate} " \ "root=${mmcroot}\0" \ - "recovery_mmcargs= setenv bootargs console=${console},${baudrate} "\ - "root=${recovery_root}\0" \ "ubiargs=setenv bootargs console=${console},${baudrate} " \ "ubi.mtd=5 root=${nandroot} ${mtdparts}\0" \ "loadbootscript=" \ "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ "bootscript=echo Running bootscript from mmc ...; " \ "source\0" \ - "recovery_loadimage=ext2load mmc ${recovery_device}:${recovery_part} ${loadaddr} ${image}\0" \ - "recovery_loadfdt=ext2load mmc ${recovery_device}:${recovery_part} ${fdt_addr} ${fdt_file}\0" \ "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \ "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ "loadfit=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${fit_image}\0" \ - "altbootcmd=run recovery_boot\0"\ - "recovery_boot=echo Recovery Boot from mmc ...; " \ - "run recovery_loadimage ; run recovery_loadfdt; run recovery_mmcargs; "\ - "bootm ${loadaddr} - ${fdt_addr}\0" \ + "altbootcmd=run recoveryboot\0"\ "fitboot=echo Booting FIT image from mmc ...; " \ "run mmcargs; " \ "bootm ${loadaddr}\0" \ @@ -108,7 +98,12 @@ "run ubiargs; " \ "nand read ${loadaddr} kernel 0x800000; " \ "nand read ${fdt_addr} dtb 0x100000; " \ - "bootm ${loadaddr} - ${fdt_addr}\0" + "bootm ${loadaddr} - ${fdt_addr}\0" \ + "recoveryboot=if test ${modeboot} = mmcboot; then " \ + "run mmcboot; " \ + "else " \ + "run nandboot; " \ + "fi\0" #define CONFIG_BOOTCOMMAND "run $modeboot"