File site/docs/hardware/hp820g2.md changed (mode: 100644) (index f5bacb0..45b0bc5) |
... |
... |
P*: Partially works with blobs |
59 |
59 |
| **SeaBIOS with GRUB** | Works | |
| **SeaBIOS with GRUB** | Works | |
60 |
60 |
</div> |
</div> |
61 |
61 |
|
|
|
62 |
|
Brief board info: |
|
63 |
|
|
62 |
64 |
Full hardware specifications can be found on HP's own website: |
Full hardware specifications can be found on HP's own website: |
63 |
65 |
|
|
64 |
66 |
<https://support.hp.com/gb-en/document/c04543492> |
<https://support.hp.com/gb-en/document/c04543492> |
|
... |
... |
Full hardware specifications can be found on HP's own website: |
66 |
68 |
Introduction |
Introduction |
67 |
69 |
============ |
============ |
68 |
70 |
|
|
69 |
|
**Unavailable in Libreboot 20231106 or earlier. You must [compile from |
|
70 |
|
source](../build/), or use a release newer than 20231106.** |
|
71 |
|
|
|
72 |
|
This is a beastly 12.5" Broadwell machine from HP, the main benefit of which is |
|
73 |
|
greater power efficiency (compared to Ivybridge and Haswell platforms), while |
|
74 |
|
offering similar CPU performance but much higher graphics performance. |
|
75 |
|
|
|
76 |
|
Variants exist with either Intel Core i5-5200U, i5-5300U, i7-5500U or |
|
77 |
|
i7-5600U and it comes with a plethora of ports; 3x USB 3.0, DisplayPort (which |
|
78 |
|
can do 4K 60Hz), a VGA port, can be expanded to 32GB RAM, has *3* slots which |
|
79 |
|
can take SSDs (PCIe, M2 and regular SATA), also has a side dock connector (for |
|
80 |
|
a docking station). The screen is eDP type and can be upgraded to 1920x1080. |
|
81 |
|
|
|
82 |
|
This is a nice portable machine, with very reasonable performance. Most people |
|
83 |
|
should be very satisfied with it, in daily use. It is widely available in |
|
84 |
|
online market places. This page will tell you how to flash it! |
|
85 |
|
|
|
86 |
|
All variants of this mainboard will come with Intel HD 5500 graphics, which has |
|
87 |
|
completely free software initialisation in coreboot, provided by *libgfxinit*. |
|
88 |
|
|
|
89 |
|
Build ROM image from source |
|
90 |
|
--------------------------- |
|
91 |
|
|
|
92 |
71 |
First, install the build dependencies and initialise git, using the |
First, install the build dependencies and initialise git, using the |
93 |
72 |
instructions in [building from source](../build/). Unless you're using a |
instructions in [building from source](../build/). Unless you're using a |
94 |
73 |
release after Libreboot 20231106, you *must* use the latest `lbmk.git`. |
release after Libreboot 20231106, you *must* use the latest `lbmk.git`. |
95 |
74 |
|
|
96 |
|
The build target, when building from source, is thus: |
|
|
75 |
|
Please build this from source with lbmk: |
97 |
76 |
|
|
98 |
77 |
./mk -b coreboot hp820g2_12mb |
./mk -b coreboot hp820g2_12mb |
99 |
78 |
|
|
100 |
|
NOTE: The actual flash is 16MB, but you must flash only the first 12MB of it. |
|
101 |
|
The ROM images provided by Libreboot are 12MB. |
|
102 |
|
|
|
103 |
|
There is a separate 2MB *system* flash that you must *erase*, prior to |
|
104 |
|
installing Libreboot. This, along with Libreboot's modified IFD, bypasses |
|
105 |
|
the security (HP Sure Start) that the vendor put there, allowing you to |
|
106 |
|
use coreboot-based firmware such as Libreboot. |
|
107 |
|
|
|
108 |
|
Installation |
|
109 |
|
============ |
|
110 |
|
|
|
111 |
|
Insert binary files |
|
112 |
|
------------------- |
|
113 |
|
|
|
114 |
|
If you're using a release ROM, please ensure that you've inserted extra firmware |
|
115 |
|
required refer to the [guide](../install/ivy_has_common.md) for that. (**failure |
|
116 |
|
to adhere to this advice will result in a bricked machine**) |
|
117 |
|
|
|
118 |
|
If you're *building* from source (using lbmk), the steps takes above are done |
|
119 |
|
for you automatically, inserting all of the required files. The above link is |
|
120 |
|
only relevant for *release* images, which lack some of these files. |
|
121 |
|
|
|
122 |
|
Set MAC address |
|
123 |
|
--------------- |
|
124 |
|
|
|
125 |
|
This platform uses an Intel Flash Descriptor, and defines an Intel GbE NVM |
|
126 |
|
region. As such, release/build ROMs will contain the same MAC address. To |
|
127 |
|
change the MAC address, please read [nvmutil documentation](../install/nvmutil.md). |
|
128 |
|
|
|
129 |
|
Update an existing Libreboot installation |
|
130 |
|
----------------- |
|
131 |
|
|
|
132 |
|
<img class="l" tabindex=1 alt="HP EliteBook 820 G2" class="p" src="https://av.libreboot.org/hp820g2/hp820g2_backlit.jpg" /><span class="f"><img src="https://av.libreboot.org/hp820g2/hp820g2_backlit.jpg" /></span> |
|
133 |
|
|
|
134 |
|
NOTE: This section only applies if you haven't enabled write protection. You |
|
135 |
|
can otherwise use the external flashing instructions (see below) for both the |
|
136 |
|
initial installation and updates, but for updates you don't need to re-erase |
|
137 |
|
the private flash, if it was already erased. |
|
138 |
|
|
|
139 |
|
If you're already running Libreboot, and you don't have flash protection |
|
140 |
|
turned on, [internal flashing](../install/) is possible, but please note: |
|
141 |
|
|
|
142 |
|
You must *only* flash the first 12MB, and nothing in the final 4MB of the flash. |
|
143 |
|
This is because the EC firmware is in flash, and we don't touch that during |
|
144 |
|
initial installation or during updates. |
|
145 |
|
|
|
146 |
|
Update it like so: |
|
147 |
|
|
|
148 |
|
Create a dummy 16MB ROM like so: |
|
149 |
|
|
|
150 |
|
``` |
|
151 |
|
dd if=/dev/zero of=new.bin bs=16M count=1 |
|
152 |
|
``` |
|
153 |
|
|
|
154 |
|
Then insert your 12MB Libreboot ROM image into the dummy file: |
|
155 |
|
|
|
156 |
|
``` |
|
157 |
|
dd if=libreboot.rom of=new.bin bs=12M count=1 conv=notrunc |
|
158 |
|
``` |
|
159 |
|
|
|
160 |
|
The `libreboot.rom` file is the 12MB image from Libreboot. The `new.bin` |
|
161 |
|
file is the Libreboot ROM, padded to 16MB. You will not flash the entire 16MB |
|
162 |
|
file, but flashprog detects a 16MB flash IC. This just makes flashrom not |
|
163 |
|
complain about mismatching ROM/chip size. |
|
164 |
|
|
|
165 |
|
NOTE: Libreboot standardises on [flashprog](https://flashprog.org/wiki/Flashprog) |
|
166 |
|
now, as of 27 January 2024, which is a fork of flashrom. |
|
167 |
|
|
|
168 |
|
You should flash each region individually: |
|
169 |
|
|
|
170 |
|
``` |
|
171 |
|
flashprog -p internal --ifd -i gbe -w new.bin --noverify-all |
|
172 |
|
flashprog -p internal --ifd -i bios -w new.bin --noverify-all |
|
173 |
|
flashprog -p internal --ifd -i me -w new.bin --noverify-all |
|
174 |
|
flashprog -p internal --ifd -i ifd -w new.bin --noverify-all |
|
175 |
|
``` |
|
176 |
|
|
|
177 |
|
NOTE: The `--ifd` option uses the regions defined in the *flashed* IFD, so |
|
178 |
|
they must match the ROM. You can otherwise dump a layout file and use that, |
|
179 |
|
using the instructions below (using `-l layout.txt` instead of `--ifd`). |
|
180 |
|
|
|
181 |
|
NOTE: If you already did an installation before, and you don't want to |
|
182 |
|
[change the MAC address](../install/nvmutil.html) stored in the gbe region, |
|
183 |
|
you can skip the gbe/ifd/me regions as above, and flash just the BIOS region. |
|
184 |
|
|
|
185 |
|
NOTE: Use of `--ifd` requires flashrom 1.2 or higher. If you have an older |
|
186 |
|
version, or you don't have `--ifd`, you could instead do: |
|
187 |
|
|
|
188 |
|
``` |
|
189 |
|
ifdtool -f layout.txt libreboot.rom |
|
190 |
|
``` |
|
191 |
|
|
|
192 |
|
Then, instead of `--ifd` you would use `-l layout.txt`. |
|
193 |
|
|
|
194 |
|
ALSO: The `--ifd` option makes flashrom flash regions based on what's in |
|
195 |
|
the *current* flashed IFD. |
|
196 |
|
|
|
197 |
|
Flashing Libreboot first time (hardware) |
|
198 |
|
======================================== |
|
199 |
|
|
|
200 |
|
**PLEASE ENSURE that you dump a copy of both flash ICs (system flash and |
|
201 |
|
private flash). Take two dumps of each, and make sure each has two good hashes. |
|
202 |
|
This is because there are certain files that, while you may not need for a |
|
203 |
|
regular Libreboot installation, may be useful for recovery purposes. You have |
|
204 |
|
been warned!** |
|
205 |
|
|
|
206 |
|
This section is relevant to you if you're still running the original HP |
|
207 |
|
firmware. You must [flash externally](../install/spi.md). |
|
208 |
|
|
|
209 |
|
Take stock of these further notes, because there are extra steps that you |
|
210 |
|
must take. |
|
|
79 |
|
More information is available in the [build guide](../build/), including how |
|
80 |
|
to install build dependencies. Building from source is required, because there |
|
81 |
|
aren't any ROM images for this board, in regular Libreboot releases. The |
|
82 |
|
reason is that the vendor inject scripts don't currently work, because coreboot |
|
83 |
|
compresses the refcode when inserting it at build time, and the process of |
|
84 |
|
compression is not yet reproducible; it's not feasible to do so, and making |
|
85 |
|
it not be compressed in flash would not be ideal either, so this is simply |
|
86 |
|
a source-only port in Libreboot. |
211 |
87 |
|
|
212 |
88 |
HP Sure Start |
HP Sure Start |
213 |
|
------------- |
|
|
89 |
|
============= |
214 |
90 |
|
|
215 |
91 |
There is a 16MB flash and a 2MB flash. Read this page for info: |
There is a 16MB flash and a 2MB flash. Read this page for info: |
216 |
92 |
<https://doc.coreboot.org/mainboard/hp/hp_sure_start.html> |
<https://doc.coreboot.org/mainboard/hp/hp_sure_start.html> |
|
... |
... |
flash IC). |
225 |
101 |
|
|
226 |
102 |
You might want to dump the private flash first, just in case (use `-r priv.rom` |
You might want to dump the private flash first, just in case (use `-r priv.rom` |
227 |
103 |
or whatever filename you want to dump to, and take two dumps, ensuring that |
or whatever filename you want to dump to, and take two dumps, ensuring that |
228 |
|
the hashes match). The private (2MB) flash is inaccessible from your OS. The |
|
|
104 |
|
the hashes match); one dump for the first erase, and another for the next |
|
105 |
|
erase. If they match, then the erase was likely a success. The private (2MB) |
|
106 |
|
flash is inaccessible from your OS. The |
229 |
107 |
system stores hashes of the IFD, GbE and a copy of IFD/GbE in private flash, |
system stores hashes of the IFD, GbE and a copy of IFD/GbE in private flash, |
230 |
108 |
restoring them if they were modified, but erasing the private flash disables |
restoring them if they were modified, but erasing the private flash disables |
231 |
109 |
this security mechanism. |
this security mechanism. |
|
... |
... |
Here is a photo of the board, with the flashes: |
234 |
112 |
|
|
235 |
113 |
 |
 |
