diff mbox

why scripts/link-vmlinux.sh has a final build of init/

Message ID fb60e245-86f2-53c6-79d8-bd395ef011dd@cn.fujitsu.com (mailing list archive)
State New, archived
Headers show

Commit Message

Cao jin Feb. 12, 2018, 4:22 a.m. UTC
Hi Masahiro-san,

  As I remember, init/ is already built during recursive make, and I did
a clean build(make mrproper, make localmodconfig) with all plugins
included on x86_64 with following patch, the kernel can boot without any
obvious problem. So, I don't figure out why we need this final build?


 #link vmlinux.o

 --
Sincerely,
Cao jin


--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Masahiro Yamada Feb. 12, 2018, 2:48 p.m. UTC | #1
2018-02-12 13:22 GMT+09:00 Cao jin <caoj.fnst@cn.fujitsu.com>:
> Hi Masahiro-san,
>
>   As I remember, init/ is already built during recursive make, and I did
> a clean build(make mrproper, make localmodconfig) with all plugins
> included on x86_64 with following patch, the kernel can boot without any
> obvious problem. So, I don't figure out why we need this final build?
>
>
> diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
> index e6818b8e7141..086b2efd4d53 100755
> --- a/scripts/link-vmlinux.sh
> +++ b/scripts/link-vmlinux.sh
> @@ -247,9 +247,6 @@ else
>         expr 0$(cat .old_version) + 1 >.version;
>  fi;
>
> -# final build of init/
> -${MAKE} -f "${srctree}/scripts/Makefile.build" obj=init
> GCC_PLUGINS_CFLAGS="${GCC_PLUGINS_CFLAGS}"
> -
>  archive_builtin
>
>  #link vmlinux.o
>


link-vmlinux.sh increments '.version'
so it must descend into init/
to update include/generated/compile.h
and re-compile init/version.o

We do not increment '.version'
at the first descend into init/
because we never know whether the kernel
is updated or not before the final link stage.
diff mbox

Patch

diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
index e6818b8e7141..086b2efd4d53 100755
--- a/scripts/link-vmlinux.sh
+++ b/scripts/link-vmlinux.sh
@@ -247,9 +247,6 @@  else
        expr 0$(cat .old_version) + 1 >.version;
 fi;

-# final build of init/
-${MAKE} -f "${srctree}/scripts/Makefile.build" obj=init
GCC_PLUGINS_CFLAGS="${GCC_PLUGINS_CFLAGS}"
-
 archive_builtin