All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] kernel-fitimage: Fix no reg property warning
@ 2018-08-29 22:59 Pierre-Jean Texier
  2018-08-30  5:58 ` Alex Kiernan
  0 siblings, 1 reply; 4+ messages in thread
From: Pierre-Jean Texier @ 2018-08-29 22:59 UTC (permalink / raw)
  To: openembedded-core

The DT specifications demands a unit-address of a node name to match the "reg"
property in that node. Newer dtc versions will throw warnings if this is
not the case.

Fixes the following warnings:

| <stdout>: Warning (unit_address_vs_reg): Node /images/kernel@1 has a unit name, but no reg property
| <stdout>: Warning (unit_address_vs_reg): Node /images/kernel@1/hash@1 has a unit name, but no reg property
| <stdout>: Warning (unit_address_vs_reg): Node /images/fdt@at91-sama5d27_som1_ek.dtb has a unit name, but no reg property
| <stdout>: Warning (unit_address_vs_reg): Node /images/fdt@at91-sama5d27_som1_ek.dtb/hash@1 has a unit name, but no reg property
| <stdout>: Warning (unit_address_vs_reg): Node /images/fdt@at91-sama5d27_som1_ek_pda4.dtb has a unit name, but no reg property
| <stdout>: Warning (unit_address_vs_reg): Node /images/fdt@at91-sama5d27_som1_ek_pda4.dtb/hash@1 has a unit name, but no reg property
| <stdout>: Warning (unit_address_vs_reg): Node /images/fdt@at91-sama5d27_som1_ek_pda7.dtb has a unit name, but no reg property
| <stdout>: Warning (unit_address_vs_reg): Node /images/fdt@at91-sama5d27_som1_ek_pda7.dtb/hash@1 has a unit name, but no reg property
| <stdout>: Warning (unit_address_vs_reg): Node /images/fdt@at91-sama5d27_som1_ek_pda7b.dtb has a unit name, but no reg property
| <stdout>: Warning (unit_address_vs_reg): Node /images/fdt@at91-sama5d27_som1_ek_pda7b.dtb/hash@1 has a unit name, but no reg property

Signed-off-by: Pierre-Jean Texier <texier.pj2@gmail.com>
---
Changes in V2:
	- rebase on master

 meta/classes/kernel-fitimage.bbclass | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/meta/classes/kernel-fitimage.bbclass b/meta/classes/kernel-fitimage.bbclass
index a4d7aca..3d7800a 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -109,7 +109,7 @@ fitimage_emit_section_kernel() {
 	fi
 
 	cat << EOF >> ${1}
-                kernel@${2} {
+                kernel-${2} {
                         description = "Linux kernel";
                         data = /incbin/("${3}");
                         type = "kernel";
@@ -118,7 +118,7 @@ fitimage_emit_section_kernel() {
                         compression = "${4}";
                         load = <${UBOOT_LOADADDRESS}>;
                         entry = <${ENTRYPOINT}>;
-                        hash@1 {
+                        hash-1 {
                                 algo = "${kernel_csum}";
                         };
                 };
@@ -145,14 +145,14 @@ fitimage_emit_section_dtb() {
 		dtb_loadline="load = <${UBOOT_DTB_LOADADDRESS}>;"
 	fi
 	cat << EOF >> ${1}
-                fdt@${2} {
+                fdt-${2} {
                         description = "Flattened Device Tree blob";
                         data = /incbin/("${3}");
                         type = "flat_dt";
                         arch = "${UBOOT_ARCH}";
                         compression = "none";
                         ${dtb_loadline}
-                        hash@1 {
+                        hash-1 {
                                 algo = "${dtb_csum}";
                         };
                 };
@@ -170,7 +170,7 @@ fitimage_emit_section_setup() {
 	setup_csum="sha1"
 
 	cat << EOF >> ${1}
-                setup@${2} {
+                setup-${2} {
                         description = "Linux setup.bin";
                         data = /incbin/("${3}");
                         type = "x86_setup";
@@ -179,7 +179,7 @@ fitimage_emit_section_setup() {
                         compression = "none";
                         load = <0x00090000>;
                         entry = <0x00090000>;
-                        hash@1 {
+                        hash-1 {
                                 algo = "${setup_csum}";
                         };
                 };
@@ -225,7 +225,7 @@ fitimage_emit_section_ramdisk() {
 	esac
 
 	cat << EOF >> ${1}
-                ramdisk@${2} {
+                ramdisk-${2} {
                         description = "${INITRAMFS_IMAGE}";
                         data = /incbin/("${3}");
                         type = "ramdisk";
@@ -234,7 +234,7 @@ fitimage_emit_section_ramdisk() {
                         compression = "${ramdisk_ctype}";
                         ${ramdisk_loadline}
                         ${ramdisk_entryline}
-                        hash@1 {
+                        hash-1 {
                                 algo = "${ramdisk_csum}";
                         };
                 };
@@ -269,39 +269,39 @@ fitimage_emit_section_config() {
 	if [ -n "${2}" ]; then
 		conf_desc="Linux kernel"
 		sep=", "
-		kernel_line="kernel = \"kernel@${2}\";"
+		kernel_line="kernel = \"kernel-${2}\";"
 	fi
 
 	if [ -n "${3}" ]; then
 		conf_desc="${conf_desc}${sep}FDT blob"
 		sep=", "
-		fdt_line="fdt = \"fdt@${3}\";"
+		fdt_line="fdt = \"fdt-${3}\";"
 	fi
 
 	if [ -n "${4}" ]; then
 		conf_desc="${conf_desc}${sep}ramdisk"
 		sep=", "
-		ramdisk_line="ramdisk = \"ramdisk@${4}\";"
+		ramdisk_line="ramdisk = \"ramdisk-${4}\";"
 	fi
 
 	if [ -n "${5}" ]; then
 		conf_desc="${conf_desc}${sep}setup"
-		setup_line="setup = \"setup@${5}\";"
+		setup_line="setup = \"setup-${5}\";"
 	fi
 
 	if [ "${6}" = "1" ]; then
-		default_line="default = \"conf@${3}\";"
+		default_line="default = \"conf-${3}\";"
 	fi
 
 	cat << EOF >> ${1}
                 ${default_line}
-                conf@${3} {
+                conf-${3} {
 			description = "${6} ${conf_desc}";
 			${kernel_line}
 			${fdt_line}
 			${ramdisk_line}
 			${setup_line}
-                        hash@1 {
+                        hash-1 {
                                 algo = "${conf_csum}";
                         };
 EOF
@@ -333,7 +333,7 @@ EOF
 		sign_line="${sign_line};"
 
 		cat << EOF >> ${1}
-                        signature@1 {
+                        signature-1 {
                                 algo = "${conf_csum},rsa2048";
                                 key-name-hint = "${conf_sign_keyname}";
 				${sign_line}
-- 
2.7.4



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

* Re: [PATCH v2] kernel-fitimage: Fix no reg property warning
  2018-08-29 22:59 [PATCH v2] kernel-fitimage: Fix no reg property warning Pierre-Jean Texier
@ 2018-08-30  5:58 ` Alex Kiernan
  2018-08-30  6:27   ` TEXIER Pierre-Jean
  0 siblings, 1 reply; 4+ messages in thread
From: Alex Kiernan @ 2018-08-30  5:58 UTC (permalink / raw)
  To: texier.pj2; +Cc: openembedded-core

On Wed, Aug 29, 2018 at 11:59 PM Pierre-Jean Texier
<texier.pj2@gmail.com> wrote:
>
> The DT specifications demands a unit-address of a node name to match the "reg"
> property in that node. Newer dtc versions will throw warnings if this is
> not the case.
>
> Fixes the following warnings:
>
> | <stdout>: Warning (unit_address_vs_reg): Node /images/kernel@1 has a unit name, but no reg property
> | <stdout>: Warning (unit_address_vs_reg): Node /images/kernel@1/hash@1 has a unit name, but no reg property
> | <stdout>: Warning (unit_address_vs_reg): Node /images/fdt@at91-sama5d27_som1_ek.dtb has a unit name, but no reg property
> | <stdout>: Warning (unit_address_vs_reg): Node /images/fdt@at91-sama5d27_som1_ek.dtb/hash@1 has a unit name, but no reg property
> | <stdout>: Warning (unit_address_vs_reg): Node /images/fdt@at91-sama5d27_som1_ek_pda4.dtb has a unit name, but no reg property
> | <stdout>: Warning (unit_address_vs_reg): Node /images/fdt@at91-sama5d27_som1_ek_pda4.dtb/hash@1 has a unit name, but no reg property
> | <stdout>: Warning (unit_address_vs_reg): Node /images/fdt@at91-sama5d27_som1_ek_pda7.dtb has a unit name, but no reg property
> | <stdout>: Warning (unit_address_vs_reg): Node /images/fdt@at91-sama5d27_som1_ek_pda7.dtb/hash@1 has a unit name, but no reg property
> | <stdout>: Warning (unit_address_vs_reg): Node /images/fdt@at91-sama5d27_som1_ek_pda7b.dtb has a unit name, but no reg property
> | <stdout>: Warning (unit_address_vs_reg): Node /images/fdt@at91-sama5d27_som1_ek_pda7b.dtb/hash@1 has a unit name, but no reg property
>
> Signed-off-by: Pierre-Jean Texier <texier.pj2@gmail.com>

This strikes me as a bad idea... it breaks existing boot
configurations as it changes the name that has to be selected by
U-Boot.

> ---
> Changes in V2:
>         - rebase on master
>
>  meta/classes/kernel-fitimage.bbclass | 32 ++++++++++++++++----------------
>  1 file changed, 16 insertions(+), 16 deletions(-)
>
> diff --git a/meta/classes/kernel-fitimage.bbclass b/meta/classes/kernel-fitimage.bbclass
> index a4d7aca..3d7800a 100644
> --- a/meta/classes/kernel-fitimage.bbclass
> +++ b/meta/classes/kernel-fitimage.bbclass
> @@ -109,7 +109,7 @@ fitimage_emit_section_kernel() {
>         fi
>
>         cat << EOF >> ${1}
> -                kernel@${2} {
> +                kernel-${2} {
>                          description = "Linux kernel";
>                          data = /incbin/("${3}");
>                          type = "kernel";
> @@ -118,7 +118,7 @@ fitimage_emit_section_kernel() {
>                          compression = "${4}";
>                          load = <${UBOOT_LOADADDRESS}>;
>                          entry = <${ENTRYPOINT}>;
> -                        hash@1 {
> +                        hash-1 {
>                                  algo = "${kernel_csum}";
>                          };
>                  };
> @@ -145,14 +145,14 @@ fitimage_emit_section_dtb() {
>                 dtb_loadline="load = <${UBOOT_DTB_LOADADDRESS}>;"
>         fi
>         cat << EOF >> ${1}
> -                fdt@${2} {
> +                fdt-${2} {
>                          description = "Flattened Device Tree blob";
>                          data = /incbin/("${3}");
>                          type = "flat_dt";
>                          arch = "${UBOOT_ARCH}";
>                          compression = "none";
>                          ${dtb_loadline}
> -                        hash@1 {
> +                        hash-1 {
>                                  algo = "${dtb_csum}";
>                          };
>                  };
> @@ -170,7 +170,7 @@ fitimage_emit_section_setup() {
>         setup_csum="sha1"
>
>         cat << EOF >> ${1}
> -                setup@${2} {
> +                setup-${2} {
>                          description = "Linux setup.bin";
>                          data = /incbin/("${3}");
>                          type = "x86_setup";
> @@ -179,7 +179,7 @@ fitimage_emit_section_setup() {
>                          compression = "none";
>                          load = <0x00090000>;
>                          entry = <0x00090000>;
> -                        hash@1 {
> +                        hash-1 {
>                                  algo = "${setup_csum}";
>                          };
>                  };
> @@ -225,7 +225,7 @@ fitimage_emit_section_ramdisk() {
>         esac
>
>         cat << EOF >> ${1}
> -                ramdisk@${2} {
> +                ramdisk-${2} {
>                          description = "${INITRAMFS_IMAGE}";
>                          data = /incbin/("${3}");
>                          type = "ramdisk";
> @@ -234,7 +234,7 @@ fitimage_emit_section_ramdisk() {
>                          compression = "${ramdisk_ctype}";
>                          ${ramdisk_loadline}
>                          ${ramdisk_entryline}
> -                        hash@1 {
> +                        hash-1 {
>                                  algo = "${ramdisk_csum}";
>                          };
>                  };
> @@ -269,39 +269,39 @@ fitimage_emit_section_config() {
>         if [ -n "${2}" ]; then
>                 conf_desc="Linux kernel"
>                 sep=", "
> -               kernel_line="kernel = \"kernel@${2}\";"
> +               kernel_line="kernel = \"kernel-${2}\";"
>         fi
>
>         if [ -n "${3}" ]; then
>                 conf_desc="${conf_desc}${sep}FDT blob"
>                 sep=", "
> -               fdt_line="fdt = \"fdt@${3}\";"
> +               fdt_line="fdt = \"fdt-${3}\";"
>         fi
>
>         if [ -n "${4}" ]; then
>                 conf_desc="${conf_desc}${sep}ramdisk"
>                 sep=", "
> -               ramdisk_line="ramdisk = \"ramdisk@${4}\";"
> +               ramdisk_line="ramdisk = \"ramdisk-${4}\";"
>         fi
>
>         if [ -n "${5}" ]; then
>                 conf_desc="${conf_desc}${sep}setup"
> -               setup_line="setup = \"setup@${5}\";"
> +               setup_line="setup = \"setup-${5}\";"
>         fi
>
>         if [ "${6}" = "1" ]; then
> -               default_line="default = \"conf@${3}\";"
> +               default_line="default = \"conf-${3}\";"
>         fi
>
>         cat << EOF >> ${1}
>                  ${default_line}
> -                conf@${3} {
> +                conf-${3} {
>                         description = "${6} ${conf_desc}";
>                         ${kernel_line}
>                         ${fdt_line}
>                         ${ramdisk_line}
>                         ${setup_line}
> -                        hash@1 {
> +                        hash-1 {
>                                  algo = "${conf_csum}";
>                          };
>  EOF
> @@ -333,7 +333,7 @@ EOF
>                 sign_line="${sign_line};"
>
>                 cat << EOF >> ${1}
> -                        signature@1 {
> +                        signature-1 {
>                                  algo = "${conf_csum},rsa2048";
>                                  key-name-hint = "${conf_sign_keyname}";
>                                 ${sign_line}
> --
> 2.7.4
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core



-- 
Alex Kiernan


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

* Re: [PATCH v2] kernel-fitimage: Fix no reg property warning
  2018-08-30  5:58 ` Alex Kiernan