236 |
114 |
|
|
237 |
|
HP bootblock |
|
238 |
|
------------ |
|
|
115 |
|
<https://doc.coreboot.org/mainboard/hp/elitebook_820_g2.html> |
239 |
116 |
|
|
240 |
|
See: <https://doc.coreboot.org/mainboard/hp/elitebook_820_g2.html?highlight=elitebook> |
|
|
117 |
|
Make sure to read and understand all of this first, before attempting |
|
118 |
|
the Libreboot installation, because it's also important when updating |
|
119 |
|
Libreboot later on. |
241 |
120 |
|
|
242 |
|
In this page it talks about HP's own bootblock and EC firmware. These are in |
|
243 |
|
the final 4MB of the flash. You must *not* modify these, because you will brick |
|
244 |
|
your machine unless the IFD is modified; |
|
|
121 |
|
Installation of Libreboot |
|
122 |
|
========================= |
245 |
123 |
|
|
246 |
|
This is why Libreboot provides 12MB images. The IFD in Libreboot is modified, as |
|
247 |
|
per this coreboot documentation, to make the BIOS region *end* at the last byte |
|
248 |
|
of the first 12MB in flash, bypassing HP's security entirely. In other words, |
|
249 |
|
you can run whatever you want (such as Libreboot) in the first 12MB of flash, |
|
250 |
|
so long as the upper 4MB is untouched and the private 2MB flash has been erased. |
|
|
124 |
|
Make sure to set the MAC address in the flash: |
|
125 |
|
[Modify MAC addresses with nvmutil](../install/nvmutil.md). |
251 |
126 |
|
|
252 |
|
With Libreboot's modified IFD, HP's own bootblock is never executed, but the |
|
253 |
|
EC firmware *is*, and must be left alone. You do not to insert it in your |
|
254 |
|
Libreboot ROM because it's already in flash, within that last 4MB. |
|
|
127 |
|
Refer to the [Libreboot flashing guides](../install/spi.md) |
255 |
128 |
|
|
256 |
|
Flash a ROM image (hardware) |
|
257 |
|
----------------- |
|
|
129 |
|
Here are the flash ICs: |
258 |
130 |
|
|
259 |
|
**REMOVE all power sources like battery, charger and so on, before doing this. |
|
260 |
|
This is to prevent short circuiting and power surges while flashing.** |
|
|
131 |
|
 |
