Lee Leahy | c1e4f89 | 2016-01-07 11:24:24 -0800 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | <html> |
| 3 | <head> |
| 4 | <title>Quark™ SoC</title> |
| 5 | </head> |
| 6 | <body> |
| 7 | |
| 8 | <h1>Intel® Quark™ SoC</h1> |
| 9 | <table> |
| 10 | <tr> |
| 11 | <td><a target="_blank" href="http://www.intel.com/content/dam/www/public/us/en/images/embedded/16x9/edc-quark-block-diagram-16x9.png"><img alt="Quark Block Diagram" src="http://www.intel.com/content/dam/www/public/us/en/images/embedded/16x9/edc-quark-block-diagram-16x9.png" width=500></a></td> |
| 12 | <td> |
Lee Leahy | 05c0215 | 2016-02-02 07:55:38 -0800 | [diff] [blame] | 13 | The Quark™ SoC code was developed using the |
| 14 | <a target="_blank" href="../Board/galileo.html">Galileo Gen 2</a> |
| 15 | board: |
| 16 | <ul> |
Lee Leahy | e8424cf | 2016-02-03 07:28:22 -0800 | [diff] [blame] | 17 | <li><a target="_blank" href="../development.html">Overall</a> development</li> |
Lee Leahy | 05c0215 | 2016-02-02 07:55:38 -0800 | [diff] [blame] | 18 | <li><a target="_blank" href="soc.html">SoC</a> support</li> |
| 19 | <li><a target="_blank" href="../fsp1_1.html">FSP 1.1</a> integration</li> |
| 20 | <li><a target="_blank" href="../Board/board.html">Board</a> support</li> |
Lee Leahy | 2d96be6 | 2016-05-17 17:03:00 -0700 | [diff] [blame] | 21 | <li><a target="_blank" href="#QuarkFsp">Quark™ FSP</a></li> |
| 22 | <li><a target="_blank" href="#CorebootPayloadPkg">CorebootPayloadPkg</a></li> |
Lee Leahy | 05c0215 | 2016-02-02 07:55:38 -0800 | [diff] [blame] | 23 | </ul> |
Lee Leahy | c1e4f89 | 2016-01-07 11:24:24 -0800 | [diff] [blame] | 24 | </td> |
| 25 | </tr> |
| 26 | </table> |
| 27 | |
| 28 | |
| 29 | |
| 30 | <hr> |
| 31 | <h1>Quark™ Documentation</h1> |
| 32 | <ul> |
| 33 | <li><a target="_blank" href="http://www.intel.com/content/dam/www/public/us/en/images/embedded/16x9/edc-quark-block-diagram-16x9.png">Block Diagram</a></li> |
Lee Leahy | c1e4f89 | 2016-01-07 11:24:24 -0800 | [diff] [blame] | 34 | <li><a target="_blank" href="http://www.intel.com/content/www/us/en/embedded/products/quark/specifications.html">Specifications</a>: |
| 35 | <ul> |
| 36 | <li><a target="_blank" href="http://ark.intel.com/products/79084/Intel-Quark-SoC-X1000-16K-Cache-400-MHz">X1000</a> |
| 37 | - <a target="_blank" href="http://www.intel.com/content/www/us/en/search.html?keyword=X1000">Documentation</a>: |
| 38 | <ul> |
| 39 | <li><a target="_blank" href="http://www.intel.com/content/dam/www/public/us/en/documents/datasheets/quark-x1000-datasheet.pdf">Datasheet</a></li> |
| 40 | <li><a target="_blank" href="http://www.intel.com/content/dam/support/us/en/documents/processors/quark/sb/intelquarkcore_devman_001.pdf">Developer's Manual</a></li> |
| 41 | <li><a target="_blank" href="http://www.intel.com/content/dam/www/public/us/en/documents/product-briefs/intel-quark-product-brief-v3.pdf">Product Brief</a></li> |
| 42 | </ul> |
| 43 | </li> |
| 44 | </ul> |
| 45 | </li> |
Lee Leahy | 2d96be6 | 2016-05-17 17:03:00 -0700 | [diff] [blame] | 46 | <li><a target="_blank" href="../index.html#Documentation">More documentation</a></li> |
Lee Leahy | c1e4f89 | 2016-01-07 11:24:24 -0800 | [diff] [blame] | 47 | </ul> |
| 48 | |
| 49 | |
| 50 | |
| 51 | <hr> |
Lee Leahy | 4ee073d | 2016-02-28 06:22:47 -0800 | [diff] [blame] | 52 | <h1><a name="CorebootPayloadPkg">Quark™ EDK2 CorebootPayloadPkg</a></h1> |
Lee Leahy | db7410e | 2016-02-10 11:12:50 -0800 | [diff] [blame] | 53 | <p> |
| 54 | Build Instructions: |
| 55 | </p> |
| 56 | <ol> |
| 57 | <li>Set up <a href="#BuildEnvironment">build environment</a></li> |
Lee Leahy | 2d96be6 | 2016-05-17 17:03:00 -0700 | [diff] [blame] | 58 | <li>Linux (assumes GCC48): |
| 59 | <pre><code>build -p CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc -a IA32 \ |
| 60 | -t GCC48 -b DEBUG -DDEBUG_PROPERTY_MASK=0x27 \ |
| 61 | -DDEBUG_PRINT_ERROR_LEVEL=0x80000042 -DSHELL_TYPE=BUILD_SHELL \ |
| 62 | -DMAX_LOGICAL_PROCESSORS=1 |
Lee Leahy | c7a9433 | 2016-02-20 17:44:35 -0800 | [diff] [blame] | 63 | ls Build/CorebootPayloadPkgIA32/DEBUG_GCC48/FV/UEFIPAYLOAD.fd |
Lee Leahy | db7410e | 2016-02-10 11:12:50 -0800 | [diff] [blame] | 64 | </code></pre> |
Lee Leahy | 2d96be6 | 2016-05-17 17:03:00 -0700 | [diff] [blame] | 65 | </li> |
| 66 | <li>Windows (assumes Visual Studio 2015): |
| 67 | <pre><code>build -p CorebootPayloadPkg\CorebootPayloadPkgIa32.dsc -a IA32 -t VS2015x86 -b DEBUG -DDEBUG_PROPERTY_MASK=0x27 -DDEBUG_PRINT_ERROR_LEVEL=0x80000042 -DSHELL_TYPE=BUILD_SHELL -DMAX_LOGICAL_PROCESSORS=1 |
| 68 | dir Build\CorebootPayloadPkgIA32\DEBUG_VS2015x86\FV\UEFIPAYLOAD.fd |
Lee Leahy | db7410e | 2016-02-10 11:12:50 -0800 | [diff] [blame] | 69 | </code></pre> |
Lee Leahy | db7410e | 2016-02-10 11:12:50 -0800 | [diff] [blame] | 70 | </li> |
Lee Leahy | c7a9433 | 2016-02-20 17:44:35 -0800 | [diff] [blame] | 71 | <li>In the .config for coreboot, set the following Kconfig values: |
Lee Leahy | db7410e | 2016-02-10 11:12:50 -0800 | [diff] [blame] | 72 | <ul> |
| 73 | <li>CONFIG_PAYLOAD_ELF=y</li> |
| 74 | <li>CONFIG_PAYLOAD_FILE="path to UEFIPAYLOAD.fd"</li> |
| 75 | </ul> |
| 76 | </li> |
| 77 | <li>Build coreboot</li> |
| 78 | <li>Copy the image build/coreboot.rom into flash</li> |
| 79 | </ol> |
| 80 | |
| 81 | |
| 82 | |
| 83 | <hr> |
| 84 | <h1><a name="BuildEnvironment">Quark™ EDK2 Build Environment</a></h1> |
| 85 | <p> |
| 86 | Use the following steps to setup a build environment: |
| 87 | </p> |
| 88 | <ol> |
| 89 | <li>Get the EDK2 sources: |
| 90 | <ol type="A"> |
Lee Leahy | c1e4f89 | 2016-01-07 11:24:24 -0800 | [diff] [blame] | 91 | <li>EDK2: git clone <a target="_blank" href="https://github.com/tianocore/edk2.git">https://github.com/tianocore/edk2.git</a></li> |
Lee Leahy | c1e4f89 | 2016-01-07 11:24:24 -0800 | [diff] [blame] | 92 | <li>EDK2-non-osi: git clone <a target="_blank" href="https://github.com/tianocore/edk2-non-osi.git">https://github.com/tianocore/edk2-non-osi.git</a></li> |
| 93 | <li>Win32 BaseTools: git clone <a target="_blank" href="https://github.com/tianocore/edk2-BaseTools-win32.git">https://github.com/tianocore/edk2-BaseTools-win32.git</a></li> |
Lee Leahy | db7410e | 2016-02-10 11:12:50 -0800 | [diff] [blame] | 94 | </ol> |
Lee Leahy | c1e4f89 | 2016-01-07 11:24:24 -0800 | [diff] [blame] | 95 | </li> |
Lee Leahy | db7410e | 2016-02-10 11:12:50 -0800 | [diff] [blame] | 96 | <li>Set up a build window: |
| 97 | <ul> |
| 98 | <li>Linux: |
Lee Leahy | 1c85fea | 2016-02-08 13:57:47 -0800 | [diff] [blame] | 99 | <pre><code>export WORKSPACE=$PWD |
Lee Leahy | 2d96be6 | 2016-05-17 17:03:00 -0700 | [diff] [blame] | 100 | export PACKAGES_PATH="$PWD/edk2:$PWD/edk2-non-osi" |
Lee Leahy | 1c85fea | 2016-02-08 13:57:47 -0800 | [diff] [blame] | 101 | cd edk2 |
| 102 | export WORKSPACE=$PWD |
| 103 | . edksetup.sh |
Lee Leahy | 1c85fea | 2016-02-08 13:57:47 -0800 | [diff] [blame] | 104 | </code></pre> |
Lee Leahy | db7410e | 2016-02-10 11:12:50 -0800 | [diff] [blame] | 105 | </li> |
| 106 | <li>Windows: |
Lee Leahy | c1e4f89 | 2016-01-07 11:24:24 -0800 | [diff] [blame] | 107 | <pre><code>set WORKSPACE=%CD% |
Lee Leahy | 2d96be6 | 2016-05-17 17:03:00 -0700 | [diff] [blame] | 108 | set PACKAGES_PATH=%WORKSPACE%\edk2;%WORKSPACE%\edk2-non-osi |
Lee Leahy | c1e4f89 | 2016-01-07 11:24:24 -0800 | [diff] [blame] | 109 | set EDK_TOOLS_BIN=%WORKSPACE%\edk2-BaseTools-win32 |
| 110 | cd edk2 |
| 111 | edksetup.bat |
Lee Leahy | c1e4f89 | 2016-01-07 11:24:24 -0800 | [diff] [blame] | 112 | </code></pre> |
Lee Leahy | db7410e | 2016-02-10 11:12:50 -0800 | [diff] [blame] | 113 | </li> |
| 114 | </ul> |
Lee Leahy | c1e4f89 | 2016-01-07 11:24:24 -0800 | [diff] [blame] | 115 | </li> |
Lee Leahy | db7410e | 2016-02-10 11:12:50 -0800 | [diff] [blame] | 116 | </ol> |
| 117 | |
Lee Leahy | c1e4f89 | 2016-01-07 11:24:24 -0800 | [diff] [blame] | 118 | |
| 119 | |
| 120 | <hr> |
Lee Leahy | 2d96be6 | 2016-05-17 17:03:00 -0700 | [diff] [blame] | 121 | <h1><a name="QuarkFsp">Quark™ FSP</a></h1> |
Lee Leahy | db7410e | 2016-02-10 11:12:50 -0800 | [diff] [blame] | 122 | <p> |
Lee Leahy | 2d96be6 | 2016-05-17 17:03:00 -0700 | [diff] [blame] | 123 | Getting the Quark FSP source: |
| 124 | </p> |
| 125 | <ol> |
| 126 | <li>Set up an EDK-II <a href="#BuildEnvironment">Build Environment</a></li> |
| 127 | <li>cd edk2</li> |
| 128 | <li>mkdir QuarkFspPkg</li> |
| 129 | <li>cd QuarkFspPkg</li> |
| 130 | <li>Use git to clone <a target="_blank" href="https://review.gerrithub.io/#/admin/projects/LeeLeahy/quarkfsp">QuarkFspPkg</a> into the QuarkFpsPkg directory (.)</li> |
| 131 | </ol> |
| 132 | |
Lee Leahy | d677d9c | 2016-09-29 13:56:28 -0700 | [diff] [blame] | 133 | <h2>Building QuarkFspPkg</h2> |
Lee Leahy | 2d96be6 | 2016-05-17 17:03:00 -0700 | [diff] [blame] | 134 | <p> |
Lee Leahy | d677d9c | 2016-09-29 13:56:28 -0700 | [diff] [blame] | 135 | There are two versions of FSP: FSP 1.1 and FSP 2.0. There are also two |
| 136 | different implementations of FSP, one using subroutines without SEC and |
| 137 | PEI core and the original implementation which relies on SEC and PEI core. |
| 138 | Finally there are two different build x86 types release (r32) and debug (d32). |
| 139 | </p> |
| 140 | <p>Note that the subroutine implementations are a <b>work in progress</b>.</p> |
| 141 | <p> |
| 142 | Build commands shown building debug FSP: |
Lee Leahy | db7410e | 2016-02-10 11:12:50 -0800 | [diff] [blame] | 143 | </p> |
| 144 | <ul> |
Lee Leahy | d677d9c | 2016-09-29 13:56:28 -0700 | [diff] [blame] | 145 | <li>Linux: |
| 146 | <ul> |
| 147 | <li>QuarkFspPkg/BuildFsp1_1.sh -d32</li> |
| 148 | <li>QuarkFspPkg/BuildFsp1_1Pei.sh -d32</li> |
| 149 | <li>QuarkFspPkg/BuildFsp2_0.sh -d32</li> |
| 150 | <li>QuarkFspPkg/BuildFsp2_0Pei.sh -d32</li> |
| 151 | </ul> |
| 152 | <li>Windows: |
| 153 | <ul> |
| 154 | <li>QuarkFspPkg/BuildFsp1_1.bat -d32</li> |
| 155 | <li>Windows: QuarkFspPkg/BuildFsp2_0.bat -d32</li> |
| 156 | </ul> |
| 157 | </li> |
Lee Leahy | db7410e | 2016-02-10 11:12:50 -0800 | [diff] [blame] | 158 | </ul> |
| 159 | |
Lee Leahy | d677d9c | 2016-09-29 13:56:28 -0700 | [diff] [blame] | 160 | <h2>Copying FSP files into coreboot Source Tree</h2> |
| 161 | <p> |
| 162 | There are some helper scripts to copy the FSP output into the coreboot |
| 163 | source tree. The parameters to these scripts are: |
| 164 | </p> |
| 165 | <ol> |
| 166 | <li>EDK2 tree root</li> |
| 167 | <li>coreboot tree root</li> |
| 168 | <li>Build type: DEBUG or RELEASE</li> |
| 169 | </ol> |
| 170 | <p> |
| 171 | Script files: |
| 172 | </p> |
| 173 | <ul> |
| 174 | <li>Linux: |
| 175 | <ul> |
| 176 | <li>QuarkFspPkg/coreboot_fsp1_1.sh</li> |
| 177 | <li>QuarkFspPkg/coreboot_fsp1_1Pei.sh</li> |
| 178 | <li>QuarkFspPkg/coreboot_fsp2_0.sh</li> |
| 179 | <li>QuarkFspPkg/coreboot_fsp2_0Pei.sh</li> |
| 180 | </ul> |
| 181 | </ul> |
Lee Leahy | db7410e | 2016-02-10 11:12:50 -0800 | [diff] [blame] | 182 | |
| 183 | |
| 184 | <hr> |
| 185 | <h1>Quark™ EDK2 BIOS</h1> |
| 186 | <p> |
| 187 | Build Instructions: |
| 188 | </p> |
| 189 | <ol> |
| 190 | <li>Set up <a href="#BuildEnvironment">build environment</a></li> |
| 191 | <li>Build the image: |
| 192 | <ul> |
| 193 | <li>Linux: |
| 194 | <pre><code>build -p QuarkPlatformPkg/Quark.dsc -a IA32 -t GCC48 -b DEBUG -DDEBUG_PROPERTY_MASK=0x27 -DDEBUG_PRINT_ERROR_LEVEL=0x80000042 |
| 195 | ls Build/Quark/DEBUG_GCC48/FV/Quark.fd |
| 196 | </code></pre> |
| 197 | </li> |
| 198 | <li>Windows: |
| 199 | <pre><code>build -p QuarkPlatformPkg/Quark.dsc -a IA32 -t VS2012x86 -b DEBUG -DDEBUG_PROPERTY_MASK=0x27 -DDEBUG_PRINT_ERROR_LEVEL=0x80000042 |
| 200 | dir Build\Quark\DEBUG_VS2012x86\FV\Quark.fd |
| 201 | </code></pre> |
| 202 | </li> |
| 203 | </ul> |
| 204 | </li> |
| 205 | </ol> |
| 206 | |
| 207 | <p> |
| 208 | Documentation: |
| 209 | </p> |
| 210 | <ul> |
Lee Leahy | fcfa94d | 2016-03-03 16:08:29 -0800 | [diff] [blame] | 211 | <li><a target="_blank" href="https://github.com/tianocore/edk2/tree/master/QuarkPlatformPkg">EDK II firmware for Intel® Quark™ SoC X1000 based platforms</a></li> |
Lee Leahy | db7410e | 2016-02-10 11:12:50 -0800 | [diff] [blame] | 212 | <li>Intel® Quark™ SoC X1000 <a target="_blank" href="http://www.intel.com/content/dam/www/public/us/en/documents/guides/quark-x1000-uefi-firmware-writers-guide.pdf">UEFI Firmware Writer's Guide</a></li> |
| 213 | </ul> |
| 214 | |
| 215 | |
| 216 | |
| 217 | <hr> |
Lee Leahy | 2d96be6 | 2016-05-17 17:03:00 -0700 | [diff] [blame] | 218 | <p>Modified: 17 May 2016</p> |
Lee Leahy | c1e4f89 | 2016-01-07 11:24:24 -0800 | [diff] [blame] | 219 | </body> |
Lee Leahy | 2d96be6 | 2016-05-17 17:03:00 -0700 | [diff] [blame] | 220 | </html> |