@ 2018-08-30  6:27   ` TEXIER Pierre-Jean
  2018-08-30  8:11     ` Alex Kiernan
  0 siblings, 1 reply; 4+ messages in thread
From: TEXIER Pierre-Jean @ 2018-08-30  6:27 UTC (permalink / raw)
  To: alex.kiernan; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 8128 bytes --]

Hi Alex,

Le jeu. 30 août 2018 à 07:58, Alex Kiernan <alex.kiernan@gmail.com> a
écrit :

> On Wed, Aug 29, 2018 at 11:59 PM Pierre-Jean Texier
> <texier.pj2@gmail.com> wrote:
> >
> > The DT specifications demands a unit-address of a node name to match the
> "reg"
> > property in that node. Newer dtc versions will throw warnings if this is
> > not the case.
> >
> > Fixes the following warnings:
> >
> > | <stdout>: Warning (unit_address_vs_reg): Node /images/kernel@1 has a
> unit name, but no reg property
> > | <stdout>: Warning (unit_address_vs_reg): Node /images/kernel@1/hash@1
> has a unit name, but no reg property
> > | <stdout>: Warning (unit_address_vs_reg): Node
> /images/fdt@at91-sama5d27_som1_ek.dtb has a unit name, but no reg property
> > | <stdout>: Warning (unit_address_vs_reg): Node
> /images/fdt@at91-sama5d27_som1_ek.dtb/hash@1 has a unit name, but no reg
> property
> > | <stdout>: Warning (unit_address_vs_reg): Node
> /images/fdt@at91-sama5d27_som1_ek_pda4.dtb has a unit name, but no reg
> property
> > | <stdout>: Warning (unit_address_vs_reg): Node
> /images/fdt@at91-sama5d27_som1_ek_pda4.dtb/hash@1 has a unit name, but no
> reg property
> > | <stdout>: Warning (unit_address_vs_reg): Node
> /images/fdt@at91-sama5d27_som1_ek_pda7.dtb has a unit name, but no reg
> property
> > | <stdout>: Warning (unit_address_vs_reg): Node
> /images/fdt@at91-sama5d27_som1_ek_pda7.dtb/hash@1 has a unit name, but no
> reg property
> > | <stdout>: Warning (unit_address_vs_reg): Node
> /images/fdt@at91-sama5d27_som1_ek_pda7b.dtb has a unit name, but no reg
> property
> > | <stdout>: Warning (unit_address_vs_reg): Node
> /images/fdt@at91-sama5d27_som1_ek_pda7b.dtb/hash@1 has a unit name, but
> no reg property
> >
> > Signed-off-by: Pierre-Jean Texier <texier.pj2@gmail.com>
>
> This strikes me as a bad idea... it breaks existing boot
> configurations as it changes the name that has to be selected by
> U-Boot.
>
>
Thanks for your comment,
In fact, this patch is based on https://patchwork.ozlabs.org/patch/844054/

