[U-Boot] [PATCH 1/2] Move all command code into its own directory

Masahiro Yamada yamada.masahiro at socionext.com
Tue Jan 19 04:59:10 CET 2016


Hi Simon,



2016-01-18 12:53 GMT+09:00 Simon Glass <sjg at chromium.org>:
> There are a lot of unrelated files in common, including all of the commands.
> Moving them into their own directory makes them easier to find and is more
> logical.
>
> Some commands include non-command code, such as cmd_scsi.c. This should be
> sorted out at some point so that the function can be enabled with or without
> the associated command.
>
> Unfortunately, with m68k I get this error:
>
> m68k:  +   M5329AFEE
> +arch/m68k/cpu/mcf532x/start.o: In function `_start':
> +arch/m68k/cpu/mcf532x/start.S:159:(.text+0x452): relocation truncated to fit: R_68K_PC16 against symbol `board_init_f' defined in .text.board_init_f section in common/built-in.o
>
> I hope someone can shed some light on what this means. I hope it isn't
> depending on the position of code in the image.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>


Thanks for working on this!

This is a nice improvement,
but we might want to think about the best place for device access commands
in the future.


I mean,

cmd_nand.c  in drivers/mtd/nand/ rather than cmd/
cmd_mmc.c   in drivers/mmc/ rather than cmd/
cmd_usb.c   in drivers/usb/ rather thant cmd/

etc.


This patch moves cmd_usb.c, but leaves common/usb*.c.

With this patch, USB files are located in three places:
  - cmd/cmd_usb.c
  - common/usb*.c
  - drivers/usb/


Is collecting all them into drivers/usb/ more logical?

I think this needs closer look and more discussion, though.


-- 
Best Regards
Masahiro Yamada


More information about the U-Boot mailing list