All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [RESEND PATCH 0/3] mx28evk environment rework for NAND support
@ 2013-10-21 23:24 Otavio Salvador
  2013-10-21 23:24 ` [U-Boot] [RESEND PATCH 1/3] mx28evk: Use 512k for fdt partition to align it Otavio Salvador
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Otavio Salvador @ 2013-10-21 23:24 UTC (permalink / raw)
  To: u-boot

This patchset improves the mx28evk default environment so it is easier
to use by users when testing the NAND support.

It provides a set of new environment routines as:

 - update_nand_kernel
 - update_nand_fdt
 - update_nand_filesystem

and allow for easy NAND boot using:

 'run nandboot'

This has been tested using:

 Samsung 4G NAND, part-#: K9LBG08U0D-PCB0


Otavio Salvador (3):
  mx28evk: Use 512k for fdt partition to align it
  mx28evk: Add 'nandboot' environment command
  mx28evk: Extend environment to easy write of NAND system

 include/configs/mx28evk.h | 55 ++++++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 52 insertions(+), 3 deletions(-)

-- 
1.8.4.rc3

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

* [U-Boot] [RESEND PATCH 1/3] mx28evk: Use 512k for fdt partition to align it
  2013-10-21 23:24 [U-Boot] [RESEND PATCH 0/3] mx28evk environment rework for NAND support Otavio Salvador
@ 2013-10-21 23:24 ` Otavio Salvador
  2013-10-21 23:24 ` [U-Boot] [RESEND PATCH 2/3] mx28evk: Add 'nandboot' environment command Otavio Salvador
  2013-10-21 23:24 ` [U-Boot] [RESEND PATCH 3/3] mx28evk: Extend environment to easy write of NAND system Otavio Salvador
  2 siblings, 0 replies; 15+ messages in thread
From: Otavio Salvador @ 2013-10-21 23:24 UTC (permalink / raw)
  To: u-boot

Using 512k for fdt partition allow it to be aligned with the other
small partitions and 512k erase block size.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 include/configs/mx28evk.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h
index 07f88ca..27b1a41 100644
--- a/include/configs/mx28evk.h
+++ b/include/configs/mx28evk.h
@@ -97,7 +97,7 @@
 		"512k(environment),"		\
 		"512k(redundant-environment),"	\
 		"4m(kernel),"			\
-		"128k(fdt),"			\
+		"512k(fdt),"			\
 		"8m(ramdisk),"			\
 		"-(filesystem)"
 #endif
-- 
1.8.4.rc3

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

* [U-Boot] [RESEND PATCH 2/3] mx28evk: Add 'nandboot' environment command
  2013-10-21 23:24 [U-Boot] [RESEND PATCH 0/3] mx28evk environment rework for NAND support Otavio Salvador
  2013-10-21 23:24 ` [U-Boot] [RESEND PATCH 1/3] mx28evk: Use 512k for fdt partition to align it Otavio Salvador
@ 2013-10-21 23:24 ` Otavio Salvador
  2013-10-27 16:16   ` Marek Vasut
  2013-10-21 23:24 ` [U-Boot] [RESEND PATCH 3/3] mx28evk: Extend environment to easy write of NAND system Otavio Salvador
  2 siblings, 1 reply; 15+ messages in thread
From: Otavio Salvador @ 2013-10-21 23:24 UTC (permalink / raw)
  To: u-boot

This reads the kernel, ftd and boot into ubifs filesystem. While on
that, the SD firmware filename definition has been moved next to the
other SD related commands.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 include/configs/mx28evk.h | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h
index 27b1a41..e40df09 100644
--- a/include/configs/mx28evk.h
+++ b/include/configs/mx28evk.h
@@ -163,7 +163,6 @@
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	"update_nand_full_filename=u-boot.nand\0" \
 	"update_nand_firmware_filename=u-boot.sb\0"	\
-	"update_sd_firmware_filename=u-boot.sd\0" \
 	"update_nand_firmware_maxsz=0x100000\0"	\
 	"update_nand_stride=0x40\0"	/* MX28 datasheet ch. 12.12 */ \
 	"update_nand_count=0x4\0"	/* MX28 datasheet ch. 12.12 */ \
