Skip to content

Latest commit

 

History

History
1090 lines (834 loc) · 42.6 KB

PITCHME.md

File metadata and controls

1090 lines (834 loc) · 42.6 KB

---?image=assets/images/gitpitch-audience.jpg @title[Platform Build Win Lab]




UEFI & EDK II Training

Platform Build for UP Squared Linux Lab


tianocore.org Note: PITCHME.md for UEFI / EDK II Training Platform Build Lab UP2 Linux

Copyright (c) 2019, Intel Corporation. All rights reserved.

Redistribution and use in source (original document form) and 'compiled' forms (converted to PDF, epub, HTML and other formats) with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code (original document form) must retain the above copyright notice, this list of conditions and the following disclaimer as the first lines of this file unmodified.

  2. Redistributions in compiled form (transformed to other DTDs, converted to PDF, epub, HTML and other formats) must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS DOCUMENTATION IS PROVIDED BY TIANOCORE PROJECT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL TIANOCORE PROJECT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


@title[Lesson Objective]

<p align="center"Platform Build Labs



@fa[certificate gp-bullet-cyan]  Hardware Setup for UP Squared

@fa[certificate gp-bullet-yellow]  Build a EDK II Platform using UP Squared

---?image=assets/images/binary-strings-black2.jpg @title[Setup UP2 HW Section]




     Platform HW Setup

         Setup hardware for the Broxton - UP Squared

---?image=/assets/images/slides/Slide4.JPG @title[UP2 HW]

EDK II Platform (UP Squared)

@snap[south-west span-45 ]

Intel® Celerontm processor N3350 Series
(Formerly Apollo Lake)

@snapend

@snap[south-east span-45 ]

Available from Aaeon
order at: here

@snapend

Note:

This lab shows the build process for an actual platform – UP Squared https://www.google.com/imgres?imgurl=https%3A%2F%2Fksr-ugc.imgix.net%2Fassets%2F014%2F192%2F390%2Fb48b13570b839fdb254d046a4e5fe703_original.png%3Fixlib%3Drb-1.1.0%26crop%3Dfaces%26w%3D1552%26h%3D873%26fit%3Dcrop%26v%3D1479219233%26auto%3Dformat%26frame%3D1%26q%3D92%26s%3Dd8c8e37c0ed5f65b97557dd77e441059&imgrefurl=https%3A%2F%2Fwww.kickstarter.com%2Fprojects%2F802007522%2Fup-squared-the-first-maker-board-with-intel-apollo&docid=hdDbuF0mF4AVzM&tbnid=rQVd58-OYexfgM%3A&vet=10ahUKEwjb-uLy_JDgAhUKsFQKHUnbC7wQMwhCKAIwAg..i&w=1552&h=873&bih=851&biw=1378&q=up%20squared&ved=0ahUKEwjb-uLy_JDgAhUKsFQKHUnbC7wQMwhCKAIwAg&iact=mrc&uact=8

Using Tianocore source Open source EDK II plus open source binary obj. packages

This lab shows the build process for an actual platform – UP Squared

  • Using Tianocore source
  • Open source EDK II plus open source binary obj. packages

---?image=/assets/images/slides/Slide5.JPG @title[Workshop Lab Hardware]

UP Squared Workshop Lab Hardware

@snap[south span-100 ]

 **Warning do not use any other power supply than 5V or the board will Fry  


@snapend Note:

**Warning do not use any other power supply than 5V or the board will Fry

---?image=/assets/images/slides/Slide6.JPG @title[Install Ubuntu “Screen”]

Install Ubuntu “Screen”

@snap[north-west span-100 ]

Terminal prompt (Cnt-Alt-T)
Install "Screen"

   bash$ sudo apt-get install screen   
   bash$ cd $Home   
   bash$ gedit ~.screenrc   


Inside the editor, type
@size[.8em]("`shell /bin/bash`")   then save


@snapend

@snap[north-east span-45 ]

While in screen
Cnt-A then D goes back to Terminal

@size[.9em](`bash$ screen -r`)
(Returns to screen)


@snapend

@snap[south-east span-80 ]

There may be other serial terminal applications that are supported.

@snapend

Note:

  • Terminal prompt (Cnt-Alt-T)
    bash$ sudo apt-get install screen
    bash$ cd $Home
    bash$ gedit ~.screenrc

shell /bin/bash

Click Save

---?image=/assets/images/slides/Slide7.JPG @title[Setup UP2 Test System]

@size[1.1em](Setup UP Squared Test System)

@snap[north-west span-60 ]

