[U-Boot] common/cmd_disk.c doesn't actually define any "commands"

Albert ARIBAUD albert.u.boot at aribaud.net
Mon Feb 4 16:30:17 CET 2013


Hi Mats,

On Mon, 4 Feb 2013 15:17:17 +0000, Mats Kärrman
<Mats.Karrman at tritech.se> wrote:

> Hi Robert, Albert,
> 
> > Robert P. J. Day wrote:
> >   just to be clear, i have no strong opinion on this either way, but
> > my understanding is that source files with the name of "common/cmd_*.c"
> > typically define at least one u-boot "command" with the U_BOOT_CMD macro.
> > as far as i can tell, cmd_disk.c is the only counterexample of that.
> 
> I was just looking into this myself but from another perspective.
> I'm using "CONFIG_USB:STORAGE" and because of the way things are made, I then automatically
> get "usbboot" for which I have no use. Things would be more logical if it was up
> to cmd_disk to define the commands based on ifdef's for the various backends -- but
> ONLY if CONFIG_CMD_DISK was in the config file.

> Maybe this upsets a lot of other people though...?

Maybe, but the problem you state is not about cmd_disk (or I am
missing the point). USB commands are in USB related files, e.g.
do_usbboot() is in cmd_usb.c, so that's where a conditional should be
put if you want to compile the command out, rather than in cmd_disk,
which does not add to the U-Boot commands table at all.

> Best regards,
> Mats

Amicalement,
-- 
Albert.


More information about the U-Boot mailing list