diff mbox

[U-Boot,1/9] mx28evk: We shouldn't hardcode a rootfs filesystem type

Message ID 1356109151-6623-2-git-send-email-otavio@ossystems.com.br
State Changes Requested
Delegated to: Stefano Babic
Headers show

Commit Message

Otavio Salvador Dec. 21, 2012, 4:59 p.m. UTC
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(-)

Comments

Stefano Babic Dec. 26, 2012, 11:02 a.m. UTC | #1
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
Otavio Salvador Dec. 26, 2012, 6:17 p.m. UTC | #2
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@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br
Stefano Babic Dec. 27, 2012, 9:33 a.m. UTC | #3
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
Wolfgang Denk Dec. 27, 2012, 10:29 a.m. UTC | #4
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
Otavio Salvador Dec. 27, 2012, 8:37 p.m. UTC | #5
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@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br
diff mbox

Patch

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 ...; "	\