<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:42.5pt 42.5pt 42.5pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="UK" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hello.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I have â€œaltera-image-minimal” recipe which creates minimal rootfs based on Linux kernel provided by â€œlinux-altera-local” recipe. This kernel is fetched from local directory.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">After first time building â€œaltera-image-minimal”, it produced rootfs with modules version contained â€œ-dirty” at the end. However kernel built from sources in local directory doesn’t have â€œ-dirty” in version string. Thus
 kernel can’t run with produced rootfs.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I opened directory which contains Yocto’s copy of Linux sources<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">build/tmp/work/socfpga_socrates-poky-linux-gnueabi/linux-altera-local-1.0-r1/socrates_linux/<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">then run â€œmake ARCH=arm kernelrelease” to investigate kernel version. This command outputs the version with â€œ-dirty”. I have found that â€œ-dirty” string is appended from script in kernel sources. That script uses output
 from â€œgit diff-index --name-only HEAD” to determine if working directory is â€œdirty”. To find changed files, I ran same command, it’s oddly but the output was empty. Then I rerun â€œmake ARCH=arm kernelrelease”. This time it prints  the version without â€œ-dirty”.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Does someone have any clue why it can be so?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">My main question is: how can I recreate rootfs image starting from the point after fetching Linux sources, so Yocto’s copy will remain intact?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I spent lot of time trying to figure it out by myself with no luck. My idea was to find sequence of commands used to create image and run only commands after fetching kernel sources. Unfortunately I didn’t manage to find
 the sequence anywhere. How such things need to be solved in Yocto?<o:p></o:p></span></p>
</div>
</body>
</html>