Editing Devuan on N900

Warning: You are not logged in. Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 170: Line 170:
-
The second problem of our system is SELinux. It is probably not needed (and if I am not wrong it is disabled in the kernel); in any case, at boot the <code> /sys/fs/selinux </code> node is not mounted, and the init process, calling a function from libselinux to check whether SELinux is enabled, tries anyway to mount the <code> selinux </code> filesystem: being unable to do that, it complains “loudly.” I found two solutions to this “issue:” an easy workaround, and a modification of the init code.
+
The second problem of our system is SELinux. It is probably not needed (and if I am not wrong it is disabled in the kernel); in any case, at boot the /sys/fs/selinux node is not mounted, and the init process, calling a function from libselinux to check whether selinux is enabled, tries anyway to mount the selinux filesystem: being unable to do that, it complains “loudly.” I found two solutions to this “issue:” an easy workaround, and a modification of the init code.
-
The workaround consists in simply creating a <code> /selinux </code> (empty) folder. In this way, the functions from libselinux, when they don’t find <code> /sys/fs/selinux </code>, mount the <code> selinux </code> fs at <code> /selinux </code> (and don’t complain anymore). Besides this, I disabled SELinux in <code> /etc/selinux/config </code> by changing the declaration of the <code> SELINUX </code> variable to:
+
The workaround consists in simply creating a /selinux (empty) folder. In this way, the functions from libselinux, when they don’t find /sys/fs/selinux, mount the selinux fs at /selinux (and don’t complain anymore). Besides this, I disabled selinux in /etc/selinux/config by changing the declaration of the SELINUX variable to:
-
SELINUX=disabled
+
SELINUX=disabled
-
If one does not like the <code> /selinux </code> workaround, it is possible to modify the init code (and disable SELinux in its config file as above). I think there is a bug here, since the code should not try to mount selinux in any case; however, the simplest thing to do is to get the source code for sysvinit and re-build it without declaring the <code> WITH_SELINUX </code> variable: this cancels out the pieces of code which take care of SELinux. Here however we need the arm-linux-gnueabihf toolchain, due to a missing crypt library in the arm-none-eabi one.
+
If one does not like the /selinux workaround, it is possible to modify the init code (and disable selinux in its config file as above). I think there is a bug here, since the code should not try to mount selinux in any case; however, the simplest thing to do is to get the source code for sysvinit and re-build it without declaring the WITH_SELINUX variable: this cancels out the pieces of code which take care of selinux. Here however we need the arm-linux-gnueabihf toolchain, due to a missing crypt library in the arm-none-eabi one.
-
So let’s exit the chroot jail and the <code> n900 </code> directory, and do:
+
So let’s exit the chroot jail and the n900 directory, and do:
-
apt-get source sysvinit
+
apt-get source sysvinit
-
cd sysvinit* (the actual name of the directory has the version appended)
+
cd sysvinit* (the actual name of the directory has the version appended)
-
export CC=arm-linux-gnueabihf-gcc
+
export CC=arm-linux-gnueabihf-gcc
-
make
+
make
-
This should build the init code; I got a few warnings, but no errors. The new init binary is at <code> src/init </code>, and should replace the <code> sbin/init </code> in the <code> n900 </code> directory.
+
This should build the init code; I got a few warnings, but no errors. The new init binary is at src/init, and should replace the sbin/init in the n900 directory.

Learn more about Contributing to the wiki.


Please note that all contributions to maemo.org wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see maemo.org wiki:Copyrights for details). Do not submit copyrighted work without permission!


Cancel | Editing help (opens in new window)