kumquat-buildroot/system/Config.in
Yann E. MORIN 10c637ab06 package/skeleton-init-systemd: add option to use overlayfs on /var
Systemd requires /var to be writeable [1]. With read-only rootfs, we
need a solution that makes sure /var is writeable. We already have a
solution using a factory, with systemd-tmpfiles. This approach has a few
limitations:

- The behaviour of what happens when the rootfs is updated and the
  contents of the factory /var changes are not very intuitive.

- systemd-tmpfiles is not started super early in the boot, so there's a
  relatively long time that /var is not writeable. There is also no easy
  way in systemd to express dependencies on the subdirectories of /var
  to have been populated from the factory.

- The contents of /var is duplicated. If it is big, the rootfs size
  increases unnecessarily and it takes a long time before the copying is
  done. This is also not done atomically.

This commit adds an alternative using an overlay filesystem that has the
following characteristics:

-   Don't depend on anything being available, except the
    API File Systems [2]. In other words, this can be done very early in
    the boot process. This is useful because /var is meant to be
    available before normal and even some early services are running.

-   Be a clean drop-in, that can be trivially added / removed.

-   Make sure that overlayfs is available in the kernel.

-   Units are (partially) reusable for custom solutions. This goal is
    actually not fully reached yet: for that the service file should be
    converted into a template, and the mount unit should use a specifier
    for all repeated references to /var.

Mounting the overlay is slightly acrobatic and requires a few steps:

- First, we have to make sure the directories for overlayfs's upper,
  lower and work directories are available on a tmpfs. Note that
  "upper" and "work" must be on the same filesystem.

- The writeable overlay upper directory must be mounted.

- The original contents of /var must be bind-mounted to the overlay
  lower directory.

- Finally, the overlay must be mounted on /var.

For the overlayfs directories, we create a tree on /run. Since there is
no standard name convention for this, we create a new directory
"/run/buildroot" with subdirectory "mounts" for everything
mount-related. Below that, a subdirectory is created for every mount
point that needs helper directories. Thus, we arrive to
/run/buildroot/mounts/var as the base directory for the overlay. Below
this, the directories lower, upper and work are created.

The bind-mount of /var is done in the same service as the one creating
the overlay lower, upper and work directories. Creating those
directories can't be done in a mount unit, and bind-mounting /var in a
mount unit would create a circular dependency. Indeed, if we had a mount
unit to do the bind mount, then it sould look like:
    # run-buildroot-mounts-var-lower.mount
    [Mount]
    What=/var
    Where=/run/buildroot/mounts/var/lower
    Options=bind

and then the var.mount unit would need to have a dependency on that
unit:
    # var.mount
    [Unit]
    After=run-buildroot-mounts-var-lower.mount
    [Mount]
    Where=/var

However, the What=/var of the first unit automatically adds an implicit
dependency on /var, and since there is a unit providing Where=/var, we
would have run-buildroot-mounts-var-lower.mount depend on var.mount, but
we need var.mount to depend on run-buildroot-mounts-var-lower.mount, so
this is a circular dependency. There is no way to tell systemd no to add
the implicit dependency. So we do the bind mont manually in the service
unit that prepares the overlay structure.

For the writeable upper layer, we don't need to do anything. In the
default configuration, the upper layer is supposed to be a tmpfs, and
/run/buildroot/mounts/var/upper is already a tmpfs so it can serve as
is. To make it persistent, we suggest to the user to mount a writeable,
persistent filesystem on /run/buildroot/mounts/var. The
RequiresMountsFor dependency in the prepare-var-overlay service makes
sure that that mount is performed before the overlay is started. Using
/run/buildroot/mounts/var/upper as the mount point sounds more logical
at first, but since the work directory is supposed to be on the same
filesystem as the upper directory, this wouldn't work very well.

As example, consider using /dev/sdc1 as upper layer for var, this can be
achieved by adding the following line to fstab:

/dev/sdc1	/run/buildroot/mounts/var	ext4	defaults

Systemd will convert this into a mount unit with all the proper
dependencies.

Norbert provided some systemd units as a starting point, and that was
quite a huge help in understanding how to fit all those things together.

