Go to file
Jan Kundrát 8196b299ba skeleton: fix permissions on /dev/pts/ptmx
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>
2017-03-18 15:24:56 +01:00
arch arch: add support for the csky architecture 2017-03-04 14:35:55 +01:00
board configs/qemu: update xtensa linux to 4.9 2017-03-14 21:55:04 +01:00
boot uboot: improve BR2_TARGET_UBOOT_SPL_NAME help text 2017-03-14 23:38:39 +01:00
configs configs/qemu: update xtensa linux to 4.9 2017-03-14 21:55:04 +01:00
docs docs/manual: document MPL licenses 2017-03-16 16:58:04 +01:00
fs fs/iso9660: doesn't support (grub2) EFI 2017-03-01 21:52:58 +01:00
linux linux: bump default to version 4.10.3 2017-03-15 13:34:24 +01:00
package libkcapi: new package 2017-03-18 15:14:35 +01:00
support support/scripts/test-pkg: extend logfile with olddefconfig output 2017-03-09 21:34:33 +01:00
system skeleton: fix permissions on /dev/pts/ptmx 2017-03-18 15:24:56 +01:00
toolchain toolchain: remove no longer relevant comment 2017-03-09 21:28:52 +01:00
.defconfig arch: remove support for sh64 2016-09-08 22:15:15 +02:00
.gitignore
.gitlab-ci.yml gitlab-ci: add gcc-multilib to the docker image 2017-03-10 14:22:25 +01:00
.gitlab-ci.yml.in gitlab-ci: add gcc-multilib to the docker image 2017-03-10 14:22:25 +01:00
CHANGES Update for 2016.11.3 2017-03-10 12:37:14 +01:00
Config.in package: add generic support for lz archives 2017-02-15 22:11:11 +01:00
Config.in.legacy polarssl: remove unmaintained package 2017-03-18 14:16:49 +01:00
COPYING COPYING: add exception about patch licensing 2016-02-26 19:50:13 +01:00
DEVELOPERS libkcapi: new package 2017-03-18 15:14:35 +01:00
Makefile Add gitlab-CI support 2017-03-05 22:21:50 +01:00
Makefile.legacy Remove BR2_DEPRECATED 2016-10-15 23:14:45 +02:00
README README: add reference to submitting-patches 2016-02-01 19:16:08 +01:00

Buildroot is a simple, efficient and easy-to-use tool to generate embedded
Linux systems through cross-compilation.

The documentation can be found in docs/manual. You can generate a text
document with 'make manual-text' and read output/docs/manual/manual.text.
Online documentation can be found at http://buildroot.org/docs.html

To build and use the buildroot stuff, do the following:

1) run 'make menuconfig'
2) select the target architecture and the packages you wish to compile
3) run 'make'
4) wait while it compiles
5) find the kernel, bootloader, root filesystem, etc. in output/images

You do not need to be root to build or run buildroot.  Have fun!

Buildroot comes with a basic configuration for a number of boards. Run
'make list-defconfigs' to view the list of provided configurations.

Please feed suggestions, bug reports, insults, and bribes back to the
buildroot mailing list: buildroot@buildroot.org
You can also find us on #buildroot on Freenode IRC.

If you would like to contribute patches, please read
https://buildroot.org/manual.html#submitting-patches