| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,283 @@ | ||
| # Gigabyte GA-G41M-ES2L rev 1.1 | ||
|
|
||
| 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. | ||
|
|
||
| This motherboard [also works with Libreboot](https://libreboot.org/docs/install/ga-g41m-es2l.html). | ||
|
|
||
| ## Technology | ||
|
|
||
| ```eval_rst | ||
| +------------------+--------------------------------------------------+ | ||
| | Type | Value | | ||
| +==================+==================================================+ | ||
| | BIOS flash chips | 2 x SST25VF080B (8 Mbit SPI) (DUAL BIOS) | | ||
| +------------------+--------------------------------------------------+ | ||
| | Northbridge | Intel G41 | | ||
| +------------------+--------------------------------------------------+ | ||
| | Southbridge | Intel ICH7 | | ||
| +------------------+--------------------------------------------------+ | ||
| | CPU socket | LGA775 | | ||
| +------------------+--------------------------------------------------+ | ||
| | RAM | 2 x DDR2 800, max. 8 GiB | | ||
| +------------------+--------------------------------------------------+ | ||
| | SuperIO | ITE IT8718F-S | | ||
| +------------------+--------------------------------------------------+ | ||
| | Audio | Realtek ALC888B | | ||
| +------------------+--------------------------------------------------+ | ||
| | Network | Realtek RTL8111C PCIe Gigabit Ethernet | | ||
| +------------------+--------------------------------------------------+ | ||
| ``` | ||
|
|
||
| ## Preparation | ||
|
|
||
| ```eval_rst | ||
| For more datails how to get sources and build the toolchain, see :doc:`../../tutorial/part1`. | ||
| ``` | ||
|
|
||
| ### Devuan 4 Chimaera | ||
|
|
||
| This probably works also for any fresh Debian/Ubuntu-based distros. | ||
|
|
||
| Install tools and libraries needed for coreboot: | ||
|
|
||
| ```shell | ||
| sudo apt-get -V install bison build-essential curl flex git gnat libncurses5-dev m4 zlib1g-dev wget python2 python-is-python2 flashrom | ||
| ``` | ||
|
|
||
| ### Get sources | ||
|
|
||
| You need about 700 MB disk space for sources only and ~2GB disk space for sources + build results | ||
|
|
||
| ```shell | ||
| git clone --recursive https://review.coreboot.org/coreboot.git | ||
| ``` | ||
|
|
||
| ### Build toolchain | ||
|
|
||
| Your system compilers can be different with versions, tested by coreboot developers. | ||
| So, it is recommended to build cross-compilers with special versions, which were tested with coreboot. | ||
|
|
||
| It is possible to skip this time-consuming part and use `ANY_TOOLCHAIN=y`, but this not recommended. | ||
|
|
||
| You can build them for all platforms: `make crossgcc CPUS=2` but this takes ~2 hours with Intel core2duo E8400. | ||
|
|
||
| The best way, probably, is to build cross-compilers for your platform (this takes ~20 minutes with Intel core2duo E8400): | ||
|
|
||
| ```shell | ||
| make crossgcc-i386 CPUS=2 | ||
| ``` | ||
|
|
||
| ### Save MAC-address of internal LAN | ||
|
|
||
| Run `ip -c link show`, you will find MAC-address like 6c:f0:49:xx:xx:xx | ||
|
|
||
| ``` | ||
| 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 | ||
| link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 | ||
| 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000 | ||
| link/ether 6c:f0:49:xx:xx:xx brd ff:ff:ff:ff:ff:ff | ||
| ``` | ||
|
|
||
| ## Configure | ||
|
|
||
| Create file `payloads/external/SeaBIOS/.config_seabios`: | ||
|
|
||
| ```shell | ||
| CONFIG_COREBOOT=y | ||
| CONFIG_ATA_DMA=y | ||
| CONFIG_VGA_COREBOOT=y | ||
| ``` | ||
|
|
||
| Edit file `configs/config.gigabyte_ga-g41m-es2l`, replace `CONFIG_REALTEK_8168_MACADDRESS` value with your MAC-address. | ||
|
|
||
| Run | ||
|
|
||
| ```shell | ||
| make defconfig KBUILD_DEFCONFIG="configs/config.gigabyte_ga-g41m-es2l" | ||
| ``` | ||
|
|
||
| ## Build | ||
|
|
||
| Just execute: | ||
|
|
||
| ```shell | ||
| make | ||
| ``` | ||
|
|
||
| It takes ~2 minutes with Intel core2duo E8400. | ||
|
|
||
| Example of last part in the output: | ||
|
|
||
| ``` | ||
| CBFSPRINT coreboot.rom | ||
| FMAP REGION: COREBOOT | ||
| Name Offset Type Size Comp | ||
| cbfs master header 0x0 cbfs header 32 none | ||
| fallback/romstage 0x80 stage 62316 none | ||
| cpu_microcode_blob.bin 0xf480 microcode 180224 none | ||
| fallback/ramstage 0x3b500 stage 98745 none | ||
| vgaroms/seavgabios.bin 0x53700 raw 28672 none | ||
| config 0x5a740 raw 301 none | ||
| revision 0x5a8c0 raw 675 none | ||
| build_info 0x5abc0 raw 103 none | ||
| fallback/dsdt.aml 0x5ac80 raw 8447 none | ||
| rt8168-macaddress 0x5cdc0 raw 17 none | ||
| vbt.bin 0x5ce40 raw 802 LZMA (1899 decompressed) | ||
| cmos.default 0x5d1c0 cmos_default 256 none | ||
| cmos_layout.bin 0x5d300 cmos_layout 1040 none | ||
| fallback/postcar 0x5d740 stage 20844 none | ||
| fallback/payload 0x62900 simple elf 70270 none | ||
| payload_config 0x73bc0 raw 1699 none | ||
| payload_revision 0x742c0 raw 237 none | ||
| (empty) 0x74400 null 482904 none | ||
| bootblock 0xea280 bootblock 23360 none | ||
| HOSTCC cbfstool/ifwitool.o | ||
| HOSTCC cbfstool/ifwitool (link) | ||
| Built gigabyte/ga-g41m-es2l (GA-G41M-ES2L) | ||
| ``` | ||
|
|
||
| ## Flashing coreboot | ||
|
|
||
| ```eval_rst | ||
| In addition to the information here, please see the | ||
| :doc:`../../flash_tutorial/index`. | ||
| ``` | ||
|
|
||
| ### Do backup | ||
|
|
||
| The above commands read the SPI flash chip(s), write into file and then verify content again with the chip: | ||
|
|
||
| ```shell | ||
| sudo flashrom -p internal:dualbiosindex=0 -r m_bios.rom | ||
| sudo flashrom -p internal:dualbiosindex=0 -v m_bios.rom | ||
| sudo flashrom -p internal:dualbiosindex=1 -r b_bios.rom | ||
| sudo flashrom -p internal:dualbiosindex=1 -v b_bios.rom | ||
| ``` | ||
|
|
||
| If access error appeared, then add `iomem=relaxed` to Linux kernel parameters and restart your Linux system. | ||
|
|
||
| You can also repeat backup and compare checksums manually. | ||
|
|
||
| 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. | ||
|
|
||
| ### Write new flash image | ||
|
|
||
| Let's write new image into SPI flash chip, verify checksum again and erase second flash chip: | ||
|
|
||
| ```shell | ||
| sudo flashrom -p internal:dualbiosindex=0 -w build/coreboot.rom | ||
| sudo flashrom -p internal:dualbiosindex=0 -v build/coreboot.rom | ||
| sudo flashrom -p internal:dualbiosindex=1 -E | ||
| ``` | ||
|
|
||
| ## Set text mode for GRUB | ||
|
|
||
| Update your `/etc/default/grub` with: | ||
|
|
||
| ```shell | ||
| GRUB_TERMINAL=console | ||
| ``` | ||
|
|
||
| And recreate GRUB configuration `/boot/grub/grub.cfg` by command | ||
|
|
||
| ```shell | ||
| sudo update-grub | ||
| ``` | ||
|
|
||
| ## Boot with new firmware | ||
|
|
||
| Restart your system: | ||
|
|
||
| ```shell | ||
| sudo shutdown -r now | ||
| ``` | ||
|
|
||
| If it is needed, use <kbd>Esc</kbd> key to choose boot device. | ||
|
|
||
| Remove `iomem=relaxed` from Linux kernel parameters. | ||
|
|
||
| Enjoy! | ||
|
|
||
| ## Status | ||
|
|
||
| ``` | ||
| +-----------------------+--------------------------+--------+-------------------------------+ | ||
| | coreboot version | Date of sources checkout | Status | Comment | | ||
| +-----------------------+--------------------------+--------+-------------------------------+ | ||
| | 4.13-1531-g2fae1c0494 | 2021-01-28 | Good | | | ||
| +-----------------------+--------------------------+--------+-------------------------------+ | ||
| | 4.13-2182-g6410a0002f | 2021-02-18 | Good | | | ||
| +-----------------------+--------------------------+--------+-------------------------------+ | ||
| ``` | ||
|
|
||
| ### Known issues | ||
|
|
||
| Lm-sensors shows wrong values from it87: | ||
|
|
||
| ``` | ||
| coretemp-isa-0000 | ||
| Adapter: ISA adapter | ||
| Core 0: +27.0°C (high = +80.0°C, crit = +100.0°C) | ||
| Core 1: +31.0°C (high = +80.0°C, crit = +100.0°C) | ||
| it8718-isa-0290 | ||
| Adapter: ISA adapter | ||
| in0: 1.06 V (min = +0.00 V, max = +4.08 V) | ||
| in1: 1.90 V (min = +0.00 V, max = +4.08 V) | ||
| in2: 3.34 V (min = +0.00 V, max = +4.08 V) | ||
| +5V: 2.96 V (min = +0.00 V, max = +4.08 V) | ||
| in4: 224.00 mV (min = +0.00 V, max = +4.08 V) | ||
| in5: 4.08 V (min = +0.00 V, max = +4.08 V) ALARM | ||
| in6: 4.08 V (min = +0.00 V, max = +4.08 V) ALARM | ||
| in7: 3.09 V (min = +0.00 V, max = +4.08 V) | ||
| Vbat: 2.82 V | ||
| fan1: 1290 RPM (min = 0 RPM) | ||
| fan2: 0 RPM (min = 0 RPM) | ||
| temp1: -54.0°C (low = +0.0°C, high = +127.0°C) sensor = thermistor | ||
| temp2: -1.0°C (low = +0.0°C, high = +127.0°C) sensor = thermistor | ||
| temp3: +44.0°C (low = +0.0°C, high = +127.0°C) sensor = thermal diode | ||
| cpu0_vid: +1.100 V | ||
| intrusion0: ALARM | ||
| ``` | ||
|
|
||
| ### Working | ||
|
|
||
| - RAM 1,2x1GiB DDR2 PC2-6400 Kingston KTC1G-UDIMM (1.8V, 2Rx8 ?) | ||
| - RAM 1x1GiB DDR2 PC2-5300 Brooktree AU1G08E32-667P005 / Apogee AU1G082-667P005 CL6 (1.8V, 2Rx8 ?) | ||
| - CPU E8400 | ||
| - ACPI | ||
| - CPU frequency scaling | ||
| - flashrom under coreboot | ||
| - Gigabit Ethernet | ||
| - Hardware monitoring | ||
| - Integrated graphics | ||
| - SATA | ||
| - PCI POST card | ||
|
|
||
| ### Not working | ||
|
|
||
| - SuperIO based fan control: PWM fan speed is not changing in depend of CPU temperature | ||
| - RAM 1,2x4GiB DDR2 PC2-6400 Samsung M378T5263AZ3-CF7 (2Rx4 PC2-6400U-666-12-E3) | ||
|
|
||
| ### Not tested | ||
|
|
||
| - KVM virtualization | ||
| - Onboard audio | ||
| - PCI | ||
| - PCIe | ||
| - PS/2 keyboard mouse (during payload, bootloader) | ||
| - Serial port | ||
| - USB (disabling XHCI controller makes to work as fallback USB2.0 ports) | ||
| - IOMMU | ||
|
|
||
| ## Interesting facts | ||
|
|
||
| `lshw` output is different for BIOS and coreboot. | ||
|
|
||
| ```shell | ||
| diff --side-by-side --ignore-all-space --strip-trailing-cr \ | ||
| Documentation/mainboard/gigabyte/ga-g41m-es2l_lshw_before_coreboot.txt \ | ||
| Documentation/mainboard/gigabyte/ga-g41m-es2l_lshw_after_coreboot.txt | ||
| ``` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,306 @@ | ||
| my-desktop | ||
| description: Desktop Computer | ||
| product: GA-G41M-ES2L | ||
| vendor: GIGABYTE | ||
| version: 1.0 | ||
| serial: 123456789 | ||
| width: 64 bits | ||
| capabilities: smbios-3.0.0 dmi-3.0.0 smp vsyscall32 | ||
| configuration: boot=normal chassis=desktop | ||
| *-core | ||
| description: Motherboard | ||
| product: GA-G41M-ES2L | ||
| vendor: GIGABYTE | ||
| physical id: 0 | ||
| version: 1.0 | ||
| serial: 123456789 | ||
| *-firmware | ||
| description: BIOS | ||
| vendor: coreboot | ||
| physical id: 0 | ||
| version: 4.13-1531-g2fae1c0494 | ||
| date: 01/29/2021 | ||
| size: 1MiB | ||
| capacity: 1MiB | ||
| capabilities: pci pcmcia upgrade bootselect acpi | ||
| *-cpu | ||
| description: CPU | ||
| product: Intel(R) Core(TM)2 Duo CPU E8400 @ 3.00GHz | ||
| vendor: Intel Corp. | ||
| physical id: 4 | ||
| bus info: cpu@0 | ||
| version: Intel(R) Core(TM)2 Duo CPU E8400 @ 3.00GHz | ||
| slot: CPU0 | ||
| size: 2943MHz | ||
| capacity: 3GHz | ||
| width: 64 bits | ||
| capabilities: fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ht tm pbe syscall nx x86-64 constant_tsc arch_perfmon pebs bts rep_good nopl cpuid aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm pti tpr_shadow vnmi flexpriority vpid dtherm cpufreq | ||
| *-cache | ||
| description: L2 cache | ||
| physical id: 7 | ||
| slot: CACHE2 | ||
| size: 6MiB | ||
| capacity: 6MiB | ||
| capabilities: internal unified | ||
| configuration: level=2 | ||
| *-memory | ||
| description: System memory | ||
| physical id: 1 | ||
| size: 2GiB | ||
| *-pci | ||
| description: Host bridge | ||
| product: 4 Series Chipset DRAM Controller | ||
| vendor: Intel Corporation | ||
| physical id: 100 | ||
| bus info: pci@0000:00:00.0 | ||
| version: 03 | ||
| width: 32 bits | ||
| clock: 33MHz | ||
| *-pci:0 | ||
| description: PCI bridge | ||
| product: 4 Series Chipset PCI Express Root Port | ||
| vendor: Intel Corporation | ||
| physical id: 1 | ||
| bus info: pci@0000:00:01.0 | ||
| version: 03 | ||
| width: 32 bits | ||
| clock: 33MHz | ||
| capabilities: pci pm msi pciexpress normal_decode bus_master cap_list | ||
| configuration: driver=pcieport | ||
| resources: irq:24 | ||
| *-display:0 | ||
| description: VGA compatible controller | ||
| product: 4 Series Chipset Integrated Graphics Controller | ||
| vendor: Intel Corporation | ||
| physical id: 2 | ||
| bus info: pci@0000:00:02.0 | ||
| version: 03 | ||
| width: 64 bits | ||
| clock: 33MHz | ||
| capabilities: msi pm vga_controller bus_master cap_list rom | ||
| configuration: driver=i915 latency=0 | ||
| resources: irq:16 memory:90000000-903fffff memory:80000000-8fffffff ioport:20a0(size=8) memory:c0000-dffff | ||
| *-display:1 UNCLAIMED | ||
| description: Display controller | ||
| product: 4 Series Chipset Integrated Graphics Controller | ||
| vendor: Intel Corporation | ||
| physical id: 2.1 | ||
| bus info: pci@0000:00:02.1 | ||
| version: 03 | ||
| width: 64 bits | ||
| clock: 33MHz | ||
| capabilities: pm cap_list | ||
| configuration: latency=0 | ||
| resources: memory:90400000-904fffff | ||
| *-multimedia | ||
| description: Audio device | ||
| product: NM10/ICH7 Family High Definition Audio Controller | ||
| vendor: Intel Corporation | ||
| physical id: 1b | ||
| bus info: pci@0000:00:1b.0 | ||
| version: 01 | ||
| width: 64 bits | ||
| clock: 33MHz | ||
| capabilities: pm msi pciexpress bus_master cap_list | ||
| configuration: driver=snd_hda_intel latency=0 | ||
| resources: irq:28 memory:90700000-90703fff | ||
| *-pci:1 | ||
| description: PCI bridge | ||
| product: NM10/ICH7 Family PCI Express Port 1 | ||
| vendor: Intel Corporation | ||
| physical id: 1c | ||
| bus info: pci@0000:00:1c.0 | ||
| version: 01 | ||
| width: 32 bits | ||
| clock: 33MHz | ||
| capabilities: pci pciexpress msi pm normal_decode bus_master cap_list | ||
| configuration: driver=pcieport | ||
| resources: irq:25 | ||
| *-pci:2 | ||
| description: PCI bridge | ||
| product: NM10/ICH7 Family PCI Express Port 2 | ||
| vendor: Intel Corporation | ||
| physical id: 1c.1 | ||
| bus info: pci@0000:00:1c.1 | ||
| version: 01 | ||
| width: 32 bits | ||
| clock: 33MHz | ||
| capabilities: pci pciexpress msi pm normal_decode bus_master cap_list | ||
| configuration: driver=pcieport | ||
| resources: irq:26 ioport:1000(size=4096) memory:90600000-906fffff ioport:90500000(size=1048576) | ||
| *-network | ||
| description: Ethernet interface | ||
| product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller | ||
| vendor: Realtek Semiconductor Co., Ltd. | ||
| physical id: 0 | ||
| bus info: pci@0000:03:00.0 | ||
| logical name: eth0 | ||
| version: 02 | ||
| serial: 6c:f0:49:a3:e3:d5 | ||
| size: 1Gbit/s | ||
| capacity: 1Gbit/s | ||
| width: 64 bits | ||
| clock: 33MHz | ||
| capabilities: pm msi pciexpress msix vpd bus_master cap_list rom ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation | ||
| configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=5.10.0-2-amd64 duplex=full ip=192.168.155.136 latency=0 link=yes multicast=yes port=MII speed=1Gbit/s | ||
| resources: irq:17 ioport:1000(size=256) memory:90510000-90510fff memory:90500000-9050ffff memory:90600000-9060ffff | ||
| *-usb:0 | ||
| description: USB controller | ||
| product: NM10/ICH7 Family USB UHCI Controller #1 | ||
| vendor: Intel Corporation | ||
| physical id: 1d | ||
| bus info: pci@0000:00:1d.0 | ||
| version: 01 | ||
| width: 32 bits | ||
| clock: 33MHz | ||
| capabilities: uhci bus_master | ||
| configuration: driver=uhci_hcd latency=0 | ||
| resources: irq:23 ioport:2000(size=32) | ||
| *-usb:1 | ||
| description: USB controller | ||
| product: NM10/ICH7 Family USB UHCI Controller #2 | ||
| vendor: Intel Corporation | ||
| physical id: 1d.1 | ||
| bus info: pci@0000:00:1d.1 | ||
| version: 01 | ||
| width: 32 bits | ||
| clock: 33MHz | ||
| capabilities: uhci bus_master | ||
| configuration: driver=uhci_hcd latency=0 | ||
| resources: irq:19 ioport:2020(size=32) | ||
| *-usb:2 | ||
| description: USB controller | ||
| product: NM10/ICH7 Family USB UHCI Controller #3 | ||
| vendor: Intel Corporation | ||
| physical id: 1d.2 | ||
| bus info: pci@0000:00:1d.2 | ||
| version: 01 | ||
| width: 32 bits | ||
| clock: 33MHz | ||
| capabilities: uhci bus_master | ||
| configuration: driver=uhci_hcd latency=0 | ||
| resources: irq:18 ioport:2040(size=32) | ||
| *-usb:3 | ||
| description: USB controller | ||
| product: NM10/ICH7 Family USB UHCI Controller #4 | ||
| vendor: Intel Corporation | ||
| physical id: 1d.3 | ||
| bus info: pci@0000:00:1d.3 | ||
| version: 01 | ||
| width: 32 bits | ||
| clock: 33MHz | ||
| capabilities: uhci bus_master | ||
| configuration: driver=uhci_hcd latency=0 | ||
| resources: irq:16 ioport:2060(size=32) | ||
| *-usb:4 | ||
| description: USB controller | ||
| product: NM10/ICH7 Family USB2 EHCI Controller | ||
| vendor: Intel Corporation | ||
| physical id: 1d.7 | ||
| bus info: pci@0000:00:1d.7 | ||
| version: 01 | ||
| width: 32 bits | ||
| clock: 33MHz | ||
| capabilities: pm debug ehci bus_master cap_list | ||
| configuration: driver=ehci-pci latency=0 | ||
| resources: irq:23 memory:90704000-907043ff | ||
| *-pci:3 | ||
| description: PCI bridge | ||
| product: 82801 PCI Bridge | ||
| vendor: Intel Corporation | ||
| physical id: 1e | ||
| bus info: pci@0000:00:1e.0 | ||
| version: e1 | ||
| width: 32 bits | ||
| clock: 33MHz | ||
| capabilities: pci subtractive_decode bus_master cap_list | ||
| *-isa | ||
| description: ISA bridge | ||
| product: 82801GB/GR (ICH7 Family) LPC Interface Bridge | ||
| vendor: Intel Corporation | ||
| physical id: 1f | ||
| bus info: pci@0000:00:1f.0 | ||
| version: 01 | ||
| width: 32 bits | ||
| clock: 33MHz | ||
| capabilities: isa bus_master cap_list | ||
| configuration: driver=lpc_ich latency=0 | ||
| resources: irq:0 | ||
| *-ide:0 | ||
| description: IDE interface | ||
| product: 82801G (ICH7 Family) IDE Controller | ||
| vendor: Intel Corporation | ||
| physical id: 1f.1 | ||
| bus info: pci@0000:00:1f.1 | ||
| version: 01 | ||
| width: 32 bits | ||
| clock: 33MHz | ||
| capabilities: ide isa_compat_mode pci_native_mode bus_master | ||
| configuration: driver=ata_piix latency=0 | ||
| resources: irq:18 ioport:1f0(size=8) ioport:3f6 ioport:170(size=8) ioport:376 ioport:2080(size=16) | ||
| *-ide:1 | ||
| description: IDE interface | ||
| product: NM10/ICH7 Family SATA Controller [IDE mode] | ||
| vendor: Intel Corporation | ||
| physical id: 1f.2 | ||
| bus info: pci@0000:00:1f.2 | ||
| logical name: scsi2 | ||
| version: 01 | ||
| width: 32 bits | ||
| clock: 66MHz | ||
| capabilities: ide pm isa_compat_mode pci_native_mode bus_master cap_list emulated | ||
| configuration: driver=ata_piix latency=0 | ||
| resources: irq:19 ioport:20b8(size=8) ioport:20d0(size=4) ioport:20c0(size=8) ioport:20d4(size=4) ioport:2090(size=16) | ||
| *-disk | ||
| description: ATA Disk | ||
| product: WDC WD5000BPVT-2 | ||
| vendor: Western Digital | ||
| physical id: 0.0.0 | ||
| bus info: scsi@2:0.0.0 | ||
| logical name: /dev/sda | ||
| version: 1A03 | ||
| serial: WD-WXD1E71MYND4 | ||
| size: 465GiB (500GB) | ||
| capabilities: gpt-1.00 partitioned partitioned:gpt | ||
| configuration: ansiversion=5 guid=868a1c85-f309-4f3d-8282-6b5c4c373275 logicalsectorsize=512 sectorsize=4096 | ||
| *-serial | ||
| description: SMBus | ||
| product: NM10/ICH7 Family SMBus Controller | ||
| vendor: Intel Corporation | ||
| physical id: 1f.3 | ||
| bus info: pci@0000:00:1f.3 | ||
| version: 01 | ||
| width: 32 bits | ||
| clock: 33MHz | ||
| configuration: driver=i801_smbus latency=0 | ||
| resources: irq:19 ioport:400(size=32) | ||
| *-pnp00:00 | ||
| product: PnP device PNP0c02 | ||
| physical id: 2 | ||
| capabilities: pnp | ||
| configuration: driver=system | ||
| *-pnp00:01 | ||
| product: PnP device PNP0103 | ||
| physical id: 3 | ||
| capabilities: pnp | ||
| configuration: driver=system | ||
| *-pnp00:02 | ||
| product: PnP device PNP0c02 | ||
| physical id: 5 | ||
| capabilities: pnp | ||
| configuration: driver=system | ||
| *-pnp00:03 | ||
| product: PnP device PNP0b00 | ||
| physical id: 6 | ||
| capabilities: pnp | ||
| configuration: driver=rtc_cmos | ||
| *-pnp00:04 | ||
| product: PnP device PNP0303 | ||
| physical id: 7 | ||
| capabilities: pnp | ||
| configuration: driver=i8042 kbd | ||
| *-pnp00:05 | ||
| product: PnP device PNP0f13 | ||
| physical id: 8 | ||
| capabilities: pnp | ||
| configuration: driver=i8042 aux |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,304 @@ | ||
| my-desktop | ||
| description: Desktop Computer | ||
| product: G41M-ES2L | ||
| vendor: Gigabyte Technology Co., Ltd. | ||
| width: 64 bits | ||
| capabilities: smbios-2.4 dmi-2.4 smp vsyscall32 | ||
| configuration: boot=normal chassis=desktop uuid=00000000-0000-0000-0000-6CF049A3E3D5 | ||
| *-core | ||
| description: Motherboard | ||
| product: G41M-ES2L | ||
| vendor: Gigabyte Technology Co., Ltd. | ||
| physical id: 0 | ||
| *-firmware | ||
| description: BIOS | ||
| vendor: Award Software International, Inc. | ||
| physical id: 0 | ||
| version: F9 | ||
| date: 06/21/2010 | ||
| size: 128KiB | ||
| capacity: 1MiB | ||
| capabilities: pci pnp apm upgrade shadowing cdboot bootselect edd int13floppy360 int13floppy1200 int13floppy720 int13floppy2880 int5printscreen int9keyboard int14serial int17printer int10video acpi usb ls120boot zipboot biosbootspecification | ||
| *-cpu | ||
| description: CPU | ||
| product: Intel(R) Core(TM)2 Duo CPU E8400 @ 3.00GHz | ||
| vendor: Intel Corp. | ||
| physical id: 4 | ||
| bus info: cpu@0 | ||
| version: Intel(R) Core(TM)2 Duo CPU | ||
| slot: Socket 775 | ||
| size: 2631MHz | ||
| capacity: 4GHz | ||
| width: 64 bits | ||
| clock: 333MHz | ||
| capabilities: fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ht tm pbe syscall nx x86-64 constant_tsc arch_perfmon pebs bts rep_good nopl cpuid aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm pti tpr_shadow vnmi flexpriority vpid dtherm cpufreq | ||
| *-cache:0 | ||
| description: L1 cache | ||
| physical id: a | ||
| slot: Internal Cache | ||
| size: 64KiB | ||
| capacity: 64KiB | ||
| capabilities: synchronous internal write-back | ||
| configuration: level=1 | ||
| *-cache:1 | ||
| description: L2 cache | ||
| physical id: b | ||
| slot: External Cache | ||
| size: 6MiB | ||
| capabilities: synchronous internal write-back | ||
| configuration: level=2 | ||
| *-memory | ||
| description: System Memory | ||
| physical id: 19 | ||
| slot: System board or motherboard | ||
| size: 2GiB | ||
| *-bank:0 | ||
| description: DIMM 800 MHz (1.2 ns) | ||
| physical id: 0 | ||
| slot: A0 | ||
| size: 1GiB | ||
| width: 64 bits | ||
| clock: 800MHz (1.2ns) | ||
| *-bank:1 | ||
| description: DIMM [empty] | ||
| physical id: 1 | ||
| slot: A1 | ||
| *-bank:2 | ||
| description: DIMM 800 MHz (1.2 ns) | ||
| physical id: 2 | ||
| slot: A2 | ||
| size: 1GiB | ||
| width: 64 bits | ||
| clock: 800MHz (1.2ns) | ||
| *-bank:3 | ||
| description: DIMM [empty] | ||
| physical id: 3 | ||
| slot: A3 | ||
| *-pci | ||
| description: Host bridge | ||
| product: 4 Series Chipset DRAM Controller | ||
| vendor: Intel Corporation | ||
| physical id: 100 | ||
| bus info: pci@0000:00:00.0 | ||
| version: 03 | ||
| width: 32 bits | ||
| clock: 33MHz | ||
| *-display | ||
| description: VGA compatible controller | ||
| product: 4 Series Chipset Integrated Graphics Controller | ||
| vendor: Intel Corporation | ||
| physical id: 2 | ||
| bus info: pci@0000:00:02.0 | ||
| version: 03 | ||
| width: 64 bits | ||
| clock: 33MHz | ||
| capabilities: msi pm vga_controller bus_master cap_list rom | ||
| configuration: driver=i915 latency=0 | ||
| resources: irq:16 memory:fd800000-fdbfffff memory:d0000000-dfffffff ioport:ff00(size=8) memory:c0000-dffff | ||
| *-multimedia | ||
| description: Audio device | ||
| product: NM10/ICH7 Family High Definition Audio Controller | ||
| vendor: Intel Corporation | ||
| physical id: 1b | ||
| bus info: pci@0000:00:1b.0 | ||
| version: 01 | ||
| width: 64 bits | ||
| clock: 33MHz | ||
| capabilities: pm msi pciexpress bus_master cap_list | ||
| configuration: driver=snd_hda_intel latency=0 | ||
| resources: irq:27 memory:fdff8000-fdffbfff | ||
| *-pci:0 | ||
| description: PCI bridge | ||
| product: NM10/ICH7 Family PCI Express Port 1 | ||
| vendor: Intel Corporation | ||
| physical id: 1c | ||
| bus info: pci@0000:00:1c.0 | ||
| version: 01 | ||
| width: 32 bits | ||
| clock: 33MHz | ||
| capabilities: pci pciexpress msi pm normal_decode bus_master cap_list | ||
| configuration: driver=pcieport | ||
| resources: irq:24 ioport:1000(size=4096) memory:7dd00000-7defffff ioport:80000000(size=2097152) | ||
| *-pci:1 | ||
| description: PCI bridge | ||
| product: NM10/ICH7 Family PCI Express Port 2 | ||
| vendor: Intel Corporation | ||
| physical id: 1c.1 | ||
| bus info: pci@0000:00:1c.1 | ||
| version: 01 | ||
| width: 32 bits | ||
| clock: 33MHz | ||
| capabilities: pci pciexpress msi pm normal_decode bus_master cap_list | ||
| configuration: driver=pcieport | ||
| resources: irq:25 ioport:d000(size=4096) memory:fdd00000-fddfffff ioport:fde00000(size=1048576) | ||
| *-network | ||
| description: Ethernet interface | ||
| product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller | ||
| vendor: Realtek Semiconductor Co., Ltd. | ||
| physical id: 0 | ||
| bus info: pci@0000:02:00.0 | ||
| logical name: eth0 | ||
| version: 02 | ||
| serial: 6c:f0:49:a3:e3:d5 | ||
| size: 1Gbit/s | ||
| capacity: 1Gbit/s | ||
| width: 64 bits | ||
| clock: 33MHz | ||
| capabilities: pm msi pciexpress msix vpd bus_master cap_list rom ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation | ||
| configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=5.10.0-2-amd64 duplex=full ip=192.168.155.137 latency=0 link=yes multicast=yes port=MII speed=1Gbit/s | ||
| resources: irq:17 ioport:de00(size=256) memory:fdeff000-fdefffff memory:fdee0000-fdeeffff memory:fdd00000-fdd0ffff | ||
| *-usb:0 | ||
| description: USB controller | ||
| product: NM10/ICH7 Family USB UHCI Controller #1 | ||
| vendor: Intel Corporation | ||
| physical id: 1d | ||
| bus info: pci@0000:00:1d.0 | ||
| version: 01 | ||
| width: 32 bits | ||
| clock: 33MHz | ||
| capabilities: uhci bus_master | ||
| configuration: driver=uhci_hcd latency=0 | ||
| resources: irq:23 ioport:fe00(size=32) | ||
| *-usb:1 | ||
| description: USB controller | ||
| product: NM10/ICH7 Family USB UHCI Controller #2 | ||
| vendor: Intel Corporation | ||
| physical id: 1d.1 | ||
| bus info: pci@0000:00:1d.1 | ||
| version: 01 | ||
| width: 32 bits | ||
| clock: 33MHz | ||
| capabilities: uhci bus_master | ||
| configuration: driver=uhci_hcd latency=0 | ||
| resources: irq:19 ioport:fd00(size=32) | ||
| *-usb:2 | ||
| description: USB controller | ||
| product: NM10/ICH7 Family USB UHCI Controller #3 | ||
| vendor: Intel Corporation | ||
| physical id: 1d.2 | ||
| bus info: pci@0000:00:1d.2 | ||
| version: 01 | ||
| width: 32 bits | ||
| clock: 33MHz | ||
| capabilities: uhci bus_master | ||
| configuration: driver=uhci_hcd latency=0 | ||
| resources: irq:18 ioport:fc00(size=32) | ||
| *-usb:3 | ||
| description: USB controller | ||
| product: NM10/ICH7 Family USB UHCI Controller #4 | ||
| vendor: Intel Corporation | ||
| physical id: 1d.3 | ||
| bus info: pci@0000:00:1d.3 | ||
| version: 01 | ||
| width: 32 bits | ||
| clock: 33MHz | ||
| capabilities: uhci bus_master | ||
| configuration: driver=uhci_hcd latency=0 | ||
| resources: irq:16 ioport:fb00(size=32) | ||
| *-usb:4 | ||
| description: USB controller | ||
| product: NM10/ICH7 Family USB2 EHCI Controller | ||
| vendor: Intel Corporation | ||
| physical id: 1d.7 | ||
| bus info: pci@0000:00:1d.7 | ||
| version: 01 | ||
| width: 32 bits | ||
| clock: 33MHz | ||
| capabilities: pm ehci bus_master cap_list | ||
| configuration: driver=ehci-pci latency=0 | ||
| resources: irq:23 memory:fdfff000-fdfff3ff | ||
| *-pci:2 | ||
| description: PCI bridge | ||
| product: 82801 PCI Bridge | ||
| vendor: Intel Corporation | ||
| physical id: 1e | ||
| bus info: pci@0000:00:1e.0 | ||
| version: e1 | ||
| width: 32 bits | ||
| clock: 33MHz | ||
| capabilities: pci subtractive_decode cap_list | ||
| *-isa | ||
| description: ISA bridge | ||
| product: 82801GB/GR (ICH7 Family) LPC Interface Bridge | ||
| vendor: Intel Corporation | ||
| physical id: 1f | ||
| bus info: pci@0000:00:1f.0 | ||
| version: 01 | ||
| width: 32 bits | ||
| clock: 33MHz | ||
| capabilities: isa bus_master cap_list | ||
| configuration: driver=lpc_ich latency=0 | ||
| resources: irq:0 | ||
| *-ide:0 | ||
| description: IDE interface | ||
| product: 82801G (ICH7 Family) IDE Controller | ||
| vendor: Intel Corporation | ||
| physical id: 1f.1 | ||
| bus info: pci@0000:00:1f.1 | ||
| version: 01 | ||
| width: 32 bits | ||
| clock: 33MHz | ||
| capabilities: ide isa_compat_mode pci_native_mode bus_master | ||
| configuration: driver=ata_piix latency=0 | ||
| resources: irq:18 ioport:1f0(size=8) ioport:3f6 ioport:170(size=8) ioport:376 ioport:f800(size=16) | ||
| *-ide:1 | ||
| description: IDE interface | ||
| product: NM10/ICH7 Family SATA Controller [IDE mode] | ||
| vendor: Intel Corporation | ||
| physical id: 1f.2 | ||
| bus info: pci@0000:00:1f.2 | ||
| logical name: scsi2 | ||
| version: 01 | ||
| width: 32 bits | ||
| clock: 66MHz | ||
| capabilities: ide pm isa_compat_mode pci_native_mode bus_master cap_list emulated | ||
| configuration: driver=ata_piix latency=0 | ||
| resources: irq:19 ioport:f700(size=8) ioport:f600(size=4) ioport:f500(size=8) ioport:f400(size=4) ioport:f300(size=16) | ||
| *-disk | ||
| description: ATA Disk | ||
| product: WDC WD5000BPVT-2 | ||
| vendor: Western Digital | ||
| physical id: 0.0.0 | ||
| bus info: scsi@2:0.0.0 | ||
| logical name: /dev/sda | ||
| version: 1A03 | ||
| serial: WD-WXD1E71MYND4 | ||
| size: 465GiB (500GB) | ||
| capabilities: gpt-1.00 partitioned partitioned:gpt | ||
| configuration: ansiversion=5 guid=868a1c85-f309-4f3d-8282-6b5c4c373275 logicalsectorsize=512 sectorsize=4096 | ||
| *-serial | ||
| description: SMBus | ||
| product: NM10/ICH7 Family SMBus Controller | ||
| vendor: Intel Corporation | ||
| physical id: 1f.3 | ||
| bus info: pci@0000:00:1f.3 | ||
| version: 01 | ||
| width: 32 bits | ||
| clock: 33MHz | ||
| configuration: driver=i801_smbus latency=0 | ||
| resources: irq:19 ioport:500(size=32) | ||
| *-pnp00:00 | ||
| product: PnP device PNP0c02 | ||
| physical id: 1 | ||
| capabilities: pnp | ||
| configuration: driver=system | ||
| *-pnp00:01 | ||
| product: PnP device PNP0b00 | ||
| physical id: 2 | ||
| capabilities: pnp | ||
| configuration: driver=rtc_cmos | ||
| *-pnp00:02 | ||
| product: PnP device PNP0c02 | ||
| physical id: 3 | ||
| capabilities: pnp | ||
| configuration: driver=system | ||
| *-pnp00:03 | ||
| product: PnP device PNP0c02 | ||
| physical id: 5 | ||
| capabilities: pnp | ||
| configuration: driver=system | ||
| *-pnp00:04 | ||
| product: PnP device PNP0c01 | ||
| physical id: 6 | ||
| capabilities: pnp | ||
| configuration: driver=system |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| # System76 Oryx Pro 5 (oryp5) | ||
|
|
||
| ## Specs | ||
|
|
||
| - CPU | ||
| - Intel Core i7-8750H | ||
| - Intel Core i7-9750H | ||
| - EC | ||
| - ITE8587E running https://github.com/system76/ec | ||
| - Graphics | ||
| - Intel UHD Graphics 630 | ||
| - NVIDIA GeForce RTX 2080/2070/2060 | ||
| - eDP 16.1" or 17.3" 1920x1080 @ 144 Hz LCD | ||
| - HDMI, Mini DisplayPort 1.3, and DisplayPort 1.3 over USB-C | ||
| - Memory | ||
| - Channel 0: 8-GB/16-GB/32-GB DDR4 SO-DIMM | ||
| - Channel 1: 8-GB/16-GB/32-GB DDR4 SO-DIMM | ||
| - Networking | ||
| - Gigabit Ethernet | ||
| - Intel Dual Band Wireless-AC 9560 Wireless LAN (802.11ac) + Bluetooth | ||
| - Power | ||
| - 180W (19.5V, 9.23A) AC adapter | ||
| - 62Wh 4-cell battery | ||
| - Sound | ||
| - Realtek ALC1220 codec | ||
| - TAS5825MRHBR smart AMP | ||
| - Internal speakers and microphone | ||
| - Combined headphone and microphone 3.5mm jack | ||
| - Combined microphone and S/PDIF 3.5mm jack | ||
| - HDMI, Mini DisplayPort, USB-C DP audio | ||
| - Storage | ||
| - M.2 PCIe/SATA SSD1 | ||
| - M.2 PCIe/SATA SSD2 | ||
| - 2.5" SATA HDD/SSD | ||
| - RTS5250 SD card reader | ||
| - USB | ||
| - 2x USB 3.1 Gen2 Type-C | ||
| - 2x USB 3.1 Gen1 Type-A | ||
|
|
||
| ## Building coreboot | ||
|
|
||
| ```bash | ||
| make distclean | ||
| make defconfig KBUILD_DEFCONFIG=configs/config.system76_oryp5 | ||
| make | ||
| ``` | ||
|
|
||
| ## Flashing coreboot | ||
|
|
||
| ```eval_rst | ||
| +---------------------+---------------------+ | ||
| | Type | Value | | ||
| +=====================+=====================+ | ||
| | Socketed flash | no | | ||
| +---------------------+---------------------+ | ||
| | Vendor | GigaDevice | | ||
| +---------------------+---------------------+ | ||
| | Model | GD25Q127C/GD25Q128C | | ||
| +---------------------+---------------------+ | ||
| | Size | 16 MiB | | ||
| +---------------------+---------------------+ | ||
| | Package | SOIC-8 | | ||
| +---------------------+---------------------+ | ||
| | Internal flashing | yes | | ||
| +---------------------+---------------------+ | ||
| | External flashing | yes | | ||
| +---------------------+---------------------+ | ||
| ``` | ||
|
|
||
| External flashing via ISP requires removing the board from the chassis. | ||
| The IC is located under the touchpad. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| CONFIG_VENDOR_GIGABYTE=y | ||
| CONFIG_BOARD_GIGABYTE_GA_G41M_ES2L=y | ||
| CONFIG_MAINBOARD_VERSION="1.1" | ||
| CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT=y | ||
| CONFIG_ONBOARD_VGA_IS_PRIMARY=y | ||
| CONFIG_PAYLOAD_CONFIGFILE=".config_seabios" | ||
| CONFIG_USE_OPTION_TABLE=y | ||
| CONFIG_USE_BLOBS=y | ||
| CONFIG_CPU_MICROCODE_CBFS_GENERATE=y | ||
|
|
||
| # It is better to take this unique value from old CMOS. | ||
| # Default MAC-address is 00:e0:4c:00:c0:b0 | ||
| # CONFIG_REALTEK_8168_MACADDRESS="6c:f0:49:xx:xx:xx" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| CONFIG_VENDOR_SYSTEM76=y | ||
| CONFIG_BOARD_SYSTEM76_ORYP5=y | ||
| CONFIG_PAYLOAD_TIANOCORE=y | ||
| CONFIG_POST_IO=n | ||
| CONFIG_RUN_FSP_GOP=y | ||
| CONFIG_SMMSTORE=y |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| libpayload/ | ||
| .lp.config* |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,5 +22,5 @@ Then you can build coreinfo now: | |
| $ cd coreinfo | ||
|
|
||
| $ make menuconfig | ||
|
|
||
| $ make | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| if PAYLOAD_UBOOT | ||
|
|
||
| config PAYLOAD_SPECIFIC_OPTIONS | ||
| def_bool y | ||
| select PAYLOAD_IS_FLAT_BINARY | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,157 @@ | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
|
|
||
| # | ||
| # This file is meant to be included by in-tree payloads | ||
| # to provide default targets for incremental builds. | ||
| # | ||
| # Variables with file names and directory overrides have | ||
| # to be defined in advance for proper dependency tracking. | ||
| # Then, include this file. e.g | ||
| # | ||
| # obj := output | ||
| # OBJS := $(obj)/payload.o | ||
| # TARGET := $(obj)/payload.elf | ||
| # include ../path/to/libpayload/Makefile.payload | ||
| # | ||
|
|
||
| # Find relative path to libpayload (where this Makefile resides). | ||
| LIBPAYLOAD_SRC := $(dir $(lastword $(MAKEFILE_LIST))) | ||
| LIBPAYLOAD_SRC := $(patsubst %/,%,$(LIBPAYLOAD_SRC)) | ||
|
|
||
| # Build dir and config for libpayload. Need absolute | ||
| # paths to pass to libpayload's sub-make. | ||
| LIBPAYLOAD_OBJ ?= $(CURDIR)/libpayload | ||
| LIBPAYLOAD := $(LIBPAYLOAD_OBJ)/libpayload.a | ||
| LIBPAYLOAD_CONFIG_H := $(LIBPAYLOAD_OBJ)/libpayload-config.h | ||
| LIBPAYLOAD_DOTCONFIG ?= $(CURDIR)/.lp.config | ||
| LIBPAYLOAD_DEFCONFIG ?= $(CURDIR)/$(LIBPAYLOAD_SRC)/configs/defconfig | ||
|
|
||
| # Some default dependencies for all targets: | ||
| DEFAULT_DEPS := Makefile $(lastword $(MAKEFILE_LIST)) | ||
| DEFAULT_DEPS += $(PAYLOAD_DEPS) | ||
|
|
||
| obj ?= build | ||
|
|
||
| ARCH ?= | ||
| OBJS ?= | ||
| CCACHE ?= | ||
|
|
||
| CFLAGS = $(GCC_CFLAGS_$(ARCH)) | ||
| CFLAGS += -Os -ffreestanding | ||
| CFLAGS += -Wall -Wextra -Wmissing-prototypes -Wvla -Werror | ||
|
|
||
| STRIP ?= debug | ||
|
|
||
| $(TARGET): | ||
|
|
||
| # Make is silent per default, but `make V=1` will show all calls. | ||
| Q:=@ | ||
| ifneq ($(V),1) | ||
| ifneq ($(Q),) | ||
| .SILENT: | ||
| MAKEFLAGS += -s | ||
| endif | ||
| endif | ||
| export V | ||
|
|
||
| ifeq ($(filter %clean,$(MAKECMDGOALS)),) | ||
|
|
||
| xcompile := $(obj)/xcompile | ||
| xcompile_script := $(LIBPAYLOAD_SRC)/../../util/xcompile/xcompile | ||
|
|
||
| # In addition to the dependency below, create the file if it doesn't exist | ||
| # to silence warnings about a file that would be generated anyway. | ||
| $(if $(wildcard $(xcompile)),,$(shell \ | ||
| mkdir -p $(dir $(xcompile)) && \ | ||
| $(xcompile_script) $(XGCCPATH) > $(xcompile) || rm -f $(xcompile))) | ||
|
|
||
| $(xcompile): $(xcompile_script) | ||
| $< $(XGCCPATH) > $@ | ||
|
|
||
| include $(xcompile) | ||
|
|
||
| ifneq ($(XCOMPILE_COMPLETE),1) | ||
| $(shell rm -f $(XCOMPILE_COMPLETE)) | ||
| $(error $(xcompile) deleted because it's invalid. \ | ||
| Restarting the build should fix that, or explain the problem.) | ||
| endif | ||
|
|
||
| # `lpgcc` in in-tree mode: | ||
| LPGCC = CC="$(CCACHE) $(GCC_CC_$(ARCH))" | ||
| LPGCC += _OBJ="$(LIBPAYLOAD_OBJ)" | ||
| LPGCC += $(LIBPAYLOAD_SRC)/bin/lpgcc | ||
|
|
||
| LPAS = AS="$(AS_$(ARCH))" | ||
| LPAS += $(LIBPAYLOAD_SRC)/bin/lpas | ||
|
|
||
| OBJCOPY = $(OBJCOPY_$(ARCH)) | ||
|
|
||
| $(obj)/%.bin: $(OBJS) $(LIBPAYLOAD) $(DEFAULT_DEPS) | ||
| @printf " LPGCC $(subst $(obj)/,,$@)\n" | ||
| $(LPGCC) $(CFLAGS) -o $@ $(OBJS) | ||
|
|
||
| $(obj)/%.map: $(obj)/%.bin | ||
| @printf " SYMS $(subst $(obj)/,,$@)\n" | ||
| $(NM_$(ARCH)) -n $< > $@ | ||
|
|
||
| $(obj)/%.debug: $(obj)/%.bin | ||
| @printf " DEBUG $(subst $(obj)/,,$@)\n" | ||
| $(OBJCOPY) --only-keep-debug $< $@ | ||
|
|
||
| .PRECIOUS: $(obj)/%.debug | ||
|
|
||
| $(obj)/%.elf: $(obj)/%.bin $(obj)/%.debug | ||
| @printf " STRIP $(subst $(obj)/,,$@)\n" | ||
| $(OBJCOPY) --strip-$(STRIP) $< $@ | ||
| $(OBJCOPY) --add-gnu-debuglink=$(obj)/$*.debug $@ | ||
|
|
||
| $(obj)/%.o: %.c $(LIBPAYLOAD_CONFIG_H) $(DEFAULT_DEPS) | ||
| @printf " LPGCC $(subst $(obj)/,,$@)\n" | ||
| $(LPGCC) -MMD $(CFLAGS) -c $< -o $@ | ||
|
|
||
| $(obj)/%.S.o: %.S $(LIBPAYLOAD_CONFIG_H) $(DEFAULT_DEPS) | ||
| @printf " LPAS $(subst $(obj)/,,$@)\n" | ||
| $(LPAS) $< -o $@ | ||
|
|
||
| -include $(OBJS:.o=.d) | ||
|
|
||
| .PRECIOUS: $(OBJS) | ||
|
|
||
| LIBPAYLOAD_OPTS := obj="$(LIBPAYLOAD_OBJ)" | ||
| LIBPAYLOAD_OPTS += DOTCONFIG="$(LIBPAYLOAD_DOTCONFIG)" | ||
| LIBPAYLOAD_OPTS += $(if $(CCACHE),CONFIG_LP_CCACHE=y) | ||
|
|
||
| defconfig: lp-defconfig | ||
| lp-defconfig: $(LIBPAYLOAD_DOTCONFIG) | ||
| $(LIBPAYLOAD_DOTCONFIG): $(LIBPAYLOAD_DEFCONFIG) | $(PAYLOAD_DEPS) | ||
| $(MAKE) -C $(LIBPAYLOAD_SRC) $(LIBPAYLOAD_OPTS) \ | ||
| KBUILD_DEFCONFIG=$(LIBPAYLOAD_DEFCONFIG) defconfig | ||
|
|
||
| $(LIBPAYLOAD_CONFIG_H): $(LIBPAYLOAD_DOTCONFIG) | ||
| $(MAKE) -C $(LIBPAYLOAD_SRC) $(LIBPAYLOAD_OPTS) $(LIBPAYLOAD_CONFIG_H) | ||
|
|
||
| oldconfig: lp-oldconfig | ||
| lp-oldconfig: | ||
| [ ! -f $(LIBPAYLOAD_DOTCONFIG) ] || \ | ||
| $(MAKE) -C $(LIBPAYLOAD_SRC) $(LIBPAYLOAD_OPTS) oldconfig | ||
|
|
||
| $(LIBPAYLOAD): lp-defconfig | $(LIBPAYLOAD_CONFIG_H) | ||
| $(MAKE) -C $(LIBPAYLOAD_SRC) $(LIBPAYLOAD_OPTS) | ||
|
|
||
| $(shell mkdir -p $(sort $(dir $(OBJS)))) | ||
|
|
||
| .PHONY: oldconfig lp-oldconfig defconfig lp-defconfig | ||
|
|
||
| else # %clean,$(MAKECMDGOALS) | ||
|
|
||
| default-payload-clean: | ||
| rm -rf $(obj) $(LIBPAYLOAD_OBJ) | ||
| clean: default-payload-clean | ||
|
|
||
| default-payload-distclean: clean | ||
| rm -f $(LIBPAYLOAD_DOTCONFIG) $(LIBPAYLOAD_DOTCONFIG).old | ||
| distclean: default-payload-distclean | ||
|
|
||
| .PHONY: default-payload-clean clean default-payload-distclean distclean | ||
|
|
||
| endif |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,7 +28,7 @@ | |
|
|
||
| if ARCH_ARM | ||
|
|
||
| config ARCH_SPECIFIC_OPTIONS | ||
| def_bool y | ||
| select LITTLE_ENDIAN | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,7 +28,7 @@ | |
|
|
||
| if ARCH_ARM64 | ||
|
|
||
| config ARCH_SPECIFIC_OPTIONS | ||
| def_bool y | ||
| select LITTLE_ENDIAN | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,7 +28,7 @@ | |
|
|
||
| if ARCH_X86 | ||
|
|
||
| config ARCH_SPECIFIC_OPTIONS | ||
| def_bool y | ||
| select LITTLE_ENDIAN | ||
| select IO_ADDRESS_SPACE | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| libpayload | ||
| .lp.config* |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,34 +1,13 @@ | ||
| unexport $(COREBOOT_EXPORTS) | ||
|
|
||
| ARCH = x86_32 | ||
| OBJS = $(obj)/nvramcui.o | ||
| TARGET = $(obj)/nvramcui.elf | ||
|
|
||
| all: real-all | ||
|
|
||
| include ../libpayload/Makefile.payload | ||
|
|
||
| real-all: $(TARGET) | ||
|
|
||
| .PHONY: all real-all |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| /* SPDX-License-Identifier: GPL-2.0-only */ | ||
|
|
||
| /* | ||
| * Global ACPI memory region. This region is used for passing information | ||
| * between coreboot (aka "the system bios"), ACPI, and the SMI handler. | ||
| * Since we don't know where this will end up in memory at ACPI compile time, | ||
| * we provide it runtime via NVBx and NVSx variables from acpigen. | ||
| */ | ||
|
|
||
| #if CONFIG(ACPI_SOC_NVS) | ||
| External (NVB0, IntObj) | ||
| External (NVS0, IntObj) | ||
| OperationRegion (GNVS, SystemMemory, NVB0, NVS0) | ||
| #endif | ||
|
|
||
| #if CONFIG(ACPI_HAS_DEVICE_NVS) | ||
| External (NVB1, IntObj) | ||
| External (NVS1, IntObj) | ||
| OperationRegion (DNVS, SystemMemory, NVB1, NVS1) | ||
| #endif | ||
|
|
||
| #if CONFIG(CHROMEOS) | ||
| External (NVB2, IntObj) | ||
| External (NVS2, IntObj) | ||
| OperationRegion (CNVS, SystemMemory, NVB2, NVS2) | ||
| #endif |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| /* SPDX-License-Identifier: GPL-2.0-only */ | ||
|
|
||
| #include <acpi/acpigen_extern.asl> | ||
|
|
||
| #if CONFIG(CHROMEOS) | ||
| /* Chrome OS specific */ | ||
| #include <vendorcode/google/chromeos/acpi/gnvs.asl> | ||
| #include <vendorcode/google/chromeos/acpi/chromeos.asl> | ||
| #endif | ||
|
|
||
| /* Operating system enumeration. */ | ||
| Name (OSYS, 0) | ||
|
|
||
| /* Zero => PIC mode, One => APIC Mode */ | ||
| Name (PICM, Zero) | ||
|
|
||
| /* Power state (AC = 1) */ | ||
| Name (PWRS, One) | ||
|
|
||
| /* | ||
| * The _PIC method is called by the OS to choose between interrupt | ||
| * routing via the i8259 interrupt controller or the APIC. | ||
| * | ||
| * _PIC is called with a parameter of 0 for i8259 configuration and | ||
| * with a parameter of 1 for Local Apic/IOAPIC configuration. | ||
| */ | ||
|
|
||
| Method (_PIC, 1) | ||
| { | ||
| /* Remember the OS' IRQ routing choice. */ | ||
| PICM = Arg0 | ||
| } | ||
|
|
||
| #if CONFIG(MMCONF_SUPPORT) | ||
| Scope(\_SB) { | ||
| /* Base address of PCIe config space */ | ||
| Name(PCBA, CONFIG_MMCONF_BASE_ADDRESS) | ||
|
|
||
| /* Length of PCIe config space, 1MB each bus */ | ||
| Name(PCLN, CONFIG_MMCONF_LENGTH) | ||
|
|
||
| /* PCIe Configuration Space */ | ||
| OperationRegion(PCFG, SystemMemory, PCBA, PCLN) /* Each bus consumes 1MB */ | ||
| } | ||
| #endif |