Skip to contentSkip to conversation

Create and mount /dev/shm

PATCH New Maxime Ripard 2 participants 3 messages Jun 29, 2011 – Jul 3, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/6 Create and mount /dev/shm

The /dev/shm directory is neither created nor mounted as tmpfs as boot time. This will cause troubles when using named semaphores on the system.

---
 fs/skeleton/etc/fstab   |    1 +
 fs/skeleton/etc/inittab |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)
fs/skeleton/etc/fstab +1 -0
index 87d9da0..a2f56ff 100644
@@ -4,5 +4,6 @@
 /dev/root       /              ext2	rw,noauto         0      1
 proc		/proc	       proc     defaults	  0	 0
 devpts		/dev/pts       devpts   defaults,gid=5,mode=620	  0	 0
+tmpfs           /dev/shm       tmpfs    mode=0777         0      0
 tmpfs           /tmp           tmpfs    defaults          0      0
 sysfs		/sys	       sysfs    defaults	  0	 0
fs/skeleton/etc/inittab +1 -0
index b1e5c16..0e50467 100644
@@ -17,6 +17,7 @@
 null::sysinit:/bin/mount -t proc proc /proc
 null::sysinit:/bin/mount -o remount,rw /
 null::sysinit:/bin/mkdir -p /dev/pts
+null::sysinit:/bin/mkdir -p /dev/shm
 null::sysinit:/bin/mount -a
 null::sysinit:/bin/hostname -F /etc/hostname
 # now run any rc scripts
Signature · 1 line
1.7.4.1
#1 lore raw

PATCH 1/6 Create and mount /dev/shm

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Maxime" == Maxime Ripard <[email protected]> writes:

Maxime> The /dev/shm directory is neither created nor mounted as tmpfs as boot Maxime> time. This will cause troubles when using named semaphores on the Maxime> system.

Hmm, for everything but BR2_ROOTFS_DEVICE_CREATION_STATIC we already have a perfectly fine tmpfs on /dev, so it would be good to not mount another one.

On the other hand, people can use a custom rootfs skeleton if they want that kind of microoptimizations.

Signature · 1 line
Bye, Peter Korsgaard
#2 lore raw

PATCH 1/6 Create and mount /dev/shm

In reply to Maxime Ripard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Maxime" == Maxime Ripard <[email protected]> writes:

Maxime> The /dev/shm directory is neither created nor mounted as tmpfs as boot Maxime> time. This will cause troubles when using named semaphores on the Maxime> system.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard