public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: linux-arm-kernel@lists.infradead.org,
	Michal Marek <mmarek@suse.cz>,
	linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ARM: add boot image dependencies not to generate invalid images
Date: Fri, 10 Jul 2015 11:22:23 +0100	[thread overview]
Message-ID: <20150710102222.GP7557@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1436186224-6673-1-git-send-email-yamada.masahiro@socionext.com>

On Mon, Jul 06, 2015 at 09:37:04PM +0900, Masahiro Yamada wrote:
> [3] Then, re-build "all" and "uImage" simultaneously.
>     You will get an invalid uImage at random.
>   $ make -s -j8 ARCH=arm UIMAGE_LOADADDR=0x80208000 all uImage
>   Image Name:   Linux-4.2.0-rc1-00008-g1c4c715-d
>   Created:      Mon Jul  6 17:52:22 2015
>   Image Type:   ARM Linux Kernel Image (uncompressed)
>   Data Size:    26768 Bytes = 26.14 kB = 0.03 MB
>   Load Address: 80208000
>   Entry Point:  80208000

At no point in the above do I see an attempt to rebuild init/main.o,
which there should be as you touched the corresponding .c file -
because you're hiding that output with -s.  Please show what's going
on without using -s.

> "make uImage" could descend into arch/arm/boot/Makefile before
> "make zImage" is completed because arch/arm/Makefile describes no
> dependency among boot targets.

The uImage target should depend on vmlinux, which should force the
rebuild of init/main.o, and relink of the top-level vmlinux file
before decending into arch/arm/boot/Makefile for the
arch/arm/boot/uImage target.

That makefile contains the dependencies required to order things
correctly - the arch/arm/boot/uImage target depends on
arch/arm/boot/zImage, which in turn depends on
arch/arm/boot/compressed/vmlinux, and then arch/arm/boot/Image.

In other words, arch/arm/boot/Makefile deals with the dependencies
between the targets it's responsible for building itself.

-- 
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.

  reply	other threads:[~2015-07-10 10:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-06 12:37 [PATCH] ARM: add boot image dependencies not to generate invalid images Masahiro Yamada
2015-07-10 10:22 ` Russell King - ARM Linux [this message]
2015-07-10 16:41   ` Masahiro Yamada
2015-07-21  6:58     ` Masahiro Yamada
2015-08-08 12:29       ` Masahiro Yamada

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=20150710102222.GP7557@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.cz \
    --cc=yamada.masahiro@socionext.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox