|
| 1 | +# Talos II support in coreboot |
| 2 | + |
| 3 | +## Key changes |
| 4 | + |
| 5 | +1. Added RAM initialization |
| 6 | +2. Added SCOM registers support |
| 7 | + |
| 8 | +--- |
| 9 | +## Statistics |
| 10 | + |
| 11 | +Since bootblock release: \ |
| 12 | +<span style="color:yellow">59</span> files were changed including <span style="color:lightgreen">48</span> new files created \ |
| 13 | +<span style="color:lightgreen">12407</span> lines of code were added \ |
| 14 | +<span style="color:orangered">76</span> lines of code were removed |
| 15 | + |
| 16 | +Check the statistics with: |
| 17 | +``` |
| 18 | +git diff --stat 6f5a735df6 c0fe1bbd4d |
| 19 | +``` |
| 20 | +--- |
| 21 | +## How to build and use it |
| 22 | + |
| 23 | +### Environment preparation |
| 24 | + |
| 25 | +In order to build coreboot, we use docker container. So in order to setup |
| 26 | +environment, ensure that: |
| 27 | + |
| 28 | +1. You have docker installed as described on [docker site](https://docs.docker.com/engine/install/) |
| 29 | + for your Linux distro. |
| 30 | +2. When you have the docker installed pull the container: |
| 31 | + |
| 32 | + ``` |
| 33 | + docker pull coreboot/coreboot-sdk:65718760fa |
| 34 | + ``` |
| 35 | + |
| 36 | +In order to start from a common point, flash the original OpenPOWER firmware |
| 37 | +for Talos II. |
| 38 | + |
| 39 | +1. Log into the BMC via SSH: |
| 40 | + |
| 41 | + ``` |
| 42 | + ssh root@<BMC_IP> |
| 43 | + ``` |
| 44 | + |
| 45 | +2. Download the stock firmware image: |
| 46 | + |
| 47 | + ``` |
| 48 | + wget https://cloud.3mdeb.com/index.php/s/canxPx5d4X8c2wk/download -O /tmp/flash.pnor |
| 49 | + ``` |
| 50 | + |
| 51 | +3. Flash the firmware: |
| 52 | + |
| 53 | + ``` |
| 54 | + pflash -E -p /tmp/flash.pnor |
| 55 | + ``` |
| 56 | + |
| 57 | + > You will see warning like `About to erase chip !` and |
| 58 | + > `WARNING ! This will modify your HOST flash chip content !`. When the |
| 59 | + > `Enter "yes" to confirm:` prompt appears, type `yes` and press enter. |
| 60 | +
|
| 61 | + At the end of the process (it may take several minutes) you should have |
| 62 | + something like this: |
| 63 | + |
| 64 | + ``` |
| 65 | + About to program "/tmp/flash.pnor" at 0x00000000..0x04000000 ! |
| 66 | + Programming & Verifying... |
| 67 | + [==================================================] 100% ETA:0s |
| 68 | + ``` |
| 69 | + |
| 70 | +4. * Log into the BMC GUI at https://\<BMC_IP\>/.\ |
| 71 | + Make sure to use `https`. |
| 72 | + * Enter the Server power operations |
| 73 | + `https://\<BMC_IP\>/#/server-control/power-operations` and invoke |
| 74 | + warm reboot. |
| 75 | + * Then move to Serial over LAN remote console |
| 76 | + `https://\<BMC_IP\>/#/server-control/remote-console` to observe |
| 77 | + whether the platform is booting. |
| 78 | + |
| 79 | +--- |
| 80 | + |
| 81 | +### Buidling coreboot image |
| 82 | + |
| 83 | +In order to build coreboot image, follow the steps below: |
| 84 | + |
| 85 | +1. Clone the coreboot repository: |
| 86 | + |
| 87 | + ``` |
| 88 | + git clone [email protected]:3mdeb/coreboot.git -b talos_2_support |
| 89 | + # or HTTPS alternatively |
| 90 | + git clone https://github.com/3mdeb/coreboot.git -b talos_2_support |
| 91 | + ``` |
| 92 | + `talos_2_support` is the main development branch for Talos II support. |
| 93 | + |
| 94 | +2. Get the submodules: |
| 95 | + |
| 96 | + ``` |
| 97 | + cd coreboot |
| 98 | + git submodule update --init --checkout |
| 99 | + ``` |
| 100 | + |
| 101 | +3. Start docker container (assuming you are already in coreboot root |
| 102 | + directory): |
| 103 | + |
| 104 | + ``` |
| 105 | + docker run --rm -it -v $PWD:/home/coreboot/coreboot -w /home/coreboot/coreboot coreboot/coreboot-sdk:65718760fa /bin/bash |
| 106 | + ``` |
| 107 | + |
| 108 | +4. When inside of the container, configure the build for Talos II: |
| 109 | + |
| 110 | + ``` |
| 111 | + make menuconfig |
| 112 | + ``` |
| 113 | + |
| 114 | + * Navigate to the **Mainboard** submenu. |
| 115 | + * As a **Mainboard vendor** select `Raptor Computing Systems` |
| 116 | + * If it wasn't selected autmatically, as **Mainboard model** select `Talos II` |
| 117 | + * In the **ROM chip size** option select `512 KB` |
| 118 | + * Save the configuration and exit. |
| 119 | + |
| 120 | +  |
| 121 | + |
| 122 | +5. Start the build process of coreboot inside the container: |
| 123 | + |
| 124 | + ``` |
| 125 | + make |
| 126 | + ``` |
| 127 | + |
| 128 | +--- |
| 129 | + |
| 130 | +### Running the coreboot on Talos II |
| 131 | + |
| 132 | +1. At the end of build process you should see `Built raptor-cs/talos-2 (Talos II)`. |
| 133 | + Copy the result binary from `<coreboot_dir>/build/coreboot.rom.signed.ecc` to the BMC |
| 134 | + (assuming in the coreboot root directory): |
| 135 | + |
| 136 | + ``` |
| 137 | + scp build/coreboot.rom.signed.ecc root@<BMC_IP>:/tmp |
| 138 | + ``` |
| 139 | + > If that file is not present, use `coreboot.rom` instead |
| 140 | +
|
| 141 | +2. Backup the HBB partition (for faster later recovery) by invoking this |
| 142 | + command on BMC: |
| 143 | + |
| 144 | + ``` |
| 145 | + pflash -P HBB -r /tmp/hbb.bin |
| 146 | + ``` |
| 147 | + |
| 148 | +3. Flash the binary by replacing HBB partition (execute from BMC): |
| 149 | + |
| 150 | + ``` |
| 151 | + pflash -e -P HBB -p /tmp/coreboot.signed.ecc |
| 152 | + ``` |
| 153 | + > Again, if that file is not present, use `coreboot.rom` instead |
| 154 | +
|
| 155 | + Answer yes to the prompt and wait for the process to finish. |
| 156 | + |
| 157 | +4. Log into the BMC GUI again at https://\<BMC_IP\>/. Enter the Server power |
| 158 | + operations (https://\<BMC_IP\>/#/server-control/power-operations) and invoke |
| 159 | + warm reboot. Then move to Serial over LAN remote console |
| 160 | + (https://\<BMC_IP\>/#/server-control/remote-console) |
| 161 | + |
| 162 | + Wait for a while until coreboot shows up: |
| 163 | + |
| 164 | + [](https://asciinema.org/a/OTEPFRHlasyXQI2eRBLso0AB0) |
| 165 | + |
| 166 | +5. Enjoy the coreboot running on Talos II. |
| 167 | + |
| 168 | +> **Optional:** In order to recovery the platform quickly to healthy state, flash |
| 169 | +> the HBB partition back with: \ |
| 170 | +> `pflash -e -P HBB -p /tmp/hbb.bin` |
| 171 | +
|
| 172 | +### Hardware configuration |
| 173 | + |
| 174 | +Configuration with a single IBM POWER9 64bit CPU is supported. \ |
| 175 | +Dual CPU setup not supported currenctly. |
| 176 | + |
| 177 | +Following RAM configurations were tested and are proved to be properly initialized. |
| 178 | + ``` |
| 179 | + MCS0, MCA0 |
| 180 | + DIMM0: 1Rx4 16GB PC4-2666V-RC2-12-PA0 |
| 181 | + DIMM1: not installed |
| 182 | + MCS0, MCA1 |
| 183 | + DIMM0: 1Rx8 8GB |
| 184 | + DIMM1: not installed |
| 185 | + MCS1, MCA0 |
| 186 | + DIMM0: 2Rx4 32GB PC4-2666V-RB2-12-MA0 |
| 187 | + DIMM1: not installed |
| 188 | + MCS1, MCA1 |
| 189 | + DIMM0: 2Rx8 16GB PC4-2666V-RE2-12 |
| 190 | + DIMM1: not installed |
| 191 | + ``` |
| 192 | + |
| 193 | +--- |
| 194 | +## Binaries |
| 195 | + |
| 196 | +TBD |
| 197 | + |
| 198 | +--- |
| 199 | +## Coming soon |
| 200 | +1. Building HDAT structure |
| 201 | +2. Booting skiboot as payload |
0 commit comments