From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Mon, 4 Feb 2013 16:30:17 +0100 Subject: [U-Boot] common/cmd_disk.c doesn't actually define any "commands" In-Reply-To: References: <20130204075343.1565460p912ggt44@crashcourse.ca> <20130204152641.72e869ca@lilith> <20130204100420.36086kek4ftusc0s@crashcourse.ca> Message-ID: <20130204163017.17643abc@lilith> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Mats, On Mon, 4 Feb 2013 15:17:17 +0000, Mats K?rrman 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.