<div dir="ltr"><div><div><div>Hi there,<br><br></div>Being a newbie, I encountered the following scenarios when tracing build_kernel.sh script from eewiki. Would someone help me to understand why please? From my experience, I would to summarize the following scenario.<br><br></div>1. First, source is cloned from <a href="https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git">https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git</a> and checked for release version, &quot;v4.10.17&quot;. Obviously it has no kernel tag of &quot;v4.10.17&quot;, but &quot;v4.10&quot;<br><br></div>2. As &quot;v4.10.17&quot; does not exist, it tried to pull from the origin/master by command, git pull --no-edit <a href="https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git">https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git</a> master --tags<div><div><div><br></div><div>3. Kernel tag, of &quot;v4.10.17&quot; is checked being verified again, but failed. Hence, now it fetched fromĀ  git fetch <a href="https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git">https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git</a> master --tags<br><br></div><div>Now, the kernel, of v4.10.17&quot; is found.<br><br></div><div>My questions are:<br><br></div><div>1. One would know that clone of  <a href="https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git">https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git</a> would not produce kernel tag of , &quot;v4.10.17&quot;, wouldn&#39;t it?<br></div><div><br></div><div>2. Similar by pull it again from  <a href="https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git">https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git</a> with option of master --tags would not produce kernel tag, &quot;v4.10.17&quot; as well, wouldn&#39; it?<br><br></div><div>3. Since fetching  with git fetch <a href="https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git">https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git</a> master --tags would produce v4.10.17, why would not it clone it from .../stable/linux-stable,git?<br><br></div><div>I know that the answers would be very lengthy and I would probably need some basics of LInux kernel to understand the answers. However, I will investigate further for things that I don&#39;t understand. For now, please educate me if you could.<br><br><br></div><div>The following are the snapshot of the process getting the kernel source.<br></div><div><br></div><div>&gt; git clone <a href="https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git">https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git</a> /home/qws/myGithub/Panda-Repo/armv7-multiplatform/ignore/linux-src<br><br>2.<br>&gt; git clone --shared /home/qws/myGithub/Panda-Repo/armv7-multiplatform/ignore/linux-src /home/qws/myGithub/Panda-Repo/armv7-multiplatform/KERNEL<br><br><br>3. <br>&gt; git tag | grep &quot;v4.10.17&quot; | grep -v rc &gt; /dev/null 2&gt;&amp;1 || git_kernel_torvalds<br># The following is resulted of git_kernel_torvalds being executed, as the former command failed<br>&gt; git pull --no-edit <a href="https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git">https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git</a> master --tags<br><br>4.<br>&gt; git tag | grep &quot;v4.10.17&quot; | grep -v rc &gt; /dev/null 2&gt;&amp;1 || git_kernel_stable<br># The following is resulted of git_kernel_stable being execuated, as the former command failed<br>&gt; git fetch <a href="https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git">https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git</a> master --tags <br><br></div><div>Thank you<br><br></div><div>Best regards<br></div><div>Lim<br></div><div><br><br></div></div></div></div>