tag:blogger.com,1999:blog-10100029924564626992024-03-14T00:30:02.023+01:00Yarda's devel blogAnnouncements about news from projects I am working on. The blog is targeted to HW/SW development, ham radio and others.Yardahttp://www.blogger.com/profile/02853164994296727284noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-1010002992456462699.post-23694452290873972512017-10-22T14:12:00.000+02:002017-10-23T20:15:26.850+02:00How to recompile Fedora kernel with the custom patch<p>I has been asked how to recompile Fedora kernel with the custom patch, so here is the tutorial:</p>
<p>At first install the needed packages:</p>
<pre>
# dnf install fedpkg dnf-plugins-core
</pre>
<p>Install build requirements for the kernel package:</p>
<pre>
# dnf builddep kernel
</pre>
<p>Clone the kernel dist-git module for the desired Fedora version, i.e. if you want to recompile the kernel for the Fedora 26, add the '-b f26' or respective version (--anonymous is used for the anonymous checkout, i.e. read only checkout):</p>
<pre>
$ fedpkg co --anonymous -b f26 kernel
</pre>
<p>Change the working directory to the cloned dist-git module:</p>
<pre>
$ cd kernel
</pre>
<p>Copy the desired patch (e.g. my.patch) to the working directory:</p>
<pre>
$ cp DIR/my.patch .
</pre>
<p>Make sure your my.patch has been generated by the 'git format-patch' if not, you need to manually add the header containing lines From:, Subject:, so proceed the following step just only if such header is not presented in your patch (of course edit the strings as needed):</p>
<pre>
$ echo "From: Joe Hacker <joe.hacker@hacker.org>" > header
$ echo "Subject: My patch" >> header
$ echo >> header
$ cat header my.patch > patch
$ mv patch my.patch
</pre>
<p>Edit the kernel.spec, locate the string '# END OF PATCH DEFINITIONS', and add the following string just before it:</p>
<pre>
Patch9999: my.patch
</pre>
<p>where make sure that the number 9999 is not used by any previous Patch keyword. If it's already used, keep increasing the number until you will find the highest unused number and use it with your patch. Save the spec file.</p>
<p>Recompile the kernel:</p>
<pre>
$ fedpkg local
</pre>
<p>Install/re-install the newly builds kernel RPMs from the ARCH directory, i.e. if you compiled the kernel for the x86_64, the ARCH directory is x86_64.</p>
<h2>Reverted patch</h2>
<p>In case you have upstream kernel patch you need to revert (let's say upstream.patch, do the previous steps up-to the installation of the my.patch, then unpack the kernel sources:</p>
<pre>
$ fedpkg prep
</pre>
<p>Make the reverted patch of the upstream.patch (replace the DIR in commands below by directory where you store your patches):</p>
<pre>
$ pushd kernel-*/linux-*
$ git commit -am Flush
$ cp DIR/upstream.patch .
$ patch -p1 -R < upstream.patch
$ git commit -am "Upstream reverted patch"
$ git format-patch --stdout HEAD~1 > DIR/upstream-reverted.patch
$ popd
</pre>
<p>Then install the upstream-reverted.patch instead of the my.patch and proceed with the compilation as described above.</p>
Yardahttp://www.blogger.com/profile/02853164994296727284noreply@blogger.com23tag:blogger.com,1999:blog-1010002992456462699.post-13512436681511044072016-03-09T15:13:00.000+01:002016-03-09T15:13:51.615+01:00Remote web monitoring of 3D printers through Pronterface<p>I have recently dug into Pronterface code and realized that there is simple RPC server built-in. It listens on localhost and it's really cool feature for remote monitoring, so I hacked KISS (Keep It Simple and Stupid) PHP code that allows querying the RPC server through the web. The code can query multiple running Pronterfaces and it's no problem to monitor multiple 3D printers which are connected to the same host. Running instances of Pronterface are automatically detected. It also queries all connected V4L compatible webcameras, which means that you can check progress of printers visually. With the current code you can check temperatures (bed, extruder), Z position, status of the current print task including task/file name, ETA, finished percentage.</p>
<p>The code with instructions is available from github: <a href="https://github.com/yarda/printrun-webmon/">https://github.com/yarda/printrun-webmon/</a>. Feel free to pull request patches.</p>
Yardahttp://www.blogger.com/profile/02853164994296727284noreply@blogger.com0tag:blogger.com,1999:blog-1010002992456462699.post-63166474329618122082014-08-29T14:11:00.000+02:002014-08-29T14:12:01.842+02:00Firefox: Re-enable prompt asking you whether you want to save your tabs on exit<p>Firefox usually asks whether you want to save your tabs on exit if you have <code>browser.showQuitWarning = true</code> in your <code>about:config</code>. If you check "Do not ask next time" it will not ask you again. The question is how to re-enable this prompt. You already set the following:</p>
<pre>
browser.showQuitWarning = true
browser.tabs.warnOnClose = true
browser.tabs.warnOnCloseOtherTabs = true
browser.warnOnQuit = true
</pre>
<p>But it still doesn't show the prompt. The corresponding setting is hidden behind <code>browser.startup.page</code>. Just locate it in <code>about:config</code>, right click on it and select "Reset". Restart Firefox and viola, the prompt is back. You can also re-enable this through the UI, go to "Edit -> Preferences -> General -> When Firefox starts" and change "Show my windows and tabs from last time" to "Show my home page" or "Show a blank page". A bit illogical on the first sight, but it works. This was tested on Firefox 31.0.<p>
Yardahttp://www.blogger.com/profile/02853164994296727284noreply@blogger.com0tag:blogger.com,1999:blog-1010002992456462699.post-83289218077129715392012-09-26T16:18:00.002+02:002012-09-26T16:18:58.697+02:00Datovka - Interface to Czech Databox (AKA Datové schránky)<p>Recently, I packaged "Datovka" for Fedora. It's GUI application for access to <a href="http://www.datoveschranky.info/">Czech Databox (AKA Datové schránky)</a> - an electronic communication interface endorsed by the Czech government. There is also python-dslib library for accessing the databox programatically. It was implemented by <a href="http://www.nic.cz/">CZ.NIC</a>. You can also access the databox from WWW interface now as it was recently redesigned to work without Windows plugin, but this GUI application and library could bring you more comfort and automation possibility.</p>Yardahttp://www.blogger.com/profile/02853164994296727284noreply@blogger.com0