Hardware:

  • - System Under Test (SUT) - UP Squared
  • - FTDI USB to 3.3V TTL Cable (6 pin)
  • - USB / EP-CBUSB10PFL01 (3 pin & 10 pin)
  • - 5V 6 amp power supply
  • - 3 jumper wires (black, red, white)

Connect the USB 10 pin header to SUT

Connect the FTDI USB w/ 6 pin to 3 pin connector using jumper wires

Connect the FTDI USB Type A connector to Host (Laptop)

@snapend

Note:

  • Hardware:

    • System Under Test (SUT) – UP Squared
    • USB to 3.3V TTL Cable (6 pin to USB Type A)
    • 5V power supply
  • Connect the USB w/ 6 pin header to SUT 3 pin connected to (UP Squared) via 10 Pin connected using jumper wires (black, red, white)

  • Connect the USB Type A connector to Host (Laptop)

---?image=/assets/images/slides/Slide8.JPG @title[UP Squared Test System 02]

Setup UP Squared Test System

@snap[north-west span-100 ]

Open Terminal prompt (Cnt-Alt-T)

   bash$ dmesg   
   bash$ sudo chmod 666 /dev/ttyUSB@color[cyan](n)   


@snapend

@snap[north-east span-55 ]



(to check which USB port is assigned)
(where @color[cyan](n) is the FTDI number )   


@snapend

Note:

  • Open Terminal Prompt (Cnt-Alt-T)
bash$ dmesg                     	#(to check which USB port is assigned)
bash$ sudo chmod 666 /dev/ttyUSBn	#(where n is the FTDI number)
  • dmesg command shows which - ttyUSBn

---?image=/assets/images/slides/Slide9.JPG @title[Power on UP Squared]

@size[1.1em](Power on UP Squared)

@snap[north-west span-100 ]

Connect the Power supply cable to the UP Squared
   bash$ screen /dev/ttyUSB@color[cyan](n) 115200   
UP Squared should boot to the UEFI Shell in the Terminal – Screen


@snapend

@snap[north-east span-25 ]







@color[yellow](While in Screen
Cnt-A then D goes back to terminal.)

   bash$ screen-r   
(returns to Screen)   


@snapend

Note:

  • Connect the Power supply cable to the UP Squared
bash$ screen /dev/ttyUSBn 115200
  • UP Squared should boot to the UEFI Shell in the Terminal – Screen .

  • While in screen Cnt-A then D goes back to terminal

 bash$ screen –r #(returns to screen)
  • Note: Cnt-H for Backspace

**Warning do not use any other power supply than 5V or the board will Fry

---?image=assets/images/gitpitch-audience.jpg @title[End of Section]




     End of Lab

          @fa[chevron-right gp-bullet-cyan]   to continue

---?image=assets/images/binary-strings-black2.jpg @title[Lab 3 -Build Up Squared Section]




     Build UP Squared

         

---?image=/assets/images/slides/Slide12.JPG @title[Up Squared HW]

EDK II Platform (UP Squared)

@snap[south-west span-45 ]

Intel® Celerontm processor N3350 Series
(Formerly Apollo Lake)

@snapend

@snap[south-east span-45 ]

Available from Aaeon
order at: here

@snapend

Note:

https://www.google.com/imgres?imgurl=https%3A%2F%2Fksr-ugc.imgix.net%2Fassets%2F014%2F192%2F390%2Fb48b13570b839fdb254d046a4e5fe703_original.png%3Fixlib%3Drb-1.1.0%26crop%3Dfaces%26w%3D1552%26h%3D873%26fit%3Dcrop%26v%3D1479219233%26auto%3Dformat%26frame%3D1%26q%3D92%26s%3Dd8c8e37c0ed5f65b97557dd77e441059&imgrefurl=https%3A%2F%2Fwww.kickstarter.com%2Fprojects%2F802007522%2Fup-squared-the-first-maker-board-with-intel-apollo&docid=hdDbuF0mF4AVzM&tbnid=rQVd58-OYexfgM%3A&vet=10ahUKEwjb-uLy_JDgAhUKsFQKHUnbC7wQMwhCKAIwAg..i&w=1552&h=873&bih=851&biw=1378&q=up%20squared&ved=0ahUKEwjb-uLy_JDgAhUKsFQKHUnbC7wQMwhCKAIwAg&iact=mrc&uact=8

  • Intel® Celerontm processor N3350 Series (Formerly Apollo Lake)

---?image=/assets/images/slides/Slide13.JPG @title[UP Squared Platform Open Source]

Where to get Open Source
UP Squared


- Open Source UP2 Wiki - V .71 - Github Link - Binary Object Modules:
firmware.intel.com
- How to Build Release Notes

