From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-yb1-xb2f.google.com ([2607:f8b0:4864:20::b2f]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kclnH-0002ey-87 for ptxdist@pengutronix.de; Wed, 11 Nov 2020 09:47:56 +0100 Received: by mail-yb1-xb2f.google.com with SMTP id k65so1225332ybk.5 for ; Wed, 11 Nov 2020 00:47:55 -0800 (PST) MIME-Version: 1.0 References: <1604999513-21229-1-git-send-email-avazquez.dev@gmail.com> <7181a38d7dcecc82f1ba700b53f77f1c35ac6aa0.camel@diehl.com> In-Reply-To: <7181a38d7dcecc82f1ba700b53f77f1c35ac6aa0.camel@diehl.com> From: Alex Vazquez Date: Wed, 11 Nov 2020 09:47:42 +0100 Message-ID: Subject: Re: [ptxdist] [PATCH] ptxd_make_fit_image: Add mandatory properties List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: multipart/mixed; boundary="===============0963380984==" Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de --===============0963380984== Content-Type: multipart/alternative; boundary="000000000000e2bab205b3d0d939" --000000000000e2bab205b3d0d939 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable According to the FIT image specification, these properties are mandatory. https://gitlab.denx.de/u-boot/u-boot/-/blob/master/doc/uImage.FIT/source_fi= le_format.txt I have verified that u-boot fails to boot if these properties are not specified ## Loading kernel from FIT Image at c2000000 ... Using 'conf-1' configuration Trying 'kernel' kernel subimage Description: kernel Created: 2020-09-01 0:00:00 UTC Type: Kernel Image Compression: uncompressed Data Start: 0xc20000b4 Data Size: 7329320 Bytes =3D 7 MiB Architecture: ARM OS: Linux Load Address: unavailable Entry Point: unavailable Hash algo: sha256 Hash value: 1d5ceba5d651e2b9bede9945427a7b759fe4891812eb9a67c53ecd4544c8fae8 Verifying Hash Integrity ... sha256+ OK Can't get image load address! Regards, Alex El mar., 10 nov. 2020 a las 15:38, Denis Osterland-Heim (< denis.osterland@diehl.com>) escribi=C3=B3: > Hi, > > AFAIK bootloaders should have reasonable defaults for this values. > So they should be optional. > > Regrads, Denis > > Am Dienstag, den 10.11.2020, 10:11 +0100 schrieb avazquez.dev@gmail.com: > > From: AVazquez > > > > Add mandatory properties for types kernel and ramdisk. > > > > Signed-off-by: AVazquez > > --- > > platforms/kernel-fit.in | 10 ++++++++++ > > scripts/lib/ptxd_make_fit_image.sh | 4 ++++ > > 2 files changed, 14 insertions(+) > > > > diff --git a/platforms/kernel-fit.in b/platforms/kernel-fit.in > > index 8cbc1a8..d917a97 100644 > > --- a/platforms/kernel-fit.in > > +++ b/platforms/kernel-fit.in > > @@ -17,6 +17,16 @@ menuconfig KERNEL_FIT > > > > if KERNEL_FIT > > > > +config KERNEL_FIT_LOAD > > +string > > +default "0xC0008000" > > +prompt "Kernel load address" > > + > > +config KERNEL_FIT_ENTRY > > +string > > +default "0xC0008000" > > +prompt "Kernel entry address" > > + > > config KERNEL_FIT_SIGNED > > bool > > prompt "sign FIT image" > > diff --git a/scripts/lib/ptxd_make_fit_image.sh > b/scripts/lib/ptxd_make_fit_image.sh > > index 9754d1e..4314b0e 100644 > > --- a/scripts/lib/ptxd_make_fit_image.sh > > +++ b/scripts/lib/ptxd_make_fit_image.sh > > @@ -21,7 +21,10 @@ ptxd_make_image_fit_its() { > > data =3D /incbin/("${image_kernel}"); > > type =3D "kernel"; > > arch =3D "$(ptxd_get_ptxconf PTXCONF_ARCH_STRING)"; > > +os =3D "linux"; > > compression =3D "none"; > > +load =3D <$(ptxd_get_ptxconf PTXCONF_KERNEL_FIT_LOAD)>; > > +entry =3D <$(ptxd_get_ptxconf PTXCONF_KERNEL_FIT_ENTRY)>; > > hash-1 { > > algo =3D "sha256"; > > }; > > @@ -33,6 +36,7 @@ EOF > > description =3D "initramfs"; > > data =3D /incbin/("${image_initramfs}"); > > type =3D "ramdisk"; > > +os =3D "linux"; > > compression =3D "none"; > > hash-1 { > > algo =3D "sha256"; > Diehl Connectivity Solutions GmbH > Gesch=C3=A4ftsf=C3=BChrung: Horst Leonberger > Sitz der Gesellschaft: N=C3=BCrnberg - Registergericht: Amtsgericht > N=C3=BCrnberg: HRB 32315 > > ________________________________ > > Der Inhalt der vorstehenden E-Mail ist nicht rechtlich bindend. Diese > E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen= . > Informieren Sie uns bitte, wenn Sie diese E-Mail faelschlicherweise > erhalten haben. Bitte loeschen Sie in diesem Fall die Nachricht. > Jede unerlaubte Form der Reproduktion, Bekanntgabe, Aenderung, Verteilung > und/oder Publikation dieser E-Mail ist strengstens untersagt. > > - Informationen zum Datenschutz, insbesondere zu Ihren Rechten, erhalten > Sie unter: > > https://www.diehl.com/group/de/transparenz-und-informationspflichten/ > > The contents of the above mentioned e-mail is not legally binding. This > e-mail contains confidential and/or legally protected information. Please > inform us if you have received this e-mail by > mistake and delete it in such a case. Each unauthorized reproduction, > disclosure, alteration, distribution and/or publication of this e-mail is > strictly prohibited. > > - For general information on data protection and your respective rights > please visit: > > https://www.diehl.com/group/en/transparency-and-information-obligations/ > > > _______________________________________________ > ptxdist mailing list > ptxdist@pengutronix.de > To unsubscribe, send a mail with subject "unsubscribe" to > ptxdist-request@pengutronix.de > --000000000000e2bab205b3d0d939 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
According to the FIT image specification, these properties= are mandatory.
https://gitlab.denx.de/u-boot/= u-boot/-/blob/master/doc/uImage.FIT/source_file_format.txt

= I have verified that u-boot fails to boot if these properties are not speci= fied

## Loading kernel from FIT Image at c2000000 = ...
=C2=A0 =C2=A0Using 'conf-1' configuration
=C2=A0 =C2=A0Tr= ying 'kernel' kernel subimage
=C2=A0 =C2=A0 =C2=A0Description: = =C2=A0kernel
=C2=A0 =C2=A0 =C2=A0Created: =C2=A0 =C2=A0 =C2=A02020-09-01= =C2=A0 0:00:00 UTC
=C2=A0 =C2=A0 =C2=A0Type: =C2=A0 =C2=A0 =C2=A0 =C2= =A0 Kernel Image
=C2=A0 =C2=A0 =C2=A0Compression: =C2=A0uncompressed
= =C2=A0 =C2=A0 =C2=A0Data Start: =C2=A0 0xc20000b4
=C2=A0 =C2=A0 =C2=A0Da= ta Size: =C2=A0 =C2=A07329320 Bytes =3D 7 MiB
=C2=A0 =C2=A0 =C2=A0Archit= ecture: ARM
=C2=A0 =C2=A0 =C2=A0OS: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 L= inux
=C2=A0 =C2=A0 =C2=A0Load Address: unavailable
=C2=A0 =C2=A0 =C2= =A0Entry Point: =C2=A0unavailable
=C2=A0 =C2=A0 =C2=A0Hash algo: =C2=A0 = =C2=A0sha256
=C2=A0 =C2=A0 =C2=A0Hash value: =C2=A0 1d5ceba5d651e2b9bede= 9945427a7b759fe4891812eb9a67c53ecd4544c8fae8
=C2=A0 =C2=A0Verifying Hash= Integrity ... sha256+ OK
Can't get image load address!

Regards, Alex


El mar., 10 nov. 2020 a las 15:= 38, Denis Osterland-Heim (<= denis.osterland@diehl.com>) escribi=C3=B3:
Hi,

AFAIK bootloaders should have reasonable defaults for this values.
So they should be optional.

Regrads, Denis

Am Dienstag, den 10.11.2020, 10:11 +0100 schrieb avazquez.dev@gmail.com:
> From: AVazquez <avazquez.dev@gmail.com>
>
> Add mandatory properties for types kernel and ramdisk.
>
> Signed-off-by: AVazquez <avazquez.dev@gmail.com>
> ---
>=C2=A0 platforms/kernel-fit.in=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = | 10 ++++++++++
>=C2=A0 scripts/lib/ptxd_make_fit_image.sh |=C2=A0 4 ++++
>=C2=A0 2 files changed, 14 insertions(+)
>
> diff --git a/platforms/kernel-fit.in b/platforms/kernel-fit.in
> index 8cbc1a8..d917a97 100644
> --- a/platforms/kernel-fit.in
> +++ b/platforms/kernel-fit.in
> @@ -17,6 +17,16 @@ menuconfig KERNEL_FIT
>
>=C2=A0 if KERNEL_FIT
>
> +config KERNEL_FIT_LOAD
> +string
> +default "0xC0008000"
> +prompt "Kernel load address"
> +
> +config KERNEL_FIT_ENTRY
> +string
> +default "0xC0008000"
> +prompt "Kernel entry address"
> +
>=C2=A0 config KERNEL_FIT_SIGNED
>=C2=A0 bool
>=C2=A0 prompt "sign FIT image"
> diff --git a/scripts/lib/ptxd_make_fit_image.sh b/scripts/lib/ptxd_mak= e_fit_image.sh
> index 9754d1e..4314b0e 100644
> --- a/scripts/lib/ptxd_make_fit_image.sh
> +++ b/scripts/lib/ptxd_make_fit_image.sh
> @@ -21,7 +21,10 @@ ptxd_make_image_fit_its() {
>=C2=A0 data =3D /incbin/("${image_kernel}");
>=C2=A0 type =3D "kernel";
>=C2=A0 arch =3D "$(ptxd_get_ptxconf PTXCONF_ARCH_STRING)"; > +os =3D "linux";
>=C2=A0 compression =3D "none";
> +load =3D <$(ptxd_get_ptxconf PTXCONF_KERNEL_FIT_LOAD)>;
> +entry =3D <$(ptxd_get_ptxconf PTXCONF_KERNEL_FIT_ENTRY)>;
>=C2=A0 hash-1 {
>=C2=A0 algo =3D "sha256";
>=C2=A0 };
> @@ -33,6 +36,7 @@ EOF
>=C2=A0 description =3D "initramfs";
>=C2=A0 data =3D /incbin/("${image_initramfs}");
>=C2=A0 type =3D "ramdisk";
> +os =3D "linux";
>=C2=A0 compression =3D "none";
>=C2=A0 hash-1 {
>=C2=A0 algo =3D "sha256";
Diehl Connectivity Solutions GmbH
Gesch=C3=A4ftsf=C3=BChrung: Horst Leonberger
Sitz der Gesellschaft: N=C3=BCrnberg - Registergericht: Amtsgericht
N=C3=BCrnberg: HRB 32315

________________________________

Der Inhalt der vorstehenden E-Mail ist nicht rechtlich bindend. Diese E-Mai= l enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen.
Informieren Sie uns bitte, wenn Sie diese E-Mail faelschlicherweise erhalte= n haben. Bitte loeschen Sie in diesem Fall die Nachricht.
Jede unerlaubte Form der Reproduktion, Bekanntgabe, Aenderung, Verteilung u= nd/oder Publikation dieser E-Mail ist strengstens untersagt.

- Informationen zum Datenschutz, insbesondere zu Ihren Rechten, erhalten Si= e unter:

https://www.diehl.com/group/de/= transparenz-und-informationspflichten/

The contents of the above mentioned e-mail is not legally binding. This e-m= ail contains confidential and/or legally protected information. Please info= rm us if you have received this e-mail by
mistake and delete it in such a case. Each unauthorized reproduction, discl= osure, alteration, distribution and/or publication of this e-mail is strict= ly prohibited.

- For general information on data protection and your respective rights ple= ase visit:

https://www.diehl.com/group/= en/transparency-and-information-obligations/


_______________________________________________
ptxdist mailing list
ptxdist@pengutr= onix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-reques= t@pengutronix.de
--000000000000e2bab205b3d0d939-- --===============0963380984== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de --===============0963380984==--