Giter Site home page Giter Site logo

fortunedayssss / uefi-programming Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zhenghuadai/uefi-programming

0.0 2.0 0.0 2.86 MB

Home Page: http://www.biosuefi.com

License: Apache License 2.0

SourcePawn 0.10% C++ 79.96% C 19.74% HTML 0.10% Shell 0.10% Objective-C 0.01%

uefi-programming's Introduction

#uefi原理与编程

QuickStart
勘误

EDK2源代码版本号为13087

  • 下载EDK2源代码
  • 在EDK2根目录下建立uefi目录。
  • 将文件夹book复制到uefi目录。
  • 打开CMD命令行
  • 在命令行切换到EDK2根目录
  • 在命令行执行
    • edksetup.bat --nt32
  • 在命令行执行
    • build -p uefi\book\Nt32Pkg\Nt32Pkg.dsc
    • build -p uefi\book\AppPkg\AppPkg.dsc
  • StdLib\Include\sys\EfiCdefs.h第330行注释掉
  • #ifdef _NATIVE_WCHAR_T_DEFINED
    // #error You must specify /Zc:wchar_t- to the compiler to turn off intrinsic nwchar_t.
    #endif
  • 在命令行执行
    • build -p uefi\book\GUIPkg\GUIPkg.dsc

UDK2014

  • 在EDK2根目录下建立uefi目录。
  • 将文件夹book复制到uefi目录。
  • 打开CMD命令行
  • 在命令行切换到EDK2根目录
  • 在命令行执行
    • edksetup.bat --nt32
  • uefi\book\Nt32Pkg\Nt32Pkg.inc文件添加到Nt32Pkg\Nt32Pkg.dsc末尾
    • type uefi\book\Nt32Pkg\Nt32Pkg.inc >> Nt32Pkg\Nt32Pkg.dsc
  • 在命令行执行
    • build

EDK2源代码版本号为16682

  • 下载EDK2源代码
  • 在EDK2根目录下建立uefi目录。
  • 将文件夹book复制到uefi目录。
  • 打开CMD命令行
  • 在命令行切换到EDK2根目录
  • 在命令行执行
    • edksetup.bat --nt32
  • StdLib\Include\sys\EfiCdefs.h第330行注释掉
  • #ifdef _NATIVE_WCHAR_T_DEFINED
    // #error You must specify /Zc:wchar_t- to the compiler to turn off intrinsic nwchar_t.
    #endif
  • 编译Nt32Pkg
    • uefi\book\Nt32Pkg\Nt32Pkg-2.4.inc文件添加到Nt32Pkg\Nt32Pkg.dsc末尾
      • type uefi\book\Nt32Pkg\Nt32Pkg-2.4.inc >> Nt32Pkg\Nt32Pkg.dsc
    • 在命令行执行
      • build -p Nt32Pkg\Nt32Pkg.dsc
  • 编译AppPkg
    • uefi\book\AppPkg\AppPkg-2.4.inc文件添加到AppPkg\AppPkg.dsc末尾
      • type uefi\book\AppPkg\AppPkg-2.4.inc >> AppPkg\AppPkg.dsc
      • build -p AppPkg\AppPkg.dsc

第7页 (2)SEC阶段执行流程
原文 :2)从实模式转换到32位平坦模式(包含模式)
修订 :2)从实模式转换到保护模式、32位平坦内存模型

 

第15页 2.1.1安装所需开发工具

原文 : 3)安装IASL编译器(https://www.acpica.org/downloads/binary_tools
4)IASL用于编译.asl文件。.asl是高级配置与电源接口(Advanced Configuration and Power Interface)源文件。
修订 : 3)安装IASL编译器(https://www.acpica.org/downloads/binary_tools
    IASL用于编译.asl文件。.asl是高级配置与电源接口(Advanced Configuration and Power Interface)源文件。
4)安装NASM编译器(www.nasm.us


第15页,2.1.2 配置EDK2 开发环境
原文 :C:\> EDK2Edksetup.bat
修订 :C:\EDK2> Edksetup.bat

 

第35页 5.[Protocol]块 (1)语法
原文 :[LibraryClasses]
修订 :[Protocols]

 

第35页 5.[Protocol]块 (2)示例
原文 :工程文件的[LibraryClasses]
[LibraryClasses]
修订 :工程文件的[Protocols]
[Protocols]

 

第89页 [示例 5-5] 分配指定地址处的3个页面
原文 :Status = gBS->(AllocateAddress, EfiBootServicesData, 3, &pages);
修订 :Status = gBS->AllocatePages(AllocateAddress, EfiBootServicesData, 3, &pages);

 

第115页 6.3.1提升和恢复任务优先级
原文 :RaiseTPL和RestoreTPL必须成对出现,执行了RaiseTPL后,必须尽快调用RaiseTPL将任务优先级恢复到原来的值
修订 :RaiseTPL和RestoreTPL必须成对出现,执行了RaiseTPL后,必须尽快调用ResoreTPL将任务优先级恢复到原来的值

 

第129页 7.1GPT硬盘
原文 :20世纪90年代末,英特尔(Inter)公司开发了
修订 :20世纪90年代末,英特尔(Intel)公司开发了

 

第221页,6)执行如下命令播放视频
原文 :fs0:> testc.efi piano 2.wav
修订 :fs0:> testc.efi piano.wav

  

第278页
原文 :Print(L"字体加载成功");
修订 :Print(L"字体卸载成功");

 

第278页
原文 :Print(L"Failed to load font: %r\n", Status);//字体注册失败
修订 :Print(L"Failed to unload font: %r\n", Status);//字体卸载失败

 

------------------------

感谢

感谢robin.xu

感谢kurtqiao

感谢Max

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.