Note:

  • Step by step if NOT downloading Lab release of UP Squared

---?image=/assets/images/slides/Slide14.JPG @title[UP Squared Platform Bin Obj]

Where to get Open Source
UP Squared


- Open Source UP2 Wiki - V .71 - Github Link - Binary Object Modules:
firmware.intel.com
- How to Build Release Notes

Note:

  • Step by step if NOT downloading Lab release of UP Squared

@title[Download UP Squared Lab Source]

@size[1.1](Download UP Squared Lab Source)

Download the PlatformBuildLab_UP2_FW.zip from :
@fa[github gp-bullet-white] github.com PlatformBuildLab_UP2_FW.zip

OR
Use git clone to download the PlatformBuildLab_UP2_FW

$ git clone https://github.com/tianocore-training/PlatformBuildLab_UP2_FW.git

Directory PlatformBuildLab_UP2_FW will be created

   FW 
    - PlatformBuildLab
	   - MV3                    - UP Squared Source for the Labs
	   - BaseToolsUDK.tar.gz    - BaseTools for Linux GCC5 build
	   - FirmwareUpdateX64.efi  - UEFI App to flash Firmware .BIN to Target
	   . . .

Note:

---?image=/assets/images/slides/Slide16.JPG @title[UP Squared Lab Setup]

UP Squared Lab Setup

@snap[north-west span-100 ]


