<div dir="ltr">Should I include more description for this change? This is quite interesting when using an external tree for the kernel sources and yet want to share the project in the team (thus absolute path is not an option). I do not mind keeping this patch on my private fork, only I thought it could be interesting to other people too.<div><br></div><div><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 11, 2016 at 4:44 PM, Cuero Bugot <span dir="ltr"><<a href="mailto:cuero.bugot@gmail.com" target="_blank">cuero.bugot@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><div dir="ltr"><div class="gmail_quote"><div dir="ltr"><div>From: Cuero Bugot <<a href="mailto:cuero.bugot@gmail.com" target="_blank">cuero.bugot@gmail.com</a>></div><div><br></div><div>CONFIG_EXTERNAL_KERNEL_TREE .config settings allows building the kernel from an external tree directory. It currently only accept absolute path.<br></div><div>This patch is about allowing relative path. This is particularly convenient if you have your openwrt and kernel sources hosted remotely, have several persons working on the same sources, but possibly on different location on their machine!</div><div>The code bellow check if the path is relative or absolute, and if relative prepend it with openwrt TOPDIR path.</div><div><br></div><div>---</div><div><br></div><div>diff --git a/config/Config-devel.in b/config/Config-devel.in<br></div><div><div>index 938f0b3..5ab32d6 100644</div><div>--- a/config/Config-devel.in</div><div>+++ b/config/Config-devel.in</div><div>@@ -64,6 +64,9 @@ menuconfig DEVEL</div><div> <span style="white-space:pre-wrap"> </span>config EXTERNAL_KERNEL_TREE</div><div> <span style="white-space:pre-wrap"> </span>string "Use external kernel tree" if DEVEL</div><div> <span style="white-space:pre-wrap"> </span>default ""</div><div>+<span style="white-space:pre-wrap"> </span>help</div><div>+<span style="white-space:pre-wrap"> </span> Path to the external kernel source tree. If the provided path is not absolute, it is</div><div>+<span style="white-space:pre-wrap"> </span> relative to the openwrt top directory.</div><div> </div><div> <span style="white-space:pre-wrap"> </span>config KERNEL_GIT_CLONE_URI</div><div> <span style="white-space:pre-wrap"> </span>string "Enter git repository to clone" if DEVEL</div><div>diff --git a/include/<a href="http://kernel-defaults.mk" target="_blank">kernel-defaults.mk</a> b/include/<a href="http://kernel-defaults.mk" target="_blank">kernel-defaults.mk</a></div><div>index 406fd46..fdfcb23 100644</div><div>--- a/include/<a href="http://kernel-defaults.mk" target="_blank">kernel-defaults.mk</a></div><div>+++ b/include/<a href="http://kernel-defaults.mk" target="_blank">kernel-defaults.mk</a></div><div>@@ -63,7 +63,13 @@ else</div><div> <span style="white-space:pre-wrap"> </span>if [ -d $(LINUX_DIR) ]; then \</div><div> <span style="white-space:pre-wrap"> </span>rmdir $(LINUX_DIR); \</div><div> <span style="white-space:pre-wrap"> </span>fi</div><div>-<span style="white-space:pre-wrap"> </span>ln -s $(CONFIG_EXTERNAL_KERNEL_TREE) $(LINUX_DIR)</div><div>+<span style="white-space:pre-wrap"> </span># Check if the provided external path is absolute or relative</div><div>+<span style="white-space:pre-wrap"> </span># if the path is relative, build the proper path from the openwrt top dir.</div><div>+<span style="white-space:pre-wrap"> </span>if [ "${CONFIG_EXTERNAL_KERNEL_TREE:0:1}" = "/" ]; then \</div><div>+<span style="white-space:pre-wrap"> </span>ln -s $(CONFIG_EXTERNAL_KERNEL_TREE) $(LINUX_DIR); \</div><div>+<span style="white-space:pre-wrap"> </span>else \</div><div>+<span style="white-space:pre-wrap"> </span>ln -s $(TOPDIR)/$(CONFIG_EXTERNAL_KERNEL_TREE) $(LINUX_DIR); \</div><div>+<span style="white-space:pre-wrap"> </span>fi</div><div> endef</div><div> endif</div></div><div><br></div><div><br></div><div>Signed-off-by: Cuero Bugot <<a href="mailto:cuero.bugot@gmail.com" target="_blank">cuero.bugot@gmail.com</a>><br></div></div>
</div><br></div>
</div></div></blockquote></div><br></div></div></div></div>