summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorGabe Black <gabeblack@chromium.org>2011-06-24 15:04:33 -0700
committerSimon Glass <sjg@chromium.org>2011-08-29 10:39:37 -0700
commit383c7ca87324c71c14e7c1f96cc08fe25a31b82d (patch)
tree887ba697e7b3880f75fb82a8d7ed1e23c4b04ee8 /board
parent05359910e5f1695b756b3f78f3ddb4682ae71d42 (diff)
Change how reset code is excluded.
This change reworks how the reset code is excluded so that all configuration is done in the configuration header and not in the make file. This will make it easier for future changes to use conditional compilation based on this and similar options. This version works by ifdef-ing out all of the code that would go into those sections and all the code that refers to it. The sections are then empty, and the linker will either leave them empty for the loader to ignore or remove them entirely. BUG=chrome-os-partner:3906 TEST=Built and verified that the reset code was excluded. Change-Id: Ie9a6a49df0cea7bc2b13135dba2302368a0374c5 Signed-off-by: Gabe Black <gabeblack@google.com> Reviewed-on: http://gerrit.chromium.org/gerrit/3219 Reviewed-by: Gabe Black <gabeblack@chromium.org> Tested-by: Gabe Black <gabeblack@chromium.org>
Diffstat (limited to 'board')
-rw-r--r--board/chromebook-x86/coreboot/config.mk1
-rw-r--r--board/chromebook-x86/coreboot/coreboot_start16.S6
-rw-r--r--board/eNET/eNET_start16.S4
3 files changed, 10 insertions, 1 deletions
diff --git a/board/chromebook-x86/coreboot/config.mk b/board/chromebook-x86/coreboot/config.mk
index f588d050eee..857ee8c4b92 100644
--- a/board/chromebook-x86/coreboot/config.mk
+++ b/board/chromebook-x86/coreboot/config.mk
@@ -34,6 +34,5 @@
# Software Foundation.
#
-LDPPFLAGS += -DNO_RESET_CODE
HOSTCFLAGS_autoconf.mk.dep = -Wno-variadic-macros
LD := $(LD).bfd
diff --git a/board/chromebook-x86/coreboot/coreboot_start16.S b/board/chromebook-x86/coreboot/coreboot_start16.S
index 1bd629468c9..3e442e13749 100644
--- a/board/chromebook-x86/coreboot/coreboot_start16.S
+++ b/board/chromebook-x86/coreboot/coreboot_start16.S
@@ -28,6 +28,10 @@
* that is used by U-boot to its final destination.
*/
+#include <config.h>
+
+#if !defined CONFIG_NO_RESET_CODE
+
.text
.section .start16, "ax"
.code16
@@ -35,6 +39,8 @@
board_init16:
jmp board_init16_ret
+#endif
+
.section .bios, "ax"
.code16
.globl realmode_reset
diff --git a/board/eNET/eNET_start16.S b/board/eNET/eNET_start16.S
index 77e5519640d..a760aeac920 100644
--- a/board/eNET/eNET_start16.S
+++ b/board/eNET/eNET_start16.S
@@ -33,6 +33,8 @@
#include "hardware.h"
#include <asm/ic/sc520.h>
+#if !defined CONFIG_NO_RESET_CODE
+
.text
.section .start16, "ax"
.code16
@@ -64,6 +66,8 @@ board_init16:
jmp board_init16_ret
+#endif
+
.section .bios, "ax"
.code16
.globl realmode_reset