@color[#87E2A9](Previous Lab Setup Requirements)
  bash$ sudo apt-get install build-essential uuid-dev iasl git gcc-5 nasm  
@color[#87E2A9](Additional Lab Setup -)
    @color[#87E2A9]( `PlatformLab_FW/FW/PlatformBuildLab`)

@snapend

@snap[south-west span-100 ]

Directories:
   •MV3
   •BuildToolsUDK.tar.gz

   At the Terminal prompt - install Screen utility for Serial Console to run UEFI Shell
      bash$ sudo apt-get screen            


@snapend

@snap[south-east span-70 ]


   ‐  UP Squared Project source code
   ‐  Build tools for GCC compiler

     
       


@snapend

Note:

  • Previous Lab Setup Requirements
bash$ sudo apt-get install build-essential uuid-dev iasl git gcc-5 nasm 

Additional Lab Setup – ~src/FW/PlatformBuildLab

  • MV3 – UP Squared Project source code
  • BuildToolsUDK.tar.gz – build tools for GCC compiler
  • At Terminal prompt - Install Screen utility for Serial Console to run UEFI Shell
bash$ sudo apt-get install screen

---?image=/assets/images/slides/Slide17.JPG @title[Get the UP Squared Source]

Copy UP Squared Source

@snap[north-west span-100 ]


Open a terminal prompt(Alt-Cnt-T)
Create a working space source directory under the home directory
   bash$ mkdir ~src     
From the `FW/PlatformBuildLab` folder, copy and paste folder "`~FW/MV3`" to `~src`

@snapend Note:

  • Open a terminal prompt (Alt-Cnt-T)
  • Create a working space source directory under the home directory
    • bash$ mkdir ~src
  • From the FW/PlatformBuildLab folder, copy and paste folder “~FW/MV3” to ~src

---?image=/assets/images/slides/Slide18.JPG @title[Get the BaseTools]

Get the `BaseTools` for UP Squared

@snap[north-west span-100 ]

Rename or mv the directory @size[.8em]("`~src/MV3/edk2/BaseTools`")
   bash$ cd ~src/MV3/edk2     
   bash$ mv BaseTools BaseToolsX   
   bash$ tar -xf BaseToolsUDK.tar.xz   

Extract the file @size[.8em](`~FW/PlatformBuildLab/BaseToolsUDK.tar.gz`) to @size[.8em](`~src/MV3/edk2`)

@snapend

Note:

  • Extract the Rename or mv the directory “~src/MV3/edk2/BaseTools”
 bash$ cd ~src/MV3/edk2<Br>
 bash$ mv BaseTools BaseTools
  • Extract the file ~FW/PlatformBuildLab/BaseToolsMax.tar.gz to ~src/MV3/edk2
    • bash$ tar -xf BaseToolsUDK.tar.xz

@title[Platform Source Directory Structure]

Platform Source Directory Structure

 ~src/MV3 (Work Space Dir)

	/edk2
		/(UDK2018 Directories)
		/BaseTools (from BaseToolsUDK.tar.gz)

	/edk2-platforms  

		/Platform

			/BroxtonPlatformPkg 
				(Platform Dirs)
				PlatformPkg.dec
				PlatformPkg.fdf
				PlatformPkgnn.dsc
		/Silicon

			/BroxtonSoC
				/BroxtonFspPkg
				/BroxtonSiPkg

@snap[north-east span-75 fragment]






 

@size[1.1em](←——————)Invoke the build script from here
                              @size[.7em](@color[#87E2A9](`BuildBIOS`) script)

@snapend

@snap[north-east span-65 fragment]









@size[1.1em](←——)Project platform directory
             @size[.7em]((includes platform build scripts)
             @size[.7em](@color[#87E2A9](`BuildIFWI`) that then calls   →  @color[#87E2A9](`BuildBxtBios`))
             @size[.7em]( - Called from @color[#87E2A9](`BuildBIOS`) above ))

@snapend

Note:

  • Platform Source Directory Structure
    • Build from /edk2-platform directory
    • Project platform directory is: BroxtonPlatformPkg

@title[Steps to Build & Install Firmware]

Steps to Build & Install Firmware

  • @size[1.125em]( ❶)  Open Terminal prompt & Cd to
           @size[.7em]( `$HOME/src/MV3/edk2-platforms`)
  • @size[1.125em]( ❷)  Fix-up "chmod" bin executable files
  • @size[1.125em]( ❸)  Invoke the build process script, `BuildBIOS`
  • @size[1.125em]( ❹)  Locate build output (.BIN file for BIOS image)
  • @size[1.125em]( ❺)  Flash binary image onto the platform
  • @size[1.125em]( ❻)  Reset and verify new firmware


Next slides will follow the above steps

Note:

Slide says it all

@title[fix-up shell properties ]

@size[1.1](Fix-up Script Properties to Execute)

@size[1.25em]( ❶)  Open Terminal prompt (Cnt-Alt-T) &
        Cd to work space directory
@size[1.25em]( ❷)  Fix Binary tools to "execute" with `chmod +x`


 
 bash$ cd ~src/src/MV3/edk2-platforms/BroxtonPlatformPkg/Common/Tools

 
 bash$ chmod +x GenBiosID/GenBIosId
 
 bash$ chmod +x FCE/FCE

 bash$ chmod +x FCE/BfmLib

Note: Slide says it all


@title[Platform Build Scripts]

@size[1.1em](Platform Build Scripts)

@box[bg-purple-pp text-white rounded my-box-pad2 ](

Platform Build Scripts
 

)

Many Platforms have a bash or bat script file to pre or post process the EDK II build process

For UP Squared Broxton Platform : @color[#87E2A9](`BuildBIOS.bat`) or @color[#87E2A9](`BuildBIOS.sh`) calls:

  @color[#87E2A9](`BuildIFWI`) from the platform package directory
       `.. Platform/BroxtonPlatformPkg`
   – pre build processing
   – calls @color[#87E2A9](`BuildBxtBios`) - a platform script to preform the EDK II `build`
   – determines date
   – board ID
   – post build stitching

Note:

For the platform edk II builds usually a script is called that will do pre and post build processing.

There is also this capability that is part of the .dsc but many developers have not taken advantage of this feature

---?image=/assets/images/slides/Slide23.JPG @title[Build Process for DEBUG]

Build Process for DEBUG BIOS

@snap[north-west span-20 ]



@size[1.125em]( ❸) @snapend

@snap[north-east span-95 ]

From Terminal Prompt enter:   Note: the Build will Pause

```
   bash$ cd ~/src/MV3/edk2-platforms
bash$ . BuildBIOS.sh /UP /A Broxton Debug
</pre>
@snapend



Note:

Press Enter to continue.
Also notice the BUILD DEFINE Statements from the file:  DefineAtBuildMacros.dsc



---
@title[Examine Command Line & Build Parameters]
<p align="right"><span class="gold" >@size[1.1em](<b>Examine Build Parameters</b>)</span></p>

@snap[north-west span-100 ]
<br>
<br>
@box[bg-black text-yellow rounded my-box-pad2  ](<p style="line-height:60%" align="left"><span style="font-size:0.65em; font-family:Consolas; " >&nbsp;&nbsp;build<br><br><br>&nbsp;&nbsp;</span></p>)
@snapend


@snap[north-east span-85  fragment]
<br>
<br>
<p style="line-height:60%" align="left"><span style="font-size:0.60em; font-family:Consolas; " >
<font color="#75deFF">&nbsp;&nbsp;  -D LOGGING=TRUE&nbsp;&nbsp; -D UP2_BOARD=TRUE<br>
 . . . -D <i> Option &lpar;n&rpar;</i> </font>
</span></p>
@snapend


@snap[north-east span-30  fragment]
<br>
<br>
<p style="line-height:40%" align="left"><span style="font-size:0.8em"><br></span></p>
@box[bg-white text-black rounded my-box-pad2  ](<p style="line-height:70%" align="left"><span style="font-size:0.8em"><font color="blue"><b>&nbsp;&nbsp;MACROS</font><br>&nbsp;&nbsp;Logging<br>&nbsp;&nbsp;UP<sup>2</sup> Board<br>&nbsp;&nbsp;</b></span></p>)
@snapend


@snap[north-west span-100 fragment ]
<br>
<br>
<br>
<br>
<p style="line-height:60%" align="left"><span style="font-size:0.8em"><font color="#87E2A9"><br><br><b>Properties from `Conf\Target.txt`</b></font></span></p>
<table id="recTable">
	<tr class="fragment">
		<td align="left" bgcolor="#404040" height=".0025"><p style="line-height:010%"><span style="font-size:0.460em; font-family:Consolas; " ><b>TARGET</b></span></p></td>
		<td align="left" bgcolor="#404040" height=".0025"><p style="line-height:010%"><span style="font-size:0.460em; font-family:Consolas; " ><b>= @color[yellow](DEBUG)</b></span></p></td>
		<td align="left" bgcolor="#0070C0" height=".0025"><p style="line-height:010%"><span style="font-size:0.6em" ><b>Build Mode</b></span></p></td>
	</tr>
	<tr class="fragment">
		<td align="left" bgcolor="#404040" height=".0025"><p style="line-height:010%"><span style="font-size:0.460em; font-family:Consolas; " ><b>TARGET_ARCH</b></span></p></td>
		<td align="left" bgcolor="#404040" height=".0025"><p style="line-height:010%"><span style="font-size:0.460em; font-family:Consolas; " ><b>= @color[yellow](IA32 X64)</b></span></p></td>
		<td align="left" bgcolor="#0070C0" height=".0025"><p style="line-height:010%"><span style="font-size:0.6em" ><b>CPU Architecture</b></span></p></td>
	</tr>
	<tr class="fragment">
		<td align="left" bgcolor="#404040" height=".0025"><p style="line-height:010%"><span style="font-size:0.460em; font-family:Consolas; " ><b>TOOL_CHAIN_TAG</b></span></p></td>
		<td align="left" bgcolor="#404040" height=".0025"><p style="line-height:010%"><span style="font-size:0.460em; font-family:Consolas; " ><b>= @color[yellow](GCC5)</b></span></p></td>
		<td align="left" bgcolor="#0070C0" height=".0025"><p style="line-height:010%"><span style="font-size:0.6em" ><b>VS Tool Chain</b></span></p></td>
	</tr>
	<tr class="fragment">
		<td align="left" bgcolor="#404040" height=".0025"><p style="line-height:010%"><span style="font-size:0.460em; font-family:Consolas; " ><b>ACTIVE_PLATFORM</b></span></p></td>
		<td align="left" bgcolor="#404040" height=".0025"><p style="line-height:040%"><span style="font-size:0.460em; font-family:Consolas; " ><b>= @color[yellow](BroxtonPlatformPkg /PlatformPkgX64)</b></span></p></td>
		<td align="left" bgcolor="#0070C0" height=".0025"><p style="line-height:010%"><span style="font-size:0.6em" ><b>Platform DSC file</b></span></p></td>
	</tr>
	<tr class="fragment">
		<td align="left" bgcolor="#404040" height=".0025"><p style="line-height:040%"><span style="font-size:0.460em; font-family:Consolas; " ><b>MAX&lowbar;CONCURRENT&lowbar; THREAD_NUMBER</b></span></p></td>
		<td align="left" bgcolor="#404040" height=".0025"><p style="line-height:010%"><span style="font-size:0.460em; font-family:Consolas; " ><b>= @color[yellow](1)</b></span></p></td>
		<td align="left" bgcolor="#0070C0" height=".0025" width="35%"><p style="line-height:010%"><span style="font-size:0.6em" ><b>Thread Count</b></span></p></td>
	</tr>
</table>


@snapend

---
@title[Examine Platform Parameters UP Squared Specific]
<p align="right"><span class="gold" >@size[1.1em](<b>Platform Build and PCD Parameters</b>)</span></p>

@box[bg-purple-pp text-white rounded my-box-pad2  ](<p style="line-height:70%" align="center"><span style="font-size:0.8em">Platform Parameters<br>&nbsp; </span></p>)
<p style="line-height:80%"><span style="font-size:0.8em">Many Platform Parameters are defined in  a top .DSC file that controls  PCD and build switches</span></p>

<p style="line-height:70%"><span style="font-size:0.7em">For UP Squared : </span></p>
  <ul style="list-style-type:none; line-height:0.7;">
    <li><span style="font-size:0.7em">@color[yellow]( Build Switches )&lpar;<i>dynamic</i>&rpar; </span></li>
	<ul style="list-style-type:none; line-height:0.7;">
		<li><span style="font-size:0.6em">`DefineAtBuildMacros.dsc ` - Updated from `BuildBIOS` command line</span></li>
		<li><span style="font-size:0.6em"> `PlatformDsc/BuildOptionsEDKII.dsc ` - Like PCDs on command line</span></li>
	</ul>	
    <li><span style="font-size:0.7em">@color[yellow](EDK II feature Options)  </span></li>
 	<ul style="list-style-type:none; line-height:0.7;">
		<li><span style="font-size:0.6em">`PlatformDsc/Defines.dsc ` - Manually update before build command line</span></li>
	</ul>	

  </ul>


Note:

many will have "ifdef" statements in the major .dsc file in order to enable a feature or not


---?image=/assets/images/slides/Slide26.JPG
@title[Build Process for Release]
### <p align="right"><span class="gold" >Build Process for Release</span></p>
@snap[north-west span-20  ]
<br>
<br>
<br>
@size[1.125em](<font color="yellow"> &#10104;</font>)
@snapend

@snap[north-east span-95  ]
<br>
<br>
<p align="left"><span style="font-size:0.85em">From Terminal Prompt enter:  &nbsp;&nbsp;</span></p>
<pre class='bash'>

bash$ . BuildBIOS.sh /UP /A Broxton Release

</pre>
@snapend




@snap[north-east span-30  fragment]
<br>
<br>
<br>
<br>
<p style="line-height:40%" align="left"><span style="font-size:0.8em"><br></span></p>
@box[bg-white text-black rounded my-box-pad2  ](<p style="line-height:70%" align="left"><span style="font-size:0.8em"><font color="blue"><b>&nbsp;&nbsp;Note MACRO</font><br>&nbsp;&nbsp;Logging<br>&nbsp;&nbsp;<font color="blue">Set to FALSE</font><br>&nbsp;&nbsp;</b></span></p>)
@snapend



Note:
From  Terminal Prompt enter:

$ cd edk2-Platforms $ BuildBIOS.sh /UP /A Broxton Release


---
@title[DEBUG & RELEASE Differences]
### <p align="right"><span class="gold" >DEBUG & RELEASE Differences</span></p>

@box[bg-purple-pp text-white rounded my-box-pad2 fragment](<p style="line-height:70%"><span style="font-size:0.9em" >Slower boot because the time it takes to display debug info <br>&nbsp; </span></p>)
@box[bg-green-pp text-white rounded my-box-pad2 fragment](<p style="line-height:70%"><span style="font-size:0.9em" >Larger image because of debug code & embedded info<br>&nbsp;  </span></p>)
@box[bg-gold2 text-white rounded my-box-pad2  fragment](<p style="line-height:70%"><span style="font-size:0.9em" >Uses the serial port for debug string output<br>&nbsp; </span></p>)
@box[bg-royal text-white rounded my-box-pad2  fragment](<p style="line-height:80%"><span style="font-size:0.9em" >Contains detailed debug strings that show the<br> boot progress and various `ASSERT` / `TRACE` errors<br>&nbsp; </span></p>)

 
Note:

### DEBUG build …
- Contains detailed debug strings that show the boot process, along with various ASSERT/TRACE errors
- Uses the serial port for debug string output
- Larger image than RELEASE, due to the embedded debug info
- Slower boot than RELEASE, due to the time it takes to display the debug info


### RELEASE build …
- Does not contain the debug strings
- Does not use the serial port for debug output
- Smaller image than DEBUG
- Faster boot than DEBUG

---?image=/assets/images/slides/Slide28.JPG
@title[Build Process Completed]
### <p align="right"><span class="gold" >Build Process Completed</span></p>
<span style="font-size:0.9em" >@size[1.25em](<font color="yellow"> &#10105;</font>)&nbsp;&nbsp;Locate the build .BIN image</span>

@snap[south-west span-100  ]
<p style="line-height:70%" align="left"><span style="font-size:0.7em" >
The platform build script post build process will stitch the multiple firmware volumes generated by the EDK II build process into the final <b> .BIN</b> image.
</span></p>
@snapend

Note:
- The EDK II build generates multiple firmware volumes, which are combined in the .BIN image
- typically the platform script will call a stitching process to combine all the images together in  post processing after the EDK II build

---
@title[Flash onto the UP Squared]
### <p align="right"><span class="gold" >Flashing the New BIOS</span></p>
@snap[north-west span-100  ]
<br>
<br>
<span style="font-size:0.9em" >@size[1.25em](<font color="yellow"> &#10106;</font>)&nbsp;&nbsp;Flash the binary image</span>
@snapend


<br>
1.  <span style="font-size:0.85em" >&nbsp;&nbsp;Access UP Squared Binary image file from build folder</span>
  - <span style="font-size:0.5em" >`~src/MV3/edk2-platforms\Platform\BroxtonPlatformPkg\Common\Tools\Stitch`</span>
  - <span style="font-size:0.65em" >DEBUG 	UPBORA.X64_D_0071_01_GCC.bin</span>
  - <span style="font-size:0.65em" >RELEASE	UPBORA.X64_R_0071_01_GCC.bin</span>
2. <span style="font-size:0.85em" >&nbsp;&nbsp;Copy BIN files to a USB Thumb drive</span>
3. <span style="font-size:0.85em" >&nbsp;&nbsp;Copy </span><span style="font-size:0.65em" >`FirmwareUpdateX64.efi`</span><span style="font-size:0.85em" > to a USB thumb &nbsp;&nbsp;drive from @size[.65em](`.../FW/PlatformBuildLab`)</span>
4. <span style="font-size:0.85em" >&nbsp;&nbsp;Reset the UP Squared board and be prepared to type "F2" to enter System Setup</span>

Note:
1.  Access UP2 Binary image file from build folder
  - C:\FW\MV3\edk2-platforms\Platform\BroxtonPlatformPkg\Common\Tools\Stitch
  - DEBUG 	   UPBOARDA.X64.0071.D01._date_.bin
  - RELEASE	UPBOARDA.X64.0071.R01._date_.bin

2. Copy BIN files to a USB Thumb drive
3. Copy FirmwareUpdateX64.efi to a USB thumb drive from $.../FW/PlatformBuildLab
4. Reset the UP Squared board and be prepared to type “F2” to enter System Setup 

---?image=/assets/images/slides/Slide30.JPG
@title[Flash onto the UP Squared 02]
### <p align="right"><span class="gold" >Flashing the New BIOS</span></p>
<span style="font-size:0.75em" >5. &nbsp;&nbsp;Set "`BIOS Lock`" to "`Disable`" in the Setup by the following:</span>
<ul style="list-style-type:disc; line-height:0.6;">
  <li> <span style="font-size:0.6em" >Inside Setup go to "`Device Manager`"  &rarr;   "`System Setup`" &rarr; "`South Cluster Configuration`" &rarr;  "`Miscellaneous Configuration`"  </span></li>
  <li> <span style="font-size:0.6em" >Open "`BIOS Lock`" and select "`Disable`"  </span></li>
  <li> <span style="font-size:0.6em" >Press "`F10`"  to save and then reboot</span></li>
</ul>


Note:

the platform setup is reached by typing F2 on a reboot


---?image=/assets/images/slides/Slide31.JPG
@title[Flash onto the UP Squared  03]
### <p align="right"><span class="gold" >Flashing the New BIOS</span></p>

<p style="line-height:80%"><span style="font-size:0.85em" >6.&nbsp;&nbsp;Boot into the UEFI Shell  then  type "FS0:"&nbsp;<br>7.&nbsp;&nbsp;Run update `.efi` utility with either BIN file </span> <span style="font-size:0.6em" >&lpar;<i>Note</i> the “TAB” Key <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;will fill out the command line for you &rpar;</span></p>

```bash
  FS0:\> FirmwareUpdateX64.efi UPBORA.X64_R_0071_01_GCC.bin
 

Wait for the new firmware update to finish






  Reset and boot new firmware

Note:

6, Boot into the UEFI Shell then type “FS0:” 7, Run update .efi utility with either BIN file
(Note the “TAB” Key will fill out the command line for you )

FS0:\> FirmwareUpdateX64.efi UPBORA.X64_R_0071_01_GCC.bin
 

Reset and boot new firmware

---?image=/assets/images/slides/Slide32.JPG @title[Verify after Firmware Update]

Verify after Firmware Update

@snap[north-west span-100 ]

@size[1.25em]( ❻)  Reboot and Verify @snapend


- Verify that the Firmware was updated by checking the Date - Go into setup by pressing "F2" after reboot - The EDK II front page will show the BIOS ID with Date/time stamp

Note:

  • Verify that the Firmware was updated by checking the Date
  • Go into setup by pressing “F2” after reboot
  • The EDK II front page will show the BIOS ID with Date/time stamp

@title[Summary]

<p align="center"Summary


@fa[certificate gp-bullet-cyan]  Hardware Setup for UP Squared

@fa[certificate gp-bullet-yellow]  Build a EDK II Platform using UP Squared

---?image=assets/images/gitpitch-audience.jpg @title[Questions]
![Questions](/assets/images/questions.JPG =10x)

---?image=assets/images/gitpitch-audience.jpg @title[Logo Slide]


![Logo Slide](/assets/images/TianocoreLogo.png =10x)


@title[Acknowledgements]

Acknowledgements

/**
Redistribution and use in source (original document form) and 'compiled' forms (converted
to PDF, epub, HTML and other formats) with or without modification, are permitted provided
that the following conditions are met:

Redistributions of source code (original document form) must retain the above copyright 
notice, this list of conditions and the following disclaimer as the first lines of this 
file unmodified.

Redistributions in compiled form (transformed to other DTDs, converted to PDF, epub, HTML
and other formats) must reproduce the above copyright notice, this list of conditions and 
the following disclaimer in the documentation and/or other materials provided with the 
distribution.

THIS DOCUMENTATION IS PROVIDED BY TIANOCORE PROJECT "AS IS" AND ANY EXPRESS OR IMPLIED 
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL TIANOCORE PROJECT BE 
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
ARISING IN ANY WAY OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY 
OF SUCH DAMAGE.

Copyright (c) 2019, Intel Corporation. All rights reserved.
**/

---?image=assets/images/binary-strings-black2.jpg @title[Backup Section]




     Back up

         


@title[Build Errors]



<p align="center"Build Errors



@title[Build Error- RC.exe ]

Build Error- RC.exe

Because RC.Exe is not found, Error Message:

   "c:\Program Files (x86)\Windows Kits\8.0\bin\x64\rc.exe" 
/Foc:\edkii.svn\Build\NT32IA32\DEBUG_VS2013x86\IA32\MdeModulePkg\Application\HelloWorld\HelloWorld\OUTPUT
\HelloWorldhii.lib 
c:\edkii.svn\Build\NT32IA32\DEBUG_VS2013x86\IA32\MdeModulePkg\Application\HelloWorld\HelloWorld\OUTPUT\He
lloWorldhii.rc
'c:\Program' is not recognized as an internal or external command,
operable program or batch file.
 
NMAKE : fatal error U1077: '"c:\Program Files (x86)\Windows Kits\8.0\bin\x64\rc.exe' : return code '0x1'
Stop.

Find where the RC.EXE is located on your VS Installation:

Example (VS 2013): The RC.exe is located on this machine:
`C:\Program Files (x86)\Windows Kits\8.1\bin\x64`

Edit `Conf/tools_def.txt`

Note:

+++ @title[Build Error- RC.exe 02]

Build Error- RC.exe Cont...

Edit Conf/tools_def.txt

Search for your installation of Visual Studio (2013 or 2015)

Update according to the path for where the RC.EXE is found

# Microsoft Visual Studio 2013 Professional Edition
DEFINE WINSDK8_BIN       = c:\Program Files\Windows Kits\8.1\bin\x86\
DEFINE WINSDK8x86_BIN    = c:\Program Files (x86)\Windows Kits\8.1\bin\x64
 
# Microsoft Visual Studio 2015 Professional Edition
DEFINE WINSDK81_BIN       = c:\Program Files\Windows Kits\8.1\bin\x86\
DEFINE WINSDK81x86_BIN    = c:\Program Files (x86)\Windows Kits\8.1\bin\x64

Note:

---?image=/assets/images/slides/Slide40.JPG @title[Visual Studio Resource Compiler Error – Rc.exe]

Visual Studio Resource Compiler Error – Rc.exe

Note:

  • The Rc.exe was not found and the build fails

  • Find where rc.exe is located and update the tools_def.txt

  • Update MV3/conf/tools_def.txt

- # Microsoft Visual Studio 2013 Professional Edition
- DEFINE WINSDK8x86_BIN    = C:\Program Files (x86)\Windows Kits\8.1\bin\x64

- # Microsoft Visual Studio 2015 Professional Edition
- DEFINE WINSDK81x86_BIN   = C:\Program Files (x86)\Windows Kits\8.1\bin\x64

- # Microsoft Visual Studio 2017 Professional Edition
- DEFINE WINSDK10_BIN      =  Location of Rc.exe