@@ -191,6 +190,23 @@
 		"nand write ${loadaddr} ${fcb_sz} ${filesize} ; " \
 		"nand write ${loadaddr} ${fw_off} ${filesize} ; " \
 		"fi\0" \
+	"nandargs=setenv bootargs console=${console_mainline},${baudrate} " \
+		"rootfstype=ubifs ubi.mtd=6 root=ubi0_0 ${mtdparts}\0" \
+	"nandboot="		/* Boot from NAND */ \
+		"mtdparts default; " \
+		"run nandargs; " \
+		"nand read ${loadaddr} kernel 0x00400000; " \
+		"if test ${boot_fdt} = yes; then " \
+			"nand read ${fdt_addr} fdt 0x00080000; " \
+			"bootm ${loadaddr} - ${fdt_addr}; " \
+		"else " \
+			"if test ${boot_fdt} = no; then " \
+				"bootm; " \
+			"else " \
+				"echo \"ERROR: Set boot_fdt to yes or no.\"; " \
+			"fi; " \
+		"fi\0" \
+	"update_sd_firmware_filename=u-boot.sd\0" \
 	"update_sd_firmware="		/* Update the SD firmware partition */ \
 		"if mmc rescan ; then "	\
 		"if tftp ${update_sd_firmware_filename} ; then " \
-- 
1.8.4.rc3

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

* [U-Boot] [RESEND PATCH 3/3] mx28evk: Extend environment to easy write of NAND system
  2013-10-21 23:24 [U-Boot] [RESEND PATCH 0/3] mx28evk environment rework for NAND support Otavio Salvador
  2013-10-21 23:24 ` [U-Boot] [RESEND PATCH 1/3] mx28evk: Use 512k for fdt partition to align it Otavio Salvador
  2013-10-21 23:24 ` [U-Boot] [RESEND PATCH 2/3] mx28evk: Add 'nandboot' environment command Otavio Salvador
@ 2013-10-21 23:24 ` Otavio Salvador
  2 siblings, 0 replies; 15+ messages in thread
From: Otavio Salvador @ 2013-10-21 23:24 UTC (permalink / raw)
  To: u-boot

This adds following new targets:

 - update_nand_kernel
 - update_nand_fdt
 - update_nand_filesystem

and to avoid confusion, the 'update_nand_full' has been renamed to
'update_nand_firmware_full'.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 include/configs/mx28evk.h | 35 ++++++++++++++++++++++++++++++++++-
 1 file changed, 34 insertions(+), 1 deletion(-)

diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h
index e40df09..5e43226 100644
--- a/include/configs/mx28evk.h
+++ b/include/configs/mx28evk.h
@@ -161,6 +161,7 @@
 
 /* Extra Environment */
 #define CONFIG_EXTRA_ENV_SETTINGS \
+	"ubifs_file=filesystem.ubifs\0" \
 	"update_nand_full_filename=u-boot.nand\0" \
 	"update_nand_firmware_filename=u-boot.sb\0"	\
 	"update_nand_firmware_maxsz=0x100000\0"	\
@@ -171,7 +172,7 @@
 		"nand info ; " \
 		"setexpr fcb_sz ${update_nand_stride} * ${update_nand_count};" \
 		"setexpr update_nand_fcb ${fcb_sz} * ${nand_writesize}\0" \
-	"update_nand_full="		    /* Update FCB, DBBT and FW */ \
+	"update_nand_firmware_full=" /* Update FCB, DBBT and FW */ \
 		"if tftp ${update_nand_full_filename} ; then " \
 		"run update_nand_get_fcb_size ; " \
 		"nand scrub -y 0x0 ${filesize} ; " \
@@ -190,6 +191,38 @@
 		"nand write ${loadaddr} ${fcb_sz} ${filesize} ; " \
 		"nand write ${loadaddr} ${fw_off} ${filesize} ; " \
 		"fi\0" \
+	"update_nand_kernel="		/* Update kernel */ \
+		"mtdparts default; " \
+		"nand erase.part kernel; " \
+		"if test ${ip_dyn} = yes; then " \
+			"setenv get_cmd dhcp; " \
+		"else " \
+			"setenv get_cmd tftp; " \
+		"fi; " \
+		"${get_cmd} ${uimage}; " \
+		"nand write ${loadaddr} kernel ${filesize}\0" \
+	"update_nand_fdt="		/* Update fdt */ \
+		"mtdparts default; " \
+		"nand erase.part fdt; " \
+		"if test ${ip_dyn} = yes; then " \
+			"setenv get_cmd dhcp; " \
+		"else " \
+			"setenv get_cmd tftp; " \
+		"fi; " \
+		"${get_cmd} ${fdt_file}; " \
+		"nand write ${loadaddr} fdt ${filesize}\0" \
+	"update_nand_filesystem="		/* Update filesystem */ \
+		"mtdparts default; " \
+		"nand erase.part filesystem; " \
+		"if test ${ip_dyn} = yes; then " \
+			"setenv get_cmd dhcp; " \
+		"else " \
+			"setenv get_cmd tftp; " \
+		"fi; " \
+		"${get_cmd} ${ubifs_file}; " \
+		"ubi part filesystem; " \
+		"ubi create filesystem; " \
+		"ubi write ${loadaddr} filesystem ${filesize}\0" \
 	"nandargs=setenv bootargs console=${console_mainline},${baudrate} " \
 		"rootfstype=ubifs ubi.mtd=6 root=ubi0_0 ${mtdparts}\0" \
 	"nandboot="		/* Boot from NAND */ \
-- 
1.8.4.rc3

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

* [U-Boot] [RESEND PATCH 2/3] mx28evk: Add 'nandboot' environment command
  2013-10-21 23:24 ` [U-Boot] [RESEND PATCH 2/3] mx28evk: Add 'nandboot' environment command Otavio Salvador