261 |
132 |
|
|
262 |
|
For general information, please refer to [25xx NOR flash |
|
263 |
|
instructions](../install/spi.md). |
|
|
133 |
|
When you flash the 12MB image, please do the following with it: |
264 |
134 |
|
|
265 |
|
Remove the bottom cover via the latch, and the flashes are accessible. |
|
266 |
|
First, dump both flashes for backup, using the `-r` option (instead of `-w`) |
|
267 |
|
in flashrom. Two dumps of each flash, make sure both dumps match for each chip. |
|
|
135 |
|
dd if=/dev/zero of=4mb.bin bs=4M count=1 |
|
136 |
|
cat libreboot.rom 4mb.bin > libreboot16.rom |
268 |
137 |
|
|
269 |
|
We will assume that your system flash (16MB) dump is named `dump.bin`. This is |
|
270 |
|
the dump of your 16MB flash, containing HP's firmware, including the final |
|
271 |
|
bootblock and EC firmware. |
|
|
138 |
|
Be careful: do not fully flash `libreboot16.rom` |
272 |
139 |
|
|
273 |
|
This gives you everything, including the final 4MB. Now insert your new ROM |
|
274 |
|
into a copy of `dump.bin`: |
|
|
140 |
|
Flash it like this, instead: |
275 |
141 |
|
|
276 |
142 |
``` |
``` |
277 |
|
cp -R dump.bin new.bin |
|
278 |
|
dd if=libreboot.rom of=new.bin bs=12M count=1 conv=notrunc |
|
|
143 |
|
flashprog -p PROGRAMMER --ifd -i gbe -w libreboot16.rom --noverify-all |
|
144 |
|
flashprog -p PROGRAMMER --ifd -i bios -w libreboot16.rom --noverify-all |
|
145 |
|
flashprog -p PROGRAMMER --ifd -i me -w libreboot16.rom --noverify-all |
|
146 |
|
flashprog -p PROGRAMMER --ifd -i ifd -w libreboot16.rom --noverify-all |
279 |
147 |
``` |
``` |
280 |
148 |
|
|
281 |
|
Flash `new.bin` to system flash (16MB IC) using the `-w` option in flashrom, |
|
282 |
|
and erase the private (2MB) flash IC, |
|
283 |
|
using the `--erase` option (instead of `-w filename.rom`) in flashrom. |
|
|
149 |
|
Replace `PROGRAMMER` according to whichever flasher you're using. You could |
|
150 |
|
also replace it with `internal`, if later flashing internally to update an |
|
151 |
|
existing Libreboot installation. |
284 |
152 |
|
|
285 |
|
In the above example, you replaced the first 12MB of the HP dump with that of |
|
286 |
|
your Libreboot image, but leaving the final 4MB intact which contains the EC |
|
287 |
|
firmware. Libreboot's custom IFD sets everything so that all regions, from |
|
288 |
|
IFD to GbE, ME and then BIOS region, exist within the first 12MB of flash. |
|
289 |
|
This makes the machine boot from the end of the 12MB section, containing the |
|
290 |
|
coreboot bootblock, instead of the HP bootblock (which is never executed but |
|
291 |
|
must remain intact). |
|
|
153 |
|
If you're flashing internally, add `--noverify-all` to the flashprog |
|
154 |
|
command. |
292 |
155 |
|
|
293 |
|
It's very important that you *erase* the 2MB flash. Be careful *not* to |
|
294 |
|
erase the system (16MB flash). This is yet another reason why you should keep |
|
295 |
|
a backup of both flash ICs, just in case (dumped using `-r` in flashrom). |
|
|
156 |
|
To erase the 2MB flash, do this: |
296 |
157 |
|
|
297 |
|
 |
