From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Date: Fri, 13 Nov 2020 09:46:47 +0100 From: Michael Olbrich Message-ID: <20201113084647.GC3748985@dude03.red.stw.pengutronix.de> References: <1605108219-18450-1-git-send-email-avazquez.dev@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1605108219-18450-1-git-send-email-avazquez.dev@gmail.com> Subject: Re: [ptxdist] [PATCH v2] ptxd_make_fit_image: Add support for kernel load/entry addresses 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="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de Cc: AVazquez , Sascha Hauer On Wed, Nov 11, 2020 at 04:23:39PM +0100, avazquez.dev@gmail.com wrote: > From: AVazquez > > Make it possible to specify load/entry addresses for the kernel. > These are required by the FIT image specification, but in some cases > users may not want to include them, so they are made optional. > > Also add mandatory "os" property for kernel and ramdisk. > > Signed-off-by: AVazquez > --- > Changes since v1: > - load/entry addresses made optional > > platforms/kernel-fit.in | 8 ++++++++ > scripts/lib/ptxd_make_fit_image.sh | 14 ++++++++++++++ > 2 files changed, 22 insertions(+) > > diff --git a/platforms/kernel-fit.in b/platforms/kernel-fit.in > index 8cbc1a8..b5f9da6 100644 > --- a/platforms/kernel-fit.in > +++ b/platforms/kernel-fit.in > @@ -17,6 +17,14 @@ menuconfig KERNEL_FIT > > if KERNEL_FIT > > +config KERNEL_FIT_LOAD > + string > + prompt "Kernel load address (optional)" I'd like some help text here to clarify when this is needed. From what I understand from the discussion, u-boots requires this, right? But barebox does not? Never, or does it depend on the kernel image type? Sascha, can you help here? > + > +config KERNEL_FIT_ENTRY > + string > + prompt "Kernel entry address (optional)" The same here. > + > 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..1edf5c5 100644 > --- a/scripts/lib/ptxd_make_fit_image.sh > +++ b/scripts/lib/ptxd_make_fit_image.sh > @@ -21,7 +21,20 @@ ptxd_make_image_fit_its() { > data = /incbin/("${image_kernel}"); > type = "kernel"; > arch = "$(ptxd_get_ptxconf PTXCONF_ARCH_STRING)"; > + os = "linux"; Sascha, setting this is ok for barebox, right? > compression = "none"; > +EOF > + if [ -n "$(ptxd_get_ptxconf PTXCONF_KERNEL_FIT_LOAD)" ]; then > + cat << EOF The code should be indented to align with the code above. if [ ... ]; then cat << EOF I think. > + load = <$(ptxd_get_ptxconf PTXCONF_KERNEL_FIT_LOAD)>; > +EOF > + fi > + if [ -n "$(ptxd_get_ptxconf PTXCONF_KERNEL_FIT_ENTRY)" ]; then > + cat << EOF same here. Michael > + entry = <$(ptxd_get_ptxconf PTXCONF_KERNEL_FIT_ENTRY)>; > +EOF > + fi > + cat << EOF > hash-1 { > algo = "sha256"; > }; > @@ -33,6 +46,7 @@ EOF > description = "initramfs"; > data = /incbin/("${image_initramfs}"); > type = "ramdisk"; > + os = "linux"; > compression = "none"; > hash-1 { > algo = "sha256"; > -- > 1.9.1 > > > _______________________________________________ > ptxdist mailing list > ptxdist@pengutronix.de > To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de > _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de