Debian Codegraph @

Documentation/mainboard/gigabyte/ga-g41m-es2l.md

raw symbols SCIP
1 # Gigabyte GA-G41M-ES2L rev 1.1
2
3 This page describes how to use coreboot on the [Gigabyte GA-G41M-ES2L rev 1.1](https://www.gigabyte.com/Motherboard/GA-G41M-ES2L-rev-11) mainboard.
4
5 This motherboard [also works with Libreboot](https://libreboot.org/docs/install/ga-g41m-es2l.html).
6
7 ## Technology
8
9 ```{eval-rst}
10 +------------------+--------------------------------------------------+
11 | Type | Value |
12 +==================+==================================================+
13 | BIOS flash chips | 2 x SST25VF080B (8 Mbit SPI) (DUAL BIOS) |
14 +------------------+--------------------------------------------------+
15 | Northbridge | Intel G41 |
16 +------------------+--------------------------------------------------+
17 | Southbridge | Intel ICH7 |
18 +------------------+--------------------------------------------------+
19 | CPU socket | LGA775 |
20 +------------------+--------------------------------------------------+
21 | RAM | 2 x DDR2 800, max. 8 GiB |
22 +------------------+--------------------------------------------------+
23 | SuperIO | ITE IT8718F-S |
24 +------------------+--------------------------------------------------+
25 | Audio | Realtek ALC888B |
26 +------------------+--------------------------------------------------+
27 | Network | Realtek RTL8111C PCIe Gigabit Ethernet |
28 +------------------+--------------------------------------------------+
29 ```
30
31 ## Preparation
32
33 For more datails how to get sources and build the toolchain, see <project:../../tutorial/part1.md>.
34
35 ### Devuan 4 Chimaera
36
37 This probably works also for any fresh Debian/Ubuntu-based distros.
38
39 Install tools and libraries needed for coreboot:
40
41 ```shell
42 sudo apt-get -V install bison build-essential curl flex git gnat libncurses5-dev m4 zlib1g-dev wget python2 python-is-python2 flashrom
43 ```
44
45 ### Get sources
46
47 You need about 700 MB disk space for sources only and ~2GB disk space for sources + build results
48
49 ```shell
50 git clone --recursive https://review.coreboot.org/coreboot.git
51 ```
52
53 ### Build toolchain
54
55 Your system compilers can be different with versions, tested by coreboot developers.
56 So, it is recommended to build cross-compilers with special versions, which were tested with coreboot.
57
58 It is possible to skip this time-consuming part and use `ANY_TOOLCHAIN=y`, but this not recommended.
59
60 You can build them for all platforms: `make crossgcc CPUS=2` but this takes ~2 hours with Intel core2duo E8400.
61
62 The best way, probably, is to build cross-compilers for your platform (this takes ~20 minutes with Intel core2duo E8400):
63
64 ```shell
65 make crossgcc-i386 CPUS=2
66 ```
67
68 ### Save MAC-address of internal LAN
69
70 Run `ip -c link show`, you will find MAC-address like 6c:f0:49:xx:xx:xx
71
72 ```
73 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
74 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
75 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
76 link/ether 6c:f0:49:xx:xx:xx brd ff:ff:ff:ff:ff:ff
77 ```
78
79 ## Configure
80
81 Create file `payloads/external/SeaBIOS/.config_seabios`:
82
83 ```shell
84 CONFIG_COREBOOT=y
85 CONFIG_ATA_DMA=y
86 CONFIG_VGA_COREBOOT=y
87 ```
88
89 Edit file `configs/config.gigabyte_ga-g41m-es2l`, replace `CONFIG_REALTEK_8168_MACADDRESS` value with your MAC-address.
90
91 Run
92
93 ```shell
94 make defconfig KBUILD_DEFCONFIG="configs/config.gigabyte_ga-g41m-es2l"
95 ```
96
97 ## Build
98
99 Just execute:
100
101 ```shell
102 make
103 ```
104
105 It takes ~2 minutes with Intel core2duo E8400.
106
107 Example of last part in the output:
108
109 ```
110 CBFSPRINT coreboot.rom
111
112 FMAP REGION: COREBOOT
113 Name Offset Type Size Comp
114 cbfs master header 0x0 cbfs header 32 none
115 fallback/romstage 0x80 stage 62316 none
116 cpu_microcode_blob.bin 0xf480 microcode 180224 none
117 fallback/ramstage 0x3b500 stage 98745 none
118 vgaroms/seavgabios.bin 0x53700 raw 28672 none
119 config 0x5a740 raw 301 none
120 revision 0x5a8c0 raw 675 none
121 build_info 0x5abc0 raw 103 none
122 fallback/dsdt.aml 0x5ac80 raw 8447 none
123 rt8168-macaddress 0x5cdc0 raw 17 none
124 vbt.bin 0x5ce40 raw 802 LZMA (1899 decompressed)
125 cmos.default 0x5d1c0 cmos_default 256 none
126 cmos_layout.bin 0x5d300 cmos_layout 1040 none
127 fallback/postcar 0x5d740 stage 20844 none
128 fallback/payload 0x62900 simple elf 70270 none
129 payload_config 0x73bc0 raw 1699 none
130 payload_revision 0x742c0 raw 237 none
131 (empty) 0x74400 null 482904 none
132 bootblock 0xea280 bootblock 23360 none
133 HOSTCC cbfstool/ifwitool.o
134 HOSTCC cbfstool/ifwitool (link)
135
136 Built gigabyte/ga-g41m-es2l (GA-G41M-ES2L)
137 ```
138
139 ## Flashing coreboot
140
141 In addition to the information here, please see the
142 <project:../../tutorial/flashing_firmware/index.md>.
143
144 ### Do backup
145
146 The above commands read the SPI flash chip(s), write into file and then verify content again with the chip:
147
148 ```shell
149 sudo flashrom -p internal:dualbiosindex=0 -r m_bios.rom
150 sudo flashrom -p internal:dualbiosindex=0 -v m_bios.rom
151 sudo flashrom -p internal:dualbiosindex=1 -r b_bios.rom
152 sudo flashrom -p internal:dualbiosindex=1 -v b_bios.rom
153 ```
154
155 If access error appeared, then add `iomem=relaxed` to Linux kernel parameters and restart your Linux system.
156
157 You can also repeat backup and compare checksums manually.
158
159 Backup file should be stored elsewhere, so that in case the coreboot build is faulty, some external procedure can be used without having to extract the backup from the target device first.
160
161 ### Write new flash image
162
163 Let's write new image into SPI flash chip, verify checksum again and erase second flash chip:
164
165 ```shell
166 sudo flashrom -p internal:dualbiosindex=0 -w build/coreboot.rom
167 sudo flashrom -p internal:dualbiosindex=0 -v build/coreboot.rom
168 sudo flashrom -p internal:dualbiosindex=1 -E
169 ```
170
171 ## Set text mode for GRUB
172
173 Update your `/etc/default/grub` with:
174
175 ```shell
176 GRUB_TERMINAL=console
177 ```
178
179 And recreate GRUB configuration `/boot/grub/grub.cfg` by command
180
181 ```shell
182 sudo update-grub
183 ```
184
185 ## Boot with new firmware
186
187 Restart your system:
188
189 ```shell
190 sudo shutdown -r now
191 ```
192
193 If it is needed, use <kbd>Esc</kbd> key to choose boot device.
194
195 Remove `iomem=relaxed` from Linux kernel parameters.
196
197 Enjoy!
198
199 ## Status
200
201 ```
202 +-----------------------+--------------------------+--------+-------------------------------+
203 | coreboot version | Date of sources checkout | Status | Comment |
204 +-----------------------+--------------------------+--------+-------------------------------+
205 | 4.13-1531-g2fae1c0494 | 2021-01-28 | Good | |
206 +-----------------------+--------------------------+--------+-------------------------------+
207 | 4.13-2182-g6410a0002f | 2021-02-18 | Good | |
208 +-----------------------+--------------------------+--------+-------------------------------+
209 ```
210
211 ### Known issues
212
213 Lm-sensors shows wrong values from it87:
214
215 ```
216 coretemp-isa-0000
217 Adapter: ISA adapter
218 Core 0: +27.0°C (high = +80.0°C, crit = +100.0°C)
219 Core 1: +31.0°C (high = +80.0°C, crit = +100.0°C)
220
221 it8718-isa-0290
222 Adapter: ISA adapter
223 in0: 1.06 V (min = +0.00 V, max = +4.08 V)
224 in1: 1.90 V (min = +0.00 V, max = +4.08 V)
225 in2: 3.34 V (min = +0.00 V, max = +4.08 V)
226 +5V: 2.96 V (min = +0.00 V, max = +4.08 V)
227 in4: 224.00 mV (min = +0.00 V, max = +4.08 V)
228 in5: 4.08 V (min = +0.00 V, max = +4.08 V) ALARM
229 in6: 4.08 V (min = +0.00 V, max = +4.08 V) ALARM
230 in7: 3.09 V (min = +0.00 V, max = +4.08 V)
231 Vbat: 2.82 V
232 fan1: 1290 RPM (min = 0 RPM)
233 fan2: 0 RPM (min = 0 RPM)
234 temp1: -54.0°C (low = +0.0°C, high = +127.0°C) sensor = thermistor
235 temp2: -1.0°C (low = +0.0°C, high = +127.0°C) sensor = thermistor
236 temp3: +44.0°C (low = +0.0°C, high = +127.0°C) sensor = thermal diode
237 cpu0_vid: +1.100 V
238 intrusion0: ALARM
239 ```
240
241 ### Working
242
243 - RAM 1,2x1GiB DDR2 PC2-6400 Kingston KTC1G-UDIMM (1.8V, 2Rx8 ?)
244 - RAM 1x1GiB DDR2 PC2-5300 Brooktree AU1G08E32-667P005 / Apogee AU1G082-667P005 CL6 (1.8V, 2Rx8 ?)
245 - CPU E8400
246 - ACPI
247 - CPU frequency scaling
248 - flashrom under coreboot
249 - Gigabit Ethernet
250 - Hardware monitoring
251 - Integrated graphics
252 - SATA
253 - PCI POST card
254
255 ### Not working
256
257 - SuperIO based fan control: PWM fan speed is not changing in depend of CPU temperature
258 - RAM 1,2x4GiB DDR2 PC2-6400 Samsung M378T5263AZ3-CF7 (2Rx4 PC2-6400U-666-12-E3)
259
260 ### Not tested
261
262 - KVM virtualization
263 - Onboard audio
264 - PCI
265 - PCIe
266 - PS/2 keyboard mouse (during payload, bootloader)
267 - Serial port
268 - USB (disabling XHCI controller makes to work as fallback USB2.0 ports)
269 - IOMMU
270
271 ## Interesting facts
272
273 `lshw` output is different for BIOS and coreboot.
274
275 ```shell
276 diff --side-by-side --ignore-all-space --strip-trailing-cr \
277 Documentation/mainboard/gigabyte/ga-g41m-es2l_lshw_before_coreboot.txt \
278 Documentation/mainboard/gigabyte/ga-g41m-es2l_lshw_after_coreboot.txt
279 ```