From: Wolfgang Denk Date: Mon, 26 Nov 2012 10:31:12 +0100 Subject: [U-Boot] [PATCH v4 2/9] x86: Allow excluding reset vector code from u-boot In-Reply-To: References: <1353910336-7193-3-git-send-email-sjg@chromium.org> <20121126065302.B1706201056@gemini.denx.de> Message-ID: <20121126093112.22AAD201056@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Simon Glass, In message 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