blob: 74dc65b731e73dee8c9c01bbbae531936c3aefc5 [file] [log] [blame] [view]
Thomas Heijligen9c2aab32022-08-18 12:32:15 +02001# Compiling from Source with meson
2
3## Dependencies:
4
5 * C compiler (GCC | Clang) *
6 * meson >=0.53.0 *
7 * ninja *
8 * pkg-config *
9 * system-headers ***
10 * libpci ***
11 * libusb1 >=1.0.9 ***
12 * libftdi1 ***
13 * libjaylink ***
Steve Markgrafbc42fb02023-01-09 23:06:52 +010014 * libgpiod (Linux only) ***
Thomas Heijligen9c2aab32022-08-18 12:32:15 +020015
16\* Compile time dependency
17\*** Runtime / Programmer specific
18
19## Build Options:
20 * classic_cli=auto/enabled/disabled
21 * classic_cli_default_programmer=<programmer_name>:<programmer_params>
22 * classic_cli_print_wiki=auto/enabled/disabled
23 * ich_descriptors_tool=auto/enabled/disabled
24 * use_internal_dmi=true/false
25 * programmer=...
26
27## Configure
28```
29meson builddir -D<your_options>
30```
31- __builddir__ is the directory in which flashrom will be build
32- for all available options see `meson_options.txt`
33
34## Compile
35```
36ninja -C builddir
37```
38
39## Install
40```
41ninja -C builddir install
42```
43
44## System specific information
45### Ubuntu / Debian (Linux)
46 * __linux-headers__ are version specific
47```
48apt-get install -y gcc meson ninja-build pkg-config \
49 linux-headers-generic libpci-dev libusb-1.0-0-dev libftdi1-dev \
Steve Markgrafbc42fb02023-01-09 23:06:52 +010050 libjaylink-dev libgpiod-dev
Thomas Heijligen9c2aab32022-08-18 12:32:15 +020051```
52
53### ArchLinux / Manjaro
54 * __libjaylink__ is not available through the package manager
55```
56pacman -S --noconfirm gcc meson ninja pkg-config \
Steve Markgrafbc42fb02023-01-09 23:06:52 +010057 pciutils libusb libftdi libgpiod
Thomas Heijligen9c2aab32022-08-18 12:32:15 +020058```
59
60### NixOS / Nixpkgs
61```
62nix-shell <flashrom_source>/util/shell.nix
63```
64or
65```
Steve Markgrafbc42fb02023-01-09 23:06:52 +010066nix-shell -p meson ninja pkg-config pciutils libusb1 libftdi1 libjaylink libgpiod
Thomas Heijligen9c2aab32022-08-18 12:32:15 +020067```
68
69### OpenSUSE
70```
71zypper install -y gcc meson ninja pkg-config \
72 pciutils-devel libusb-1_0-devel libftdi1-devel \
Steve Markgrafbc42fb02023-01-09 23:06:52 +010073 libjaylink-devel libgpiod-devel
Thomas Heijligen9c2aab32022-08-18 12:32:15 +020074```
75
76### Alpine
77```
78apk add build-base meson ninja pkgconf pciutils-dev libusb-dev \
Steve Markgrafbc42fb02023-01-09 23:06:52 +010079 libftdi1-dev libjaylink-dev linux-headers libgpiod-dev
Thomas Heijligen9c2aab32022-08-18 12:32:15 +020080```
81
82### Freebsd / DragonFly BSD
83 * __libjaylink__ is not available through the package manager
84 * __libusb1__ is part of the base system
85```
86pkg install pkgconf meson ninja libpci libftdi1
87```
88
89### OpenBSD
90 * __libjaylink__ is not available through the package manager
91```
92pkg_add install meson ninja pkg-config pciutils libusb1 libftdi1
93```
94
95### NetBSD
96 * __libjaylink__ is not available through the package manager
97 * note: https://www.cambus.net/installing-ca-certificates-on-netbsd/
98```
99pkgin install meson ninja pkg-config pciutils libusb1 libftdi1
100```
101
102### OpenIndiana (Illumos, Solaris, SunOS)
103 * __libpci__ missing, pciutils is build without it
104 * __libftdi1__, __libjaylink__ is not available through the package manager
105 * TODO: replace __build-essential__ with the default compiler
106```
107pkg install build-essential meson ninja libusb-1
108```
109
110### MacOS (Homebrew)
111 * Internal, PCI programmer not supported
112 * __libjaylink__ is not available through the package manager
113```
114brew install meson ninja pkg-config libusb libftdi
115```