@ 2013-10-27 16:16   ` Marek Vasut
  2013-10-27 19:51     ` Otavio Salvador
  0 siblings, 1 reply; 15+ messages in thread
From: Marek Vasut @ 2013-10-27 16:16 UTC (permalink / raw)
  To: u-boot

Dear Otavio Salvador,

> This reads the kernel, ftd and boot into ubifs filesystem. While on
> that, the SD firmware filename definition has been moved next to the
> other SD related commands.
> 
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>

Any changes to built-in environment are now NAKd I believe.

Best regards,
Marek Vasut

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

* [U-Boot] [RESEND PATCH 2/3] mx28evk: Add 'nandboot' environment command
  2013-10-27 16:16   ` Marek Vasut
@ 2013-10-27 19:51     ` Otavio Salvador
  2013-10-27 20:47       ` Marek Vasut
  0 siblings, 1 reply; 15+ messages in thread
From: Otavio Salvador @ 2013-10-27 19:51 UTC (permalink / raw)
  To: u-boot

On Sun, Oct 27, 2013 at 2:16 PM, Marek Vasut <marex@denx.de> wrote:
> Dear Otavio Salvador,
>
>> This reads the kernel, ftd and boot into ubifs filesystem. While on
>> that, the SD firmware filename definition has been moved next to the
>> other SD related commands.
>>
>> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
>
> Any changes to built-in environment are now NAKd I believe.

I don't see a reason to not merged it for now; I will work in porting
the environments for the external file but this could go now, anyway.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750

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

* [U-Boot] [RESEND PATCH 2/3] mx28evk: Add 'nandboot' environment command
  2013-10-27 19:51     ` Otavio Salvador
@ 2013-10-27 20:47       ` Marek Vasut
  2013-10-28 11:19         ` Otavio Salvador
  0 siblings, 1 reply; 15+ messages in thread
From: Marek Vasut @ 2013-10-27 20:47 UTC (permalink / raw)
  To: u-boot

Dear Otavio Salvador,

> On Sun, Oct 27, 2013 at 2:16 PM, Marek Vasut <marex@denx.de> wrote:
> > Dear Otavio Salvador,
> > 
> >> This reads the kernel, ftd and boot into ubifs filesystem. While on
> >> that, the SD firmware filename definition has been moved next to the
> >> other SD related commands.
> >> 
> >> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> > 
> > Any changes to built-in environment are now NAKd I believe.
> 
> I don't see a reason to not merged it for now; I will work in porting
> the environments for the external file but this could go now, anyway.

Read [1], in particular what Stefano said.

http://comments.gmane.org/gmane.comp.boot-loaders.u-boot/169042

