From 84374b9593cb8ca1648e27ace02d4ac60709ed1b Mon Sep 17 00:00:00 2001 From: qhuang8 Date: Mon, 29 Oct 2007 04:58:20 +0000 Subject: Adjust the build infrastructure to support IA32 architect build. Ia32.dsc is more suitable than reuse Nt32.dsc git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4225 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Sample/Platform/Ia32/Build/Config.env | 33 +++ .../Sample/Platform/Ia32/Build/Ia32.dsc | 103 +++++++ .../Sample/Platform/Ia32/Build/Makefile | 231 ++++++++++++++++ .../Sample/Platform/Ia32/Build/PlatformTools.env | 68 +++++ .../Sample/Platform/Ia32/Build/build.bat | 304 +++++++++++++++++++++ .../Sample/Platform/Ipf/Build/IPF.dsc | 3 +- .../Sample/Platform/Nt32/Build/Config.env | 33 --- .../Sample/Platform/Nt32/Build/Makefile | 231 ---------------- .../Sample/Platform/Nt32/Build/Nt32.dsc | 154 ----------- .../Sample/Platform/Nt32/Build/PlatformTools.env | 68 ----- .../Sample/Platform/Nt32/Build/build.bat | 304 --------------------- .../Sample/Platform/X64/Build/X64.dsc | 4 +- 12 files changed, 742 insertions(+), 794 deletions(-) create mode 100644 EdkCompatibilityPkg/Sample/Platform/Ia32/Build/Config.env create mode 100644 EdkCompatibilityPkg/Sample/Platform/Ia32/Build/Ia32.dsc create mode 100644 EdkCompatibilityPkg/Sample/Platform/Ia32/Build/Makefile create mode 100644 EdkCompatibilityPkg/Sample/Platform/Ia32/Build/PlatformTools.env create mode 100644 EdkCompatibilityPkg/Sample/Platform/Ia32/Build/build.bat delete mode 100644 EdkCompatibilityPkg/Sample/Platform/Nt32/Build/Config.env delete mode 100644 EdkCompatibilityPkg/Sample/Platform/Nt32/Build/Makefile delete mode 100644 EdkCompatibilityPkg/Sample/Platform/Nt32/Build/Nt32.dsc delete mode 100644 EdkCompatibilityPkg/Sample/Platform/Nt32/Build/PlatformTools.env delete mode 100644 EdkCompatibilityPkg/Sample/Platform/Nt32/Build/build.bat (limited to 'EdkCompatibilityPkg/Sample') diff --git a/EdkCompatibilityPkg/Sample/Platform/Ia32/Build/Config.env b/EdkCompatibilityPkg/Sample/Platform/Ia32/Build/Config.env new file mode 100644 index 0000000000..51ce1dd6a5 --- /dev/null +++ b/EdkCompatibilityPkg/Sample/Platform/Ia32/Build/Config.env @@ -0,0 +1,33 @@ +#/*++ +# +# Copyright (c) 2006 - 2007, Intel Corporation +# All rights reserved. This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# Module Name: +# +# Config.env +# +# Abstract: +# +# This file is used to define platform build configuration. +# It gets included by PlatformTools.env. +# +#--*/ + +BUILD_TARGET_DIRECTORY = Build +EFI_DEBUG = NO +EFI_DEBUG_CLEAR_MEMORY = NO +EFI_PEI_PERFORMANCE = NO +EFI_DXE_PERFORMANCE = NO +EFI_SYMBOLIC_DEBUG = NO +EFI_GENERATE_INTERMEDIATE_FILE = NO +EFI_PEI_REPORT_STATUS_CODE = NO +UEFI_MODE = YES +PI_MODE = YES +USE_VC8 = NO diff --git a/EdkCompatibilityPkg/Sample/Platform/Ia32/Build/Ia32.dsc b/EdkCompatibilityPkg/Sample/Platform/Ia32/Build/Ia32.dsc new file mode 100644 index 0000000000..220847a6b9 --- /dev/null +++ b/EdkCompatibilityPkg/Sample/Platform/Ia32/Build/Ia32.dsc @@ -0,0 +1,103 @@ +#/*++ +# +# Copyright (c) 2004 - 2007, Intel Corporation +# All rights reserved. This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# Module Name: +# +# Ia32.dsc +# +# Abstract: +# +# This is the build description file containing the platform +# build definitions. +# +# +# Notes: +# +# The info in this file is broken down into sections. The start of a section +# is designated by a "[" in the first column. So the [=====] separater ends +# a section. +# +#--*/ + + +[=============================================================================] +# +# This section gets processed first by the utility. Define any +# macros that you may use elsewhere in this description file. This is the +# mechanism by which you can pass parameters and defines to the makefiles +# generated for each component. You can define it here, and then make an +# assignment in the [makefile.common] section. For example, if here you +# define MY_VAR = my_var_value, then you can add MY_VAR = $(MY_VAR) in +# the [makefile.common] section and it becomes MY_VAR = my_var_value in +# the output makefiles for each component. +# +[Defines] +PLATFORM = $(PROJECT_NAME) + +[=============================================================================] +# +# Include other common build descriptions +# +!include "$(EDK_SOURCE)\Sample\Platform\Common.dsc" +!include "$(EDK_SOURCE)\Sample\Platform\Common$(PROCESSOR).dsc" + +[=============================================================================] +# +# These control the generation of the FV files +# +[=============================================================================] +[Fv.Fv.Attributes] + +[Fv.Fv.options] + +[Build.Fv.Fv] + +[=============================================================================] +# +# These are the libraries that will be built by the master makefile +# +[=============================================================================] +[Libraries] +DEFINE EDK_PREFIX= + +!include "$(EDK_SOURCE)\Sample\Platform\EdkLibAll.dsc" + +# +# EdkII Glue Library +# +#!include "$(EDK_SOURCE)\Sample\Platform\EdkIIGlueLibAll.dsc" + +[=============================================================================] +# +# These are platform specific libraries that must be built prior to building +# certain drivers that depend upon them. +# +[=============================================================================] +[Libraries.Platform] +Sample\Platform\Generic\RuntimeDxe\StatusCode\Lib\BsDataHubStatusCode\BsDataHubStatusCode.inf +Sample\Platform\Generic\RuntimeDxe\StatusCode\Lib\RtMemoryStatusCode\RtMemoryStatusCode.inf +Sample\Platform\Generic\RuntimeDxe\StatusCode\Lib\RtPlatformStatusCode\$(PROJECT_NAME)\RtPlatformStatusCode.inf + +#Other\Maintained\Application\Shell\Library\EfiShellLib.inf + +[=============================================================================] +# +# These are the components that will be built by the master makefile +# +[=============================================================================] +[Components] +DEFINE PACKAGE=Default + +#Add EDK INF file here: +#Other\Maintained\Application\Shell\ShellFull.inf + +[=============================================================================] + diff --git a/EdkCompatibilityPkg/Sample/Platform/Ia32/Build/Makefile b/EdkCompatibilityPkg/Sample/Platform/Ia32/Build/Makefile new file mode 100644 index 0000000000..8ad8646dc4 --- /dev/null +++ b/EdkCompatibilityPkg/Sample/Platform/Ia32/Build/Makefile @@ -0,0 +1,231 @@ +#/*++ +# +# Copyright (c) 2004 - 2007, Intel Corporation +# All rights reserved. This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# Module Name: +# +# Makefile +# +# Abstract: +# +# This makefile is used to build the NT emulation. +# +#--*/ + +# +# Everything depends on EDK_SOURCE & EDK_TOOLS_PATH. Make sure it's defined +# +!IFNDEF EDK_SOURCE +!ERROR EDK_SOURCE environmental variable not set +!ENDIF + +!IFNDEF EDK_TOOLS_PATH +!MESSAGE EDK_TOOLS_PATH environmental variable not set, default setting used +!ENDIF + +# +# Set the processor type +# +PROCESSOR = IA32 + +# +# Define a toolchain so we can pick up the basic defines from +# the EFI tool setup file. +# +TOOLCHAIN = TOOLCHAIN_MSVC + +!INCLUDE PlatformTools.env + +# +# Default target +# +all : customer + +# +# Target to build customer config +# +customer : tempstamp_file build_tools makefiles builds + +# +# Target to build everything quickly +# +fast : build_tools fast_makefiles builds + +# +# Create a file to store the date and time, and used by SetStamp.exe +# +tempstamp_file: +!IF DEFINED(DATE_STAMP) && DEFINED(TIME_STAMP) + @echo $(DATE_STAMP) $(TIME_STAMP) > GenStamp.txt +!ELSEIF EXIST(GenStamp.txt) + - @del GenStamp.txt +!ENDIF + +# +# Make all the EFI build tools by calling the makefile +# +build_tools : + -if not exist $(EDK_TOOLS_OUTPUT) mkdir $(EDK_TOOLS_OUTPUT) + -if exist $(EDK_TOOLS_BIN)\*.* copy $(EDK_TOOLS_BIN)\*.* $(EDK_TOOLS_OUTPUT) + $(MAKE) -f $(EDK_TOOLS_SOURCE)\makefile PROCESSOR=$(PROCESSOR) BUILD_DIR=$(BUILD_DIR) + $(GUIDCHK) -b $(EDK_TOOLS_OUTPUT)\GuidDatabase.txt + +# +# Run ProcessDsc on our main description files to generate the +# makefiles and package files. Specify -v option for more verbose output. +# Specify "-xref filename" to generate a cross-reference file of +# basename-to-fileguid that can be used by VolInfo. +# +makefiles : + $(PROCESSDSC) \ + -d EFI_SOURCE=$(EDK_SOURCE) \ + -d EDK_SOURCE=$(EDK_SOURCE) \ + -d PROCESSOR=$(PROCESSOR) \ + -d PROJECT_NAME=$(PROJECT_NAME) \ + -d COMPRESS_METHOD=$(COMPRESS_METHOD) \ + -d OEMTOOLPATH=$(EDK_TOOLS_OUTPUT) \ + -d SHELL_INF=$(SHELL_INF) \ + -d UEFI_PREFIX=$(UEFI_PREFIX) \ + -d PI_PREFIX=$(PI_PREFIX) \ + -d CAPSULE_INF=$(CAPSULE_INF) \ + -d ATAPI_PASS_THRU_INF=$(ATAPI_PASS_THRU_INF) \ + -d DEVPATH_INF=$(DEVPATH_INF) \ + -d GRAPHICS_INF=$(GRAPHICS_INF) \ + -g $(EDK_TOOLS_OUTPUT)\GuidDatabase.txt \ + -xref FV\Guid.xref \ + $(PROJECT_NAME).dsc + +# +# Build faster by not building components with FV=NULL. Override in the +# DSC file by adding SKIP_FV_NULL=0 on the component lines you want built +# but still have FV=NULL. For example: +# +# Dxe\Drivers\MyDriver\MyDriver.inf FV=NULL SKIP_FV_NULL=0 +# +fast_makefiles : + $(PROCESSDSC) \ + -d EFI_SOURCE=$(EDK_SOURCE) \ + -d EDK_SOURCE=$(EDK_SOURCE) \ + -d PROCESSOR=$(PROCESSOR) \ + -d PROJECT_NAME=$(PROJECT_NAME) \ + -d COMPRESS_METHOD=$(COMPRESS_METHOD) \ + -d OEMTOOLPATH=$(EDK_TOOLS_OUTPUT) \ + -d SHELL_INF=$(SHELL_INF) \ + -d UEFI_PREFIX=$(UEFI_PREFIX) \ + -d PI_PREFIX=$(PI_PREFIX) \ + -d CAPSULE_INF=$(CAPSULE_INF) \ + -d ATAPI_PASS_THRU_INF=$(ATAPI_PASS_THRU_INF) \ + -d DEVPATH_INF=$(DEVPATH_INF) \ + -d GRAPHICS_INF=$(GRAPHICS_INF) \ + -g $(EDK_TOOLS_OUTPUT)\GuidDatabase.txt \ + -xref FV\Guid.xref \ + -d SKIP_FV_NULL=1 \ + $(PROJECT_NAME).dsc + +# +# Create the guid-to-basename cross reference file of protocols +# used by volinfo for decoding dependency expressions. +# +protocols.xref : + -@if not exist fv mkdir FV + cd $(EDK_SOURCE) + $(GUIDCHK) -g -u $(BUILD_TARGET_DIRECTORY) -e inf -x > $(BUILD_DIR)\Fv\protocols.xref + cd $(BUILD_DIR) + +# +# Call all the makefiles that were generated by ProcessDsc. ProcessDsc +# creates the makefile.out that calls all the component makefiles. +# +builds : + $(MAKE) -f makefile.out + +# +# Useful targets +# + +# +# Define a pseudo-target that skips over compiling the build tools and +# also skips creation of the makefiles for the components. The user +# has to be aware that any changes to INF files renders this target +# invalid. +# +quick : builds + +# +# Define a pseudo-target to start building with the libraries or with the +# components. +# +libraries : + $(MAKE) -f makefile.out libraries + +components : + $(MAKE) -f makefile.out components + +# +# Make a pseudo-target to simplify running of the NT emulation. +# +!IF "$(EFI_WIN_NT_FILE_SYSTEM)" == "" +EFI_WIN_NT_FILE_SYSTEM = $(EDK_SOURCE)\Other\Maintained\Application\$(UEFI_PREFIX)Shell\bin\ia32\Apps +!ELSE +EFI_WIN_NT_FILE_SYSTEM = $(EFI_WIN_NT_FILE_SYSTEM)!$(EDK_SOURCE)\Other\Maintained\Application\$(UEFI_PREFIX)Shell\bin\ia32\Apps +!ENDIF + +# +# Make browse info file +# +bsc: + - dir /s /b *.sbr > $(PROCESSOR)\temp.rm + $(BSCMAKE) /n /o $(PROCESSOR)\$(PROJECT_NAME).bsc "@$(PROCESSOR)\temp.rm" + +# +# Create a target to clean up all build directories +# +clean : + - @if exist vc??.* del vc??.* > NUL + - @if exist *.bak del *.bak > NUL + - @if exist $(PROCESSOR) rd /s /q $(PROCESSOR) > NUL + - @if exist ipf rd /s /q ipf > NUL + - @if exist ebc rd /s /q ebc > NUL + - @if exist fv rd /s /q fv > NUL + - @if exist Tools rd /s /q Tools > NUL + - @if exist makefile.out del makefile.out > NUL + - @if exist module.* del module.* > NUL + - @echo All targets cleaned + +# +# Clean up all build directories except for tools. +# +cleanbuilds : + - @if exist *.bak del *.bak > NUL + - @if exist $(PROCESSOR) rd /s /q $(PROCESSOR) > NUL + - @if exist ipf rd /s /q ipf > NUL + - @if exist ebc rd /s /q ebc > NUL + - @if exist fv rd /s /q fv > NUL + - @if exist makefile.out del makefile.out > NUL + - @if exist module.* del module.* > NUL + - @echo All modules cleaned + +# +# Clean up only the tools +# +cleantools : + - @if exist vc??.* del vc??.* > NUL + - @if exist Tools rd /s /q Tools > NUL + - @echo All tools cleaned + +# +# Rebuild target, clean and build all +# +rebuild : clean all + +# +# cleanall target to clean all build directories. +# +cleanall : clean diff --git a/EdkCompatibilityPkg/Sample/Platform/Ia32/Build/PlatformTools.env b/EdkCompatibilityPkg/Sample/Platform/Ia32/Build/PlatformTools.env new file mode 100644 index 0000000000..224783c39c --- /dev/null +++ b/EdkCompatibilityPkg/Sample/Platform/Ia32/Build/PlatformTools.env @@ -0,0 +1,68 @@ +#/*++ +# +# Copyright (c) 2004 - 2007, Intel Corporation +# All rights reserved. This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# Module Name: +# +# PlatformTools.env +# +# Abstract: +# +# This file is used to define platform specific environment variables. +# It gets included by every makefile. +# +#--*/ + +!INCLUDE Config.env + +# +# Set the project name +# +PROJECT_NAME = Ia32 + +# +# Set the build directory +# +BUILD_DIR = $(EDK_SOURCE)\Sample\Platform\$(PROJECT_NAME)\$(BUILD_TARGET_DIRECTORY) + +!IF "$(UEFI_MODE)" == "YES" +GRAPHICS_INF = Sample\Bus\WinNtThunk\Gop\Dxe\WinNtGop.inf +!ELSE +GRAPHICS_INF = Sample\Bus\WinNtThunk\Uga\Dxe\WinNtUga.inf +!ENDIF + +# +# Define compiler names +# +!IFNDEF EDK_TOOLS_PATH +EFI_ASL_LOCAL = YES +!ELSE +EFI_ASSEMBLER_NAME = Masm611 +EFI_ASL_LOCAL = NO +!ENDIF + +# +# These flags are specific to this platform. If a flag is not specific to this +# platform the flag should be placed in the CommonTools.env file. +# Processor architecture specific and global macros can be found in +# CommonTools.env, macros named xxx_ARCH_FLAGS and xxx_STD_FLAGS respectively. +# +C_PROJ_FLAGS = /O1 /D UNICODE /D NEW_PEI_HOBS +ASM_PROJ_FLAGS = /Cx /Zd /Fl$*.lst +LINK_PROJ_FLAGS = +LIB_PROJ_FLAGS = +EBC_C_PROJ_FLAGS = +EBC_LINK_PROJ_FLAGS = +EBC_LIB_PROJ_FLAGS = + +# +# Include processor architecture specific and general Tiano build flags. +# +!INCLUDE $(EDK_SOURCE)\Sample\CommonTools.env diff --git a/EdkCompatibilityPkg/Sample/Platform/Ia32/Build/build.bat b/EdkCompatibilityPkg/Sample/Platform/Ia32/Build/build.bat new file mode 100644 index 0000000000..c224c2ee74 --- /dev/null +++ b/EdkCompatibilityPkg/Sample/Platform/Ia32/Build/build.bat @@ -0,0 +1,304 @@ +@rem #/*++ +@rem # +@rem # Copyright (c) 2007, Intel Corporation +@rem # All rights reserved. This program and the accompanying materials +@rem # are licensed and made available under the terms and conditions of the BSD License +@rem # which accompanies this distribution. The full text of the license may be found at +@rem # http://opensource.org/licenses/bsd-license.php +@rem # +@rem # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +@rem # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +@rem # +@rem # Module Name: +@rem # +@rem # build.bat +@rem # +@rem # Abstract: +@rem # +@rem # This script provides single module build, clean and find function +@rem # based on module name. +@rem # +@rem # The auto-generated module.list file records all module names +@rem # described in the current platform.dsc. +@rem # +@rem #--*/ + +@echo off + +setlocal +@rem initilize local variable +set FUNCTION=build +set MODULE= +set UPDATE= +set VERBOSE= + +:parse +if /I "%1"=="/c" ( + set FUNCTION=clean + shift + goto parse +) +if /I "%1"=="clean" ( + set FUNCTION=clean + shift + goto parse +) +if /I "%1"=="/r" ( + set FUNCTION=rebuild + shift + goto parse +) +if /I "%1"=="/h" ( + set FUNCTION=usage + shift + goto parse +) +if /I "%1"=="/?" ( + set FUNCTION=usage + shift + goto parse +) +if /I "%1"=="/f" ( + set FUNCTION=find + shift + goto parse +) +if /I "%1"=="/a" ( + set UPDATE=TRUE + shift + goto parse +) +if /I "%1"=="/v" ( + set VERBOSE=TRUE + shift + goto parse +) +if not "%1"=="" ( + set MODULE=%1 + shift + goto parse +) else ( + @rem no other paramters + if "%FUNCTION%"=="rebuild" goto build + goto %FUNCTION% +) + +:build +set StartTime=%time% +@rem if no input, build all +if "%MODULE%"=="" ( + if "%FUNCTION%"=="rebuild" ( + nmake -nologo -f Makefile clean + ) + nmake -nologo -f Makefile all + goto endtime +) +@rem then try to build special targets: all, fast, tools. +if /I "%MODULE%"=="all" ( + @rem build all modules and tools. + if "%FUNCTION%"=="rebuild" ( + nmake -nologo -f Makefile cleanall + ) + nmake -nologo -f Makefile all + goto endtime +) +if /I "%MODULE%"=="fast" ( + @rem build fast target to skip FV=NULL modules. + if "%FUNCTION%"=="rebuild" ( + nmake -nologo -f Makefile clean + ) + nmake -nologo -f Makefile fast + goto endtime +) +if /I "%MODULE%"=="tools" ( + @rem build all tools. + if "%FUNCTION%"=="rebuild" ( + nmake -nologo -f Makefile cleantools + ) + nmake -nologo -f Makefile build_tools + echo. + echo All tools are built. + goto endtime +) +@rem build single module, update build makefiles +if "%FUNCTION%"=="rebuild" ( + nmake -nologo -f module.mak %MODULE%Clean 2>NUL +) +nmake -nologo -f Makefile flashmap > NUL 2>&1 +nmake -nologo -f Makefile makefiles +if errorlevel 1 goto builderror +@rem check whether input module name is described in current dsc file. +findstr /I /C:" %MODULE% " module.list > NUL +if errorlevel 1 ( + echo. + echo. + findstr /I /C:"%MODULE%" module.list > NUL + if errorlevel 1 goto finderror + for /F %%A in ('findstr /I /C:"%MODULE%" module.list') do echo %%A + echo. + echo Warning!!! Your specified module name can't be found. + echo One of the above modules may be what you want to build. + goto end +) +@rem build this module +nmake -nologo -f module.mak %MODULE%Build +echo. +if "%FUNCTION%"=="rebuild" ( + echo Module %MODULE% is rebuilt. +) else ( + echo Module %MODULE% is built. +) +:endtime +@rem output build time. +set EndTime=%time% +echo. +echo Start time %StartTime% +echo End time %EndTime% +goto end + +:clean +@rem if no input, default clean all build directories. +if "%MODULE%"=="" ( + nmake -nologo -f Makefile clean + goto end +) +@rem first try to clean special tasks: all, modules and tools +if /I "%MODULE%"=="all" ( + nmake -nologo -f Makefile cleanall + goto end +) +if /I "%MODULE%"=="modules" ( + nmake -nologo -f Makefile cleanbuilds + goto end +) +if /I "%MODULE%"=="tools" ( + nmake -nologo -f Makefile cleantools + goto end +) +@rem clean single module +@rem check whether input module name is in module.list file. +if not exist module.list ( + echo Module list info doesn't exist. + echo Processing dsc file to generate module list info. + nmake -nologo -f Makefile flashmap > NUL 2>&1 + nmake -nologo -f Makefile makefiles > error.log 2>&1 + if errorlevel 1 goto builderror +) +findstr /I /C:" %MODULE% " module.list > NUL +if errorlevel 1 ( + echo. + findstr /I /C:"%MODULE%" module.list > NUL + if errorlevel 1 goto finderror + for /F %%A in ('findstr /I /C:"%MODULE%" module.list') do echo %%A + echo. + echo Warning!!! Your specified module name can't be found. + echo One of the above modules may be what you want to clean. + goto end +) +@rem clean this module +nmake -nologo -f module.mak %MODULE%Clean 2>NUL +echo. +echo Module %MODULE% is cleaned. +goto end + +:find +@rem find match module name by subname. +if "%UPDATE%"=="TRUE" ( + echo Processing dsc file to update module list info. + nmake -nologo -f Makefile flashmap > NUL 2>&1 + nmake -nologo -f Makefile makefiles > error.log 2>&1 + if errorlevel 1 goto builderror +) +if not exist module.list ( + echo Module list info doesn't exist. + echo Processing dsc file to generate module list info. + nmake -nologo -f Makefile flashmap > NUL 2>&1 + nmake -nologo -f Makefile makefiles > error.log 2>&1 + if errorlevel 1 goto builderror +) +if "%MODULE%"=="" ( + @rem display all + echo. + if "%VERBOSE%"=="TRUE" ( + type module.list + ) else ( + @rem only output module name without module.inf file name + for /F %%A in (module.list) do echo %%A + ) +) else ( + @rem display match module name + echo. + if "%VERBOSE%"=="TRUE" ( + findstr /I /C:"%MODULE%" module.list + if errorlevel 1 goto notfind + ) else ( + findstr /I /C:"%MODULE%" module.list > NUL + if errorlevel 1 goto notfind + for /F %%A in ('findstr /I /C:"%MODULE%" module.list') do echo %%A + ) +) +goto end + +:usage +echo build or clean single module based on module name after tools are built. +echo. +echo build [/r] [/c] [/f] [/h] [modulename] +echo. +echo build [/r] [modulename] +echo build single module, such as build DxeMain. +echo If /r is specified, the target will be rebuit after cleaned first. +echo if no input modulename or modulename is all, then build all +echo Specail build targets: all, fast, tools. +echo These special targets may not exist in your tip main makefile. +echo build - build all tools and modules +echo build all - build all tools and modules +echo build fast - build all without FV=NULL modules +echo build tools - build all tools. +echo. +echo build /c [modulename] +echo build clean [modulename] +echo remove the temp generated files for single module +echo if no input modulename, then clean all +echo Specail clean targets: all, modules, tools. +echo These special targets may not exist in your tip main makefile. +echo build /c - clean up all build directories +echo build /c all - clean up all build directories and binary dirs. +echo build /c modules - clean up all build directories except for tools. +echo build /c tools - clean up only tools directory. +echo. +echo build /f [/a] [/v] [subname] +echo find all matched modulename with the sub string of module name. +echo option /a re-processes dsc files to update module name list. +echo option /v outputs module name and module.inf file name both. +echo. +echo build /h +echo build /? +echo display help information. +echo. +goto end + +:notfind +echo Warning!!! Your specified module name can't be found. +echo Try to use /f /a options to update module name list. +goto end + +:finderror +echo Warning!!! Your specified module name can't be found. +echo Try to use /f to find modules that you want to build. +echo Or use /h to get the helpinfo of this script. +goto end + +:builderror +if exist error.log type error.log +echo. +if not exist Tools\ProcessDsc.exe ( + echo. + echo Error!!! Build tools may not be ready. Try to build tools first. + echo. +) +del module.* > NUL 2>&1 +goto end + +:end +if exist error.log del error.log +echo on diff --git a/EdkCompatibilityPkg/Sample/Platform/Ipf/Build/IPF.dsc b/EdkCompatibilityPkg/Sample/Platform/Ipf/Build/IPF.dsc index c36e6b0436..d1574df403 100644 --- a/EdkCompatibilityPkg/Sample/Platform/Ipf/Build/IPF.dsc +++ b/EdkCompatibilityPkg/Sample/Platform/Ipf/Build/IPF.dsc @@ -95,7 +95,8 @@ Sample\Platform\Generic\RuntimeDxe\StatusCode\Lib\BsSerialStatusCode\BsSerialSta [Components] DEFINE PACKAGE=Default +#Add EDK INF file here: #Other\Maintained\Application\Shell\Shell.inf -Other\Maintained\Application\Shell\ShellFull.inf + [=============================================================================] diff --git a/EdkCompatibilityPkg/Sample/Platform/Nt32/Build/Config.env b/EdkCompatibilityPkg/Sample/Platform/Nt32/Build/Config.env deleted file mode 100644 index 43d7fa939a..0000000000 --- a/EdkCompatibilityPkg/Sample/Platform/Nt32/Build/Config.env +++ /dev/null @@ -1,33 +0,0 @@ -#/*++ -# -# Copyright (c) 2006 - 2007, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# Config.env -# -# Abstract: -# -# This file is used to define platform build configuration. -# It gets included by PlatformTools.env. -# -#--*/ - -BUILD_TARGET_DIRECTORY = Build -EFI_DEBUG = YES -EFI_DEBUG_CLEAR_MEMORY = YES -EFI_PEI_PERFORMANCE = YES -EFI_DXE_PERFORMANCE = YES -EFI_SYMBOLIC_DEBUG = YES -EFI_GENERATE_INTERMEDIATE_FILE = NO -EFI_PEI_REPORT_STATUS_CODE = YES -UEFI_MODE = YES -PI_MODE = YES -USE_VC8 = NO diff --git a/EdkCompatibilityPkg/Sample/Platform/Nt32/Build/Makefile b/EdkCompatibilityPkg/Sample/Platform/Nt32/Build/Makefile deleted file mode 100644 index 8ad8646dc4..0000000000 --- a/EdkCompatibilityPkg/Sample/Platform/Nt32/Build/Makefile +++ /dev/null @@ -1,231 +0,0 @@ -#/*++ -# -# Copyright (c) 2004 - 2007, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# Makefile -# -# Abstract: -# -# This makefile is used to build the NT emulation. -# -#--*/ - -# -# Everything depends on EDK_SOURCE & EDK_TOOLS_PATH. Make sure it's defined -# -!IFNDEF EDK_SOURCE -!ERROR EDK_SOURCE environmental variable not set -!ENDIF - -!IFNDEF EDK_TOOLS_PATH -!MESSAGE EDK_TOOLS_PATH environmental variable not set, default setting used -!ENDIF - -# -# Set the processor type -# -PROCESSOR = IA32 - -# -# Define a toolchain so we can pick up the basic defines from -# the EFI tool setup file. -# -TOOLCHAIN = TOOLCHAIN_MSVC - -!INCLUDE PlatformTools.env - -# -# Default target -# -all : customer - -# -# Target to build customer config -# -customer : tempstamp_file build_tools makefiles builds - -# -# Target to build everything quickly -# -fast : build_tools fast_makefiles builds - -# -# Create a file to store the date and time, and used by SetStamp.exe -# -tempstamp_file: -!IF DEFINED(DATE_STAMP) && DEFINED(TIME_STAMP) - @echo $(DATE_STAMP) $(TIME_STAMP) > GenStamp.txt -!ELSEIF EXIST(GenStamp.txt) - - @del GenStamp.txt -!ENDIF - -# -# Make all the EFI build tools by calling the makefile -# -build_tools : - -if not exist $(EDK_TOOLS_OUTPUT) mkdir $(EDK_TOOLS_OUTPUT) - -if exist $(EDK_TOOLS_BIN)\*.* copy $(EDK_TOOLS_BIN)\*.* $(EDK_TOOLS_OUTPUT) - $(MAKE) -f $(EDK_TOOLS_SOURCE)\makefile PROCESSOR=$(PROCESSOR) BUILD_DIR=$(BUILD_DIR) - $(GUIDCHK) -b $(EDK_TOOLS_OUTPUT)\GuidDatabase.txt - -# -# Run ProcessDsc on our main description files to generate the -# makefiles and package files. Specify -v option for more verbose output. -# Specify "-xref filename" to generate a cross-reference file of -# basename-to-fileguid that can be used by VolInfo. -# -makefiles : - $(PROCESSDSC) \ - -d EFI_SOURCE=$(EDK_SOURCE) \ - -d EDK_SOURCE=$(EDK_SOURCE) \ - -d PROCESSOR=$(PROCESSOR) \ - -d PROJECT_NAME=$(PROJECT_NAME) \ - -d COMPRESS_METHOD=$(COMPRESS_METHOD) \ - -d OEMTOOLPATH=$(EDK_TOOLS_OUTPUT) \ - -d SHELL_INF=$(SHELL_INF) \ - -d UEFI_PREFIX=$(UEFI_PREFIX) \ - -d PI_PREFIX=$(PI_PREFIX) \ - -d CAPSULE_INF=$(CAPSULE_INF) \ - -d ATAPI_PASS_THRU_INF=$(ATAPI_PASS_THRU_INF) \ - -d DEVPATH_INF=$(DEVPATH_INF) \ - -d GRAPHICS_INF=$(GRAPHICS_INF) \ - -g $(EDK_TOOLS_OUTPUT)\GuidDatabase.txt \ - -xref FV\Guid.xref \ - $(PROJECT_NAME).dsc - -# -# Build faster by not building components with FV=NULL. Override in the -# DSC file by adding SKIP_FV_NULL=0 on the component lines you want built -# but still have FV=NULL. For example: -# -# Dxe\Drivers\MyDriver\MyDriver.inf FV=NULL SKIP_FV_NULL=0 -# -fast_makefiles : - $(PROCESSDSC) \ - -d EFI_SOURCE=$(EDK_SOURCE) \ - -d EDK_SOURCE=$(EDK_SOURCE) \ - -d PROCESSOR=$(PROCESSOR) \ - -d PROJECT_NAME=$(PROJECT_NAME) \ - -d COMPRESS_METHOD=$(COMPRESS_METHOD) \ - -d OEMTOOLPATH=$(EDK_TOOLS_OUTPUT) \ - -d SHELL_INF=$(SHELL_INF) \ - -d UEFI_PREFIX=$(UEFI_PREFIX) \ - -d PI_PREFIX=$(PI_PREFIX) \ - -d CAPSULE_INF=$(CAPSULE_INF) \ - -d ATAPI_PASS_THRU_INF=$(ATAPI_PASS_THRU_INF) \ - -d DEVPATH_INF=$(DEVPATH_INF) \ - -d GRAPHICS_INF=$(GRAPHICS_INF) \ - -g $(EDK_TOOLS_OUTPUT)\GuidDatabase.txt \ - -xref FV\Guid.xref \ - -d SKIP_FV_NULL=1 \ - $(PROJECT_NAME).dsc - -# -# Create the guid-to-basename cross reference file of protocols -# used by volinfo for decoding dependency expressions. -# -protocols.xref : - -@if not exist fv mkdir FV - cd $(EDK_SOURCE) - $(GUIDCHK) -g -u $(BUILD_TARGET_DIRECTORY) -e inf -x > $(BUILD_DIR)\Fv\protocols.xref - cd $(BUILD_DIR) - -# -# Call all the makefiles that were generated by ProcessDsc. ProcessDsc -# creates the makefile.out that calls all the component makefiles. -# -builds : - $(MAKE) -f makefile.out - -# -# Useful targets -# - -# -# Define a pseudo-target that skips over compiling the build tools and -# also skips creation of the makefiles for the components. The user -# has to be aware that any changes to INF files renders this target -# invalid. -# -quick : builds - -# -# Define a pseudo-target to start building with the libraries or with the -# components. -# -libraries : - $(MAKE) -f makefile.out libraries - -components : - $(MAKE) -f makefile.out components - -# -# Make a pseudo-target to simplify running of the NT emulation. -# -!IF "$(EFI_WIN_NT_FILE_SYSTEM)" == "" -EFI_WIN_NT_FILE_SYSTEM = $(EDK_SOURCE)\Other\Maintained\Application\$(UEFI_PREFIX)Shell\bin\ia32\Apps -!ELSE -EFI_WIN_NT_FILE_SYSTEM = $(EFI_WIN_NT_FILE_SYSTEM)!$(EDK_SOURCE)\Other\Maintained\Application\$(UEFI_PREFIX)Shell\bin\ia32\Apps -!ENDIF - -# -# Make browse info file -# -bsc: - - dir /s /b *.sbr > $(PROCESSOR)\temp.rm - $(BSCMAKE) /n /o $(PROCESSOR)\$(PROJECT_NAME).bsc "@$(PROCESSOR)\temp.rm" - -# -# Create a target to clean up all build directories -# -clean : - - @if exist vc??.* del vc??.* > NUL - - @if exist *.bak del *.bak > NUL - - @if exist $(PROCESSOR) rd /s /q $(PROCESSOR) > NUL - - @if exist ipf rd /s /q ipf > NUL - - @if exist ebc rd /s /q ebc > NUL - - @if exist fv rd /s /q fv > NUL - - @if exist Tools rd /s /q Tools > NUL - - @if exist makefile.out del makefile.out > NUL - - @if exist module.* del module.* > NUL - - @echo All targets cleaned - -# -# Clean up all build directories except for tools. -# -cleanbuilds : - - @if exist *.bak del *.bak > NUL - - @if exist $(PROCESSOR) rd /s /q $(PROCESSOR) > NUL - - @if exist ipf rd /s /q ipf > NUL - - @if exist ebc rd /s /q ebc > NUL - - @if exist fv rd /s /q fv > NUL - - @if exist makefile.out del makefile.out > NUL - - @if exist module.* del module.* > NUL - - @echo All modules cleaned - -# -# Clean up only the tools -# -cleantools : - - @if exist vc??.* del vc??.* > NUL - - @if exist Tools rd /s /q Tools > NUL - - @echo All tools cleaned - -# -# Rebuild target, clean and build all -# -rebuild : clean all - -# -# cleanall target to clean all build directories. -# -cleanall : clean diff --git a/EdkCompatibilityPkg/Sample/Platform/Nt32/Build/Nt32.dsc b/EdkCompatibilityPkg/Sample/Platform/Nt32/Build/Nt32.dsc deleted file mode 100644 index 03c14e0dc2..0000000000 --- a/EdkCompatibilityPkg/Sample/Platform/Nt32/Build/Nt32.dsc +++ /dev/null @@ -1,154 +0,0 @@ -#/*++ -# -# Copyright (c) 2004 - 2007, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# Nt32.dsc -# -# Abstract: -# -# This is the build description file containing the platform -# build definitions. -# -# -# Notes: -# -# The info in this file is broken down into sections. The start of a section -# is designated by a "[" in the first column. So the [=====] separater ends -# a section. -# -#--*/ - - -[=============================================================================] -# -# This section gets processed first by the utility. Define any -# macros that you may use elsewhere in this description file. This is the -# mechanism by which you can pass parameters and defines to the makefiles -# generated for each component. You can define it here, and then make an -# assignment in the [makefile.common] section. For example, if here you -# define MY_VAR = my_var_value, then you can add MY_VAR = $(MY_VAR) in -# the [makefile.common] section and it becomes MY_VAR = my_var_value in -# the output makefiles for each component. -# -[Defines] -PLATFORM = $(PROJECT_NAME) - -[=============================================================================] -# -# Include other common build descriptions -# -!include "$(EDK_SOURCE)\Sample\Platform\Common.dsc" -!include "$(EDK_SOURCE)\Sample\Platform\Common$(PROCESSOR).dsc" - -[=============================================================================] -# -# These control the generation of the FV files -# -[=============================================================================] -[Fv.Fv.Attributes] - -[Fv.Fv.options] - -[Build.Fv.Fv] - -[=============================================================================] -# -# These are the libraries that will be built by the master makefile -# -[=============================================================================] -[Libraries] -DEFINE EDK_PREFIX= - -!include "$(EDK_SOURCE)\Sample\Platform\EdkLibAll.dsc" - -# -# EdkII Glue Library -# -#!include "$(EDK_SOURCE)\Sample\Platform\EdkIIGlueLibAll.dsc" - -[=============================================================================] -# -# These are platform specific libraries that must be built prior to building -# certain drivers that depend upon them. -# -[=============================================================================] -[Libraries.Platform] -Sample\Platform\Nt32\Protocol\EdkNt32ProtocolLib.inf -Sample\Library\Dxe\WinNt\WinNtLib.inf -#Sample\Platform\Generic\MonoStatusCode\Library\Pei\MemoryStatusCode\MemoryStatusCode.inf -Sample\Platform\Generic\RuntimeDxe\StatusCode\Lib\BsDataHubStatusCode\BsDataHubStatusCode.inf -Sample\Platform\Generic\RuntimeDxe\StatusCode\Lib\RtMemoryStatusCode\RtMemoryStatusCode.inf -Sample\Platform\Generic\RuntimeDxe\StatusCode\Lib\RtPlatformStatusCode\$(PROJECT_NAME)\RtPlatformStatusCode.inf - -Other\Maintained\Application\Shell\Library\EfiShellLib.inf - -[=============================================================================] -# -# These are the components that will be built by the master makefile -# -[=============================================================================] -[Components] -DEFINE PACKAGE=Default - -#Other\Maintained\Application\Shell\Shell.inf -#Other\Maintained\Application\Shell\ShellFull.inf -Other\Maintained\Application\Shell\attrib\attrib.inf -Other\Maintained\Application\Shell\cls\cls.inf -Other\Maintained\Application\Shell\comp\comp.inf -Other\Maintained\Application\Shell\cp\cp.inf -Other\Maintained\Application\Shell\date\date.inf -Other\Maintained\Application\Shell\dblk\dblk.inf -Other\Maintained\Application\Shell\devices\devices.inf -Other\Maintained\Application\Shell\DeviceTree\devicetree.inf -Other\Maintained\Application\Shell\dmem\dmem.inf -Other\Maintained\Application\Shell\dmpstore\dmpstore.inf -Other\Maintained\Application\Shell\drivers\drivers.inf -Other\Maintained\Application\Shell\drvcfg\drvcfg.inf -Other\Maintained\Application\Shell\drvdiag\drvdiag.inf -Other\Maintained\Application\Shell\edit\edit.inf -Other\Maintained\Application\Shell\EfiCompress\compress.inf -Other\Maintained\Application\Shell\EfiDecompress\Decompress.inf -Other\Maintained\Application\Shell\err\err.inf -Other\Maintained\Application\Shell\guid\guid.inf -Other\Maintained\Application\Shell\hexedit\hexedit.inf -Other\Maintained\Application\Shell\IfConfig\IfConfig.inf -Other\Maintained\Application\Shell\IpConfig\IpConfig.inf -Other\Maintained\Application\Shell\load\load.inf -Other\Maintained\Application\Shell\LoadPciRom\LoadPciRom.inf -Other\Maintained\Application\Shell\ls\ls.inf -Other\Maintained\Application\Shell\mem\mem.inf -Other\Maintained\Application\Shell\memmap\memmap.inf -Other\Maintained\Application\Shell\mkdir\mkdir.inf -Other\Maintained\Application\Shell\mm\mm.inf -Other\Maintained\Application\Shell\mode\mode.inf -Other\Maintained\Application\Shell\mount\mount.inf -Other\Maintained\Application\Shell\mv\mv.inf -Other\Maintained\Application\Shell\newshell\nshell.inf -Other\Maintained\Application\Shell\openinfo\openinfo.inf -Other\Maintained\Application\Shell\pci\pci.inf -Other\Maintained\Application\Shell\Ping\Ping.inf -Other\Maintained\Application\Shell\reset\reset.inf -Other\Maintained\Application\Shell\rm\rm.inf -Other\Maintained\Application\Shell\sermode\sermode.inf -Other\Maintained\Application\Shell\SmbiosView\Smbiosview.inf -Other\Maintained\Application\Shell\stall\stall.inf -Other\Maintained\Application\Shell\TelnetMgmt\TelnetMgmt.inf -Other\Maintained\Application\Shell\time\time.inf -Other\Maintained\Application\Shell\touch\touch.inf -Other\Maintained\Application\Shell\type\type.inf -Other\Maintained\Application\Shell\tzone\timezone.inf -Other\Maintained\Application\Shell\unload\unload.inf -Other\Maintained\Application\Shell\ver\Ver.inf -Other\Maintained\Application\Shell\vol\Vol.inf - -[=============================================================================] - diff --git a/EdkCompatibilityPkg/Sample/Platform/Nt32/Build/PlatformTools.env b/EdkCompatibilityPkg/Sample/Platform/Nt32/Build/PlatformTools.env deleted file mode 100644 index ec799ab2f5..0000000000 --- a/EdkCompatibilityPkg/Sample/Platform/Nt32/Build/PlatformTools.env +++ /dev/null @@ -1,68 +0,0 @@ -#/*++ -# -# Copyright (c) 2004 - 2007, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# PlatformTools.env -# -# Abstract: -# -# This file is used to define platform specific environment variables. -# It gets included by every makefile. -# -#--*/ - -!INCLUDE Config.env - -# -# Set the project name -# -PROJECT_NAME = Nt32 - -# -# Set the build directory -# -BUILD_DIR = $(EDK_SOURCE)\Sample\Platform\$(PROJECT_NAME)\$(BUILD_TARGET_DIRECTORY) - -!IF "$(UEFI_MODE)" == "YES" -GRAPHICS_INF = Sample\Bus\WinNtThunk\Gop\Dxe\WinNtGop.inf -!ELSE -GRAPHICS_INF = Sample\Bus\WinNtThunk\Uga\Dxe\WinNtUga.inf -!ENDIF - -# -# Define compiler names -# -!IFNDEF EDK_TOOLS_PATH -EFI_ASL_LOCAL = YES -!ELSE -EFI_ASSEMBLER_NAME = Masm611 -EFI_ASL_LOCAL = NO -!ENDIF - -# -# These flags are specific to this platform. If a flag is not specific to this -# platform the flag should be placed in the CommonTools.env file. -# Processor architecture specific and global macros can be found in -# CommonTools.env, macros named xxx_ARCH_FLAGS and xxx_STD_FLAGS respectively. -# -C_PROJ_FLAGS = /D UNICODE /D NEW_PEI_HOBS -ASM_PROJ_FLAGS = /Cx /Zd /Fl$*.lst /DEFI_NT_EMULATOR -LINK_PROJ_FLAGS = -LIB_PROJ_FLAGS = -EBC_C_PROJ_FLAGS = -EBC_LINK_PROJ_FLAGS = -EBC_LIB_PROJ_FLAGS = - -# -# Include processor architecture specific and general Tiano build flags. -# -!INCLUDE $(EDK_SOURCE)\Sample\CommonTools.env diff --git a/EdkCompatibilityPkg/Sample/Platform/Nt32/Build/build.bat b/EdkCompatibilityPkg/Sample/Platform/Nt32/Build/build.bat deleted file mode 100644 index c224c2ee74..0000000000 --- a/EdkCompatibilityPkg/Sample/Platform/Nt32/Build/build.bat +++ /dev/null @@ -1,304 +0,0 @@ -@rem #/*++ -@rem # -@rem # Copyright (c) 2007, Intel Corporation -@rem # All rights reserved. This program and the accompanying materials -@rem # are licensed and made available under the terms and conditions of the BSD License -@rem # which accompanies this distribution. The full text of the license may be found at -@rem # http://opensource.org/licenses/bsd-license.php -@rem # -@rem # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -@rem # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -@rem # -@rem # Module Name: -@rem # -@rem # build.bat -@rem # -@rem # Abstract: -@rem # -@rem # This script provides single module build, clean and find function -@rem # based on module name. -@rem # -@rem # The auto-generated module.list file records all module names -@rem # described in the current platform.dsc. -@rem # -@rem #--*/ - -@echo off - -setlocal -@rem initilize local variable -set FUNCTION=build -set MODULE= -set UPDATE= -set VERBOSE= - -:parse -if /I "%1"=="/c" ( - set FUNCTION=clean - shift - goto parse -) -if /I "%1"=="clean" ( - set FUNCTION=clean - shift - goto parse -) -if /I "%1"=="/r" ( - set FUNCTION=rebuild - shift - goto parse -) -if /I "%1"=="/h" ( - set FUNCTION=usage - shift - goto parse -) -if /I "%1"=="/?" ( - set FUNCTION=usage - shift - goto parse -) -if /I "%1"=="/f" ( - set FUNCTION=find - shift - goto parse -) -if /I "%1"=="/a" ( - set UPDATE=TRUE - shift - goto parse -) -if /I "%1"=="/v" ( - set VERBOSE=TRUE - shift - goto parse -) -if not "%1"=="" ( - set MODULE=%1 - shift - goto parse -) else ( - @rem no other paramters - if "%FUNCTION%"=="rebuild" goto build - goto %FUNCTION% -) - -:build -set StartTime=%time% -@rem if no input, build all -if "%MODULE%"=="" ( - if "%FUNCTION%"=="rebuild" ( - nmake -nologo -f Makefile clean - ) - nmake -nologo -f Makefile all - goto endtime -) -@rem then try to build special targets: all, fast, tools. -if /I "%MODULE%"=="all" ( - @rem build all modules and tools. - if "%FUNCTION%"=="rebuild" ( - nmake -nologo -f Makefile cleanall - ) - nmake -nologo -f Makefile all - goto endtime -) -if /I "%MODULE%"=="fast" ( - @rem build fast target to skip FV=NULL modules. - if "%FUNCTION%"=="rebuild" ( - nmake -nologo -f Makefile clean - ) - nmake -nologo -f Makefile fast - goto endtime -) -if /I "%MODULE%"=="tools" ( - @rem build all tools. - if "%FUNCTION%"=="rebuild" ( - nmake -nologo -f Makefile cleantools - ) - nmake -nologo -f Makefile build_tools - echo. - echo All tools are built. - goto endtime -) -@rem build single module, update build makefiles -if "%FUNCTION%"=="rebuild" ( - nmake -nologo -f module.mak %MODULE%Clean 2>NUL -) -nmake -nologo -f Makefile flashmap > NUL 2>&1 -nmake -nologo -f Makefile makefiles -if errorlevel 1 goto builderror -@rem check whether input module name is described in current dsc file. -findstr /I /C:" %MODULE% " module.list > NUL -if errorlevel 1 ( - echo. - echo. - findstr /I /C:"%MODULE%" module.list > NUL - if errorlevel 1 goto finderror - for /F %%A in ('findstr /I /C:"%MODULE%" module.list') do echo %%A - echo. - echo Warning!!! Your specified module name can't be found. - echo One of the above modules may be what you want to build. - goto end -) -@rem build this module -nmake -nologo -f module.mak %MODULE%Build -echo. -if "%FUNCTION%"=="rebuild" ( - echo Module %MODULE% is rebuilt. -) else ( - echo Module %MODULE% is built. -) -:endtime -@rem output build time. -set EndTime=%time% -echo. -echo Start time %StartTime% -echo End time %EndTime% -goto end - -:clean -@rem if no input, default clean all build directories. -if "%MODULE%"=="" ( - nmake -nologo -f Makefile clean - goto end -) -@rem first try to clean special tasks: all, modules and tools -if /I "%MODULE%"=="all" ( - nmake -nologo -f Makefile cleanall - goto end -) -if /I "%MODULE%"=="modules" ( - nmake -nologo -f Makefile cleanbuilds - goto end -) -if /I "%MODULE%"=="tools" ( - nmake -nologo -f Makefile cleantools - goto end -) -@rem clean single module -@rem check whether input module name is in module.list file. -if not exist module.list ( - echo Module list info doesn't exist. - echo Processing dsc file to generate module list info. - nmake -nologo -f Makefile flashmap > NUL 2>&1 - nmake -nologo -f Makefile makefiles > error.log 2>&1 - if errorlevel 1 goto builderror -) -findstr /I /C:" %MODULE% " module.list > NUL -if errorlevel 1 ( - echo. - findstr /I /C:"%MODULE%" module.list > NUL - if errorlevel 1 goto finderror - for /F %%A in ('findstr /I /C:"%MODULE%" module.list') do echo %%A - echo. - echo Warning!!! Your specified module name can't be found. - echo One of the above modules may be what you want to clean. - goto end -) -@rem clean this module -nmake -nologo -f module.mak %MODULE%Clean 2>NUL -echo. -echo Module %MODULE% is cleaned. -goto end - -:find -@rem find match module name by subname. -if "%UPDATE%"=="TRUE" ( - echo Processing dsc file to update module list info. - nmake -nologo -f Makefile flashmap > NUL 2>&1 - nmake -nologo -f Makefile makefiles > error.log 2>&1 - if errorlevel 1 goto builderror -) -if not exist module.list ( - echo Module list info doesn't exist. - echo Processing dsc file to generate module list info. - nmake -nologo -f Makefile flashmap > NUL 2>&1 - nmake -nologo -f Makefile makefiles > error.log 2>&1 - if errorlevel 1 goto builderror -) -if "%MODULE%"=="" ( - @rem display all - echo. - if "%VERBOSE%"=="TRUE" ( - type module.list - ) else ( - @rem only output module name without module.inf file name - for /F %%A in (module.list) do echo %%A - ) -) else ( - @rem display match module name - echo. - if "%VERBOSE%"=="TRUE" ( - findstr /I /C:"%MODULE%" module.list - if errorlevel 1 goto notfind - ) else ( - findstr /I /C:"%MODULE%" module.list > NUL - if errorlevel 1 goto notfind - for /F %%A in ('findstr /I /C:"%MODULE%" module.list') do echo %%A - ) -) -goto end - -:usage -echo build or clean single module based on module name after tools are built. -echo. -echo build [/r] [/c] [/f] [/h] [modulename] -echo. -echo build [/r] [modulename] -echo build single module, such as build DxeMain. -echo If /r is specified, the target will be rebuit after cleaned first. -echo if no input modulename or modulename is all, then build all -echo Specail build targets: all, fast, tools. -echo These special targets may not exist in your tip main makefile. -echo build - build all tools and modules -echo build all - build all tools and modules -echo build fast - build all without FV=NULL modules -echo build tools - build all tools. -echo. -echo build /c [modulename] -echo build clean [modulename] -echo remove the temp generated files for single module -echo if no input modulename, then clean all -echo Specail clean targets: all, modules, tools. -echo These special targets may not exist in your tip main makefile. -echo build /c - clean up all build directories -echo build /c all - clean up all build directories and binary dirs. -echo build /c modules - clean up all build directories except for tools. -echo build /c tools - clean up only tools directory. -echo. -echo build /f [/a] [/v] [subname] -echo find all matched modulename with the sub string of module name. -echo option /a re-processes dsc files to update module name list. -echo option /v outputs module name and module.inf file name both. -echo. -echo build /h -echo build /? -echo display help information. -echo. -goto end - -:notfind -echo Warning!!! Your specified module name can't be found. -echo Try to use /f /a options to update module name list. -goto end - -:finderror -echo Warning!!! Your specified module name can't be found. -echo Try to use /f to find modules that you want to build. -echo Or use /h to get the helpinfo of this script. -goto end - -:builderror -if exist error.log type error.log -echo. -if not exist Tools\ProcessDsc.exe ( - echo. - echo Error!!! Build tools may not be ready. Try to build tools first. - echo. -) -del module.* > NUL 2>&1 -goto end - -:end -if exist error.log del error.log -echo on diff --git a/EdkCompatibilityPkg/Sample/Platform/X64/Build/X64.dsc b/EdkCompatibilityPkg/Sample/Platform/X64/Build/X64.dsc index 4dd85ae95c..2893d8794c 100644 --- a/EdkCompatibilityPkg/Sample/Platform/X64/Build/X64.dsc +++ b/EdkCompatibilityPkg/Sample/Platform/X64/Build/X64.dsc @@ -89,8 +89,6 @@ DEFINE PROCESSOR=X64 Sample\Platform\Generic\RuntimeDxe\StatusCode\Lib\BsDataHubStatusCode\BsDataHubStatusCode.inf Sample\Platform\Generic\RuntimeDxe\StatusCode\Lib\RtMemoryStatusCode\RtMemoryStatusCode.inf -#Other\Maintained\Application\Shell\Library\EfiShellLib.inf - [=============================================================================] # # These are the components that will be built by the master makefile @@ -99,7 +97,7 @@ Sample\Platform\Generic\RuntimeDxe\StatusCode\Lib\RtMemoryStatusCode\RtMemorySta [Components] DEFINE PACKAGE=Default -#Other\Maintained\Application\Shell\Shell.inf +#Add EDK INF file here: #Other\Maintained\Application\Shell\ShellFull.inf -- cgit v1.2.3