Ampere Mountain Jade code base & tools installation.
- Clone the repository; run 'setup_git.sh' and 'setup_tools.sh' on your local machine. OS used for build environment is Ubuntu 20.04.
- 3 files in AmpereAltra-ATF-SCP submodule you may not be able to access, if so, please get them from Ampere and place them as below:
- board_settings/jade_board_setting_*.bin
- atf/altra_atf_signed_*.slim
- scp/altra_scp_signed_*.slim
-
.vscode: Visual Studio Code settings for tasks which link to bash scripts
-
adlink-platforms: folder containing Adlink specific changes
-
AmpereAltra-ATF-SCP: Ampere ATF/SCP firmware, need authorization to get the content of https://github.com/ADLINK/AmpereAltra-ATF-SCP.git, or get them from Ampere
-
edk2: release specified branch from the official TianoCore EDK II repository
-
edk2-ampere-tools: master branch from Ampere Computing
-
edk2-platforms: release specified branch from Ampere
-
OpenPlatformPkg: master branch of Linaro’s OpenPlatformPkg repository
- make_ComHpcAlt.sh: A script to build ADLINK COM-HPC-ALT.
- make_jade.sh: A script to build CRB Ampere Mt. Jade.
- setup_git.sh: A script to clone and initialize additional project repositories, ampere tools and binaries required for the build.
- setup_tools.sh: A script to install and configure the necessary tools and dependencies for the build environment.
Note:
If you need to make changes to files located other than the directory adlink-platforms , follow the steps below:
-
Copy the required file into the
Overridefolder located at: "edk2_adlink-ampere/adlink-platforms/Platform/Ampere/ComHpcAltPkg/Override " Ensure the original directory structure is preserved inside theOverridefolder. -
Apply your modifications to the copied file within the
Overridefolder. -
Proceed with the standard build process. The build system will automatically use the overridden files while build.
For example: If you make changes to RootComplexConfigDxe.c in "edk2-platforms/Silicon/Ampere/AmpereAltraPkg/Drivers/RootComplexConfigDxe/RootComplexConfigDxe.c".
Place the file in the Override folder as shown below, apply the changes there, and then proceed with the build process.
edk2-adlink-ampere/adlink-platforms/Platform/Ampere/ComHpcAltPkg/Override/edk2-platforms/Silicon/Ampere/AmpereAltraPkg/Drivers/RootComplexConfigDxe/RootComplexConfigDxe.c
To clone the parent directory with folder containing Adlink specific changes use following steps of git command
git clone https://github.com/ADLINK/edk2-adlink-ampere.git
Navigate to the parent directory,
cd edk2-adlink-ampere
To work on a branch other than master, switch to the desired branch using the following command, else skip it.
git checkout <branch-name>
To clone and initialize additional project repositories, ampere tools and binaries required for the build
. setup_git.sh
To install and configure the necessary tools and dependencies for the build environment
. setup_tools.sh
-
Enter into working directory (edk2-adlink-ampere).
-
Execute the below command to build EDK-II image for COM-HPC-ALT
. make_[Board].sh -
After successful compilation, the final EDK-II image [Board]tianocore_atf*.cap will be found in below path
$PWD/BUILDS/[Board]_tianocore_atf_*/
- Following Capsule update steps works for v2.04.100.00 or later version, follow the instruction in release package to update BIOS otherwise.
-
Copy CapsuleApp.efi , BoardVersion.efi, [Board]scp*.cap , [Board]tianocore_atf*.cap files from path $PWD/BUILDS/[Board]tianocore_atf/* into FAT32 USB and connect to target board.
-
Power up the target and boot into UEFI shell.
-
Run map -r command to identify the USB device name. Type the USB device name in the shell to enter into to the USB drive.
For example: fs0 is USB device name in our case.
Shell>fs0: fs0:\> -
Run below command to flash SCP FW.
CapsuleApp.efi [Board]_scp_*.cap -
Run below command to flash EDK-II FW v* (this includes ATF + UEFI + BoardSettings).
CapsuleApp.efi [Board]_tianocore_atf_*.cap -
Power cycle the target board.
NOTE:
- The target board by default should have EDK-II firmware version greater than or equal to v2.04.100.00 (which will support capsule update).
- Go to Ask a Expert page or AVA Developer Platform Forum where you can request us and then we will provide the download link
- Download & Unzip into FAT32 USB device.
- Boot into UEFI shell
- Run fwu.nsh to flash EDK-II to v2.04.100.00 which will support capsule update.
- Power cycle the target board.
NOTE:
- The above steps required only when the target is having EDK-II firmware version lesser than v2.04.100.00.
-
Progress Map
//
// PEI
//
//Regular boot
{ PEI_CORE_STARTED, 0x10 },
{ PEI_CAR_CPU_INIT, 0x11 },
{ PEI_MEMORY_SPD_READ, 0x1D },
{ PEI_MEMORY_PRESENCE_DETECT, 0x1E },
{ PEI_MEMORY_TIMING, 0x1F},
{ PEI_MEMORY_CONFIGURING, 0x20 },
{ PEI_MEMORY_INIT, 0x21 },
{ PEI_MEMORY_INSTALLED, 0x31 },
{ PEI_CPU_INIT, 0x32 },
{ PEI_CPU_CACHE_INIT, 0x33 },
{ PEI_CPU_BSP_SELECT, 0x34 },
{ PEI_CPU_AP_INIT, 0x35 },
{ PEI_CPU_SMM_INIT, 0x36 },
{ PEI_MEM_NB_INIT, 0x37 },
{ PEI_MEM_SB_INIT, 0x3B },
{ PEI_DXE_IPL_STARTED, 0x4F },
//
// DXE
//
{ DXE_CORE_STARTED, 0x60 },
{ DXE_SBRUN_INIT, 0x62 },
{ DXE_NB_HB_INIT, 0x68 },
{ DXE_NB_INIT, 0x69 },
{ DXE_NB_SMM_INIT, 0x6A },
{ DXE_SB_INIT, 0x70 },
{ DXE_SB_SMM_INIT, 0x71 },
{ DXE_SB_DEVICES_INIT, 0x72 },
{ DXE_BDS_STARTED, 0x90 },
{ DXE_PCI_BUS_BEGIN, 0x92 },
{ DXE_PCI_BUS_HPC_INIT, 0x93 },
{ DXE_PCI_BUS_ENUM, 0x94 },
{ DXE_PCI_BUS_REQUEST_RESOURCES, 0x95 },
{ DXE_PCI_BUS_ASSIGN_RESOURCES, 0x96 },
{ DXE_CON_OUT_CONNECT, 0x97 },
{ DXE_CON_IN_CONNECT, 0x98 },
{ DXE_SIO_INIT, 0x99 },
{ DXE_USB_BEGIN, 0x9A },
{ DXE_USB_RESET, 0x9B },
{ DXE_USB_DETECT, 0x9C },
{ DXE_USB_ENABLE, 0x9D },
{ DXE_IDE_BEGIN, 0xA1 },
{ DXE_IDE_RESET, 0xA2 },
{ DXE_IDE_DETECT, 0xA3 },
{ DXE_IDE_ENABLE, 0xA4 },
{ DXE_SCSI_BEGIN, 0xA5 },
{ DXE_SCSI_RESET, 0xA6 },
{ DXE_SCSI_DETECT, 0xA7 },
{ DXE_SCSI_ENABLE, 0xA8 },
{ DXE_SETUP_START, 0xAB },
{ DXE_SETUP_INPUT_WAIT, 0xAC },
{ DXE_READY_TO_BOOT, 0xAD },
{ DXE_LEGACY_BOOT, 0xAE },
{ DXE_EXIT_BOOT_SERVICES, 0xAF },
{ RT_SET_VIRTUAL_ADDRESS_MAP_BEGIN, 0xB0 },
{ RT_SET_VIRTUAL_ADDRESS_MAP_END, 0xB1 },
{ DXE_LEGACY_OPROM_INIT, 0xB2 },
{ DXE_RESET_SYSTEM, 0xB3 },
{ DXE_USB_HOTPLUG, 0xB4 },
{ DXE_PCI_BUS_HOTPLUG, 0xB5 }, -
Error Map
{ DXE_CPU_SELF_TEST_FAILED, 0x58 },
{ DXE_NB_ERROR, 0xD1 },
{ DXE_SB_ERROR, 0xD2 },
{ DXE_ARCH_PROTOCOL_NOT_AVAILABLE, 0xD3 },
{ DXE_PCI_BUS_OUT_OF_RESOURCES, 0xD4 },
{ DXE_LEGACY_OPROM_NO_SPACE, 0xD5 },
{ DXE_NO_CON_OUT, 0xD6 },
{ DXE_NO_CON_IN, 0xD7 },
{ DXE_INVALID_PASSWORD, 0xD8 },
{ DXE_BOOT_OPTION_LOAD_ERROR, 0xD9 },
{ DXE_BOOT_OPTION_FAILED, 0xDA },
{ DXE_FLASH_UPDATE_FAILED, 0xDB },
{ DXE_RESET_NOT_AVAILABLE, 0xDC },