82 lines
2.9 KiB
Diff
82 lines
2.9 KiB
Diff
|
From 983e9226fb02a91692c2c55a19b5cd06d8ddd005 Mon Sep 17 00:00:00 2001
|
||
|
From: Anna Sztukowska <anna.sztukowska@intel.com>
|
||
|
Date: Tue, 6 Aug 2024 10:44:01 +0200
|
||
|
Subject: [PATCH 173/201] mdadm: Add compilation process to README.md
|
||
|
|
||
|
Add compilation process and dependencies to README.md.
|
||
|
|
||
|
Signed-off-by: Anna Sztukowska <anna.sztukowska@intel.com>
|
||
|
---
|
||
|
README.md | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||
|
1 file changed, 55 insertions(+)
|
||
|
|
||
|
diff --git a/README.md b/README.md
|
||
|
index 486c8929..870ecb7e 100644
|
||
|
--- a/README.md
|
||
|
+++ b/README.md
|
||
|
@@ -87,6 +87,61 @@ If there are differences between github and kernel.org, please contact kernel.or
|
||
|
We do not support kernel versions below **v3.10**. Please be aware that maintainers may remove
|
||
|
workarounds and fixes for legacy issues.
|
||
|
|
||
|
+# Dependencies
|
||
|
+
|
||
|
+The following packages are required for compilation:
|
||
|
+
|
||
|
+| RHEL | SLES | Debian/Ubuntu |
|
||
|
+| :---: | :---: | :---: |
|
||
|
+| `pkgconf` | `pkg-config` | `pkg-config` |
|
||
|
+| `gcc` | `gcc` | `gcc` |
|
||
|
+| `make` | `make` | `make` |
|
||
|
+| `libudev-devel` | `libudev-devel` | `libudev-dev` |
|
||
|
+
|
||
|
+# Compiling mdadm
|
||
|
+
|
||
|
+Run `make` command to compile mdadm.
|
||
|
+
|
||
|
+Specifying more jobs e.g. `make -j4` can decrease compilation time significantly.
|
||
|
+
|
||
|
+Various values can be specified for the `CXFLAGS` variable to customize the build process:
|
||
|
+- Run `make CXFLAGS=-ggdb` to include gdb debugging information.
|
||
|
+- Run `make CXFLAGS=-DDEBUG` to enable additional debug information through dprintf statements
|
||
|
+and call traces.
|
||
|
+- Run `make CXFLAGS=-DNO_LIBUDEV` to compile without `libudev`.
|
||
|
+
|
||
|
+To build with more than one option specified in `CXFLAGS`, separate each option with a space, e.g.
|
||
|
+`make CXFLAGS="-ggdb -DDEBUG"`.
|
||
|
+
|
||
|
+Additionally, the `EXTRAVERSION` variable can be set to build with user-friendly version label,
|
||
|
+useful when customizing mdadm builds or labeling some instance in between major releases,
|
||
|
+e.g. `make EXTRAVERSION="custom-label"`.
|
||
|
+
|
||
|
+# Installing mdadm
|
||
|
+
|
||
|
+Before installing mdadm, it is advised to uninstall vendor-provided packages (mdadm.deb, mdadm.rpm
|
||
|
+etc.) in order to avoid configuration issues.
|
||
|
+
|
||
|
+Run `make install` command to install mdadm. This command invokes the following targets:
|
||
|
+- `install-bin`
|
||
|
+- `install-man`
|
||
|
+- `install-udev`
|
||
|
+
|
||
|
+After installing mdadm, consider rebuilding initramfs to ensure the changes take effect.
|
||
|
+
|
||
|
+List of installation targets:
|
||
|
+- Run `make install-bin` to install the mdadm and mdmon binary files.
|
||
|
+- Run `make install-systemd` to install the systemd services.
|
||
|
+- Run `make install-udev` to install the udev rules.
|
||
|
+- Run `make install-man` to install the manual pages (`mdadm.8`, `md.4`, `mdadm.conf.5`,
|
||
|
+`mdmon.8`).
|
||
|
+
|
||
|
+The following targets are deprecated and should not be used:
|
||
|
+- `install-static`
|
||
|
+- `install-tcc`
|
||
|
+- `install-uclibc`
|
||
|
+- `install-klibc`
|
||
|
+
|
||
|
# License
|
||
|
|
||
|
It is released under the terms of the **GNU General Public License version 2** as published
|
||
|
--
|
||
|
2.41.0
|
||
|
|