Thus this patch shall be rejected as well, sorry.

Best regards,
Marek Vasut

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

* [U-Boot] [RESEND PATCH 2/3] mx28evk: Add 'nandboot' environment command
  2013-10-27 20:47       ` Marek Vasut
@ 2013-10-28 11:19         ` Otavio Salvador
  2013-10-28 11:31           ` Marek Vasut
  2013-10-28 11:32           ` Stefano Babic
  0 siblings, 2 replies; 15+ messages in thread
From: Otavio Salvador @ 2013-10-28 11:19 UTC (permalink / raw)
  To: u-boot

Hello,

I am not sure I agree ...

On Sun, Oct 27, 2013 at 6:47 PM, Marek Vasut <marex@denx.de> wrote:
> Dear Otavio Salvador,
>
>> On Sun, Oct 27, 2013 at 2:16 PM, Marek Vasut <marex@denx.de> wrote:
>> > Dear Otavio Salvador,
>> >
>> >> This reads the kernel, ftd and boot into ubifs filesystem. While on
>> >> that, the SD firmware filename definition has been moved next to the
>> >> other SD related commands.
>> >>
>> >> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
>> >
>> > Any changes to built-in environment are now NAKd I believe.
>>
>> I don't see a reason to not merged it for now; I will work in porting
>> the environments for the external file but this could go now, anyway.
>
> Read [1], in particular what Stefano said.
>
> http://comments.gmane.org/gmane.comp.boot-loaders.u-boot/169042
>
> Thus this patch shall be rejected as well, sorry.

I agree with the goal but until we have a way to insert the /default/
environment into the binary of U-Boot for use (not adding an extra
environment image) this should be accepted.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750

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

* [U-Boot] [RESEND PATCH 2/3] mx28evk: Add 'nandboot' environment command
  2013-10-28 11:19         ` Otavio Salvador
@ 2013-10-28 11:31           ` Marek Vasut
  2013-10-28 11:32           ` Stefano Babic
  1 sibling, 0 replies; 15+ messages in thread
From: Marek Vasut @ 2013-10-28 11:31 UTC (permalink / raw)
  To: u-boot

Dear Otavio Salvador,

> Hello,
> 
> I am not sure I agree ...
> 
> On Sun, Oct 27, 2013 at 6:47 PM, Marek Vasut <marex@denx.de> wrote:
> > Dear Otavio Salvador,
> > 
> >> On Sun, Oct 27, 2013 at 2:16 PM, Marek Vasut <marex@denx.de> wrote:
> >> > Dear Otavio Salvador,
> >> > 
> >> >> This reads the kernel, ftd and boot into ubifs filesystem. While on
> >> >> that, the SD firmware filename definition has been moved next to the
> >> >> other SD related commands.
> >> >> 
> >> >> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> >> > 
> >> > Any changes to built-in environment are now NAKd I believe.
> >> 
> >> I don't see a reason to not merged it for now; I will work in porting
> >> the environments for the external file but this could go now, anyway.
> > 
> > Read [1], in particular what Stefano said.
> > 
> > http://comments.gmane.org/gmane.comp.boot-loaders.u-boot/169042
> > 
> > Thus this patch shall be rejected as well, sorry.
> 
> I agree with the goal but until we have a way to insert the /default/
> environment into the binary of U-Boot for use (not adding an extra
> environment image) this should be accepted.

I disagree with the decision to reject the envs as well, I just present previous 
discussion here. I will pull out of this discussion and leave the rest up to 
Stefano, since this is his call afterall.

Best regards,
Marek Vasut

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

* [U-Boot] [RESEND PATCH 2/3] mx28evk: Add 'nandboot' environment command
  2013-10-28 11:19         ` Otavio Salvador
  2013-10-28 11:31           ` Marek Vasut
@ 2013-10-28 11:32           ` Stefano Babic
  2013-10-28 12:03             ` Otavio Salvador
  1 sibling, 1 reply; 15+ messages in thread
From: Stefano Babic @ 2013-10-28 11:32 UTC (permalink / raw)
  To: u-boot

Hi Otavio,

On 28/10/2013 12:19, Otavio Salvador wrote:
> Hello,
> 
> I am not sure I agree ...
> 
> On Sun, Oct 27, 2013 at 6:47 PM, Marek Vasut <marex@denx.de> wrote:
>> Dear Otavio Salvador,
>>
>>> On Sun, Oct 27, 2013 at 2:16 PM, Marek Vasut <marex@denx.de> wrote:
>>>> Dear Otavio Salvador,
>>>>
>>>>> This reads the kernel, ftd and boot into ubifs filesystem. While on
>>>>> that, the SD firmware filename definition has been moved next to the
>>>>> other SD related commands.
>>>>>
>>>>> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
>>>>
>>>> Any changes to built-in environment are now NAKd I believe.
>>>
>>> I don't see a reason to not merged it for now; I will work in porting
>>> the environments for the external file but this could go now, anyway.
>>
>> Read [1], in particular what Stefano said.
>>
>> http://comments.gmane.org/gmane.comp.boot-loaders.u-boot/169042
>>
>> Thus this patch shall be rejected as well, sorry.
> 
> I agree with the goal but until we have a way to insert the /default/
> environment into the binary of U-Boot for use (not adding an extra
> environment image) this should be accepted.

Indeed. However, why cannot we do the right thing soon ?

It is very interesting if Simon's patches will flow into mainline soon -
as feeling, I see some comments by Wolfgang, but no evident signal that
they will be stopped. Octavio, I will wait for your patches for a while
and if Simon's patches will be accepted soon, I will kindly ask you to
reformat your patches, moving the default environment into an .env file.

Best regards,
Stefano Babic


-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

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

* [U-Boot] [RESEND PATCH 2/3] mx28evk: Add 'nandboot' environment command
  2013-10-28 11:32           ` Stefano Babic
