All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 3/9 v2] linux: meddle not in the affairs of filesystems, for you are tasty with bacon
Date: Mon, 28 Mar 2016 23:05:52 +0200	[thread overview]
Message-ID: <20160328210552.GD3608@free.fr> (raw)
In-Reply-To: <56F96B80.6040706@gmail.com>

Romain, All,

On 2016-03-28 19:36 +0200, Romain Naour spake thusly:
> Le 11/03/2016 19:41, Yann E. MORIN a ?crit :
> > Currently, the rule to rebuild the Linux kernel with an initramfs
> > directly depends on the filesystem image filename.
> > 
> > This is inherently "bad" from a purity point of view. linux.mk should
> > not have to delve into the fs internals.
> > 
> > Rather, make it directly depend on the "frontal" rule that generates the
> > cpio image.
> > 
> > Drop the comment for linux-rebuild-with-initramfs, it was misleading
> > (talking about generating "the initramfs list of files", which is not
> > what was done, since we use a cpio as source of initramfs, not a list of
> > files).
> > 
> > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> > Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> > Cc: Arnout Vandecappelle <arnout@mind.be>
> > 
> > ---
> > Changes v1 -> v2:
> >   - drop intermediate, unneeded stamp-file
> >   - drop misleading comment
> > 
> > ---
> > This, too, will be useful for the initramfs patch coming next.
> > ---
> >  linux/linux.mk | 16 ++++++----------
> >  1 file changed, 6 insertions(+), 10 deletions(-)
> > 
> > diff --git a/linux/linux.mk b/linux/linux.mk
> > index ea90918..c0d760a 100644
> > --- a/linux/linux.mk
> > +++ b/linux/linux.mk
> > @@ -438,11 +438,12 @@ endif # BR_BUILDING
> >  $(eval $(kconfig-package))
> >  
> >  # Support for rebuilding the kernel after the cpio archive has
> > -# been generated in $(BINARIES_DIR)/rootfs.cpio.
> > -$(LINUX_DIR)/.stamp_initramfs_rebuilt: $(LINUX_DIR)/.stamp_target_installed
> > -$(LINUX_DIR)/.stamp_initramfs_rebuilt: $(LINUX_DIR)/.stamp_images_installed
> > -$(LINUX_DIR)/.stamp_initramfs_rebuilt: $(BINARIES_DIR)/rootfs.cpio
> > -$(LINUX_DIR)/.stamp_initramfs_rebuilt:
> > +# been generated.
> > +.PHONY: linux-rebuild-with-initramfs
> > +linux-rebuild-with-initramfs: $(LINUX_DIR)/.stamp_target_installed
> > +linux-rebuild-with-initramfs: $(LINUX_DIR)/.stamp_images_installed
> > +linux-rebuild-with-initramfs: rootfs-cpio
> > +linux-rebuild-with-initramfs:
> >  	@$(call MESSAGE,"Rebuilding kernel with initramfs")
> >  	# Build the kernel.
> >  	$(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) $(LINUX_TARGET_NAME)
> > @@ -451,8 +452,3 @@ $(LINUX_DIR)/.stamp_initramfs_rebuilt:
> >  	cp $(LINUX_IMAGE_PATH) $(BINARIES_DIR)
> >  	# If there is a .ub file copy it to the final destination
> >  	test ! -f $(LINUX_IMAGE_PATH).ub || cp $(LINUX_IMAGE_PATH).ub $(BINARIES_DIR)
> > -	$(Q)touch $@
> 
> IIUC, the stamp file can be removed since the target is now PHONY, right ?
> 
> But latter in the patch 4/9 in the comment there is a reference to this file:
> # Note: ordering of the dependencies is not guaranteed here, but in
> # linux/linux.mk, via the .stamp_initramfs_rebuilt stamp file, which depends
> # on the rootfs-cpio filesystem rule.

I'll fix patch 4, then. Thanks!

> > -# The initramfs building code must make sure this target gets called
> > -# after it generated the initramfs list of files.
> > -linux-rebuild-with-initramfs: $(LINUX_DIR)/.stamp_initramfs_rebuilt
> > 
> 
> Something is wrong...
> With this patch applied, I have the following error when rebuilding the kernel
> with initramfs:
> 
> make[2]: *** No rule to make target 'bzImage'. Arr?t.
> linux/linux.mk:447: recipe for target 'linux-rebuild-with-initramfs' failed

Yep, that's because there is no longer any directory component in the
target path, so $(@D) is just '.' (a dot). But as I just explained in my
previous mail, I had it already fixed, just not on the right machine...
:-/

Thanks!

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'

  parent reply	other threads:[~2016-03-28 21:05 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-11 18:41 [Buildroot] [PATCH 0/9 v2] fs: cleanups and enhancements (branch yem/fs) Yann E. MORIN
2016-03-11 18:41 ` [Buildroot] [PATCH 1/9 v2] core: sort packages and eliminate duplicates before building Yann E. MORIN
2016-03-28 16:29   ` Romain Naour
2016-03-11 18:41 ` [Buildroot] [PATCH 2/9 v2] linux: split overly-long dependency line for readability Yann E. MORIN
2016-03-28 16:31   ` Romain Naour
2016-03-11 18:41 ` [Buildroot] [PATCH 3/9 v2] linux: meddle not in the affairs of filesystems, for you are tasty with bacon Yann E. MORIN
2016-03-28 17:36   ` Romain Naour
2016-03-28 17:47     ` Romain Naour
2016-03-28 21:02       ` Yann E. MORIN
2016-03-28 21:05     ` Yann E. MORIN [this message]
2016-03-11 18:41 ` [Buildroot] [PATCH 4/9 v2] fs/initramfs: cleanup and enhance comments Yann E. MORIN
2016-03-28 18:05   ` Romain Naour
2016-03-28 21:36     ` Yann E. MORIN
2016-03-11 18:41 ` [Buildroot] [PATCH 5/9 v2] fs/ext2: use a post-gen hook rather than a post-target rule Yann E. MORIN
2016-03-28 18:13   ` Romain Naour
2016-03-11 18:41 ` [Buildroot] [PATCH 6/9 v2] fs/cpio: " Yann E. MORIN
2016-03-28 18:22   ` Romain Naour
2016-03-11 18:41 ` [Buildroot] [PATCH 7/9 v2] fs/common: get rid of post-target rules Yann E. MORIN
2016-03-28 18:26   ` Romain Naour
2016-03-11 18:41 ` [Buildroot] [PATCH 8/9 v2] fs/common: move actions common to all filesystems to their own rule Yann E. MORIN
2016-03-28 21:12   ` Romain Naour
2016-03-28 21:43     ` Yann E. MORIN
2016-03-11 18:41 ` [Buildroot] [PATCH 9/9 v2] [RFC] core: finalise target in its own location Yann E. MORIN

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160328210552.GD3608@free.fr \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.