View Single Post
Posts: 1,808 | Thanked: 4,272 times | Joined on Feb 2011 @ Germany
#44
@Mentalist Traceur,

/dev is actually not stored in the filesystem, but also a tmpfs.
Going back to /etc/init.d/rcS (I have to someday post details about the whole /etc/init.d in the Maemo5 boot process thread, which only dealt with the upstart part).

it begins by doing start_udev(), which does
Code:
prepare_start_udev
/sbin/udevd --daemon
In prepare_start_udev the magic happens:
Code:
echo -n "Mounting a tmpfs over /dev..."
mount -n -o size=$tmpfs_size,mode=0755,noatime -t tmpfs none /dev
(tmpfs_size = 1MB unless set in /etc/udev/udev.conf, which DOES set it to 10MB)
(note that *my* /dev currently uses up 88.0K, so I'll see if I can modify that back to 1MB (or even less) without breaking anything, and hopefully giving some RAM back to Maemo

IN SHORT:
if you run your program during your early boot console, rcS has not run yet, so udev is not running yet and /dev is merely a directory of your rootfs, where you can store your p0rn if wanted (and your semaphores

Once rcS runs whatever you had under /dev is not visible anymore.

[EDIT] so yes, feel free to mkdir -p /dev/shm before rcS runs, this way nothing should segfault

[EDIT**2] I just modified /etc/udev/udev.conf and changed the size to "512k". Maemo booted fine (this is my "production" N900). Obviously I cannot tell if less actual RAM is being used or not, but I internally feel better knowing that less RAM-management is taking place

Last edited by reinob; 2013-11-06 at 10:22.
 

The Following 4 Users Say Thank You to reinob For This Useful Post: