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