Initial Commit

- initial default booting image
This commit is contained in:
2026-11-06 20:45:42 +01:00
commit b8783708ae
15201 changed files with 602532 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
From 72ff3b8998a675900fcb7c18c0e03f1552b13a8b Mon Sep 17 00:00:00 2001
From: Shubham Chakraborty <chakrabortyshubham66@gmail.com>
Date: Tue, 14 Apr 2026 11:04:08 +0530
Subject: [PATCH] include/mount-api-utils.h: fix LSMT_ROOT definition
Commit
ded434a63f3eee7fd7805b18d6c9bb912016c3c8 ("include/mount-api-utils:
add statmount and listmount") introduce a fallback definition for the
LSMT_ROOT defined, but a small typo makes this fallback definition
ineffective:
#ifdef LSMT_ROOT
# define LSMT_ROOT ...
#endif
Should obviously have been:
#ifndef LSMT_ROOT
# define LSMT_ROOT ...
#endif
Signed-off-by: Shubham Chakraborty <chakrabortyshubham66@gmail.com>
Upstream: https://lore.kernel.org/util-linux/20260530094932.2351791-1-thomas.petazzoni@bootlin.com/T/#u
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
include/mount-api-utils.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/mount-api-utils.h b/include/mount-api-utils.h
index a916f99..87e173e 100644
--- a/include/mount-api-utils.h
+++ b/include/mount-api-utils.h
@@ -339,7 +339,7 @@ struct ul_statmount {
/*
* Special @mnt_id values that can be passed to listmount
*/
-#ifdef LSMT_ROOT
+#ifndef LSMT_ROOT
# define LSMT_ROOT 0xffffffffffffffff /* root mount */
#endif
--
2.53.0

View File

@@ -0,0 +1,42 @@
From a06adacd1009174b7ca35f529a2db165f6c1f3aa Mon Sep 17 00:00:00 2001
From: Bernd Kuhls <bernd@kuhls.net>
Date: Fri, 16 Jan 2026 23:33:34 +0100
Subject: [PATCH] autotools: optionally add libpthread to uuid.pc
Fixes https://github.com/util-linux/util-linux/issues/3210#issuecomment-3477915953
Upstream: https://github.com/util-linux/util-linux/commit/d88a62e4cd385e07b3cb8fb309bbb03981ea2970
[Bernd: backported to 2.41.3]
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
Makefile.am | 1 +
libuuid/uuid.pc.in | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index 01e99701d..cd1d157ce 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -189,6 +189,7 @@ edit_cmd = sed \
-e 's|@usrbin_execdir[@]|$(usrbin_execdir)|g' \
-e 's|@usrsbin_execdir[@]|$(usrsbin_execdir)|g' \
-e 's|@SOCKET_LIBS[@]|$(SOCKET_LIBS)|g' \
+ -e 's|@PTHREAD_LIBS[@]|$(PTHREAD_LIBS)|g' \
-e 's|@VERSION[@]|$(VERSION)|g' \
-e 's|@ADJTIME_PATH[@]|$(ADJTIME_PATH)|g' \
-e 's|@LIBUUID_VERSION[@]|$(LIBUUID_VERSION)|g' \
diff --git a/libuuid/uuid.pc.in b/libuuid/uuid.pc.in
index 51929fe80..a40dc6644 100644
--- a/libuuid/uuid.pc.in
+++ b/libuuid/uuid.pc.in
@@ -7,5 +7,5 @@ Name: uuid
Description: Universally unique id library
Version: @LIBUUID_VERSION@
Cflags: -I${includedir}/uuid
-Libs.private: @SOCKET_LIBS@ -lpthread
+Libs.private: @SOCKET_LIBS@ @PTHREAD_LIBS@
Libs: -L${libdir} -luuid
--
2.47.3

View File

@@ -0,0 +1,59 @@
From 2dacaf3eea391e3bbf48e7d3ecce02cafe045b6d Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@redhat.com>
Date: Wed, 27 May 2026 15:15:22 +0200
Subject: [PATCH] loopdev: use openat2(RESOLVE_NO_SYMLINKS) for backing file
Use ul_open_no_symlinks() instead of open(O_NOFOLLOW) when
LOOPDEV_FL_NOFOLLOW is set. O_NOFOLLOW only rejects symlinks at the
last path component, but TOCTOU attacks swap intermediate components.
openat2(RESOLVE_NO_SYMLINKS) rejects symlinks at any component.
Upstream: https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/commit/?h=stable/v2.41&id=2dacaf3eea391e3bbf48e7d3ecce02cafe045b6d
CVE: CVE-2026-27456
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 119d23f1e3f55cf10e3c66dab80fc308c9f26456)
Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
[Fiona: add CVE trailer]
Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
---
lib/loopdev.c | 23 ++++++++++++++---------
1 file changed, 14 insertions(+), 9 deletions(-)
diff --git a/lib/loopdev.c b/lib/loopdev.c
index 76685be70..31377fc9a 100644
--- a/lib/loopdev.c
+++ b/lib/loopdev.c
@@ -1412,16 +1412,21 @@ int loopcxt_setup_device(struct loopdev_cxt *lc)
if (lc->config.info.lo_flags & LO_FLAGS_DIRECT_IO)
flags |= O_DIRECT;
if (lc->flags & LOOPDEV_FL_NOFOLLOW)
- flags |= O_NOFOLLOW;
-
- if ((file_fd = open(lc->filename, mode | flags)) < 0) {
- if (mode != O_RDONLY && (errno == EROFS || errno == EACCES))
- file_fd = open(lc->filename, (mode = O_RDONLY) | flags);
+ file_fd = ul_open_no_symlinks(lc->filename, mode | flags, 0);
+ else
+ file_fd = open(lc->filename, mode | flags);
- if (file_fd < 0) {
- DBG(SETUP, ul_debugobj(lc, "open backing file failed: %m"));
- return -errno;
- }
+ if (file_fd < 0 && mode != O_RDONLY
+ && (errno == EROFS || errno == EACCES)) {
+ mode = O_RDONLY;
+ if (lc->flags & LOOPDEV_FL_NOFOLLOW)
+ file_fd = ul_open_no_symlinks(lc->filename, mode | flags, 0);
+ else
+ file_fd = open(lc->filename, mode | flags);
+ }
+ if (file_fd < 0) {
+ DBG(SETUP, ul_debugobj(lc, "open backing file failed: %m"));
+ return -errno;
}
DBG(SETUP, ul_debugobj(lc, "backing file open: OK"));
--
2.47.3

View File

@@ -0,0 +1,521 @@
menuconfig BR2_PACKAGE_UTIL_LINUX
bool "util-linux"
help
Various useful/essential linux libraries and utilities.
Things like mkfs, mkswap, swapon, fdisk, mount, dmesg, etc...
http://www.kernel.org/pub/linux/utils/util-linux/
if BR2_PACKAGE_UTIL_LINUX
config BR2_PACKAGE_UTIL_LINUX_LIBS
bool
config BR2_PACKAGE_UTIL_LINUX_LIBBLKID
bool "libblkid"
depends on BR2_USE_MMU # fork()
help
Install libblkid.
config BR2_PACKAGE_UTIL_LINUX_LIBFDISK
bool "libfdisk"
depends on BR2_USE_MMU # fork()
select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
select BR2_PACKAGE_UTIL_LINUX_LIBUUID
help
Install libfdisk.
config BR2_PACKAGE_UTIL_LINUX_LIBMOUNT
bool "libmount"
depends on BR2_USE_MMU # fork()
select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
help
Install libmount.
config BR2_PACKAGE_UTIL_LINUX_LIBSMARTCOLS
bool "libsmartcols"
depends on BR2_USE_MMU # fork()
help
Install libsmartcols.
config BR2_PACKAGE_UTIL_LINUX_LIBUUID
bool "libuuid"
help
Install libuuid.
config BR2_PACKAGE_UTIL_LINUX_BINARIES
bool "basic set"
depends on BR2_USE_MMU # fork()
select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
select BR2_PACKAGE_UTIL_LINUX_LIBMOUNT
select BR2_PACKAGE_UTIL_LINUX_LIBFDISK
select BR2_PACKAGE_UTIL_LINUX_LIBSMARTCOLS
select BR2_PACKAGE_UTIL_LINUX_LIBUUID
help
Install the basic set of util-linux binaries.
blkdiscard, blkid, blockdev, chcpu, choom, col, colcrt, colrm,
column, ctrlaltdel, dmesg, fdisk, fincore, findfs, findmnt,
flock, fsfreeze, fstrim, getopt, hexdump, ipcmk, isosize,
ldattach, look, lsblk, lscpu, lsipc, lslocks, lsns, mcookie,
mkfs, mkswap, namei, prlimit, readprofile, renice, rev,
rtcwake, script, scriptlive, scriptreplay, setarch, setsid,
sfdisk, swaplabel, swapoff, swapon, uuidgen, uuidparse,
whereis, wipefs
The setarch utility also installs architecture-specific
symlinks like linux32, linux64, uname26, i386 and x86_64.
config BR2_PACKAGE_UTIL_LINUX_AGETTY
bool "agetty"
depends on BR2_USE_MMU # fork()
help
Alternative linux getty
config BR2_PACKAGE_UTIL_LINUX_BFS
bool "bfs"
depends on BR2_USE_MMU # fork()
help
SCO bfs filesystem support
config BR2_PACKAGE_UTIL_LINUX_CAL
bool "cal"
depends on BR2_USE_MMU # fork()
help
Display a calendar, or some part of it
config BR2_PACKAGE_UTIL_LINUX_CHFN_CHSH
bool "chfn/chsh"
depends on (BR2_ENABLE_LOCALE && BR2_USE_WCHAR) # linux-pam
depends on !BR2_STATIC_LIBS
depends on BR2_USE_MMU # linux-pam
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # linux-pam
select BR2_PACKAGE_LINUX_PAM
help
Change login shell, real user name and information
comment "chfn/chsh needs a toolchain w/ wchar, locale, dynamic library, gcc >= 4.9"
depends on !(BR2_ENABLE_LOCALE && BR2_USE_WCHAR) \
|| BR2_STATIC_LIBS \
|| !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
config BR2_PACKAGE_UTIL_LINUX_CHMEM
bool "chmem"
depends on BR2_USE_MMU # fork()
help
Sets a particular size or range of memory online or offline
config BR2_PACKAGE_UTIL_LINUX_CRAMFS
bool "cramfs utilities"
depends on BR2_USE_MMU # fork()
select BR2_PACKAGE_ZLIB
help
Utilities for compressed ROM file system (fsck.cramfs,
mkfs.cramfs)
config BR2_PACKAGE_UTIL_LINUX_EJECT
bool "eject"
depends on BR2_USE_MMU # fork()
select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
select BR2_PACKAGE_UTIL_LINUX_LIBMOUNT
select BR2_PACKAGE_UTIL_LINUX_LIBUUID
help
Eject removable media
config BR2_PACKAGE_UTIL_LINUX_FALLOCATE
bool "fallocate"
depends on BR2_USE_MMU # fork()
help
Preallocate space to a file
config BR2_PACKAGE_UTIL_LINUX_FDFORMAT
bool "fdformat"
depends on BR2_USE_MMU # fork()
help
Low-level format a floppy disk
config BR2_PACKAGE_UTIL_LINUX_FSCK
bool "fsck"
depends on BR2_USE_MMU # fork()
select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
select BR2_PACKAGE_UTIL_LINUX_LIBMOUNT
select BR2_PACKAGE_UTIL_LINUX_LIBUUID
help
Check and repair a linux filesystem
config BR2_PACKAGE_UTIL_LINUX_HARDLINK
bool "hardlink"
depends on BR2_USE_MMU # fork()
help
Consolidate duplicate files via hardlinks
config BR2_PACKAGE_UTIL_LINUX_HWCLOCK
bool "hwclock"
depends on BR2_USE_MMU # fork()
help
Query or set the hardware clock (RTC)
config BR2_PACKAGE_UTIL_LINUX_IPCMK
bool "ipcmk"
depends on BR2_USE_MMU # fork()
help
Make various IPC resources
config BR2_PACKAGE_UTIL_LINUX_IPCRM
bool "ipcrm"
depends on BR2_USE_MMU # fork()
help
Remove certain IPC resources
config BR2_PACKAGE_UTIL_LINUX_IPCS
bool "ipcs"
depends on BR2_USE_MMU # fork()
help
Show information on IPC facilities
config BR2_PACKAGE_UTIL_LINUX_IRQTOP
bool "irqtop"
depends on BR2_USE_MMU # libsmartcols
select BR2_PACKAGE_NCURSES
select BR2_PACKAGE_UTIL_LINUX_LIBSMARTCOLS
help
Show information on IRQs
config BR2_PACKAGE_UTIL_LINUX_KILL
bool "kill"
depends on BR2_USE_MMU # fork()
help
Send a signal to a process
config BR2_PACKAGE_UTIL_LINUX_LAST
bool "last"
depends on BR2_USE_MMU # fork()
help
Show a listing of last logged in users
config BR2_PACKAGE_UTIL_LINUX_LINE
bool "line"
help
Read one line
config BR2_PACKAGE_UTIL_LINUX_LOGGER
bool "logger"
depends on BR2_USE_MMU # fork()
help
Enter messages into the system log
config BR2_PACKAGE_UTIL_LINUX_LOGIN
bool "login"
depends on BR2_ENABLE_LOCALE # linux-pam
depends on BR2_USE_WCHAR # linux-pam
depends on !BR2_STATIC_LIBS # linux-pam
depends on BR2_USE_MMU # fork(), linux-pam
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # linux-pam
select BR2_PACKAGE_LINUX_PAM
help
Begin a session on the system
comment "login needs a toolchain w/ wchar, locale, dynamic library, gcc >= 4.9"
depends on !(BR2_ENABLE_LOCALE && BR2_USE_WCHAR) \
|| BR2_STATIC_LIBS \
|| !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
config BR2_PACKAGE_UTIL_LINUX_LOSETUP
bool "losetup"
depends on BR2_USE_MMU # libsmartcols
select BR2_PACKAGE_UTIL_LINUX_LIBSMARTCOLS
help
Set up and control loop devices
config BR2_PACKAGE_UTIL_LINUX_LSFD
bool "lsfd"
depends on BR2_USE_MMU # libsmartcols
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15
depends on !BR2_TOOLCHAIN_USES_UCLIBC # process_vm_readv
select BR2_PACKAGE_UTIL_LINUX_LIBSMARTCOLS
help
List file descriptors (modern replacement for lsof)
comment "lsfd needs a musl or glibc toolchain w/ headers >= 4.15"
depends on BR2_USE_MMU
depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15 \
|| BR2_TOOLCHAIN_USES_UCLIBC
config BR2_PACKAGE_UTIL_LINUX_LSLOGINS
bool "lslogins"
depends on BR2_USE_MMU # libsmartcols
select BR2_PACKAGE_UTIL_LINUX_LIBSMARTCOLS
help
Display information about known users in the system
config BR2_PACKAGE_UTIL_LINUX_LSMEM
bool "lsmem"
depends on BR2_USE_MMU # libsmartcols
select BR2_PACKAGE_UTIL_LINUX_LIBSMARTCOLS
help
List the ranges of available memory with their online status
config BR2_PACKAGE_UTIL_LINUX_MESG
bool "mesg"
depends on BR2_USE_MMU # fork()
help
Control write access to your terminal
config BR2_PACKAGE_UTIL_LINUX_MINIX
bool "minix"
depends on BR2_USE_MMU # fork()
help
Minix filesystem support
config BR2_PACKAGE_UTIL_LINUX_MORE
bool "more"
depends on BR2_USE_MMU # fork()
select BR2_PACKAGE_NCURSES
help
File perusal filter for crt viewing
config BR2_PACKAGE_UTIL_LINUX_MOUNT
bool "mount/umount"
depends on BR2_USE_MMU # fork()
select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
select BR2_PACKAGE_UTIL_LINUX_LIBMOUNT
select BR2_PACKAGE_UTIL_LINUX_LIBUUID
help
Mount/unmount filesystems
config BR2_PACKAGE_UTIL_LINUX_MOUNTPOINT
bool "mountpoint"
depends on BR2_USE_MMU # fork()
select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
select BR2_PACKAGE_UTIL_LINUX_LIBMOUNT
select BR2_PACKAGE_UTIL_LINUX_LIBUUID
help
See if a directory is a mountpoint
config BR2_PACKAGE_UTIL_LINUX_NEWGRP
bool "newgrp"
select BR2_PACKAGE_LIBXCRYPT if BR2_TOOLCHAIN_USES_GLIBC
help
Log in to a new group
config BR2_PACKAGE_UTIL_LINUX_NOLOGIN
bool "nologin"
depends on BR2_USE_MMU # fork()
help
Politely refuse a login
config BR2_PACKAGE_UTIL_LINUX_NSENTER
bool "nsenter"
depends on BR2_USE_MMU # fork()
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
help
Enter the namespaces of another process
comment "nsenter needs a toolchain w/ headers >= 3.0"
depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
config BR2_PACKAGE_UTIL_LINUX_PG
bool "pg"
depends on BR2_USE_MMU # fork()
select BR2_PACKAGE_NCURSES
help
Browse pagewise through text files
config BR2_PACKAGE_UTIL_LINUX_PARTX
bool "partition utilities"
depends on BR2_USE_MMU # fork()
select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
select BR2_PACKAGE_UTIL_LINUX_LIBSMARTCOLS
select BR2_PACKAGE_UTIL_LINUX_LIBUUID
help
Partition utilities (addpart, delpart, partx)
config BR2_PACKAGE_UTIL_LINUX_PIVOT_ROOT
bool "pivot_root"
help
Change the root filesystem
config BR2_PACKAGE_UTIL_LINUX_RAW
bool "raw"
depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_14
help
Build a linux raw character device
comment "raw needs a toolchain w/ headers < 5.14"
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_14
config BR2_PACKAGE_UTIL_LINUX_RENAME
bool "rename"
depends on BR2_USE_MMU # fork()
help
Rename files
config BR2_PACKAGE_UTIL_LINUX_RFKILL
bool "rfkill"
depends on BR2_USE_MMU # libsmartcols
select BR2_PACKAGE_UTIL_LINUX_LIBSMARTCOLS
help
Tool for enabling and disabling wireless devices. This new
implementation is based upon, and backward compatible with,
the original rfkill from Johannes Berg and Marcel Holtmann.
config BR2_PACKAGE_UTIL_LINUX_RUNUSER
bool "runuser"
depends on (BR2_ENABLE_LOCALE && BR2_USE_WCHAR) # linux-pam
depends on !BR2_STATIC_LIBS
depends on BR2_USE_MMU # fork(), linux-pam
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # linux-pam
select BR2_PACKAGE_LINUX_PAM
help
Run a command with substitute user and group ID (does not need
to ask for a password, because it may be executed by the root
user only)
comment "runuser needs a toolchain w/ wchar, locale, dynamic library, gcc >= 4.9"
depends on !(BR2_ENABLE_LOCALE && BR2_USE_WCHAR) \
|| BR2_STATIC_LIBS \
|| !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
config BR2_PACKAGE_UTIL_LINUX_SCHEDUTILS
bool "scheduling utilities"
depends on BR2_USE_MMU # fork()
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
help
Scheduling utilities (chrt, ionice, taskset, uclampset)
comment "scheduling utilities need a toolchain w/ headers >= 3.14"
depends on BR2_USE_MMU # fork()
depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
config BR2_PACKAGE_UTIL_LINUX_SETPRIV
bool "setpriv"
depends on BR2_USE_MMU # fork()
depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libcap-ng
select BR2_PACKAGE_LIBCAP_NG
help
Run a program with different Linux privilege settings
config BR2_PACKAGE_UTIL_LINUX_SETTERM
bool "setterm"
depends on BR2_USE_MMU # fork()
select BR2_PACKAGE_NCURSES
help
Set terminal attributes
config BR2_PACKAGE_UTIL_LINUX_SU
bool "su"
depends on (BR2_ENABLE_LOCALE && BR2_USE_WCHAR) # linux-pam
depends on !BR2_STATIC_LIBS
depends on BR2_USE_MMU # fork(), linux-pam
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # linux-pam
select BR2_PACKAGE_LINUX_PAM
help
Run a command with substitute user and group ID
comment "su needs a toolchain w/ wchar, locale, dynamic library, gcc >= 4.9"
depends on !(BR2_ENABLE_LOCALE && BR2_USE_WCHAR) \
|| BR2_STATIC_LIBS \
|| !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
config BR2_PACKAGE_UTIL_LINUX_SULOGIN
bool "sulogin"
depends on BR2_USE_MMU # fork()
select BR2_PACKAGE_LIBXCRYPT if BR2_TOOLCHAIN_USES_GLIBC
help
Single-user login
config BR2_PACKAGE_UTIL_LINUX_SWITCH_ROOT
bool "switch_root"
depends on BR2_USE_MMU # fork()
help
Switch to another filesystem as the root of the mount tree
config BR2_PACKAGE_UTIL_LINUX_TUNELP
bool "tunelp"
depends on BR2_USE_MMU # fork()
select BR2_PACKAGE_NCURSES
help
Set various parameters for the lp device
config BR2_PACKAGE_UTIL_LINUX_UL
bool "ul"
select BR2_PACKAGE_NCURSES
help
Do underlining
config BR2_PACKAGE_UTIL_LINUX_UNSHARE
bool "unshare"
depends on BR2_USE_MMU # fork()
help
Run program with some namespaces unshared from parent
config BR2_PACKAGE_UTIL_LINUX_UTMPDUMP
bool "utmpdump"
depends on BR2_USE_MMU # fork()
help
Dump UTMP and WTMP files in raw format
config BR2_PACKAGE_UTIL_LINUX_UUIDD
bool "uuidd"
depends on BR2_USE_MMU # fork()
select BR2_PACKAGE_UTIL_LINUX_LIBUUID
help
UUID generation daemon
config BR2_PACKAGE_UTIL_LINUX_VIPW
bool "vipw"
depends on BR2_USE_MMU # fork()
help
Edit the password, group, shadow-password or shadow-group file
config BR2_PACKAGE_UTIL_LINUX_WAITPID
bool "waitpid"
depends on BR2_USE_MMU # fork()
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_3 # pidfd_open
help
Utility to wait for arbitrary processes
comment "waitpid needs a toolchain w/ headers >= 5.3"
depends on BR2_USE_MMU
depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_3
config BR2_PACKAGE_UTIL_LINUX_WALL
bool "wall"
depends on BR2_USE_MMU # fork()
help
Send a message to everybody's terminal
config BR2_PACKAGE_UTIL_LINUX_WIPEFS
bool "wipefs"
depends on BR2_USE_MMU # fork()
select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
select BR2_PACKAGE_UTIL_LINUX_LIBSMARTCOLS
help
wipefs can erase filesystem, raid or partition-table
signatures (magic strings) from the specified device
to make the signatures invisible for libblkid. wipefs
does not erase the filesystem itself nor any other data
from the device.
config BR2_PACKAGE_UTIL_LINUX_WDCTL
bool "wdctl"
depends on BR2_USE_MMU # libsmartcols
select BR2_PACKAGE_UTIL_LINUX_LIBSMARTCOLS
help
Shows hardware watchdog status
config BR2_PACKAGE_UTIL_LINUX_WRITE
bool "write"
depends on BR2_USE_MMU # fork()
help
Send a message to another user
config BR2_PACKAGE_UTIL_LINUX_ZRAMCTL
bool "zramctl"
depends on BR2_USE_MMU # libsmartcols
select BR2_PACKAGE_UTIL_LINUX_LIBSMARTCOLS
help
Set up and control zram devices
endif

View File

@@ -0,0 +1,8 @@
config BR2_PACKAGE_HOST_UTIL_LINUX
bool "host util-linux"
help
Various useful/essential linux libraries and utilities.
Things like mkfs, mkswap, swapon, fdisk, mount, dmesg, etc...
http://www.kernel.org/pub/linux/utils/util-linux/

15
package/util-linux/su.pam Normal file
View File

@@ -0,0 +1,15 @@
auth sufficient pam_rootok.so
auth required pam_wheel.so use_uid
auth required pam_env.so
auth required pam_unix.so nullok
account required pam_unix.so
password required pam_unix.so nullok
session required pam_selinux.so close
session required pam_limits.so
session required pam_env.so
session required pam_unix.so
session optional pam_lastlog.so
session required pam_selinux.so open

View File

@@ -0,0 +1,44 @@
From 72ff3b8998a675900fcb7c18c0e03f1552b13a8b Mon Sep 17 00:00:00 2001
From: Shubham Chakraborty <chakrabortyshubham66@gmail.com>
Date: Tue, 14 Apr 2026 11:04:08 +0530
Subject: [PATCH] include/mount-api-utils.h: fix LSMT_ROOT definition
Commit
ded434a63f3eee7fd7805b18d6c9bb912016c3c8 ("include/mount-api-utils:
add statmount and listmount") introduce a fallback definition for the
LSMT_ROOT defined, but a small typo makes this fallback definition
ineffective:
#ifdef LSMT_ROOT
# define LSMT_ROOT ...
#endif
Should obviously have been:
#ifndef LSMT_ROOT
# define LSMT_ROOT ...
#endif
Signed-off-by: Shubham Chakraborty <chakrabortyshubham66@gmail.com>
Upstream: https://lore.kernel.org/util-linux/20260530094932.2351791-1-thomas.petazzoni@bootlin.com/T/#u
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
include/mount-api-utils.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/mount-api-utils.h b/include/mount-api-utils.h
index a916f99..87e173e 100644
--- a/include/mount-api-utils.h
+++ b/include/mount-api-utils.h
@@ -339,7 +339,7 @@ struct ul_statmount {
/*
* Special @mnt_id values that can be passed to listmount
*/
-#ifdef LSMT_ROOT
+#ifndef LSMT_ROOT
# define LSMT_ROOT 0xffffffffffffffff /* root mount */
#endif
--
2.53.0

View File

@@ -0,0 +1,42 @@
From a06adacd1009174b7ca35f529a2db165f6c1f3aa Mon Sep 17 00:00:00 2001
From: Bernd Kuhls <bernd@kuhls.net>
Date: Fri, 16 Jan 2026 23:33:34 +0100
Subject: [PATCH] autotools: optionally add libpthread to uuid.pc
Fixes https://github.com/util-linux/util-linux/issues/3210#issuecomment-3477915953
Upstream: https://github.com/util-linux/util-linux/commit/d88a62e4cd385e07b3cb8fb309bbb03981ea2970
[Bernd: backported to 2.41.3]
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
Makefile.am | 1 +
libuuid/uuid.pc.in | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index 01e99701d..cd1d157ce 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -189,6 +189,7 @@ edit_cmd = sed \
-e 's|@usrbin_execdir[@]|$(usrbin_execdir)|g' \
-e 's|@usrsbin_execdir[@]|$(usrsbin_execdir)|g' \
-e 's|@SOCKET_LIBS[@]|$(SOCKET_LIBS)|g' \
+ -e 's|@PTHREAD_LIBS[@]|$(PTHREAD_LIBS)|g' \
-e 's|@VERSION[@]|$(VERSION)|g' \
-e 's|@ADJTIME_PATH[@]|$(ADJTIME_PATH)|g' \
-e 's|@LIBUUID_VERSION[@]|$(LIBUUID_VERSION)|g' \
diff --git a/libuuid/uuid.pc.in b/libuuid/uuid.pc.in
index 51929fe80..a40dc6644 100644
--- a/libuuid/uuid.pc.in
+++ b/libuuid/uuid.pc.in
@@ -7,5 +7,5 @@ Name: uuid
Description: Universally unique id library
Version: @LIBUUID_VERSION@
Cflags: -I${includedir}/uuid
-Libs.private: @SOCKET_LIBS@ -lpthread
+Libs.private: @SOCKET_LIBS@ @PTHREAD_LIBS@
Libs: -L${libdir} -luuid
--
2.47.3

View File

@@ -0,0 +1 @@
../util-linux.hash

View File

@@ -0,0 +1,102 @@
################################################################################
#
# util-linux-libs
#
################################################################################
# Please keep this file as similar as possible to util-linux.mk
UTIL_LINUX_LIBS_VERSION = $(UTIL_LINUX_VERSION)
UTIL_LINUX_LIBS_SOURCE = $(UTIL_LINUX_SOURCE)
UTIL_LINUX_LIBS_SITE = $(UTIL_LINUX_SITE)
UTIL_LINUX_LIBS_DL_SUBDIR = $(UTIL_LINUX_DL_SUBDIR)
UTIL_LINUX_LIBS_CPE_ID_VENDOR = $(UTIL_LINUX_CPE_ID_VENDOR)
UTIL_LINUX_LIBS_CPE_ID_PRODUCT = $(UTIL_LINUX_CPE_ID_PRODUCT)
# README.licensing claims that some files are GPL-2.0 only, but this is not
# true. Some files are GPL-3.0+ but only in tests and optionally in hwclock
# (but we disable that option). rfkill uses an ISC-style license.
UTIL_LINUX_LIBS_LICENSE = LGPL-2.1+ (libblkid, libfdisk, libmount), BSD-3-Clause (libuuid)
UTIL_LINUX_LIBS_LICENSE_FILES = README.licensing \
Documentation/licenses/COPYING.BSD-3-Clause \
Documentation/licenses/COPYING.LGPL-2.1-or-later
# 0002-autotools-optionally-add-libpthread-to-uuid.pc.patch
UTIL_LINUX_LIBS_AUTORECONF = YES
UTIL_LINUX_LIBS_INSTALL_STAGING = YES
UTIL_LINUX_LIBS_DEPENDENCIES = \
host-pkgconf \
$(if $(BR2_PACKAGE_LIBXCRYPT),libxcrypt) \
$(TARGET_NLS_DEPENDENCIES)
# --disable-year2038: tells the configure script to not abort if the
# system is not Y2038 compliant. util-linux-libs will support year2038
# if the system is compliant even with this option passed
UTIL_LINUX_LIBS_CONF_OPTS += \
--disable-rpath \
--disable-makeinstall-chown \
--disable-year2038
UTIL_LINUX_LIBS_LINK_LIBS = $(TARGET_NLS_LIBS)
# Prevent the installation from attempting to move shared libraries from
# ${usrlib_execdir} (/usr/lib) to ${libdir} (/lib), since both paths are
# the same when merged usr is in use.
ifeq ($(BR2_ROOTFS_MERGED_USR),y)
UTIL_LINUX_LIBS_CONF_OPTS += --bindir=/usr/bin --sbindir=/usr/sbin --libdir=/usr/lib
endif
# systemd depends on util-linux-libs so we disable systemd support
UTIL_LINUX_LIBS_CONF_OPTS += \
--without-systemd \
--with-systemdsystemunitdir=no
# systemd/eudev depend on util-linux-libs so we disable udev support
UTIL_LINUX_LIBS_CONF_OPTS += --without-udev
# No libs use wchar
UTIL_LINUX_LIBS_CONF_OPTS += --disable-widechar
# No libs use ncurses
UTIL_LINUX_LIBS_CONF_OPTS += --without-ncursesw --without-ncurses
# workaround for static_assert on uclibc-ng < 1.0.42
UTIL_LINUX_LIBS_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -Dstatic_assert=_Static_assert"
# Unfortunately, the util-linux does LIBS="" at the end of its
# configure script. So we have to pass the proper LIBS value when
# calling the configure script to make configure tests pass properly,
# and then pass it again at build time.
UTIL_LINUX_LIBS_CONF_ENV += LIBS="$(UTIL_LINUX_LIBS_LINK_LIBS)"
UTIL_LINUX_LIBS_MAKE_OPTS += LIBS="$(UTIL_LINUX_LIBS_LINK_LIBS)"
# libmount optionally uses selinux
ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBMOUNT)$(BR2_PACKAGE_LIBSELINUX),yy)
UTIL_LINUX_LIBS_DEPENDENCIES += libselinux
UTIL_LINUX_LIBS_CONF_OPTS += --with-selinux
else
UTIL_LINUX_LIBS_CONF_OPTS += --without-selinux
endif
# Disable utilities
UTIL_LINUX_LIBS_CONF_OPTS += \
--disable-all-programs \
$(if $(BR2_PACKAGE_UTIL_LINUX_LIBBLKID),--enable-libblkid,--disable-libblkid) \
$(if $(BR2_PACKAGE_UTIL_LINUX_LIBFDISK),--enable-libfdisk,--disable-libfdisk) \
$(if $(BR2_PACKAGE_UTIL_LINUX_LIBMOUNT),--enable-libmount,--disable-libmount) \
$(if $(BR2_PACKAGE_UTIL_LINUX_LIBSMARTCOLS),--enable-libsmartcols,--disable-libsmartcols) \
$(if $(BR2_PACKAGE_UTIL_LINUX_LIBUUID),--enable-libuuid,--disable-libuuid)
# libmount python bindings are separate, will be installed by full util-linux
UTIL_LINUX_LIBS_CONF_OPTS += --without-python --disable-pylibmount
# No libs use readline
UTIL_LINUX_LIBS_CONF_OPTS += --without-readline
# No libs use audit
UTIL_LINUX_LIBS_CONF_OPTS += --without-audit
# No libs use libmagic
UTIL_LINUX_LIBS_CONF_OPTS += --without-libmagic
$(eval $(autotools-package))

View File

@@ -0,0 +1,14 @@
# From https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.41/sha256sums.asc
sha256 f586e35d320ff537aab3ffeca37e9ecd482ccbe013590db4429a414d8aa6a728 util-linux-2.41.5.tar.xz
# License files, locally calculated
sha256 4c2db318192bda62f3f8fcf71488bb5e602ae4385eba281d711b46cc13a40bb3 README.licensing
sha256 527f738966ca396cd5a68c1509390de2a780c6b614d9ee57f7544a6161938ed1 Documentation/licenses/COPYING.BSD-2-Clause
sha256 9b718a9460fed5952466421235bc79eb49d4e9eacc920d7a9dd6285ab8fd6c6d Documentation/licenses/COPYING.BSD-3-Clause
sha256 ba7640f00d93e72e92b94b9d71f25ec53bac2f1682f5c4adcccb0018359f60f8 Documentation/licenses/COPYING.BSD-4-Clause-UC
sha256 6fc9e709ccbfe0d77fbffa2427a983282be2eb88e47b1cdb49f21a83b4d1e665 Documentation/licenses/COPYING.EUPL-1.2
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 Documentation/licenses/COPYING.GPL-2.0-only
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 Documentation/licenses/COPYING.GPL-2.0-or-later
sha256 3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986 Documentation/licenses/COPYING.GPL-3.0-or-later
sha256 e53348ce276358e9997014071c5294b36a18c4b34f32f00ee57b9acce0aafd63 Documentation/licenses/COPYING.ISC
sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 Documentation/licenses/COPYING.LGPL-2.1-or-later
sha256 8555341619542abb48c102afd954e42d4478e5be16ad3d5af7b0ff71009e7348 Documentation/licenses/COPYING.MIT

View File

@@ -0,0 +1,353 @@
################################################################################
#
# util-linux
#
################################################################################
# When making changes to this file, please check if
# util-linux-libs/util-linux-libs.mk needs to be updated accordingly as well.
UTIL_LINUX_VERSION_MAJOR = 2.41
UTIL_LINUX_VERSION = $(UTIL_LINUX_VERSION_MAJOR).5
UTIL_LINUX_SOURCE = util-linux-$(UTIL_LINUX_VERSION).tar.xz
UTIL_LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/util-linux/v$(UTIL_LINUX_VERSION_MAJOR)
# README.licensing claims that some files are GPL-2.0 only, but this is not
# true. Some files are GPL-3.0+ but only in tests and optionally in hwclock
# (but we disable that option). rfkill uses an ISC-style license.
UTIL_LINUX_LICENSE = \
GPL-2.0+, \
BSD-4-Clause, \
LGPL-2.1+ (libblkid, libfdisk, libmount), \
BSD-3-Clause (libuuid), \
BSD-2-Clause (xxhash), \
ISC (rfkill), \
MIT (hardlink, flock)
UTIL_LINUX_LICENSE_FILES = README.licensing \
Documentation/licenses/COPYING.BSD-2-Clause \
Documentation/licenses/COPYING.BSD-3-Clause \
Documentation/licenses/COPYING.BSD-4-Clause-UC \
Documentation/licenses/COPYING.EUPL-1.2 \
Documentation/licenses/COPYING.GPL-2.0-only \
Documentation/licenses/COPYING.GPL-2.0-or-later \
Documentation/licenses/COPYING.GPL-3.0-or-later \
Documentation/licenses/COPYING.ISC \
Documentation/licenses/COPYING.LGPL-2.1-or-later \
Documentation/licenses/COPYING.MIT
UTIL_LINUX_CPE_ID_VENDOR = kernel
# package/util-linux/0003-loopdev-use-openat2-RESOLVE_NO_SYMLINKS-for-backing-.patch
UTIL_LINUX_IGNORE_CVES += CVE-2026-27456
# 0002-autotools-optionally-add-libpthread-to-uuid.pc.patch
UTIL_LINUX_AUTORECONF = YES
UTIL_LINUX_INSTALL_STAGING = YES
UTIL_LINUX_DEPENDENCIES = \
host-pkgconf \
$(if $(BR2_PACKAGE_LIBXCRYPT),libxcrypt) \
$(if $(BR2_PACKAGE_UTIL_LINUX_LIBS),util-linux-libs) \
$(TARGET_NLS_DEPENDENCIES)
# --disable-year2038: tells the configure script to not abort if the
# system is not Y2038 compliant. util-linux will support year2038 if
# the system is compliant even with this option passed
UTIL_LINUX_CONF_OPTS += \
--disable-asciidoc \
--disable-makeinstall-chown \
--disable-poman \
--disable-rpath \
--disable-year2038
UTIL_LINUX_LINK_LIBS = $(TARGET_NLS_LIBS)
HOST_UTIL_LINUX_DEPENDENCIES = host-pkgconf
# We also don't want the host-python dependency
HOST_UTIL_LINUX_CONF_OPTS = \
--disable-asciidoc \
--disable-poman \
--without-systemd \
--with-systemdsystemunitdir=no \
--without-python
ifeq ($(BR2_PACKAGE_UTIL_LINUX_UUIDD),y)
define UTIL_LINUX_USERS
uuidd -1 uuidd -1 * - - - uuidd user
endef
endif
ifneq ($(BR2_PACKAGE_UTIL_LINUX_BINARIES)$(BR2_PACKAGE_UTIL_LINUX_CRAMFS)$(BR2_PACKAGE_UTIL_LINUX_FSCK)$(BR2_PACKAGE_UTIL_LINUX_LOSETUP),)
UTIL_LINUX_SELINUX_MODULES = fstools
endif
# Prevent the installation from attempting to move shared libraries from
# ${usrlib_execdir} (/usr/lib) to ${libdir} (/lib), since both paths are
# the same when merged usr is in use.
ifeq ($(BR2_ROOTFS_MERGED_USR),y)
UTIL_LINUX_CONF_OPTS += --bindir=/usr/bin --libdir=/usr/lib
# Ditto for /usr/sbin and /usr/bin when merge sbin is in use
ifeq ($(BR2_ROOTFS_MERGED_BIN),y)
UTIL_LINUX_CONF_OPTS += --sbindir=/usr/bin
else
UTIL_LINUX_CONF_OPTS += --sbindir=/usr/sbin
endif
endif
ifeq ($(BR2_PACKAGE_SYSTEMD),y)
UTIL_LINUX_CONF_OPTS += --with-systemd --with-systemdsystemunitdir=/usr/lib/systemd/system
UTIL_LINUX_DEPENDENCIES += systemd
else
UTIL_LINUX_CONF_OPTS += --without-systemd --with-systemdsystemunitdir=no
endif
ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
UTIL_LINUX_CONF_OPTS += --with-udev
UTIL_LINUX_DEPENDENCIES += udev
else
UTIL_LINUX_CONF_OPTS += --without-udev
endif
ifeq ($(BR2_PACKAGE_NCURSES),y)
UTIL_LINUX_DEPENDENCIES += ncurses
ifeq ($(BR2_PACKAGE_NCURSES_WCHAR),y)
UTIL_LINUX_CONF_OPTS += --with-ncursesw
UTIL_LINUX_CONF_ENV += NCURSESW6_CONFIG=$(STAGING_DIR)/usr/bin/$(NCURSES_CONFIG_SCRIPTS)
else
UTIL_LINUX_CONF_OPTS += --without-ncursesw --with-ncurses --disable-widechar
UTIL_LINUX_CONF_ENV += NCURSES6_CONFIG=$(STAGING_DIR)/usr/bin/$(NCURSES_CONFIG_SCRIPTS)
endif
else
ifeq ($(BR2_USE_WCHAR),y)
UTIL_LINUX_CONF_OPTS += --enable-widechar
else
UTIL_LINUX_CONF_OPTS += --disable-widechar
endif
UTIL_LINUX_CONF_OPTS += --without-ncursesw --without-ncurses
endif
# workaround for static_assert on uclibc-ng < 1.0.42
UTIL_LINUX_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -Dstatic_assert=_Static_assert"
# Unfortunately, the util-linux does LIBS="" at the end of its
# configure script. So we have to pass the proper LIBS value when
# calling the configure script to make configure tests pass properly,
# and then pass it again at build time.
UTIL_LINUX_CONF_ENV += LIBS="$(UTIL_LINUX_LINK_LIBS)"
UTIL_LINUX_MAKE_OPTS += LIBS="$(UTIL_LINUX_LINK_LIBS)"
ifeq ($(BR2_PACKAGE_LIBSELINUX),y)
UTIL_LINUX_DEPENDENCIES += libselinux
UTIL_LINUX_CONF_OPTS += --with-selinux
else
UTIL_LINUX_CONF_OPTS += --without-selinux
define UTIL_LINUX_SELINUX_PAMFILES_TWEAK
$(foreach f,su su-l,
$(SED) '/^.*pam_selinux.so.*$$/d' \
$(TARGET_DIR)/etc/pam.d/$(f)
)
endef
endif
# Used by setpriv
UTIL_LINUX_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBCAP_NG),libcap-ng)
# Used by cramfs utils
UTIL_LINUX_DEPENDENCIES += $(if $(BR2_PACKAGE_ZLIB),zlib)
# Used by login-utils
UTIL_LINUX_DEPENDENCIES += $(if $(BR2_PACKAGE_LINUX_PAM),linux-pam)
# Used by hardlink
UTIL_LINUX_DEPENDENCIES += $(if $(BR2_PACKAGE_PCRE2),pcre2)
# Disable/Enable utilities
UTIL_LINUX_CONF_OPTS += \
$(if $(BR2_PACKAGE_UTIL_LINUX_BINARIES),--enable-all-programs,--disable-all-programs) \
$(if $(BR2_PACKAGE_UTIL_LINUX_AGETTY),--enable-agetty,--disable-agetty) \
$(if $(BR2_PACKAGE_UTIL_LINUX_BFS),--enable-bfs,--disable-bfs) \
$(if $(BR2_PACKAGE_UTIL_LINUX_CAL),--enable-cal,--disable-cal) \
$(if $(BR2_PACKAGE_UTIL_LINUX_CHFN_CHSH),--enable-chfn-chsh,--disable-chfn-chsh) \
$(if $(BR2_PACKAGE_UTIL_LINUX_CHMEM),--enable-chmem,--disable-chmem) \
$(if $(BR2_PACKAGE_UTIL_LINUX_CRAMFS),--enable-cramfs,--disable-cramfs) \
$(if $(BR2_PACKAGE_UTIL_LINUX_EJECT),--enable-eject,--disable-eject) \
$(if $(BR2_PACKAGE_UTIL_LINUX_FALLOCATE),--enable-fallocate,--disable-fallocate) \
$(if $(BR2_PACKAGE_UTIL_LINUX_FDFORMAT),--enable-fdformat,--disable-fdformat) \
$(if $(BR2_PACKAGE_UTIL_LINUX_FSCK),--enable-fsck,--disable-fsck) \
$(if $(BR2_PACKAGE_UTIL_LINUX_HARDLINK),--enable-hardlink,--disable-hardlink) \
$(if $(BR2_PACKAGE_UTIL_LINUX_HWCLOCK),--enable-hwclock --disable-hwclock-gplv3,--disable-hwclock) \
$(if $(BR2_PACKAGE_UTIL_LINUX_IPCMK),--enable-ipcmk,--disable-ipcmk) \
$(if $(BR2_PACKAGE_UTIL_LINUX_IPCRM),--enable-ipcrm,--disable-ipcrm) \
$(if $(BR2_PACKAGE_UTIL_LINUX_IPCS),--enable-ipcs,--disable-ipcs) \
$(if $(BR2_PACKAGE_UTIL_LINUX_IRQTOP),--enable-irqtop,--disable-irqtop) \
$(if $(BR2_PACKAGE_UTIL_LINUX_KILL),--enable-kill,--disable-kill) \
$(if $(BR2_PACKAGE_UTIL_LINUX_LAST),--enable-last,--disable-last) \
$(if $(BR2_PACKAGE_UTIL_LINUX_LIBBLKID),--enable-libblkid,--disable-libblkid) \
$(if $(BR2_PACKAGE_UTIL_LINUX_LIBFDISK),--enable-libfdisk,--disable-libfdisk) \
$(if $(BR2_PACKAGE_UTIL_LINUX_LIBMOUNT),--enable-libmount,--disable-libmount) \
$(if $(BR2_PACKAGE_UTIL_LINUX_LIBSMARTCOLS),--enable-libsmartcols,--disable-libsmartcols) \
$(if $(BR2_PACKAGE_UTIL_LINUX_LIBUUID),--enable-libuuid,--disable-libuuid) \
$(if $(BR2_PACKAGE_UTIL_LINUX_LINE),--enable-line,--disable-line) \
$(if $(BR2_PACKAGE_UTIL_LINUX_LOGGER),--enable-logger,--disable-logger) \
$(if $(BR2_PACKAGE_UTIL_LINUX_LOGIN),--enable-login,--disable-login) \
$(if $(BR2_PACKAGE_UTIL_LINUX_LOSETUP),--enable-losetup,--disable-losetup) \
$(if $(BR2_PACKAGE_UTIL_LINUX_LSFD),--enable-lsfd,--disable-lsfd) \
$(if $(BR2_PACKAGE_UTIL_LINUX_LSLOGINS),--enable-lslogins,--disable-lslogins) \
$(if $(BR2_PACKAGE_UTIL_LINUX_LSMEM),--enable-lsmem,--disable-lsmem) \
$(if $(BR2_PACKAGE_UTIL_LINUX_MESG),--enable-mesg,--disable-mesg) \
$(if $(BR2_PACKAGE_UTIL_LINUX_MINIX),--enable-minix,--disable-minix) \
$(if $(BR2_PACKAGE_UTIL_LINUX_MORE),--enable-more,--disable-more) \
$(if $(BR2_PACKAGE_UTIL_LINUX_MOUNT),--enable-mount,--disable-mount) \
$(if $(BR2_PACKAGE_UTIL_LINUX_MOUNTPOINT),--enable-mountpoint,--disable-mountpoint) \
$(if $(BR2_PACKAGE_UTIL_LINUX_NEWGRP),--enable-newgrp,--disable-newgrp) \
$(if $(BR2_PACKAGE_UTIL_LINUX_NOLOGIN),--enable-nologin,--disable-nologin) \
$(if $(BR2_PACKAGE_UTIL_LINUX_NSENTER),--enable-nsenter,--disable-nsenter) \
$(if $(BR2_PACKAGE_UTIL_LINUX_PARTX),--enable-partx,--disable-partx) \
$(if $(BR2_PACKAGE_UTIL_LINUX_PG),--enable-pg,--disable-pg) \
$(if $(BR2_PACKAGE_UTIL_LINUX_PIVOT_ROOT),--enable-pivot_root,--disable-pivot_root) \
$(if $(BR2_PACKAGE_UTIL_LINUX_RAW),--enable-raw,--disable-raw) \
$(if $(BR2_PACKAGE_UTIL_LINUX_RENAME),--enable-rename,--disable-rename) \
$(if $(BR2_PACKAGE_UTIL_LINUX_RFKILL),--enable-rfkill,--disable-rfkill) \
$(if $(BR2_PACKAGE_UTIL_LINUX_RUNUSER),--enable-runuser,--disable-runuser) \
$(if $(BR2_PACKAGE_UTIL_LINUX_SCHEDUTILS),--enable-schedutils,--disable-schedutils) \
$(if $(BR2_PACKAGE_UTIL_LINUX_SETPRIV),--enable-setpriv,--disable-setpriv) \
$(if $(BR2_PACKAGE_UTIL_LINUX_SETTERM),--enable-setterm,--disable-setterm) \
$(if $(BR2_PACKAGE_UTIL_LINUX_SU),--enable-su,--disable-su) \
$(if $(BR2_PACKAGE_UTIL_LINUX_SULOGIN),--enable-sulogin,--disable-sulogin) \
$(if $(BR2_PACKAGE_UTIL_LINUX_SWITCH_ROOT),--enable-switch_root,--disable-switch_root) \
$(if $(BR2_PACKAGE_UTIL_LINUX_TUNELP),--enable-tunelp,--disable-tunelp) \
$(if $(BR2_PACKAGE_UTIL_LINUX_UL),--enable-ul,--disable-ul) \
$(if $(BR2_PACKAGE_UTIL_LINUX_UNSHARE),--enable-unshare,--disable-unshare) \
$(if $(BR2_PACKAGE_UTIL_LINUX_UTMPDUMP),--enable-utmpdump,--disable-utmpdump) \
$(if $(BR2_PACKAGE_UTIL_LINUX_UUIDD),--enable-uuidd,--disable-uuidd) \
$(if $(BR2_PACKAGE_UTIL_LINUX_VIPW),--enable-vipw,--disable-vipw) \
$(if $(BR2_PACKAGE_UTIL_LINUX_WAITPID),--enable-waitpid,--disable-waitpid) \
$(if $(BR2_PACKAGE_UTIL_LINUX_WALL),--enable-wall,--disable-wall) \
$(if $(BR2_PACKAGE_UTIL_LINUX_WDCTL),--enable-wdctl,--disable-wdctl) \
$(if $(BR2_PACKAGE_UTIL_LINUX_WIPEFS),--enable-wipefs,--disable-wipefs) \
$(if $(BR2_PACKAGE_UTIL_LINUX_WRITE),--enable-write,--disable-write) \
$(if $(BR2_PACKAGE_UTIL_LINUX_ZRAMCTL),--enable-zramctl,--disable-zramctl)
# In the host version of util-linux, we only require libuuid and
# libmount (plus libblkid as an indirect dependency of libmount).
# So disable all of the programs, unless BR2_PACKAGE_HOST_UTIL_LINUX is set
HOST_UTIL_LINUX_CONF_OPTS += \
--enable-libblkid \
--enable-libmount \
--enable-libuuid \
--without-libmagic \
--without-ncurses \
--without-ncursesw \
--without-tinfo
# Disable raw command since starting from version 2.37 needs a
# work-around to build but in the end we don't need at all.
HOST_UTIL_LINUX_CONF_OPTS += \
--disable-raw
ifeq ($(BR2_PACKAGE_HOST_UTIL_LINUX),y)
HOST_UTIL_LINUX_CONF_OPTS += --disable-makeinstall-chown
# disable commands that have ncurses dependency, as well as
# other ones that are useless on the host
HOST_UTIL_LINUX_CONF_OPTS += \
--disable-agetty \
--disable-chfn-chsh \
--disable-chmem \
--disable-ipcmk \
--disable-liblastlog2 \
--disable-login \
--disable-lsfd \
--disable-lslogins \
--disable-mesg \
--disable-more \
--disable-newgrp \
--disable-nologin \
--disable-nsenter \
--disable-pg \
--disable-rfkill \
--disable-runuser \
--disable-schedutils \
--disable-setpriv \
--disable-setterm \
--disable-su \
--disable-sulogin \
--disable-tunelp \
--disable-ul \
--disable-unshare \
--disable-uuidd \
--disable-vipw \
--disable-wall \
--disable-wdctl \
--disable-write \
--disable-zramctl
# Used by cramfs utils
HOST_UTIL_LINUX_DEPENDENCIES += host-zlib
else
HOST_UTIL_LINUX_CONF_OPTS += --disable-all-programs
endif
# Install libmount Python bindings
ifeq ($(BR2_PACKAGE_PYTHON3),y)
UTIL_LINUX_CONF_OPTS += --with-python
UTIL_LINUX_DEPENDENCIES += python3
ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBMOUNT),y)
UTIL_LINUX_CONF_OPTS += --enable-pylibmount
else
UTIL_LINUX_CONF_OPTS += --disable-pylibmount
endif
else
UTIL_LINUX_CONF_OPTS += --without-python
endif
ifeq ($(BR2_PACKAGE_READLINE),y)
UTIL_LINUX_CONF_OPTS += --with-readline
UTIL_LINUX_LINK_LIBS += $(if $(BR2_STATIC_LIBS),-lcurses)
UTIL_LINUX_DEPENDENCIES += readline
else
UTIL_LINUX_CONF_OPTS += --without-readline
endif
ifeq ($(BR2_PACKAGE_AUDIT),y)
UTIL_LINUX_CONF_OPTS += --with-audit
UTIL_LINUX_DEPENDENCIES += audit
else
UTIL_LINUX_CONF_OPTS += --without-audit
endif
ifeq ($(BR2_PACKAGE_FILE),y)
UTIL_LINUX_CONF_OPTS += --with-libmagic
UTIL_LINUX_DEPENDENCIES += file
else
UTIL_LINUX_CONF_OPTS += --without-libmagic
endif
# Install PAM configuration files
ifeq ($(BR2_PACKAGE_UTIL_LINUX_SU)$(BR2_PACKAGE_LINUX_PAM),yy)
define UTIL_LINUX_INSTALL_PAMFILES
$(INSTALL) -D -m 0644 package/util-linux/su.pam \
$(TARGET_DIR)/etc/pam.d/su
$(INSTALL) -D -m 0644 package/util-linux/su.pam \
$(TARGET_DIR)/etc/pam.d/su-l
$(UTIL_LINUX_SELINUX_PAMFILES_TWEAK)
endef
UTIL_LINUX_POST_INSTALL_TARGET_HOOKS += UTIL_LINUX_INSTALL_PAMFILES
endif
# Install agetty->getty symlink to avoid breakage when there's no busybox
ifeq ($(BR2_PACKAGE_UTIL_LINUX_AGETTY),y)
ifeq ($(BR2_PACKAGE_BUSYBOX),)
define UTIL_LINUX_GETTY_SYMLINK
ln -sf agetty $(TARGET_DIR)/sbin/getty
endef
endif
endif
UTIL_LINUX_POST_INSTALL_TARGET_HOOKS += UTIL_LINUX_GETTY_SYMLINK
$(eval $(autotools-package))
$(eval $(host-autotools-package))
# Must be included after the autotools-package call, to make sure all variables
# are available
include package/util-linux/util-linux-libs/util-linux-libs.mk