mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH v2] ptxd_make_fit_image: Add support for kernel load/entry addresses
@ 2020-11-11 15:23 avazquez.dev
  2020-11-13  8:46 ` Michael Olbrich
  0 siblings, 1 reply; 7+ messages in thread
From: avazquez.dev @ 2020-11-11 15:23 UTC (permalink / raw)
  To: ptxdist; +Cc: AVazquez

From: AVazquez <avazquez.dev@gmail.com>

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 <avazquez.dev@gmail.com>
---
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)"
+
+config KERNEL_FIT_ENTRY
+	string
+	prompt "Kernel entry address (optional)"
+
 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";
 			compression = "none";
+EOF
+			if [ -n "$(ptxd_get_ptxconf PTXCONF_KERNEL_FIT_LOAD)" ]; then
+			cat << EOF
+			load = <$(ptxd_get_ptxconf PTXCONF_KERNEL_FIT_LOAD)>;
+EOF
+			fi
+			if [ -n "$(ptxd_get_ptxconf PTXCONF_KERNEL_FIT_ENTRY)" ]; then
+			cat << EOF
+			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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ptxdist] [PATCH v2] ptxd_make_fit_image: Add support for kernel load/entry addresses
  2020-11-11 15:23 [ptxdist] [PATCH v2] ptxd_make_fit_image: Add support for kernel load/entry addresses avazquez.dev
@ 2020-11-13  8:46 ` Michael Olbrich
  2020-11-13  8:54   ` Guillermo Rodriguez Garcia
                     ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Michael Olbrich @ 2020-11-13  8:46 UTC (permalink / raw)
  To: ptxdist; +Cc: AVazquez, Sascha Hauer

On Wed, Nov 11, 2020 at 04:23:39PM +0100, avazquez.dev@gmail.com wrote:
> From: AVazquez <avazquez.dev@gmail.com>
> 
> 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 <avazquez.dev@gmail.com>
> ---
> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ptxdist] [PATCH v2] ptxd_make_fit_image: Add support for kernel load/entry addresses
  2020-11-13  8:46 ` Michael Olbrich
@ 2020-11-13  8:54   ` Guillermo Rodriguez Garcia
  2020-11-13  8:57   ` Sascha Hauer
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Guillermo Rodriguez Garcia @ 2020-11-13  8:54 UTC (permalink / raw)
  To: ptxdist, AVazquez, Sascha Hauer

Hi Michael,

El vie., 13 nov. 2020 a las 9:46, Michael Olbrich
(<m.olbrich@pengutronix.de>) escribió:
>
> On Wed, Nov 11, 2020 at 04:23:39PM +0100, avazquez.dev@gmail.com wrote:
> > From: AVazquez <avazquez.dev@gmail.com>
> >
> > 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 <avazquez.dev@gmail.com>
> > ---
> > 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?

According to the FIT image specification, the "load" and "entry"
properties are mandatory for the "kernel" node. See:
https://gitlab.denx.de/u-boot/u-boot/-/blob/master/doc/uImage.FIT/source_file_format.txt#L181
So for a valid FIT image these properties should always be present.
However according to Sascha, Barebox does not enforce this (and
actually ignores the properties even if they are present?).
U-boot certainly requires them.

Guillermo

>
> 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



-- 
Guillermo Rodriguez Garcia
guille.rodriguez@gmail.com

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ptxdist] [PATCH v2] ptxd_make_fit_image: Add support for kernel load/entry addresses
  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
  2020-11-16  8:30   ` Alex Vazquez
  3 siblings, 0 replies; 7+ messages in thread
From: Sascha Hauer @ 2020-11-13  8:57 UTC (permalink / raw)
  To: Michael Olbrich; +Cc: AVazquez, ptxdist

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:
> > From: AVazquez <avazquez.dev@gmail.com>
> > 
> > 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 <avazquez.dev@gmail.com>
> > ---
> > 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?

Until recently barebox completely ignored this option, but now barebox
will honor them when they exist. This means that once you add the kernel
load address the FIT image will only be usable on SoCs/boards which have
free memory on that address.

On U-Boot this option is mandatory.

> 
> 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?

Yes, barebox ignores it.

Sascha

-- 
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@pengutronix.de

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ptxdist] [PATCH v2] ptxd_make_fit_image: Add support for kernel load/entry addresses
  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
  2020-11-16  8:30   ` Alex Vazquez
  3 siblings, 0 replies; 7+ messages in thread
From: Roland Hieber @ 2020-11-13 15:02 UTC (permalink / raw)
  To: AVazquez; +Cc: Michael Olbrich, ptxdist

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ptxdist] [PATCH v2] ptxd_make_fit_image: Add support for kernel load/entry addresses
  2020-11-13  8:46 ` Michael Olbrich
                     ` (2 preceding siblings ...)
  2020-11-13 15:02   ` Roland Hieber
@ 2020-11-16  8:30   ` Alex Vazquez
  2020-11-16  8:35     ` Michael Olbrich
  3 siblings, 1 reply; 7+ messages in thread
From: Alex Vazquez @ 2020-11-16  8:30 UTC (permalink / raw)
  To: ptxdist, AVazquez, Sascha Hauer

El vie., 13 nov. 2020 a las 9:46, Michael Olbrich
(<m.olbrich@pengutronix.de>) escribió:
>
> On Wed, Nov 11, 2020 at 04:23:39PM +0100, avazquez.dev@gmail.com wrote:
> > From: AVazquez <avazquez.dev@gmail.com>
> >
> > 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 <avazquez.dev@gmail.com>
> > ---
> > 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?
>

Ok, I add some help text.

> 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.
>

You are right.
I will prepare a new patch v3.
Any more changes?

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ptxdist] [PATCH v2] ptxd_make_fit_image: Add support for kernel load/entry addresses
  2020-11-16  8:30   ` Alex Vazquez
@ 2020-11-16  8:35     ` Michael Olbrich
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Olbrich @ 2020-11-16  8:35 UTC (permalink / raw)
  To: ptxdist; +Cc: AVazquez, Sascha Hauer

On Mon, Nov 16, 2020 at 09:30:25AM +0100, Alex Vazquez wrote:
> El vie., 13 nov. 2020 a las 9:46, Michael Olbrich
> (<m.olbrich@pengutronix.de>) escribió:
> >
> > On Wed, Nov 11, 2020 at 04:23:39PM +0100, avazquez.dev@gmail.com wrote:
> > > From: AVazquez <avazquez.dev@gmail.com>
> > >
> > > 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 <avazquez.dev@gmail.com>
> > > ---
> > > 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?
> >
> 
> Ok, I add some help text.
> 
> > 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.
> >
> 
> You are right.
> I will prepare a new patch v3.
> Any more changes?

No, I think that's it.

Michael

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

-- 
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@pengutronix.de

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-11-16  8:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-11 15:23 [ptxdist] [PATCH v2] ptxd_make_fit_image: Add support for kernel load/entry addresses 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
2020-11-16  8:30   ` Alex Vazquez
2020-11-16  8:35     ` Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox