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

Bin Meng bmeng.cn at gmail.com
Mon Jan 18 05:51:08 CET 2016


On Mon, Jan 18, 2016 at 11:53 AM, Simon Glass <sjg at chromium.org> wrote:
> 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>
> ---
>
>  Kconfig                                 |   2 +
>  Makefile                                |   1 +
>  cmd/Kconfig                             | 585 +++++++++++++++++++++++++++++++
>  cmd/Makefile                            | 166 +++++++++
>  {common => cmd}/cmd_aes.c               |   0
>  {common => cmd}/cmd_ambapp.c            |   0
>  {common => cmd}/cmd_armflash.c          |   0
>  {common => cmd}/cmd_bdinfo.c            |   0
>  {common => cmd}/cmd_bedbug.c            |   0
>  {common => cmd}/cmd_blob.c              |   0
>  {common => cmd}/cmd_bmp.c               |   0
>  {common => cmd}/cmd_boot.c              |   0
>  {common => cmd}/cmd_bootldr.c           |   0
>  {common => cmd}/cmd_bootm.c             |   0
>  {common => cmd}/cmd_bootmenu.c          |   0
>  {common => cmd}/cmd_bootstage.c         |   0
>  {common => cmd}/cmd_cache.c             |   0
>  {common => cmd}/cmd_cbfs.c              |   0
>  {common => cmd}/cmd_clk.c               |   0
>  {common => cmd}/cmd_console.c           |   0
>  {common => cmd}/cmd_cplbinfo.c          |   0
>  {common => cmd}/cmd_cpu.c               |   0
>  {common => cmd}/cmd_cramfs.c            |   0
>  {common => cmd}/cmd_dataflash_mmc_mux.c |   0
>  {common => cmd}/cmd_date.c              |   0
>  {common => cmd}/cmd_dcr.c               |   0
>  {common => cmd}/cmd_demo.c              |   0
>  {common => cmd}/cmd_dfu.c               |   0
>  {common => cmd}/cmd_diag.c              |   0
>  {common => cmd}/cmd_disk.c              |   0
>  {common => cmd}/cmd_display.c           |   0
>  {common => cmd}/cmd_dtt.c               |   0
>  {common => cmd}/cmd_echo.c              |   0
>  {common => cmd}/cmd_eeprom.c            |   0
>  {common => cmd}/cmd_efi.c               |   0
>  {common => cmd}/cmd_elf.c               |   0
>  {common => cmd}/cmd_ethsw.c             |   0
>  {common => cmd}/cmd_exit.c              |   0
>  {common => cmd}/cmd_ext2.c              |   0
>  {common => cmd}/cmd_ext4.c              |   0
>  {common => cmd}/cmd_fastboot.c          |   0
>  {common => cmd}/cmd_fat.c               |   0
>  {common => cmd}/cmd_fdc.c               |   0
>  {common => cmd}/cmd_fdt.c               |   0
>  {common => cmd}/cmd_fitupd.c            |   0
>  {common => cmd}/cmd_flash.c             |   0
>  {common => cmd}/cmd_fpga.c              |   0
>  {common => cmd}/cmd_fpgad.c             |   0
>  {common => cmd}/cmd_fs.c                |   0
>  {common => cmd}/cmd_fs_uuid.c           |   0
>  {common => cmd}/cmd_fuse.c              |   0
>  {common => cmd}/cmd_gettime.c           |   0
>  {common => cmd}/cmd_gpio.c              |   0
>  {common => cmd}/cmd_gpt.c               |   0
>  {common => cmd}/cmd_hash.c              |   0
>  {common => cmd}/cmd_help.c              |   0
>  {common => cmd}/cmd_host.c              |   0
>  {common => cmd}/cmd_i2c.c               |   0
>  {common => cmd}/cmd_ide.c               |   0
>  {common => cmd}/cmd_immap.c             |   0
>  {common => cmd}/cmd_ini.c               |   0
>  {common => cmd}/cmd_io.c                |   0
>  {common => cmd}/cmd_iotrace.c           |   0
>  {common => cmd}/cmd_irq.c               |   0
>  {common => cmd}/cmd_itest.c             |   0
>  {common => cmd}/cmd_jffs2.c             |   0
>  {common => cmd}/cmd_ldrinfo.c           |   0
>  {common => cmd}/cmd_led.c               |   0
>  {common => cmd}/cmd_license.c           |   0
>  {common => cmd}/cmd_load.c              |   0
>  {common => cmd}/cmd_log.c               |   0
>  {common => cmd}/cmd_lzmadec.c           |   0
>  {common => cmd}/cmd_mac.c               |   0
>  {common => cmd}/cmd_md5sum.c            |   0
>  {common => cmd}/cmd_mdio.c              |   0
>  {common => cmd}/cmd_mem.c               |   0
>  {common => cmd}/cmd_mfsl.c              |   0
>  {common => cmd}/cmd_mii.c               |   0
>  {common => cmd}/cmd_misc.c              |   0
>  {common => cmd}/cmd_mmc.c               |   0
>  {common => cmd}/cmd_mmc_spi.c           |   0
>  {common => cmd}/cmd_mp.c                |   0
>  {common => cmd}/cmd_mtdparts.c          |   0
>  {common => cmd}/cmd_nand.c              |   0
>  {common => cmd}/cmd_net.c               |   0
>  {common => cmd}/cmd_nvedit.c            |   0
>  {common => cmd}/cmd_onenand.c           |   0
>  {common => cmd}/cmd_otp.c               |   0
>  {common => cmd}/cmd_part.c              |   0
>  {common => cmd}/cmd_pci.c               |   0
>  {common => cmd}/cmd_pcmcia.c            |   0
>  {common => cmd}/cmd_pmic.c              |   0
>  {common => cmd}/cmd_portio.c            |   0
>  {common => cmd}/cmd_pxe.c               |   0
>  {common => cmd}/cmd_read.c              |   0
>  {common => cmd}/cmd_reginfo.c           |   0
>  {common => cmd}/cmd_regulator.c         |   0
>  {common => cmd}/cmd_reiser.c            |   0
>  {common => cmd}/cmd_remoteproc.c        |   0
>  {common => cmd}/cmd_sata.c              |   0
>  {common => cmd}/cmd_scsi.c              |   0
>  {common => cmd}/cmd_setexpr.c           |   0
>  {common => cmd}/cmd_sf.c                |   0
>  {common => cmd}/cmd_sha1sum.c           |   0
>  {common => cmd}/cmd_softswitch.c        |   0
>  {common => cmd}/cmd_sound.c             |   0
>  {common => cmd}/cmd_source.c            |   0
>  {common => cmd}/cmd_spi.c               |   0
>  {common => cmd}/cmd_spibootldr.c        |   0
>  {common => cmd}/cmd_spl.c               |   0
>  {common => cmd}/cmd_strings.c           |   0
>  {common => cmd}/cmd_terminal.c          |   0
>  {common => cmd}/cmd_test.c              |   0
>  {common => cmd}/cmd_thordown.c          |   0
>  {common => cmd}/cmd_time.c              |   0
>  {common => cmd}/cmd_tpm.c               |   0
>  {common => cmd}/cmd_tpm_test.c          |   0
>  {common => cmd}/cmd_trace.c             |   0
>  {common => cmd}/cmd_tsi148.c            |   0
>  {common => cmd}/cmd_ubi.c               |   0
>  {common => cmd}/cmd_ubifs.c             |   0
>  {common => cmd}/cmd_universe.c          |   0
>  {common => cmd}/cmd_unzip.c             |   0
>  {common => cmd}/cmd_usb.c               |   0
>  {common => cmd}/cmd_usb_mass_storage.c  |   0
>  {common => cmd}/cmd_version.c           |   0
>  {common => cmd}/cmd_ximg.c              |   0
>  {common => cmd}/cmd_yaffs2.c            |   0
>  {common => cmd}/cmd_zfs.c               |   0
>  {common => cmd}/cmd_zip.c               |   0
>  common/Kconfig                          | 586 --------------------------------
>  common/Makefile                         | 156 +--------
>  scripts/Makefile.spl                    |   2 +-
>  133 files changed, 761 insertions(+), 737 deletions(-)
>  create mode 100644 cmd/Kconfig
>  create mode 100644 cmd/Makefile
>  rename {common => cmd}/cmd_aes.c (100%)
>  rename {common => cmd}/cmd_ambapp.c (100%)
>  rename {common => cmd}/cmd_armflash.c (100%)
>  rename {common => cmd}/cmd_bdinfo.c (100%)
>  rename {common => cmd}/cmd_bedbug.c (100%)
>  rename {common => cmd}/cmd_blob.c (100%)
>  rename {common => cmd}/cmd_bmp.c (100%)
>  rename {common => cmd}/cmd_boot.c (100%)
>  rename {common => cmd}/cmd_bootldr.c (100%)
>  rename {common => cmd}/cmd_bootm.c (100%)
>  rename {common => cmd}/cmd_bootmenu.c (100%)
>  rename {common => cmd}/cmd_bootstage.c (100%)
>  rename {common => cmd}/cmd_cache.c (100%)
>  rename {common => cmd}/cmd_cbfs.c (100%)
>  rename {common => cmd}/cmd_clk.c (100%)
>  rename {common => cmd}/cmd_console.c (100%)
>  rename {common => cmd}/cmd_cplbinfo.c (100%)
>  rename {common => cmd}/cmd_cpu.c (100%)
>  rename {common => cmd}/cmd_cramfs.c (100%)
>  rename {common => cmd}/cmd_dataflash_mmc_mux.c (100%)
>  rename {common => cmd}/cmd_date.c (100%)
>  rename {common => cmd}/cmd_dcr.c (100%)
>  rename {common => cmd}/cmd_demo.c (100%)
>  rename {common => cmd}/cmd_dfu.c (100%)
>  rename {common => cmd}/cmd_diag.c (100%)
>  rename {common => cmd}/cmd_disk.c (100%)
>  rename {common => cmd}/cmd_display.c (100%)
>  rename {common => cmd}/cmd_dtt.c (100%)
>  rename {common => cmd}/cmd_echo.c (100%)
>  rename {common => cmd}/cmd_eeprom.c (100%)
>  rename {common => cmd}/cmd_efi.c (100%)
>  rename {common => cmd}/cmd_elf.c (100%)
>  rename {common => cmd}/cmd_ethsw.c (100%)
>  rename {common => cmd}/cmd_exit.c (100%)
>  rename {common => cmd}/cmd_ext2.c (100%)
>  rename {common => cmd}/cmd_ext4.c (100%)
>  rename {common => cmd}/cmd_fastboot.c (100%)
>  rename {common => cmd}/cmd_fat.c (100%)
>  rename {common => cmd}/cmd_fdc.c (100%)
>  rename {common => cmd}/cmd_fdt.c (100%)
>  rename {common => cmd}/cmd_fitupd.c (100%)
>  rename {common => cmd}/cmd_flash.c (100%)
>  rename {common => cmd}/cmd_fpga.c (100%)
>  rename {common => cmd}/cmd_fpgad.c (100%)
>  rename {common => cmd}/cmd_fs.c (100%)
>  rename {common => cmd}/cmd_fs_uuid.c (100%)
>  rename {common => cmd}/cmd_fuse.c (100%)
>  rename {common => cmd}/cmd_gettime.c (100%)
>  rename {common => cmd}/cmd_gpio.c (100%)
>  rename {common => cmd}/cmd_gpt.c (100%)
>  rename {common => cmd}/cmd_hash.c (100%)
>  rename {common => cmd}/cmd_help.c (100%)
>  rename {common => cmd}/cmd_host.c (100%)
>  rename {common => cmd}/cmd_i2c.c (100%)
>  rename {common => cmd}/cmd_ide.c (100%)
>  rename {common => cmd}/cmd_immap.c (100%)
>  rename {common => cmd}/cmd_ini.c (100%)
>  rename {common => cmd}/cmd_io.c (100%)
>  rename {common => cmd}/cmd_iotrace.c (100%)
>  rename {common => cmd}/cmd_irq.c (100%)
>  rename {common => cmd}/cmd_itest.c (100%)
>  rename {common => cmd}/cmd_jffs2.c (100%)
>  rename {common => cmd}/cmd_ldrinfo.c (100%)
>  rename {common => cmd}/cmd_led.c (100%)
>  rename {common => cmd}/cmd_license.c (100%)
>  rename {common => cmd}/cmd_load.c (100%)
>  rename {common => cmd}/cmd_log.c (100%)
>  rename {common => cmd}/cmd_lzmadec.c (100%)
>  rename {common => cmd}/cmd_mac.c (100%)
>  rename {common => cmd}/cmd_md5sum.c (100%)
>  rename {common => cmd}/cmd_mdio.c (100%)
>  rename {common => cmd}/cmd_mem.c (100%)
>  rename {common => cmd}/cmd_mfsl.c (100%)
>  rename {common => cmd}/cmd_mii.c (100%)
>  rename {common => cmd}/cmd_misc.c (100%)
>  rename {common => cmd}/cmd_mmc.c (100%)
>  rename {common => cmd}/cmd_mmc_spi.c (100%)
>  rename {common => cmd}/cmd_mp.c (100%)
>  rename {common => cmd}/cmd_mtdparts.c (100%)
>  rename {common => cmd}/cmd_nand.c (100%)
>  rename {common => cmd}/cmd_net.c (100%)
>  rename {common => cmd}/cmd_nvedit.c (100%)
>  rename {common => cmd}/cmd_onenand.c (100%)
>  rename {common => cmd}/cmd_otp.c (100%)
>  rename {common => cmd}/cmd_part.c (100%)
>  rename {common => cmd}/cmd_pci.c (100%)
>  rename {common => cmd}/cmd_pcmcia.c (100%)
>  rename {common => cmd}/cmd_pmic.c (100%)
>  rename {common => cmd}/cmd_portio.c (100%)
>  rename {common => cmd}/cmd_pxe.c (100%)
>  rename {common => cmd}/cmd_read.c (100%)
>  rename {common => cmd}/cmd_reginfo.c (100%)
>  rename {common => cmd}/cmd_regulator.c (100%)
>  rename {common => cmd}/cmd_reiser.c (100%)
>  rename {common => cmd}/cmd_remoteproc.c (100%)
>  rename {common => cmd}/cmd_sata.c (100%)
>  rename {common => cmd}/cmd_scsi.c (100%)
>  rename {common => cmd}/cmd_setexpr.c (100%)
>  rename {common => cmd}/cmd_sf.c (100%)
>  rename {common => cmd}/cmd_sha1sum.c (100%)
>  rename {common => cmd}/cmd_softswitch.c (100%)
>  rename {common => cmd}/cmd_sound.c (100%)
>  rename {common => cmd}/cmd_source.c (100%)
>  rename {common => cmd}/cmd_spi.c (100%)
>  rename {common => cmd}/cmd_spibootldr.c (100%)
>  rename {common => cmd}/cmd_spl.c (100%)
>  rename {common => cmd}/cmd_strings.c (100%)
>  rename {common => cmd}/cmd_terminal.c (100%)
>  rename {common => cmd}/cmd_test.c (100%)
>  rename {common => cmd}/cmd_thordown.c (100%)
>  rename {common => cmd}/cmd_time.c (100%)
>  rename {common => cmd}/cmd_tpm.c (100%)
>  rename {common => cmd}/cmd_tpm_test.c (100%)
>  rename {common => cmd}/cmd_trace.c (100%)
>  rename {common => cmd}/cmd_tsi148.c (100%)
>  rename {common => cmd}/cmd_ubi.c (100%)
>  rename {common => cmd}/cmd_ubifs.c (100%)
>  rename {common => cmd}/cmd_universe.c (100%)
>  rename {common => cmd}/cmd_unzip.c (100%)
>  rename {common => cmd}/cmd_usb.c (100%)
>  rename {common => cmd}/cmd_usb_mass_storage.c (100%)
>  rename {common => cmd}/cmd_version.c (100%)
>  rename {common => cmd}/cmd_ximg.c (100%)
>  rename {common => cmd}/cmd_yaffs2.c (100%)
>  rename {common => cmd}/cmd_zfs.c (100%)
>  rename {common => cmd}/cmd_zip.c (100%)
>

Reviewed-by: Bin Meng <bmeng.cn at gmail.com>


More information about the U-Boot mailing list