aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorGravatar Peter Korsgaard <peter@korsgaard.com>2018-05-01 21:41:56 +0200
committerGravatar Peter Korsgaard <peter@korsgaard.com>2018-05-01 21:53:45 +0200
commit2b21ba2fac486cf550399be7e6247de4e269595a (patch)
treef2889215741c3808d1d2b9e8f98e1db6a33a734d /system
parent6919fc55660eafd1a55c2e8535cc9291c251faf5 (diff)
downloadbuildroot-2b21ba2fac486cf550399be7e6247de4e269595a.tar.gz
buildroot-2b21ba2fac486cf550399be7e6247de4e269595a.tar.bz2
skeleton: add /dev/fd, /dev/std{in, out, err} symlinks for static /dev on 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>
Diffstat (limited to 'system')
l---------system/skeleton/dev/fd1
l---------system/skeleton/dev/stderr1
l---------system/skeleton/dev/stdin1
l---------system/skeleton/dev/stdout1
4 files changed, 4 insertions, 0 deletions
diff --git a/system/skeleton/dev/fd b/system/skeleton/dev/fd
new file mode 120000
index 0000000000..10e8ab734e
--- /dev/null
+++ b/system/skeleton/dev/fd
@@ -0,0 +1 @@
+../proc/self/fd \ No newline at end of file
diff --git a/system/skeleton/dev/stderr b/system/skeleton/dev/stderr
new file mode 120000
index 0000000000..c67586eb4a
--- /dev/null
+++ b/system/skeleton/dev/stderr
@@ -0,0 +1 @@
+../proc/self/fd/2 \ No newline at end of file
diff --git a/system/skeleton/dev/stdin b/system/skeleton/dev/stdin
new file mode 120000
index 0000000000..2825dc0f4f
--- /dev/null
+++ b/system/skeleton/dev/stdin
@@ -0,0 +1 @@
+../proc/self/fd/0 \ No newline at end of file
diff --git a/system/skeleton/dev/stdout b/system/skeleton/dev/stdout
new file mode 120000
index 0000000000..35e0f6203f
--- /dev/null
+++ b/system/skeleton/dev/stdout
@@ -0,0 +1 @@
+../proc/self/fd/1 \ No newline at end of file