/Pierre-Jean


> > ---
> > Changes in V2:
> >         - rebase on master
> >
> >  meta/classes/kernel-fitimage.bbclass | 32
> ++++++++++++++++----------------
> >  1 file changed, 16 insertions(+), 16 deletions(-)
> >
> > diff --git a/meta/classes/kernel-fitimage.bbclass
> b/meta/classes/kernel-fitimage.bbclass
> > index a4d7aca..3d7800a 100644
> > --- a/meta/classes/kernel-fitimage.bbclass
> > +++ b/meta/classes/kernel-fitimage.bbclass
> > @@ -109,7 +109,7 @@ fitimage_emit_section_kernel() {
> >         fi
> >
> >         cat << EOF >> ${1}
> > -                kernel@${2} {
> > +                kernel-${2} {
> >                          description = "Linux kernel";
> >                          data = /incbin/("${3}");
> >                          type = "kernel";
> > @@ -118,7 +118,7 @@ fitimage_emit_section_kernel() {
> >                          compression = "${4}";
> >                          load = <${UBOOT_LOADADDRESS}>;
> >                          entry = <${ENTRYPOINT}>;
> > -                        hash@1 {
> > +                        hash-1 {
> >                                  algo = "${kernel_csum}";
> >                          };
> >                  };
> > @@ -145,14 +145,14 @@ fitimage_emit_section_dtb() {
> >                 dtb_loadline="load = <${UBOOT_DTB_LOADADDRESS}>;"
> >         fi
> >         cat << EOF >> ${1}
> > -                fdt@${2} {
> > +                fdt-${2} {
> >                          description = "Flattened Device Tree blob";
> >                          data = /incbin/("${3}");
> >                          type = "flat_dt";
> >                          arch = "${UBOOT_ARCH}";
> >                          compression = "none";
> >                          ${dtb_loadline}
> > -                        hash@1 {
> > +                        hash-1 {
> >                                  algo = "${dtb_csum}";
> >                          };
> >                  };
> > @@ -170,7 +170,7 @@ fitimage_emit_section_setup() {
> >         setup_csum="sha1"
> >
> >         cat << EOF >> ${1}
> > -                setup@${2} {
> > +                setup-${2} {
> >                          description = "Linux setup.bin";
> >                          data = /incbin/("${3}");
> >                          type = "x86_setup";
> > @@ -179,7 +179,7 @@ fitimage_emit_section_setup() {
> >                          compression = "none";
> >                          load = <0x00090000>;
> >                          entry = <0x00090000>;
> > -                        hash@1 {
> > +                        hash-1 {
> >                                  algo = "${setup_csum}";
> >                          };
> >                  };
> > @@ -225,7 +225,7 @@ fitimage_emit_section_ramdisk() {
> >         esac
> >
> >         cat << EOF >> ${1}
> > -                ramdisk@${2} {
> > +                ramdisk-${2} {
> >                          description = "${INITRAMFS_IMAGE}";
> >                          data = /incbin/("${3}");
> >                          type = "ramdisk";
> > @@ -234,7 +234,7 @@ fitimage_emit_section_ramdisk() {
> >                          compression = "${ramdisk_ctype}";
> >                          ${ramdisk_loadline}
> >                          ${ramdisk_entryline}
> > -                        hash@1 {
> > +                        hash-1 {
> >                                  algo = "${ramdisk_csum}";
> >                          };
> >                  };
> > @@ -269,39 +269,39 @@ fitimage_emit_section_config() {
> >         if [ -n "${2}" ]; then
> >                 conf_desc="Linux kernel"
> >                 sep=", "
> > -               kernel_line="kernel = \"kernel@${2}\";"
> > +               kernel_line="kernel = \"kernel-${2}\";"
> >         fi
> >
> >         if [ -n "${3}" ]; then
> >                 conf_desc="${conf_desc}${sep}FDT blob"
> >                 sep=", "
> > -               fdt_line="fdt = \"fdt@${3}\";"
> > +               fdt_line="fdt = \"fdt-${3}\";"
> >         fi
> >
> >         if [ -n "${4}" ]; then
> >                 conf_desc="${conf_desc}${sep}ramdisk"
> >                 sep=", "
> > -               ramdisk_line="ramdisk = \"ramdisk@${4}\";"
> > +               ramdisk_line="ramdisk = \"ramdisk-${4}\";"
> >         fi
> >
> >         if [ -n "${5}" ]; then
> >                 conf_desc="${conf_desc}${sep}setup"
> > -               setup_line="setup = \"setup@${5}\";"
> > +               setup_line="setup = \"setup-${5}\";"
> >         fi
> >
> >         if [ "${6}" = "1" ]; then
> > -               default_line="default = \"conf@${3}\";"
> > +               default_line="default = \"conf-${3}\";"
> >         fi
> >
> >         cat << EOF >> ${1}
> >                  ${default_line}
> > -                conf@${3} {
> > +                conf-${3} {
> >                         description = "${6} ${conf_desc}";
> >                         ${kernel_line}
> >                         ${fdt_line}
> >                         ${ramdisk_line}
> >                         ${setup_line}
> > -                        hash@1 {
> > +                        hash-1 {
> >                                  algo = "${conf_csum}";
> >                          };
> >  EOF
> > @@ -333,7 +333,7 @@ EOF
> >                 sign_line="${sign_line};"
> >
> >                 cat << EOF >> ${1}
> > -                        signature@1 {
> > +                        signature-1 {
> >                                  algo = "${conf_csum},rsa2048";
> >                                  key-name-hint = "${conf_sign_keyname}";
> >                                 ${sign_line}
> > --
> > 2.7.4
> >
> > --
> > _______________________________________________
> > Openembedded-core mailing list
> > Openembedded-core@lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
>
>
> --
> Alex Kiernan
>

[-- Attachment #2: Type: text/html, Size: 11749 bytes --]

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

* Re: [PATCH v2] kernel-fitimage: Fix no reg property warning
  2018-08-30  6:27   ` TEXIER Pierre-Jean
@ 2018-08-30  8:11     ` Alex Kiernan
  0 siblings, 0 replies; 4+ messages in thread
From: Alex Kiernan @ 2018-08-30  8:11 UTC (permalink / raw)
  To: texier.pj2; +Cc: openembedded-core

Hi Pierre-Jean

On Thu, Aug 30, 2018 at 7:27 AM TEXIER Pierre-Jean <texier.pj2@gmail.com> wrote:
>
> Hi Alex,
>
> Le jeu. 30 août 2018 à 07:58, Alex Kiernan <alex.kiernan@gmail.com> a écrit :
>>
>> On Wed, Aug 29, 2018 at 11:59 PM Pierre-Jean Texier
>> <texier.pj2@gmail.com> wrote:
>> >
>> > The DT specifications demands a unit-address of a node name to match the "reg"
>> > property in that node. Newer dtc versions will throw warnings if this is
>> > not the case.
>> >
>> > Fixes the following warnings:
>> >
>> > | <stdout>: Warning (unit_address_vs_reg): Node /images/kernel@1 has a unit name, but no reg property
>> > | <stdout>: Warning (unit_address_vs_reg): Node /images/kernel@1/hash@1 has a unit name, but no reg property
>> > | <stdout>: Warning (unit_address_vs_reg): Node /images/fdt@at91-sama5d27_som1_ek.dtb has a unit name, but no reg property
>> > | <stdout>: Warning (unit_address_vs_reg): Node /images/fdt@at91-sama5d27_som1_ek.dtb/hash@1 has a unit name, but no reg property
>> > | <stdout>: Warning (unit_address_vs_reg): Node /images/fdt@at91-sama5d27_som1_ek_pda4.dtb has a unit name, but no reg property
>> > | <stdout>: Warning (unit_address_vs_reg): Node /images/fdt@at91-sama5d27_som1_ek_pda4.dtb/hash@1 has a unit name, but no reg property
>> > | <stdout>: Warning (unit_address_vs_reg): Node /images/fdt@at91-sama5d27_som1_ek_pda7.dtb has a unit name, but no reg property
>> > | <stdout>: Warning (unit_address_vs_reg): Node /images/fdt@at91-sama5d27_som1_ek_pda7.dtb/hash@1 has a unit name, but no reg property
>> > | <stdout>: Warning (unit_address_vs_reg): Node /images/fdt@at91-sama5d27_som1_ek_pda7b.dtb has a unit name, but no reg property
>> > | <stdout>: Warning (unit_address_vs_reg): Node /images/fdt@at91-sama5d27_som1_ek_pda7b.dtb/hash@1 has a unit name, but no reg property
>> >
>> > Signed-off-by: Pierre-Jean Texier <texier.pj2@gmail.com>
>>
>> This strikes me as a bad idea... it breaks existing boot
>> configurations as it changes the name that has to be selected by
>> U-Boot.
>>
>
> Thanks for your comment,
> In fact, this patch is based on https://patchwork.ozlabs.org/patch/844054/
>

That just patches the docs... if no one was using this code, I'd not
be arguing about it. But with this change I can't upgrade my kernel
without also updating my bootloader, and if I update my bootloader I
can't then rollback (or in reality I'd have to accommodate both
formats).

If there was say UBOOT_FIT_IMAGE_SEPARATOR which was set so that you
can pick your separator, that'd work for me. I guess the only question
is what you default to - I'd argue it's a breaking change so should
stay as '@'.

> /Pierre-Jean
>
>>
>> > ---
>> > Changes in V2:
>> >         - rebase on master
>> >
>> >  meta/classes/kernel-fitimage.bbclass | 32 ++++++++++++++++----------------
>> >  1 file changed, 16 insertions(+), 16 deletions(-)
>> >
>> > diff --git a/meta/classes/kernel-fitimage.bbclass b/meta/classes/kernel-fitimage.bbclass
>> > index a4d7aca..3d7800a 100644
>> > --- a/meta/classes/kernel-fitimage.bbclass
>> > +++ b/meta/classes/kernel-fitimage.bbclass
>> > @@ -109,7 +109,7 @@ fitimage_emit_section_kernel() {
>> >         fi
>> >
>> >         cat << EOF >> ${1}
>> > -                kernel@${2} {
>> > +                kernel-${2} {
>> >                          description = "Linux kernel";
>> >                          data = /incbin/("${3}");
>> >                          type = "kernel";
>> > @@ -118,7 +118,7 @@ fitimage_emit_section_kernel() {
>> >                          compression = "${4}";
>> >                          load = <${UBOOT_LOADADDRESS}>;
>> >                          entry = <${ENTRYPOINT}>;
>> > -                        hash@1 {
>> > +                        hash-1 {
>> >                                  algo = "${kernel_csum}";
>> >                          };
>> >                  };
>> > @@ -145,14 +145,14 @@ fitimage_emit_section_dtb() {
>> >                 dtb_loadline="load = <${UBOOT_DTB_LOADADDRESS}>;"
>> >         fi
>> >         cat << EOF >> ${1}
>> > -                fdt@${2} {
>> > +                fdt-${2} {
>> >                          description = "Flattened Device Tree blob";
>> >                          data = /incbin/("${3}");
>> >                          type = "flat_dt";
>> >                          arch = "${UBOOT_ARCH}";
>> >                          compression = "none";
>> >                          ${dtb_loadline}
>> > -                        hash@1 {
>> > +                        hash-1 {
>> >                                  algo = "${dtb_csum}";
>> >                          };
>> >                  };
>> > @@ -170,7 +170,7 @@ fitimage_emit_section_setup() {
>> >         setup_csum="sha1"
>> >
>> >         cat << EOF >> ${1}
>> > -                setup@${2} {
>> > +                setup-${2} {
>> >                          description = "Linux setup.bin";
>> >                          data = /incbin/("${3}");
>> >                          type = "x86_setup";
>> > @@ -179,7 +179,7 @@ fitimage_emit_section_setup() {
>> >                          compression = "none";
>> >                          load = <0x00090000>;
>> >                          entry = <0x00090000>;
>> > -                        hash@1 {
>> > +                        hash-1 {
>> >                                  algo = "${setup_csum}";
>> >                          };
>> >                  };
>> > @@ -225,7 +225,7 @@ fitimage_emit_section_ramdisk() {
>> >         esac
>> >
>> >         cat << EOF >> ${1}
>> > -                ramdisk@${2} {
>> > +                ramdisk-${2} {
>> >                          description = "${INITRAMFS_IMAGE}";
>> >                          data = /incbin/("${3}");
>> >                          type = "ramdisk";
>> > @@ -234,7 +234,7 @@ fitimage_emit_section_ramdisk() {
>> >                          compression = "${ramdisk_ctype}";
>> >                          ${ramdisk_loadline}
>> >                          ${ramdisk_entryline}
>> > -                        hash@1 {
>> > +                        hash-1 {
>> >                                  algo = "${ramdisk_csum}";
>> >                          };
>> >                  };
>> > @@ -269,39 +269,39 @@ fitimage_emit_section_config() {
>> >         if [ -n "${2}" ]; then
>> >                 conf_desc="Linux kernel"
>> >                 sep=", "
>> > -               kernel_line="kernel = \"kernel@${2}\";"
>> > +               kernel_line="kernel = \"kernel-${2}\";"
>> >         fi
>> >
>> >         if [ -n "${3}" ]; then
>> >                 conf_desc="${conf_desc}${sep}FDT blob"
>> >                 sep=", "
>> > -               fdt_line="fdt = \"fdt@${3}\";"
>> > +               fdt_line="fdt = \"fdt-${3}\";"
>> >         fi
>> >
>> >         if [ -n "${4}" ]; then
>> >                 conf_desc="${conf_desc}${sep}ramdisk"
>> >                 sep=", "
>> > -               ramdisk_line="ramdisk = \"ramdisk@${4}\";"
>> > +               ramdisk_line="ramdisk = \"ramdisk-${4}\";"
>> >         fi
>> >
>> >         if [ -n "${5}" ]; then
>> >                 conf_desc="${conf_desc}${sep}setup"
>> > -               setup_line="setup = \"setup@${5}\";"
>> > +               setup_line="setup = \"setup-${5}\";"
>> >         fi
>> >
>> >         if [ "${6}" = "1" ]; then
>> > -               default_line="default = \"conf@${3}\";"
>> > +               default_line="default = \"conf-${3}\";"
>> >         fi
>> >
>> >         cat << EOF >> ${1}
>> >                  ${default_line}
>> > -                conf@${3} {
>> > +                conf-${3} {
>> >                         description = "${6} ${conf_desc}";
>> >                         ${kernel_line}
>> >                         ${fdt_line}
>> >                         ${ramdisk_line}
>> >                         ${setup_line}
>> > -                        hash@1 {
>> > +                        hash-1 {
>> >                                  algo = "${conf_csum}";
>> >                          };
>> >  EOF
>> > @@ -333,7 +333,7 @@ EOF
>> >                 sign_line="${sign_line};"
>> >
>> >                 cat << EOF >> ${1}
>> > -                        signature@1 {
>> > +                        signature-1 {
>> >                                  algo = "${conf_csum},rsa2048";
>> >                                  key-name-hint = "${conf_sign_keyname}";
>> >                                 ${sign_line}
>> > --
>> > 2.7.4
>> >
>> > --
>> > _______________________________________________
>> > Openembedded-core mailing list
>> > Openembedded-core@lists.openembedded.org
>> > http://lists.openembedded.org/mailman/listinfo/openembedded-core
>>
>>
>>
>> --
>> Alex Kiernan



-- 
Alex Kiernan


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

end of thread, other threads:[~2018-08-30  8:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-29 22:59 [PATCH v2] kernel-fitimage: Fix no reg property warning Pierre-Jean Texier
2018-08-30  5:58 ` Alex Kiernan
2018-08-30  6:27   ` TEXIER Pierre-Jean
2018-08-30  8:11     ` Alex Kiernan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.