Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F35F5C4338F for ; Fri, 23 Jul 2021 12:35:39 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7543D60E95 for ; Fri, 23 Jul 2021 12:35:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7543D60E95 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5638C82E03; Fri, 23 Jul 2021 14:35:17 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="b+OEyUlS"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A4B9082E04; Fri, 23 Jul 2021 14:34:45 +0200 (CEST) Received: from mail-qk1-x72b.google.com (mail-qk1-x72b.google.com [IPv6:2607:f8b0:4864:20::72b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 95A7C82DC5 for ; Fri, 23 Jul 2021 14:34:41 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qk1-x72b.google.com with SMTP id c18so1195811qke.2 for ; Fri, 23 Jul 2021 05:34:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=PZkCpTZ0ugooPpwHA/vqqRpOaTbJ0ahAWo6PUGdb2MM=; b=b+OEyUlSWHaoSNKwFwN3jntNGAzoVcQ/UVtC5+YGQThXm2bvDkXsEYs5dsIBrRCkS2 eAzjtAGy2vjZ3hWD+sKsQh6rqGDDTOeqqbUoiiV8LqoVt3/+cpkNUT16Njl0JibZmsbX QtVBcPGBnRTE+97E1E76fCg9Ux87gVVq4ttqM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=PZkCpTZ0ugooPpwHA/vqqRpOaTbJ0ahAWo6PUGdb2MM=; b=rObfMLeLrYNBcSfmkDBSOKlqcs/uf+2IH+4xGvVV19DfENbk/ygdmkWvHQrUFDfUg3 LNwIzLiS7mmeN/yw4yzq9tC+DRDqWmNNq+czYBn2/wwG1SIf48hMyKiFHrE6Yzy8/p0S eh7xHxXNShw0b8VdRcyCWu1r7yhH1ujn0EpLM+8xFOV5gfGIh5PHx3lLxQF2e0uysTKm LFcGN+AvNmEVMhjeFYimdIIKBN+PfZB5JpsZYP+daJGHNWdYWQx8FzP0HDX1QcY+0LiD rdUvtbD7x9/oLui32kUS0AZu6IVKxhx4yivpUZiKqHoMiu+9zc34Su3lf88pBnKe35eW fgtQ== X-Gm-Message-State: AOAM533CUrzoP5DSUsWjHY1hGgNSBeWWoWQ5yK6BovVLA5jZlRQBhfvP mfjUJn0utlAP6EcQGqSwSlpQ9Q== X-Google-Smtp-Source: ABdhPJyQhfgphCMkwlt7S1k/LFQGkPR62dLG82fOSQBKcxqFmGW/eKhwsp6cvWKZZkHKRcIOnTfoKA== X-Received: by 2002:ae9:ed05:: with SMTP id c5mr4270980qkg.24.1627043679449; Fri, 23 Jul 2021 05:34:39 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-5560-078f-fb66-41c1.res6.spectrum.com. [2603:6081:7b01:cbda:5560:78f:fb66:41c1]) by smtp.gmail.com with ESMTPSA id x23sm68189qkf.36.2021.07.23.05.34.38 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 23 Jul 2021 05:34:38 -0700 (PDT) Date: Fri, 23 Jul 2021 08:34:37 -0400 From: Tom Rini To: Andre Przywara Cc: Heinrich Schuchardt , Simon Glass , Peter Robinson , u-boot@lists.denx.de Subject: Re: [PATCH] distro_boot: Fix block device after DHCP boot sequence Message-ID: <20210723123437.GV9379@bill-the-cat> References: <20210711230709.31513-1-andre.przywara@arm.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="QFQuXaHm0gDucWbk" Content-Disposition: inline In-Reply-To: <20210711230709.31513-1-andre.przywara@arm.com> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean --QFQuXaHm0gDucWbk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 12, 2021 at 12:07:09AM +0100, Andre Przywara wrote: > The generic distro boot sequence iterates over several types of devices, > trying one after another. In doing do, it starts with setting the > "devtype" variable, then uses this later in more generic commands. >=20 > Now most (block) device types use a local variable for that, but DHCP > puts the type into the environment, where it shadows any local variables. > As a consequence any boot attempt after bootcmd_dhcp has been run fails: > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > VExpress64# run bootcmd_dhcp > ... > VExpress64# run bootcmd_sata0 > SATA#0: > (3.0 Gbps) > SATA#1: > (No RDY) > Device 0: Model: 16GB SATA Flash Drive .... > ... is now current device > Couldn't find partition dhcp 0:1 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > This problem typically doesn't show, because DHCP is mostly the last > command to try, but is a problem when this order is different, or when > distro_bootcmd or bootcmd_xxx are run separately or multiple times. >=20 > Let bootcmd_dhcp use a local variable, as the other kids do, to make the > order of boot commands irrelevant, and allow repeated calls. >=20 > Signed-off-by: Andre Przywara > Reviewed-by: Simon Glass Applied to u-boot/master, thanks! --=20 Tom --QFQuXaHm0gDucWbk Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmD6t1wACgkQFHw5/5Y0 tyykDAwAmCf19W/m5N72dwFyCAlgkoqB6dHVx0h4lQqDCLimKo2bcrXJ7QpASl1Q xpia5IJC3EZu36WQnhUlaolLZ2iK8/hbqDEN2Fslgtyqxt8aL4scXpW8ZYFttdB3 vikSJ1y4ln17t3njoScalfY+w0rcfv/WwiZCBihovmihY9Ho3TmY2sIf5K9FWNG/ w7XWFwGtwRw/U3IoHzFyZ6ABZEdyu+RtHMY/DFmM4uExcY7wA/PS6n5q7AVZU9T0 cUZFq2QeT0atGiVwOIsfL+0C5gjiTwonA5cbpUaZHyNR1TNErIFSQibv+a14ZG0D fnL++yKHHickG6vDFt8YvO4s66KvU7mHRlBbG/JnKibxscDA+KpznJlgwKPRfKFt 3eDmow8/hTYyH5PwMQu/7f6PwuXDK6IcBbesZylmW0bsu5XWg4Tbjq07QQ/vULVD FH9DMRplMrSsp9+3/I5j+acV2lER75varRkXnGEvUBM2z/SliPZk7epv7WRNAxb9 tGu/H2Dx =ZcK/ -----END PGP SIGNATURE----- --QFQuXaHm0gDucWbk--