From patchwork Wed Nov 25 16:10:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Maciej Nowak X-Patchwork-Id: 1406125 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=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=1FsxgCxi; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=jZOc737w; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (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 4Ch5Vz4GtMz9sSf for ; Thu, 26 Nov 2020 03:11:55 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe :List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:To:From: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=gqgW+Qm+tnj4kdltEA3qD64chnWfH/mOcfcLJzQbM3Q=; b=1FsxgCxisUZSpzaxT5xCZCTTo4 dFiTI+eNbdezHrYdoVRdWz6fZB0Q/a9IHmPkhMTfUi0C7Ka5lSDZDIipu4hku3+NEIrcq8CHVCSe6 Rkg77m8w/wjAyR5PkXfaWRQFk9gUMZAD9utiswkTj4hfs7L7VS1C91f4mkvIJ0cZpRFsz8U/95EYE hkP8gMRrPy8rcxc58HQW8FO4+PkCD1DJ4ikwTIJDc0gjyZ8K6rFDtFPAr4Avv7bhPgY5b1lSn4Lkt 9OjFa13yngP+fIHiRaplrCry9u5x+J5yyGOWQnEqmGHSUsn0jgWWskD+CaHtO35a/LLYy4JxYqzoj S8j4fi+g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1khxNB-00077J-CR; Wed, 25 Nov 2020 16:10:25 +0000 Received: from mail-lf1-x144.google.com ([2a00:1450:4864:20::144]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1khxN8-000768-41 for openwrt-devel@lists.openwrt.org; Wed, 25 Nov 2020 16:10:23 +0000 Received: by mail-lf1-x144.google.com with SMTP id t6so3831442lfl.13 for ; Wed, 25 Nov 2020 08:10:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=QLy4c3S5gHtauKwpAe3xcF3E4GA+YHSrnwMiVeu1Hdk=; b=jZOc737w0rdmYsreeluJ8WtESdLSRqrOPIZ23SrjwBYcc+rn+LtpvCShg+GtIY/Auf DLHoEnlWTfqKDbAkizRMMbwCOlFEPHw7b/idbSGt2h6hzj32UW0yXHfixSy9WtZFZj5B kLd7D8fErXx8AnjJPXr+VWT7NFnOArJit0LouqxDpK9KuoaVgdyjtEPalo8mj1lAPzkr q0cYiT2Sw+gyEdhUU/wp4UWojMEk2O8i6ua6hm8zguZSul50lGn6PgGvrRXzqWScUMrJ fL/uS1q9Ix0V7KOoWCNGW+hhPOaS1eACndSMkEuggTj89Z9BqpT+VTaWNkxnqd6nXQ7D PbTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QLy4c3S5gHtauKwpAe3xcF3E4GA+YHSrnwMiVeu1Hdk=; b=RNxmbZPnDozOYH0ifUymQwu+P22Bslbg4Od/XX5mJIdTmsOUZoQSHFceqxHA7mXy19 sKoxnkESppaAUoHarA8hVniykfhB2wHrLJqvEVEFaGM1Xj+PDJG6ZBVghXU8g5AAVpGE HvnZrAe6B6VfLakpqlZ/d6eRBipbjKEPjS9+vpZbMc6xgk8ACwmnygAhAGRaf8FQtrhL WfAaMbvvFO7sg4wtG4OSARs0KP1lPSfdpnYiKhYbi8xsGzGrqa5OucsVlC9fmiDcV7Hu sTjyEEtC90pbYxUoMVrTfNpHM7xPrFHPpAHPYdT3bBiBO48efShM6UkC5dCTy81bwjlh 8Haw== X-Gm-Message-State: AOAM530vuqeWD419FVGIMweOAU/7CxL1bes7VjnzLPL0nZISDHtBdG0T UEHW0X2Op5varLziGhyIIgWHVy6NPG0woQ== X-Google-Smtp-Source: ABdhPJwveEaA2TrXas2AYonUhNOcwycJXk72ROwvq75YZKWr/zGSF9qeaHo+vjKHM/7S1NrvCuBriw== X-Received: by 2002:ac2:46e1:: with SMTP id q1mr1869251lfo.212.1606320620255; Wed, 25 Nov 2020 08:10:20 -0800 (PST) Received: from localhost.localdomain ([194.29.183.4]) by smtp.googlemail.com with ESMTPSA id o7sm287669ljg.41.2020.11.25.08.10.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Nov 2020 08:10:19 -0800 (PST) From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Subject: [PATCH 2/3] tegra: image: make bootscript standalone Date: Wed, 25 Nov 2020 17:10:04 +0100 Message-Id: <20201125161005.2307-2-tmn505@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201125161005.2307-1-tmn505@gmail.com> References: <20201125161005.2307-1-tmn505@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201125_111022_607159_23EEA142 X-CRM114-Status: GOOD ( 11.15 ) X-Spam-Score: 0.1 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:144 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [tmn505[at]gmail.com] 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [tmn505[at]gmail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Don't hard-code the PTUUID, use U-Boot commands to determine it, as some partitioning tools could rewrite PTUUID when modifying partitions. Signed-off-by: Tomasz Maciej Nowak --- target/linux/tegra/image/Makefile | 5 +---- target/linux/tegra/image/generic-bootscript | 4 +++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/target/linux/tegra/image/Makefile b/target/linux/tegra/image/Makefile index aa0083f9ae47..fbff1cf6e874 100644 --- a/target/linux/tegra/image/Makefile +++ b/target/linux/tegra/image/Makefile @@ -14,10 +14,7 @@ define Build/tegra-sdcard $(if $(DEVICE_DTS),\ $(foreach dtb,$(DEVICE_DTS),$(CP) $(DTS_DIR)/$(dtb).dtb $@.boot), \ $(CP) $(DTS_DIR)/*.dtb $@.boot) - sed \ - -e 's#@ROOT@#$(IMG_PART_SIGNATURE)#g' \ - -e 's#@KERNEL@#$(KERNEL_NAME)#g' \ - $(BOOT_SCRIPT) > $@-boot.scr + sed -e 's#@KERNEL@#$(KERNEL_NAME)#g' $(BOOT_SCRIPT) > $@-boot.scr mkimage -A arm -O linux -T script -C none -a 0 -e 0 \ -n '$(DEVICE_TITLE) OpenWrt bootscript' \ -d $@-boot.scr \ diff --git a/target/linux/tegra/image/generic-bootscript b/target/linux/tegra/image/generic-bootscript index 7e86afdf5fb5..0908025d5d59 100644 --- a/target/linux/tegra/image/generic-bootscript +++ b/target/linux/tegra/image/generic-bootscript @@ -1,4 +1,6 @@ -setenv bootargs "root=PARTUUID=@ROOT@-02 rw rootwait console=ttyS0,115200 console=tty0" +part uuid ${devtype} ${devnum}:2 ptuuid + +setenv bootargs "root=PARTUUID=${ptuuid} rw rootwait console=ttyS0,115200 console=tty0" load ${devtype} ${devnum}:${bootpart} ${kernel_addr_r} /@KERNEL@ load ${devtype} ${devnum}:${bootpart} ${fdt_addr_r} /${soc}-${board}.dtb