mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Roland Hieber <rhi@pengutronix.de>
To: AVazquez <avazquez.dev@gmail.com>
Cc: Michael Olbrich <m.olbrich@pengutronix.de>, ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH v2] ptxd_make_fit_image: Add support for kernel load/entry addresses
Date: Fri, 13 Nov 2020 16:02:56 +0100	[thread overview]
Message-ID: <20201113150256.57mnuavpcojtvslc@pengutronix.de> (raw)
In-Reply-To: <20201113084647.GC3748985@dude03.red.stw.pengutronix.de>

On Fri, Nov 13, 2020 at 09:46:47AM +0100, Michael Olbrich wrote:
> On Wed, Nov 11, 2020 at 04:23:39PM +0100, avazquez.dev@gmail.com wrote:
> > 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.

You can also use the <<- operator here instead to strip all leading tabs
from the here-document, so the ending EOF can be indented as well and
doesn't disturb the reading. It's even specified for POSIX sh too [1] :)
So:

	if [ ... ]; then
		cat <<-EOF
			load = <$(ptxd_get_ptxconf PTXCONF_KERNEL_FIT_LOAD)>;
		EOF
	fi

[1]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_07_04

 - Roland


> > +			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";

-- 
Roland Hieber, Pengutronix e.K.          | r.hieber@pengutronix.de     |
Steuerwalder Str. 21                     | https://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@pengutronix.de

  parent reply	other threads:[~2020-11-13 15:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-11 15:23 avazquez.dev
2020-11-13  8:46 ` Michael Olbrich
2020-11-13  8:54   ` Guillermo Rodriguez Garcia
2020-11-13  8:57   ` Sascha Hauer
2020-11-13 15:02   ` Roland Hieber [this message]
2020-11-16  8:30   ` Alex Vazquez
2020-11-16  8:35     ` Michael Olbrich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201113150256.57mnuavpcojtvslc@pengutronix.de \
    --to=rhi@pengutronix.de \
    --cc=avazquez.dev@gmail.com \
    --cc=m.olbrich@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox