http://profusion.mobi/ ProFUSION | Aggregator 2011-12-21T00:00:00Z ProFUSION Embedded Systems http://profusion.mobi tag:profusion.mobi,2011-12-21:/planet/demarchi/ANNOUNCE__kmod_2_2011_12_21_02_40_31__0000.php ANNOUNCE: kmod 2 2011-12-21T00:00:00Z 2011-12-21T00:00:00Z I&#8217;m glad to announce the second version of kmod.  I&#8217;m sorry for not sending the first version to the mailing lists. Now I&#8217;m both writing it here and sending to the mailing list. I thank very much the feedback received for the first version and that now Jon Masters, the maintainer of module-init-tools, is helping us with kmod [...] tag:profusion.mobi,2011-12-21:/planet/barbieri/kmod_announcement__and_how_to_help_testing_it___2011_12_21_18_23_19__0000.php kmod announcement (and how to help testing it!) 2011-12-21T00:00:00Z 2011-12-21T00:00:00Z <h4>introduction and motivation</h4> <p>At <a title="ProFUSION embedded systems" href="http://profusion.mobi/">ProFUSION</a> a common topic is how to optimze the system. Not just the speed, but also what and how it is done. Not just for our embedded systems, but also our desktops and laptops.</p> <p>These discussions led us to be involved in projects that consider this goal, such as <a title="window manager and graphical user interface toolkit" href="http://enlightenment.org/">Enlightenment</a>, <a title="connman - connection manager" href="http://connman.net/">ConnMan</a>, <a title="oFono - open source telephony" href="http://ofono.org/">oFono</a> and <a title="system and service manager for Linux" href="http://www.freedesktop.org/wiki/Software/systemd">systemd</a>. With great projects, come great people and thus enlightening discussions on how to improve things. From these discussions <a title="Lennart Poettering's home page" href="http://0pointer.de/lennart/">Lennart Poettering</a> and <a title="Kay Sievers G+ profile" href="https://plus.google.com/108087225644395745666/posts">Kay Sievers</a> put together a <a title="A Plumber's Wish List for Linux" href="http://0pointer.de/blog/projects/plumbers-wishlist.html">A Plumber&#8217;s Wish List for Linux</a>, with one of the items being of special interest for ProFUSION as it had the potential of also helping embedded systems and speeding up or boots:</p> <pre>* module-init-tools: provide a proper libmodprobe.so from module-init-tools: Early boot tools, installers, driver install disks want to access information about available modules to optimize bootup handling.</pre> <p>One of the reasons for this is that udev will search /sys/devices for all &#8220;modalias&#8221; files and call &#8220;<code>/sbin/modprobe -bv $ALIAS</code>&#8220;, however many of these calls evaluate to an empty list, thus an useless execution of program that will open /lib/modules/`uname -r`/modules.*, load resources, search for something that is not there and return. This could be way cheaper if done inside udev workers. <em>[note: Lucas did measure and noticed 2.5x speedups, stay tuned for benchmarks]</em></p> <h4>kmod</h4> <p>Then our developer <a title="Lucas De Marchi personal blog." href="http://www.politreco.com/">Lucas De Marchi</a> proposed to do the libmodprobe and we funded it. After some discussions with Lennart and Kay, it was decided to rename it to <strong>kmod</strong> for shortness and good namespace. The initial goal was to achive a 1:1 replacement of module-init-tools as a library to be used by udev and systemd-modules-load and we are close to it with our <a title="kmod-v2" href="http://www.politreco.com/2011/12/announce-kmod-2/">second release done today</a>! While we miss depmod tool (planned for v3), our kmod-modprobe should be fully functional and if this proves to be true, the logic will move to libkmod to be used by udev.</p> <h4>we need your testing!</h4> <p>To ensure kmod-modprobe does what it is supposed to do, we need extensive testing, there is where we need you! Try it on as many systems as possibles and let us know. To do this we recommend:</p> <pre>$ git clone git://git.profusion.mobi/kmod.git $ cd kmod $ ./autogen.sh $ ./configure --enable-logging \ --enable-debug --enable-tools \ --enable-zlib # if you have module.ko.gz $ make all $ sudo make install $ sudo mv /sbin/modprobe /sbin/modprobe-bkp $ sudo ln -s /usr/bin/kmod-modprobe /sbin/modprobe $ ls -1 /sys/module/ &gt; ~/original-modules $ reboot $ ls -1 /sys/module/ &gt; ~/kmod-modules $ diff ~/original-modules ~/kmod-modules</pre> <h4>current users and feedback</h4> <p>Being a new project in a critical area of Linux system, we expected lots of criticism and rejection by people, but interestingly enough after <a title="kmod-v1" href="http://www.politreco.com/2011/12/announce-kmod-1/">Lucas&#8217; announcement</a> and <a title="LWN article: First version of kmod released" href="http://lwn.net/Articles/472354/">LWN article</a> the feedback was highly positive! We even had some testers and people to help with ideas and experience.</p> <p>Among the people that joined the project is the current maintainer of module-init-tools package <a title="Jon Masters' home page" href="http://jonmasters.org/">Jon Masters</a>, which announced that <a title="libkmod replaces module-init-tools" href="http://www.jonmasters.org/blog/2011/12/20/libkmod-replaces-module-init-tools/">kmod replaces module-init-tools</a>. He is helping a lot with his knowledge and cases from Red Hat Enterprise Linux, also providing modules from non-trivial platforms such as s390. Last but not least he provided insights to improve module handling on Linux, particularly replacing modules with better alternative as required in enterprise systems.</p> <p>With Jon&#8217;s blessing we&#8217;ll use the same mailing list <a title="linux-modules mailing list" href="http://vger.kernel.org/vger-lists.html#linux-modules">linux-modules@vger.kernel.org</a> and our git will move to kernel.org soon.</p> <p>People from ARCH and Debian were also interested and even created packages for it! These guys were extremely helpful to test cases such as gzip modules, 64bits modules with i386 user space and so on. They are: Tom Gundersen (tomegun), Dave Reisner (falconindy) and Marco d’Itri (Md).</p> <h4>next steps</h4> <p>Based on our TODO, we have the following ideas for next steps:</p> <ul> <li>Finish libkmod-elf.c to provide information required by depmod. I&#8217;m working on this in my depmod branch;</li> <li>tools/kmod-depmod.c: create a 1:1 compatible tool to generate /lib/modules/`uname -r`/modules.*;</li> <li>libkmod should export parsed configuration to be used by kmod-modprobe.c &#8211;dumpconfig;</li> <li>create kmodmock library to be LD_PRELOAD&#8217;ed to redirect some syscalls such as init_module(), delete_module() and open() of /sys and /proc. I&#8217;ve started a branch for this some time ago as &#8220;unittest&#8221; branch but stopped due lack of ELF support at the time;</li> <li>create unittests and measure coverage. Given kernel modules are user-input they may be broken files and libkmod-elf.c needs to be extensively tested to avoid segmentation fault due out-of-boundaries access. This mean not trusting null terminated string in .strtab section and so on.</li> <li>create optimized modules.archive that would contain optimized search index and all modules compressed independently, but in the same file. This would save file access and could provide information we don&#8217;t have today, like the uncompressed size of gzipped modules.</li> </ul> tag:profusion.mobi,2011-12-16:/planet/demarchi/Given_enough_eyeballs__all_bugs_are_shallow_2011_12_16_06_59_36__0000.php Given enough eyeballs, all bugs are shallow 2011-12-16T00:00:00Z 2011-12-16T00:00:00Z So, in last post I said kmod 2 could be released sooner than expected if there were major bugs. Not as much as a surprise, there was 1: depending on the alias passed to the lookup function we were blocked iterating a list. It&#8217;s now fixed in git tree. Thanks to Ulisses Furquim for fixing [...] tag:profusion.mobi,2011-12-15:/planet/demarchi/ANNOUNCE__kmod_1_2011_12_15_02_05_31__0000.php ANNOUNCE: kmod 1 2011-12-15T00:00:00Z 2011-12-15T00:00:00Z For some weeks now I and Gustavo Barbieri at ProFUSION have been working on a new library and a set of tools, libkmod and kmod respectively. This is the announcement of its first public release. Overview The goal of the new library libkmod is to offer to other programs the needed flexibility and fine grained [...] tag:profusion.mobi,2011-12-07:/planet/antognolli/LinuxCon_Brazil_presentation_2011_12_07_02_00_00_UTC.php LinuxCon Brazil presentation 2011-12-07T00:00:00Z 2011-12-07T00:00:00Z <p>Recently I attended at LinuxCon Brazil, did a presentation and still had the chance to attend to some interesting talks.</p> <p>The presentation was given together with <a href="http://brunodilly.org/blog/" title="bdilly's blog">Bruno Dilly</a>, about <a href="http://www.enlightenment.org/" title="Enlightenment Foundation Libraries">EFL</a> focused on embedded devices. Besides some previous similar talks about <a href="http://www.enlightenment.org/" title="Enlightenment Foundation Libraries">EFL</a>, this one was more interesting and quite different, since we didn&rsquo;t talk much about how to write a program using it, but instead focused on its advantages, presented some real use cases and tried to show off where one can take more advantages from these libraries.</p> <p>You can see the presentation slides online on <a href="http://brunodilly.org/blog/?p=32">Bruno Dilly&rsquo;s post</a>, or get the slides <a href="http://antognolli.org/files/LinuxConBrazil-2011.pdf">here</a>.</p> <p>Overall the event was very interesting, with some nice keynotes and presentations. Two of them that draw my attention were Eugeni Dodonov&rsquo;s talk about the Linux Graphical Stack, and Daniel Frye&rsquo;s keynote about the 10+ years of Linux at IBM, which exposed how IBM&rsquo;s LTC (Linux Technology Center) started trying to contribute with Linux, what they did wrong and how they fixed it.</p> <p>In addition to our talk, 2 more guys from <a href="http://profusion.mobi/">ProFUSION</a> were presenting their talks: <a href="http://www.politreco.com/2011/11/linuxcon-brazil/">Lucas DeMarchi did a talk about how to become an open source developer</a> and <a href="http://blog.gustavobarbieri.com.br/">Gustavo Barbieri</a> presented two talks: &ldquo;Tips and Tricks to Develop Software for CE product on Low-End Hardware&rdquo; and &ldquo;Demystifying HTML5&rdquo; with Sulamita Garcia (Intel).</p> <p>That&rsquo;s all for now, and hopefully there will be more presentations coming on next events.</p>