From b7d286b6f9c1b447c706ab75377848bf05a3dfed Mon Sep 17 00:00:00 2001 From: vanjeff Date: Fri, 22 Jun 2007 09:15:22 +0000 Subject: Import MdeModulePkg, only one module HelloWorld by now. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2718 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Application/HelloWorld/CommonHeader.h | 34 ++++++++ MdeModulePkg/Application/HelloWorld/HelloWorld.c | 32 ++++++++ MdeModulePkg/Application/HelloWorld/HelloWorld.inf | 96 ++++++++++++++++++++++ 3 files changed, 162 insertions(+) create mode 100644 MdeModulePkg/Application/HelloWorld/CommonHeader.h create mode 100644 MdeModulePkg/Application/HelloWorld/HelloWorld.c create mode 100644 MdeModulePkg/Application/HelloWorld/HelloWorld.inf (limited to 'MdeModulePkg/Application/HelloWorld') diff --git a/MdeModulePkg/Application/HelloWorld/CommonHeader.h b/MdeModulePkg/Application/HelloWorld/CommonHeader.h new file mode 100644 index 0000000000..d1e5656187 --- /dev/null +++ b/MdeModulePkg/Application/HelloWorld/CommonHeader.h @@ -0,0 +1,34 @@ +/**@file + Common header file shared by all source files. + + This file includes package header files, library classes and protocol, PPI & GUID definitions. + + Copyright (c) 2007 - 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. +**/ + +#ifndef __COMMON_HEADER_H_ +#define __COMMON_HEADER_H_ + + +// +// The package level header files this module uses +// +#include +// +// The protocols, PPI and GUID defintions for this module +// +// +// The Library classes this module consumes +// +#include +#include +#include +#include + +#endif diff --git a/MdeModulePkg/Application/HelloWorld/HelloWorld.c b/MdeModulePkg/Application/HelloWorld/HelloWorld.c new file mode 100644 index 0000000000..bcabed5796 --- /dev/null +++ b/MdeModulePkg/Application/HelloWorld/HelloWorld.c @@ -0,0 +1,32 @@ +/** @file + This simple application just print a "UEFI Hello World!" to the UEFI Console. + + 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. + +**/ + +// +// Include common header file for this module. +// +#include "CommonHeader.h" + +EFI_STATUS +EFIAPI +UefiMain ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable + ) + +{ + + Print ((CHAR16 *)L"UEFI Hello World!\n"); + + return EFI_SUCCESS; +} diff --git a/MdeModulePkg/Application/HelloWorld/HelloWorld.inf b/MdeModulePkg/Application/HelloWorld/HelloWorld.inf new file mode 100644 index 0000000000..e0080663fa --- /dev/null +++ b/MdeModulePkg/Application/HelloWorld/HelloWorld.inf @@ -0,0 +1,96 @@ +#/** @file +# Sample UEFI Application Reference Module +# +# This is a shell application that will display Hello World. +# Copyright (c) 2007 - 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. +# +# +#**/ + +################################################################################ +# +# Defines Section - statements that will be processed to create a Makefile. +# +################################################################################ +[Defines] + INF_VERSION = 0x00010005 + BASE_NAME = HelloWorld + FILE_GUID = 6987936E-ED34-44db-AE97-1FA5E4ED2116 + MODULE_TYPE = UEFI_APPLICATION + VERSION_STRING = 1.0 + EDK_RELEASE_VERSION = 0x00020000 + EFI_SPECIFICATION_VERSION = 0x00020000 + + ENTRY_POINT = UefiMain + +# +# The following information is for reference only and not required by the build tools. +# +# VALID_ARCHITECTURES = IA32 X64 IPF EBC +# + +################################################################################ +# +# Sources Section - list of files that are required for the build to succeed. +# +################################################################################ + +[Sources.common] + HelloWorld.c + CommonHeader.h + + +################################################################################ +# +# Includes Section - list of Include locations that are required for +# this module. +# +################################################################################ + +[Includes] + $(WORKSPACE)/MdePkg\Include/Library + +################################################################################ +# +# Package Dependency Section - list of Package files that are required for +# this module. +# +################################################################################ + +[Packages] + $(WORKSPACE)\MdeModulePkg/MdeModulePkg.dec + $(WORKSPACE)\MdePkg/MdePkg.dec + + +################################################################################ +# +# Library Class Section - list of Library Classes that are required for +# this module. +# +################################################################################ + +[LibraryClasses] + UefiBootServicesTableLib + UefiApplicationEntryPoint + UefiLib + DebugLib + + +################################################################################ +# +# Build Options - list of custom build options for this module. +# +################################################################################ + +[BuildOptions] + *_MYTOOLS_*_CC_FLAGS = /WX- + *_VS2005PRO_*_CC_FLAGS = /WX- + *_WINDDK3790x1830_*_CC_FLAGS = /WX- + *_ICC_*_CC_FLAGS = /WX- -- cgit v1.2.3