[U-Boot-Users] [PATCH 1/1] Supplemental USB patch to previous 14 patches.

Bryan O'Donoghue bodonoghue at codehermit.ie
Wed May 31 12:42:56 CEST 2006

On Wed, 31 May 2006 01:59:51 +0200
Wolfgang Denk <wd at denx.de> wrote:

Hello Wolfgang.

> Please hold on for a minute. The  Makefile's  purpose  is  to  define
> dependencies.   It  is  actually  not  the  place  to  put  code  and
> configuration trickery there. Yes, I know, this  is  already  in  use
> with  other  boards, but I would like to ask you to use such features
> only when absolutely necessary.

OK I'll implement this whichever way is your preference.

I had made this addition to the Makefile as at last night's conversation

 Adder_config    \
 Adder87x_config \
 AdderII_config  \
+AdderUSB_config \
+Adder87xUSB_config \
+AdderIIUSB_config \
        :               unconfig
        $(if $(findstring AdderII,$@), \
        @echo "#define CONFIG_MPC852T" > include/config.h)
+       $(if $(findstring USB,$@),\
+       @echo "#define CONFIG_USB_TTY" >> include/config.h)
        @./mkconfig -a Adder ppc mpc8xx adder

with the following in Adder.h

/* USB TTY */

#include <usbd_vendor.h>                /* Include optional Vendor info */
#define CFG_USB_EXTC_CLK 0x02           /* Oscillator on EXTC_CLK 2 */
#define CFG_USB_BRG_CLK 0x04            /* or use Baud rate generator 0x04 */
#define CFG_CONSOLE_IS_IN_ENV           /* Console is in env */

> If you just define a new make target name this is simple and readable
> (just a single word in the Makefile), and can  be  evaluated  in  the
> board config file instead.

Hmm, I don't really understand how this would work, i.e. if the conditional
include CONFIG_USB_TTY or other *doesn't* go into config.h then how does
Adder.h know whether or not to include the console code?


More information about the U-Boot mailing list