Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Platform/Ampere: Add scripts to help building and flashing firmware
Add scripts which help users to build and flash firmware images for platforms based on the Ampere Altra SoC. 'buildfw.sh' can be used to build images containing just UEFI, or if the TF-A (ATF) binary is present TF-A + UEFI and complete 32MB SPI-NOR images. If the SYS (SMPro and PMPro microprocessors) binary is also present then a capsule update file for the SYS/SCP component of the SOC will also be built. Usage: Usage: ./Platform/Ampere/buildfw.sh [options] Options: -b <bldtype>, --build <bldtype> Specify the build type: DEBUG or RELEASE -t <tc>, --toolchain <tc> Specify the toolchain to use: GCC or CLANG -m <mfg>, --manufacturer <mfg> Specify platform manufacturer (e.g. Ampere) -p <plat>, --platform <plat> Specify platform to build (e.g. Jade) -l <kern>, --linuxboot <kern> Build LinuxBoot firmware instead of full EDK2 with UEFI Shell, specifying path to flashkernel -f, --flash Copy firmware to BMC and flash firmware (keeping EFI variables and NVPARAMs) after building -F, --full-flash Copy firmware to BMC and flash full EEPROM (resetting EFI variables and NVPARAMs) after building Note: flash options require bmc.sh file with env vars BMC_HOST, BMC_USER and BMC_PASS defined Available manufacturers: ADLINK Ampere ASRockRack Available platforms: ADLINK -> ComHpcAlt Ampere -> Jade ASRockRack -> Altrad8ud2 'fwver.sh' is used by buildfw.sh to keep track of the number of builds done, so that firmware files of the format e.g. comhpcalt_uefi_2024-10-22-5.bin are created along with displaying the date including build number during boot. 'fwflash.sh' automates flashing the host firmware when the target system is running a BMC with OpenBMC. 'fwflash.exp' is a helper script used by 'fwflash.sh' to ssh into the BMC and run the ampere_flash_bios.sh utility. Usage: Copies firmware to the BMC (running OpenBMC) and runs ampere_flash_bios.sh to flash the host. Usage: fwflash.sh [options] <Host firmware file> Options: -f, --full Flash the entire SPI-NOR chip (default) -c, --code Flash the code (TF-A + UEFI) area -t, --tfa Flash the TF-A (ATF) area -u, --uefi Flash the UEFI area -h, --help This help message Note: TF-A (Trusted Firmware for ARMv8-A) is the same as ATF (ARM Trusted Firmware). Signed-off-by: Rebecca Cran <[email protected]>
- Loading branch information