From: Yann E. MORIN Date: Sat, 8 Nov 2014 17:39:42 +0100 Subject: [Buildroot] [PATCH] linux: add option to create kernel tarball In-Reply-To: <1415464367-32108-1-git-send-email-yegorslists@googlemail.com> References: <1415464367-32108-1-git-send-email-yegorslists@googlemail.com> Message-ID: <20141108163942.GA3481@free.fr> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net Yegor, All, On 2014-11-08 17:32 +0100, Yegor Yefremov spake thusly: > This option will invoke "make tar-pkg" in kernel's build directory > and the resulting linux-*.tar will be copied to images folder. Why would we want that only for the kernel? If we were to add such a command, we would want to have it for all packages, done in a generic way, unless there is a *really* *compelling* reason to have such a linux-specific command. Regards, Yann E. MORIN. > Signed-off-by: Yegor Yefremov > --- > linux/Config.in | 5 +++++ > linux/linux.mk | 11 +++++++++++ > 2 files changed, 16 insertions(+) > > diff --git a/linux/Config.in b/linux/Config.in > index e0d123c..b222bbf 100644 > --- a/linux/Config.in > +++ b/linux/Config.in > @@ -345,6 +345,11 @@ config BR2_LINUX_KERNEL_INSTALL_TARGET > /boot if DTBs have been generated by the kernel build > process. > > +config BR2_LINUX_KERNEL_BUILD_AS_TARBALL > + bool "Build kernel as a tarball" > + help > + Execute "make tar-pkg" and copy resulting tarball to images folder. > + > # Linux extensions > source "linux/Config.ext.in" > > diff --git a/linux/linux.mk b/linux/linux.mk > index 6740d01..e09fc5c 100644 > --- a/linux/linux.mk > +++ b/linux/linux.mk > @@ -215,6 +215,15 @@ define LINUX_CONFIGURE_CMDS > yes '' | $(TARGET_MAKE_ENV) $(MAKE1) $(LINUX_MAKE_FLAGS) -C $(@D) oldconfig > endef > > +ifeq ($(BR2_LINUX_KERNEL_BUILD_AS_TARBALL),y) > +define LINUX_MAKE_KERNEL_PKG > + $(TARGET_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) tar-pkg > +endef > +define LINUX_INSTALL_KERNEL_PKG > + cp $(@D)/*.tar $(BINARIES_DIR) > +endef > +endif > + > ifeq ($(BR2_LINUX_KERNEL_DTS_SUPPORT),y) > ifeq ($(BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT),) > define LINUX_BUILD_DTB > @@ -271,6 +280,7 @@ define LINUX_BUILD_CMDS > fi > $(LINUX_BUILD_DTB) > $(LINUX_APPEND_DTB) > + $(LINUX_MAKE_KERNEL_PKG) > endef > > > @@ -293,6 +303,7 @@ endef > define LINUX_INSTALL_IMAGES_CMDS > cp $(LINUX_IMAGE_PATH) $(BINARIES_DIR) > $(LINUX_INSTALL_DTB) > + $(LINUX_INSTALL_KERNEL_PKG) > endef > > define LINUX_INSTALL_TARGET_CMDS > -- > 1.8.3.2 > > _______________________________________________ > buildroot mailing list > buildroot at busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot -- .-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'