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 EB910C38142 for ; Wed, 1 Feb 2023 08:45:38 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id F1D6185C02; Wed, 1 Feb 2023 09:45:36 +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="IOSZr4e5"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EBBF185C1A; Wed, 1 Feb 2023 09:45:34 +0100 (CET) Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) (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 C5F41859CF for ; Wed, 1 Feb 2023 09:45:18 +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-x32a.google.com with SMTP id hn2-20020a05600ca38200b003dc5cb96d46so767699wmb.4 for ; Wed, 01 Feb 2023 00:45:18 -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=Qy/wNE5U9WWlg/BKIoCyQPvgLKC9f5qHXyTkK96ZGWI=; b=IOSZr4e5y7RHHo7Jb48J9IWWEFeI0WpDwtl7De+MKpVq+JDVzow0emmH1tMcPMPDRR iMlB6eK8SS6GC722szzeQrOGTZGwnDLfXbkQJ2/+UPs+U1/NHWKGVQrCTE+7koIIosa+ v90r6UhnLJNSzCe+jG8OBVHVNF9T7Wi2DmAhoiVyJPEd5y8V0covMVBkEaFRFFEjtHv8 OyQDfMS6acG/lkixkIrJmBU002GF0th2dggRufghebNvD/6SdWP9uT53V6RUHmv2Xu63 1u2+BnYquAOXNJGBUt4Q8hz0UUF9IKniUWG9MS48jqVTCY5ylXp44/4LbOZh79wLHsqu mnsg== 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=Qy/wNE5U9WWlg/BKIoCyQPvgLKC9f5qHXyTkK96ZGWI=; b=KAtSsX+0G1CBXeUYhbowiF3p4tuzzNNYUYaqop1CKa0Du+I04FvBQVF6dBQAE7+QfC 71B7/a8nZtHqFhe4fOq4ftGo+IVBIEVPg4yS28hn7bW9V6k9+jDA8gUQ3Q2m9D+PPWjZ KfzWz1N83B/YI7ib79crhrTFPI3+XbsdsU+SEBdWRlfLSH+zDRCSMkkFnPWWCg9Gh0LE KvooY3pUJUnFCqUfuMt7oZC+WvnEvCiLLq8OVnrm1sMzKi6HsCa3+SdI+a6azEe1JW+A Z7nwsSIc8tGK6kB7y/WQwotSK90ylRgmvIR6TEG+WFCDddva9l7Th4AqwylSlpKbmhEt P4PA== X-Gm-Message-State: AO0yUKWy/r7HDkl2DVbi+ixJ6BTsWuCKJNP9+YyBCLjug2HmJTWwlRfK p2RMmPjvFL2XRtCESKIHXy13uA== X-Google-Smtp-Source: AK7set+uTQ+X2JrkFsbqAqHBZXhrOhJP+yx18tUR8PWQk1LJXPTYbwURxAnuOzJo8rTp+TdrbphPgQ== X-Received: by 2002:a05:600c:1f09:b0:3dc:24fc:ef6f with SMTP id bd9-20020a05600c1f0900b003dc24fcef6fmr1191215wmb.40.1675241118330; Wed, 01 Feb 2023 00:45:18 -0800 (PST) Received: from localhost ([82.66.159.240]) by smtp.gmail.com with ESMTPSA id n15-20020a5d598f000000b002bdff778d87sm18301785wri.34.2023.02.01.00.45.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Feb 2023 00:45:17 -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 16/17] android: boot: support bootconfig In-Reply-To: References: <20230126160506.1026643-1-souajih@baylibre.com> <20230126160506.1026643-17-souajih@baylibre.com> Date: Wed, 01 Feb 2023 09:45:16 +0100 Message-ID: <87edr9ixk3.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:55, Simon Glass wrote: > Hi Safae, > > On Thu, 26 Jan 2023 at 09:05, Safae Ouajih wrote: >> >> This adds support for Bootconfig feature. >> - The bootconfig feature replaces the androidboot.* >> kernel cmdline options. >> >> This was adapted from downstream [1] commit : 7af0a0506d4d ("cuttlefish: >> support bootconfig parameters"). >> >> Link:[1] https://android.googlesource.com/platform/external/u-boot/ >> >> Signed-off-by: Safae Ouajih >> --- >> boot/image-android.c | 58 +++++++++++++++++++++++++++++++++++++++-- >> include/android_image.h | 11 ++++++++ >> 2 files changed, 67 insertions(+), 2 deletions(-) > > Reviewed-by: Simon Glass Reviewed-by: Mattijs Korpershoek > > nit below > > [..] > >> diff --git a/include/android_image.h b/include/android_image.h >> index 351e17750e..6e1afae4c0 100644 >> --- a/include/android_image.h >> +++ b/include/android_image.h >> @@ -25,6 +25,14 @@ >> #define ANDR_VENDOR_BOOT_ARGS_SIZE 2048 >> #define ANDR_VENDOR_BOOT_NAME_SIZE 16 >> >> +#define BOOTCONFIG_MAGIC "#BOOTCONFIG\n" >> +#define BOOTCONFIG_MAGIC_SIZE 12 >> +#define BOOTCONFIG_SIZE_SIZE 4 >> +#define BOOTCONFIG_CHECKSUM_SIZE 4 >> +#define BOOTCONFIG_TRAILER_SIZE BOOTCONFIG_MAGIC_SIZE + \ >> + BOOTCONFIG_SIZE_SIZE + \ >> + BOOTCONFIG_CHECKSUM_SIZE >> + >> struct andr_boot_img_hdr_v3 { >> u8 magic[ANDR_BOOT_MAGIC_SIZE]; >> >> @@ -333,6 +341,9 @@ struct andr_image_data { >> ulong recovery_dtbo_ptr; >> u32 recovery_dtbo_size; >> >> + ulong bootconfig_addr; >> + ulong bootconfig_size; >> + >> const char *kcmdline; >> const char *kcmdline_extra; >> const char *image_name; >> -- >> 2.34.1 >> > > That struct needs a full comment > > REgards, > Simon