blob: 17f88829fc808554e4998bc0dacd1b69e16e9443 [file] [log] [blame] [view]
Thomas Heijligen12e6ab02022-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 Markgraf61899472023-01-09 23:06:52 +010014 * libgpiod (Linux only) ***
Thomas Heijligen12e6ab02022-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```
Nico Huberc3b02dc2023-08-12 01:13:45 +020031- __builddir__ is the directory in which flashprog will be build
Thomas Heijligen12e6ab02022-08-18 12:32:15 +020032- 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 Markgraf61899472023-01-09 23:06:52 +010050 libjaylink-dev libgpiod-dev
Thomas Heijligen12e6ab02022-08-18 12:32:15 +020051```
52
53### ArchLinux / Manjaro
Thomas Heijligen12e6ab02022-08-18 12:32:15 +020054```
55pacman -S --noconfirm gcc meson ninja pkg-config \
Riku Viitanenf9b777d2024-01-21 12:23:29 +020056 pciutils libusb libftdi libgpiod libjaylink
Thomas Heijligen12e6ab02022-08-18 12:32:15 +020057```
58
59### NixOS / Nixpkgs
60```
Nico Huberc3b02dc2023-08-12 01:13:45 +020061nix-shell <flashprog_source>/util/shell.nix
Thomas Heijligen12e6ab02022-08-18 12:32:15 +020062```
63or
64```
Steve Markgraf61899472023-01-09 23:06:52 +010065nix-shell -p meson ninja pkg-config pciutils libusb1 libftdi1 libjaylink libgpiod
Thomas Heijligen12e6ab02022-08-18 12:32:15 +020066```
67
68### OpenSUSE
69```
70zypper install -y gcc meson ninja pkg-config \
71 pciutils-devel libusb-1_0-devel libftdi1-devel \
Steve Markgraf61899472023-01-09 23:06:52 +010072 libjaylink-devel libgpiod-devel
Thomas Heijligen12e6ab02022-08-18 12:32:15 +020073```
74
75### Alpine
76```
77apk add build-base meson ninja pkgconf pciutils-dev libusb-dev \
Steve Markgraf61899472023-01-09 23:06:52 +010078 libftdi1-dev libjaylink-dev linux-headers libgpiod-dev
Thomas Heijligen12e6ab02022-08-18 12:32:15 +020079```
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```