|
298 |
|
|
|
299 |
|
 |
|
|
158 |
|
``` |
|
159 |
|
flashprog -p PROGRAMMER --erase |
|
160 |
|
``` |
300 |
161 |
|
|
301 |
|
And that's all. Refer to other documents on Libreboot's website for how |
|
302 |
|
to handle Linux/BSD systems and generally use your machine. |
|
|
162 |
|
Refer generally to the [main flashing guide](../install/) and to |
|
163 |
|
the [external flashing guide](../install/spi.md) so that you can learn how |
|
164 |
|
to actually flash it. |
303 |
165 |
|
|
304 |
166 |
TPM 2.0 potentially supported |
TPM 2.0 potentially supported |
305 |
167 |
============================== |
============================== |
|
... |
... |
don't need to mess with this at all, when you build Libreboot yourself. |
325 |
187 |
You can see how this works, by looking at the patch which added 820 G2 support: |
You can see how this works, by looking at the patch which added 820 G2 support: |
326 |
188 |
<https://browse.libreboot.org/lbmk.git/commit/?id=401c0882aaec059eab62b5ce467d3efbc1472d1f> |
<https://browse.libreboot.org/lbmk.git/commit/?id=401c0882aaec059eab62b5ce467d3efbc1472d1f> |
327 |
189 |
|
|
328 |
|
If you're using release builds, the MRC, refcode and (neutered) ME images are |
|
329 |
|
missing from flash, and must be re-inserted, using the instructions |
|
330 |
|
on [this page](../install/ivy_has_common.md). |
|
|
190 |
|
 |
|
191 |
|
|
|
192 |
|
Yay. If you see this boot screen, you should be proud. This is a really |
|
193 |
|
hard machine to flash. |