[1] - https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems/

Co-authored-by: Norbert Lange <nolange79@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin@orange.com>
Cc: Norbert Lange <nolange79@gmail.com>
Cc: Romain Naour <romain.naour@smile.fr>
Cc: Jérémy Rosen <jeremy.rosen@smile.fr>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
[Arnout:
 - Merge commit messages from Yann and from Norbert.
 - Remove the run-buildroot-mounts-var.mount unit; instead, just reuse
   the existing tmpfs for the upper layer in the default case.
 - Update the help text to explain how to mount a custom upper layer
   with fstab.
]
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2023-10-08 20:12:01 +02:00

714 lines
22 KiB
Plaintext

menu "System configuration"
# Note on package/skeleton: usually, it is not safe to 'select' a
# provider of a virtual package. But below we have an exception: each
# init system may select one of the virtual skeleton-init-* packages.
# As only one init system may be enabled, only one skeleton-init-* may
# be selected. So this is a safe situation.
choice
prompt "Root FS skeleton"
config BR2_ROOTFS_SKELETON_DEFAULT
bool "default target skeleton"
help
Use default target skeleton for selected init system.
config BR2_ROOTFS_SKELETON_CUSTOM
bool "custom target skeleton"
select BR2_PACKAGE_SKELETON_CUSTOM
help
Use custom target skeleton.
# skeleton from br2-external trees, if any
source "$BR2_BASE_DIR/.br2-external.in.skeleton"
endchoice
if BR2_ROOTFS_SKELETON_CUSTOM
config BR2_ROOTFS_SKELETON_CUSTOM_PATH
string "custom target skeleton path"
help
Path to custom target skeleton.
endif
if BR2_ROOTFS_SKELETON_DEFAULT
config BR2_TARGET_GENERIC_HOSTNAME
string "System hostname"
default "buildroot"
help
Select system hostname to be stored in /etc/hostname.
Leave empty to not create /etc/hostname, or to keep the
one from a custom skeleton.
config BR2_TARGET_GENERIC_ISSUE
string "System banner"
default "Welcome to Buildroot"
help
Select system banner (/etc/issue) to be displayed at login.
Leave empty to not create /etc/issue, or to keep the
one from a custom skeleton.
endif
choice
bool "Passwords encoding"
default BR2_TARGET_GENERIC_PASSWD_SHA256
help
Choose the password encoding scheme to use when Buildroot
needs to encode a password (eg. the root password, below).
Note: this is used at build-time, and *not* at runtime.
config BR2_TARGET_GENERIC_PASSWD_SHA256
bool "sha-256"
help
Use SHA256 to encode passwords which is stronger than MD5.
config BR2_TARGET_GENERIC_PASSWD_SHA512
bool "sha-512"
help
Use SHA512 to encode passwords which is stronger than SHA256
endchoice # Passwd encoding
config BR2_TARGET_GENERIC_PASSWD_METHOD
string
default "sha-256" if BR2_TARGET_GENERIC_PASSWD_SHA256
default "sha-512" if BR2_TARGET_GENERIC_PASSWD_SHA512
# See comment at the top of the file, about selecting individual
# skeletons, which are providers of the virtual skeleton package.
choice
prompt "Init system"
default BR2_INIT_BUSYBOX
config BR2_INIT_BUSYBOX
bool "BusyBox"
select BR2_PACKAGE_BUSYBOX
select BR2_PACKAGE_INITSCRIPTS
select BR2_PACKAGE_SKELETON_INIT_SYSV if BR2_ROOTFS_SKELETON_DEFAULT
config BR2_INIT_SYSV
bool "systemV"
depends on BR2_USE_MMU # sysvinit
select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # sysvinit
select BR2_PACKAGE_INITSCRIPTS
select BR2_PACKAGE_SYSVINIT
select BR2_PACKAGE_SKELETON_INIT_SYSV if BR2_ROOTFS_SKELETON_DEFAULT
config BR2_INIT_OPENRC
bool "OpenRC"
depends on BR2_USE_MMU
depends on !BR2_STATIC_LIBS
select BR2_PACKAGE_OPENRC
select BR2_PACKAGE_SKELETON_INIT_OPENRC if BR2_ROOTFS_SKELETON_DEFAULT
comment "openrc needs a toolchain w/ dynamic library"
depends on BR2_USE_MMU
depends on BR2_STATIC_LIBS
# In Buildroot, we decided not to support a split-usr when systemd is
# used as an init system. This is a design decision, not a systemd
# issue. Thus the select is with BR2_INIT_SYSTEMD (below) rather than
# with BR2_PACKAGE_SYSTEMD.
config BR2_INIT_SYSTEMD
bool "systemd"
depends on BR2_PACKAGE_SYSTEMD_ARCH_SUPPORTS
depends on BR2_USE_MMU
depends on !BR2_STATIC_LIBS
depends on BR2_TOOLCHAIN_USES_GLIBC
depends on BR2_TOOLCHAIN_HAS_SSP
depends on BR2_TOOLCHAIN_HAS_THREADS
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5
depends on BR2_HOST_GCC_AT_LEAST_5
select BR2_ROOTFS_MERGED_USR
select BR2_PACKAGE_SYSTEMD
select BR2_PACKAGE_SKELETON_INIT_SYSTEMD if BR2_ROOTFS_SKELETON_DEFAULT
comment "systemd needs a glibc toolchain w/ SSP, headers >= 4.14, host and target gcc >= 5"
depends on BR2_PACKAGE_SYSTEMD_ARCH_SUPPORTS
depends on BR2_USE_MMU
depends on !BR2_TOOLCHAIN_USES_GLIBC || \
!BR2_TOOLCHAIN_HAS_SSP || \
!BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14 || \
!BR2_TOOLCHAIN_GCC_AT_LEAST_5 || \
!BR2_HOST_GCC_AT_LEAST_5
comment "systemd highly recommends Linux >= 4.15"
depends on BR2_INIT_SYSTEMD
depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15
config BR2_INIT_NONE
bool "None"
select BR2_PACKAGE_SKELETON_INIT_NONE if BR2_ROOTFS_SKELETON_DEFAULT
help
Buildroot will not install any init system. You will
have to provide your own, either with a new package
or with a rootfs-overlay.
# Init systems from br2-external trees, if any
source "$BR2_BASE_DIR/.br2-external.in.init"
endchoice
if BR2_INIT_SYSTEMD
choice
bool "/var management"
default BR2_INIT_SYSTEMD_VAR_FACTORY # legacy
depends on !BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW
help
Select how Buildroot provides a read-write /var when the
rootfs is not remounted read-write.
Note: Buildroot uses a tmpfs, either as a mount point or as
the upper of an overlayfs, so as to at least make the system
bootable out of the box; mounting a filesystem from actual
storage is left to the integration, as it is too specific and
may need preparatory work like partitionning a device and/or
formatting a filesystem first, which falls out of the scope
of Buildroot.
config BR2_INIT_SYSTEMD_VAR_FACTORY
bool "build a factory to populate a tmpfs"
help
Build a factory of the content of /var as installed by
packages, mount a tmpfs on /var at runtime, so that
systemd-tmpfiles can populate it from the factory.
This may help on a read-only rootfs.
It probably does not play very well with triggering a call
to systemd-tmpfiles at build time (below).
To use persistent storage, provide a systemd dropin for the
var.mount unit, that overrides the What and Type, and possibly
the Options and After, fields.
config BR2_INIT_SYSTEMD_VAR_OVERLAYFS
bool "mount an overlayfs backed by a tmpfs"
select BR2_INIT_SYSTEMD_POPULATE_TMPFILES
help
Mount an overlayfs on /var, with the upper as a tmpfs.
To use a persistent storage, provide either a mount unit or a
fstab line to mount it on /run/buildroot/mounts/var, e.g.
/dev/sdc1 /run/buildroot/mounts/var ext4 defaults
config BR2_INIT_SYSTEMD_VAR_NONE
bool "do nothing"
help
Choose this if you have custom dispositions (like one or more
of a post-build script, a fakeroot script, systemd units, an
initramfs, or something else) that prepare /var to be writable
on a read-only rootfs.
endchoice
config BR2_INIT_SYSTEMD_POPULATE_TMPFILES
bool "trigger systemd-tmpfiles during build"
default y # legacy
help
Act on the systemd-tmpfiles.d database at build time, when
assembling the root filesystems.
This may help on a read-only filesystem.
It probably does not play very well with the /var factory
(above).
config BR2_PACKAGE_SYSTEMD_DEFAULT_TARGET
string "The default unit systemd starts at bootup"
default "multi-user.target"
help
Specify the name of the unit configuration file to be started
at bootup by systemd. Should end in ".target".
ex: multi-user.target
https://www.freedesktop.org/software/systemd/man/systemd.special.html#default.target
endif # BR2_INIT_SYSTEMD
choice
prompt "/dev management" if !BR2_INIT_SYSTEMD
default BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS
config BR2_ROOTFS_DEVICE_CREATION_STATIC
bool "Static using device table"
config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS
bool "Dynamic using devtmpfs only"
config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV
bool "Dynamic using devtmpfs + mdev"
select BR2_PACKAGE_BUSYBOX
config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
bool "Dynamic using devtmpfs + eudev"
depends on BR2_USE_WCHAR # eudev
depends on !BR2_STATIC_LIBS
depends on BR2_USE_MMU # eudev
select BR2_PACKAGE_EUDEV
comment "eudev needs a toolchain w/ wchar, dynamic library"
depends on BR2_USE_MMU
depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS
endchoice
comment "/dev management using udev (from systemd)"
depends on BR2_INIT_SYSTEMD
config BR2_ROOTFS_DEVICE_TABLE
string "Path to the permission tables"
default "system/device_table.txt"
help
Specify a space-separated list of permission table locations,
that will be passed to the makedevs utility to assign
correct owners and permissions on various files in the
target filesystem.
See package/makedevs/README for details on the usage and
syntax of these files.
config BR2_ROOTFS_STATIC_DEVICE_TABLE
string "Path to the device tables"
default "system/device_table_dev.txt"
depends on BR2_ROOTFS_DEVICE_CREATION_STATIC
help
Specify a space-separated list of device table locations,
that will be passed to the makedevs utility to create all
the special device files under /dev.
See package/makedevs/README for details on the usage and
syntax of these files.
config BR2_ROOTFS_DEVICE_TABLE_SUPPORTS_EXTENDED_ATTRIBUTES
bool "support extended attributes in device tables"
help
Support extended attributes handling in device tables
config BR2_ROOTFS_MERGED_USR
bool "Use symlinks to /usr for /bin, /sbin and /lib"
help
If you say 'n' here, then /bin, /sbin and /lib and their
counterparts in /usr will be separate directories. This
is the historical UNIX way. In this case, /usr can be a
filesystem on a partition separate from / .
If you say 'y' here, then /bin, /sbin and /lib will be
symlinks to their counterparts in /usr. In this case, /usr can
not be a separate filesystem.
if BR2_ROOTFS_SKELETON_DEFAULT
config BR2_TARGET_ENABLE_ROOT_LOGIN
bool "Enable root login with password"
default y
select BR2_PACKAGE_HOST_MKPASSWD if BR2_TARGET_GENERIC_ROOT_PASSWD != ""
help
Allow root to log in with a password.
If not enabled, root will not be able to log in with a
password. However, if you have an ssh server and you add an
ssh key, you can still allow root to log in. Alternatively,
you can use sudo to become root.
config BR2_TARGET_GENERIC_ROOT_PASSWD
string "Root password"
default ""
depends on BR2_TARGET_ENABLE_ROOT_LOGIN
help
Set the initial root password.
If set to empty (the default), then no root password will be
set, and root will need no password to log in.
If the password starts with any of $1$, $5$ or $6$, it is
considered to be already crypt-encoded with respectively md5,
sha256 or sha512. Any other value is taken to be a clear-text
value, and is crypt-encoded as per the "Passwords encoding"
scheme, above.
Note: "$" signs in the hashed password must be doubled. For
example, if the hashed password is
"$1$longsalt$v35DIIeMo4yUfI23yditq0", then you must enter it
as "$$1$$longsalt$$v35DIIeMo4yUfI23yditq0" (this is necessary
otherwise make would attempt to interpret the $ as a variable
expansion).
WARNING! WARNING!
The password appears as-is in the .config file, and may appear
in the build log! Avoid using a valuable password if either
the .config file or the build log may be distributed, or at
the very least use a strong cryptographic hash for your
password!
choice
bool "/bin/sh"
default BR2_SYSTEM_BIN_SH_DASH if !BR2_PACKAGE_BUSYBOX
help
Select which shell will provide /bin/sh.
# busybox has shells that work on noMMU
config BR2_SYSTEM_BIN_SH_BUSYBOX
bool "busybox' default shell"
depends on BR2_PACKAGE_BUSYBOX
config BR2_SYSTEM_BIN_SH_BASH
bool "bash"
depends on BR2_USE_MMU # bash
depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
select BR2_PACKAGE_BASH
config BR2_SYSTEM_BIN_SH_DASH
bool "dash"
depends on BR2_USE_MMU # dash
depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
select BR2_PACKAGE_DASH
config BR2_SYSTEM_BIN_SH_MKSH
bool "mksh"
depends on BR2_USE_MMU # mksh
depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
select BR2_PACKAGE_MKSH
config BR2_SYSTEM_BIN_SH_ZSH
bool "zsh"
depends on BR2_USE_MMU # zsh
depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
select BR2_PACKAGE_ZSH
comment "bash, dash, mksh, zsh need BR2_PACKAGE_BUSYBOX_SHOW_OTHERS"
depends on !BR2_PACKAGE_BUSYBOX_SHOW_OTHERS && BR2_PACKAGE_BUSYBOX
config BR2_SYSTEM_BIN_SH_NONE
bool "none"
endchoice # /bin/sh
config BR2_SYSTEM_BIN_SH
string
default "bash" if BR2_SYSTEM_BIN_SH_BASH
default "dash" if BR2_SYSTEM_BIN_SH_DASH
default "mksh" if BR2_SYSTEM_BIN_SH_MKSH
default "zsh" if BR2_SYSTEM_BIN_SH_ZSH
menuconfig BR2_TARGET_GENERIC_GETTY
bool "Run a getty (login prompt) after boot"
default y
if BR2_TARGET_GENERIC_GETTY
config BR2_TARGET_GENERIC_GETTY_PORT
string "TTY port"
default "console"
help
Specify a port to run a getty on.
choice
prompt "Baudrate"
default BR2_TARGET_GENERIC_GETTY_BAUDRATE_KEEP
help
Select a baudrate to use.
config BR2_TARGET_GENERIC_GETTY_BAUDRATE_KEEP
bool "keep kernel default"
config BR2_TARGET_GENERIC_GETTY_BAUDRATE_9600
bool "9600"
config BR2_TARGET_GENERIC_GETTY_BAUDRATE_19200
bool "19200"
config BR2_TARGET_GENERIC_GETTY_BAUDRATE_38400
bool "38400"
config BR2_TARGET_GENERIC_GETTY_BAUDRATE_57600
bool "57600"
config BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200
bool "115200"
endchoice
config BR2_TARGET_GENERIC_GETTY_BAUDRATE
string
default "0" if BR2_TARGET_GENERIC_GETTY_BAUDRATE_KEEP
default "9600" if BR2_TARGET_GENERIC_GETTY_BAUDRATE_9600
default "19200" if BR2_TARGET_GENERIC_GETTY_BAUDRATE_19200
default "38400" if BR2_TARGET_GENERIC_GETTY_BAUDRATE_38400
default "57600" if BR2_TARGET_GENERIC_GETTY_BAUDRATE_57600
default "115200" if BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200
config BR2_TARGET_GENERIC_GETTY_TERM
string "TERM environment variable"
default "vt100"
# currently observed by all but systemd
depends on !BR2_INIT_SYSTEMD
help
Specify a TERM type.
config BR2_TARGET_GENERIC_GETTY_OPTIONS
string "other options to pass to getty"
default ""
# currently observed by all but systemd
depends on !BR2_INIT_SYSTEMD
help
Any other flags you want to pass to getty,
Refer to getty --help for details.
endif
config BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW
bool "remount root filesystem read-write during boot"
default y
help
The root filesystem is typically mounted read-only at boot.
By default, buildroot remounts it in read-write mode early
during the boot process.
Say no here if you would rather like your root filesystem to
remain read-only.
If unsure, say Y.
config BR2_SYSTEM_DHCP
string "Network interface to configure through DHCP"
default ""
depends on BR2_PACKAGE_BUSYBOX || BR2_PACKAGE_IFUPDOWN || \
BR2_PACKAGE_SYSTEMD_NETWORKD || BR2_PACKAGE_NETIFRC
help
Enter here the name of the network interface (E.G. eth0) to
automatically configure through DHCP at bootup.
If left empty, no automatic DHCP requests will take place.
For more complicated network setups use an overlay to
overwrite /etc/network/interfaces or add a networkd
configuration file.
comment "automatic network configuration via DHCP needs ifupdown or busybox or networkd or netifrc"
depends on !(BR2_PACKAGE_BUSYBOX || BR2_PACKAGE_IFUPDOWN || \
BR2_PACKAGE_SYSTEMD_NETWORKD || BR2_PACKAGE_NETIFRC)
endif # BR2_ROOTFS_SKELETON_DEFAULT
config BR2_SYSTEM_DEFAULT_PATH
string "Set the system's default PATH"
default "/usr/bin:/usr/sbin" if BR2_ROOTFS_MERGED_USR
default "/bin:/sbin:/usr/bin:/usr/sbin" if !BR2_ROOTFS_MERGED_USR
help
Sets the system's default PATH. It is being used in
/etc/profile in the skeleton-init-common package and by some
daemons.
The default should work in most cases.
config BR2_ENABLE_LOCALE_PURGE
bool "Purge unwanted locales"
default y
help
Explicitly specify what locales to install on target. If N
then all locales supported by packages are installed.
config BR2_ENABLE_LOCALE_WHITELIST
string "Locales to keep"
default "C en_US"
depends on BR2_ENABLE_LOCALE_PURGE
help
Whitespace separated list of locales to allow on target.
Locales not listed here will be removed from the target.
See 'locale -a' on your host for a list of locales available
on your build host, or have a look in /usr/share/locale in
the target file system for available locales.
Notice that listing a locale here doesn't guarantee that it
will be available on the target - That purely depends on the
support for that locale in the selected packages.
config BR2_GENERATE_LOCALE
string "Generate locale data"
default ""
depends on \
(BR2_TOOLCHAIN_BUILDROOT_UCLIBC && BR2_ENABLE_LOCALE) || \
BR2_TOOLCHAIN_USES_GLIBC
help
Generate support for a list of locales. Locales can be
specified with or without encoding, when no encoding is
specified, UTF-8 is assumed. Examples of locales: en_US,
fr_FR.UTF-8.
config BR2_SYSTEM_ENABLE_NLS
bool "Enable Native Language Support (NLS)"
depends on BR2_USE_WCHAR
# - glibc has built-in NLS support, but anyway doesn't
# support static linking
# - musl and uclibc support static linking, but they don't
# have built-in NLS support, which is provided by the
# libintl library from gettext. The fact that it is a
# separate library causes too many problems for static
# linking.
depends on !BR2_STATIC_LIBS
select BR2_PACKAGE_GETTEXT if !BR2_TOOLCHAIN_HAS_FULL_GETTEXT
help
This option will enable Native Language Support, which will
allow software packages to support translations.
comment "NLS support needs a toolchain w/ wchar, dynamic library"
depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS
config BR2_TARGET_TZ_INFO
bool "Install timezone info"
select BR2_PACKAGE_TZDATA if BR2_TOOLCHAIN_USES_GLIBC
select BR2_PACKAGE_TZDATA if BR2_TOOLCHAIN_USES_MUSL
select BR2_PACKAGE_TZ if BR2_TOOLCHAIN_USES_UCLIBC
help
Say 'y' here to install timezone info.
if BR2_TARGET_TZ_INFO
config BR2_TARGET_TZ_ZONELIST
string "timezone list"
default "default"
help
Space-separated list of time zones to compile.
The value "default" includes all commonly used time zones.
Note that this set consumes around 5.5M for glibc and 2.1M for
uClibc.
The full list is the list of files in the time zone database
source, not including the build and .tab files.
config BR2_TARGET_LOCALTIME
string "default local time"
default "Etc/UTC"
help
The time zone to install as the default local time, expressed
as a tzdata location, such as:
Etc/UTC (the default)
GMT
Europe/Paris
America/New_York
Pacific/Wallis
...
Set to empty to not install a default time zone.
endif # BR2_TARGET_TZ_INFO
config BR2_ROOTFS_USERS_TABLES
string "Path to the users tables"
help
Specify a space-separated list of users table locations,
that will be passed to the mkusers utility to create
users on the system, with home directory, password, etc.
See manual for details on the usage and syntax of these files.
config BR2_ROOTFS_OVERLAY
string "Root filesystem overlay directories"
default ""
help
Specify a list of directories that are copied over the target
root filesystem after the build has finished and before it is
packed into the selected filesystem images.
They are copied as-is into the rootfs, excluding files ending
with ~ and .git, .svn and .hg directories.
config BR2_ROOTFS_PRE_BUILD_SCRIPT
string "Custom scripts to run before commencing the build"
default ""
help
Specify a space-separated list of scripts to be run before the
build commences.
This gives users the opportunity to do board-specific
preparations before starting the build.
config BR2_ROOTFS_POST_BUILD_SCRIPT
string "Custom scripts to run before creating filesystem images"
default ""
help
Specify a space-separated list of scripts to be run after the
build has finished and before Buildroot starts packing the
files into selected filesystem images.
This gives users the opportunity to do board-specific
cleanups, add-ons and the like, so the generated files can be
used directly without further processing.
These scripts are called with the target directory name as
first argument. Make sure the exit code of those scripts are
0, otherwise make will stop after calling them.
config BR2_ROOTFS_POST_FAKEROOT_SCRIPT
string "Custom scripts to run inside the fakeroot environment"
default ""
help
Specify a space-separated list of scripts to be run at the end
of the fakeroot script right before the image(s) are actually
generated.
This gives users the opportunity to do customisations of the
content of the rootfs, which would otherwise require root
rights.
These scripts are called with the target directory name as
first argument. The build will fail on the first scripts that
exits with a non-zero exit code.
Note that Buildroot already provides mechanisms to customise
the content of the rootfs:
- BR2_ROOTFS_STATIC_DEVICE_TABLE
to create arbitrary entries statically in /dev
- BR2_ROOTFS_DEVICE_TABLE
to set arbitrary permissions as well as extended
attributes (such as capabilities) on files and
directories,
- BR2_ROOTFS_USERS_TABLES:
to create arbitrary users and their home directories
It is highly recommended to use those mechanisms if possible,
rather than using custom fakeroot scripts.
config BR2_ROOTFS_POST_IMAGE_SCRIPT
string "Custom scripts to run after creating filesystem images"
default ""
help
Specify a space-separated list of scripts to be run after
the build has finished and after Buildroot has packed the
files into selected filesystem images.
This can for example be used to call a tool building a
firmware image from different images generated by Buildroot,
or automatically extract the tarball root filesystem image
into some location exported by NFS, or any other custom
action.
These scripts are called with the images directory name as
first argument. The script is executed from the main Buildroot
source directory as the current directory.
config BR2_ROOTFS_POST_SCRIPT_ARGS
string "Extra arguments passed to custom scripts"
depends on BR2_ROOTFS_POST_BUILD_SCRIPT != "" \
|| BR2_ROOTFS_POST_FAKEROOT_SCRIPT != "" \
|| BR2_ROOTFS_POST_IMAGE_SCRIPT != ""
help
Pass these additional arguments to each post-build or
post-image scripts.
Note that all the post-build and post-image scripts will be
passed the same set of arguments, you can not pass different
arguments to each script.
Note also, as stated in their respective help text, that the
first argument to each post-build or post-image script is the
target directory / images directory. The arguments in this
option will be passed *after* those.
endmenu