[U-Boot] [PATCH v12 4/9] nds32/ag101: cpu and init funcs of SoC ag101

馬克泡 macpaul at gmail.com
Tue Sep 20 10:48:52 CEST 2011


Hi Mike,

> --- /dev/null
> > +++ b/arch/nds32/cpu/n1213/ag101/Makefile
> >
> > +ifndef CONFIG_SKIP_LOWLEVEL_INIT
> > +SOBJS        := lowlevel_init.o
> > +endif
> > +
> > +ifndef CONFIG_SKIP_TRUNOFF_WATCHDOG
> > +SOBJS        += watchdog.o
> > +endif
>
> the CONFIG_SKIP_xxx is a bit backwards.  seems like you should invert the
> logic, have your arch asm/config.h define them by default, and then have
> the
> boards which want to skip it do an #undef on them.
>

Our evaluation boards has an another boot loader loaded before u-boot is
loaded.
However, we do not suggest our customer use this boot loader on their
product if 2 different boot loaders was required.
Which means, only u-boot with lowlevel_init should be shipped on customers'
own platforms.
This kind of switchable definition is designed for helping customers to get
familiar with the
evaluation boards.

Hence CONFIG_SKIP_LOWLEVEL_INIT shouldn't be exist on customers' platforms.
Which means lowlevel_init should be executed by default.
This also means
"SOBJS-$(CONFIG_SKIP_LOWLEVEL_INIT) += lowlevel_init.o" won't work under
this case.
If we defined CONFIG_SKIP_LOWLEVEL_INIT as yes, then lowlevel_init.o will be
included
which is not the correct result.

The same situation is also applied on CONFIG_SKIP_TRUNOFF_WATCHDOG.


> otherwise, you can unify this with:
> SOBJS- :=
> SOBJS-$(CONFIG_SKIP_LOWLEVEL_INIT) += lowlevel_init.o
> SOBJS-$(CONFIG_SKIP_TRUNOFF_WATCHDOG) += watchdog.o
>
> and then use $(SOBJS-) ...
>
>
Hence I disagree with this. If SOBJS- could work with NOT (inverse) logic
for object files, I'll
glad to make this stuffs to get more simple.


>  > +$(OBJS): $(obj)gen-asm-offsets.h
> > +$(obj)gen-asm-offsets.h:     $(TOPDIR)/include/autoconf.mk.dep \
> > +     $(obj)gen-asm-offsets.s
> > +     @echo Generating $@ ; \
> > +     $(SRCTREE)/tools/scripts/make-asm-offsets $(obj)gen-asm-offsets.s
> $@
> > +
> > +$(obj)gen-asm-offsets.s:     $(TOPDIR)/include/autoconf.mk.dep \
> > +     $(src)asm-offsets.c
> > +     @mkdir -p $(obj)b
> > +     $(CC) -DDO_DEPS_ONLY \
> > +             $(CFLAGS) -o $@ $(src)asm-offsets.c -c -S
>
> pretty sure the recent unification of this in the top level Makefile means
> you
> can drop this now
> -mike
>

Other suggestion for changes are agreed and tested to be adopted in PATCH
v13
Thanks!


-- 
Best regards,
Macpaul Lin


More information about the U-Boot mailing list