[U-Boot] couple questions about tail end of common/Makefile

Robert P. J. Day rpjday at crashcourse.ca
Sat Apr 16 11:25:30 CEST 2016


  first, this related to CONFIG_FASTBOOT_FLASH:

  # This option is not just y/n - it can have a numeric value
  ifdef CONFIG_FASTBOOT_FLASH
  obj-y += image-sparse.o
  ifdef CONFIG_FASTBOOT_FLASH_MMC_DEV
  obj-y += fb_mmc.o
  endif
  ifdef CONFIG_FASTBOOT_FLASH_NAND_DEV
  obj-y += fb_nand.o
  endif
  endif

i don't think CONFIG_FASTBOOT_FLASH ever makes use of being assigned a
numeric value, does it? the top-level README file certainly doesn't
seem to think so:

  CONFIG_FASTBOOT_FLASH
  The fastboot protocol includes a "flash" command for writing
  the downloaded image to a non-volatile storage device. Define
  this to enable the "fastboot flash" command.

and it's never used in that context as far as I can tell:

  $ grep -rw CONFIG_FASTBOOT_FLASH *
  common/Makefile:ifdef CONFIG_FASTBOOT_FLASH
  drivers/usb/gadget/f_fastboot.c:#ifdef CONFIG_FASTBOOT_FLASH
  drivers/usb/gadget/f_fastboot.c:#ifdef CONFIG_FASTBOOT_FLASH
  drivers/usb/gadget/f_fastboot.c:#ifdef CONFIG_FASTBOOT_FLASH
  include/configs/kc1.h:#define CONFIG_FASTBOOT_FLASH
  include/configs/sniper.h:#define CONFIG_FASTBOOT_FLASH
  include/configs/bcm28155_ap.h:#define CONFIG_FASTBOOT_FLASH
  include/configs/sunxi-common.h:#define CONFIG_FASTBOOT_FLASH
  include/configs/dra7xx_evm.h:#define CONFIG_FASTBOOT_FLASH
  README:		CONFIG_FASTBOOT_FLASH
  $

and second, just below that in common/Makefile (almost at the end):

  # We always have this since drivers/ddr/fs/interactive.c needs it
  obj-$(CONFIG_CMDLINE) += cli_simple.o

  obj-y += cli.o
  obj-$(CONFIG_CMDLINE) += cli_readline.o

apart from the typo in that comment (should be "ddr/fsl", not
"ddr/fs"), why does the comment insist that "We always have this" when
that file is conditionally compiled? What does cli_simple.o have to do
with that ddr-related source file? one suspects this could be
simplified as:

  obj-y += cli.o
  obj-$(CONFIG_CMDLINE) += cli_simple.o cli_readline.o

or something equally simple. or am i missing something?

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================




More information about the U-Boot mailing list