[U-Boot] [PATCH v4 2/9] x86: Allow excluding reset vector code from u-boot

Wolfgang Denk wd at denx.de
Mon Nov 26 10:31:12 CET 2012


Dear Simon Glass,

In message <CAPnjgZ3uhFKvsCV3Z2p0ynhvjGTNQmEUZ2CAg6cGA1AeU1AZ-A at mail.gmail.com> you wrote:
> 
> > Hm.... as is, this requires that we define CONFIG_SYS_X86_RESET_VECTOR
> > in all x86 board config files, just because a single board
> > configuration does not need this?  This makes no sense.  Please invert
> > the logic.
> 
> That was how the previous patch worked (CONFIG_NO_RESET_CODE). If
> required the ifneq in the Makefile though, which you objected to. Or
> is there another way?

As usual, there are a number of ways.

Option 1: Define CONFIG_SYS_X86_RESET_VECTOR in a common header file,
	so that you can #undef it in a board config file which does
	not want / need this.  This is functionally equivalent with
	your current patch, but you have to care about thgis
	settingonly in the files where it is actually interesting.

Option 2: use logig similar to the OBJ-y=... in the Makefile, just
	inverted.  I know there are examples for this, but I'm too
	lazu at the moment to search.

> Also Graeme mentioned that all x86 boards will soon use Coreboot, so
> the option (and the code) may in fact be removed one day. That's why I
> was happy enough to invert it.
> 
> There are actually only 2 boards, enet and coreboot.

Maybe, but the approach is wrong even for a single board.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Committee, n.:  A group of men who individually can do nothing but as
a group decide that nothing can be done.                 - Fred Allen


More information about the U-Boot mailing list