Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2676159lqb; Tue, 28 May 2024 07:14:49 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWm8ZaFhgzUbmhLum2AqhJwPr4c9kr+TMf4nO91ztl1uMv5Ti9yWVFNBOhABqpW38JYLbr8oBg2fGtcz7vJp5rSHu8nZ9FVj1M78TZrQQ== X-Google-Smtp-Source: AGHT+IHOWCOxTfEpwWiombYXlUFeKHn8A6m4tPFWoNmWjbscgqj7ODLScoQ5Rb7zuqJuDg5TRLG9 X-Received: by 2002:a05:6a20:6a03:b0:1b0:1ce0:1a2e with SMTP id adf61e73a8af0-1b212dafd87mr13462660637.19.1716905688956; Tue, 28 May 2024 07:14:48 -0700 (PDT) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d2e1a72fcca58-6f8fc373cb4si8132471b3a.123.2024.05.28.07.14.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 07:14:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-192505-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@chromium.org header.s=google header.b=Whohw+07; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-192505-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192505-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id D18FA285DD1 for ; Tue, 28 May 2024 14:14:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 45CAA16F83D; Tue, 28 May 2024 14:14:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="Whohw+07" Received: from mail-qv1-f52.google.com (mail-qv1-f52.google.com [209.85.219.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9C93A16F83A for ; Tue, 28 May 2024 14:14:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716905676; cv=none; b=nbAhi+H3d1oYj0WP7LPDcEv3jJvAwda6s5RnfnaKjnMpSZU2JPIz2RlJBG8LeGP2ddyfqCJfFIhOSqAL5mzdNtyEKvW3RthJ9HkZKzori56tQSUr3J6D+Hgso9wb92ED6+PBk9cjL1VTVmCrHSUv2cSRNxu7xEDz+zU8F8gCVIY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716905676; c=relaxed/simple; bh=gknVVZDrcAnrDDzqKNaNI9z03xkLRzYl9GLjv9HkC1Y=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=PqOf6eAFGLInEktgGtggCXPZ/8T2Sj6B3uMUM5I6kJGEAGV7fCkZtJLJ+pNJ/vw6CbZuttrCnLpBtHMB/zEKi5QCIOsLkbTiKAxWWBGD4XURu3WqgK2pwhjbUag2nszV/1wtdUzm1fEmxC/ntXkwK85HtRluOjHExhYu/m7qVQg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=Whohw+07; arc=none smtp.client-ip=209.85.219.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-qv1-f52.google.com with SMTP id 6a1803df08f44-6ab9dacc38fso4212556d6.2 for ; Tue, 28 May 2024 07:14:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1716905673; x=1717510473; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=9gu3wKWOoXrILYJvRJgKFCPnUxXEiCQVkjQKAjWWpZY=; b=Whohw+07bdbAEtUd/cRCTAeQSqPWU4AQwo16yrzElashvKacVJZEUYaRb3r16MjKtu xs/w75d4RH749KNLT4WLlw0P28lGninhuztGbrWwBtmmmsuEL/EKYwCSOvSm3o8Xucvk ylZgjQOAq+1b+KYI3/cevB/U7HxdmKeR+Jt48= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716905673; x=1717510473; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9gu3wKWOoXrILYJvRJgKFCPnUxXEiCQVkjQKAjWWpZY=; b=Rsg/ycPpV/YnBIVBmUGkfVbb/u7d5yCkBoMMPp3tpuRkKzZUz/tvzHbdZz3vWqTS3A QYrxYlYJvL+f5f6E3lMA8Vw01eFgQtPX5aScpnTHsioMmqU7wA1lv4hcfJ//+62YpOr+ Lg6PX29FDJUL3x2y+ROnrbVf77VAAzyw/+2TxaESZtVpUrfhEnn6GZO8xB3QkJL+Phor yHooOI518nUyILcMwP0S1WL/Pyq5EWLbbgCCCy9jez+a2EIJl6ZXGg7W5B4LHrZGs9dJ dKLmw81Buv3SjVkCfFMN/dUb8zIAL0Fp+Bu/biV2qRBkMZfHIbHM6FWwGjAePIshf99k ujlQ== X-Forwarded-Encrypted: i=1; AJvYcCU8XfB/x5robz+Y5u0mpJnj0jGXDkGo/jVbSnJzmB5/qicXCP9UbVAv5LZg65VHMbsjtBOVrIC83CJq27mBDCmLzgCRTPFdEIeFBBX6 X-Gm-Message-State: AOJu0YyPL42xrnuS4SmefjRLTwHVD9fBC6eFc0acw0E0BOXMvVWGvH/n zD5NUyuM5qUp3ghU6WwYVWrRVExG3Ldx9sHqbMy7Z+YlQx4rHqfjRbPDO8uQihJPNV3tSBYohhm 2+Xs9hP13TDuQ88W37iAG+W60PPEJnbgQdh6L X-Received: by 2002:a05:6214:5990:b0:6ad:78f2:fcd2 with SMTP id 6a1803df08f44-6ad78f2fe73mr79564096d6.29.1716905673414; Tue, 28 May 2024 07:14:33 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240521065107.30371-1-wenst@chromium.org> <20240521065107.30371-2-wenst@chromium.org> In-Reply-To: From: Simon Glass Date: Tue, 28 May 2024 08:14:22 -0600 Message-ID: Subject: Re: [PATCH 1/2] scripts/make_fit: Drop fdt image entry compatible string To: Chen-Yu Tsai Cc: wens@kernel.org, Masahiro Yamada , Nathan Chancellor , Nicolas Schier , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Chen-Yu, On Tue, 28 May 2024 at 02:31, Chen-Yu Tsai wrote: > > On Fri, May 24, 2024 at 9:01=E2=80=AFPM Simon Glass wr= ote: > > > > Hi ChenYu, > > > > On Fri, 24 May 2024 at 00:30, Chen-Yu Tsai wrote: > > > > > > Hi Simon, > > > > > > On Fri, May 24, 2024 at 1:38=E2=80=AFAM Simon Glass wrote: > > > > > > > > Hi ChenYu, > > > > > > > > On Thu, 23 May 2024 at 11:30, Chen-Yu Tsai wrote: > > > > > > > > > > On Fri, May 24, 2024 at 1:19=E2=80=AFAM Simon Glass wrote: > > > > > > > > > > > > Hi Chen-Yu, > > > > > > > > > > > > On Tue, 21 May 2024 at 00:51, Chen-Yu Tsai = wrote: > > > > > > > > > > > > > > According to the FIT image spec, the compatible string in the= fdt image > > > > > > > > > > > > Can you please add a link to where it says this in the spec? I = cannot > > > > > > find it after a short search. > > > > > > > > > > (Quick reply from my other email before I forget.) > > > > > > > > > > From the FIT source file format document, found in U-boot source > > > > > "doc/usage/fit/source_file_format.rst", or on the website: > > > > > https://docs.u-boot.org/en/latest/usage/fit/source_file_format.ht= ml > > > > > > > > > > Under "'/images' node" -> "Conditionally mandatory property", the > > > > > "compatible" property is described as "compatible method for load= ing image." > > > > > > > > > > I'll add the reference in the next version. > > > > > > > > OK thank you. > > > > > > > > There is also a spec version at [1] - it might be worth adding ment= ion > > > > of this explicitly for the fdt nodes. > > > > > > It seems that this is already mentioned? > > > > > > See https://github.com/open-source-firmware/flat-image-tree/blob/main= /source/chapter2-source-file-format.rst?plain=3D1#L343 > > > > I see that but I am suggesting that it could explicitly mention that > > the FDT should not have a compatible string for the model...that > > should only be in the configuration node. > > I sent a pull request on GitHub. The mailing list seemed very empty. Yes it is fairly new and the spec is pretty stable. Your PR is merged. Regards, Simon > > ChenYu > > > > > > > It looks like it was copied from U-boot directly. > > > > Yes mostly it is the same, but there were some changes. It has evolved > > slowly over the years but the bones of it is stable. > > > > Regards, > > Simon > > > > > > > > > > > Regards, > > > ChenYu > > > > > > > Regards, > > > > Simon > > > > > > > > [1] https://github.com/open-source-firmware/flat-image-tree/ > > > > > > > > > > > > > > > > > > > ChenYu > > > > > > > > > > > I believe this patch is correct. Since the information is in th= e > > > > > > configuration node it does not need to be in the FDT. > > > > > > > > > > > > > node or any image node specifies the method to load the image= , not the > > > > > > > compatible string embedded in the FDT or used for matching. > > > > > > > > > > > > > > Drop the compatible string from the fdt image entry node. > > > > > > > > > > > > > > While at it also fix up a typo in the document section of out= put_dtb. > > > > > > > > > > > > > > Fixes: 7a23b027ec17 ("arm64: boot: Support Flat Image Tree") > > > > > > > Signed-off-by: Chen-Yu Tsai > > > > > > > --- > > > > > > > scripts/make_fit.py | 3 +-- > > > > > > > 1 file changed, 1 insertion(+), 2 deletions(-) > > > > > > > > > > > > > > diff --git a/scripts/make_fit.py b/scripts/make_fit.py > > > > > > > index 3de90c5a094b..263147df80a4 100755 > > > > > > > --- a/scripts/make_fit.py > > > > > > > +++ b/scripts/make_fit.py > > > > > > > @@ -190,7 +190,7 @@ def output_dtb(fsw, seq, fname, arch, com= press): > > > > > > > Args: > > > > > > > fsw (libfdt.FdtSw): Object to use for writing > > > > > > > seq (int): Sequence number (1 for first) > > > > > > > - fmame (str): Filename containing the DTB > > > > > > > + fname (str): Filename containing the DTB > > > > > > > arch: FIT architecture, e.g. 'arm64' > > > > > > > compress (str): Compressed algorithm, e.g. 'gzip' > > > > > > > > > > > > > > @@ -211,7 +211,6 @@ def output_dtb(fsw, seq, fname, arch, com= press): > > > > > > > fsw.property_string('type', 'flat_dt') > > > > > > > fsw.property_string('arch', arch) > > > > > > > fsw.property_string('compression', compress) > > > > > > > - fsw.property('compatible', bytes(compat)) > > > > > > > > > > > > > > with open(fname, 'rb') as inf: > > > > > > > compressed =3D compress_data(inf, compress) > > > > > > > -- > > > > > > > 2.45.0.215.g3402c0e53f-goog > > > > > > > > > > > > > > > > > > > Regards, > > > > > > Simon > > > > > > > > > > > > _______________________________________________ > > > > > > linux-arm-kernel mailing list > > > > > > linux-arm-kernel@lists.infradead.org > > > > > > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel