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 2ED50C05027 for ; Wed, 1 Feb 2023 08:37:25 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 83BA985C29; Wed, 1 Feb 2023 09:37:23 +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="x5EpPqEB"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id ECD6085C2A; Wed, 1 Feb 2023 09:37:21 +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 C2DA985C28 for ; Wed, 1 Feb 2023 09:37:19 +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 j29-20020a05600c1c1d00b003dc52fed235so766816wms.1 for ; Wed, 01 Feb 2023 00:37:19 -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=EnFEjBHUi1PBfpPiAXG2nHMjemWDNgUHYTRynVBR7Bk=; b=x5EpPqEBmWKQ9zfykn01eZvIn5ZuoYxid7QCUWsok/GZ86cfXQ66U7xZG9rzgBfv/7 KL5rBrMgpf4oEAgdjQ7M4s5puAppMGhWUkbACx6f9Gakq6WxlJoVejlj3ENOJcTb4LXw iK/JAUBMSPeT4JK369QX5z1BL6YK/pQDu/ZzlQc4mQPJ41IYpKNsV1ubE0NrlBT7lGnX C+ysLcqlrBe0QVIIcUXv+GWkKGsUvR7jROZfpl5kwJ26sHjPkA8LIgN3e/P4AmeyoiZw QuVkTBLpmdDciy/DLG1sBBmzds6u7l0+j992gxOD4gP2gAH71ShevVHXLGTTlG6fhMC3 wg9g== 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=EnFEjBHUi1PBfpPiAXG2nHMjemWDNgUHYTRynVBR7Bk=; b=EOnNTb2KDfpFjns7GBzIvlFyl7O/pAmZMLKBedyTNJWi/hYeu24IdlsUcuD5u7dBgA 32Y+w/6hGmwwHoiHy+tqiXpJCWNScuq/HmFnmdTSHzOWKVxonx06r/kziaHdP51nuBFr QiWrf3ZzmAcBS6+hFNcVSaU3igdzwkbalahAXCcE9sr4ndIArEHE1nrQ0iGCqwPCPcLU 1ET+f99joxIMsiCrnXcgQPU3DlpelP5DufPZFIrVP8VJzOAexcwRu12pHJG7qUtQwl2M kJIGlcjDssn0E6H2KpCvDwIWko67Ls6ri613u37WnY4FE0nqB5e9loEZMCE0jJLIc4K9 iP3w== X-Gm-Message-State: AO0yUKXUebk7uxjnHWag5o1FsVU2QL8eT4LBUmihprBGGJz0zQ15TcUu 490tyHhVe3qRwlmyPjlrZbsuygZ3Nu0nU8/q X-Google-Smtp-Source: AK7set/RanS/3/ryPQdjhLYjiLQNyprkJlkBOZ3ZPLf6vAwqiYesGc7Hz2Gqu5jufKTESQbKSE1gjw== X-Received: by 2002:a7b:ce94:0:b0:3dc:43a0:83bb with SMTP id q20-20020a7bce94000000b003dc43a083bbmr1224694wmj.3.1675240639315; Wed, 01 Feb 2023 00:37:19 -0800 (PST) Received: from localhost ([82.66.159.240]) by smtp.gmail.com with ESMTPSA id c12-20020a05600c0a4c00b003dc4b4dea31sm1159088wmq.27.2023.02.01.00.37.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Feb 2023 00:37:18 -0800 (PST) From: Mattijs Korpershoek To: Simon Glass , Safae Ouajih Cc: u-boot@lists.denx.de, sean.anderson@seco.com, r.stratiienko@gmail.com, glaroque@baylibre.com, khilman@baylibre.com Subject: Re: [PATCH v2 08/17] android: boot: boot image header v3,v4 do not support recovery DTBO In-Reply-To: References: <20230126160506.1026643-1-souajih@baylibre.com> <20230126160506.1026643-9-souajih@baylibre.com> Date: Wed, 01 Feb 2023 09:37:18 +0100 Message-ID: <87r0v9ixxd.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 Thu, Jan 26, 2023 at 17:54, Simon Glass wrote: > On Thu, 26 Jan 2023 at 09:05, Safae Ouajih wrote: >> >> android_image_get_dtbo() is used to get recovery DTBO via abootimg cmd. >> This is not supported in boot image header v3 and v4. Thus, we print an >> error message when v1,v2 header version are not used. >> >> Signed-off-by: Safae Ouajih >> --- >> boot/image-android.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) > > Reviewed-by: Simon Glass > > log_err() might be better > Reviewed-by: Mattijs Korpershoek > >> >> diff --git a/boot/image-android.c b/boot/image-android.c >> index a6e7a7abb0..d797270a32 100644 >> --- a/boot/image-android.c >> +++ b/boot/image-android.c >> @@ -316,8 +316,8 @@ bool android_image_get_dtbo(ulong hdr_addr, ulong *addr, u32 *size) >> goto exit; >> } >> >> - if (hdr->header_version < 1) { >> - printf("Error: header_version must be >= 1 to get dtbo\n"); >> + if (hdr->header_version != 1 && hdr->header_version != 2) { >> + printf("Error: header version must be >= 1 and <= 2 to get dtbo\n"); >> ret = false; >> goto exit; >> } >> -- >> 2.34.1 >>