Message ID | 20221126165931.197607-15-souajih@baylibre.com |
---|---|
State | Changes Requested |
Delegated to: | Tom Rini |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=baylibre-com.20210112.gappssmtp.com header.i=@baylibre-com.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=0YgQivss; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NKJRQ0bM5z23nB for <incoming@patchwork.ozlabs.org>; Sun, 27 Nov 2022 04:21:06 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1C85B85295; Sat, 26 Nov 2022 18:18:51 +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=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=baylibre-com.20210112.gappssmtp.com header.i=@baylibre-com.20210112.gappssmtp.com header.b="0YgQivss"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id ED4668504C; Sat, 26 Nov 2022 17:59:57 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 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 CD8B885023 for <u-boot@lists.denx.de>; Sat, 26 Nov 2022 17:59:55 +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=souajih@baylibre.com Received: by mail-wm1-x331.google.com with SMTP id p13-20020a05600c468d00b003cf8859ed1bso5516456wmo.1 for <u-boot@lists.denx.de>; Sat, 26 Nov 2022 08:59:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pHoFEvRZRKcy/QMBbS6SVE7E3FxxXx5QpwWAI35DSys=; b=0YgQivssvP4MonTodz7Uc/Z783qLnU+sQz7SlRTWLtZZUjfcUYzmwKjw6HgnLp/aBb kQ8BPiUYMyZKlD3HP6n4c8HlY044I2Kcy8alvKjdNVFC/HrX2LzIvcFHULuj9kp+a7AH iCC3vzqmMEJKTNRsrwyE9c77xtN2GdBjpFk1gU7d+cgMs4HSmQBqzanXIVGYqp2VnYvO HKZmKAE438JaX0De3z4NT3vMFTpsN3jlR7Pt6DwOQFaNwB3i3SvkfeeoPC3JnwPPAJAq pv2r+RuDjgu5LN0cInYkhFQDsnRo1ddMbsQJJ4Lgmx9IP54LvJb1xkHcAVPrVA2Wtm43 rdGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pHoFEvRZRKcy/QMBbS6SVE7E3FxxXx5QpwWAI35DSys=; b=R5Twgjzxoinf1NUTE+5xBpdx74cagAid/ZLka/rYP4m0mrsUsamoKHUXVf902RE3vz onTnS/nAPUjcE+tK2jInjobzU97COKpj9x4V1nehkCFb4EfPcnGD8/OmbgoD2WBwJL/U bGswGlGZ34BwUjuKWL6Y/EFjCMZWuf2Umqxe9HkgSd8SY5wFndYWsz53RtI9Ewtg86lM +OJMnkUNWYIdGaoeiha1qtBhv2KFFSoOgJlLq+xCr4PArCmVIfoShqc7/BkR+3E1nFhJ YqkdJqRXSV+gpQeSQuh9L+6NKug1i4up1eOYhaiGEhBtTnvf/ckJ4QF6dlM0xlysspoO qUrA== X-Gm-Message-State: ANoB5pkHJSSz32pJeCLKu69VZRNKvI/ELuiwTsobShWjz1s3FLfuQDYj Uy+N/hCHjkUe3RsIM/vZW+8mbIAyulXwmA== X-Google-Smtp-Source: AA0mqf4LmqNvfNoGTHNqFkbsFUeuj84577CY7oEWWCvSJJ9z+pwqqhPZbHfF1FE7k4jJZPy5otdGzA== X-Received: by 2002:a05:600c:3514:b0:3cf:a985:7692 with SMTP id h20-20020a05600c351400b003cfa9857692mr25716139wmq.104.1669481995562; Sat, 26 Nov 2022 08:59:55 -0800 (PST) Received: from safae.baylibre.local ([2a04:cec0:11b5:4031:7588:eb2c:a5c2:aa6d]) by smtp.gmail.com with ESMTPSA id c15-20020adfe70f000000b00241e8d00b79sm7462408wrm.54.2022.11.26.08.59.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 26 Nov 2022 08:59:55 -0800 (PST) From: Safae Ouajih <souajih@baylibre.com> To: sjg@chromium.org Cc: u-boot@lists.denx.de, sean.anderson@seco.com, r.stratiienko@gmail.com, mkorpershoek@baylibre.com, glaroque@baylibre.com, khilman@baylibre.com Subject: [PATCH 14/17] drivers: fastboot: zImage flashing is not supported for v3, v4 Date: Sat, 26 Nov 2022 17:59:28 +0100 Message-Id: <20221126165931.197607-15-souajih@baylibre.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221126165931.197607-1-souajih@baylibre.com> References: <20221126165931.197607-1-souajih@baylibre.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Sat, 26 Nov 2022 18:18:14 +0100 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean |
Series |
Support android boot image v3/v4
|
expand
|
diff --git a/drivers/fastboot/fb_mmc.c b/drivers/fastboot/fb_mmc.c index 4cfdc108e8f7..0f0a5d93cbb4 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 -1; + } + /* 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");
Print an error message when the boot image header version is greater than 2 as this is not supported for v3 and v4. Signed-off-by: Safae Ouajih <souajih@baylibre.com> --- drivers/fastboot/fb_mmc.c | 8 ++++++++ 1 file changed, 8 insertions(+)