From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Date: Wed, 11 Nov 2020 09:59:44 +0100 From: Sascha Hauer Message-ID: <20201111085944.GT29830@pengutronix.de> References: <1604999513-21229-1-git-send-email-avazquez.dev@gmail.com> <7181a38d7dcecc82f1ba700b53f77f1c35ac6aa0.camel@diehl.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: 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: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: Alex Vazquez Cc: ptxdist@pengutronix.de On Wed, Nov 11, 2020 at 09:47:42AM +0100, Alex Vazquez wrote: > According to the FIT image specification, these properties are mandato= ry. > [1]https://gitlab.denx.de/u-boot/u-boot/-/blob/master/doc/uImage.FIT/s= ource_file_format.txt Putting a load address into the FIT image means that the image can run only on boards which have SDRAM there. We can build zImages which run on a variety of different boards and SoCs, so to me it doesn't make sense to limit this image to a single board only forced the container format. For this reason barebox deliberately ignores the absence of these properties. That said, you shouldn't set these properties when not explicitly wanted by the user, so the default should be that the properties are not there. Sascha > I have verified that u-boot fails to boot if these properties are not > specified > ## Loading kernel from FIT Image at c2000000 ... > =A0 =A0Using 'conf-1' configuration > =A0 =A0Trying 'kernel' kernel subimage > =A0 =A0 =A0Description: =A0kernel > =A0 =A0 =A0Created: =A0 =A0 =A02020-09-01 =A0 0:00:00 UTC > =A0 =A0 =A0Type: =A0 =A0 =A0 =A0 Kernel Image > =A0 =A0 =A0Compression: =A0uncompressed > =A0 =A0 =A0Data Start: =A0 0xc20000b4 > =A0 =A0 =A0Data Size: =A0 =A07329320 Bytes =3D 7 MiB > =A0 =A0 =A0Architecture: ARM > =A0 =A0 =A0OS: =A0 =A0 =A0 =A0 =A0 Linux > =A0 =A0 =A0Load Address: unavailable > =A0 =A0 =A0Entry Point: =A0unavailable > =A0 =A0 =A0Hash algo: =A0 =A0sha256 > =A0 =A0 =A0Hash value: =A0 > 1d5ceba5d651e2b9bede9945427a7b759fe4891812eb9a67c53ecd4544c8fae8 > =A0 =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 > (<[2]denis.osterland@diehl.com>) escribi=F3: > = > 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 > [3]avazquez.dev@gmail.com: > > From: AVazquez <[4]avazquez.dev@gmail.com> > > > > Add mandatory properties for types kernel and ramdisk. > > > > Signed-off-by: AVazquez <[5]avazquez.dev@gmail.com> > > --- > >=A0 platforms/[6]kernel-fit.in=A0 =A0 =A0 =A0 =A0 =A0 | 10 ++++++++= ++ > >=A0 scripts/lib/ptxd_make_fit_image.sh |=A0 4 ++++ > >=A0 2 files changed, 14 insertions(+) > > > > diff --git a/platforms/[7]kernel-fit.in b/platforms/[8]kernel-fit.= in > > index 8cbc1a8..d917a97 100644 > > --- a/platforms/[9]kernel-fit.in > > +++ b/platforms/[10]kernel-fit.in > > @@ -17,6 +17,16 @@ menuconfig KERNEL_FIT > > > >=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" > > + > >=A0 config KERNEL_FIT_SIGNED > >=A0 bool > >=A0 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() { > >=A0 data =3D /incbin/("${image_kernel}"); > >=A0 type =3D "kernel"; > >=A0 arch =3D "$(ptxd_get_ptxconf PTXCONF_ARCH_STRING)"; > > +os =3D "linux"; > >=A0 compression =3D "none"; > > +load =3D <$(ptxd_get_ptxconf PTXCONF_KERNEL_FIT_LOAD)>; > > +entry =3D <$(ptxd_get_ptxconf PTXCONF_KERNEL_FIT_ENTRY)>; > >=A0 hash-1 { > >=A0 algo =3D "sha256"; > >=A0 }; > > @@ -33,6 +36,7 @@ EOF > >=A0 description =3D "initramfs"; > >=A0 data =3D /incbin/("${image_initramfs}"); > >=A0 type =3D "ramdisk"; > > +os =3D "linux"; > >=A0 compression =3D "none"; > >=A0 hash-1 { > >=A0 algo =3D "sha256"; > Diehl Connectivity Solutions GmbH > Gesch=E4ftsf=FChrung: Horst Leonberger > Sitz der Gesellschaft: N=FCrnberg - Registergericht: Amtsgericht > N=FCrnberg: 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 unters= agt. > = > - Informationen zum Datenschutz, insbesondere zu Ihren Rechten, erha= lten > Sie unter: > = > [11]https://www.diehl.com/group/de/transparenz-und-informationspflic= hten/ > = > The contents of the above mentioned e-mail is not legally binding. T= his > 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-ma= il > is strictly prohibited. > = > - For general information on data protection and your respective rig= hts > please visit: > = > [12]https://www.diehl.com/group/en/transparency-and-information-obli= gations/ > = > _______________________________________________ > ptxdist mailing list > [13]ptxdist@pengutronix.de > To unsubscribe, send a mail with subject "unsubscribe" to > [14]ptxdist-request@pengutronix.de > = > References > = > Visible links > 1. https://gitlab.denx.de/u-boot/u-boot/-/blob/master/doc/uImage.FIT/s= ource_file_format.txt > 2. mailto:denis.osterland@diehl.com > 3. mailto:avazquez.dev@gmail.com > 4. mailto:avazquez.dev@gmail.com > 5. mailto:avazquez.dev@gmail.com > 6. http://kernel-fit.in/ > 7. http://kernel-fit.in/ > 8. http://kernel-fit.in/ > 9. http://kernel-fit.in/ > 10. http://kernel-fit.in/ > 11. https://www.diehl.com/group/de/transparenz-und-informationspflichte= n/ > 12. https://www.diehl.com/group/en/transparency-and-information-obligat= ions/ > 13. mailto:ptxdist@pengutronix.de > 14. mailto:ptxdist-request@pengutronix.de > _______________________________________________ > ptxdist mailing list > ptxdist@pengutronix.de > To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request= @pengutronix.de -- = Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@p= engutronix.de