* [U-Boot] [PATCH 1/9] mx28evk: We shouldn't hardcode a rootfs filesystem type
2012-12-21 16:59 [U-Boot] [PATCH 0/9] Improve default environment for easy use Otavio Salvador
@ 2012-12-21 16:59 ` Otavio Salvador
2012-12-26 11:02 ` Stefano Babic
2012-12-21 16:59 ` [U-Boot] [PATCH 2/9] mx53loco: " Otavio Salvador
` (7 subsequent siblings)
8 siblings, 1 reply; 28+ messages in thread
From: Otavio Salvador @ 2012-12-21 16:59 UTC (permalink / raw)
To: u-boot
For a generic environment, we shouldn't have a fixed rootfs filesystem
so we drop it from env.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
include/configs/mx28evk.h | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h
index 8b89b25..3cc0726 100644
--- a/include/configs/mx28evk.h
+++ b/include/configs/mx28evk.h
@@ -292,11 +292,8 @@
"console_mainline=ttyAMA0\0" \
"mmcdev=0\0" \
"mmcpart=2\0" \
- "mmcroot=/dev/mmcblk0p3 rw\0" \
- "mmcrootfstype=ext3 rootwait\0" \
- "mmcargs=setenv bootargs console=${console_mainline},${baudrate} " \
- "root=${mmcroot} " \
- "rootfstype=${mmcrootfstype}\0" \
+ "mmcroot=/dev/mmcblk0p3 rw rootwait\0" \
+ "mmcargs=setenv bootargs console=${console_mainline},${baudrate} root=${mmcroot}\0" \
"loadbootscript=" \
"fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
"bootscript=echo Running bootscript from mmc ...; " \
--
1.7.10.4
^ permalink raw reply related [flat|nested] 28+ messages in thread* [U-Boot] [PATCH 1/9] mx28evk: We shouldn't hardcode a rootfs filesystem type
2012-12-21 16:59 ` [U-Boot] [PATCH 1/9] mx28evk: We shouldn't hardcode a rootfs filesystem type Otavio Salvador
@ 2012-12-26 11:02 ` Stefano Babic
2012-12-26 18:17 ` Otavio Salvador
0 siblings, 1 reply; 28+ messages in thread
From: Stefano Babic @ 2012-12-26 11:02 UTC (permalink / raw)
To: u-boot
On 21/12/2012 17:59, Otavio Salvador wrote:
> For a generic environment, we shouldn't have a fixed rootfs filesystem
> so we drop it from env.
>
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> ---
Hi Otavio,
> include/configs/mx28evk.h | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h
> index 8b89b25..3cc0726 100644
> --- a/include/configs/mx28evk.h
> +++ b/include/configs/mx28evk.h
> @@ -292,11 +292,8 @@
> "console_mainline=ttyAMA0\0" \
> "mmcdev=0\0" \
> "mmcpart=2\0" \
> - "mmcroot=/dev/mmcblk0p3 rw\0" \
> - "mmcrootfstype=ext3 rootwait\0" \
> - "mmcargs=setenv bootargs console=${console_mainline},${baudrate} " \
> - "root=${mmcroot} " \
> - "rootfstype=${mmcrootfstype}\0" \
> + "mmcroot=/dev/mmcblk0p3 rw rootwait\0" \
> + "mmcargs=setenv bootargs console=${console_mainline},${baudrate} root=${mmcroot}\0" \
> "loadbootscript=" \
> "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
> "bootscript=echo Running bootscript from mmc ...; " \
>
WARNING: line over 80 characters
#37: FILE: include/configs/mx28evk.h:296:
+ "mmcargs=setenv bootargs console=${console_mainline},${baudrate}
root=${mmcroot}\0" \
total: 0 errors, 1 warnings, 13 lines checked
Can you fix it ?
Regards,
Stefano
--
=====================================================================
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] 28+ messages in thread* [U-Boot] [PATCH 1/9] mx28evk: We shouldn't hardcode a rootfs filesystem type
2012-12-26 11:02 ` Stefano Babic
@ 2012-12-26 18:17 ` Otavio Salvador
2012-12-27 9:33 ` Stefano Babic
0 siblings, 1 reply; 28+ messages in thread
From: Otavio Salvador @ 2012-12-26 18:17 UTC (permalink / raw)
To: u-boot
On Wed, Dec 26, 2012 at 9:02 AM, Stefano Babic <sbabic@denx.de> wrote:
> On 21/12/2012 17:59, Otavio Salvador wrote:
>> For a generic environment, we shouldn't have a fixed rootfs filesystem
>> so we drop it from env.
>>
>> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
>> ---
>
> Hi Otavio,
>
>> include/configs/mx28evk.h | 7 ++-----
>> 1 file changed, 2 insertions(+), 5 deletions(-)
>>
>> diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h
>> index 8b89b25..3cc0726 100644
>> --- a/include/configs/mx28evk.h
>> +++ b/include/configs/mx28evk.h
>> @@ -292,11 +292,8 @@
>> "console_mainline=ttyAMA0\0" \
>> "mmcdev=0\0" \
>> "mmcpart=2\0" \
>> - "mmcroot=/dev/mmcblk0p3 rw\0" \
>> - "mmcrootfstype=ext3 rootwait\0" \
>> - "mmcargs=setenv bootargs console=${console_mainline},${baudrate} " \
>> - "root=${mmcroot} " \
>> - "rootfstype=${mmcrootfstype}\0" \
>> + "mmcroot=/dev/mmcblk0p3 rw rootwait\0" \
>> + "mmcargs=setenv bootargs console=${console_mainline},${baudrate} root=${mmcroot}\0" \
>> "loadbootscript=" \
>> "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
>> "bootscript=echo Running bootscript from mmc ...; " \
>>
>
> WARNING: line over 80 characters
> #37: FILE: include/configs/mx28evk.h:296:
> + "mmcargs=setenv bootargs console=${console_mainline},${baudrate}
> root=${mmcroot}\0" \
>
> total: 0 errors, 1 warnings, 13 lines checked
>
> Can you fix it ?
Yes but I think it'd be more confusing for someone reading the code.
If you do want me to fix it, I do.
--
Otavio Salvador O.S. Systems
E-mail: otavio at ossystems.com.br http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
^ permalink raw reply [flat|nested] 28+ messages in thread* [U-Boot] [PATCH 1/9] mx28evk: We shouldn't hardcode a rootfs filesystem type
2012-12-26 18:17 ` Otavio Salvador
@ 2012-12-27 9:33 ` Stefano Babic
2012-12-27 10:29 ` Wolfgang Denk
0 siblings, 1 reply; 28+ messages in thread
From: Stefano Babic @ 2012-12-27 9:33 UTC (permalink / raw)
To: u-boot
On 26/12/2012 19:17, Otavio Salvador wrote:
> On Wed, Dec 26, 2012 at 9:02 AM, Stefano Babic <sbabic@denx.de> wrote:
>> On 21/12/2012 17:59, Otavio Salvador wrote:
>>> For a generic environment, we shouldn't have a fixed rootfs filesystem
>>> so we drop it from env.
>>>
>>> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
>>> ---
Hi Otavio,
>>
>>> include/configs/mx28evk.h | 7 ++-----
>>> 1 file changed, 2 insertions(+), 5 deletions(-)
>>>
>>> diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h
>>> index 8b89b25..3cc0726 100644
>>> --- a/include/configs/mx28evk.h
>>> +++ b/include/configs/mx28evk.h
>>> @@ -292,11 +292,8 @@
>>> "console_mainline=ttyAMA0\0" \
>>> "mmcdev=0\0" \
>>> "mmcpart=2\0" \
>>> - "mmcroot=/dev/mmcblk0p3 rw\0" \
>>> - "mmcrootfstype=ext3 rootwait\0" \
>>> - "mmcargs=setenv bootargs console=${console_mainline},${baudrate} " \
>>> - "root=${mmcroot} " \
>>> - "rootfstype=${mmcrootfstype}\0" \
>>> + "mmcroot=/dev/mmcblk0p3 rw rootwait\0" \
>>> + "mmcargs=setenv bootargs console=${console_mainline},${baudrate} root=${mmcroot}\0" \
>>> "loadbootscript=" \
>>> "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
>>> "bootscript=echo Running bootscript from mmc ...; " \
>>>
>>
>> WARNING: line over 80 characters
>> #37: FILE: include/configs/mx28evk.h:296:
>> + "mmcargs=setenv bootargs console=${console_mainline},${baudrate}
>> root=${mmcroot}\0" \
>>
>> total: 0 errors, 1 warnings, 13 lines checked
>>
>> Can you fix it ?
>
> Yes but I think it'd be more confusing for someone reading the code.
> If you do want me to fix it, I do.
Well, I think you can add extra tabs to make it more readable:
+ "mmcargs=setenv bootargs console=${console_mainline},"\
+ " ${baudrate} root=${mmcroot}\0" \
This solution is also in other boards - if we let these warnings, I know
that some periodic checks in the code will raise the warnings again.
Regards,
Stefano
--
=====================================================================
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] 28+ messages in thread* [U-Boot] [PATCH 1/9] mx28evk: We shouldn't hardcode a rootfs filesystem type
2012-12-27 9:33 ` Stefano Babic
@ 2012-12-27 10:29 ` Wolfgang Denk
2012-12-27 20:37 ` Otavio Salvador
0 siblings, 1 reply; 28+ messages in thread
From: Wolfgang Denk @ 2012-12-27 10:29 UTC (permalink / raw)
To: u-boot
Dear Stefano Babic,
In message <50DC15E3.2040003@denx.de> you wrote:
>
> Well, I think you can add extra tabs to make it more readable:
>
> + "mmcargs=setenv bootargs console=${console_mainline},"\
> + " ${baudrate} root=${mmcroot}\0" \
That should be
"${baudrate} root=${mmcroot}\0" \
i. e. without a space after the opening '"'.
Otavio: It may also help to chose somewhat shorter variable names -
this also helps the end user; "console_mainline" is a terribly ling
variable name, and I don't consider it a good choice either.
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
For every complex problem, there is a solution that is simple, neat,
and wrong. - Mark Twain
^ permalink raw reply [flat|nested] 28+ messages in thread* [U-Boot] [PATCH 1/9] mx28evk: We shouldn't hardcode a rootfs filesystem type
2012-12-27 10:29 ` Wolfgang Denk
@ 2012-12-27 20:37 ` Otavio Salvador
0 siblings, 0 replies; 28+ messages in thread
From: Otavio Salvador @ 2012-12-27 20:37 UTC (permalink / raw)
To: u-boot
On Thu, Dec 27, 2012 at 8:29 AM, Wolfgang Denk <wd@denx.de> wrote:
> Dear Stefano Babic,
>
> In message <50DC15E3.2040003@denx.de> you wrote:
>>
>> Well, I think you can add extra tabs to make it more readable:
>>
>> + "mmcargs=setenv bootargs console=${console_mainline},"\
>> + " ${baudrate} root=${mmcroot}\0" \
>
> That should be
>
> "${baudrate} root=${mmcroot}\0" \
>
> i. e. without a space after the opening '"'.
I did a similar change and will send a v2.
> Otavio: It may also help to chose somewhat shorter variable names -
> this also helps the end user; "console_mainline" is a terribly ling
> variable name, and I don't consider it a good choice either.
Yes I agree; in fact I still wish to rework the environment and have
it common to most Freescale boards in future but I'll look into that
later.
--
Otavio Salvador O.S. Systems
E-mail: otavio at ossystems.com.br http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
^ permalink raw reply [flat|nested] 28+ messages in thread
* [U-Boot] [PATCH 2/9] mx53loco: We shouldn't hardcode a rootfs filesystem type
2012-12-21 16:59 [U-Boot] [PATCH 0/9] Improve default environment for easy use Otavio Salvador
2012-12-21 16:59 ` [U-Boot] [PATCH 1/9] mx28evk: We shouldn't hardcode a rootfs filesystem type Otavio Salvador
@ 2012-12-21 16:59 ` Otavio Salvador
2012-12-26 11:07 ` Stefano Babic
2012-12-21 16:59 ` [U-Boot] [PATCH 3/9] mx53loco: Change default loadaddr to 0x72000000 Otavio Salvador
` (6 subsequent siblings)
8 siblings, 1 reply; 28+ messages in thread
From: Otavio Salvador @ 2012-12-21 16:59 UTC (permalink / raw)
To: u-boot
For a generic environment, we shouldn't have a fixed rootfs filesystem
so we drop it from env.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
include/configs/mx53loco.h | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/include/configs/mx53loco.h b/include/configs/mx53loco.h
index e30502b..5f8f52e 100644
--- a/include/configs/mx53loco.h
+++ b/include/configs/mx53loco.h
@@ -120,11 +120,8 @@
"uimage=uImage\0" \
"mmcdev=0\0" \
"mmcpart=2\0" \
- "mmcroot=/dev/mmcblk0p3 rw\0" \
- "mmcrootfstype=ext3 rootwait\0" \
- "mmcargs=setenv bootargs console=ttymxc0,${baudrate} " \
- "root=${mmcroot} " \
- "rootfstype=${mmcrootfstype}\0" \
+ "mmcroot=/dev/mmcblk0p3 rw rootwait\0" \
+ "mmcargs=setenv bootargs console=ttymxc0,${baudrate} root=${mmcroot} " \
"loadbootscript=" \
"fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
"bootscript=echo Running bootscript from mmc ...; " \
--
1.7.10.4
^ permalink raw reply related [flat|nested] 28+ messages in thread* [U-Boot] [PATCH 2/9] mx53loco: We shouldn't hardcode a rootfs filesystem type
2012-12-21 16:59 ` [U-Boot] [PATCH 2/9] mx53loco: " Otavio Salvador
@ 2012-12-26 11:07 ` Stefano Babic
0 siblings, 0 replies; 28+ messages in thread
From: Stefano Babic @ 2012-12-26 11:07 UTC (permalink / raw)
To: u-boot
On 21/12/2012 17:59, Otavio Salvador wrote:
> For a generic environment, we shouldn't have a fixed rootfs filesystem
> so we drop it from env.
>
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> ---
Applied to u-boot-imx, thanks.
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] 28+ messages in thread
* [U-Boot] [PATCH 3/9] mx53loco: Change default loadaddr to 0x72000000
2012-12-21 16:59 [U-Boot] [PATCH 0/9] Improve default environment for easy use Otavio Salvador
2012-12-21 16:59 ` [U-Boot] [PATCH 1/9] mx28evk: We shouldn't hardcode a rootfs filesystem type Otavio Salvador
2012-12-21 16:59 ` [U-Boot] [PATCH 2/9] mx53loco: " Otavio Salvador
@ 2012-12-21 16:59 ` Otavio Salvador
2012-12-26 11:10 ` Stefano Babic
2012-12-21 16:59 ` [U-Boot] [PATCH 4/9] mx6qsabrelite: Change default loadaddr to 0x12000000 Otavio Salvador
` (5 subsequent siblings)
8 siblings, 1 reply; 28+ messages in thread
From: Otavio Salvador @ 2012-12-21 16:59 UTC (permalink / raw)
To: u-boot
This allow use of mainline and Freescale BSP Linux kernel with same
environment.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
include/configs/mx53loco.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/configs/mx53loco.h b/include/configs/mx53loco.h
index 5f8f52e..4cfdc0b 100644
--- a/include/configs/mx53loco.h
+++ b/include/configs/mx53loco.h
@@ -112,7 +112,7 @@
#define CONFIG_ETHPRIME "FEC0"
-#define CONFIG_LOADADDR 0x70800000 /* loadaddr env var */
+#define CONFIG_LOADADDR 0x72000000 /* loadaddr env var */
#define CONFIG_SYS_TEXT_BASE 0x77800000
#define CONFIG_EXTRA_ENV_SETTINGS \
--
1.7.10.4
^ permalink raw reply related [flat|nested] 28+ messages in thread* [U-Boot] [PATCH 3/9] mx53loco: Change default loadaddr to 0x72000000
2012-12-21 16:59 ` [U-Boot] [PATCH 3/9] mx53loco: Change default loadaddr to 0x72000000 Otavio Salvador
@ 2012-12-26 11:10 ` Stefano Babic
0 siblings, 0 replies; 28+ messages in thread
From: Stefano Babic @ 2012-12-26 11:10 UTC (permalink / raw)
To: u-boot
On 21/12/2012 17:59, Otavio Salvador wrote:
> This allow use of mainline and Freescale BSP Linux kernel with same
> environment.
>
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> ---
Applied to u-boot-imx, thanks.
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] 28+ messages in thread
* [U-Boot] [PATCH 4/9] mx6qsabrelite: Change default loadaddr to 0x12000000
2012-12-21 16:59 [U-Boot] [PATCH 0/9] Improve default environment for easy use Otavio Salvador
` (2 preceding siblings ...)
2012-12-21 16:59 ` [U-Boot] [PATCH 3/9] mx53loco: Change default loadaddr to 0x72000000 Otavio Salvador
@ 2012-12-21 16:59 ` Otavio Salvador
2012-12-26 11:12 ` Stefano Babic
2012-12-21 16:59 ` [U-Boot] [PATCH 5/9] mx6qsabre_common: " Otavio Salvador
` (4 subsequent siblings)
8 siblings, 1 reply; 28+ messages in thread
From: Otavio Salvador @ 2012-12-21 16:59 UTC (permalink / raw)
To: u-boot
This allow use of mainline and Freescale BSP Linux kernel with same
environment.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
include/configs/mx6qsabrelite.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/configs/mx6qsabrelite.h b/include/configs/mx6qsabrelite.h
index 4ce4d4c..0f6bbb4 100644
--- a/include/configs/mx6qsabrelite.h
+++ b/include/configs/mx6qsabrelite.h
@@ -148,7 +148,7 @@
#define CONFIG_PREBOOT ""
-#define CONFIG_LOADADDR 0x10800000
+#define CONFIG_LOADADDR 0x12000000
#define CONFIG_SYS_TEXT_BASE 0x17800000
#define CONFIG_EXTRA_ENV_SETTINGS \
--
1.7.10.4
^ permalink raw reply related [flat|nested] 28+ messages in thread* [U-Boot] [PATCH 4/9] mx6qsabrelite: Change default loadaddr to 0x12000000
2012-12-21 16:59 ` [U-Boot] [PATCH 4/9] mx6qsabrelite: Change default loadaddr to 0x12000000 Otavio Salvador
@ 2012-12-26 11:12 ` Stefano Babic
0 siblings, 0 replies; 28+ messages in thread
From: Stefano Babic @ 2012-12-26 11:12 UTC (permalink / raw)
To: u-boot
On 21/12/2012 17:59, Otavio Salvador wrote:
> This allow use of mainline and Freescale BSP Linux kernel with same
> environment.
>
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> ---
Applied to u-boot-imx, thanks.
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] 28+ messages in thread
* [U-Boot] [PATCH 5/9] mx6qsabre_common: Change default loadaddr to 0x12000000
2012-12-21 16:59 [U-Boot] [PATCH 0/9] Improve default environment for easy use Otavio Salvador
` (3 preceding siblings ...)
2012-12-21 16:59 ` [U-Boot] [PATCH 4/9] mx6qsabrelite: Change default loadaddr to 0x12000000 Otavio Salvador
@ 2012-12-21 16:59 ` Otavio Salvador
2012-12-26 11:14 ` Stefano Babic
2012-12-21 16:59 ` [U-Boot] [PATCH 6/9] mx28evk: Add support to dynamically choose between ftd use or not Otavio Salvador
` (3 subsequent siblings)
8 siblings, 1 reply; 28+ messages in thread
From: Otavio Salvador @ 2012-12-21 16:59 UTC (permalink / raw)
To: u-boot
This allow use of mainline and Freescale BSP Linux kernel with same
environment.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
include/configs/mx6qsabre_common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/configs/mx6qsabre_common.h b/include/configs/mx6qsabre_common.h
index 0f226f7..9a25480 100644
--- a/include/configs/mx6qsabre_common.h
+++ b/include/configs/mx6qsabre_common.h
@@ -78,7 +78,7 @@
#define CONFIG_BOOTDELAY 1
-#define CONFIG_LOADADDR 0x10800000
+#define CONFIG_LOADADDR 0x12000000
#define CONFIG_SYS_TEXT_BASE 0x17800000
#define CONFIG_EXTRA_ENV_SETTINGS \
--
1.7.10.4
^ permalink raw reply related [flat|nested] 28+ messages in thread* [U-Boot] [PATCH 5/9] mx6qsabre_common: Change default loadaddr to 0x12000000
2012-12-21 16:59 ` [U-Boot] [PATCH 5/9] mx6qsabre_common: " Otavio Salvador
@ 2012-12-26 11:14 ` Stefano Babic
0 siblings, 0 replies; 28+ messages in thread
From: Stefano Babic @ 2012-12-26 11:14 UTC (permalink / raw)
To: u-boot
On 21/12/2012 17:59, Otavio Salvador wrote:
> This allow use of mainline and Freescale BSP Linux kernel with same
> environment.
>
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> ---
Applied to u-boot-imx, thanks.
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] 28+ messages in thread
* [U-Boot] [PATCH 6/9] mx28evk: Add support to dynamically choose between ftd use or not
2012-12-21 16:59 [U-Boot] [PATCH 0/9] Improve default environment for easy use Otavio Salvador
` (4 preceding siblings ...)
2012-12-21 16:59 ` [U-Boot] [PATCH 5/9] mx6qsabre_common: " Otavio Salvador
@ 2012-12-21 16:59 ` Otavio Salvador
2012-12-26 11:15 ` Stefano Babic
2012-12-21 16:59 ` [U-Boot] [PATCH 7/9] mx53loco: " Otavio Salvador
` (2 subsequent siblings)
8 siblings, 1 reply; 28+ messages in thread
From: Otavio Salvador @ 2012-12-21 16:59 UTC (permalink / raw)
To: u-boot
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
include/configs/mx28evk.h | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h
index 3cc0726..5c1c052 100644
--- a/include/configs/mx28evk.h
+++ b/include/configs/mx28evk.h
@@ -290,6 +290,8 @@
"uimage=uImage\0" \
"console_fsl=ttyAM0\0" \
"console_mainline=ttyAMA0\0" \
+ "ftd_file=imx28-evk.dtb\0" \
+ "ftd_addr=0x41000000\0" \
"mmcdev=0\0" \
"mmcpart=2\0" \
"mmcroot=/dev/mmcblk0p3 rw rootwait\0" \
@@ -301,13 +303,22 @@
"loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
"mmcboot=echo Booting from mmc ...; " \
"run mmcargs; " \
- "bootm\0" \
+ "if fatload mmc ${mmcdev}:${mmcpart} ${ftd_addr} ${ftd_file}; then " \
+ "bootm ${loadaddr} - ${ftd_addr}; " \
+ "else " \
+ "bootm; " \
+ "fi;\0" \
"netargs=setenv bootargs console=${console_mainline},${baudrate} " \
"root=/dev/nfs " \
"ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
"netboot=echo Booting from net ...; " \
"run netargs; " \
- "dhcp ${uimage}; bootm\0"
+ "dhcp ${uimage}; " \
+ "if dhcp ${ftd_addr} ${ftd_file}; then " \
+ "bootm ${loadaddr} - ${ftd_addr}; " \
+ "else " \
+ "bootm; " \
+ "fi;\0"
#define CONFIG_BOOTCOMMAND \
"mmc dev ${mmcdev}; if mmc rescan; then " \
--
1.7.10.4
^ permalink raw reply related [flat|nested] 28+ messages in thread* [U-Boot] [PATCH 6/9] mx28evk: Add support to dynamically choose between ftd use or not
2012-12-21 16:59 ` [U-Boot] [PATCH 6/9] mx28evk: Add support to dynamically choose between ftd use or not Otavio Salvador
@ 2012-12-26 11:15 ` Stefano Babic
2012-12-26 18:19 ` Otavio Salvador
0 siblings, 1 reply; 28+ messages in thread
From: Stefano Babic @ 2012-12-26 11:15 UTC (permalink / raw)
To: u-boot
On 21/12/2012 17:59, Otavio Salvador wrote:
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> ---
Hi Otavio,
> include/configs/mx28evk.h | 15 +++++++++++++--
> 1 file changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h
> index 3cc0726..5c1c052 100644
> --- a/include/configs/mx28evk.h
> +++ b/include/configs/mx28evk.h
> @@ -290,6 +290,8 @@
> "uimage=uImage\0" \
> "console_fsl=ttyAM0\0" \
> "console_mainline=ttyAMA0\0" \
> + "ftd_file=imx28-evk.dtb\0" \
> + "ftd_addr=0x41000000\0" \
> "mmcdev=0\0" \
> "mmcpart=2\0" \
> "mmcroot=/dev/mmcblk0p3 rw rootwait\0" \
> @@ -301,13 +303,22 @@
> "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
> "mmcboot=echo Booting from mmc ...; " \
> "run mmcargs; " \
> - "bootm\0" \
> + "if fatload mmc ${mmcdev}:${mmcpart} ${ftd_addr} ${ftd_file}; then " \
> + "bootm ${loadaddr} - ${ftd_addr}; " \
> + "else " \
> + "bootm; " \
> + "fi;\0" \
> "netargs=setenv bootargs console=${console_mainline},${baudrate} " \
> "root=/dev/nfs " \
> "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
> "netboot=echo Booting from net ...; " \
> "run netargs; " \
> - "dhcp ${uimage}; bootm\0"
> + "dhcp ${uimage}; " \
> + "if dhcp ${ftd_addr} ${ftd_file}; then " \
> + "bootm ${loadaddr} - ${ftd_addr}; " \
> + "else " \
> + "bootm; " \
> + "fi;\0"
>
> #define CONFIG_BOOTCOMMAND \
> "mmc dev ${mmcdev}; if mmc rescan; then " \
>
Please fix the following warning reported by checkpatch:
WARNING: line over 80 characters
#39: FILE: include/configs/mx28evk.h:306:
+ "if fatload mmc ${mmcdev}:${mmcpart} ${ftd_addr} ${ftd_file}; then " \
total: 0 errors, 1 warnings, 32 lines checked
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] 28+ messages in thread* [U-Boot] [PATCH 6/9] mx28evk: Add support to dynamically choose between ftd use or not
2012-12-26 11:15 ` Stefano Babic
@ 2012-12-26 18:19 ` Otavio Salvador
0 siblings, 0 replies; 28+ messages in thread
From: Otavio Salvador @ 2012-12-26 18:19 UTC (permalink / raw)
To: u-boot
On Wed, Dec 26, 2012 at 9:15 AM, Stefano Babic <sbabic@denx.de> wrote:
> On 21/12/2012 17:59, Otavio Salvador wrote:
>> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
>> ---
>
> Hi Otavio,
>
>> include/configs/mx28evk.h | 15 +++++++++++++--
>> 1 file changed, 13 insertions(+), 2 deletions(-)
>>
>> diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h
>> index 3cc0726..5c1c052 100644
>> --- a/include/configs/mx28evk.h
>> +++ b/include/configs/mx28evk.h
>> @@ -290,6 +290,8 @@
>> "uimage=uImage\0" \
>> "console_fsl=ttyAM0\0" \
>> "console_mainline=ttyAMA0\0" \
>> + "ftd_file=imx28-evk.dtb\0" \
>> + "ftd_addr=0x41000000\0" \
>> "mmcdev=0\0" \
>> "mmcpart=2\0" \
>> "mmcroot=/dev/mmcblk0p3 rw rootwait\0" \
>> @@ -301,13 +303,22 @@
>> "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
>> "mmcboot=echo Booting from mmc ...; " \
>> "run mmcargs; " \
>> - "bootm\0" \
>> + "if fatload mmc ${mmcdev}:${mmcpart} ${ftd_addr} ${ftd_file}; then " \
>> + "bootm ${loadaddr} - ${ftd_addr}; " \
>> + "else " \
>> + "bootm; " \
>> + "fi;\0" \
>> "netargs=setenv bootargs console=${console_mainline},${baudrate} " \
>> "root=/dev/nfs " \
>> "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
>> "netboot=echo Booting from net ...; " \
>> "run netargs; " \
>> - "dhcp ${uimage}; bootm\0"
>> + "dhcp ${uimage}; " \
>> + "if dhcp ${ftd_addr} ${ftd_file}; then " \
>> + "bootm ${loadaddr} - ${ftd_addr}; " \
>> + "else " \
>> + "bootm; " \
>> + "fi;\0"
>>
>> #define CONFIG_BOOTCOMMAND \
>> "mmc dev ${mmcdev}; if mmc rescan; then " \
>>
>
> Please fix the following warning reported by checkpatch:
>
> WARNING: line over 80 characters
> #39: FILE: include/configs/mx28evk.h:306:
> + "if fatload mmc ${mmcdev}:${mmcpart} ${ftd_addr} ${ftd_file}; then " \
>
> total: 0 errors, 1 warnings, 32 lines checked
Some to the other patch; it is a little bit above the limit but it
seems more easy to read for me. I can fix it but I'd like to double
check before.
--
Otavio Salvador O.S. Systems
E-mail: otavio at ossystems.com.br http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
^ permalink raw reply [flat|nested] 28+ messages in thread
* [U-Boot] [PATCH 7/9] mx53loco: Add support to dynamically choose between ftd use or not
2012-12-21 16:59 [U-Boot] [PATCH 0/9] Improve default environment for easy use Otavio Salvador
` (5 preceding siblings ...)
2012-12-21 16:59 ` [U-Boot] [PATCH 6/9] mx28evk: Add support to dynamically choose between ftd use or not Otavio Salvador
@ 2012-12-21 16:59 ` Otavio Salvador
2012-12-26 11:31 ` Stefano Babic
2012-12-21 16:59 ` [U-Boot] [PATCH 8/9] mx6qsabrelite: " Otavio Salvador
2012-12-21 16:59 ` [U-Boot] [PATCH 9/9] mx6qsabre{auto, sd}: " Otavio Salvador
8 siblings, 1 reply; 28+ messages in thread
From: Otavio Salvador @ 2012-12-21 16:59 UTC (permalink / raw)
To: u-boot
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
include/configs/mx53loco.h | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/include/configs/mx53loco.h b/include/configs/mx53loco.h
index 4cfdc0b..505957c 100644
--- a/include/configs/mx53loco.h
+++ b/include/configs/mx53loco.h
@@ -118,6 +118,8 @@
#define CONFIG_EXTRA_ENV_SETTINGS \
"script=boot.scr\0" \
"uimage=uImage\0" \
+ "ftd_file=imx53-qsb.dtb\0" \
+ "ftd_addr=0x71000000\0" \
"mmcdev=0\0" \
"mmcpart=2\0" \
"mmcroot=/dev/mmcblk0p3 rw rootwait\0" \
@@ -129,13 +131,22 @@
"loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
"mmcboot=echo Booting from mmc ...; " \
"run mmcargs; " \
- "bootm\0" \
+ "if fatload mmc ${mmcdev}:${mmcpart} ${ftd_addr} ${ftd_file}; then " \
+ "bootm ${loadaddr} - ${ftd_addr}; " \
+ "else " \
+ "bootm; " \
+ "fi;\0" \
"netargs=setenv bootargs console=ttymxc0,${baudrate} " \
"root=/dev/nfs " \
"ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
"netboot=echo Booting from net ...; " \
"run netargs; " \
- "dhcp ${uimage}; bootm\0" \
+ "dhcp ${uimage}; " \
+ "if dhcp ${ftd_addr} ${ftd_file}; then " \
+ "bootm ${loadaddr} - ${ftd_addr}; " \
+ "else " \
+ "bootm; " \
+ "fi;\0"
#define CONFIG_BOOTCOMMAND \
"mmc dev ${mmcdev}; if mmc rescan; then " \
--
1.7.10.4
^ permalink raw reply related [flat|nested] 28+ messages in thread* [U-Boot] [PATCH 7/9] mx53loco: Add support to dynamically choose between ftd use or not
2012-12-21 16:59 ` [U-Boot] [PATCH 7/9] mx53loco: " Otavio Salvador
@ 2012-12-26 11:31 ` Stefano Babic
2012-12-26 12:14 ` Fabio Estevam
0 siblings, 1 reply; 28+ messages in thread
From: Stefano Babic @ 2012-12-26 11:31 UTC (permalink / raw)
To: u-boot
On 21/12/2012 17:59, Otavio Salvador wrote:
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> ---
> include/configs/mx53loco.h | 15 +++++++++++++--
> 1 file changed, 13 insertions(+), 2 deletions(-)
>
Hi Otavio,
> diff --git a/include/configs/mx53loco.h b/include/configs/mx53loco.h
> index 4cfdc0b..505957c 100644
> --- a/include/configs/mx53loco.h
> +++ b/include/configs/mx53loco.h
> @@ -118,6 +118,8 @@
> #define CONFIG_EXTRA_ENV_SETTINGS \
> "script=boot.scr\0" \
> "uimage=uImage\0" \
> + "ftd_file=imx53-qsb.dtb\0" \
> + "ftd_addr=0x71000000\0" \
> "mmcdev=0\0" \
> "mmcpart=2\0" \
> "mmcroot=/dev/mmcblk0p3 rw rootwait\0" \
> @@ -129,13 +131,22 @@
> "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
> "mmcboot=echo Booting from mmc ...; " \
> "run mmcargs; " \
> - "bootm\0" \
> + "if fatload mmc ${mmcdev}:${mmcpart} ${ftd_addr} ${ftd_file}; then " \
> + "bootm ${loadaddr} - ${ftd_addr}; " \
> + "else " \
> + "bootm; " \
> + "fi;\0" \
> "netargs=setenv bootargs console=ttymxc0,${baudrate} " \
> "root=/dev/nfs " \
> "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
> "netboot=echo Booting from net ...; " \
> "run netargs; " \
> - "dhcp ${uimage}; bootm\0" \
> + "dhcp ${uimage}; " \
> + "if dhcp ${ftd_addr} ${ftd_file}; then " \
> + "bootm ${loadaddr} - ${ftd_addr}; " \
> + "else " \
> + "bootm; " \
> + "fi;\0"
>
Only to remark that this is the correct behavior. The kernel with fdt is
booted independently if this is wanted or not, but if the fdt file is
loaded successfully from MMC or network. This can have some drawback
effects if, for example, the fdt is simply stored on the TFTP server,
but we want to boot a kernel without DT. For example, when someone wants
to test both kernels or there are multiple instances of the same board
type (mx53loco in this case) loading from the same TFTP server.
In your patch, the behavior depends if the fdt is simply present on the
media, but this does not always mean that the file must be loaded.
Should be not better to set variable as flag to force the desired
behavior and to be sure that the system does not boot in a different way
as the user thinks ?
In other words, something like :
"if boot_fdt; then " \
"if dhcp ${ftd_addr} ${ftd_file}; then " \
"bootm ${loadaddr} - ${ftd_addr}; " \
"else " \
"echo Error: I cannot boot a DT kernel; \"
"fi; \"
" else bootm; fi;\0"
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] 28+ messages in thread* [U-Boot] [PATCH 7/9] mx53loco: Add support to dynamically choose between ftd use or not
2012-12-26 11:31 ` Stefano Babic
@ 2012-12-26 12:14 ` Fabio Estevam
2012-12-26 18:23 ` Otavio Salvador
0 siblings, 1 reply; 28+ messages in thread
From: Fabio Estevam @ 2012-12-26 12:14 UTC (permalink / raw)
To: u-boot
On Wed, Dec 26, 2012 at 9:31 AM, Stefano Babic <sbabic@denx.de> wrote:
> Only to remark that this is the correct behavior. The kernel with fdt is
> booted independently if this is wanted or not, but if the fdt file is
> loaded successfully from MMC or network. This can have some drawback
> effects if, for example, the fdt is simply stored on the TFTP server,
> but we want to boot a kernel without DT. For example, when someone wants
> to test both kernels or there are multiple instances of the same board
> type (mx53loco in this case) loading from the same TFTP server.
>
> In your patch, the behavior depends if the fdt is simply present on the
> media, but this does not always mean that the file must be loaded.
> Should be not better to set variable as flag to force the desired
> behavior and to be sure that the system does not boot in a different way
> as the user thinks ?
>
> In other words, something like :
>
> "if boot_fdt; then " \
> "if dhcp ${ftd_addr} ${ftd_file}; then " \
> "bootm ${loadaddr} - ${ftd_addr}; " \
> "else " \
> "echo Error: I cannot boot a DT kernel; \"
> "fi; \"
> " else bootm; fi;\0"
Yes, I think this is a good idea and would allow us to easily switch
from dt to non-dt kernel during tests.
Regards,
Fabio Estevam
^ permalink raw reply [flat|nested] 28+ messages in thread* [U-Boot] [PATCH 7/9] mx53loco: Add support to dynamically choose between ftd use or not
2012-12-26 12:14 ` Fabio Estevam
@ 2012-12-26 18:23 ` Otavio Salvador
2012-12-27 9:44 ` Stefano Babic
0 siblings, 1 reply; 28+ messages in thread
From: Otavio Salvador @ 2012-12-26 18:23 UTC (permalink / raw)
To: u-boot
On Wed, Dec 26, 2012 at 10:14 AM, Fabio Estevam <festevam@gmail.com> wrote:
> On Wed, Dec 26, 2012 at 9:31 AM, Stefano Babic <sbabic@denx.de> wrote:
>
>> Only to remark that this is the correct behavior. The kernel with fdt is
>> booted independently if this is wanted or not, but if the fdt file is
>> loaded successfully from MMC or network. This can have some drawback
>> effects if, for example, the fdt is simply stored on the TFTP server,
>> but we want to boot a kernel without DT. For example, when someone wants
>> to test both kernels or there are multiple instances of the same board
>> type (mx53loco in this case) loading from the same TFTP server.
>>
>> In your patch, the behavior depends if the fdt is simply present on the
>> media, but this does not always mean that the file must be loaded.
>> Should be not better to set variable as flag to force the desired
>> behavior and to be sure that the system does not boot in a different way
>> as the user thinks ?
>>
>> In other words, something like :
>>
>> "if boot_fdt; then " \
>> "if dhcp ${ftd_addr} ${ftd_file}; then " \
>> "bootm ${loadaddr} - ${ftd_addr}; " \
>> "else " \
>> "echo Error: I cannot boot a DT kernel; \"
>> "fi; \"
>> " else bootm; fi;\0"
>
>
> Yes, I think this is a good idea and would allow us to easily switch
> from dt to non-dt kernel during tests.
I like the idea but maybe we could have three states?
boot_fdt=yes
It'd imply force fdt and would behave as you said above;
boot_fdt=no
Would ignore the fdt completely
boot_fdt=auto
The current code, which try to load fdt and do not fail otherwise.
Comments?
--
Otavio Salvador O.S. Systems
E-mail: otavio at ossystems.com.br http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
^ permalink raw reply [flat|nested] 28+ messages in thread* [U-Boot] [PATCH 7/9] mx53loco: Add support to dynamically choose between ftd use or not
2012-12-26 18:23 ` Otavio Salvador
@ 2012-12-27 9:44 ` Stefano Babic
2012-12-27 21:22 ` Otavio Salvador
0 siblings, 1 reply; 28+ messages in thread
From: Stefano Babic @ 2012-12-27 9:44 UTC (permalink / raw)
To: u-boot
On 26/12/2012 19:23, Otavio Salvador wrote:
> On Wed, Dec 26, 2012 at 10:14 AM, Fabio Estevam <festevam@gmail.com> wrote:
>> On Wed, Dec 26, 2012 at 9:31 AM, Stefano Babic <sbabic@denx.de> wrote:
>>
>>> Only to remark that this is the correct behavior. The kernel with fdt is
>>> booted independently if this is wanted or not, but if the fdt file is
>>> loaded successfully from MMC or network. This can have some drawback
>>> effects if, for example, the fdt is simply stored on the TFTP server,
>>> but we want to boot a kernel without DT. For example, when someone wants
>>> to test both kernels or there are multiple instances of the same board
>>> type (mx53loco in this case) loading from the same TFTP server.
>>>
>>> In your patch, the behavior depends if the fdt is simply present on the
>>> media, but this does not always mean that the file must be loaded.
>>> Should be not better to set variable as flag to force the desired
>>> behavior and to be sure that the system does not boot in a different way
>>> as the user thinks ?
>>>
>>> In other words, something like :
>>>
>>> "if boot_fdt; then " \
>>> "if dhcp ${ftd_addr} ${ftd_file}; then " \
>>> "bootm ${loadaddr} - ${ftd_addr}; " \
>>> "else " \
>>> "echo Error: I cannot boot a DT kernel; \"
>>> "fi; \"
>>> " else bootm; fi;\0"
>>
>>
>> Yes, I think this is a good idea and would allow us to easily switch
>> from dt to non-dt kernel during tests.
>
> I like the idea but maybe we could have three states?
>
> boot_fdt=yes
>
> It'd imply force fdt and would behave as you said above;
>
> boot_fdt=no
>
> Would ignore the fdt completely
>
> boot_fdt=auto
>
> The current code, which try to load fdt and do not fail otherwise.
>
> Comments?
Reading again your environment, it seems to me that you strictly bind
the network configuration with fdt. But they are two distinct setup.
Let's say, if I desire to start a fdt kernel but I have a static ip
address. In this case, I should load with "tftp" instead using "dhcp".
So the necessity to have a three state is due to the fact you are
setting more as one state in one shot: fdt or not, and dhcp or not. IMHO
you need two variables to manage them independently. I think I did
something like this in another board, but I do not remember which one ;-(.
So you can have:
boot_fdt
ip_dyn
to discriminate what the script should do.
"if boot_fdt; then " \
"if ip_dyn;then" \
"if dhcp ${ftd_addr} ${ftd_file}; then " \
"bootm ${loadaddr} - ${ftd_addr}; " \
"else " \
"echo Error: I cannot boot a DT kernel; \"
"fi;" \
"else tftp ${ftd_addr} ${ftd_file}
.....
Regards,
Stefano
--
=====================================================================
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] 28+ messages in thread* [U-Boot] [PATCH 7/9] mx53loco: Add support to dynamically choose between ftd use or not
2012-12-27 9:44 ` Stefano Babic
@ 2012-12-27 21:22 ` Otavio Salvador
2012-12-28 8:52 ` Stefano Babic
0 siblings, 1 reply; 28+ messages in thread
From: Otavio Salvador @ 2012-12-27 21:22 UTC (permalink / raw)
To: u-boot
On Thu, Dec 27, 2012 at 7:44 AM, Stefano Babic <sbabic@denx.de> wrote:
> On 26/12/2012 19:23, Otavio Salvador wrote:
>> On Wed, Dec 26, 2012 at 10:14 AM, Fabio Estevam <festevam@gmail.com> wrote:
>>> On Wed, Dec 26, 2012 at 9:31 AM, Stefano Babic <sbabic@denx.de> wrote:
>>>
>>>> Only to remark that this is the correct behavior. The kernel with fdt is
>>>> booted independently if this is wanted or not, but if the fdt file is
>>>> loaded successfully from MMC or network. This can have some drawback
>>>> effects if, for example, the fdt is simply stored on the TFTP server,
>>>> but we want to boot a kernel without DT. For example, when someone wants
>>>> to test both kernels or there are multiple instances of the same board
>>>> type (mx53loco in this case) loading from the same TFTP server.
>>>>
>>>> In your patch, the behavior depends if the fdt is simply present on the
>>>> media, but this does not always mean that the file must be loaded.
>>>> Should be not better to set variable as flag to force the desired
>>>> behavior and to be sure that the system does not boot in a different way
>>>> as the user thinks ?
>>>>
>>>> In other words, something like :
>>>>
>>>> "if boot_fdt; then " \
>>>> "if dhcp ${ftd_addr} ${ftd_file}; then " \
>>>> "bootm ${loadaddr} - ${ftd_addr}; " \
>>>> "else " \
>>>> "echo Error: I cannot boot a DT kernel; \"
>>>> "fi; \"
>>>> " else bootm; fi;\0"
>>>
>>>
>>> Yes, I think this is a good idea and would allow us to easily switch
>>> from dt to non-dt kernel during tests.
>>
>> I like the idea but maybe we could have three states?
>>
>> boot_fdt=yes
>>
>> It'd imply force fdt and would behave as you said above;
>>
>> boot_fdt=no
>>
>> Would ignore the fdt completely
>>
>> boot_fdt=auto
>>
>> The current code, which try to load fdt and do not fail otherwise.
>>
>> Comments?
>
> Reading again your environment, it seems to me that you strictly bind
> the network configuration with fdt. But they are two distinct setup.
> Let's say, if I desire to start a fdt kernel but I have a static ip
> address. In this case, I should load with "tftp" instead using "dhcp".
> So the necessity to have a three state is due to the fact you are
> setting more as one state in one shot: fdt or not, and dhcp or not. IMHO
> you need two variables to manage them independently. I think I did
> something like this in another board, but I do not remember which one ;-(.
>
> So you can have:
> boot_fdt
> ip_dyn
>
> to discriminate what the script should do.
>
> "if boot_fdt; then " \
> "if ip_dyn;then" \
> "if dhcp ${ftd_addr} ${ftd_file}; then " \
> "bootm ${loadaddr} - ${ftd_addr}; " \
> "else " \
> "echo Error: I cannot boot a DT kernel; \"
> "fi;" \
> "else tftp ${ftd_addr} ${ftd_file}
> .....
Right; I have did the bellow changes:
diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h
index ac9522f..45ac072 100644
--- a/include/configs/mx28evk.h
+++ b/include/configs/mx28evk.h
@@ -290,6 +290,10 @@
"uimage=uImage\0" \
"console_fsl=ttyAM0\0" \
"console_mainline=ttyAMA0\0" \
+ "ftd_file=imx28-evk.dtb\0" \
+ "ftd_addr=0x41000000\0" \
+ "boot_fdt=auto\0" \
+ "ip_dyn=yes\0" \
"mmcdev=0\0" \
"mmcpart=2\0" \
"mmcroot=/dev/mmcblk0p3 rw rootwait\0" \
@@ -302,13 +306,43 @@
"loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
"mmcboot=echo Booting from mmc ...; " \
"run mmcargs; " \
- "bootm\0" \
+ "if test ${boot_fdt} = no; then " \
+ "bootm; " \
+ "else " \
+ "if fatload mmc ${mmcdev}:${mmcpart} ${ftd_addr}
${ftd_file}; then " \
+ "bootm ${loadaddr} - ${ftd_addr}; " \
+ "else " \
+ "if test ${boot_fdt} = auto; then " \
+ "bootm; " \
+ "else " \
+ "echo ERROR: Cannot load the DT, aborting...; " \
+ "fi;\0" \
+ "fi;\0" \
+ "fi;\0" \
"netargs=setenv bootargs console=${console_mainline},${baudrate} " \
"root=/dev/nfs " \
"ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
"netboot=echo Booting from net ...; " \
"run netargs; " \
- "dhcp ${uimage}; bootm\0"
+ "if test ${ip_dyn} = yes; then " \
+ "setenv get_cmd dhcp; " \
+ "else " \
+ "setenv get_cmd tftp; " \
+ "fi;\0" \
+ ${get_cmd} ${uimage}; " \
+ "if test ${boot_fdt} = no; then " \
+ "bootm; " \
+ "else " \
+ "if ${get_cmd} ${ftd_addr} ${ftd_file}; then " \
+ "bootm ${loadaddr} - ${ftd_addr}; " \
+ "else " \
+ "if test ${boot_fdt} = auto; then " \
+ "bootm; " \
+ "else " \
+ "echo ERROR: Cannot load the DT, aborting...; " \
+ "fi;\0" \
+ "fi;\0" \
+ "fi;\0"
#define CONFIG_BOOTCOMMAND \
"mmc dev ${mmcdev}; if mmc rescan; then " \
What do you think? I don't have the board to test but except by the
get_cmd command, the rest should be fine.
--
Otavio Salvador O.S. Systems
E-mail: otavio at ossystems.com.br http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
^ permalink raw reply related [flat|nested] 28+ messages in thread* [U-Boot] [PATCH 7/9] mx53loco: Add support to dynamically choose between ftd use or not
2012-12-27 21:22 ` Otavio Salvador
@ 2012-12-28 8:52 ` Stefano Babic
2012-12-28 17:47 ` Otavio Salvador
0 siblings, 1 reply; 28+ messages in thread
From: Stefano Babic @ 2012-12-28 8:52 UTC (permalink / raw)
To: u-boot
On 27/12/2012 22:22, Otavio Salvador wrote:
>
> Right; I have did the bellow changes:
>
> diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h
ok, you changed the mx28evk, but we are really talking about
mx53loco...never mind !
> index ac9522f..45ac072 100644
> --- a/include/configs/mx28evk.h
> +++ b/include/configs/mx28evk.h
> @@ -290,6 +290,10 @@
> "uimage=uImage\0" \
> "console_fsl=ttyAM0\0" \
> "console_mainline=ttyAMA0\0" \
> + "ftd_file=imx28-evk.dtb\0" \
> + "ftd_addr=0x41000000\0" \
> + "boot_fdt=auto\0" \
> + "ip_dyn=yes\0" \
Only my personal taste. I find simpler, specially with U-Boot
environment, to not full describe the variable with strings like "yes"
or "no". This lets me to simply test with
if test -n ${ip_dyn}
and it works if ip_dyn is not set at all.
> "mmcdev=0\0" \
> "mmcpart=2\0" \
> "mmcroot=/dev/mmcblk0p3 rw rootwait\0" \
> @@ -302,13 +306,43 @@
> "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
> "mmcboot=echo Booting from mmc ...; " \
> "run mmcargs; " \
> - "bootm\0" \
> + "if test ${boot_fdt} = no; then " \
> + "bootm; " \
> + "else " \
> + "if fatload mmc ${mmcdev}:${mmcpart} ${ftd_addr}
> ${ftd_file}; then " \
> + "bootm ${loadaddr} - ${ftd_addr}; " \
I think you can better rewrite it as :
"if test ${boot_fdt} = yes; then " \
"if fatload mmc ${mmcdev}:${mmcpart} ${ftd_addr}
${ftd_file}; then " \
"bootm ${loadaddr} - ${ftd_addr}; " \
"else " \
"echo ERROR: Cannot load the DT, aborting...; " \
"fi;\0" \
"else "
"bootm; " \
"fi;\0" \
Not sure what you mean with "auto". You try to start a DT kernel
without FDT. Why is it helpful ?
> + "else " \
> + "if test ${boot_fdt} = auto; then " \
> + "bootm; " \
> + "else " \
> + "echo ERROR: Cannot load the DT, aborting...; " \
> + "fi;\0" \
> + "fi;\0" \
> + "fi;\0" \
> "netargs=setenv bootargs console=${console_mainline},${baudrate} " \
> "root=/dev/nfs " \
> "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
> "netboot=echo Booting from net ...; " \
> "run netargs; " \
> - "dhcp ${uimage}; bootm\0"
> + "if test ${ip_dyn} = yes; then " \
> + "setenv get_cmd dhcp; " \
> + "else " \
> + "setenv get_cmd tftp; " \
> + "fi;\0" \
> + ${get_cmd} ${uimage}; " \
This does not work - you must use "run ${get_cmd}"
> + "if test ${boot_fdt} = no; then " \
> + "bootm; " \
> + "else " \
> + "if ${get_cmd} ${ftd_addr} ${ftd_file}; then " \
> + "bootm ${loadaddr} - ${ftd_addr}; " \
> + "else " \
> + "if test ${boot_fdt} = auto; then " \
> + "bootm; " \
> + "else " \
> + "echo ERROR: Cannot load the DT, aborting...; " \
> + "fi;\0" \
> + "fi;\0" \
> + "fi;\0"
>
> #define CONFIG_BOOTCOMMAND \
> "mmc dev ${mmcdev}; if mmc rescan; then " \
>
> What do you think? I don't have the board
I can test it on mx53loco
Regards,
Stefano
--
=====================================================================
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] 28+ messages in thread* [U-Boot] [PATCH 7/9] mx53loco: Add support to dynamically choose between ftd use or not
2012-12-28 8:52 ` Stefano Babic
@ 2012-12-28 17:47 ` Otavio Salvador
0 siblings, 0 replies; 28+ messages in thread
From: Otavio Salvador @ 2012-12-28 17:47 UTC (permalink / raw)
To: u-boot
On Fri, Dec 28, 2012 at 6:52 AM, Stefano Babic <sbabic@denx.de> wrote:
> On 27/12/2012 22:22, Otavio Salvador wrote:
>
>>
>> Right; I have did the bellow changes:
>>
>> diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h
>
> ok, you changed the mx28evk, but we are really talking about
> mx53loco...never mind !
Indeed; I will redo it for mx53qsb and send it ... so you can try. I
will attach it in the e-mail so I resend it in a proper pull request
later.
>> index ac9522f..45ac072 100644
>> --- a/include/configs/mx28evk.h
>> +++ b/include/configs/mx28evk.h
>> @@ -290,6 +290,10 @@
>> "uimage=uImage\0" \
>> "console_fsl=ttyAM0\0" \
>> "console_mainline=ttyAMA0\0" \
>> + "ftd_file=imx28-evk.dtb\0" \
>> + "ftd_addr=0x41000000\0" \
>> + "boot_fdt=auto\0" \
>> + "ip_dyn=yes\0" \
>
> Only my personal taste. I find simpler, specially with U-Boot
> environment, to not full describe the variable with strings like "yes"
> or "no". This lets me to simply test with
>
> if test -n ${ip_dyn}
>
> and it works if ip_dyn is not set at all.
Yes; I just don't know if it us good to remove it, instead of set it
to something as 0 or no so user doesn't need to read the code to
identify the need of setting the var to enable dynamic ip again.
>> "mmcdev=0\0" \
>> "mmcpart=2\0" \
>> "mmcroot=/dev/mmcblk0p3 rw rootwait\0" \
>> @@ -302,13 +306,43 @@
>> "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
>> "mmcboot=echo Booting from mmc ...; " \
>> "run mmcargs; " \
>> - "bootm\0" \
>> + "if test ${boot_fdt} = no; then " \
>> + "bootm; " \
>> + "else " \
>> + "if fatload mmc ${mmcdev}:${mmcpart} ${ftd_addr}
>> ${ftd_file}; then " \
>> + "bootm ${loadaddr} - ${ftd_addr}; " \
>
> I think you can better rewrite it as :
>
> "if test ${boot_fdt} = yes; then " \
> "if fatload mmc ${mmcdev}:${mmcpart} ${ftd_addr}
> ${ftd_file}; then " \
> "bootm ${loadaddr} - ${ftd_addr}; " \
> "else " \
> "echo ERROR: Cannot load the DT, aborting...; " \
> "fi;\0" \
> "else "
> "bootm; " \
> "fi;\0" \
I will rework it inverting the logic.
> Not sure what you mean with "auto". You try to start a DT kernel
> without FDT. Why is it helpful ?
The idea is to allow to it to try to load fdt and if it fails boot a
non-fdt kernel. This allow for e.g OE to use same environment to be
used to fdt and non-fdt kernel. The only difference is the inclusion
or not of the dtb file in the filesystem. I can name it 'try' if you
think it is clearer.
>> + "else " \
>> + "if test ${boot_fdt} = auto; then " \
>> + "bootm; " \
>> + "else " \
>> + "echo ERROR: Cannot load the DT, aborting...; " \
>> + "fi;\0" \
>> + "fi;\0" \
>> + "fi;\0" \
>> "netargs=setenv bootargs console=${console_mainline},${baudrate} " \
>> "root=/dev/nfs " \
>> "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
>> "netboot=echo Booting from net ...; " \
>> "run netargs; " \
>> - "dhcp ${uimage}; bootm\0"
>> + "if test ${ip_dyn} = yes; then " \
>> + "setenv get_cmd dhcp; " \
>> + "else " \
>> + "setenv get_cmd tftp; " \
>> + "fi;\0" \
>> + ${get_cmd} ${uimage}; " \
>
> This does not work - you must use "run ${get_cmd}"
I see, good.
>> + "if test ${boot_fdt} = no; then " \
>> + "bootm; " \
>> + "else " \
>> + "if ${get_cmd} ${ftd_addr} ${ftd_file}; then " \
>> + "bootm ${loadaddr} - ${ftd_addr}; " \
>> + "else " \
>> + "if test ${boot_fdt} = auto; then " \
>> + "bootm; " \
>> + "else " \
>> + "echo ERROR: Cannot load the DT, aborting...; " \
>> + "fi;\0" \
>> + "fi;\0" \
>> + "fi;\0"
>>
>> #define CONFIG_BOOTCOMMAND \
>> "mmc dev ${mmcdev}; if mmc rescan; then " \
>>
>> What do you think? I don't have the board
>
> I can test it on mx53loco
I'll redo it and send.
--
Otavio Salvador O.S. Systems
E-mail: otavio at ossystems.com.br http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
^ permalink raw reply [flat|nested] 28+ messages in thread
* [U-Boot] [PATCH 8/9] mx6qsabrelite: Add support to dynamically choose between ftd use or not
2012-12-21 16:59 [U-Boot] [PATCH 0/9] Improve default environment for easy use Otavio Salvador
` (6 preceding siblings ...)
2012-12-21 16:59 ` [U-Boot] [PATCH 7/9] mx53loco: " Otavio Salvador
@ 2012-12-21 16:59 ` Otavio Salvador
2012-12-21 16:59 ` [U-Boot] [PATCH 9/9] mx6qsabre{auto, sd}: " Otavio Salvador
8 siblings, 0 replies; 28+ messages in thread
From: Otavio Salvador @ 2012-12-21 16:59 UTC (permalink / raw)
To: u-boot
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
include/configs/mx6qsabrelite.h | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/include/configs/mx6qsabrelite.h b/include/configs/mx6qsabrelite.h
index 0f6bbb4..c74d75c 100644
--- a/include/configs/mx6qsabrelite.h
+++ b/include/configs/mx6qsabrelite.h
@@ -154,6 +154,8 @@
#define CONFIG_EXTRA_ENV_SETTINGS \
"script=boot.scr\0" \
"uimage=uImage\0" \
+ "ftd_file=imx6q-sabrelite.dtb\0" \
+ "ftd_addr=0x11000000\0" \
"console=ttymxc1\0" \
"fdt_high=0xffffffff\0" \
"initrd_high=0xffffffff\0" \
@@ -169,13 +171,23 @@
"loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
"mmcboot=echo Booting from mmc ...; " \
"run mmcargs; " \
- "bootm\0" \
+ "if fatload mmc ${mmcdev}:${mmcpart} ${ftd_addr} ${ftd_file}; then " \
+ "bootm ${loadaddr} - ${ftd_addr}; " \
+ "else " \
+ "bootm; " \
+ "fi;\0" \
"netargs=setenv bootargs console=${console},${baudrate} " \
"root=/dev/nfs " \
"ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
"netboot=echo Booting from net ...; " \
"run netargs; " \
- "dhcp ${uimage}; bootm\0" \
+ "dhcp ${uimage}; " \
+ "if dhcp ${ftd_addr} ${ftd_file}; then " \
+ "bootm ${loadaddr} - ${ftd_addr}; " \
+ "else " \
+ "bootm; " \
+ "fi;\0"
+
#define CONFIG_BOOTCOMMAND \
"mmc dev ${mmcdev};" \
--
1.7.10.4
^ permalink raw reply related [flat|nested] 28+ messages in thread* [U-Boot] [PATCH 9/9] mx6qsabre{auto, sd}: Add support to dynamically choose between ftd use or not
2012-12-21 16:59 [U-Boot] [PATCH 0/9] Improve default environment for easy use Otavio Salvador
` (7 preceding siblings ...)
2012-12-21 16:59 ` [U-Boot] [PATCH 8/9] mx6qsabrelite: " Otavio Salvador
@ 2012-12-21 16:59 ` Otavio Salvador
8 siblings, 0 replies; 28+ messages in thread
From: Otavio Salvador @ 2012-12-21 16:59 UTC (permalink / raw)
To: u-boot
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
include/configs/mx6qsabre_common.h | 16 +++++++++++++---
include/configs/mx6qsabreauto.h | 1 +
include/configs/mx6qsabresd.h | 1 +
3 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/include/configs/mx6qsabre_common.h b/include/configs/mx6qsabre_common.h
index 9a25480..a7fe15b 100644
--- a/include/configs/mx6qsabre_common.h
+++ b/include/configs/mx6qsabre_common.h
@@ -84,6 +84,8 @@
#define CONFIG_EXTRA_ENV_SETTINGS \
"script=boot.scr\0" \
"uimage=uImage\0" \
+ "ftd_file=" CONFIG_DEFAULT_FTD_FILE "\0" \
+ "ftd_addr=0x11000000\0" \
"console=" CONFIG_CONSOLE_DEV "\0" \
"fdt_high=0xffffffff\0" \
"initrd_high=0xffffffff\0" \
@@ -98,14 +100,22 @@
"source\0" \
"loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
"mmcboot=echo Booting from mmc ...; " \
- "run mmcargs; " \
- "bootm\0" \
+ "if fatload mmc ${mmcdev}:${mmcpart} ${ftd_addr} ${ftd_file}; then " \
+ "bootm ${loadaddr} - ${ftd_addr}; " \
+ "else " \
+ "bootm; " \
+ "fi;\0" \
"netargs=setenv bootargs console=${console},${baudrate} " \
"root=/dev/nfs " \
"ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
"netboot=echo Booting from net ...; " \
"run netargs; " \
- "dhcp ${uimage}; bootm\0" \
+ "dhcp ${uimage}; " \
+ "if dhcp ${ftd_addr} ${ftd_file}; then " \
+ "bootm ${loadaddr} - ${ftd_addr}; " \
+ "else " \
+ "bootm; " \
+ "fi;\0"
#define CONFIG_BOOTCOMMAND \
"mmc dev ${mmcdev};" \
diff --git a/include/configs/mx6qsabreauto.h b/include/configs/mx6qsabreauto.h
index 760f3ce..e255c27 100644
--- a/include/configs/mx6qsabreauto.h
+++ b/include/configs/mx6qsabreauto.h
@@ -15,6 +15,7 @@
#define CONFIG_MACH_TYPE 3529
#define CONFIG_MXC_UART_BASE UART4_BASE
#define CONFIG_CONSOLE_DEV "ttymxc3"
+#define CONFIG_DEFAULT_FTD_FILE "imx6q-sabreauto.dtb"
#define CONFIG_MMCROOT "/dev/mmcblk0p2"
#define PHYS_SDRAM_SIZE (2u * 1024 * 1024 * 1024)
diff --git a/include/configs/mx6qsabresd.h b/include/configs/mx6qsabresd.h
index 771d129..b30dec0 100644
--- a/include/configs/mx6qsabresd.h
+++ b/include/configs/mx6qsabresd.h
@@ -21,6 +21,7 @@
#define CONFIG_MXC_UART_BASE UART1_BASE
#define CONFIG_CONSOLE_DEV "ttymxc0"
#define CONFIG_MMCROOT "/dev/mmcblk1p2"
+#define CONFIG_DEFAULT_FTD_FILE "imx6q-sabresd.dtb"
#define PHYS_SDRAM_SIZE (1u * 1024 * 1024 * 1024)
#include "mx6qsabre_common.h"
--
1.7.10.4
^ permalink raw reply related [flat|nested] 28+ messages in thread