Capsule Apply Script
- Input: The first parameter is a capsule version. Other parameters are paths to capsules on the target system.When a capsule is copied to the target, the capsule name is specified by thecapsule_createscript, but the destination is specified in thetarget_capsules_pathfield in the environment file.The capsule version is important for Windows* operating systems. The data streams optimizer uses capsule version “1” for Linux* operating systems.usage: capsule_apply_uefi.sh VERSION CAPSULE_FILE_1 CAPSULE_FILE_2 ... CAPSULE_FILE_N VERSION Capsule version to apply CAPSULE_FILE_N Path to the capsule file
- Output: Return code must be 0 when the capsule is applied successfully.
- Error handling: Any nonzero value returned from the script will be interpreted as an error. Any additional logging should be printed to STDERR.
Command line: c:\APPS\TCCSDK\tools\target_scripts_win\capsule_apply_win.py 1 my_on_target_capsule.capsule STDOUT: some-output-there Return value: 0 STDERR: empty
Configure System Settings
- Enable test mode on the target system:
- Launch the command shell with administrative privileges and execute the following command:> bcdedit /set testsigning on
- After you have finished using data streams optimizer to tune the system, you can disable test mode:> bcdedit /set testsigning off
- Update the User Account Control (UAC) settings to “Never notify” to allow the data streams optimizer to enable remote Administrative access:
- LaunchUser Account Control Settingsin the Control Panel and update the settings toNever notify/not recommended.
- After you have finished using data streams optimizer to tune the system, you can restore UAC to the original/required setting.
- The PowerShell moduleDeviceManagementis required and providesInstall-DeviceDrivercmdlet used for installing the generated and signed Firmware Update driver. To install theDeviceManagementmodule:
- Run PowerShell with Administrative permissions.
- Run the following command:PS> Install-Module -Name DeviceManagement
Install EDK2 and Dependencies
- Go to official Microsoft site to download and install these components on the target system:
- Visual Studio
- Windows SDK (can be installed as a part of Visual Studio)
- Windows Driver Kit (WDK)
- Add the path for the Windows* Driver Kit to thePATHenvironment variable. The default Windows Driver Kit installation path isC:\Program Files (x86)\Windows Kits\10\bin\<version>\x64.
- Install EDK2:
- Extract the archive onto the target, inC:\DATA\edk2.
- Install the runtime Python dependencies:> pip install edk2-pytool-library
- Create the system environment variableEDK2_ROOTpointing to the root of the extracted EDK2 component.
- Update the system environment variablePYTHONPATHby adding a path to the following folder in EDK2:C:\DATA\edk2\BaseTools\Source\Python.
- Reboot the system.
Install the Self-Signed Test Certificate
- Make sure the following steps are executed only once, and there is no certificate with the common name “FirmwareUpdate_Test” inC:\APPS\TCCSDK\cert. If you launch themakecert.exemore than once with the “CN=FirmwareUpdate_Test” parameter, you will need to clean up thePrivateCertStore, before you can continue.
- Open a command-line shell with administrative privileges.
- Create and install the self-signed test certificate:> mkdir C:\APPS\TCCSDK\cert > cd C:\APPS\TCCSDK\cert > makecert -r -pe -ss PrivateCertStore -n CN=FirmwareUpdate_Test -eku 184.108.40.206.220.127.116.11.3 firmware.cer > CertMgr.exe /add C:\APPS\TCCSDK\cert\firmware.cer /s /r localMachine root /all > CertMgr.exe /add C:\APPS\TCCSDK\cert\firmware.cer /s /r localMachine trustedpublisher