@ 2013-10-28 12:03             ` Otavio Salvador
  2013-10-28 13:21               ` Wolfgang Denk
  0 siblings, 1 reply; 15+ messages in thread
From: Otavio Salvador @ 2013-10-28 12:03 UTC (permalink / raw)
  To: u-boot

On Mon, Oct 28, 2013 at 9:32 AM, Stefano Babic <sbabic@denx.de> wrote:
> Hi Otavio,
>
> On 28/10/2013 12:19, Otavio Salvador wrote:
>> Hello,
>>
>> I am not sure I agree ...
>>
>> On Sun, Oct 27, 2013 at 6:47 PM, Marek Vasut <marex@denx.de> wrote:
>>> Dear Otavio Salvador,
>>>
>>>> On Sun, Oct 27, 2013 at 2:16 PM, Marek Vasut <marex@denx.de> wrote:
>>>>> Dear Otavio Salvador,
>>>>>
>>>>>> This reads the kernel, ftd and boot into ubifs filesystem. While on
>>>>>> that, the SD firmware filename definition has been moved next to the
>>>>>> other SD related commands.
>>>>>>
>>>>>> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
>>>>>
>>>>> Any changes to built-in environment are now NAKd I believe.
>>>>
>>>> I don't see a reason to not merged it for now; I will work in porting
>>>> the environments for the external file but this could go now, anyway.
>>>
>>> Read [1], in particular what Stefano said.
>>>
>>> http://comments.gmane.org/gmane.comp.boot-loaders.u-boot/169042
>>>
>>> Thus this patch shall be rejected as well, sorry.
>>
>> I agree with the goal but until we have a way to insert the /default/
>> environment into the binary of U-Boot for use (not adding an extra
>> environment image) this should be accepted.
>
> Indeed. However, why cannot we do the right thing soon ?

There're no pending patches to address the root problem yet (allowing
changing /internal and default/ environment).

> It is very interesting if Simon's patches will flow into mainline soon -
> as feeling, I see some comments by Wolfgang, but no evident signal that
> they will be stopped. Octavio, I will wait for your patches for a while
> and if Simon's patches will be accepted soon, I will kindly ask you to
> reformat your patches, moving the default environment into an .env file.

I will rework the environments as .env files but I don't want to hold
this change until this is accepted.

My patch is fine and could go in now as is. Once Simon's patches get
in I will post another series reworking the environment to convert it
to the .env file format but please don't block on this.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750

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

