From patchwork Wed Mar 18 22:27:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Petr_=C5=A0tetiar?= X-Patchwork-Id: 1257827 X-Patchwork-Delegate: ynezz@true.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=true.cz Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20170209 header.b=hbu99Cfv; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48jPnj6GfVz9sPR for ; Thu, 19 Mar 2020 09:28:25 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=RlNgRM34MNmY6tQLSXebY2VrNMfTRZlzG9MnjwrZZm4=; b=hbu99Cfvnd3y3f 9Xo6NHlGiBrYlvlNzSdbgcKx+ZgxTZsMktGn161WRPqOVTMhC5AH5Rfw4qAA58Ot7BQ1YCKQ3ucN5 vI0ByddIs8nhGA/qcJNrmhZPSxcxic2lfnSmDAokJoZdR1blQUq54oaJmmCvsE7PUV5uZV5U4QIeF 17qcTYAlccHVFXjt1N4uYAkBqkWzEbc9yYScCk5m0MXK+Y6waGWxrJwmmofXrfy111xhx2xCZUVy8 kweudmiIPK5XPk1k59QzL6eW9InrUmdy0EKhOsPE3HD3oDwW03Xls0VXzxhp/+qXDgK9fBFEOphdC qbmRUAAeXk6T58ge2aMQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jEhAk-0007ob-4r; Wed, 18 Mar 2020 22:28:22 +0000 Received: from smtp-out.xnet.cz ([178.217.244.18]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jEhA4-0006ub-Nd for openwrt-devel@lists.openwrt.org; Wed, 18 Mar 2020 22:27:43 +0000 Received: from meh.true.cz (meh.true.cz [108.61.167.218]) (Authenticated sender: petr@true.cz) by smtp-out.xnet.cz (Postfix) with ESMTPSA id A60C14C1C; Wed, 18 Mar 2020 23:27:37 +0100 (CET) Received: by meh.true.cz (OpenSMTPD) with ESMTP id ef71abbe; Wed, 18 Mar 2020 23:27:25 +0100 (CET) From: =?utf-8?q?Petr_=C5=A0tetiar?= To: openwrt-devel@lists.openwrt.org Date: Wed, 18 Mar 2020 23:27:08 +0100 Message-Id: <20200318222713.1495-5-ynezz@true.cz> In-Reply-To: <20200318222713.1495-1-ynezz@true.cz> References: <20200318222713.1495-1-ynezz@true.cz> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200318_152740_921299_7C64B76B X-CRM114-Status: UNSURE ( 6.46 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [178.217.244.18 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record Subject: [OpenWrt-Devel] [PATCH 4/9] uboot-sunxi: a64: allow booting directly from eMMC X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Petr_=C5=A0tetiar?= Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Current boot script uses hardcoded bootdevice, which allows booting from SD card only, so this patch allows booting directly from eMMC as well. While at it, replace fixed root device with more flexible UUID based probing, so from now on probing order of MMC device doesn't matter. Signed-off-by: Petr Štetiar --- package/boot/uboot-sunxi/uEnv-a64.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/package/boot/uboot-sunxi/uEnv-a64.txt b/package/boot/uboot-sunxi/uEnv-a64.txt index 7a717fdc0fc7..a47ebda613f4 100644 --- a/package/boot/uboot-sunxi/uEnv-a64.txt +++ b/package/boot/uboot-sunxi/uEnv-a64.txt @@ -1,5 +1,7 @@ -setenv loadkernel fatload mmc 0 \$kernel_addr_r uImage -setenv loaddtb fatload mmc 0 \$fdt_addr_r dtb -setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait earlycon=uart,mmio32,0x01c28000 +setenv mmc_rootpart 2 +part uuid mmc ${mmc_bootdev}:${mmc_rootpart} uuid +setenv loadkernel fatload mmc \$mmc_bootdev \$kernel_addr_r uImage +setenv loaddtb fatload mmc \$mmc_bootdev \$fdt_addr_r dtb +setenv bootargs console=ttyS0,115200 earlyprintk root=PARTUUID=${uuid} rootwait earlycon=uart,mmio32,0x01c28000 setenv uenvcmd run loadkernel \&\& run loaddtb \&\& booti \$kernel_addr_r - \$fdt_addr_r run uenvcmd