Michael Niewöhner uploaded patch set #5 to this change.

View Change

payloads/external/GRUB2: prevent rebuild without actual changes

When the coreboot config changes, grub2 gets rebuilt, too. This is
caused by Make detecting a change in the dependency on the config file.

There are two cases where grub2 needs to be rebuilt (partly):

1. Changed list of included modules (CONFIG_GRUB2_EXTRA_MODULES)
In this case only the resulting binary has to be repackaged with
(or without) the modules changed. This does not require a full
rebuild and is intellegently handled by Make / the build system.

2. Changed grub revision or branch in coreboot config
In this case grub has to be recompiled from the new sources.
Fortunately all this is - again - magically handled by the build
system (automake and Make, to be precise) and there is no need to
influence that process from coreboot, like removing the build
directory for example.

This makes it possible to reduce build times after coreboot config
changes by adjusting the payload's Make targets and their dependencies
and letting the build system any required (partial or full) rebuilds.

Further, this commit removes the redundant dependeny on `build/config.h`
and drops the superfluous `CONFIG_DEP` make parameter.

Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Change-Id: Ibf5a316d0c9761426ec2ee306d78cd56d4bf19b5
---
M payloads/external/GRUB2/Makefile
1 file changed, 2 insertions(+), 4 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/55/40955/5

To view, visit change 40955. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ibf5a316d0c9761426ec2ee306d78cd56d4bf19b5
Gerrit-Change-Number: 40955
Gerrit-PatchSet: 5
Gerrit-Owner: Michael Niewöhner
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Denis Carikli <GNUtoo@no-log.org>
Gerrit-Reviewer: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Gerrit-Reviewer: Martin Roth <martinroth@google.com>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Patrick Georgi <pgeorgi@google.com>
Gerrit-Reviewer: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-Reviewer: Werner Zeh <werner.zeh@siemens.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-MessageType: newpatchset