bios_emulator: only build when CONFIG_BIOSEMU
PATCH 1/1 bios_emulator: only build when CONFIG_BIOSEMU
Convert the bios_emulator subdir over to COBJS-y style to avoid pointless compilation for the majority of boards.
Signed-off-by Mike Frysinger <[email protected]>
--- drivers/bios_emulator/Makefile | 6 +++--- drivers/bios_emulator/atibios.c | 4 ---- drivers/bios_emulator/besys.c | 3 --- drivers/bios_emulator/bios.c | 3 --- drivers/bios_emulator/biosemu.c | 3 --- drivers/bios_emulator/x86emu/debug.c | 4 ---- drivers/bios_emulator/x86emu/decode.c | 4 ---- drivers/bios_emulator/x86emu/ops.c | 4 ---- drivers/bios_emulator/x86emu/ops2.c | 4 ---- drivers/bios_emulator/x86emu/prim_ops.c | 4 ---- drivers/bios_emulator/x86emu/sys.c | 4 ---- 11 files changed, 3 insertions(+), 40 deletions(-)
drivers/bios_emulator/Makefile +3 -3
@@ -6,7 +6,7 @@ X86DIR = x86emu $(shell mkdir -p $(obj)$(X86DIR)) -COBJS = atibios.o biosemu.o besys.o bios.o \ +COBJS-$(CONFIG_BIOSEMU) = atibios.o biosemu.o besys.o bios.o \ $(X86DIR)/decode.o \ $(X86DIR)/ops2.o \ $(X86DIR)/ops.o \
@@ -14,8 +14,8 @@ COBJS = atibios.o biosemu.o besys.o bios.o \ $(X86DIR)/sys.o \ $(X86DIR)/debug.o -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) +SRCS := $(COBJS-y:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS-y)) EXTRA_CFLAGS += -I. -I./include -I$(TOPDIR)/include \ -D__PPC__ -D__BIG_ENDIAN__
drivers/bios_emulator/atibios.c +0 -4
@@ -47,8 +47,6 @@****************************************************************************/ #include <common.h> -#ifdef CONFIG_BIOSEMU -#include "biosemui.h" #include <malloc.h>
@@ -336,5 +334,3 @@ int BootVideoCardBIOS(pci_dev_t pcidev, BE_VGAInfo ** pVGAInfo, int cleanUp) *pVGAInfo = VGAInfo;return true; } - -#endif
drivers/bios_emulator/besys.c +0 -3
@@ -49,8 +49,6 @@#include <common.h> -#if defined(CONFIG_BIOSEMU ) -#include "biosemui.h" /*------------------------- Global Variables ------------------------------*/
@@ -721,4 +719,3 @@ void X86API BE_outl(X86EMU_pioAddr port, u32 val)#endif LOG_outpd (port, val); } -#endif
drivers/bios_emulator/bios.c +0 -3
@@ -43,8 +43,6 @@#include <common.h> -#if defined(CONFIG_BIOSEMU ) -#include "biosemui.h" /*----------------------------- Implementation ----------------------------*/
@@ -323,4 +321,3 @@ void _BE_bios_init(u32 * intrTab) bios_intr_tab[0x6D ] = int10;X86EMU_setupIntrFuncs (bios_intr_tab); } -#endif
drivers/bios_emulator/biosemu.c +0 -3
@@ -48,8 +48,6 @@#include <malloc.h> #include <common.h> -#if defined(CONFIG_BIOSEMU ) -#include "biosemui.h" BE_sysEnv _BE_env = {{0 }};
@@ -372,4 +370,3 @@ int X86API BE_int86x(int intno, RMREGS * in, RMREGS * out, RMSREGS * sregs) sregs->gs =M .x86.R_GS;return out->x.ax; } -#endif
drivers/bios_emulator/x86emu/debug.c +0 -4
@@ -40,8 +40,6 @@#include <stdarg.h> #include <common.h> -#if defined(CONFIG_BIOSEMU ) -#include "x86emu/x86emui.h" /*----------------------------- Implementation ----------------------------*/
@@ -463,5 +461,3 @@ void x86emu_dump_xregs(void)printk ("NC " );printk ("\n" ); } - -#endif
drivers/bios_emulator/x86emu/decode.c +0 -4
@@ -38,8 +38,6 @@****************************************************************************/ #include <common.h> -#if defined(CONFIG_BIOSEMU ) -#include "x86emu/x86emui.h" /*----------------------------- Implementation ----------------------------*/
@@ -1145,5 +1143,3 @@ unsigned decode_rmXX_address(int mod, int rm)return decode_rm01_address (rm);return decode_rm10_address (rm); } - -#endif
drivers/bios_emulator/x86emu/ops.c +0 -4
@@ -77,8 +77,6 @@#include <common.h> -#if defined(CONFIG_BIOSEMU ) -#include "x86emu/x86emui.h" /*----------------------------- Implementation ----------------------------*/
@@ -5434,5 +5432,3 @@ void (*x86emu_optab[256])(u8) __attribute__ ((section(GOT2_TYPE))) =/* 0xfe */ x86emuOp_opcFE_byte_RM, /* 0xff */ x86emuOp_opcFF_word_RM, }; - -#endif
drivers/bios_emulator/x86emu/ops2.c +0 -4
@@ -46,8 +46,6 @@#include <common.h> -#if defined(CONFIG_BIOSEMU ) -#include "x86emu/x86emui.h" /*----------------------------- Implementation ----------------------------*/
@@ -1772,5 +1770,3 @@ void (*x86emu_optab2[256])(u8) __attribute__((section(GOT2_TYPE))) =/* 0xfe */ x86emuOp2_illegal_op, /* 0xff */ x86emuOp2_illegal_op, }; - -#endif
drivers/bios_emulator/x86emu/prim_ops.c +0 -4
@@ -101,8 +101,6 @@#define PRIM_OPS_NO_REDEFINE_ASM -#if defined(CONFIG_BIOSEMU ) -#include "x86emu/x86emui.h" /*------------------------- Global Variables ------------------------------*/
@@ -2448,5 +2446,3 @@ DB( if (CHECK_SP_ACCESS())M .x86.R_SP +=4 ;return res; } - -#endif
drivers/bios_emulator/x86emu/sys.c +0 -4
@@ -41,8 +41,6 @@#include <common.h> -#if defined(CONFIG_BIOSEMU ) -#include "x86emu/x86emui.h" /*------------------------- Global Variables ------------------------------*/
@@ -324,5 +322,3 @@ void X86EMU_prepareForInt(int num)M .x86.R_IP =mem_access_word (num *4 );M .x86.intr =0 ; } - -#endif
Signature · 1 line
1.6.0.3
PATCH 1/1 bios_emulator: only build when CONFIG_BIOSEMU
Quoted 4 lines · Mike Frysinger
Convert the
bios_emulatorsubdir over to COBJS-y style to avoid pointless compilation for the majority of boards.Signed-off-by Mike Frysinger <[email protected]>
Quoted 13 lines
--- drivers/bios_emulator/Makefile | 6 +++--- drivers/bios_emulator/atibios.c | 4 ---- drivers/bios_emulator/besys.c | 3 --- drivers/bios_emulator/bios.c | 3 --- drivers/bios_emulator/biosemu.c | 3 --- drivers/bios_emulator/x86emu/debug.c | 4 ---- drivers/bios_emulator/x86emu/decode.c | 4 ---- drivers/bios_emulator/x86emu/ops.c | 4 ---- drivers/bios_emulator/x86emu/ops2.c | 4 ---- drivers/bios_emulator/x86emu/prim_ops.c | 4 ---- drivers/bios_emulator/x86emu/sys.c | 4 ---- 11 files changed, 3 insertions(+), 40 deletions(-)
I've send a patch for this before
Best Regards,
J.