AMI bios 最简单的 setup中建立选项

https://blog.csdn.net/u013983194/article/details/79458422

参考文章 感谢博主无私奉献

 

ShellBinPkgNew.sdl

TOKEN
	Name  = "ShellBinPkg_SUPPORT"
	Value  = "1"
	Help  = "Main switch to enable ShellBinPkg support in Project"
	TokenType = Boolean
	TargetEQU = Yes
	TargetMAK = Yes
	Master = Yes
	Token = "Shell_SUPPORT" "=" "0"
End

TOKEN
	Name  = "USE_FULL_SHELL"
	Value  = "1"
	Help  = "Selects whether to use full or minimal shell binary.\Full shell has more commands but larger in size.\"
	TokenType = Boolean
End

TOKEN
	Name  = "BUILT_IN_SHELL_SUPPORT"
	Value  = "1"
	Help  = "This SDL token defines if built-in Shell is supported in the project.\It controls installation of the boot option for a built-in Shell."
	TokenType = Boolean
	TargetMAK = Yes
	TargetH = Yes
End

INFComponent
	Name  = "FullShell"
	File  = "FullShell.inf"
	Package  = "ShellBinPkg"
	Arch  = "X64"
	ModuleTypes  = "UEFI_APPLICATION"
	Token = "USE_FULL_SHELL" "=" "1"
End



PcdMapping
	Name  = "PcdShellFile"
	GuidSpace  = "gEfiIntelFrameworkModulePkgTokenSpaceGuid"
	PcdType  = "PcdsFixedAtBuild"
	Value  = "{ 0x83, 0xA5, 0x04, 0x7C, 0x3E, 0x9E, 0x1C, 0x4F, 0xAD, 0x65, 0xE0, 0x52, 0x68, 0xD0, 0xB4, 0xD1 }"
	Offset  = 00h
	Length  = 00h
	TargetDSC = Yes
End


PATH
    Name  = "HomeWork_DIR"
End

ELINK
    Name  = "$(HomeWork_DIR)/ShellBinPkgNew.sd"
    Parent  = "SETUP_DEFINITIONS"
    Priority  = 9
    InvokeOrder = AfterParent
End
ELINK
    Name  = "$(HomeWork_DIR)/ShellBinPkgNew.uni"
    Parent  = "SetupStringFiles"
    InvokeOrder = AfterParent
End





 

 

 

ShellBinPkgNew.sd

//**********************************************************************
//**********************************************************************
//**                                                                  **
//**        (C)Copyright 1985-2010, American Megatrends, Inc.         **
//**                                                                  **
//**                       All Rights Reserved.                       **
//**                                                                  **
//**      5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093        **
//**                                                                  **
//**                       Phone: (770)-246-8600                      **
//**                                                                  **
//**********************************************************************
//**********************************************************************

//**********************************************************************
// $Header: /Alaska/Tools/template.sd 6     1/13/10 2:13p Felixp $
//
// $Revision: 6 $
//
// $Date: 1/13/10 2:13p $
//**********************************************************************
// Revision History
// ----------------
// $Log: /Alaska/Tools/template.sd $
// 
// 6     1/13/10 2:13p Felixp
// 
//**********************************************************************
//<AMI_FHDR_START>
//
// Name:  <This File's Name>
//
// Description:	
//
//<AMI_FHDR_END>
//**********************************************************************




#ifdef SETUP_DATA_DEFINITION
 UINT8 HomeWorkoption;
#endif
#ifdef ADVANCED_FORM_SET     
   #ifdef FORM_SET_GOTO 
     // Define goto commands for the forms defined in this file    
    grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER; 
        oneof varid = SETUP_DATA.HomeWorkoption,
        prompt=STRING_TOKEN(STR_MODULE_ITEM_PROMPT),
        help=STRING_TOKEN(STR_MODULE_ITEM_HELP),
        option text=STRING_TOKEN(STR_HOMEWORK_VALUE0),value=0,flags=DEFAULT|RESET_REQUIRED;
        option text=STRING_TOKEN(STR_HOMEWORK_VALUE1),value=1,flags=RESET_REQUIRED;
        option text=STRING_TOKEN(STR_HOMEWORK_VALUE2),value=1,flags=RESET_REQUIRED;
        endoneof;
    endif;    
 #endif //FORM_SET_FORM    
#endif //end ADVANCED_FORM_SET


//**********************************************************************
//**********************************************************************
//**                                                                  **
//**        (C)Copyright 1985-2010, American Megatrends, Inc.         **
//**                                                                  **
//**                       All Rights Reserved.                       **
//**                                                                  **
//**      5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093        **
//**                                                                  **
//**                       Phone: (770)-246-8600                      **
//**                                                                  **
//**********************************************************************
//**********************************************************************

 

 

ShellBinPkgNew.uni

//**********************************************************************
//**********************************************************************
//**                                                                  **
//**        (C)Copyright 1985-2010, American Megatrends, Inc.         **
//**                                                                  **
//**                       All Rights Reserved.                       **
//**                                                                  **
//**      5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093        **
//**                                                                  **
//**                       Phone: (770)-246-8600                      **
//**                                                                  **
//**********************************************************************
//**********************************************************************

//**********************************************************************
// $Header: $
//
// $Revision: $
//
// $Date: $
//**********************************************************************
// Revision History
// ----------------
// $Log: $
// 
//**********************************************************************
//<AMI_FHDR_START>
//
// Name:  <This File's Name>
//
// Description:	
//
//<AMI_FHDR_END>
//**********************************************************************
/=#
#include "VFR.uni"

//#string <string name> #language eng ""



#string STR_HOMEWORK_FORM    #language eng      "Devices ID"
#string STR_HOMEWORK_FORM_HELP    #language eng      "it is my homework"
#string STR_MODULE_ITEM_PROMPT    #language eng      "HomeWork module select"
#string STR_MODULE_ITEM_HELP    #language eng      "it is homework select"
#string STR_HOMEWORK_VALUE0        #language eng      "value 1"
#string STR_HOMEWORK_VALUE1      #language eng      "value 2"
#string STR_HOMEWORK_VALUE2     #language eng      "value 3"




//**********************************************************************
//**********************************************************************
//**                                                                  **
//**        (C)Copyright 1985-2010, American Megatrends, Inc.         **
//**                                                                  **
//**                       All Rights Reserved.                       **
//**                                                                  **
//**      5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093        **
//**                                                                  **
//**                       Phone: (770)-246-8600                      **
//**                                                                  **
//**********************************************************************
//**********************************************************************

 

 

ShellBinPkgNew.dec

## @file
# Reference package showing multiple binaries
#
# This package contains multiple binary shell applications that follow UEFI specification. Now there are three binary shell modules, which are for bin (original module), normal shell and full shell.
# Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
#
#    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]
  DEC_SPECIFICATION              = 0x00010005
  PACKAGE_NAME                   = ShellBinPkg
  PACKAGE_GUID                   = 4B34AD9D-1324-41e5-8B1D-359AA7BCA62C
  PACKAGE_VERSION                = 0.5

 

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值