Hello Julius Werner, Caveh Jalali, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/21598
to look at the new patch set (#2).
Change subject: util/cbfstool: Add "expand" command to make CBFS span an fmap region
......................................................................
util/cbfstool: Add "expand" command to make CBFS span an fmap region
vboot images come with multiple regions carrying CBFS file systems. To
expedite hashing (from slow flash memory), the FW_MAIN_* regions are
truncated since they typically have pretty large unused space at the
end that is of no interest.
For test purposes it can be useful to re-engage that space, so add a
command that creates a new empty file entry covering that area (except
for the last 4 bytes for the master header pointer, as usual).
BUG=b:65853903
BRANCH=none
TEST=`cbfstool test.bin expand -r FW_MAIN_A` creates a new empty file of
the expected size on a Chrome OS firmware image.
Change-Id: I160c8529ce4bfcc28685166b6d9035ade4f6f1d1
Signed-off-by: Patrick Georgi <pgeorgi(a)google.com>
---
M util/cbfstool/cbfs_image.c
M util/cbfstool/cbfs_image.h
M util/cbfstool/cbfstool.c
3 files changed, 56 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/98/21598/2
--
To view, visit https://review.coreboot.org/21598
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I160c8529ce4bfcc28685166b6d9035ade4f6f1d1
Gerrit-Change-Number: 21598
Gerrit-PatchSet: 2
Gerrit-Owner: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Caveh Jalali <caveh(a)google.com>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Julius Werner has posted comments on this change. ( https://review.coreboot.org/21598 )
Change subject: util/cbfstool: Add "expand" command to make CBFS span an fmap region
......................................................................
Patch Set 1: Code-Review+2
(2 comments)
https://review.coreboot.org/#/c/21598/1/util/cbfstool/cbfstool.c
File util/cbfstool/cbfstool.c:
https://review.coreboot.org/#/c/21598/1/util/cbfstool/cbfstool.c@1114
PS1, Line 1114: if (!param.region_name) {
nit: Shouldn't this default to COREBOOT like the other commands? (Or, if it does, the error message seems wrong.)
https://review.coreboot.org/#/c/21598/1/util/cbfstool/cbfstool.c@1300
PS1, Line 1300: "Expand CBFS to span entire region\n"
> I considered that, but that quickly devolves in an epic yak shave: We still
Hmm... yeah, okay.
--
To view, visit https://review.coreboot.org/21598
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I160c8529ce4bfcc28685166b6d9035ade4f6f1d1
Gerrit-Change-Number: 21598
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Caveh Jalali <caveh(a)google.com>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Tue, 19 Sep 2017 20:13:54 +0000
Gerrit-HasComments: Yes
Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/21598 )
Change subject: util/cbfstool: Add "expand" command to make CBFS span an fmap region
......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/#/c/21598/1/util/cbfstool/cbfstool.c
File util/cbfstool/cbfstool.c:
https://review.coreboot.org/#/c/21598/1/util/cbfstool/cbfstool.c@1300
PS1, Line 1300: "Expand CBFS to span entire region\n"
> Don't we want to kill two birds with one stone and implement a command that
I considered that, but that quickly devolves in an epic yak shave: We still need to extract the region after we truncate, then pass through whatever else we have in the build system to reassemble the image, yada yada yada...
(or we'd need to find a different place where the truncate operation fits in better in the build system flow)
At that point I thought I'll make this commit do one thing and do it well.
--
To view, visit https://review.coreboot.org/21598
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I160c8529ce4bfcc28685166b6d9035ade4f6f1d1
Gerrit-Change-Number: 21598
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Caveh Jalali <caveh(a)google.com>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Tue, 19 Sep 2017 20:00:31 +0000
Gerrit-HasComments: Yes
Julius Werner has posted comments on this change. ( https://review.coreboot.org/21601 )
Change subject: Makefile.inc: Add left shift macro
......................................................................
Patch Set 1: Code-Review+2
> The other macros aren't using shell inline computation, they're using the expr utility and expr doesn't support exponents.
> http://pubs.opengroup.org/onlinepubs/9699919799/utilities/expr.html
My bad, I thought expr was just another syntactic form of inline computation.
--
To view, visit https://review.coreboot.org/21601
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib3fb43b620f31fee2a41f00ddf7294edc81a60f6
Gerrit-Change-Number: 21601
Gerrit-PatchSet: 1
Gerrit-Owner: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Jonathan Neuschäfer <j.neuschaefer(a)gmx.net>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Tue, 19 Sep 2017 19:50:55 +0000
Gerrit-HasComments: No
Julius Werner has posted comments on this change. ( https://review.coreboot.org/21598 )
Change subject: util/cbfstool: Add "expand" command to make CBFS span an fmap region
......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/#/c/21598/1/util/cbfstool/cbfstool.c
File util/cbfstool/cbfstool.c:
https://review.coreboot.org/#/c/21598/1/util/cbfstool/cbfstool.c@1300
PS1, Line 1300: "Expand CBFS to span entire region\n"
Don't we want to kill two birds with one stone and implement a command that can both expand and truncate here? The "parse cbfstool output with sed" solution we currently use to truncate in the ebuild doesn't really inspire that much confidence anyway, I think while we're redoing this anyway we might as well do away with that. (I'd call the command cbfstool truncate then, with behavior similar to the truncate POSIX tool.)
--
To view, visit https://review.coreboot.org/21598
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I160c8529ce4bfcc28685166b6d9035ade4f6f1d1
Gerrit-Change-Number: 21598
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Caveh Jalali <caveh(a)google.com>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Tue, 19 Sep 2017 19:49:07 +0000
Gerrit-HasComments: Yes
Martin Roth has posted comments on this change. ( https://review.coreboot.org/21601 )
Change subject: Makefile.inc: Add left shift macro
......................................................................
Patch Set 1:
The other macros aren't using shell inline computation, they're using the expr utility and expr doesn't support exponents.
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/expr.html
bc is posix, so it should already be on everyone's system.
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html
--
To view, visit https://review.coreboot.org/21601
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib3fb43b620f31fee2a41f00ddf7294edc81a60f6
Gerrit-Change-Number: 21601
Gerrit-PatchSet: 1
Gerrit-Owner: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Jonathan Neuschäfer <j.neuschaefer(a)gmx.net>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Tue, 19 Sep 2017 19:46:32 +0000
Gerrit-HasComments: No
Julius Werner has posted comments on this change. ( https://review.coreboot.org/21601 )
Change subject: Makefile.inc: Add left shift macro
......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/#/c/21601/1/Makefile.inc
File Makefile.inc:
https://review.coreboot.org/#/c/21601/1/Makefile.inc@138
PS1, Line 138: int-shift-left=$(shell echo "$(call _toint,$(word 1, $1)) * (2 ^ $(call _toint,$(word 2, $1)))" | bc)
Why not just use shell inline computation like the others, e.g.:
$(shell expr $(call _toint,$(word 1, $1)) << $(call _toint,$(word 2, $1)))
I don't think we have a dependency on bc yet, no reason to add one.
--
To view, visit https://review.coreboot.org/21601
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib3fb43b620f31fee2a41f00ddf7294edc81a60f6
Gerrit-Change-Number: 21601
Gerrit-PatchSet: 1
Gerrit-Owner: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Jonathan Neuschäfer <j.neuschaefer(a)gmx.net>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Tue, 19 Sep 2017 19:37:52 +0000
Gerrit-HasComments: Yes