* [U-Boot] [RESEND PATCH 2/3] mx28evk: Add 'nandboot' environment command
  2013-10-28 12:03             ` Otavio Salvador
@ 2013-10-28 13:21               ` Wolfgang Denk
  2013-10-28 13:29                 ` Otavio Salvador
  0 siblings, 1 reply; 15+ messages in thread
From: Wolfgang Denk @ 2013-10-28 13:21 UTC (permalink / raw)
  To: u-boot

Dear Otavio,

In message <CAP9ODKpN+PMX1HP+7bEMP7u-Hc44oNc6PEpAn+nbzbQm8cDfrg@mail.gmail.com> you wrote:
>
> > Indeed. However, why cannot we do the right thing soon ?
> 
> There're no pending patches to address the root problem yet (allowing
> changing /internal and default/ environment).

Simon's patch set "env: Add support for environment files" does
exactly that.

> I will rework the environments as .env files but I don't want to hold
> this change until this is accepted.

Please be patient, like we all are.  It's better to wait a bit now,
then adding work now, and adding more work later to clean up the mess
again.

> My patch is fine and could go in now as is. Once Simon's patches get
> in I will post another series reworking the environment to convert it
> to the .env file format but please don't block on this.

I agree with Stefano that we should not add more to the already
existing amount of env settings but instead wait for a cleaner way.
Please be patient - you lose nothing here.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
C makes it easy for you to shoot yourself in the foot. C++ makes that
harder, but when you do, it blows away your whole leg.
                                                 -- Bjarne Stroustrup

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

* [U-Boot] [RESEND PATCH 2/3] mx28evk: Add 'nandboot' environment command
  2013-10-28 13:21               ` Wolfgang Denk
@ 2013-10-28 13:29                 ` Otavio Salvador
  2013-10-28 13:41                   ` Wolfgang Denk
  2013-10-28 13:53                   ` Stefano Babic
  0 siblings, 2 replies; 15+ messages in thread
From: Otavio Salvador @ 2013-10-28 13:29 UTC (permalink / raw)
  To: u-boot

On Mon, Oct 28, 2013 at 11:21 AM, Wolfgang Denk <wd@denx.de> wrote:
> Dear Otavio,
>
> In message <CAP9ODKpN+PMX1HP+7bEMP7u-Hc44oNc6PEpAn+nbzbQm8cDfrg@mail.gmail.com> you wrote:
>>
>> > Indeed. However, why cannot we do the right thing soon ?
>>
>> There're no pending patches to address the root problem yet (allowing
>> changing /internal and default/ environment).
>
> Simon's patch set "env: Add support for environment files" does
> exactly that.

Doing it without changing source code, directly into the binary?

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

* [U-Boot] [RESEND PATCH 2/3] mx28evk: Add 'nandboot' environment command
  2013-10-28 13:29                 ` Otavio Salvador
@ 2013-10-28 13:41                   ` Wolfgang Denk
  2013-10-28 13:53                   ` Stefano Babic
  1 sibling, 0 replies; 15+ messages in thread
From: Wolfgang Denk @ 2013-10-28 13:41 UTC (permalink / raw)
  To: u-boot

Dear Otavio,

In message <CAP9ODKq0Ac6azBOav7R54RncB9=mhtMZ+hydjY0UiYUSCS1O0A@mail.gmail.com> you wrote:
>
> > Simon's patch set "env: Add support for environment files" does
> > exactly that.
> 
> Doing it without changing source code, directly into the binary?

Yes.

> From what I read it allows import / export but this is at runtime, I
> need it /before/ booting the board. So currently I need to patch the
> environment files for it.

Please re-read it again.

> > Please be patient, like we all are.  It's better to wait a bit now,
> > then adding work now, and adding more work later to clean up the mess
> > again.
> 
> The work has already been done.

Yes, but that's actually your own problem; it seems you ignored the
previous discussion.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Bureaucracy is the enemy of innovation."
       - Mark Shepherd, former President and CEO of Texas Instruments

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

* [U-Boot] [RESEND PATCH 2/3] mx28evk: Add 'nandboot' environment command
  2013-10-28 13:29                 ` Otavio Salvador
  2013-10-28 13:41                   ` Wolfgang Denk
