<p dir="ltr">Would ldd give any useful library links that use the kernel version number - not in front of a machine to check, so I'm just guessing...</p>
<p dir="ltr">Euan</p>
<div class="gmail_extra"><br><div class="gmail_quote">On 24 Nov. 2016 11:56 am, "BillK" <<a href="mailto:billk@iinet.net.au">billk@iinet.net.au</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>It's a binary, not a running kernel! And you can't boot it until you have built a matching initrd. Catch 22<br>
<br>
BillK<br>
<br><br><div class="gmail_quote">On 24 November 2016 11:48:56 AM AWST, "Marcos Raúl Carot" <<a href="mailto:marcos.carot@gmail.com" target="_blank">marcos.carot@gmail.com</a>> wrote:<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<p dir="ltr">cat /proc/version </p>
<br><div class="gmail_quote"><div dir="ltr">On Thu, 24 Nov 2016, 11:36 Bill Kenworthy <<a href="mailto:billk@iinet.net.au" target="_blank">billk@iinet.net.au</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">What's the best way to get kernel version from a binary?<br class="m_-707605183867158878gmail_msg">
<br class="m_-707605183867158878gmail_msg">
Context is that the raspberry pi stock firware doesn’t use version<br class="m_-707605183867158878gmail_msg">
numbers in the filename and I want to know what kernel version I am<br class="m_-707605183867158878gmail_msg">
building a custom initrd using dracut for a btrfs on root filesystem.<br class="m_-707605183867158878gmail_msg">
<br class="m_-707605183867158878gmail_msg">
Easy to get manually (strings|grep the file) but its clumsy and hard to<br class="m_-707605183867158878gmail_msg">
get precision in a script and uname doesn’t work on a file :(<br class="m_-707605183867158878gmail_msg">
<br class="m_-707605183867158878gmail_msg">
BillK<br class="m_-707605183867158878gmail_msg">
______________________________<wbr>_________________<br class="m_-707605183867158878gmail_msg">
PLUG discussion list: <a href="mailto:plug@plug.org.au" class="m_-707605183867158878gmail_msg" target="_blank">plug@plug.org.au</a><br class="m_-707605183867158878gmail_msg">
<a href="http://lists.plug.org.au/mailman/listinfo/plug" rel="noreferrer" class="m_-707605183867158878gmail_msg" target="_blank">http://lists.plug.org.au/<wbr>mailman/listinfo/plug</a><br class="m_-707605183867158878gmail_msg">
Committee e-mail: <a href="mailto:committee@plug.org.au" class="m_-707605183867158878gmail_msg" target="_blank">committee@plug.org.au</a><br class="m_-707605183867158878gmail_msg">
PLUG Membership: <a href="http://www.plug.org.au/membership" rel="noreferrer" class="m_-707605183867158878gmail_msg" target="_blank">http://www.plug.org.au/<wbr>membership</a></blockquote></div>
<p style="margin-top:2.5em;margin-bottom:1em;border-bottom:1px solid #000"></p><pre class="m_-707605183867158878k9mail"><hr><br>PLUG discussion list: <a href="mailto:plug@plug.org.au" target="_blank">plug@plug.org.au</a><br><a href="http://lists.plug.org.au/mailman/listinfo/plug" target="_blank">http://lists.plug.org.au/<wbr>mailman/listinfo/plug</a><br>Committee e-mail: <a href="mailto:committee@plug.org.au" target="_blank">committee@plug.org.au</a><br>PLUG Membership: <a href="http://www.plug.org.au/membership" target="_blank">http://www.plug.org.au/<wbr>membership</a></pre></blockquote></div><br>
-- <br>
Sent from my Android phone with K-9 Mail. Please excuse my brevity.</div><br>______________________________<wbr>_________________<br>
PLUG discussion list: <a href="mailto:plug@plug.org.au">plug@plug.org.au</a><br>
<a href="http://lists.plug.org.au/mailman/listinfo/plug" rel="noreferrer" target="_blank">http://lists.plug.org.au/<wbr>mailman/listinfo/plug</a><br>
Committee e-mail: <a href="mailto:committee@plug.org.au">committee@plug.org.au</a><br>
PLUG Membership: <a href="http://www.plug.org.au/membership" rel="noreferrer" target="_blank">http://www.plug.org.au/<wbr>membership</a><br></blockquote></div></div>