diff options
author | yshi8 <yshi8@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-08-15 05:48:17 +0000 |
---|---|---|
committer | yshi8 <yshi8@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-08-15 05:48:17 +0000 |
commit | 3b614fb901dce0c0656375a37e9d152585ebf0cf (patch) | |
tree | 833151bb7dd5a4d94d9ac6bcb11e8ac19277752d | |
parent | 04c40e04a992349195077343a0fef613c55d7e7e (diff) | |
download | edk2-3b614fb901dce0c0656375a37e9d152585ebf0cf.zip edk2-3b614fb901dce0c0656375a37e9d152585ebf0cf.tar.gz edk2-3b614fb901dce0c0656375a37e9d152585ebf0cf.tar.bz2 |
moved exception and logger classes to org.tianocore.common package; and created definitions classes to put common definitions.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1267 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | Tools/Source/Common/org/tianocore/common/definitions/EdkDefinitions.java | 111 | ||||
-rw-r--r-- | Tools/Source/Common/org/tianocore/common/definitions/ToolDefinitions.java | 100 | ||||
-rw-r--r-- | Tools/Source/Common/org/tianocore/common/exception/EdkException.java (renamed from Tools/Source/Common/org/tianocore/exception/EdkException.java) | 0 | ||||
-rw-r--r-- | Tools/Source/Common/org/tianocore/common/logger/DefaultLogger.java (renamed from Tools/Source/Common/org/tianocore/logger/DefaultLogger.java) | 0 | ||||
-rw-r--r-- | Tools/Source/Common/org/tianocore/common/logger/EdkLog.java (renamed from Tools/Source/Common/org/tianocore/logger/EdkLog.java) | 0 | ||||
-rw-r--r-- | Tools/Source/Common/org/tianocore/common/logger/LogMethod.java (renamed from Tools/Source/Common/org/tianocore/logger/LogMethod.java) | 0 |
6 files changed, 211 insertions, 0 deletions
diff --git a/Tools/Source/Common/org/tianocore/common/definitions/EdkDefinitions.java b/Tools/Source/Common/org/tianocore/common/definitions/EdkDefinitions.java new file mode 100644 index 0000000..c455581 --- /dev/null +++ b/Tools/Source/Common/org/tianocore/common/definitions/EdkDefinitions.java @@ -0,0 +1,111 @@ +/** @file
+ EdkDefinitions Class.
+
+ EdkDefinitions class incldes the common EDK definitions which are used
+ by the Tools.
+
+Copyright (c) 2006, 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.
+
+**/
+
+package org.tianocore.definitions;
+
+/**
+ This class includes the common EDK definitions.
+ **/
+public class EdkDefinitions {
+ ///
+ /// MODULE_TYPE definitions
+ ///
+ public final static String MODULE_TYPE_BASE = "BASE";
+ public final static String MODULE_TYPE_SEC = "SEC";
+ public final static String MODULE_TYPE_PEI_CORE = "PEI_CORE";
+ public final static String MODULE_TYPE_PEIM = "PEIM";
+ public final static String MODULE_TYPE_DXE_CORE = "DXE_CORE";
+ public final static String MODULE_TYPE_DXE_DRIVER = "DXE_DRIVER";
+ public final static String MODULE_TYPE_DXE_RUNTIME_DRIVER = "DXE_RUNTIME_DRIVER";
+ public final static String MODULE_TYPE_DXE_SMM_DRIVER = "DXE_SMM_DRIVER";
+ public final static String MODULE_TYPE_DXE_SAL_DRIVER = "DXE_SAL_DRIVER";
+ public final static String MODULE_TYPE_UEFI_DRIVER = "UEFI_DRIVER";
+ public final static String MODULE_TYPE_UEFI_APPLICATION = "UEFI_APPLICATION";
+ public final static String MODULE_TYPE_USER_DEFINED = "USER_DEFINED";
+ public final static String MODULE_TYPE_TOOL = "TOOL";
+
+ ///
+ /// Extension definitions for each of module types
+ ///
+ public final static String ModuleTypeExtensions[][] = {
+ { MODULE_TYPE_BASE, ".FFS" },
+ { MODULE_TYPE_SEC, ".SEC" },
+ { MODULE_TYPE_PEI_CORE, ".PEI" },
+ { MODULE_TYPE_PEIM, ".PEI" },
+ { MODULE_TYPE_DXE_CORE, ".DXE" },
+ { MODULE_TYPE_DXE_DRIVER, ".DXE" },
+ { MODULE_TYPE_DXE_RUNTIME_DRIVER, ".DXE" },
+ { MODULE_TYPE_DXE_SMM_DRIVER, ".DXE" },
+ { MODULE_TYPE_DXE_SAL_DRIVER, ".DXE" },
+ { MODULE_TYPE_UEFI_DRIVER, ".DXE" },
+ { MODULE_TYPE_UEFI_APPLICATION, ".APP" },
+ { MODULE_TYPE_USER_DEFINED, ".FFS" },
+ { MODULE_TYPE_TOOL, ".FFS" }
+ };
+
+ ///
+ /// FFS_TYPE definitions
+ ///
+ public final static int EFI_FV_FILETYPE_ALL = 0x00;
+ public final static int EFI_FV_FILETYPE_RAW = 0x01;
+ public final static int EFI_FV_FILETYPE_FREEFORM = 0x02;
+ public final static int EFI_FV_FILETYPE_SECURITY_CORE = 0x03;
+ public final static int EFI_FV_FILETYPE_PEI_CORE = 0x04;
+ public final static int EFI_FV_FILETYPE_DXE_CORE = 0x05;
+ public final static int EFI_FV_FILETYPE_PEIM = 0x06;
+ public final static int EFI_FV_FILETYPE_DRIVER = 0x07;
+ public final static int EFI_FV_FILETYPE_COMBINED_PEIM_DRIVER = 0x08;
+ public final static int EFI_FV_FILETYPE_APPLICATION = 0x09;
+ public final static int EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE = 0x0B;
+ public final static int EFI_FV_FILETYPE_FFS_PAD = 0xF0;
+
+ ///
+ /// SECTION_TYPE definitions
+ ///
+ public final static String EFI_SECTION_COMPRESSION = "EFI_SECTION_COMPRESSION";
+ public final static String EFI_SECTION_GUID_DEFINED = "EFI_SECTION_GUID_DEFINED";
+ public final static String EFI_SECTION_PE32 = "EFI_SECTION_PE32";
+ public final static String EFI_SECTION_PIC = "EFI_SECTION_PIC";
+ public final static String EFI_SECTION_TE = "EFI_SECTION_TE";
+ public final static String EFI_SECTION_DXE_DEPEX = "EFI_SECTION_DXE_DEPEX";
+ public final static String EFI_SECTION_VERSION = "EFI_SECTION_VERSION";
+ public final static String EFI_SECTION_USER_INTERFACE = "EFI_SECTION_USER_INTERFACE";
+ public final static String EFI_SECTION_COMPATIBILITY16 = "EFI_SECTION_COMPATIBILITY16";
+ public final static String EFI_SECTION_FIRMWARE_VOLUME_IMAGE = "EFI_SECTION_FIRMWARE_VOLUME_IMAGE";
+ public final static String EFI_SECTION_FREEFORM_SUBTYPE_GUID = "EFI_SECTION_FREEFORM_SUBTYPE_GUID";
+ public final static String EFI_SECTION_RAW = "EFI_SECTION_RAW";
+ public final static String EFI_SECTION_PEI_DEPEX = "EFI_SECTION_PEI_DEPEX";
+
+ ///
+ /// Extension definitions for each of section types
+ ///
+ public final static String SectionTypeExtensions[][] = {
+ { EFI_SECTION_COMPRESSION, ".sec" },
+ { EFI_SECTION_GUID_DEFINED, ".sec" },
+ { EFI_SECTION_PE32, ".pe32" },
+ { EFI_SECTION_PIC, ".pic" },
+ { EFI_SECTION_TE, ".tes" },
+ { EFI_SECTION_DXE_DEPEX, ".dpx" },
+ { EFI_SECTION_VERSION, ".ver" },
+ { EFI_SECTION_USER_INTERFACE, ".ui" },
+ { EFI_SECTION_COMPATIBILITY16, ".sec" },
+ { EFI_SECTION_FIRMWARE_VOLUME_IMAGE, ".sec" },
+ { EFI_SECTION_FREEFORM_SUBTYPE_GUID, ".sec" },
+ { EFI_SECTION_RAW, ".sec" },
+ { EFI_SECTION_PEI_DEPEX, ".dpx" }
+ };
+}
diff --git a/Tools/Source/Common/org/tianocore/common/definitions/ToolDefinitions.java b/Tools/Source/Common/org/tianocore/common/definitions/ToolDefinitions.java new file mode 100644 index 0000000..cc95e1f --- /dev/null +++ b/Tools/Source/Common/org/tianocore/common/definitions/ToolDefinitions.java @@ -0,0 +1,100 @@ +/** @file
+ ToolDefinitions Class.
+
+ ToolDefinitions class incldes the common Tool definitions.
+
+Copyright (c) 2006, 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.
+
+**/
+
+package org.tianocore.definitions;
+
+import java.io.File;
+
+/**
+ This class includes the common Tool definitions.
+ **/
+public class ToolDefinitions {
+ ///
+ /// Line separator (carriage return-line feed, CRLF)
+ ///
+ public final static String LINE_SEPARATOR = "\r\n";
+
+ ///
+ /// Framework Database (FrameworkDatabase.db) file path
+ ///
+ public final static String FRAMEWORK_DATABASE_FILE_PATH =
+ "Tools" + File.separatorChar + "Conf" + File.separatorChar + "FrameworkDatabase.db";
+
+ ///
+ /// Target (target.txt) file path
+ ///
+ public final static String TARGET_FILE_PATH =
+ "Tools" + File.separatorChar + "Conf" + File.separatorChar + "target.txt";
+
+ ///
+ /// Default Tools Definition (tools_def.txt) file path
+ ///
+ public final static String DEFAULT_TOOLS_DEF_FILE_PATH =
+ "Tools" + File.separatorChar + "Conf" + File.separatorChar + "tools_def.txt";
+
+ ///
+ /// Extension names for SPD, FPD, and MSA
+ ///
+ public final static String SPD_EXTENSION = ".spd";
+ public final static String FPD_EXTENSION = ".fpd";
+ public final static String MSA_EXTENSION = ".msa";
+
+ ///
+ /// Tool Chain Elements in the Tools Definition file
+ ///
+ public final static String TOOLS_DEF_ELEMENT_TARGET = "TARGET";
+ public final static String TOOLS_DEF_ELEMENT_TOOLCHAIN = "TOOLCHAIN";
+ public final static String TOOLS_DEF_ELEMENT_ARCH = "ARCH";
+ public final static String TOOLS_DEF_ELEMENT_TOOLCODE = "TOOLCODE";
+ public final static String TOOLS_DEF_ELEMENT_ATTRIBUTE = "ATTRIBUTE";
+
+ ///
+ /// Index of Tool Chain elements in the Tools Definition file
+ ///
+ public final static int TOOLS_DEF_ELEMENT_INDEX_TARGET = 0;
+ public final static int TOOLS_DEF_ELEMENT_INDEX_TOOLCHAIN = 1;
+ public final static int TOOLS_DEF_ELEMENT_INDEX_ARCH = 2;
+ public final static int TOOLS_DEF_ELEMENT_INDEX_TOOLCODE = 3;
+ public final static int TOOLS_DEF_ELEMENT_INDEX_ATTRIBUTE = 4;
+ public final static int TOOLS_DEF_ELEMENT_INDEX_MAXIMUM = 5;
+
+ ///
+ /// Tool Chain Attributes in the Tools Definition file
+ ///
+ public final static String TOOLS_DEF_ATTRIBUTE_NAME = "NAME";
+ public final static String TOOLS_DEF_ATTRIBUTE_PATH = "PATH";
+ public final static String TOOLS_DEF_ATTRIBUTE_DPATH = "DPATH";
+ public final static String TOOLS_DEF_ATTRIBUTE_SPATH = "SPATH";
+ public final static String TOOLS_DEF_ATTRIBUTE_EXT = "EXT";
+ public final static String TOOLS_DEF_ATTRIBUTE_FAMILY = "FAMILY";
+ public final static String TOOLS_DEF_ATTRIBUTE_FLAGS = "FALGS";
+
+ ///
+ /// Tool Chain Families in the Tools Definition file
+ ///
+ public final static String TOOLS_DEF_FAMILY_MSFT = "MSFT";
+ public final static String TOOLS_DEF_FAMILY_INTEL = "INTEL";
+ public final static String TOOLS_DEF_FAMILY_GCC = "GCC";
+
+ ///
+ /// Key name in the Target file
+ ///
+ public final static String TARGET_KEY_ACTIVE_PLATFORM = "ACTIVE_PLATFORM";
+ public final static String TARGET_KEY_TARGET = "TARGET";
+ public final static String TARGET_KEY_TOOLCHAIN = "TOOL_CHAIN_TAG";
+ public final static String TARGET_KEY_ARCH = "TARGET_ARCH";
+ public final static String TARGET_KEY_TOOLS_DEF = "TOOL_CHAIN_CONF";
+}
diff --git a/Tools/Source/Common/org/tianocore/exception/EdkException.java b/Tools/Source/Common/org/tianocore/common/exception/EdkException.java index bd143d8..bd143d8 100644 --- a/Tools/Source/Common/org/tianocore/exception/EdkException.java +++ b/Tools/Source/Common/org/tianocore/common/exception/EdkException.java diff --git a/Tools/Source/Common/org/tianocore/logger/DefaultLogger.java b/Tools/Source/Common/org/tianocore/common/logger/DefaultLogger.java index 4bec8e5..4bec8e5 100644 --- a/Tools/Source/Common/org/tianocore/logger/DefaultLogger.java +++ b/Tools/Source/Common/org/tianocore/common/logger/DefaultLogger.java diff --git a/Tools/Source/Common/org/tianocore/logger/EdkLog.java b/Tools/Source/Common/org/tianocore/common/logger/EdkLog.java index b16d39c..b16d39c 100644 --- a/Tools/Source/Common/org/tianocore/logger/EdkLog.java +++ b/Tools/Source/Common/org/tianocore/common/logger/EdkLog.java diff --git a/Tools/Source/Common/org/tianocore/logger/LogMethod.java b/Tools/Source/Common/org/tianocore/common/logger/LogMethod.java index ab60240..ab60240 100644 --- a/Tools/Source/Common/org/tianocore/logger/LogMethod.java +++ b/Tools/Source/Common/org/tianocore/common/logger/LogMethod.java |