File site/docs/install/dell_internal.md added (mode: 100644) (index 0000000..275bf19) |
|
1 |
|
--- |
|
2 |
|
title: Internally flash Dell Latitude laptops |
|
3 |
|
x-toc-enable: true |
|
4 |
|
... |
|
5 |
|
|
|
6 |
|
Make sure SecureBoot is disabled, if you're running a UEFI-based Latitude. |
|
7 |
|
Other steps also required, described on this page and in the `README.md` |
|
8 |
|
file included with `dell-flash-unlock`. |
|
9 |
|
|
|
10 |
|
Internal flashing |
|
11 |
|
================= |
|
12 |
|
|
|
13 |
|
You can simply boot Linux/BSD, on the Dell Latitude you wish to flash, and |
|
14 |
|
run `flashprog` from there, for Libreboot installation. Certain other steps |
|
15 |
|
are also required, documented in the steps below: |
|
16 |
|
|
|
17 |
|
Flashing from BSD |
|
18 |
|
----------------- |
|
19 |
|
|
|
20 |
|
Basically identical to Linux, except that you must |
|
21 |
|
set `kern.securelevel` to -1 on boot, which is equivalent to `iomem=relaxed` |
|
22 |
|
under Linux, for this purpose. |
|
23 |
|
|
|
24 |
|
The `dell-flash-unlock` utility will compile and run just fine. It has been |
|
25 |
|
tested on OpenBSD, NetBSD and FreeBSD. With this in mind, simply follow the |
|
26 |
|
Linux instrucctions but adapt accordingly. |
|
27 |
|
|
|
28 |
|
If unsure, just boot a live Linux distro via USB and run it all there. |
|
29 |
|
|
|
30 |
|
Flashing from Linux |
|
31 |
|
------------------- |
|
32 |
|
|
|
33 |
|
MAKE SURE you boot with this Linux kernel parameter: `iomem=relaxed` - this |
|
34 |
|
disables memory protections, permitting `/dev/mem` access needed by flashprog. |
|
35 |
|
The flash is memory mapped and flashprog accesses it via `/dev/mem`. |
|
36 |
|
|
|
37 |
|
You can flash Libreboot directly from the vendor (Dell) BIOS, without taking |
|
38 |
|
the machine apart. It can be done entirely from Linux. It will probably also |
|
39 |
|
work on BSD systems, but it has only been testing on Linux thus far. |
|
40 |
|
|
|
41 |
|
**NOTE (15 October 2023): The util is now called `dell-flash-unlock`, but it |
|
42 |
|
was previously called `e6400-flash-unlock`. Links have been updated.** |
|
43 |
|
|
|
44 |
|
Check `util/dell-flash-unlock` in the `lbmk.git` repository, or in release |
|
45 |
|
archives for Libreboot releases from 20230423 onwards. |
|
46 |
|
|
|
47 |
|
Go in there: |
|
48 |
|
|
|
49 |
|
cd util/dell-flash-unlock |
|
50 |
|
make |
|
51 |
|
|
|
52 |
|
**With this program, you can unlock the flash in such a way where everything |
|
53 |
|
is writeable. Information about how to use it is in the `README.md` file which |
|
54 |
|
is included in that program's directory, or you can read it online here:** |
|
55 |
|
|
|
56 |
|
**<https://browse.libreboot.org/lbmk.git/plain/util/dell-flash-unlock/README.md>** |
|
57 |
|
|
|
58 |
|
**Please make sure that you do fully read the README, because it contains |
|
59 |
|
useful information.** |
|
60 |
|
|
|
61 |
|
Literally just run that program, and do what it says. You run it once, and shut |
|
62 |
|
down, and when you do, the system brings itself back up automatically; on some |
|
63 |
|
systems, you have to boot the machine back up manually, after power down. Then |
|
64 |
|
you run it and flash it unlocked. Then you run it again. The source code is |
|
65 |
|
intuitive enough that you can easily get the gist of it; it's writing some EC |
|
66 |
|
commands and changing some chipset config bits. The EC on this machine is |
|
67 |
|
hooked up to the `GPIO33` signal, sometimes called `HDA_DOCK_EN`, which sets |
|
68 |
|
the flash descriptor override thus disabling any flash protection by the IFD. |
|
69 |
|
It also bypasses the SMM BIOS lock protection by disabling SMIs, and Dell's |
|
70 |
|
BIOS doesn't set any other type of protection either such as writing to |
|
71 |
|
Protected Range registers. |
|
72 |
|
|
|
73 |
|
MAKE SURE to back up the original firmware image first: |
|
74 |
|
|
|
75 |
|
flashprog -p internal -r factory.rom |
|
76 |
|
|
|
77 |
|
When you flash it, you can use this command: |
|
78 |
|
|
|
79 |
|
flashprog -p internal -w libreboot.rom |
|
80 |
|
|
|
81 |
|
Where `libreboot.rom` is your Dell Latitude ROM. *Make sure* it's the right |
|
82 |
|
one. If flashprog complains about multiple flash chips detected, just pick one of them (doesn't matter which one). On *most* Dell machines, the most correct |
|
83 |
|
would probably be this option in flashprog: `-c MX25L3205D/MX25L3208D`. |
|
84 |
|
|
|
85 |
|
So: |
|
86 |
|
|
|
87 |
|
flashprog -p internal -w libreboot.rom -c MX25L3205D/MX25L3208D |
|
88 |
|
|
|
89 |
|
When you see flashprog say `VERIFIED` at the end, that means the flash was |
|
90 |
|
successful. If you don't see that, or you're unsure, please [contact the |
|
91 |
|
Libreboot project via IRC](../../contact.md). |
File site/docs/install/e6400.md changed (mode: 100644) (index 3b66973..79aa481) |
... |
... |
Use this to find out: |
70 |
70 |
|
|
71 |
71 |
flashprog -p internal |
flashprog -p internal |
72 |
72 |
|
|
73 |
|
We believe most/all are 4MB (32Mb) flash sizes, but larger ROM images are |
|
74 |
|
provided for people who wish to upgrade. |
|
|
73 |
|
We believe most/all are 4MB (32Mb) flash sizes. The schematics hint that |
|
74 |
|
some boards may have 6MB flash (4MB and 2MB, dual chip), but we've only ever |
|
75 |
|
seen 4MB setups in the wild. You can still flash the 4MB image on 6MB setups, |
|
76 |
|
if it's encountered, by just leaving the higher 2MB part unflashed, because |
|
77 |
|
the flash descriptor (in Libreboot) configures everything so that the BIOS |
|
78 |
|
region ends just before the 4MB mark, in flash; the BIOS region is the final |
|
79 |
|
region, in the higher part of flash as defined *by the descriptor*, regardless |
|
80 |
|
of whether that is the actual end of the flash. |
|
81 |
|
|
|
82 |
|
Libreboot does currently provide 6MB images on this board, for these reasons. |
75 |
83 |
|
|
76 |
84 |
MAC address {#macaddress} |
MAC address {#macaddress} |
77 |
85 |
=========== |
=========== |
|
... |
... |
codeberg](https://codeberg.org/libreboot/lbmk/issues/14#issuecomment-907758). |
171 |
179 |
How to flash internally (no diassembly) |
How to flash internally (no diassembly) |
172 |
180 |
======================================= |
======================================= |
173 |
181 |
|
|
174 |
|
Flashing from Linux |
|
175 |
|
------------------- |
|
176 |
|
|
|
177 |
|
MAKE SURE you boot with this Linux kernel parameter: `iomem=relaxed` - this |
|
178 |
|
disables memory protections, permitting `/dev/mem` access needed by flashprog. |
|
179 |
|
The flash is memory mapped and flashprog accesses it via `/dev/mem`. |
|
180 |
|
|
|
181 |
|
You can flash Libreboot directly from the vendor (Dell) BIOS, without taking |
|
182 |
|
the machine apart. It can be done entirely from Linux. It will probably also |
|
183 |
|
work on BSD systems, but it has only been testing on Linux thus far. |
|
184 |
|
|
|
185 |
|
**NOTE (15 October 2023): The util is now called `dell-flash-unlock`, but it |
|
186 |
|
was previously called `e6400-flash-unlock`. Links have been updated.** |
|
187 |
|
|
|
188 |
|
Check `util/dell-flash-unlock` in the `lbmk.git` repository, or in release |
|
189 |
|
archives for Libreboot releases from 20230423 onwards. |
|
190 |
|
|
|
191 |
|
Go in there: |
|
192 |
|
|
|
193 |
|
cd util/dell-flash-unlock |
|
194 |
|
make |
|
195 |
|
|
|
196 |
|
With this program, you can unlock the flash in such a way where everything |
|
197 |
|
is writeable. Information about how to use it is in the `README.md` file which |
|
198 |
|
is included in that program's directory, or you can read it online here: |
|
199 |
|
|
|
200 |
|
<https://browse.libreboot.org/lbmk.git/plain/util/dell-flash-unlock/README.md> |
|
201 |
|
|
|
202 |
|
Literally just run that program, and do what it says. You run it once, and shut |
|
203 |
|
down, and when you do, the system brings itself back up automatically. Then |
|
204 |
|
you run it and flash it unlocked. Then you run it again. The source code is |
|
205 |
|
intuitive enough that you can easily get the gist of it; it's writing some EC |
|
206 |
|
commands and changing some chipset config bits. The EC on this machine is |
|
207 |
|
hooked up to the `GPIO33` signal, sometimes called `HDA_DOCK_EN`, which sets |
|
208 |
|
the flash descriptor override thus disabling any flash protection by the IFD. |
|
209 |
|
It also bypasses the SMM BIOS lock protection by disabling SMIs, and Dell's |
|
210 |
|
BIOS doesn't set any other type of protection either such as writing to |
|
211 |
|
Protected Range registers. |
|
212 |
|
|
|
213 |
|
When you flash it, you can use this command: |
|
214 |
|
|
|
215 |
|
flashprog -p internal -w libreboot.rom |
|
216 |
|
|
|
217 |
|
Where `libreboot.rom` is your E6400 ROM. *Make sure* it's the right one. |
|
218 |
|
If flashprog complains about multiple flash chips detected, just pick one of |
|
219 |
|
them (doesn't matter which one). On *most* Dell machines, the most correct |
|
220 |
|
would probably be this option in flashprog: `-c MX25L3205D/MX25L3208D`. |
|
221 |
|
|
|
222 |
|
So: |
|
223 |
|
|
|
224 |
|
flashprog -p internal -w libreboot.rom -c MX25L3205D/MX25L3208D |
|
225 |
|
|
|
226 |
|
When you see flashprog say `VERIFIED` at the end, that means the flash was |
|
227 |
|
successful. If you don't see that, or you're unsure, please [contact the |
|
228 |
|
Libreboot project via IRC](../../contact.md). |
|
229 |
|
|
|
230 |
|
BACK UP THE FACTORY BIOS |
|
231 |
|
======================== |
|
232 |
|
|
|
233 |
|
The `-w` option flashes `libreboot.rom`. You may consider *backing up* the |
|
234 |
|
original Dell BIOS first, using the -r option: |
|
235 |
|
|
|
236 |
|
flashprog -p internal -r backup.rom -c MX25L3205D/MX25L3208D |
|
237 |
|
|
|
238 |
|
Do this while in a flashable state, after the 2nd run of `dell-flash-unlock`. |
|
|
182 |
|
Please read the article: |
239 |
183 |
|
|
240 |
|
Make sure the `backup.rom` file gets backed up to an external storage media, |
|
241 |
|
not the E6400 itself. |
|
|
184 |
|
[Internally flash Dell Latitude laptops](dell_internal.md) |
242 |
185 |
|
|
243 |
|
With this method, you can probably flash it within 5 minutes. Again, zero |
|
244 |
|
disassembly required! |
|
|
186 |
|
Dell's original BIOS/UEFI firmware typically prevents write access, but it |
|
187 |
|
has bugs which can be exploited, to enable Libreboot installation very easily. |
|
188 |
|
You do not have to disassemble the machine. |
245 |
189 |
|
|
246 |
190 |
How to flash externally |
How to flash externally |
247 |
191 |
========================= |
========================= |
File site/docs/install/e6430.md changed (mode: 100644) (index 602e3ac..a33591e) |
... |
... |
and should be assumed *broken* by default. |
22 |
22 |
Flash chip size {#flashchips} |
Flash chip size {#flashchips} |
23 |
23 |
=============== |
=============== |
24 |
24 |
|
|
25 |
|
Use this to find out: |
|
26 |
|
|
|
27 |
|
flashprog -p internal |
|
28 |
|
|
|
29 |
25 |
The internal flash size is 12MiB on this board; physically, an 8MiB and 4MiB |
The internal flash size is 12MiB on this board; physically, an 8MiB and 4MiB |
30 |
26 |
chip (two chips) but this distinction only matters for external flashing. |
chip (two chips) but this distinction only matters for external flashing. |
31 |
27 |
|
|
|
... |
... |
that the Nvidia models do not work. |
72 |
68 |
How to flash internally (no diassembly) |
How to flash internally (no diassembly) |
73 |
69 |
======================================= |
======================================= |
74 |
70 |
|
|
75 |
|
Warning for BSD users |
|
76 |
|
--------------------- |
|
77 |
|
|
|
78 |
|
**NOTE (15 October 2023): The util is now called `dell-flash-unlock`, but it |
|
79 |
|
was previously called `e6400-flash-unlock`. Links have been updated.** |
|
80 |
|
|
|
81 |
|
BSD *boots* and works properly on these machines, but take note: |
|
82 |
|
|
|
83 |
|
Nicholas's [dell-flash-unlock](https://browse.libreboot.org/lbmk.git/plain/util/dell-flash-unlock/dell_flash_unlock.c) |
|
84 |
|
utility has been ported to OpenBSD, but *other* BSDs are assumed unsupported for |
|
85 |
|
now. |
|
86 |
|
|
|
87 |
|
NOTE: Libreboot standardises on [flashprog](https://flashprog.org/wiki/Flashprog) |
|
88 |
|
now, as of 27 January 2024, which is a fork of flashrom. |
|
89 |
|
|
|
90 |
|
NOTE: BSD is mentioned above, but the only BSD tested for `dell-flash-unlock` |
|
91 |
|
is OpenBSD, as of 15 October 2023. |
|
92 |
|
|
|
93 |
|
Flashing from Linux |
|
94 |
|
------------------- |
|
95 |
|
|
|
96 |
|
MAKE SURE you boot with this Linux kernel parameter: `iomem=relaxed` - this |
|
97 |
|
disables memory protections, permitting `/dev/mem` access needed by flashprog. |
|
98 |
|
The flash is memory mapped and flashprog accesses it via `/dev/mem`. |
|
99 |
|
|
|
100 |
|
You can flash Libreboot directly from the vendor (Dell) BIOS, without taking |
|
101 |
|
the machine apart. It can be done entirely from Linux. It will probably also |
|
102 |
|
work on BSD systems, but it has only been testing on Linux thus far. |
|
103 |
|
|
|
104 |
|
**NOTE (15 October 2023): The util is now called `dell-flash-unlock`, but it |
|
105 |
|
was previously called `e6400-flash-unlock`. Links have been updated.** |
|
106 |
|
|
|
107 |
|
Check `util/dell-flash-unlock` in the `lbmk.git` repository, or in release |
|
108 |
|
archives for Libreboot releases from 20230423 onwards. |
|
109 |
|
|
|
110 |
|
Go in there: |
|
111 |
|
|
|
112 |
|
cd util/dell-flash-unlock |
|
113 |
|
make |
|
114 |
|
|
|
115 |
|
With this program, you can unlock the flash in such a way where everything |
|
116 |
|
is writeable. Information about how to use it is in the `README.md` file which |
|
117 |
|
is included in that program's directory, or you can read it online here: |
|
118 |
|
|
|
119 |
|
<https://browse.libreboot.org/lbmk.git/plain/util/dell-flash-unlock/README.md> |
|
120 |
|
|
|
121 |
|
Literally just run that program, and do what it says. You run it once, shut |
|
122 |
|
down, and then power on the machine. Then run it again to confirm that the |
|
123 |
|
flash is unlocked. The source code is intuitive enough that you can easily get |
|
124 |
|
the gist of it; it's writing some EC commands and changing some chipset config |
|
125 |
|
bits. The EC on this machine is hooked up to the `HDA_SDO` signal, also known |
|
126 |
|
as the Flash Descriptor Override (FDO), which disables any flash protection by |
|
127 |
|
the IFD. When booted with the FDO set, the original Dell firmware disables all |
|
128 |
|
other BIOS write protections such as SMM BIOS lock bits. |
|
129 |
|
|
|
130 |
|
*Make sure* to make a backup of the original firmware before proceeding to |
|
131 |
|
flash; see the instructions below. |
|
132 |
|
|
|
133 |
|
When you flash it, you can use this command: |
|
134 |
|
|
|
135 |
|
flashprog -p internal -w libreboot.rom |
|
136 |
|
|
|
137 |
|
Where `libreboot.rom` is your E6430 ROM. *Make sure* it's the right one. |
|
138 |
|
If flashprog complains about multiple flash chips detected, just pick one of |
|
139 |
|
them (doesn't matter which one), with the `-C` flag as directed; just pick one, |
|
140 |
|
and if it doesn't work, try the next. |
|
141 |
|
|
|
142 |
|
When you see flashprog say `VERIFIED` at the end, that means the flash was |
|
143 |
|
successful. If you don't see that, or you're unsure, please [contact the |
|
144 |
|
Libreboot project via IRC](../../contact.md). |
|
145 |
|
|
|
146 |
|
BACK UP THE FACTORY BIOS |
|
147 |
|
======================== |
|
148 |
|
|
|
149 |
|
The `-w` option flashes `libreboot.rom`. You may consider *backing up* the |
|
150 |
|
original Dell BIOS first, using the -r option: |
|
151 |
|
|
|
152 |
|
flashprog -p internal -r backup.rom |
|
153 |
|
|
|
154 |
|
AGAIN: make sure to use `-C` accordingly, if you need to pick a chip (where |
|
155 |
|
flashprog has detected multiple chip definitions). Just pick one, any of them |
|
156 |
|
will probably work, if not try the next. |
|
157 |
|
|
|
158 |
|
Do this while in a flashable state, after the 2nd run of `dell-flash-unlock`. |
|
|
71 |
|
Please read the article: |
159 |
72 |
|
|
160 |
|
Make sure the `backup.rom` file gets backed up to an external storage media, |
|
161 |
|
not the E6430 itself. |
|
|
73 |
|
[Internally flash Dell Latitude laptops](dell_internal.md) |
162 |
74 |
|
|
163 |
|
With this method, you can probably flash it within 5 minutes. Again, zero |
|
164 |
|
disassembly required! |
|
|
75 |
|
Dell's original BIOS/UEFI firmware typically prevents write access, but it |
|
76 |
|
has bugs which can be exploited, to enable Libreboot installation very easily. |
|
77 |
|
You do not have to disassemble the machine. |
165 |
78 |
|
|
166 |
79 |
How to flash externally |
How to flash externally |
167 |
80 |
========================= |
========================= |