In order to build coreboot, we use docker container. So in order to setup environment, ensure that:
-
You have docker installed as described on docker site for your Linux distro.
-
When you have the docker installed pull the container:
docker pull coreboot/coreboot-sdk:65718760fa
In order to start from a common point, flash the original OpenPOWER firmware for Talos II.
-
Checkout Talos II in snipeit to avoid conflicts when someone else is also working with the device.
Note:snipeit
is an internal tool avilable only from 3mdeb's LAN network or via VPN connection. -
Log into the BMC via SSH:
ssh root@<BMC_IP>
Ask the administrator for IP address and password to the Talos II BMC.
-
Download the stock firmware image:
wget https://cloud.3mdeb.com/index.php/s/canxPx5d4X8c2wk/download -O /tmp/flash.pnor
-
Flash the firmware:
pflash -E -p /tmp/flash.pnor
You will see warning like
About to erase chip !
andWARNING ! This will modify your HOST flash chip content !
. When theEnter "yes" to confirm:
prompt appears, typeyes
and press enter.At the end of the process (it may take several minutes) you should have something like this:
About to program "/tmp/flash.pnor" at 0x00000000..0x04000000 ! Programming & Verifying... [==================================================] 100% ETA:0s
-
- Log into the BMC GUI at https://<BMC_IP>/.
Make sure to usehttps
. - Enter the Server power operations
https://\<BMC_IP\>/#/server-control/power-operations
and invoke warm reboot. - Then move to Serial over LAN remote console
https://\<BMC_IP\>/#/server-control/remote-console
to observe whether the platform is booting.
- Log into the BMC GUI at https://<BMC_IP>/.
In order to build coreboot image, follow the steps below:
-
Clone the coreboot repository:
git clone git@github.com:3mdeb/coreboot.git -b talos_2_support # or HTTPS alternatively git clone https://github.com/3mdeb/coreboot.git -b talos_2_support
talos_2_support
is the main development branch for Talos II support, but keep in mind, if you are working on some specific features, different branch may be the better choice. -
Get the submodules:
cd coreboot git submodule update --init --checkout
-
Start docker container (assuming you are already in coreboot root directory):
docker run --rm -it -v $PWD:/home/coreboot/coreboot -w /home/coreboot/coreboot coreboot/coreboot-sdk:65718760fa /bin/bash
-
When inside of the container, configure the build for Talos II:
make menuconfig
- Navigate to the Mainboard submenu.
- As a Mainboard vendor select
Raptor Computing Systems
- If it wasn't selected autmatically, as Mainboard model select
Talos II
- In the ROM chip size option select
512 KB
- As Size of CBFS filesystem in ROM set
0x80000
(Only if this option is present) - Save the configuration and exit.
-
Start the build process of coreboot inside the container:
make
-
At the end of build process you should see
Built raptor-cs/talos-2 (Talos II)
. Copy the result binary from<coreboot_dir>/build/coreboot.rom
to the BMC (assuming in the coreboot root directory):scp build/coreboot.rom.signed.ecc root@<BMC_IP>:/tmp
If that file is not present, use
coreboot.rom
instead -
Backup the HBB partition (for faster later recovery) by invoking this command on BMC:
pflash -P HBB -r /tmp/hbb.bin
-
Flash the binary by replacing HBB partition (execute from BMC):
pflash -e -P HBB -p /tmp/coreboot.signed.ecc
Again, if that file is not present, use
coreboot.rom
insteadAnswer yes to the prompt and wait for the process to finish.
-
Log into the BMC GUI again at https://<BMC_IP>/. Enter the Server power operations (https://<BMC_IP>/#/server-control/power-operations) and invoke warm reboot. Then move to Serial over LAN remote console (https://<BMC_IP>/#/server-control/remote-console)
Wait for a while until coreboot shows up:
-
Enjoy the coreboot running on Talos II.
Optional: In order to recovery the platform quickly to healthy state, flash the HBB partition back with:
pflash -e -P HBB -p /tmp/hbb.bin
Please keep in mind, that QEMU doesn't implement many of the HW properties, that Talos II has. There may be many compatibility issues, or registers missing.
More detailed informations can be found in porting.md#qemu
- Clone the QEMU repository
git clone git@github.com:qemu/qemu.git # or HTTPS alternatively git clone https://github.com/qemu/qemu.git
- Build the QEMU ppc64 version
cd qemu ./configure --target-list=ppc64-softmmu && make
- Start QEMU with coreboot image
./qemu/build/qemu-system-ppc64 -M powernv,hb-mode=on --cpu power9 --bios 'coreboot/build/coreboot.rom' -d unimp,guest_errors -serial stdio -drive file=flash.pnor,format=raw,readonly=on,if=mtd