@ 2013-10-28 13:53                   ` Stefano Babic
  1 sibling, 0 replies; 15+ messages in thread
From: Stefano Babic @ 2013-10-28 13:53 UTC (permalink / raw)
  To: u-boot

Hi Otavio,

On 28/10/2013 14:29, Otavio Salvador wrote:
> On Mon, Oct 28, 2013 at 11:21 AM, Wolfgang Denk <wd@denx.de> wrote:
>> Dear Otavio,
>>
>> In message <CAP9ODKpN+PMX1HP+7bEMP7u-Hc44oNc6PEpAn+nbzbQm8cDfrg@mail.gmail.com> you wrote:
>>>
>>>> Indeed. However, why cannot we do the right thing soon ?
>>>
>>> There're no pending patches to address the root problem yet (allowing
>>> changing /internal and default/ environment).
>>
>> Simon's patch set "env: Add support for environment files" does
>> exactly that.
> 
> Doing it without changing source code, directly into the binary?
> 
> From what I read it allows import / export but this is at runtime, I
> need it /before/ booting the board. So currently I need to patch the
> environment files for it.

The way I see with Simon's patch is to define a .env file for each use
case we can have. Because the environment is outside the configuration
file, we could select the right environment when we produce the binary.

Let's say we have two environments, one defined from you and the other
as "debian" environment. We could select the desired environment at
build time by the make command or adding an entry into boards.cfg,
exactly as we do now to select the imximage file with IMX_CONFIG (same
sources, different imximage.cfg).

I understand that even with Simon's patches we will not have a way to
have separate u-boot nad environment binaries, and then merge them
together. However, we have a way to select which environment type
(distro, minimal, ..) at build time.

> 
>>> I will rework the environments as .env files but I don't want to hold
>>> this change until this is accepted.
>>
>> Please be patient, like we all are.  It's better to wait a bit now,
>> then adding work now, and adding more work later to clean up the mess
>> again.
> 
> The work has already been done.
> 
>>> My patch is fine and could go in now as is. Once Simon's patches get
>>> in I will post another series reworking the environment to convert it
>>> to the .env file format but please don't block on this.
>>
>> I agree with Stefano that we should not add more to the already
>> existing amount of env settings but instead wait for a cleaner way.
>> Please be patient - you lose nothing here.
> 
> I really see no point in holding it as the work has been done already;
> it is Stefano call but I disagree with postpone it as work is done and
> being in use.

Another example is maybe not in your "wandboard: add Future Eletronics
7" WVGA LCD extension board". In that patch, you add a lot of stuff
inside CONFIG_EXTRA_ENV, that is perfectly suitable for your needs, but
it is maybe not suitable for someone else who has not a display or maybe
another LCD. But again, it fits then perfectly if we define different
.env files, and it is possible to select one of them at build time.

It is then not exactly as we started, that is having two different
images (u-boot and environemnt) and finding a way to merge them
together, but it is quite close.

> 
> I will comment on Simon's patch to clarify my understanding there.
> 

Fine, I will follow the discussion.

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

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

end of thread, other threads:[~2013-10-28 13:53 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-21 23:24 [U-Boot] [RESEND PATCH 0/3] mx28evk environment rework for NAND support Otavio Salvador
2013-10-21 23:24 ` [U-Boot] [RESEND PATCH 1/3] mx28evk: Use 512k for fdt partition to align it Otavio Salvador
2013-10-21 23:24 ` [U-Boot] [RESEND PATCH 2/3] mx28evk: Add 'nandboot' environment command Otavio Salvador
2013-10-27 16:16   ` Marek Vasut
2013-10-27 19:51     ` Otavio Salvador
2013-10-27 20:47       ` Marek Vasut
2013-10-28 11:19         ` Otavio Salvador
2013-10-28 11:31           ` Marek Vasut
2013-10-28 11:32           ` Stefano Babic
2013-10-28 12:03             ` Otavio Salvador
2013-10-28 13:21               ` Wolfgang Denk
2013-10-28 13:29                 ` Otavio Salvador
2013-10-28 13:41                   ` Wolfgang Denk
2013-10-28 13:53                   ` Stefano Babic
2013-10-21 23:24 ` [U-Boot] [RESEND PATCH 3/3] mx28evk: Extend environment to easy write of NAND system Otavio Salvador

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.