path: root/system
Commit message (Collapse)AuthorAgeFilesLines
* system: support br2-external init systemsGravatar Brandon Maier2020-10-141-0/+3
| | | | | | | | | | | | | | | Some externals may wish to provide custom init systems for tightly integrated boot. This has been supported through the BR2_INIT_NONE, however a downside to the BR2_INIT_NONE is it forces the custom init system to use either skeleton-custom and roll a custom skeleton for each target, or skeleton-init-none which isn't a complete skeleton. Allowing br2-external to define custom BR2_INIT_* means they can now safely 'select' the BR2_PACKAGE_SKELETON_INIT_*, and re-use any of the skeletons in Buildroot, or one from a br2-external tree. Signed-off-by: Brandon Maier <brandon.maier@rockwellcollins.com> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
* system: Move skeleton-init-* selection to initGravatar Brandon Maier2020-10-141-10/+13
| | | | | | | | | | | | | In preparation for supporting br2-external inits, move the 'select' for the BR2_PACKAGE_SKELETON_INIT_* to their respective init systems. This will allow a br2-external init to 'select' which skeleton it needs as a default skeleton. Signed-off-by: Brandon Maier <brandon.maier@rockwellcollins.com> [yann.morin.1998@free.fr: - add comment to init choice, to remind why selecting skeletons is OK ] Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
* system: support br2-external skeleton packagesGravatar Brandon Maier2020-10-141-0/+3
| | | | | | | | | | Today, the BR2_ROOTFS_SKELETON_CUSTOM is the only way to build a custom skeleton. But it's limiting as users must provide a pre-built skeleton for each target. Supporting a br2-external package allows users to build up a skeleton and customize it with their own KConfig options. Signed-off-by: Brandon Maier <brandon.maier@rockwellcollins.com> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
* system: set default PATH according to BR2_ROOTFS_MERGED_USRGravatar Paul Cercueil2020-08-171-1/+2
| | | | | | | | Use "/usr/bin:/usr/sbin" as the default path if BR2_ROOTFS_MERGED_USR is enabled, otherwise use "/bin:/sbin:/usr/bin:/usr/sbin". Signed-off-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
* system: replace nogroup with nobodyGravatar Norbert Lange2020-07-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, we define the so-called "overflow group" as 'nogroup'. However, one practical issue is that systemd-sysusers will otherwise create a 'nobody' group with gid 999, because that's is what is usual to define the overflow group: users and groups are defined in LSB (Linux Standard Base): https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/usernames.html Quoting: "If the username exists on a system,then they should be in the suggested corresponding group". Only Debian and derivatives depart from this custom, naming it 'nogroup' (hence the rationale for commit 908198e756b4 (system/skeleton: remove spurious group 'nobody'). See also commit 9c67af2c52 (system/skeleton: use uid/gid 65534 for nobody/nogroup), and a related discussion on LWN.net (key is "overflow UID" which also applies to GID): https://lwn.net/Articles/695478/ Use the recommended groupname 'nobody'. Adapt packages accordingly. Signed-off-by: Norbert Lange <nolange79@gmail.com> [yann.morin.1998@free.fr: - reword commit log - extend commit log with more references (commits and LWN) ] Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
* package/systemd: make sure init choice and package have same dependenciesGravatar Yann E. MORIN2020-04-051-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Currently, the dependencies for the init system choice, and the dependencies for the package, are slightly different, and not in the same order, the latter making it difficult to assess consistency between the two. Fix all that, by cross-duplicating dependencies from the init choice and the package, and order the dependencies according to the manual (arch first, toolchain, then the others). Note that some dependencies are redundant, but kept nonetheless for correctness: - BR2_USE_MMU is implied by BR2_TOOLCHAIN_USES_GLIBC, but systemd does use fork(); - !BR2_STATIC_LIBS is also implied by BR2_TOOLCHAIN_USES_GLIBC, but it is also inherited from kmod which we select; - BR2_TOOLCHAIN_HAS_THREADS is also implied by BR2_TOOLCHAIN_USES_GLIBC, but systemd does use pthread_*() functions. Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
* package/systemd: add gcc >= 5.x dependencyGravatar Romain Naour2020-04-051-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As reported on the mailing list, there is a build issue with systemd 245 when using gcc < 5.0: http://lists.busybox.net/pipermail/buildroot/2020-April/278931.html Build issue: ../src/shared/gpt.c:7:9: error: initializer element is not constant { GPT_ROOT_X86, "root-x86" }, When testing with a toolchain using gcc 5.4.0 and the build is ok. http://toolchains.bootlin.com/downloads/releases/toolchains/armv5-eabi--glibc--stable-2017.05-toolchains-1-1.tar.bz2 While searching for "error: initializer element is not constant" message, we can notice a note about gcc 5 change about "Initializing statics with compound literals": https://gcc.gnu.org/gcc-5/porting_to.html Add a dependency on gcc 5 to avoid using to old compiler. There is the same issue with host-systemd with host gcc 4.9 (tested with Debian Jessie). So, add a dependency on host gcc >= 5.x. Fixes: http://autobuild.buildroot.org/results/520/520dab2253f4cbe408a8177a6587dcb38c6ba215 http://autobuild.buildroot.org/results/e0e/e0e0512de822864d670b5d176798a24ab09eed2d http://autobuild.buildroot.org/results/f56/f5660b2711627fcee4086e096e4ec4d9ba190ab6 Signed-off-by: Romain Naour <romain.naour@gmail.com> Cc: Adam Duskett <aduskett@gmail.com> Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com> Cc: Yann E. MORIN <yann.morin.1998@free.fr> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
* Revert "system: don't attempt swapon/swapoff in inittab if not available"Gravatar Carlos Santos2020-02-081-13/+0
| | | | | | | | This reverts commit c4dce0ae0f5d5d7fecb6f493e974e131a6df43da. A different fix will be provided in a forthcoming patch. Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* system: don't attempt swapon/swapoff in inittab if not availableGravatar Thomas De Schampheleire2020-02-051-0/+13
| | | | | | | | | | | | | | | | | | | | | | The default inittab files added by busybox and sysvinit run 'swapon -a' during init and 'swapoff -a' during shutdown. But, the swapon/swapoff programs are not guaranteed to be available. For the busybox versions, it is steered by CONFIG_SWAPON/CONFIG_SWAPOFF. For the util-linux versions, it is steered by BR2_PACKAGE_UTIL_LINUX_BINARIES. In a case where swapon/swapoff is not available but the inittab tries to execute them, the boot log would be polluted by error messages like: swapon: not found Avoid this by commenting out the swapon/swapoff lines if the swapon/swapoff binaries are not available. Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com> [Peter: test with -x] Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* system: also create a lib64 -> lib symlink on mips64n32Gravatar Thomas De Schampheleire2020-02-041-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In gcc 5.1.0, a change was introduced which causes internal search paths inside the sysroot to be relative to 'lib64' rather than 'lib'. See [1] [2] and [3]. For example for dtc: LD convert-dtsv0 /opt/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/mips64-octeon-linux-gnu/7.3.0/../../../../mips64-octeon-linux-gnu/bin/ld: cannot find crt1.o: No such file or directory /opt/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/mips64-octeon-linux-gnu/7.3.0/../../../../mips64-octeon-linux-gnu/bin/ld: cannot find crti.o: No such file or directory collect2: error: ld returned 1 exit status make[1]: *** [Makefile:236: convert-dtsv0] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: Leaving directory '/opt/buildroot/output/build/dtc-1.4.7' make: *** [package/pkg-generic.mk:241: /opt/buildroot/output/build/dtc-1.4.7/.stamp_built] Error 2 In this case, crt1.o was searched for in following locations: 16073 access("/opt/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/mips64-octeon-linux-gnu/7.3.0/n32/octeon3/crt1.o", R_OK) = -1 ENOENT (No such file or directory) 16073 access("/opt/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/n32/octeon3/crt1.o", R_OK) = -1 ENOENT (No such file or directory) 16073 access("/opt/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/mips64-octeon-linux-gnu/7.3.0/../../../../mips64-octeon-linux-gnu/lib/mips64-octeon-linux-gnu/7.3.0/n32/octeon3/crt1.o", R_OK) = -1 ENOENT (No such file or directory) 16073 access("/opt/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/mips64-octeon-linux-gnu/7.3.0/../../../../mips64-octeon-linux-gnu/lib/../lib32-fp/crt1.o", R_OK) = -1 ENOENT (No such file or directory) 16073 access("/opt/buildroot/output/host/mips64-buildroot-linux-gnu/sysroot/lib64/mips64-octeon-linux-gnu/7.3.0/n32/octeon3/crt1.o", R_OK) = -1 ENOENT (No such file or directory) 16073 access("/opt/buildroot/output/host/mips64-buildroot-linux-gnu/sysroot/lib64/../lib32-fp/crt1.o", R_OK) = -1 ENOENT (No such file or directory) 16073 access("/opt/buildroot/output/host/mips64-buildroot-linux-gnu/sysroot/usr/lib64/mips64-octeon-linux-gnu/7.3.0/n32/octeon3/crt1.o", R_OK) = -1 ENOENT (No such file or directory) 16073 access("/opt/buildroot/output/host/mips64-buildroot-linux-gnu/sysroot/usr/lib64/../lib32-fp/crt1.o", R_OK) = -1 ENOENT (No such file or directory) 16073 access("/opt/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/mips64-octeon-linux-gnu/7.3.0/crt1.o", R_OK) = -1 ENOENT (No such file or directory) 16073 access("/opt/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/crt1.o", R_OK) = -1 ENOENT (No such file or directory) 16073 access("/opt/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/mips64-octeon-linux-gnu/7.3.0/../../../../mips64-octeon-linux-gnu/lib/mips64-octeon-linux-gnu/7.3.0/crt1.o", R_OK) = -1 ENOENT (No such file or directory) 16073 access("/opt/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/mips64-octeon-linux-gnu/7.3.0/../../../../mips64-octeon-linux-gnu/lib/crt1.o", R_OK) = -1 ENOENT (No such file or directory) 16073 access("/opt/buildroot/output/host/mips64-buildroot-linux-gnu/sysroot/lib64/mips64-octeon-linux-gnu/7.3.0/crt1.o", R_OK) = -1 ENOENT (No such file or directory) 16073 access("/opt/buildroot/output/host/mips64-buildroot-linux-gnu/sysroot/lib64/crt1.o", R_OK) = -1 ENOENT (No such file or directory) 16073 access("/opt/buildroot/output/host/mips64-buildroot-linux-gnu/sysroot/usr/lib64/mips64-octeon-linux-gnu/7.3.0/crt1.o", R_OK) = -1 ENOENT (No such file or directory) 16073 access("/opt/buildroot/output/host/mips64-buildroot-linux-gnu/sysroot/usr/lib64/crt1.o", R_OK) = -1 ENOENT (No such file or directory) As can be seen above, all attempted paths contain 'lib64' as base, instead of 'lib' or 'lib32', e.g. .../sysroot/lib64/../lib32-fp/crt1.o .../sysroot/lib64/crt1.o This problem was detected on a gcc 7.x toolchain provided by Marvell as part of their Octeon SDK. For this toolchain, here are the values of the paths as detected by the Buildroot toolchain logic, for two different Octeon processors: - octeon2 (soft-float) (-mabi=n32 -march=octeon2): SYSROOT_DIR=/opt/buildroot/output/host/opt/ext-toolchain/mips64-octeon-linux-gnu/sys-root/; ARCH_SYSROOT_DIR=/opt/buildroot/output/host/opt/ext-toolchain/mips64-octeon-linux-gnu/sys-root/; ARCH_SUBDIR=; ARCH_LIB_DIR=lib32/octeon2; SUPPORT_LIB_DIR=/opt/buildroot/output/host/opt/ext-toolchain/mips64-octeon-linux-gnu/lib32/octeon2/ - octeon3 (hard-float) (-mabi=n32 -march=octeon3): SYSROOT_DIR=/opt/buildroot/output/host/opt/ext-toolchain/mips64-octeon-linux-gnu/sys-root/; ARCH_SYSROOT_DIR=/opt/buildroot/output/host/opt/ext-toolchain/mips64-octeon-linux-gnu/sys-root/; ARCH_SUBDIR=; ARCH_LIB_DIR=lib32-fp; SUPPORT_LIB_DIR=/opt/buildroot/output/host/opt/ext-toolchain/mips64-octeon-linux-gnu/lib32-fp/ For both cases (MIPS64n32) Buildroot created a symlink 'lib32->lib', from SYSTEM_LIB_SYMLINK in system/system.mk. Additionally, the function create_lib_symlinks in toolchain/toolchain-external/pkg-toolchain-external.mk will use ARCH_LIB_DIR and create an additional link $(ARCH_LIB_DIR)->lib. For the Octeon3 case this thus results in the following symlinks (where the 'lib32' one is normally not needed): lib32 -> lib/ lib32-fp -> lib/ Since the toolchain is searching based on a 'lib64' component, it will fail to find its internal paths. To solve the problem, we need to create an additional symlink 'lib64': lib64 -> lib/ [1] https://github.com/gcc-mirror/gcc/commit/257ccd463a4f25495b252a3bdf989d057c54678d [2] https://gcc.gnu.org/ml/gcc-patches/2014-10/msg03377.html [3] https://gcc.gnu.org/ml/gcc-patches/2014-11/msg00539.html Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* system: allow not setting a default, system-wide time zoneGravatar Yann E. MORIN2019-11-271-0/+2
| | | | | | | | | | | | | | It is valid that there is no system-wide default time zone defined, in which case Etc/UTC is assumed. Fixes: #12316 Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> Cc: Martin Bark <martin@barkynet.com> Cc: Alexandre Belloni <alexandre.belloni@bootlin.com> Cc: Richard Braun <rbraun@sceen.net> Cc: Andrew Trapani <andrew.trapani@ontera.bio> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* package/netifrc: add support for BR2_SYSTEM_DHCPGravatar Michał Łyszczek2019-09-231-3/+5
| | | | | | | | | | | | | This patch makes openrc-netifrc package aware of BR2_SYSTEM_DHCP config, and if set, will start dhcp daemon on configured interface. Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl> [yann.morin.1998@free.fr: - simplify condition for BR2_SYSTEM_DHCP - reword commit log ] Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* package/openrc: add support for spawning gettyGravatar Michał Łyszczek2019-09-231-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We install a template getty service, and we 'instantiate' it in the default runlevel, using the configured tty. Ideally, packages that provide a getty program would be responsible for installing the corresponding service file. However, to keep consistency with the existing init systems (busybox, systemd, and sysv), so we do provide it from the openrc package itself. OpenRC only acts on the files in a runlevel sub-directory, but the documentation [0] actually suggests that the instance symlink be done in init.d, and then again symlinked into the actual runlevel sub-directory. So, we abide by the rules. Also, to be noted, the getty service file is installed without ensuring that a getty command is available. This again is not unlike other init systems, sysvinit and busybox, which behave the same. [0] https://wiki.gentoo.org/wiki/OpenRC Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl> [yann.morin.1998@free.fr: - move getty template to openrc package (Thomas) - fix namespace of the vaiables (Thomas) - simplify creation of the defaults file - rewrite commit log ] Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* system/skeleton: drop PAGER from /etc/profileGravatar Lubomir Rintel2019-09-071-1/+0
| | | | | | | | | | | | | | | We couldn't track down the reason why the profile sets $PAGER other than that it has always been there. However, it defeats pager autodetection by various tool (systemctl, nmcli, etc.) that would otherwise prefer less to more, in case both were available. Let's drop it. My desktop Linux distro (Fedora) doesn't seem to set it either and the universe doesn't seem to have collapsed yet. Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* system/Config.in: add new init - openrcGravatar Michał Łyszczek2019-05-181-0/+11
| | | | | | | | | | | | | | | | | This is very basic settings for openrc init. * system/Config.in Allows to select openrc as init system (which auto selects openrc-skeleton and openrc package). * package/ifupdown-scripts/Config.in openrc has its own service to bring up/down interfaces, so ifupdown-scripts should not be enabled when openrc is enabled to prevent service clash. Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl> [Thomas: take into account the !BR2_STATIC_LIBS dependency] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* system/skeleton: remove password expiration from shadowGravatar Arnout Vandecappelle (Essensium/Mind)2019-03-201-9/+9
| | | | | | | | | | | | | | | | | | The fields in /etc/shadow were set as follows: root::10933:0:99999:7::: This sets the date of last password change to Jan 1, 2000, the minimum password age to 0 days, the maximum password age to near-infinity, and a warning period of 7 days. In practice, this means the password never expires. So all of this is quite useless. On the other hand, mkusers creates lines without all of these options. It just sets ::::: which disables password expiration completely. To make things consistent, do the same for the skeleton entries. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
* system: allow selecting merged /usr along with custom rootfs skeletonGravatar Carlos Santos2019-02-061-6/+2
| | | | | | | | | If the user is brave enough to use a custom rootfs skeleton then we must not prevent using merged /usr too. Actually it is already possible to do this, although indirectly, by selecting BR2_INIT_SYSTEMD. Signed-off-by: Carlos Santos <casantos@datacom.ind.br> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
* skeleton: use BR2_SYSTEM_DEFAULT_PATH as default PATHGravatar Markus Mayer2018-12-311-1/+1
| | | | | | | | | | | | | | | We substitute the path specified in system/skeleton/etc/profile with the path specified in the configuration variable $(BR2_SYSTEM_DEFAULT_PATH). $(BR2_SYSTEM_DEFAULT_PATH) is a Kconfig string, so it is already double quoted. This means that export PATH=value will now be export PATH="value" in /etc/profile, which is perfectly fine. Signed-off-by: Markus Mayer <mmayer@broadcom.com> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> [Thomas: rework commit log about the double quoting] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* system: introduce BR2_SYSTEM_DEFAULT_PATH optionGravatar Markus Mayer2018-12-312-0/+14
| | | | | | | | | | | | | The configuration option BR2_SYSTEM_DEFAULT_PATH allows the user to override the default path, which can be used by /etc/profile and some system daemons. It defaults to the value previously hard-coded in /etc/profile. This default should be suitable for most users. Signed-off-by: Markus Mayer <mmayer@broadcom.com> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* system cfg: remove mkpasswd MD5 format optionGravatar Matt Weber2018-12-151-10/+0
| | | | | | | | | | | | | | | | | | | | As SHA256 is now default, removing weak MD5 option. C libraries now all support the SHA methods. glibc 2.7+ uclibc (bdd8362a88 package/uclibc: defconfig: enable sha-256...) musl 1.1.14+ One issue this would prevent, is a host tool issue with a FIPS enabled system where weak ciphers/methods are disabled. It seems the crypt(3) call is impacted by /proc/sys/crypto/fips_enabled (per crypt(3) man page). It results in mkpasswd returning "(EPERM) crypt failed." Rather then create a Buildroot host dependency check, this patch removes the potential corner case from being selected. Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* system cfg: set mkpasswd default to SHA256Gravatar Matt Weber2018-12-151-1/+1
| | | | | | | | | | This patch changes the default mkpasswd method to SHA256 from MD5. The change both improves the quality of the hash used and prepares for eventually removing MD5 as a option. Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* system cfg: update mkpasswd SHA option txtGravatar Matt Weber2018-12-151-10/+2
| | | | | | | | | | | | | This patch drops the comment about checking the C libraries version as they now all support it by default glibc 2.7+ uclibc (bdd8362a88 package/uclibc: defconfig: enable sha-256...) musl 1.1.14+ Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* package/systemd: needs glibcGravatar Yann E. MORIN2018-11-221-8/+3
| | | | | | | | | | | | | | | | | | | | Since version v239, systemd-nspawn unconditioanlly uses prlimit(2), which is not implemented in uClibc-ng. systemd-nspawn can not be disabled. This makes systemd glibc-only again. After a bit of discussion with upstream (om IRC), it looks very improbable that they accept a patch making systemd-nspawn optional. They would probably consider a patch that provides that syscall wrapper if it is missing, though, but that's less trivial... Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Waldemar Brodkorb <wbx@openadk.org> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Cc: Peter Korsgaard <peter@korsgaard.com> Reviewed-by: Matt Weber <matthew.weber@rockwellcollins.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* system: update Config.in comment about systemd dependenciesGravatar Thomas Petazzoni2018-09-151-3/+9
| | | | | | | | | | | | | | | | | | | In commit 879fa7f82a86ffdc6d1cf7c9bfbb5cf830583d69, the BR2_INIT_SYSTEMD option was changed to allow selecting with a uClibc toolchain. Unfortunately, the corresponding Config.in comment, which was already bogus, was not updated to take into account the numerous dependencies of BR2_INIT_SYSTEMD. Due to this, even if you have uClibc enabled, the BR2_INIT_SYSTEMD option may not be visible, and the Config.in comment may also not be visible, leaving the user in the dark. This commit fixes the dependencies of the Config.in comment so that they match the one of the BR2_INIT_SYSTEMD option. Reported-by: Raphael Jacob <r.jacob2002@gmail.com> Cc: Raphael Jacob <r.jacob2002@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* skeleton: PAGER without blank and unset at end of for loopGravatar Florian La Roche2018-06-051-2/+2
| | | | | | | | | | The PAGER environment variable is including a blank character at the end. Remove this. A for loop has been unsetting the variable inside the loop, this is only needed once at the end of the loop. Signed-off-by: Florian La Roche <F.LaRoche@pilz.de> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* skeleton: add /dev/fd, /dev/std{in, out, err} symlinks for static /dev on ↵Gravatar Peter Korsgaard2018-05-014-0/+4
| | | | | | | | | | | | | | | | | | readonly rootfs Some applications, e.g. bashs process subsitution feature, rely on the convention of `/dev/fd` being a symbolic link to `/proc/self/fd`. When a static /dev is used on a readonly rootfs then the runtime ln invocations in the inittab will fail, so we need to add the symlinks at build time. Makedevs doesn't support creating symlinks, so instead add the symlinks to the default skeleton. For non-static /dev setups, the kernel will mount devtmpfs which shadows the /dev of the rootfs, but then the runtime ln invocations in inittab will create the symlinks. Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* system/Config.in: re-wrap help textGravatar Ricardo Martincoski2018-04-011-58/+64
| | | | | | | ... to follow the convention <tab><2 spaces><62 chars>. Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* systemd: allow to build with uClibc toolchainsGravatar Waldemar Brodkorb2018-02-141-3/+3
| | | | | | | | | | | We need to disable any systemd parts using either IDN, NSS or gshadow. IDN is only disabled in C library function call to getnameinfo(), it does not effect libidn/libidn2 usage in systemd. Tested with qemu-system-arm. Signed-off-by: Waldemar Brodkorb <wbx@openadk.org> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* system: only expose getty options for busybox and sysvinitGravatar Thomas Petazzoni2018-01-121-0/+4
| | | | | | | | | | | | | | | | Only busybox and sysvinit handle the BR2_TARGET_GENERIC_GETTY_TERM and BR2_TARGET_GENERIC_GETTY_OPTIONS options; the other init systems do not. So, protect those options behind appropriate dependencies on busybox or sysvinit. Fixes #10301. Reported-by: Michael Heinemann <posted@heine.so> Suggested-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* skeleton: Rename skeleton-sysv to skeleton-init-sysvGravatar Cam Hutchison2017-08-141-2/+2
| | | | | | | | | | | | The skeletons are based on the selection of BR2_INIT_*, so add init- to the package name to make this clearer. While skeleton-sysv is relatively clear, skeleton-common and skeleton-none are less clear on their relationship to BR2_INIT_*. So rename skeleton-sysv to conform to a clearer pattern. Signed-off-by: Cam Hutchison <camh@xdna.net> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* skeleton: Rename skeleton-systemd to skeleton-init-systemdGravatar Cam Hutchison2017-08-141-1/+1
| | | | | | | | | | | | The skeletons are based on the selection of BR2_INIT_*, so add init- to the package name to make this clearer. While skeleton-systemd is relatively clear, skeleton-common and skeleton-none are less clear on their relationship to BR2_INIT_*. So rename skeleton-systemd to conform to clearer pattern. Signed-off-by: Cam Hutchison <camh@xdna.net> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* skeleton: Rename skeleton-none to skeleton-init-noneGravatar Cam Hutchison2017-08-141-1/+1
| | | | | | | | | | The skeletons are based on the selection of BR2_INIT_*, so add init- to the package name to make this clearer. The name skeleton-none implies no skeleton at all, not a base skeleton with no init-specific files. Signed-off-by: Cam Hutchison <camh@xdna.net> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* system: make systemd work on a read-only rootfsGravatar Yann E. MORIN2017-08-021-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the rootfs is readonly, systemd will expect /var to be writable. Because we do not really have a R/W filesystem to mount on /var, we make it a tmpfs [*], and use the systemd-tmpfiles feature to populate it with "factory" defaults. We obtain those factory defaults by redirecting /var to that location at build time, using a symlink /var -> /usr/share/factory which is the location in which systemd-tmpfiles will look for when instructed to "recursively copy" a directory. With a line like: C /var/something - - - - it will look for /usr/share/factory/something and copy it (recursively if it is a directory) to /var/something, but only if it does not already exist there. We also mark this copy with the exclamation mark, as it is only safe to copy on boot, not when changing targets. To be noted: the real format for such lines are: C /var/something - - - - /from/where/to/copy/something But if the source is not given, then it is implicitly taken from /usr/share/factory (which in our case is as-good a location as whatever else, so we use it, and thus we need not specify the source of the copy). Note that we treat symlinks a little bit specially, by creating symlinks to the factory defaults rather than copying them. Finally, /var at build time is a symlink, but at runtime, it must be a directory (so we can mount the tmpfs over there). We can't change that as a target-finalize hook, because: - some packages may want to set ownership and/or access rights on files or directories in /var, and that only happens while assembling the filesystem images; changing /var from a symlink to a (then empty) directory would break this; - /var would be a directory on sub-sequent builds (until the next "make clean"). Instead, we use the newly-introduce pre- and post-rootfs command hooks, to turn /var into a directory before assembling the image, and back to a symlink after assembling the image. [*] People who want the factory-defaults only on first boot will have to tweak the fstab to mount something else than a tmpfs on /var. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by: Romain Naour <romain.naour@gmail.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* system: separate sysv and systemd parts of the skeletonGravatar Yann E. MORIN2017-08-0211-16/+0
| | | | | | | | | | | | | | | | | | | | | | | | For systemd, we create a simple /etc/fstab with only an entry for /, as systemd otherwise automatically mounts what it needs where it needs it. systemd does not like that the content of /var be symlinks to /tmp, especially journald that starts before /tmp is mounted, and thus the journal files are hidden from view, which causes quite a bit of fuss... Instead, move the current /var to a sysv-only skeleton. systemd at install time will create the /var content it needs, so we just create an empty /var for systemd. systemd would create /home and /srv at runtime if they are missing, but it is better to create them right now, to simplify supporting systemd on a RO filesystem in the (near) future. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* package/skeleton: introduce sysv, systemd and none specific skeletonsGravatar Yann E. MORIN2017-08-021-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, we use the same skeleton for sysv-like init systems and systemd, even though systemd has some peculiarities that makes our default skeleton unfit. So, we'll need to provide different skeletons (really, only part of it) for sysv-like and systemd. In addition, in order to support the "no init system" (BR2_INIT_NONE) use case, we introduce a "none" skeleton. Introduce three new skeleton packages, aptly named skeleton-sysv, skeleton-systemd and skeleton-none. All three are providers of the skeleton virtual package, in lieu of the skeleton-common package, which is now a simple dependency of all three new skeletons. Those packages are empty for now. In followup changes: - sysv-specific stuff will be moved out of skeleton-common and into skeleton-sysv; - systemd-specific stuff will be added to skeleton-systemd. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> [Arnout: - merge with the patch that enables the BR2_INIT_NONE case - simplify the BR2_PACKAGE_SKELETON_COMMON_ONLY select logic] Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> [Thomas: - remove the BR2_PACKAGE_SKELETON_COMMON_ONLY logic, and instead introduce a separate skeleton-none package for the BR2_INIT_NONE] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* package/skeleton: make it a virtual packageGravatar Yann E. MORIN2017-08-021-0/+4
| | | | | | | | | | | | We now have two packages that can act as a skeleton, skeleton-common, also known as our default skeleton, and skeleton-custom. This means that the skeleton package can be a standard virtual package now. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* package/skeleton: split out into skeleton-commonGravatar Yann E. MORIN2017-08-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Move all the handling of the default skeleton into a new package, skeleton-common. We don't name it skeleton-default, because it will be further split later, into a skeleton for sysv and another for systemd, with some parts still common between the two. So just name it skeleton-common right now; this will save us a rename later. While we're at it, also assign to SKELETON_COMMON_TARGET_FINALIZE_HOOKS instead of directly to the global FINALIZE_HOOKS. Therefore, we don't need to do all of that in a condition BR2_PACKAGE_SKELETON_COMMON==y. Note: it would be technically sound to move the skeleton files together within a sub-directory of the skeleton-common package. However, we refer the user to those files, from various locations (manual, packages). It will indeed be easier for the user to find those files in system/skeleton/ rather than in package/skeleton-common/skeleton/ Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> [Arnout: remove the mkdir $(STAGING_DIR)/usr/include which was removed in skeleton.mk in master.] Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* package/skeleton: split out into skeleton-customGravatar Yann E. MORIN2017-08-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | For the custom skeleton, we practicaly do nothing, except ensure it contains the basic, required directories, and that those are properly setup wrt. merged /usr. Furthermore, our current skeleton is not fit for systemd, and we'll have to split things out into various skeletons. So, off-load the custom skeleton into its own package. Thus, the existing skeleton package is now limited to: - when using our default skeleton, install and tweak it properly; - when using a custom skeleton, do nothing except for depending on the skeleton-custom package. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> [Arnout: split off in a separate patch doing only this] Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* package/skeleton: select it rather than default to yGravatar Yann E. MORIN2017-07-311-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Our current skeleton is tailored to sysv-like init systems; it is not fit for systemd-based systems. So, in upcoming changes, we'll add another skeleton for systemd. This means we can no longer have the current skeleton default to 'y', or it would be enabled also for systemd, which would be incorrect. So, we remove the default to 'y' but have it selected by the default skeleton choice. However, we do not yet have a way to directly build (really, install) the custom skeleton, it is built (really, installed) as a dependency of the default skeleton. So we must also forcibly select the default skeleton when using a custom one. Until we have the means to do only one or the other; i.e. when we have a virtual skeleton. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* package/skeleton: drop dependency on host-mkpasswdGravatar Yann E. MORIN2017-07-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setting the root pasword is done in a target-finalize hook, so we do not need to enforce a dependency from the skeleton onto host-mkpasswd. Dropping that dependency will simplify making skeleton a virtual package (in up-coming changes). Instead, it is now selected as any other package. As such, it is guaranteed to be built before target-finalize. This however introduces a slight change in behaviour: previously, host-mkpasswd would only be built if we needed to hash the root password from its plain-text value. Now, host-mkpasswd is always built as soon as the root password is non-empty, even if already pre-hashed. Since host-mkpasswd is a really tiny weeny package bundled in Buildroot, with only two C files, built as a single unit with a single gcc call, the overhead is really minimal. Compared to the simplifications this will allow in the skeleton packages (plural: common, sysv, systemd, custom) to come, this overhead is acceptable. Yet another simplification, even if small, to ease providing multiple skeletons. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* system: move remounting / to the corresponding init systemsGravatar Yann E. MORIN2017-07-221-0/+15
| | | | | | | | | | | | | | | | | | Currently, remounting / read-write (or not) is done by the skeleton package when the init system is either busybox or sysvinit, by registering a target-finalize hook; it is not done at all for systemd. Move registering this target-finalize hook to both of busybox and sysvinit. Leave systemd alone, we'll take care of it later. Rename the macro to a more meaningful name, and move it to system.mk with the other such macros. Yet a little bit less init-system knowledge in the skeleton. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> [Thomas: remove not-so-useful comments, as pointed by Arnout.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* system: move setting getty to the corresponding init systemsGravatar Yann E. MORIN2017-07-221-0/+11
| | | | | | | | | | | | | | | | | | | | | Currently, setting the getty is done: - by the skeleton package when the init system is either busybox or sysvinit; - by the systemd package when the init system is systemd; both by registering a target-finalize hook. This is not very consistent. Move setting the getty out of the skeleton and into the package that provides the init system, by registering a per-package target-fialize hook. This offloads yet a bit more out of the skeleton, so that it is easier to properly separate the skeletons for the various init systems. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* system: provide package-wide system variables and macrosGravatar Yann E. MORIN2017-07-221-0/+62
| | | | | | | | | | | | | | | | | | | | | Some macros, soon some variables, currently defined in the skeleton are going to be used by other packages. Some of those variables will be used as Makefile conditions (e.g. in ifeq() conditions), so they *must* be defined before being used. Since the skeleton package, starting with an 's', is included quite late, those variables would not be available to most packages. Offload the existing macros into the new system/system.mk file, that is included early, before any package is. Rename the macros to appropriate names. Future commits will add new macros and variables in that file. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* package/ifupdown-scripts: new packageGravatar Yann E. MORIN2017-07-044-21/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | The ifupdown scripts can be used independently of the init system, be it sysv, busybox or systemd; they could even be used when there is no init system (i.e. the user is providing his own). Currently, those ifupdown scripts are bundled in the skeleton. But we soon will have a skeleton specific to systemd, so we would be missing those scripts (when systemd-networkd is not enabled). So, move those scripts to their own package. To keep the current behaviour (before it is changed in future commits), we make that package default to y, but depend on the default skeleton. Instead of being a target-finalize hook, the scripts are installed as any other package are, with a package install-target command. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Arnout Vandecappelle <arnout@mind.be> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> [Thomas: drop empty IFUPDOWN_SCRIPTS_SOURCE] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* system: introduce BR2_SYSTEM_ENABLE_NLSGravatar Thomas Petazzoni2017-07-041-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until now, the option BR2_ENABLE_LOCALE was more-or-less controlling whether NLS support was enabled in packages. More precisely, if BR2_ENABLE_LOCALE=y, we were not doing anything (so some packages could have NLS support enabled, some not). And only when BR2_ENABLE_LOCALE was disabled we were explicitly passing --disable-nls to packages. This doesn't make much sense, and there is no reason to tie NLS support to locale support. You may want locale support, but not necessarily NLS support. Therefore, this commit introduces BR2_SYSTEM_ENABLE_NLS, which allows to enable/disable NLS support globally. When this option is enabled, we pass --enable-nls to packages, otherwise we pass --disable-nls. In addition, when this option is enabled and the C library doesn't provide a full-blown implementation of gettext, we select the gettext package, which will provide the full blown implementation. It is worth mentioning that this commit has a visible impact for users: - Prior to this commit, as soon as BR2_ENABLE_LOCALE=y, packages *could* provide NLS support. It was up to each package to decide whether they wanted to provide NLS support or not (we were not passing --enable-nls nor --disable-nls). - After this commit, it's BR2_SYSTEM_ENABLE_NLS that controls whether NLS is enabled or disabled, and this option is disabled by default. Bottom line: with the default of BR2_SYSTEM_ENABLE_NLS disabled, some packages may lose NLS support that they used to provide. But we believe it's a reasonable default behavior for Buildroot, where generally NLS support is not necessary. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* system: require a timezone to be setGravatar Yann E. MORIN2017-07-041-3/+1
| | | | | | | | | | | | | | | | | | | | | | | Even though no timezone implicitly means UTC, systemd is not all that happy when it does not have a timezone set. This is all fine on a RW filesystem because systemd will create a symlink on its own (to Etc/UTC), but not so much on a RO filesystem, causing all kind of issues at boot time (up to the point that the system is unusable). We fix that by requiring that the timezone is actually set. The check is done by verifying that the timezone file is an actual file; if not set, the test would find a directory and would thus fail. Update the help entry accordingly. Also fix indentation in tzdata. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Richard Braun <rbraun@sceen.net> Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com> Cc: Martin Bark <martin@barkynet.com> Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* system: do not overwrite /bin/sh Busybox symlinkGravatar Thomas Petazzoni2017-03-291-1/+0
| | | | | | | | | | | | | | | | | | | | | | The BR2_SYSTEM_BIN_SH hidden option defines to what binary the /bin/sh symlinks should point to. If busybox is chosen, then /bin/sh is created to point to /bin/busybox. This works fine with the default installation mode of Busybox, but it fails with the upcoming "individual binaries" mode, in which each applet is installed as its own binary, and /bin/busybox doesn't exist: we get /bin/sh as a broken symlink to /bin/busybox. Since Busybox already installs its own /bin/sh symlink, properly pointing to /bin/ash or /bin/hush depending on the selected shell, it doesn't make sense for the BR2_SYSTEM_BIN_SH logic to override this. Just let Busybox install its own /bin/sh by making BR2_SYSTEM_BIN_SH empty when Busybox shell is selected as /bin/sh. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: Matthew Weber <matthew.weber@rockwellcollins.com> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* skeleton: fix permissions on /dev/pts/ptmxGravatar Jan Kundrát2017-03-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without this patch, it is not possible to allocate PTYs when a generated rootfs image with a recent glibc and systemd is launched as a container on an RHEL7 system via machinectl/systemd-nspawn. The container boots, but `machinectl login mycontainer` fails. The culprit is /dev/pts/ptmx with 0000 perms. On a typical system, there are two `ptmx` devices. One is provided by the devpts at /dev/pts/ptmx and it is typically not directly accessed from userspace. The other one which actually *is* opened by processes is /dev/ptmx. Kernel's documentation says these days that /dev/ptmx should be either a symlink, or a bind mount of the /dev/pts/ptmx from devpts. When a container is launched via machinectl/machined/systemd-nspawn, the container manager prepares a root filesystem so that the container can live in an appropriate namespace (this is similar to what initramfs is doing on x86 desktops). During these preparations, systemd-nspawn mounts a devpts instance using a correct ptmxmode=0666 within the container-to-be's /dev/pts, and it adds a compatibility symlink at /dev/ptmx. However, once systemd takes over as an init in the container, /lib/systemd/systemd-remount-fs applies mount options from /etc/fstab to all fileystems. Because the buildroot's template used to not include the ptmxmode=... option, a default value of 0000 was taking an effect which in turn led to not being able to allocate any pseudo-terminals. The relevant kernel option was introduced upstream in commit 1f8f1e29 back in 2009. The oldest linux-headers referenced from buildroot's config is 3.0, and that version definitely has that commit. Mount options that are not understood by the system are anyway ignored, so backward compatibility is preserved. Signed-off-by: Jan Kundrát <jan.kundrat@cesnet.cz> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> [Thomas: fix commit title, adjust commit log.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* system(d): allow auto net configuration with networkdGravatar Eric Le Bihan2017-02-061-6/+3
| | | | | | | | | | | | | | | Allow automatic network configuration via systemd-networkd if selected. If systemd-networkd is enabled and $BR2_SYSTEM_DHCP is set, then create a .network file to configure the selected network interface via DHCP. Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr> [Thomas: - merge the two patches from Eric into just one - instead of generating the dhcp.network file completely from the .mk file, use a template file, and "sed" it with the right network interface] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* package: update comments for reverse dependencies of util-linuxGravatar Rahul Bedarkar2017-01-281-1/+1
| | | | | | | | | | | | | | | | | | Commit 006a328ad6be ("util-linux: fix build with ncurses") removed dependency on BR2_USE_WCHAR, but failed to update the reverse dependencies of util-linux. This commit updates comments in Config.in for BR2_USE_WCHAR for reverse dependencies of util-linux which directly uses wchar now or when it is pulled from other dependencies. eudev doesn't use wchar directly, but needs C99 compiler. Autotools generate code with wchar_t for checking C99 compiler. Signed-off-by: Rahul Bedarkar <rahul.bedarkar@imgtec.com> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>