From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id CB2E4C05027 for ; Thu, 9 Feb 2023 14:38:45 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id F32EA85868; Thu, 9 Feb 2023 15:38:43 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20210112.gappssmtp.com header.i=@baylibre-com.20210112.gappssmtp.com header.b="TIfQk8aQ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CA3BC85C73; Thu, 9 Feb 2023 15:38:40 +0100 (CET) Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) (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 C6D3285712 for ; Thu, 9 Feb 2023 15:38:37 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=mkorpershoek@baylibre.com Received: by mail-wm1-x331.google.com with SMTP id z13so1584548wmp.2 for ; Thu, 09 Feb 2023 06:38:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=7dPoTMc+jMJXPxzSDNBaaVkQIqsx1Il2IIl9t1ENNzc=; b=TIfQk8aQG2+UK59ViKP1tYL5fA5XbZohd+bTDCVWsIx58kO015BssmRvSfRpeZqnD+ +cNlQtNstbcwNHANwvtyLg62/kEYTiZDhUvsho2Sjz+pdF2brjw84KXNfr9DSXUd/o9S e9y8VgGNxwpmTGkd5lzWAxh3WZuIQ1dlvKwHm6rJttJU0AHOs4n5SlzQHtssL6Bfv47w UriCr294BnC67RtrgMG/VlcYmtAWfN0cXugN3iq1dhAP5VoXa+YcuxnWz9xgtRKmVh7U JNdZH/CVEZTisiPuJjzyCJ2tUmkNEW4fMB0yjN6PIpjbvPDs1CHvCUePncSCop2/2RGU 0kYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=7dPoTMc+jMJXPxzSDNBaaVkQIqsx1Il2IIl9t1ENNzc=; b=P1zonI7+etKFUQxAHG8gHTlcryt/M58jh4CQZ2HKV42Qqv37F75jh89o5bgQnjPQTc sdiU32kAgNcYsMDIlfZTwAvUsqrPBM35Ze1ATgcfxVkJ7tPXLePXkmU9WPUzCiaVSxbg o55RgG6gS3u0Plop0LudZqHsmAh5FOx4Xb5gyU39pIC14hBLodxOThWZgAeIdz9NoD8x hWJwEdWvaeSRXujLIeQrWWw0A6sCD4K94aD5CgDZW+ElT4+jbRho+ZNu5eT8DOtglXfT sUyrm+mTSc7BaGqwg25hEcpzzzLnGbcEm/7VVk+NGUbsQAs7owTQMfxUDK8gnTg/Jsxn BUzw== X-Gm-Message-State: AO0yUKVESVbkML9t9zXb/ySWO9eHIXvaWOWJAhB/kL5bNdxjNtepRgGy B2gZ/KzH/2SqsVHgaKnnhJvvrw== X-Google-Smtp-Source: AK7set/8Bl+No7Ba0syCrQv4IKQB0oJ+HRvNK5oV6pQ9Qtp2dXQHi4dGoawaowprCSx4K3mBmu/DEw== X-Received: by 2002:a05:600c:4383:b0:3df:f7f1:4fbe with SMTP id e3-20020a05600c438300b003dff7f14fbemr10249561wmn.1.1675953517321; Thu, 09 Feb 2023 06:38:37 -0800 (PST) Received: from localhost ([82.66.159.240]) by smtp.gmail.com with ESMTPSA id g16-20020a05600c4ed000b003dfee43863fsm5926888wmq.26.2023.02.09.06.38.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Feb 2023 06:38:36 -0800 (PST) From: Mattijs Korpershoek To: Safae Ouajih , sjg@chromium.org Cc: u-boot@lists.denx.de, sean.anderson@seco.com, r.stratiienko@gmail.com, glaroque@baylibre.com, khilman@baylibre.com Subject: Re: [PATCH v3 14/19] drivers: fastboot: zImage flashing is not supported for v3,v4 In-Reply-To: <20230205235021.355410-15-souajih@baylibre.com> References: <20230205235021.355410-1-souajih@baylibre.com> <20230205235021.355410-15-souajih@baylibre.com> Date: Thu, 09 Feb 2023 15:38:35 +0100 Message-ID: <87v8kaj444.fsf@baylibre.com> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.6 at phobos.denx.de X-Virus-Status: Clean On Mon, Feb 06, 2023 at 00:50, Safae Ouajih wrote: > With vendor boot image introduced in version 3 and 4 of boot > image header, boot information is located in both boot image > and vendor boot image. > > Flashing zImage is not supported for version 3 and 4 since this > requires updating vendor boot image and/or generating a new image. > > Print an error message when the boot image header version is > greater than 2. > > Signed-off-by: Safae Ouajih Reviewed-by: Mattijs Korpershoek > --- > drivers/fastboot/fb_mmc.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/drivers/fastboot/fb_mmc.c b/drivers/fastboot/fb_mmc.c > index 086e5f7843..1dea82835c 100644 > --- a/drivers/fastboot/fb_mmc.c > +++ b/drivers/fastboot/fb_mmc.c > @@ -370,6 +370,14 @@ static int fb_mmc_update_zimage(struct blk_desc *dev_desc, > return -1; > } > > + /* Check if boot image header version is 2 or less */ > + if (hdr->header_version > 2) { > + pr_err("zImage flashing supported only for boot images v2 and less\n"); > + fastboot_fail("zImage flashing supported only for boot images v2 and less", > + response); > + return -EOPNOTSUPP; > + } > + > /* Check if boot image has second stage in it (we don't support it) */ > if (hdr->second_size > 0) { > pr_err("moving second stage is not supported yet\n"); > -- > 2.34.1