Re: [U-Boot] [PATCH] boards.cfg: keep it sorted filling the board field

2014-07-11 Thread Masahiro Yamada
Hi Tom,


On Wed, 9 Jul 2014 09:12:48 -0400
Tom Rini  wrote:

> On Wed, Jul 09, 2014 at 05:34:28PM +0900, Masahiro Yamada wrote:
> > The boards.cfg file has allowed to use "-" for the board (= 6th) field
> > if the board name is the same as the 7th field.
> > 
> > But I notice one problem.
> > Because tools/reformat.py sorts the lines in the simple alphabetical
> > order (= the order of character code), some entries for the same board
> > are not lined up together.
> > 
> > For example, "bf527-ezkit" and "bf527-ezkit-v2" share the same board.
> > But they are located separately because "bf527-ezkit" fills the board
> > field with "-" whereas "bf527-ezkit-v2" specifies it explicitely.
> > 
> > The similar things can be seen:
> >  - between "trizepsive" and "polaris"
> >  - between "RRvision" and "RRvision_LCD"
> >  - between "korat" and "korat_perm"
> >  - between "lwmon5" and "lcd4_lwmon5"
> > 
> > This commit was generated by the following command:
> > 
> > awk '$6 == "-" { $6 = $7 } { print }' boards.cfg \
> >   | tools/reformat.py -i -d '-' -s 8  > boards0.cfg; \
> >   mv boards0.cfg boards.cfg
> > 
> > Signed-off-by: Masahiro Yamada 
> 
> Tricky!  So I'm fine with correcting this problem but we also need to
> update the top part of baords.cfg where it says how to re-sort things so
> that we don't lose this in the future.
> 
> -- 



This patch had gone to Change Requested
so I resent this + follow-up patch:

http://patchwork.ozlabs.org/patch/369047/
http://patchwork.ozlabs.org/patch/369023/



We won't lose this because using '-' is prohibited
for that the board field and the target field are the same.


Best Regards
Masahiro Yamada

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] boards.cfg: keep it sorted filling the board field

2014-07-09 Thread Masahiro Yamada
Hi Tom,



On Wed, 9 Jul 2014 09:12:48 -0400
Tom Rini  wrote:

> On Wed, Jul 09, 2014 at 05:34:28PM +0900, Masahiro Yamada wrote:
> > The boards.cfg file has allowed to use "-" for the board (= 6th) field
> > if the board name is the same as the 7th field.
> > 
> > But I notice one problem.
> > Because tools/reformat.py sorts the lines in the simple alphabetical
> > order (= the order of character code), some entries for the same board
> > are not lined up together.
> > 
> > For example, "bf527-ezkit" and "bf527-ezkit-v2" share the same board.
> > But they are located separately because "bf527-ezkit" fills the board
> > field with "-" whereas "bf527-ezkit-v2" specifies it explicitely.
> > 
> > The similar things can be seen:
> >  - between "trizepsive" and "polaris"
> >  - between "RRvision" and "RRvision_LCD"
> >  - between "korat" and "korat_perm"
> >  - between "lwmon5" and "lcd4_lwmon5"
> > 
> > This commit was generated by the following command:
> > 
> > awk '$6 == "-" { $6 = $7 } { print }' boards.cfg \
> >   | tools/reformat.py -i -d '-' -s 8  > boards0.cfg; \
> >   mv boards0.cfg boards.cfg
> > 
> > Signed-off-by: Masahiro Yamada 
> 
> Tricky!  So I'm fine with correcting this problem but we also need to
> update the top part of baords.cfg where it says how to re-sort things so
> that we don't lose this in the future.
> 

I guess you mentioned this part:

# It can be used from a shell:
#   tools/reformat.py -i -d '-' -s 8 boards0.cfg && mv 
boards0.cfg boards.cfg
# It can directly be invoked from vim:
#   :%!tools/reformat.py -i -d '-' -s 8




I don't think we need to fill the board field every time.
But my concern is that some people might add new boards
with '-' for that.

After this patch is applied, I will post a follow-up patch
to change "mkconfig" prohibiting '-' for the board field.
(Or perhaps changing the meaning of '-'. I want to use '-'
to define board is "".)


Best Regards
Masahiro Yamada

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] boards.cfg: keep it sorted filling the board field

2014-07-09 Thread Tom Rini
On Wed, Jul 09, 2014 at 05:34:28PM +0900, Masahiro Yamada wrote:
> The boards.cfg file has allowed to use "-" for the board (= 6th) field
> if the board name is the same as the 7th field.
> 
> But I notice one problem.
> Because tools/reformat.py sorts the lines in the simple alphabetical
> order (= the order of character code), some entries for the same board
> are not lined up together.
> 
> For example, "bf527-ezkit" and "bf527-ezkit-v2" share the same board.
> But they are located separately because "bf527-ezkit" fills the board
> field with "-" whereas "bf527-ezkit-v2" specifies it explicitely.
> 
> The similar things can be seen:
>  - between "trizepsive" and "polaris"
>  - between "RRvision" and "RRvision_LCD"
>  - between "korat" and "korat_perm"
>  - between "lwmon5" and "lcd4_lwmon5"
> 
> This commit was generated by the following command:
> 
> awk '$6 == "-" { $6 = $7 } { print }' boards.cfg \
>   | tools/reformat.py -i -d '-' -s 8  > boards0.cfg; \
>   mv boards0.cfg boards.cfg
> 
> Signed-off-by: Masahiro Yamada 

Tricky!  So I'm fine with correcting this problem but we also need to
update the top part of baords.cfg where it says how to re-sort things so
that we don't lose this in the future.

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot