New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 882445 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Jan 8
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

firmware updater: Migrate to updater5

Project Member Reported by hungte@chromium.org, Sep 10

Issue description

This is created to track our status of migrating firmware updater to `updater5` (using `futility update`) - as continue to     issue 875551    .

Steps:
 1. Implement 'futility update' command (    issue 875551     - done)
 2. Add 'updater5.sh' that calls futility update (done)
 3. Make sure firmware udpater ebuilds can select updater 5 (   issue 882413   )
 4. Change devices still in development to updater5, including
     atlas (done), scarlet (done), grunt (done), cheza (planned), kukui (TBD)
 5. After 1 or two project go public launch without problem, change cros-firmware.eclass to default to updater5.
 6. Remove --tools for both updater4 and updater5.

And after that, we can plan for more aggressive changes, for example changing shar to zip, and change shell based env scripts to JSON config.

Design doc: go/updater5
 
Cc: aaboagye@chromium.org nvaccaro@chromium.org bleung@chromium.org
Status: Started (was: Assigned)
details between step 4 and 5:

1. DEV projects (which has base board <= DVT)
2. Change Unified build v2 config to default updater5
3. Change Unified build v1 config to default updater5
4. Change cros-firmware.eclass (non-uni) to default updater5
5. Eliminate updater4 when no more special customization is needed (for example, daisy snow = M74?)
Project Member

Comment 3 by bugdroid1@chromium.org, Sep 13

Project Member

Comment 4 by bugdroid1@chromium.org, Sep 13

Project Member

Comment 5 by bugdroid1@chromium.org, Sep 13

Project Member

Comment 6 by bugdroid1@chromium.org, Sep 13

Project Member

Comment 7 by bugdroid1@chromium.org, Sep 13

Project Member

Comment 8 by bugdroid1@chromium.org, Sep 13

Project Member

Comment 9 by bugdroid1@chromium.org, Sep 13

Project Member

Comment 10 by bugdroid1@chromium.org, Sep 13

Project Member

Comment 11 by bugdroid1@chromium.org, Sep 13

Cc: caveh@chromium.org
Project Member

Comment 13 by bugdroid1@chromium.org, Sep 14

Project Member

Comment 14 by bugdroid1@chromium.org, Sep 14

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/firmware/+/c4911d1d7401596c1983cf4d3c320c84e6784f82

commit c4911d1d7401596c1983cf4d3c320c84e6784f82
Author: Hung-Te Lin <hungte@chromium.org>
Date: Fri Sep 14 19:08:25 2018

pack_firmware: Change updater script to global config

Currently the cros-firmware.eclass will always pass selected script in
command line by checking CROS_FIRWMARE_SCRIPT variable.

However for Unified Build systems, the real installed script will be
selected by cros_config GetFirmwareScript.

The GetFirmwareScript will read from dts in cros_config v1, and was a
fixed string 'updater4.sh' in cros_config v2. It was recently supported
by "chromeos.build-settings.firmware-updater-script" in v2 (CL:1216162).

Now, if we have a board that sets script to updater5.sh in cros_config
(no matter if it's v1 or v2) and leave the CROS_FIRWMARE_SCRIPT as
updater4, the pack logic will go wrong because some preprocessing, for
example the decision of default bundle tools, will be matched to the
command line arguments.

As a result, we should always trust command line. Unlike other
chromeos.devices settings, one overlay should have only one script for
all models and we're going to deprecate the script thing soon, so the
recommended way to switch between scripts is to use
CROS_FIRWMARE_SCRIPT, and deprecated the script selection in
cros_config.

BUG= chromium:882445 
TEST=Set CROS_FIRWMARE_SCRIPT=updater5.sh;
     emerge-grunt chromeos-firmware-grunt
     /build/grunt/usr/sbin/chromeos-firmwareupdate -V
     # used updater5 and no additional tool programs like flashrom
     ./pack_firmware_unittest.py
     ./pack_firmware_functest.py

Change-Id: If9a1a0043f9b7f0e6f2a7fcfb9f794940a1f276c
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1220906
Reviewed-by: C Shapiro <shapiroc@google.com>

[modify] https://crrev.com/c4911d1d7401596c1983cf4d3c320c84e6784f82/pack_firmware_unittest.py
[modify] https://crrev.com/c4911d1d7401596c1983cf4d3c320c84e6784f82/pack_firmware.py

Project Member

Comment 15 by bugdroid1@chromium.org, Sep 15

Project Member

Comment 16 by bugdroid1@chromium.org, Sep 26

Project Member

Comment 17 by bugdroid1@chromium.org, Sep 26

Project Member

Comment 18 by bugdroid1@chromium.org, Sep 26

Project Member

Comment 19 by bugdroid1@chromium.org, Sep 26

Description: Show this description
Description: Show this description
Quick update:
 - nocturne decided to not changing updater to prevent risk
 - most other platforms have been changed
 - there's also some work to migrate customization script - including daisy & spring
 - deprecation will happen when updater3 can be removed, i.e., M70 go stable
Project Member

Comment 23 by bugdroid1@chromium.org, Oct 1

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/79cd79bec99255ca3c897288c171237137c3ec54

commit 79cd79bec99255ca3c897288c171237137c3ec54
Author: Hung-Te Lin <hungte@chromium.org>
Date: Mon Oct 01 18:31:00 2018

cros-firmware.eclass: Remove unused variables.

The STABLE variables have been deprecated for a while, and no overlays
use them.

Also added TODO for deprecating CROS_FIRMWARE_EXTRA_LIST and
CROS_FIRMWARE_BUILD_MAIN_RW_IMAGE.

BUG= chromium:882445 
TEST=build_packages --board $BOARD; build_image --board $BOARD

Change-Id: I80019368220103c45936a14fc0f7a8767330dae3
Reviewed-on: https://chromium-review.googlesource.com/1242863
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/79cd79bec99255ca3c897288c171237137c3ec54/eclass/cros-firmware.eclass

Project Member

Comment 25 by bugdroid1@chromium.org, Oct 2

Quick update:
 - daisy and spring have both moved to updater5
 - there are no boards still rely on updater4-specific logic
 - storm is removed from manifest

We can declare that updater4 should be frozen. All new customization should go updater5.

Now as long as updater3 devices are deprecated, we can start making updater5 default. It'll be:

 1. Remove updater3 chromeos-firmware-* packages (CL:*664037, CL:*677811)
 2. Remove updater3 source from repo (CL:1179740, CL:1180621, CL:1156069)
 3. Change default updater to v5 (CL:1263715)
 4. More clean up and polish in v5. One planned change is to move to zip based pkg v2 and integration with unibuild fw selection.
   (CL:1223591 , CL:1253229, CL:1260804).
freezing updater4 would be best imo.  we (me?) already break this thing often enough.
Description: Show this description
Design doc: go/updater5
Project Member

Comment 30 by bugdroid1@chromium.org, Oct 5

Project Member

Comment 31 by bugdroid1@chromium.org, Oct 12

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/firmware/+/da622223bb63475ad5935eb6f20ad5d3e3090b62

commit da622223bb63475ad5935eb6f20ad5d3e3090b62
Author: Hung-Te Lin <hungte@chromium.org>
Date: Fri Oct 12 22:16:31 2018

Deprecate --create_bios_rw_image option

The `--create_bios_rw_image` is only used by RO-Normal firmware. With
CL:*684050 and CL:*684108, we have migrated all chromeos-firmware-*
packages using CROS_FIRMWARE_BUILD_RW_IMAGE (which leads to
--create_bios_rw_image) to using new updater5 quirks and no longer needs
to have RW blob created in packer.

BUG= chromium:882445 
TEST=./pack_firmware_unittest.py; ./pack_firmware_functest.py

Change-Id: Ia0ca2101761cdb96af85eb25a6ef323385cf93ca
Reviewed-on: https://chromium-review.googlesource.com/1255088
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/da622223bb63475ad5935eb6f20ad5d3e3090b62/pack_firmware_unittest.py
[modify] https://crrev.com/da622223bb63475ad5935eb6f20ad5d3e3090b62/pack_firmware.py

Project Member

Comment 32 by bugdroid1@chromium.org, Oct 14

Labels: merge-merged-firmware-grunt-11031.B
The following revision refers to this bug:
  https://chrome-internal.googlesource.com/chromeos/overlays/overlay-grunt-private/+/c4a313a74ac560f7fef926677c1fd4ca4b1224ef

commit c4a313a74ac560f7fef926677c1fd4ca4b1224ef
Author: Hung-Te Lin <hungte@chromium.org>
Date: Sun Oct 14 23:42:08 2018

Project Member

Comment 33 by bugdroid1@chromium.org, Oct 17

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/firmware/+/fec03b0f25eaf704f94cecbb2f7c91a2c2315533

commit fec03b0f25eaf704f94cecbb2f7c91a2c2315533
Author: Hung-Te Lin <hungte@chromium.org>
Date: Wed Oct 17 16:46:21 2018

pack_firmware: Deprecate --create_bios_rw_image and --merge_bios_rw_image

No firmware updater packages are still doing RO-NORMAL, so
--create_bios_rw_image should be abandoned.
And due to that, we will be always merging RW image, so
--merge_bios_rw_image is also deprecated.

BUG= chromium:882445 
TEST=./pack_firmware_unittest.py; ./pack_firmware_functest.py
CQ-DEPEND=CL:1282645

Change-Id: I3c5e783713311dd7ba18893b54c87b7271cd6f68
Reviewed-on: https://chromium-review.googlesource.com/1278554
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>

[modify] https://crrev.com/fec03b0f25eaf704f94cecbb2f7c91a2c2315533/pack_firmware_unittest.py
[modify] https://crrev.com/fec03b0f25eaf704f94cecbb2f7c91a2c2315533/pack_firmware.py

Project Member

Comment 34 by bugdroid1@chromium.org, Oct 18

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/firmware/+/8f15d1eb1431331b90529d266cd14f11064aee04

commit 8f15d1eb1431331b90529d266cd14f11064aee04
Author: Hung-Te Lin <hungte@chromium.org>
Date: Thu Oct 18 21:53:26 2018

pack: Move pack_* files into a better managed folder 'pack'

To align with updater v5 package layout, we want to move the resource
files for an updater package into one folder, `pack`.
 - Move the stub file 'pack_stub' to pack/sfx.sh
 - Move folder for distribution files 'pack_dist' into pack/dist
 - Move `setvars_template` into pack/setvars_template`

BUG= chromium:882445 
TEST=./pack_firmware_unittest.py; ./pack_firmware_functest.py

Change-Id: If0308de90834cbdc0d449afd5ffe33c6fd3c30e4
Reviewed-on: https://chromium-review.googlesource.com/1223593
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[rename] https://crrev.com/8f15d1eb1431331b90529d266cd14f11064aee04/pack/setvars_template
[rename] https://crrev.com/8f15d1eb1431331b90529d266cd14f11064aee04/pack/dist/crosfw.sh
[modify] https://crrev.com/8f15d1eb1431331b90529d266cd14f11064aee04/unittests/crosutil_unittest
[rename] https://crrev.com/8f15d1eb1431331b90529d266cd14f11064aee04/pack/dist/crosutil.sh
[modify] https://crrev.com/8f15d1eb1431331b90529d266cd14f11064aee04/pack_firmware_unittest.py
[rename] https://crrev.com/8f15d1eb1431331b90529d266cd14f11064aee04/pack/sfx.sh
[rename] https://crrev.com/8f15d1eb1431331b90529d266cd14f11064aee04/pack/dist/common.sh
[rename] https://crrev.com/8f15d1eb1431331b90529d266cd14f11064aee04/pack/dist/updater4.sh
[modify] https://crrev.com/8f15d1eb1431331b90529d266cd14f11064aee04/pack_firmware.py
[add] https://crrev.com/8f15d1eb1431331b90529d266cd14f11064aee04/pack/README.md
[rename] https://crrev.com/8f15d1eb1431331b90529d266cd14f11064aee04/pack/dist/updater5.sh
[modify] https://crrev.com/8f15d1eb1431331b90529d266cd14f11064aee04/README.md
[rename] https://crrev.com/8f15d1eb1431331b90529d266cd14f11064aee04/pack/dist/updater3.sh

Comment 35 Deleted

Project Member

Comment 36 by bugdroid1@chromium.org, Oct 25

Project Member

Comment 37 by bugdroid1@chromium.org, Oct 26

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/a264a83461197f710bed27aa9724abc197d6429c

commit a264a83461197f710bed27aa9724abc197d6429c
Author: Hung-Te Lin <hungte@chromium.org>
Date: Fri Oct 26 19:14:57 2018

pytests: update_firmware: Change to new updater params

The firmware updater has abandoned --[no]update_{main,ec,pd} since
updater v5. To only upload host, use --host_only. There's currently no
way to only update EC/PD.

BUG= chromium:882445 
TEST=make test

Change-Id: I524f9ef20924e1b310e718572dd49a068345b37c
Reviewed-on: https://chromium-review.googlesource.com/1299355
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Hsin-Yi Wang <hsinyi@chromium.org>

[modify] https://crrev.com/a264a83461197f710bed27aa9724abc197d6429c/py/test/pytests/update_firmware.py

All updater3 devices are now deprecated and we may now start the migration of keeping only updater4 and updater5.
Planned changes:

 - M72: futility feature complete, deprecate updater3,
   clean up ebuild & eclass so updater5 can be default.
 - M73: change updater5 to be the new default one, and deprecate updater4.
 - M74: enable ZIP based SFX2

So we can complete the whole migration in M74.
Project Member

Comment 40 by bugdroid1@chromium.org, Nov 1

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/db84ad2ca28e21fcd8c3cb8858b3168d3901f05c

commit db84ad2ca28e21fcd8c3cb8858b3168d3901f05c
Author: Hung-Te Lin <hungte@chromium.org>
Date: Thu Nov 01 09:17:54 2018

eclass: cros-firmware: Deprecate local updaters.

On migration to updater5, we don't need local updaters anymore because
developers should now just run "futility update" to test with new
images.

BUG= chromium:882445 
TEST=emerge-$BOARD chromeos-firmware-$BOARD

Change-Id: Ia19aa947f9ec4ffac6935a4672943c23aa1b5702
Reviewed-on: https://chromium-review.googlesource.com/1310153
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/db84ad2ca28e21fcd8c3cb8858b3168d3901f05c/eclass/cros-firmware.eclass

Project Member

Comment 41 by bugdroid1@chromium.org, Nov 1

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/74fe370280abb2ef685a1a2aa1ec8521b2373b62

commit 74fe370280abb2ef685a1a2aa1ec8521b2373b62
Author: Hung-Te Lin <hungte@chromium.org>
Date: Thu Nov 01 17:02:16 2018

eclass: cros-firmware: Remove settings deprecated by updater5

During the migration to updater5, we have several settings to change:
1. --tool_base is deprecated.
2. CROS_FIRMWARE_EXTRA_LIST is deprecated. --extra is kept because
   updater4 packages still need updater_custom.sh from $FILESDIR/extra,
   but ebuild files should not set CROS_FIRMWARE_EXTRA_LIST anymore.
3. ${S}/sbin/* now do not support versions.

BUG= chromium:882445 
TEST=emerge-$BOARD chromeos-firmware-$BOARD
CQ-DEPEND=CL:1180621

Change-Id: Iff9566c6f287c5a6928fb0dfbb006be5034df2a2
Reviewed-on: https://chromium-review.googlesource.com/1310154
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/74fe370280abb2ef685a1a2aa1ec8521b2373b62/eclass/cros-firmware.eclass

Project Member

Comment 42 by bugdroid1@chromium.org, Nov 2

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/firmware/+/837656d6863cd5ccae97e0679e521e5eaae0e146

commit 837656d6863cd5ccae97e0679e521e5eaae0e146
Author: Hung-Te Lin <hungte@chromium.org>
Date: Fri Nov 02 11:14:23 2018

pack_firmware: Default to updater5

Change all testing and default options to updater5, to prepare for
deprecating updater4.

Note the updater logic has been moved to futility itself (and tested
there) so we are only checking the contents of updater package, not
really running it to verify the updated results.

Also, --output in updater4 and updater5 is slightly different. In
updater4 the output has HWID preserved (causing GBB to be different) and
updater5 does not do that (since all preserving is done inside
futility). This is actually more correct because --output does not
preserve GBB flags, VPD, and other sections; it should only set rootkey
and vblocks properly.

BUG= chromium:882445 
TEST=./pack_firmware_unittest.py; ./pack_firmware_functest.py

Change-Id: I024634dd822a14794130443df8eb5d17f8646b7c
Reviewed-on: https://chromium-review.googlesource.com/1278549
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[delete] https://crrev.com/844b203aec9cf2353f7d14fca5768baab524f4af/test/chromeos-firmware-reef-9999.ebuild
[modify] https://crrev.com/837656d6863cd5ccae97e0679e521e5eaae0e146/functest/bin/flashrom
[modify] https://crrev.com/837656d6863cd5ccae97e0679e521e5eaae0e146/pack_firmware_unittest.py
[delete] https://crrev.com/844b203aec9cf2353f7d14fca5768baab524f4af/functest/bin/crossystem
[delete] https://crrev.com/844b203aec9cf2353f7d14fca5768baab524f4af/test/chromeos-firmware-reef-0.0.1-r56.ebuild
[modify] https://crrev.com/837656d6863cd5ccae97e0679e521e5eaae0e146/pack_firmware_functest.py
[modify] https://crrev.com/837656d6863cd5ccae97e0679e521e5eaae0e146/test/config_base.dtsi
[delete] https://crrev.com/844b203aec9cf2353f7d14fca5768baab524f4af/test/nvram.rom
[modify] https://crrev.com/837656d6863cd5ccae97e0679e521e5eaae0e146/pack_firmware.py
[modify] https://crrev.com/837656d6863cd5ccae97e0679e521e5eaae0e146/pack/dist/crosutil.sh

Project Member

Comment 43 by bugdroid1@chromium.org, Nov 4

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/chromeos/cros-signing/+/67bfb92e8f867496224bffd35f355d98b1266038

commit 67bfb92e8f867496224bffd35f355d98b1266038
Author: Hung-Te Lin <hungte@chromium.org>
Date: Sun Nov 04 15:22:37 2018

Project Member

Comment 44 by bugdroid1@chromium.org, Nov 4

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/f067d5a14dde459432940a1e519eacdb75282281

commit f067d5a14dde459432940a1e519eacdb75282281
Author: Hung-Te Lin <hungte@chromium.org>
Date: Sun Nov 04 19:35:29 2018

futility: updater: Add more legacy options

To simplify the migration plan, we want to support the legacy arguments
used by FAFT:
 --noupdate_ec => --host_only
 --noupdate_pd => --host_only
 --nocheck_keys => --force
 --update_main => ignore

BUG= chromium:882445 ,b:118509893
TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility
BRANCH=None

Change-Id: I31652806085937fe5ca2f2facc7321021977cbb7
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1310253
Reviewed-by: Randall Spangler <rspangler@chromium.org>

[modify] https://crrev.com/f067d5a14dde459432940a1e519eacdb75282281/futility/cmd_update.c

Project Member

Comment 45 by bugdroid1@chromium.org, Nov 4

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/firmware/+/80e6b2adb5955a1950728da258b8ab2ad1881621

commit 80e6b2adb5955a1950728da258b8ab2ad1881621
Author: Hung-Te Lin <hungte@chromium.org>
Date: Sun Nov 04 19:35:30 2018

pack: Merge all dependency to updater4 and declare to freeze it

We won't have more script based updaters, so all the *.sh used by
updater4 can be merged. This helps refactoring pack_firmware and would
be more consistent of the structure in updater5.

Also, make an explicit declaration that updater4 is frozen. Devices that
need further changes should just change to use updater5 and add quirks
there.

BUG= chromium:882445 
TEST=./pack_firmware_unittest.py; ./pack_firmware_functest.py

Change-Id: I7f5df066fc75c722b4d220225d3581cdf55342f2
Reviewed-on: https://chromium-review.googlesource.com/1313788
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>

[delete] https://crrev.com/4724a98f402c3d2acdd8d19bda0fcea79c4e41e3/pack/dist/crosfw.sh
[delete] https://crrev.com/4724a98f402c3d2acdd8d19bda0fcea79c4e41e3/unittests/crosutil_unittest
[delete] https://crrev.com/4724a98f402c3d2acdd8d19bda0fcea79c4e41e3/pack/dist/crosutil.sh
[modify] https://crrev.com/80e6b2adb5955a1950728da258b8ab2ad1881621/pack/dist/updater4.sh
[delete] https://crrev.com/4724a98f402c3d2acdd8d19bda0fcea79c4e41e3/pack/dist/common.sh
[delete] https://crrev.com/4724a98f402c3d2acdd8d19bda0fcea79c4e41e3/lib/shunit2/shunit2
[modify] https://crrev.com/80e6b2adb5955a1950728da258b8ab2ad1881621/pack_firmware.py
[delete] https://crrev.com/4724a98f402c3d2acdd8d19bda0fcea79c4e41e3/lib/shflags/shflags
[modify] https://crrev.com/80e6b2adb5955a1950728da258b8ab2ad1881621/pack_firmware_functest.py

Project Member

Comment 46 by bugdroid1@chromium.org, Nov 5

Labels: merge-merged-factory-coral-10122.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/11c05a84521016bf9e009198219e453675383970

commit 11c05a84521016bf9e009198219e453675383970
Author: Paul Kocialkowski <contact@paulk.fr>
Date: Mon Nov 05 04:03:38 2018

futility: Add firmware updater as 'futility update'

The factory branches may need to run firmware updater extracted from
newer release images which relies on 'futility update' to run.
This change collects all related changes:

ba5e4674 Makefile: Build futility without utillib to extend arch support
cddd3b04 Makefile: Add pthread library to the futility static build
019b441a Revert "Makefile: Build futility without utillib to extend arch support"
85974d01 futility: Add 'Error' utility macro
eee33827 futility: Add 'update' command for updating firmware
22266d1f futility: cmd_update: Support loading image files by -i, -e, --pd_image
6d30a78a futility: cmd_update: Process FMAP and parse image version
035f0da2 futility: cmd_update: Access system firmware using external flashrom
039ad74d futility: cmd_update: Add '--emulate' option
e04be109 futility: cmd_update: Implement updater logic "FULL UPDATE".
0a368cac futility: cmd_update: Add "system property" and '--sys_props' to override
8017381e futility: cmd_update: Implement updater logic "RW UPDATE".
b77e2548 futility: cmd_update: Add 'mainfw_act' system property
6b1ead30 futility: cmd_update: Implement updater logic "TRY-RW" (--try)
eb0c9caf futility: cmd_update: Preserve image sections before update
9f27a900 futility: cmd_update: Check contents before starting to update
e25ffef4 futility: cmd_update: Use real system write protection status
f7b99d00 futility: cmd_update: Add vboot1 updater logic
b0f5a8f9 futility: cmd_update: Check platform compatibility before updating
c13d39fa futility: cmd_update: Check TPM key versions before updating
ede6a006 futility: cmd_update: Check RO and RW signing compatibility before updating
8b86ee5d futility: cmd_update: Add more legacy updater options
6a867bc4 futility: cmd_update: Correct updating logic for RW_LEGACY
27fc2478 futility: cmd_update: Preserve sections blocked by management engine
35c99021 futility: cmd_update: Revise debug and error message macro
86162304 futility: drop static build
b5a4e47c futility: cmd_update: Correctly handle error counter
50cf198c futility: cmd_update: Add new 'legacy' mode
da4e823f futility: cmd_update: Create and remove temporary files properly
1bb66a0c futility: cmd_update: Add --quirks for device-specific hacks
b4243c6b futility: cmd_update: Add quirk 'enlarge_image'
c3c9ae6a futility: cmd_update: Add quirk 'unlock_me_for_update'
382375b3 futility: cmd_update: Add quirk 'min_platform_version'
cabd2f8c futility: update: Fix update failure in factory mode due to wrong WP logic
ac8cb8dd futility: update: Add legacy option '--factory'
79bdb0cc futility: Remove FUTIL_STATIC build rules
d6f7c16b futility: update: Skip TPM check if tpm_fwver is not valid.
f6198074 futility: update: Preserve new sections: RO_PRESERVE and RW_PRESERVE
f67b991a futility: update: Preserve RO_FSG
ee96e741 futility: update: Preserve RW_ELOG
b07165b5 futility: update: Allow tpm_fwver=0 and allow --force to waive TPM check
5a5be0c7 futility: update: Revise error messages
ba73f35e futility: update: Refactor 'emulation' (--emulate).
eb166257 futility: update: Add --programmer to override flashrom programmer for servo
5fa5e3b9 futility: update: Refactor: move updater logic to 'updater.c'
243e2115 futility: updater: Refactor: move command line processing to cmd_update.c
e7bcda54 futility: updater: Refactor: localize temp files management
8810b089 futility: updater: Refactor: move quirks to 'updater_quirks.c'
a1bfb650 futility: updater: Add default quirks
a2b9e356 futility: updater: Add quirk 'daisy_snow_dual_model' for daisy_snow
ba30c93b futility: updater: Preserve SMMSTORE and add quirk 'eve_smm_store'
38d06701 futility: updater: Support reading main image from stdin
f1609b8c futility: updater: Revise verbosity and error messages
fabf760f futility: updater: Add ASPRINTF macro
7aa34302 futility: updater: Refactor function names
077026fd futility: updater: Add '--archive' to read from an archive or directory
f7c44a32 futility: updater: Refactor how arguments were configured
1847ba4f futility: updater: Add --manifest to scan and print archive info
a71e0ccd futility: updater: Allow patching rootkey and vblock files
2ae23df7 futility: updater: Change default model name to FWID platform name
3d615c91 futility: updater: Do not preserve GBB flags in --factory mode.
10b3d4ed futility: updater: Add '--model' and select images by system model
622c35aa futility: updater: Support white label from VPD and --signature_id
c6781206 futility: updater: Support --mode=output and --output_dir
fb947ae0 futility: update: Add `--host_only` argument
67d66f18 futility: updater: Support --repack and --unpack
1f489393 futility: updater: Fix model detection error

BUG= chromium:882445 
TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility
BRANCH=None

Change-Id: I6c14133f59561a422a190b17fa8ff7e79c45d953
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/1317051

[add] https://crrev.com/11c05a84521016bf9e009198219e453675383970/futility/cmd_update.c
[add] https://crrev.com/11c05a84521016bf9e009198219e453675383970/tests/futility/models/link/setvars.sh
[add] https://crrev.com/11c05a84521016bf9e009198219e453675383970/tests/futility/link.manifest.json
[add] https://crrev.com/11c05a84521016bf9e009198219e453675383970/tests/futility/models/peppy/setvars.sh
[modify] https://crrev.com/11c05a84521016bf9e009198219e453675383970/Makefile
[add] https://crrev.com/11c05a84521016bf9e009198219e453675383970/tests/futility/models/whitetip/setvars.sh
[add] https://crrev.com/11c05a84521016bf9e009198219e453675383970/futility/updater_archive.c
[add] https://crrev.com/11c05a84521016bf9e009198219e453675383970/futility/updater.c
[add] https://crrev.com/11c05a84521016bf9e009198219e453675383970/tests/futility/test_update.sh
[add] https://crrev.com/11c05a84521016bf9e009198219e453675383970/futility/updater.h
[modify] https://crrev.com/11c05a84521016bf9e009198219e453675383970/futility/futility.h
[modify] https://crrev.com/11c05a84521016bf9e009198219e453675383970/tests/futility/run_test_scripts.sh
[add] https://crrev.com/11c05a84521016bf9e009198219e453675383970/futility/updater_quirks.c

Project Member

Comment 47 by bugdroid1@chromium.org, Nov 5

Labels: merge-merged-factory-fizz-10167.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/2d6fcd8949ad2ea652057c9ee518a1e13256e9bd

commit 2d6fcd8949ad2ea652057c9ee518a1e13256e9bd
Author: Paul Kocialkowski <contact@paulk.fr>
Date: Mon Nov 05 04:06:29 2018

futility: Add firmware updater as 'futility update'

The factory branches may need to run firmware updater extracted from
newer release images which relies on 'futility update' to run.
This change collects all related changes:

ba5e4674 Makefile: Build futility without utillib to extend arch support
cddd3b04 Makefile: Add pthread library to the futility static build
019b441a Revert "Makefile: Build futility without utillib to extend arch support"
85974d01 futility: Add 'Error' utility macro
eee33827 futility: Add 'update' command for updating firmware
22266d1f futility: cmd_update: Support loading image files by -i, -e, --pd_image
6d30a78a futility: cmd_update: Process FMAP and parse image version
035f0da2 futility: cmd_update: Access system firmware using external flashrom
039ad74d futility: cmd_update: Add '--emulate' option
e04be109 futility: cmd_update: Implement updater logic "FULL UPDATE".
0a368cac futility: cmd_update: Add "system property" and '--sys_props' to override
8017381e futility: cmd_update: Implement updater logic "RW UPDATE".
b77e2548 futility: cmd_update: Add 'mainfw_act' system property
6b1ead30 futility: cmd_update: Implement updater logic "TRY-RW" (--try)
eb0c9caf futility: cmd_update: Preserve image sections before update
9f27a900 futility: cmd_update: Check contents before starting to update
e25ffef4 futility: cmd_update: Use real system write protection status
f7b99d00 futility: cmd_update: Add vboot1 updater logic
b0f5a8f9 futility: cmd_update: Check platform compatibility before updating
c13d39fa futility: cmd_update: Check TPM key versions before updating
ede6a006 futility: cmd_update: Check RO and RW signing compatibility before updating
8b86ee5d futility: cmd_update: Add more legacy updater options
6a867bc4 futility: cmd_update: Correct updating logic for RW_LEGACY
27fc2478 futility: cmd_update: Preserve sections blocked by management engine
35c99021 futility: cmd_update: Revise debug and error message macro
86162304 futility: drop static build
b5a4e47c futility: cmd_update: Correctly handle error counter
50cf198c futility: cmd_update: Add new 'legacy' mode
da4e823f futility: cmd_update: Create and remove temporary files properly
1bb66a0c futility: cmd_update: Add --quirks for device-specific hacks
b4243c6b futility: cmd_update: Add quirk 'enlarge_image'
c3c9ae6a futility: cmd_update: Add quirk 'unlock_me_for_update'
382375b3 futility: cmd_update: Add quirk 'min_platform_version'
cabd2f8c futility: update: Fix update failure in factory mode due to wrong WP logic
ac8cb8dd futility: update: Add legacy option '--factory'
79bdb0cc futility: Remove FUTIL_STATIC build rules
d6f7c16b futility: update: Skip TPM check if tpm_fwver is not valid.
f6198074 futility: update: Preserve new sections: RO_PRESERVE and RW_PRESERVE
f67b991a futility: update: Preserve RO_FSG
ee96e741 futility: update: Preserve RW_ELOG
b07165b5 futility: update: Allow tpm_fwver=0 and allow --force to waive TPM check
5a5be0c7 futility: update: Revise error messages
ba73f35e futility: update: Refactor 'emulation' (--emulate).
eb166257 futility: update: Add --programmer to override flashrom programmer for servo
5fa5e3b9 futility: update: Refactor: move updater logic to 'updater.c'
243e2115 futility: updater: Refactor: move command line processing to cmd_update.c
e7bcda54 futility: updater: Refactor: localize temp files management
8810b089 futility: updater: Refactor: move quirks to 'updater_quirks.c'
a1bfb650 futility: updater: Add default quirks
a2b9e356 futility: updater: Add quirk 'daisy_snow_dual_model' for daisy_snow
ba30c93b futility: updater: Preserve SMMSTORE and add quirk 'eve_smm_store'
38d06701 futility: updater: Support reading main image from stdin
f1609b8c futility: updater: Revise verbosity and error messages
fabf760f futility: updater: Add ASPRINTF macro
7aa34302 futility: updater: Refactor function names
077026fd futility: updater: Add '--archive' to read from an archive or directory
f7c44a32 futility: updater: Refactor how arguments were configured
1847ba4f futility: updater: Add --manifest to scan and print archive info
a71e0ccd futility: updater: Allow patching rootkey and vblock files
2ae23df7 futility: updater: Change default model name to FWID platform name
3d615c91 futility: updater: Do not preserve GBB flags in --factory mode.
10b3d4ed futility: updater: Add '--model' and select images by system model
622c35aa futility: updater: Support white label from VPD and --signature_id
c6781206 futility: updater: Support --mode=output and --output_dir
fb947ae0 futility: update: Add `--host_only` argument
67d66f18 futility: updater: Support --repack and --unpack
1f489393 futility: updater: Fix model detection error

BUG= chromium:882445 
TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility
BRANCH=None

Change-Id: I6c14133f59561a422a190b17fa8ff7e79c45d953
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/1317051
(cherry picked from commit 11c05a84521016bf9e009198219e453675383970)
Reviewed-on: https://chromium-review.googlesource.com/c/1317052

[add] https://crrev.com/2d6fcd8949ad2ea652057c9ee518a1e13256e9bd/futility/cmd_update.c
[add] https://crrev.com/2d6fcd8949ad2ea652057c9ee518a1e13256e9bd/tests/futility/models/link/setvars.sh
[add] https://crrev.com/2d6fcd8949ad2ea652057c9ee518a1e13256e9bd/tests/futility/link.manifest.json
[add] https://crrev.com/2d6fcd8949ad2ea652057c9ee518a1e13256e9bd/tests/futility/models/peppy/setvars.sh
[modify] https://crrev.com/2d6fcd8949ad2ea652057c9ee518a1e13256e9bd/Makefile
[add] https://crrev.com/2d6fcd8949ad2ea652057c9ee518a1e13256e9bd/tests/futility/models/whitetip/setvars.sh
[add] https://crrev.com/2d6fcd8949ad2ea652057c9ee518a1e13256e9bd/futility/updater_archive.c
[add] https://crrev.com/2d6fcd8949ad2ea652057c9ee518a1e13256e9bd/futility/updater.c
[add] https://crrev.com/2d6fcd8949ad2ea652057c9ee518a1e13256e9bd/tests/futility/test_update.sh
[add] https://crrev.com/2d6fcd8949ad2ea652057c9ee518a1e13256e9bd/futility/updater.h
[modify] https://crrev.com/2d6fcd8949ad2ea652057c9ee518a1e13256e9bd/futility/futility.h
[modify] https://crrev.com/2d6fcd8949ad2ea652057c9ee518a1e13256e9bd/tests/futility/run_test_scripts.sh
[add] https://crrev.com/2d6fcd8949ad2ea652057c9ee518a1e13256e9bd/futility/updater_quirks.c

Project Member

Comment 48 by bugdroid1@chromium.org, Nov 5

Labels: merge-merged-factory-scarlet-10211.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/82892633bfb33cee0739cda98c95a5977f8cbd56

commit 82892633bfb33cee0739cda98c95a5977f8cbd56
Author: Paul Kocialkowski <contact@paulk.fr>
Date: Mon Nov 05 04:12:06 2018

futility: Add firmware updater as 'futility update'

The factory branches may need to run firmware updater extracted from
newer release images which relies on 'futility update' to run.
This change collects all related changes:

ba5e4674 Makefile: Build futility without utillib to extend arch support
cddd3b04 Makefile: Add pthread library to the futility static build
019b441a Revert "Makefile: Build futility without utillib to extend arch support"
85974d01 futility: Add 'Error' utility macro
eee33827 futility: Add 'update' command for updating firmware
22266d1f futility: cmd_update: Support loading image files by -i, -e, --pd_image
6d30a78a futility: cmd_update: Process FMAP and parse image version
035f0da2 futility: cmd_update: Access system firmware using external flashrom
039ad74d futility: cmd_update: Add '--emulate' option
e04be109 futility: cmd_update: Implement updater logic "FULL UPDATE".
0a368cac futility: cmd_update: Add "system property" and '--sys_props' to override
8017381e futility: cmd_update: Implement updater logic "RW UPDATE".
b77e2548 futility: cmd_update: Add 'mainfw_act' system property
6b1ead30 futility: cmd_update: Implement updater logic "TRY-RW" (--try)
eb0c9caf futility: cmd_update: Preserve image sections before update
9f27a900 futility: cmd_update: Check contents before starting to update
e25ffef4 futility: cmd_update: Use real system write protection status
f7b99d00 futility: cmd_update: Add vboot1 updater logic
b0f5a8f9 futility: cmd_update: Check platform compatibility before updating
c13d39fa futility: cmd_update: Check TPM key versions before updating
ede6a006 futility: cmd_update: Check RO and RW signing compatibility before updating
8b86ee5d futility: cmd_update: Add more legacy updater options
6a867bc4 futility: cmd_update: Correct updating logic for RW_LEGACY
27fc2478 futility: cmd_update: Preserve sections blocked by management engine
35c99021 futility: cmd_update: Revise debug and error message macro
86162304 futility: drop static build
b5a4e47c futility: cmd_update: Correctly handle error counter
50cf198c futility: cmd_update: Add new 'legacy' mode
da4e823f futility: cmd_update: Create and remove temporary files properly
1bb66a0c futility: cmd_update: Add --quirks for device-specific hacks
b4243c6b futility: cmd_update: Add quirk 'enlarge_image'
c3c9ae6a futility: cmd_update: Add quirk 'unlock_me_for_update'
382375b3 futility: cmd_update: Add quirk 'min_platform_version'
cabd2f8c futility: update: Fix update failure in factory mode due to wrong WP logic
ac8cb8dd futility: update: Add legacy option '--factory'
79bdb0cc futility: Remove FUTIL_STATIC build rules
d6f7c16b futility: update: Skip TPM check if tpm_fwver is not valid.
f6198074 futility: update: Preserve new sections: RO_PRESERVE and RW_PRESERVE
f67b991a futility: update: Preserve RO_FSG
ee96e741 futility: update: Preserve RW_ELOG
b07165b5 futility: update: Allow tpm_fwver=0 and allow --force to waive TPM check
5a5be0c7 futility: update: Revise error messages
ba73f35e futility: update: Refactor 'emulation' (--emulate).
eb166257 futility: update: Add --programmer to override flashrom programmer for servo
5fa5e3b9 futility: update: Refactor: move updater logic to 'updater.c'
243e2115 futility: updater: Refactor: move command line processing to cmd_update.c
e7bcda54 futility: updater: Refactor: localize temp files management
8810b089 futility: updater: Refactor: move quirks to 'updater_quirks.c'
a1bfb650 futility: updater: Add default quirks
a2b9e356 futility: updater: Add quirk 'daisy_snow_dual_model' for daisy_snow
ba30c93b futility: updater: Preserve SMMSTORE and add quirk 'eve_smm_store'
38d06701 futility: updater: Support reading main image from stdin
f1609b8c futility: updater: Revise verbosity and error messages
fabf760f futility: updater: Add ASPRINTF macro
7aa34302 futility: updater: Refactor function names
077026fd futility: updater: Add '--archive' to read from an archive or directory
f7c44a32 futility: updater: Refactor how arguments were configured
1847ba4f futility: updater: Add --manifest to scan and print archive info
a71e0ccd futility: updater: Allow patching rootkey and vblock files
2ae23df7 futility: updater: Change default model name to FWID platform name
3d615c91 futility: updater: Do not preserve GBB flags in --factory mode.
10b3d4ed futility: updater: Add '--model' and select images by system model
622c35aa futility: updater: Support white label from VPD and --signature_id
c6781206 futility: updater: Support --mode=output and --output_dir
fb947ae0 futility: update: Add `--host_only` argument
67d66f18 futility: updater: Support --repack and --unpack
1f489393 futility: updater: Fix model detection error

BUG= chromium:882445 
TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility
BRANCH=None

Change-Id: I6c14133f59561a422a190b17fa8ff7e79c45d953
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/1317051
(cherry picked from commit 11c05a84521016bf9e009198219e453675383970)
Reviewed-on: https://chromium-review.googlesource.com/c/1317052
(cherry picked from commit 2d6fcd8949ad2ea652057c9ee518a1e13256e9bd)
Reviewed-on: https://chromium-review.googlesource.com/c/1317053

[add] https://crrev.com/82892633bfb33cee0739cda98c95a5977f8cbd56/futility/cmd_update.c
[add] https://crrev.com/82892633bfb33cee0739cda98c95a5977f8cbd56/tests/futility/models/link/setvars.sh
[add] https://crrev.com/82892633bfb33cee0739cda98c95a5977f8cbd56/tests/futility/link.manifest.json
[add] https://crrev.com/82892633bfb33cee0739cda98c95a5977f8cbd56/tests/futility/models/peppy/setvars.sh
[modify] https://crrev.com/82892633bfb33cee0739cda98c95a5977f8cbd56/Makefile
[add] https://crrev.com/82892633bfb33cee0739cda98c95a5977f8cbd56/tests/futility/models/whitetip/setvars.sh
[add] https://crrev.com/82892633bfb33cee0739cda98c95a5977f8cbd56/futility/updater_archive.c
[add] https://crrev.com/82892633bfb33cee0739cda98c95a5977f8cbd56/futility/updater.c
[add] https://crrev.com/82892633bfb33cee0739cda98c95a5977f8cbd56/tests/futility/test_update.sh
[add] https://crrev.com/82892633bfb33cee0739cda98c95a5977f8cbd56/futility/updater.h
[modify] https://crrev.com/82892633bfb33cee0739cda98c95a5977f8cbd56/futility/futility.h
[modify] https://crrev.com/82892633bfb33cee0739cda98c95a5977f8cbd56/tests/futility/run_test_scripts.sh
[add] https://crrev.com/82892633bfb33cee0739cda98c95a5977f8cbd56/futility/updater_quirks.c

Project Member

Comment 49 by bugdroid1@chromium.org, Nov 5

Labels: merge-merged-factory-poppy-10504.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/900f29310c6d9a7bd06496c5a83db7d190119415

commit 900f29310c6d9a7bd06496c5a83db7d190119415
Author: Hung-Te Lin <hungte@chromium.org>
Date: Mon Nov 05 04:15:13 2018

futility: Add firmware updater as 'futility update'

The factory branches may need to run firmware updater extracted from
newer release images which relies on 'futility update' to run.
This change collects all related changes:

85974d01 futility: Add 'Error' utility macro
eee33827 futility: Add 'update' command for updating firmware
22266d1f futility: cmd_update: Support loading image files by -i, -e, --pd_image
6d30a78a futility: cmd_update: Process FMAP and parse image version
035f0da2 futility: cmd_update: Access system firmware using external flashrom
039ad74d futility: cmd_update: Add '--emulate' option
e04be109 futility: cmd_update: Implement updater logic "FULL UPDATE".
0a368cac futility: cmd_update: Add "system property" and '--sys_props' to override
8017381e futility: cmd_update: Implement updater logic "RW UPDATE".
b77e2548 futility: cmd_update: Add 'mainfw_act' system property
6b1ead30 futility: cmd_update: Implement updater logic "TRY-RW" (--try)
eb0c9caf futility: cmd_update: Preserve image sections before update
9f27a900 futility: cmd_update: Check contents before starting to update
e25ffef4 futility: cmd_update: Use real system write protection status
f7b99d00 futility: cmd_update: Add vboot1 updater logic
b0f5a8f9 futility: cmd_update: Check platform compatibility before updating
c13d39fa futility: cmd_update: Check TPM key versions before updating
ede6a006 futility: cmd_update: Check RO and RW signing compatibility before updating
8b86ee5d futility: cmd_update: Add more legacy updater options
6a867bc4 futility: cmd_update: Correct updating logic for RW_LEGACY
27fc2478 futility: cmd_update: Preserve sections blocked by management engine
35c99021 futility: cmd_update: Revise debug and error message macro
86162304 futility: drop static build
b5a4e47c futility: cmd_update: Correctly handle error counter
50cf198c futility: cmd_update: Add new 'legacy' mode
da4e823f futility: cmd_update: Create and remove temporary files properly
1bb66a0c futility: cmd_update: Add --quirks for device-specific hacks
b4243c6b futility: cmd_update: Add quirk 'enlarge_image'
c3c9ae6a futility: cmd_update: Add quirk 'unlock_me_for_update'
382375b3 futility: cmd_update: Add quirk 'min_platform_version'
cabd2f8c futility: update: Fix update failure in factory mode due to wrong WP logic
ac8cb8dd futility: update: Add legacy option '--factory'
79bdb0cc futility: Remove FUTIL_STATIC build rules
d6f7c16b futility: update: Skip TPM check if tpm_fwver is not valid.
f6198074 futility: update: Preserve new sections: RO_PRESERVE and RW_PRESERVE
f67b991a futility: update: Preserve RO_FSG
ee96e741 futility: update: Preserve RW_ELOG
b07165b5 futility: update: Allow tpm_fwver=0 and allow --force to waive TPM check
5a5be0c7 futility: update: Revise error messages
ba73f35e futility: update: Refactor 'emulation' (--emulate).
eb166257 futility: update: Add --programmer to override flashrom programmer for servo
5fa5e3b9 futility: update: Refactor: move updater logic to 'updater.c'
243e2115 futility: updater: Refactor: move command line processing to cmd_update.c
e7bcda54 futility: updater: Refactor: localize temp files management
8810b089 futility: updater: Refactor: move quirks to 'updater_quirks.c'
a1bfb650 futility: updater: Add default quirks
a2b9e356 futility: updater: Add quirk 'daisy_snow_dual_model' for daisy_snow
ba30c93b futility: updater: Preserve SMMSTORE and add quirk 'eve_smm_store'
38d06701 futility: updater: Support reading main image from stdin
f1609b8c futility: updater: Revise verbosity and error messages
fabf760f futility: updater: Add ASPRINTF macro
7aa34302 futility: updater: Refactor function names
077026fd futility: updater: Add '--archive' to read from an archive or directory
f7c44a32 futility: updater: Refactor how arguments were configured
1847ba4f futility: updater: Add --manifest to scan and print archive info
a71e0ccd futility: updater: Allow patching rootkey and vblock files
2ae23df7 futility: updater: Change default model name to FWID platform name
3d615c91 futility: updater: Do not preserve GBB flags in --factory mode.
10b3d4ed futility: updater: Add '--model' and select images by system model
622c35aa futility: updater: Support white label from VPD and --signature_id
c6781206 futility: updater: Support --mode=output and --output_dir
fb947ae0 futility: update: Add `--host_only` argument
67d66f18 futility: updater: Support --repack and --unpack
1f489393 futility: updater: Fix model detection error

BUG= chromium:882445 
TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility
BRANCH=None

Change-Id: I6c14133f59561a422a190b17fa8ff7e79c45d953
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/1317054

[add] https://crrev.com/900f29310c6d9a7bd06496c5a83db7d190119415/futility/cmd_update.c
[add] https://crrev.com/900f29310c6d9a7bd06496c5a83db7d190119415/tests/futility/models/link/setvars.sh
[add] https://crrev.com/900f29310c6d9a7bd06496c5a83db7d190119415/tests/futility/link.manifest.json
[add] https://crrev.com/900f29310c6d9a7bd06496c5a83db7d190119415/tests/futility/models/peppy/setvars.sh
[modify] https://crrev.com/900f29310c6d9a7bd06496c5a83db7d190119415/Makefile
[add] https://crrev.com/900f29310c6d9a7bd06496c5a83db7d190119415/tests/futility/models/whitetip/setvars.sh
[add] https://crrev.com/900f29310c6d9a7bd06496c5a83db7d190119415/futility/updater_archive.c
[add] https://crrev.com/900f29310c6d9a7bd06496c5a83db7d190119415/futility/updater.c
[add] https://crrev.com/900f29310c6d9a7bd06496c5a83db7d190119415/tests/futility/test_update.sh
[add] https://crrev.com/900f29310c6d9a7bd06496c5a83db7d190119415/futility/updater.h
[modify] https://crrev.com/900f29310c6d9a7bd06496c5a83db7d190119415/futility/futility.h
[modify] https://crrev.com/900f29310c6d9a7bd06496c5a83db7d190119415/tests/futility/run_test_scripts.sh
[add] https://crrev.com/900f29310c6d9a7bd06496c5a83db7d190119415/futility/updater_quirks.c

Project Member

Comment 50 by bugdroid1@chromium.org, Nov 5

Labels: merge-merged-factory-soraka-10323.39.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/ceca0f7ff649fc386ab4b1ede288a06028ae260e

commit ceca0f7ff649fc386ab4b1ede288a06028ae260e
Author: Hung-Te Lin <hungte@chromium.org>
Date: Mon Nov 05 04:15:14 2018

futility: Add firmware updater as 'futility update'

The factory branches may need to run firmware updater extracted from
newer release images which relies on 'futility update' to run.
This change collects all related changes:

85974d01 futility: Add 'Error' utility macro
eee33827 futility: Add 'update' command for updating firmware
22266d1f futility: cmd_update: Support loading image files by -i, -e, --pd_image
6d30a78a futility: cmd_update: Process FMAP and parse image version
035f0da2 futility: cmd_update: Access system firmware using external flashrom
039ad74d futility: cmd_update: Add '--emulate' option
e04be109 futility: cmd_update: Implement updater logic "FULL UPDATE".
0a368cac futility: cmd_update: Add "system property" and '--sys_props' to override
8017381e futility: cmd_update: Implement updater logic "RW UPDATE".
b77e2548 futility: cmd_update: Add 'mainfw_act' system property
6b1ead30 futility: cmd_update: Implement updater logic "TRY-RW" (--try)
eb0c9caf futility: cmd_update: Preserve image sections before update
9f27a900 futility: cmd_update: Check contents before starting to update
e25ffef4 futility: cmd_update: Use real system write protection status
f7b99d00 futility: cmd_update: Add vboot1 updater logic
b0f5a8f9 futility: cmd_update: Check platform compatibility before updating
c13d39fa futility: cmd_update: Check TPM key versions before updating
ede6a006 futility: cmd_update: Check RO and RW signing compatibility before updating
8b86ee5d futility: cmd_update: Add more legacy updater options
6a867bc4 futility: cmd_update: Correct updating logic for RW_LEGACY
27fc2478 futility: cmd_update: Preserve sections blocked by management engine
35c99021 futility: cmd_update: Revise debug and error message macro
86162304 futility: drop static build
b5a4e47c futility: cmd_update: Correctly handle error counter
50cf198c futility: cmd_update: Add new 'legacy' mode
da4e823f futility: cmd_update: Create and remove temporary files properly
1bb66a0c futility: cmd_update: Add --quirks for device-specific hacks
b4243c6b futility: cmd_update: Add quirk 'enlarge_image'
c3c9ae6a futility: cmd_update: Add quirk 'unlock_me_for_update'
382375b3 futility: cmd_update: Add quirk 'min_platform_version'
cabd2f8c futility: update: Fix update failure in factory mode due to wrong WP logic
ac8cb8dd futility: update: Add legacy option '--factory'
79bdb0cc futility: Remove FUTIL_STATIC build rules
d6f7c16b futility: update: Skip TPM check if tpm_fwver is not valid.
f6198074 futility: update: Preserve new sections: RO_PRESERVE and RW_PRESERVE
f67b991a futility: update: Preserve RO_FSG
ee96e741 futility: update: Preserve RW_ELOG
b07165b5 futility: update: Allow tpm_fwver=0 and allow --force to waive TPM check
5a5be0c7 futility: update: Revise error messages
ba73f35e futility: update: Refactor 'emulation' (--emulate).
eb166257 futility: update: Add --programmer to override flashrom programmer for servo
5fa5e3b9 futility: update: Refactor: move updater logic to 'updater.c'
243e2115 futility: updater: Refactor: move command line processing to cmd_update.c
e7bcda54 futility: updater: Refactor: localize temp files management
8810b089 futility: updater: Refactor: move quirks to 'updater_quirks.c'
a1bfb650 futility: updater: Add default quirks
a2b9e356 futility: updater: Add quirk 'daisy_snow_dual_model' for daisy_snow
ba30c93b futility: updater: Preserve SMMSTORE and add quirk 'eve_smm_store'
38d06701 futility: updater: Support reading main image from stdin
f1609b8c futility: updater: Revise verbosity and error messages
fabf760f futility: updater: Add ASPRINTF macro
7aa34302 futility: updater: Refactor function names
077026fd futility: updater: Add '--archive' to read from an archive or directory
f7c44a32 futility: updater: Refactor how arguments were configured
1847ba4f futility: updater: Add --manifest to scan and print archive info
a71e0ccd futility: updater: Allow patching rootkey and vblock files
2ae23df7 futility: updater: Change default model name to FWID platform name
3d615c91 futility: updater: Do not preserve GBB flags in --factory mode.
10b3d4ed futility: updater: Add '--model' and select images by system model
622c35aa futility: updater: Support white label from VPD and --signature_id
c6781206 futility: updater: Support --mode=output and --output_dir
fb947ae0 futility: update: Add `--host_only` argument
67d66f18 futility: updater: Support --repack and --unpack
1f489393 futility: updater: Fix model detection error

BUG= chromium:882445 
TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility
BRANCH=None

Change-Id: I6c14133f59561a422a190b17fa8ff7e79c45d953
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/1317055

[add] https://crrev.com/ceca0f7ff649fc386ab4b1ede288a06028ae260e/futility/cmd_update.c
[add] https://crrev.com/ceca0f7ff649fc386ab4b1ede288a06028ae260e/tests/futility/models/link/setvars.sh
[add] https://crrev.com/ceca0f7ff649fc386ab4b1ede288a06028ae260e/tests/futility/link.manifest.json
[add] https://crrev.com/ceca0f7ff649fc386ab4b1ede288a06028ae260e/tests/futility/models/peppy/setvars.sh
[modify] https://crrev.com/ceca0f7ff649fc386ab4b1ede288a06028ae260e/Makefile
[add] https://crrev.com/ceca0f7ff649fc386ab4b1ede288a06028ae260e/tests/futility/models/whitetip/setvars.sh
[add] https://crrev.com/ceca0f7ff649fc386ab4b1ede288a06028ae260e/futility/updater_archive.c
[add] https://crrev.com/ceca0f7ff649fc386ab4b1ede288a06028ae260e/futility/updater.c
[add] https://crrev.com/ceca0f7ff649fc386ab4b1ede288a06028ae260e/tests/futility/test_update.sh
[add] https://crrev.com/ceca0f7ff649fc386ab4b1ede288a06028ae260e/futility/updater.h
[modify] https://crrev.com/ceca0f7ff649fc386ab4b1ede288a06028ae260e/futility/futility.h
[modify] https://crrev.com/ceca0f7ff649fc386ab4b1ede288a06028ae260e/tests/futility/run_test_scripts.sh
[add] https://crrev.com/ceca0f7ff649fc386ab4b1ede288a06028ae260e/futility/updater_quirks.c

Project Member

Comment 51 by bugdroid1@chromium.org, Nov 5

Labels: merge-merged-factory-nami-10715.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/bfea6c43400e53dbfe555a57c267d2897389e543

commit bfea6c43400e53dbfe555a57c267d2897389e543
Author: Hung-Te Lin <hungte@chromium.org>
Date: Mon Nov 05 04:15:14 2018

futility: Add firmware updater as 'futility update'

The factory branches may need to run firmware updater extracted from
newer release images which relies on 'futility update' to run.
This change collects all related changes:

85974d01 futility: Add 'Error' utility macro
eee33827 futility: Add 'update' command for updating firmware
22266d1f futility: cmd_update: Support loading image files by -i, -e, --pd_image
6d30a78a futility: cmd_update: Process FMAP and parse image version
035f0da2 futility: cmd_update: Access system firmware using external flashrom
039ad74d futility: cmd_update: Add '--emulate' option
e04be109 futility: cmd_update: Implement updater logic "FULL UPDATE".
0a368cac futility: cmd_update: Add "system property" and '--sys_props' to override
8017381e futility: cmd_update: Implement updater logic "RW UPDATE".
b77e2548 futility: cmd_update: Add 'mainfw_act' system property
6b1ead30 futility: cmd_update: Implement updater logic "TRY-RW" (--try)
eb0c9caf futility: cmd_update: Preserve image sections before update
9f27a900 futility: cmd_update: Check contents before starting to update
e25ffef4 futility: cmd_update: Use real system write protection status
f7b99d00 futility: cmd_update: Add vboot1 updater logic
b0f5a8f9 futility: cmd_update: Check platform compatibility before updating
c13d39fa futility: cmd_update: Check TPM key versions before updating
ede6a006 futility: cmd_update: Check RO and RW signing compatibility before updating
8b86ee5d futility: cmd_update: Add more legacy updater options
6a867bc4 futility: cmd_update: Correct updating logic for RW_LEGACY
27fc2478 futility: cmd_update: Preserve sections blocked by management engine
35c99021 futility: cmd_update: Revise debug and error message macro
86162304 futility: drop static build
b5a4e47c futility: cmd_update: Correctly handle error counter
50cf198c futility: cmd_update: Add new 'legacy' mode
da4e823f futility: cmd_update: Create and remove temporary files properly
1bb66a0c futility: cmd_update: Add --quirks for device-specific hacks
b4243c6b futility: cmd_update: Add quirk 'enlarge_image'
c3c9ae6a futility: cmd_update: Add quirk 'unlock_me_for_update'
382375b3 futility: cmd_update: Add quirk 'min_platform_version'
cabd2f8c futility: update: Fix update failure in factory mode due to wrong WP logic
ac8cb8dd futility: update: Add legacy option '--factory'
79bdb0cc futility: Remove FUTIL_STATIC build rules
d6f7c16b futility: update: Skip TPM check if tpm_fwver is not valid.
f6198074 futility: update: Preserve new sections: RO_PRESERVE and RW_PRESERVE
f67b991a futility: update: Preserve RO_FSG
ee96e741 futility: update: Preserve RW_ELOG
b07165b5 futility: update: Allow tpm_fwver=0 and allow --force to waive TPM check
5a5be0c7 futility: update: Revise error messages
ba73f35e futility: update: Refactor 'emulation' (--emulate).
eb166257 futility: update: Add --programmer to override flashrom programmer for servo
5fa5e3b9 futility: update: Refactor: move updater logic to 'updater.c'
243e2115 futility: updater: Refactor: move command line processing to cmd_update.c
e7bcda54 futility: updater: Refactor: localize temp files management
8810b089 futility: updater: Refactor: move quirks to 'updater_quirks.c'
a1bfb650 futility: updater: Add default quirks
a2b9e356 futility: updater: Add quirk 'daisy_snow_dual_model' for daisy_snow
ba30c93b futility: updater: Preserve SMMSTORE and add quirk 'eve_smm_store'
38d06701 futility: updater: Support reading main image from stdin
f1609b8c futility: updater: Revise verbosity and error messages
fabf760f futility: updater: Add ASPRINTF macro
7aa34302 futility: updater: Refactor function names
077026fd futility: updater: Add '--archive' to read from an archive or directory
f7c44a32 futility: updater: Refactor how arguments were configured
1847ba4f futility: updater: Add --manifest to scan and print archive info
a71e0ccd futility: updater: Allow patching rootkey and vblock files
2ae23df7 futility: updater: Change default model name to FWID platform name
3d615c91 futility: updater: Do not preserve GBB flags in --factory mode.
10b3d4ed futility: updater: Add '--model' and select images by system model
622c35aa futility: updater: Support white label from VPD and --signature_id
c6781206 futility: updater: Support --mode=output and --output_dir
fb947ae0 futility: update: Add `--host_only` argument
67d66f18 futility: updater: Support --repack and --unpack
1f489393 futility: updater: Fix model detection error

BUG= chromium:882445 
TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility
BRANCH=None

Change-Id: I6c14133f59561a422a190b17fa8ff7e79c45d953
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/1317056

[add] https://crrev.com/bfea6c43400e53dbfe555a57c267d2897389e543/futility/cmd_update.c
[add] https://crrev.com/bfea6c43400e53dbfe555a57c267d2897389e543/tests/futility/models/link/setvars.sh
[add] https://crrev.com/bfea6c43400e53dbfe555a57c267d2897389e543/tests/futility/link.manifest.json
[add] https://crrev.com/bfea6c43400e53dbfe555a57c267d2897389e543/tests/futility/models/peppy/setvars.sh
[modify] https://crrev.com/bfea6c43400e53dbfe555a57c267d2897389e543/Makefile
[add] https://crrev.com/bfea6c43400e53dbfe555a57c267d2897389e543/tests/futility/models/whitetip/setvars.sh
[add] https://crrev.com/bfea6c43400e53dbfe555a57c267d2897389e543/futility/updater_archive.c
[add] https://crrev.com/bfea6c43400e53dbfe555a57c267d2897389e543/futility/updater.c
[add] https://crrev.com/bfea6c43400e53dbfe555a57c267d2897389e543/tests/futility/test_update.sh
[add] https://crrev.com/bfea6c43400e53dbfe555a57c267d2897389e543/futility/updater.h
[modify] https://crrev.com/bfea6c43400e53dbfe555a57c267d2897389e543/futility/futility.h
[modify] https://crrev.com/bfea6c43400e53dbfe555a57c267d2897389e543/tests/futility/run_test_scripts.sh
[add] https://crrev.com/bfea6c43400e53dbfe555a57c267d2897389e543/futility/updater_quirks.c

Project Member

Comment 52 by bugdroid1@chromium.org, Nov 5

Labels: merge-merged-factory-nocturne-11066.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/534155d94bc79e422f644c5d828484aec507d544

commit 534155d94bc79e422f644c5d828484aec507d544
Author: Hung-Te Lin <hungte@chromium.org>
Date: Mon Nov 05 04:20:53 2018

futility: Add firmware updater as 'futility update'

The factory branches may need to run firmware updater extracted from
newer release images which relies on 'futility update' to run.
This change collects all related changes:

cabd2f8c futility: update: Fix update failure in factory mode due to wrong WP logic
ac8cb8dd futility: update: Add legacy option '--factory'
79bdb0cc futility: Remove FUTIL_STATIC build rules
d6f7c16b futility: update: Skip TPM check if tpm_fwver is not valid.
f6198074 futility: update: Preserve new sections: RO_PRESERVE and RW_PRESERVE
f67b991a futility: update: Preserve RO_FSG
ee96e741 futility: update: Preserve RW_ELOG
b07165b5 futility: update: Allow tpm_fwver=0 and allow --force to waive TPM check
5a5be0c7 futility: update: Revise error messages
ba73f35e futility: update: Refactor 'emulation' (--emulate).
eb166257 futility: update: Add --programmer to override flashrom programmer for servo
5fa5e3b9 futility: update: Refactor: move updater logic to 'updater.c'
243e2115 futility: updater: Refactor: move command line processing to cmd_update.c
e7bcda54 futility: updater: Refactor: localize temp files management
8810b089 futility: updater: Refactor: move quirks to 'updater_quirks.c'
a1bfb650 futility: updater: Add default quirks
a2b9e356 futility: updater: Add quirk 'daisy_snow_dual_model' for daisy_snow
ba30c93b futility: updater: Preserve SMMSTORE and add quirk 'eve_smm_store'
38d06701 futility: updater: Support reading main image from stdin
f1609b8c futility: updater: Revise verbosity and error messages
fabf760f futility: updater: Add ASPRINTF macro
7aa34302 futility: updater: Refactor function names
077026fd futility: updater: Add '--archive' to read from an archive or directory
f7c44a32 futility: updater: Refactor how arguments were configured
1847ba4f futility: updater: Add --manifest to scan and print archive info
a71e0ccd futility: updater: Allow patching rootkey and vblock files
2ae23df7 futility: updater: Change default model name to FWID platform name
3d615c91 futility: updater: Do not preserve GBB flags in --factory mode.
10b3d4ed futility: updater: Add '--model' and select images by system model
622c35aa futility: updater: Support white label from VPD and --signature_id
c6781206 futility: updater: Support --mode=output and --output_dir
fb947ae0 futility: update: Add `--host_only` argument
67d66f18 futility: updater: Support --repack and --unpack
1f489393 futility: updater: Fix model detection error

BUG= chromium:882445 
TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility
BRANCH=None

Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Change-Id: I6c14133f59561a422a190b17fa8ff7e79c45d953
Reviewed-on: https://chromium-review.googlesource.com/c/1317057

[modify] https://crrev.com/534155d94bc79e422f644c5d828484aec507d544/futility/cmd_update.c
[add] https://crrev.com/534155d94bc79e422f644c5d828484aec507d544/tests/futility/models/link/setvars.sh
[add] https://crrev.com/534155d94bc79e422f644c5d828484aec507d544/tests/futility/link.manifest.json
[add] https://crrev.com/534155d94bc79e422f644c5d828484aec507d544/tests/futility/models/peppy/setvars.sh
[modify] https://crrev.com/534155d94bc79e422f644c5d828484aec507d544/Makefile
[add] https://crrev.com/534155d94bc79e422f644c5d828484aec507d544/tests/futility/models/whitetip/setvars.sh
[add] https://crrev.com/534155d94bc79e422f644c5d828484aec507d544/futility/updater_archive.c
[add] https://crrev.com/534155d94bc79e422f644c5d828484aec507d544/futility/updater.c
[modify] https://crrev.com/534155d94bc79e422f644c5d828484aec507d544/tests/futility/test_update.sh
[add] https://crrev.com/534155d94bc79e422f644c5d828484aec507d544/futility/updater.h
[add] https://crrev.com/534155d94bc79e422f644c5d828484aec507d544/futility/updater_quirks.c

Project Member

Comment 53 by bugdroid1@chromium.org, Nov 5

Labels: merge-merged-factory-gru-9017.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/85f8e5245b1841d98f6fb2e5665c58f3b3e94ed4

commit 85f8e5245b1841d98f6fb2e5665c58f3b3e94ed4
Author: Hung-Te Lin <hungte@chromium.org>
Date: Mon Nov 05 05:47:00 2018

futility: Add firmware updater as 'futility update'

The factory branches may need to run firmware updater extracted from
newer release images which relies on 'futility update' to run.
This change collects all related changes:

6b231132 Makefile: Build utils for both dynamic and static version.
319f269b futility_s: add vbutil_firmware & vbutil_key
5c01f864 Makefile: Build futility without utillib to extend arch support
a6f548d1 Makefile: Add pthread library to the futility static build
bb351eff Revert "Makefile: Build futility without utillib to extend arch support"
b31e5f09 futility: Add 'Error' utility macro
eee33827 futility: Add 'update' command for updating firmware
22266d1f futility: cmd_update: Support loading image files by -i, -e, --pd_image
6d30a78a futility: cmd_update: Process FMAP and parse image version
035f0da2 futility: cmd_update: Access system firmware using external flashrom
039ad74d futility: cmd_update: Add '--emulate' option
e04be109 futility: cmd_update: Implement updater logic "FULL UPDATE".
0a368cac futility: cmd_update: Add "system property" and '--sys_props' to override
8017381e futility: cmd_update: Implement updater logic "RW UPDATE".
b77e2548 futility: cmd_update: Add 'mainfw_act' system property
6b1ead30 futility: cmd_update: Implement updater logic "TRY-RW" (--try)
eb0c9caf futility: cmd_update: Preserve image sections before update
9f27a900 futility: cmd_update: Check contents before starting to update
e25ffef4 futility: cmd_update: Use real system write protection status
f7b99d00 futility: cmd_update: Add vboot1 updater logic
b0f5a8f9 futility: cmd_update: Check platform compatibility before updating
c13d39fa futility: cmd_update: Check TPM key versions before updating
ede6a006 futility: cmd_update: Check RO and RW signing compatibility before updating
8b86ee5d futility: cmd_update: Add more legacy updater options
6a867bc4 futility: cmd_update: Correct updating logic for RW_LEGACY
27fc2478 futility: cmd_update: Preserve sections blocked by management engine
35c99021 futility: cmd_update: Revise debug and error message macro
86162304 futility: drop static build
b5a4e47c futility: cmd_update: Correctly handle error counter
50cf198c futility: cmd_update: Add new 'legacy' mode
da4e823f futility: cmd_update: Create and remove temporary files properly
1bb66a0c futility: cmd_update: Add --quirks for device-specific hacks
b4243c6b futility: cmd_update: Add quirk 'enlarge_image'
c3c9ae6a futility: cmd_update: Add quirk 'unlock_me_for_update'
382375b3 futility: cmd_update: Add quirk 'min_platform_version'
cabd2f8c futility: update: Fix update failure in factory mode due to wrong WP logic
ac8cb8dd futility: update: Add legacy option '--factory'
79bdb0cc futility: Remove FUTIL_STATIC build rules
d6f7c16b futility: update: Skip TPM check if tpm_fwver is not valid.
f6198074 futility: update: Preserve new sections: RO_PRESERVE and RW_PRESERVE
f67b991a futility: update: Preserve RO_FSG
ee96e741 futility: update: Preserve RW_ELOG
b07165b5 futility: update: Allow tpm_fwver=0 and allow --force to waive TPM check
5a5be0c7 futility: update: Revise error messages
ba73f35e futility: update: Refactor 'emulation' (--emulate).
eb166257 futility: update: Add --programmer to override flashrom programmer for servo
5fa5e3b9 futility: update: Refactor: move updater logic to 'updater.c'
243e2115 futility: updater: Refactor: move command line processing to cmd_update.c
e7bcda54 futility: updater: Refactor: localize temp files management
8810b089 futility: updater: Refactor: move quirks to 'updater_quirks.c'
a1bfb650 futility: updater: Add default quirks
a2b9e356 futility: updater: Add quirk 'daisy_snow_dual_model' for daisy_snow
ba30c93b futility: updater: Preserve SMMSTORE and add quirk 'eve_smm_store'
38d06701 futility: updater: Support reading main image from stdin
f1609b8c futility: updater: Revise verbosity and error messages
fabf760f futility: updater: Add ASPRINTF macro
7aa34302 futility: updater: Refactor function names
077026fd futility: updater: Add '--archive' to read from an archive or directory
f7c44a32 futility: updater: Refactor how arguments were configured
1847ba4f futility: updater: Add --manifest to scan and print archive info
a71e0ccd futility: updater: Allow patching rootkey and vblock files
2ae23df7 futility: updater: Change default model name to FWID platform name
3d615c91 futility: updater: Do not preserve GBB flags in --factory mode.
10b3d4ed futility: updater: Add '--model' and select images by system model
622c35aa futility: updater: Support white label from VPD and --signature_id
c6781206 futility: updater: Support --mode=output and --output_dir
fb947ae0 futility: update: Add `--host_only` argument
67d66f18 futility: updater: Support --repack and --unpack
1f489393 futility: updater: Fix model detection error

BUG= chromium:882445 
TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility
BRANCH=None

Change-Id: I6c14133f59561a422a190b17fa8ff7e79c45d953
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/1317061

[add] https://crrev.com/85f8e5245b1841d98f6fb2e5665c58f3b3e94ed4/futility/cmd_update.c
[add] https://crrev.com/85f8e5245b1841d98f6fb2e5665c58f3b3e94ed4/tests/futility/models/link/setvars.sh
[add] https://crrev.com/85f8e5245b1841d98f6fb2e5665c58f3b3e94ed4/tests/futility/link.manifest.json
[add] https://crrev.com/85f8e5245b1841d98f6fb2e5665c58f3b3e94ed4/tests/futility/models/peppy/setvars.sh
[modify] https://crrev.com/85f8e5245b1841d98f6fb2e5665c58f3b3e94ed4/Makefile
[add] https://crrev.com/85f8e5245b1841d98f6fb2e5665c58f3b3e94ed4/tests/futility/models/whitetip/setvars.sh
[add] https://crrev.com/85f8e5245b1841d98f6fb2e5665c58f3b3e94ed4/futility/updater_archive.c
[add] https://crrev.com/85f8e5245b1841d98f6fb2e5665c58f3b3e94ed4/futility/updater.c
[add] https://crrev.com/85f8e5245b1841d98f6fb2e5665c58f3b3e94ed4/tests/futility/test_update.sh
[add] https://crrev.com/85f8e5245b1841d98f6fb2e5665c58f3b3e94ed4/futility/updater.h
[modify] https://crrev.com/85f8e5245b1841d98f6fb2e5665c58f3b3e94ed4/futility/futility.h
[modify] https://crrev.com/85f8e5245b1841d98f6fb2e5665c58f3b3e94ed4/tests/futility/run_test_scripts.sh
[add] https://crrev.com/85f8e5245b1841d98f6fb2e5665c58f3b3e94ed4/futility/updater_quirks.c

Project Member

Comment 54 by bugdroid1@chromium.org, Nov 5

Labels: merge-merged-factory-eve-9667.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/aa262da51e94bac4e3c3ca019888a51c29e4ac0f

commit aa262da51e94bac4e3c3ca019888a51c29e4ac0f
Author: Hung-Te Lin <hungte@chromium.org>
Date: Mon Nov 05 05:47:03 2018

futility: Add firmware updater as 'futility update'

The factory branches may need to run firmware updater extracted from
newer release images which relies on 'futility update' to run.
This change collects all related changes:

6b231132 Makefile: Build utils for both dynamic and static version.
319f269b futility_s: add vbutil_firmware & vbutil_key
5c01f864 Makefile: Build futility without utillib to extend arch support
a6f548d1 Makefile: Add pthread library to the futility static build
bb351eff Revert "Makefile: Build futility without utillib to extend arch support"
b31e5f09 futility: Add 'Error' utility macro
eee33827 futility: Add 'update' command for updating firmware
22266d1f futility: cmd_update: Support loading image files by -i, -e, --pd_image
6d30a78a futility: cmd_update: Process FMAP and parse image version
035f0da2 futility: cmd_update: Access system firmware using external flashrom
039ad74d futility: cmd_update: Add '--emulate' option
e04be109 futility: cmd_update: Implement updater logic "FULL UPDATE".
0a368cac futility: cmd_update: Add "system property" and '--sys_props' to override
8017381e futility: cmd_update: Implement updater logic "RW UPDATE".
b77e2548 futility: cmd_update: Add 'mainfw_act' system property
6b1ead30 futility: cmd_update: Implement updater logic "TRY-RW" (--try)
eb0c9caf futility: cmd_update: Preserve image sections before update
9f27a900 futility: cmd_update: Check contents before starting to update
e25ffef4 futility: cmd_update: Use real system write protection status
f7b99d00 futility: cmd_update: Add vboot1 updater logic
b0f5a8f9 futility: cmd_update: Check platform compatibility before updating
c13d39fa futility: cmd_update: Check TPM key versions before updating
ede6a006 futility: cmd_update: Check RO and RW signing compatibility before updating
8b86ee5d futility: cmd_update: Add more legacy updater options
6a867bc4 futility: cmd_update: Correct updating logic for RW_LEGACY
27fc2478 futility: cmd_update: Preserve sections blocked by management engine
35c99021 futility: cmd_update: Revise debug and error message macro
86162304 futility: drop static build
b5a4e47c futility: cmd_update: Correctly handle error counter
50cf198c futility: cmd_update: Add new 'legacy' mode
da4e823f futility: cmd_update: Create and remove temporary files properly
1bb66a0c futility: cmd_update: Add --quirks for device-specific hacks
b4243c6b futility: cmd_update: Add quirk 'enlarge_image'
c3c9ae6a futility: cmd_update: Add quirk 'unlock_me_for_update'
382375b3 futility: cmd_update: Add quirk 'min_platform_version'
cabd2f8c futility: update: Fix update failure in factory mode due to wrong WP logic
ac8cb8dd futility: update: Add legacy option '--factory'
79bdb0cc futility: Remove FUTIL_STATIC build rules
d6f7c16b futility: update: Skip TPM check if tpm_fwver is not valid.
f6198074 futility: update: Preserve new sections: RO_PRESERVE and RW_PRESERVE
f67b991a futility: update: Preserve RO_FSG
ee96e741 futility: update: Preserve RW_ELOG
b07165b5 futility: update: Allow tpm_fwver=0 and allow --force to waive TPM check
5a5be0c7 futility: update: Revise error messages
ba73f35e futility: update: Refactor 'emulation' (--emulate).
eb166257 futility: update: Add --programmer to override flashrom programmer for servo
5fa5e3b9 futility: update: Refactor: move updater logic to 'updater.c'
243e2115 futility: updater: Refactor: move command line processing to cmd_update.c
e7bcda54 futility: updater: Refactor: localize temp files management
8810b089 futility: updater: Refactor: move quirks to 'updater_quirks.c'
a1bfb650 futility: updater: Add default quirks
a2b9e356 futility: updater: Add quirk 'daisy_snow_dual_model' for daisy_snow
ba30c93b futility: updater: Preserve SMMSTORE and add quirk 'eve_smm_store'
38d06701 futility: updater: Support reading main image from stdin
f1609b8c futility: updater: Revise verbosity and error messages
fabf760f futility: updater: Add ASPRINTF macro
7aa34302 futility: updater: Refactor function names
077026fd futility: updater: Add '--archive' to read from an archive or directory
f7c44a32 futility: updater: Refactor how arguments were configured
1847ba4f futility: updater: Add --manifest to scan and print archive info
a71e0ccd futility: updater: Allow patching rootkey and vblock files
2ae23df7 futility: updater: Change default model name to FWID platform name
3d615c91 futility: updater: Do not preserve GBB flags in --factory mode.
10b3d4ed futility: updater: Add '--model' and select images by system model
622c35aa futility: updater: Support white label from VPD and --signature_id
c6781206 futility: updater: Support --mode=output and --output_dir
fb947ae0 futility: update: Add `--host_only` argument
67d66f18 futility: updater: Support --repack and --unpack
1f489393 futility: updater: Fix model detection error

BUG= chromium:882445 
TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility
BRANCH=None

Change-Id: I6c14133f59561a422a190b17fa8ff7e79c45d953
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/1317060

[add] https://crrev.com/aa262da51e94bac4e3c3ca019888a51c29e4ac0f/futility/cmd_update.c
[add] https://crrev.com/aa262da51e94bac4e3c3ca019888a51c29e4ac0f/tests/futility/models/link/setvars.sh
[add] https://crrev.com/aa262da51e94bac4e3c3ca019888a51c29e4ac0f/tests/futility/link.manifest.json
[add] https://crrev.com/aa262da51e94bac4e3c3ca019888a51c29e4ac0f/tests/futility/models/peppy/setvars.sh
[modify] https://crrev.com/aa262da51e94bac4e3c3ca019888a51c29e4ac0f/Makefile
[add] https://crrev.com/aa262da51e94bac4e3c3ca019888a51c29e4ac0f/tests/futility/models/whitetip/setvars.sh
[add] https://crrev.com/aa262da51e94bac4e3c3ca019888a51c29e4ac0f/futility/updater_archive.c
[add] https://crrev.com/aa262da51e94bac4e3c3ca019888a51c29e4ac0f/futility/updater.c
[add] https://crrev.com/aa262da51e94bac4e3c3ca019888a51c29e4ac0f/tests/futility/test_update.sh
[add] https://crrev.com/aa262da51e94bac4e3c3ca019888a51c29e4ac0f/futility/updater.h
[modify] https://crrev.com/aa262da51e94bac4e3c3ca019888a51c29e4ac0f/futility/futility.h
[modify] https://crrev.com/aa262da51e94bac4e3c3ca019888a51c29e4ac0f/tests/futility/run_test_scripts.sh
[add] https://crrev.com/aa262da51e94bac4e3c3ca019888a51c29e4ac0f/futility/updater_quirks.c

Project Member

Comment 55 by bugdroid1@chromium.org, Nov 7

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/3513de232b21f43546d207073e074a5017d4b363

commit 3513de232b21f43546d207073e074a5017d4b363
Author: Gwendal Grignou <gwendal@chromium.org>
Date: Wed Nov 07 14:35:00 2018

Revert "perl: add -j1 to not compile in parallel"

This change is not needed anymore, as perl-5.24 already have
that setting in its ebuild.

See https://bugs.gentoo.org/show_bug.cgi?id=604072 for details.
And
https://chromium.googlesource.com/chromiumos/overlays/portage-stable/+/stabilize-11217.B/dev-lang/perl/perl-5.24.4.ebuild#289

This reverts commit 5f8b538e54373422de866a733021cb067c6b8cef.

BUG= chromium:882445 ,chromium:901727
TEST=Check -j1 is still applied while compiling.

Change-Id: I927407159a99ae3f0d5bd9ba53cd5511c6f96284
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1320049
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[delete] https://crrev.com/bd5190e7b0424cde1f0f804bd30f4b7f56e03d7c/chromeos/config/env/dev-lang/perl

Project Member

Comment 56 by bugdroid1@chromium.org, Nov 16

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/7342b65dbe57d55eb90f6f9974bb9649214798af

commit 7342b65dbe57d55eb90f6f9974bb9649214798af
Author: Hung-Te Lin <hungte@chromium.org>
Date: Fri Nov 16 02:49:33 2018

cros-firmware: Remove default updater script

The pack_firmware script also has its own default value.  We should
specify --script only if CROS_FIRMWARE_SCRIPT is provided.

BUG= chromium:882445 
TEST=emerge-$BOARD chromeos-firmware-$BOARD

Change-Id: I6f88708f4658afa2f1a6dd7bb12881c0228b9f10
Reviewed-on: https://chromium-review.googlesource.com/1326301
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/7342b65dbe57d55eb90f6f9974bb9649214798af/eclass/cros-firmware.eclass

Project Member

Comment 57 by bugdroid1@chromium.org, Nov 16

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/2d2cf951d61b4b9ba7cac69ccc9bb55865dbcf90

commit 2d2cf951d61b4b9ba7cac69ccc9bb55865dbcf90
Author: Hung-Te Lin <hungte@chromium.org>
Date: Fri Nov 16 23:10:53 2018

cros-firmware: Revise DEPEND and RDEPEND

Clean up and move dependencies in a better way.

BUG= chromium:882445 
TEST=emerge-$BOARD chromeos-firmware-$BOARD

Change-Id: Ibf326517e224a0c51bdac7abfeb5affd00bba989
Reviewed-on: https://chromium-review.googlesource.com/1328404
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/2d2cf951d61b4b9ba7cac69ccc9bb55865dbcf90/eclass/cros-firmware.eclass

Project Member

Comment 58 by bugdroid1@chromium.org, Nov 16

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/firmware/+/c3294a474d1126486e312a2dc505bb96ce402b2f

commit c3294a474d1126486e312a2dc505bb96ce402b2f
Author: Hung-Te Lin <hungte@chromium.org>
Date: Fri Nov 16 23:10:59 2018

pack_firmware: Remove --remove_inactive_updaters

Since CL:1313788, pack/dist now only contains single file for each
updater (i.e., removed all dependency) so we don't need to worry about
removing inactive updaters any more; just copy the script needed.
So --remove_inactive_updaters is no longer needed.

BUG= chromium:882445 
TEST=./pack_firmware_unittest.py; ./pack_firmware_functest.py

Change-Id: Ic3ed838141578b48c9a9b8e27d31c21ceabbdefb
Reviewed-on: https://chromium-review.googlesource.com/1327864
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>

[modify] https://crrev.com/c3294a474d1126486e312a2dc505bb96ce402b2f/pack_firmware_unittest.py
[modify] https://crrev.com/c3294a474d1126486e312a2dc505bb96ce402b2f/pack_firmware.py

Project Member

Comment 59 by bugdroid1@chromium.org, Nov 21

Labels: merge-merged-factory-oak-8182.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/cb146066a1b88e748f540b424fa7b1227fa25cf4

commit cb146066a1b88e748f540b424fa7b1227fa25cf4
Author: Hung-Te Lin <hungte@chromium.org>
Date: Wed Nov 21 06:46:44 2018

futility: Add firmware updater as 'futility update'

The factory branches may need to run firmware updater extracted from
newer release images which relies on 'futility update' to run.
This change collects all related changes:

85974d01 futility: Add 'Error' utility macro
eee33827 futility: Add 'update' command for updating firmware
22266d1f futility: cmd_update: Support loading image files by -i, -e, --pd_image
6d30a78a futility: cmd_update: Process FMAP and parse image version
035f0da2 futility: cmd_update: Access system firmware using external flashrom
039ad74d futility: cmd_update: Add '--emulate' option
e04be109 futility: cmd_update: Implement updater logic "FULL UPDATE".
0a368cac futility: cmd_update: Add "system property" and '--sys_props' to override
8017381e futility: cmd_update: Implement updater logic "RW UPDATE".
b77e2548 futility: cmd_update: Add 'mainfw_act' system property
6b1ead30 futility: cmd_update: Implement updater logic "TRY-RW" (--try)
eb0c9caf futility: cmd_update: Preserve image sections before update
9f27a900 futility: cmd_update: Check contents before starting to update
e25ffef4 futility: cmd_update: Use real system write protection status
f7b99d00 futility: cmd_update: Add vboot1 updater logic
b0f5a8f9 futility: cmd_update: Check platform compatibility before updating
c13d39fa futility: cmd_update: Check TPM key versions before updating
ede6a006 futility: cmd_update: Check RO and RW signing compatibility before updating
8b86ee5d futility: cmd_update: Add more legacy updater options
6a867bc4 futility: cmd_update: Correct updating logic for RW_LEGACY
27fc2478 futility: cmd_update: Preserve sections blocked by management engine
35c99021 futility: cmd_update: Revise debug and error message macro
b5a4e47c futility: cmd_update: Correctly handle error counter
50cf198c futility: cmd_update: Add new 'legacy' mode
da4e823f futility: cmd_update: Create and remove temporary files properly
1bb66a0c futility: cmd_update: Add --quirks for device-specific hacks
b4243c6b futility: cmd_update: Add quirk 'enlarge_image'
c3c9ae6a futility: cmd_update: Add quirk 'unlock_me_for_update'
382375b3 futility: cmd_update: Add quirk 'min_platform_version'
cabd2f8c futility: update: Fix update failure in factory mode due to wrong WP logic
ac8cb8dd futility: update: Add legacy option '--factory'
79bdb0cc futility: Remove FUTIL_STATIC build rules
d6f7c16b futility: update: Skip TPM check if tpm_fwver is not valid.
f6198074 futility: update: Preserve new sections: RO_PRESERVE and RW_PRESERVE
f67b991a futility: update: Preserve RO_FSG
ee96e741 futility: update: Preserve RW_ELOG
b07165b5 futility: update: Allow tpm_fwver=0 and allow --force to waive TPM check
5a5be0c7 futility: update: Revise error messages
ba73f35e futility: update: Refactor 'emulation' (--emulate).
eb166257 futility: update: Add --programmer to override flashrom programmer for servo
5fa5e3b9 futility: update: Refactor: move updater logic to 'updater.c'
243e2115 futility: updater: Refactor: move command line processing to cmd_update.c
e7bcda54 futility: updater: Refactor: localize temp files management
8810b089 futility: updater: Refactor: move quirks to 'updater_quirks.c'
a1bfb650 futility: updater: Add default quirks
a2b9e356 futility: updater: Add quirk 'daisy_snow_dual_model' for daisy_snow
ba30c93b futility: updater: Preserve SMMSTORE and add quirk 'eve_smm_store'
38d06701 futility: updater: Support reading main image from stdin
f1609b8c futility: updater: Revise verbosity and error messages
fabf760f futility: updater: Add ASPRINTF macro
7aa34302 futility: updater: Refactor function names
077026fd futility: updater: Add '--archive' to read from an archive or directory
f7c44a32 futility: updater: Refactor how arguments were configured
1847ba4f futility: updater: Add --manifest to scan and print archive info
a71e0ccd futility: updater: Allow patching rootkey and vblock files
2ae23df7 futility: updater: Change default model name to FWID platform name
3d615c91 futility: updater: Do not preserve GBB flags in --factory mode.
10b3d4ed futility: updater: Add '--model' and select images by system model
622c35aa futility: updater: Support white label from VPD and --signature_id
c6781206 futility: updater: Support --mode=output and --output_dir
fb947ae0 futility: update: Add `--host_only` argument
67d66f18 futility: updater: Support --repack and --unpack
1f489393 futility: updater: Fix model detection error

BUG= chromium:882445 
TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility
BRANCH=None

Change-Id: I6c14133f59561a422a190b17fa8ff7e79c45d953
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/1345612

[add] https://crrev.com/cb146066a1b88e748f540b424fa7b1227fa25cf4/futility/cmd_update.c
[add] https://crrev.com/cb146066a1b88e748f540b424fa7b1227fa25cf4/tests/futility/models/link/setvars.sh
[add] https://crrev.com/cb146066a1b88e748f540b424fa7b1227fa25cf4/tests/futility/link.manifest.json
[add] https://crrev.com/cb146066a1b88e748f540b424fa7b1227fa25cf4/tests/futility/models/peppy/setvars.sh
[modify] https://crrev.com/cb146066a1b88e748f540b424fa7b1227fa25cf4/Makefile
[add] https://crrev.com/cb146066a1b88e748f540b424fa7b1227fa25cf4/tests/futility/models/whitetip/setvars.sh
[add] https://crrev.com/cb146066a1b88e748f540b424fa7b1227fa25cf4/futility/updater_archive.c
[add] https://crrev.com/cb146066a1b88e748f540b424fa7b1227fa25cf4/futility/updater.c
[add] https://crrev.com/cb146066a1b88e748f540b424fa7b1227fa25cf4/tests/futility/test_update.sh
[add] https://crrev.com/cb146066a1b88e748f540b424fa7b1227fa25cf4/futility/updater.h
[modify] https://crrev.com/cb146066a1b88e748f540b424fa7b1227fa25cf4/futility/futility.h
[modify] https://crrev.com/cb146066a1b88e748f540b424fa7b1227fa25cf4/tests/futility/run_test_scripts.sh
[add] https://crrev.com/cb146066a1b88e748f540b424fa7b1227fa25cf4/futility/updater_quirks.c

Project Member

Comment 60 by bugdroid1@chromium.org, Nov 23

Labels: merge-merged-factory-reef-8811.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/8d840dd39a674eaf78b0a154c7c5267141ae182e

commit 8d840dd39a674eaf78b0a154c7c5267141ae182e
Author: Hung-Te Lin <hungte@chromium.org>
Date: Fri Nov 23 00:15:33 2018

futility: Add firmware updater as 'futility update'

The factory branches may need to run firmware updater extracted from
newer release images which relies on 'futility update' to run.
This change collects all related changes:

85974d01 futility: Add 'Error' utility macro
eee33827 futility: Add 'update' command for updating firmware
22266d1f futility: cmd_update: Support loading image files by -i, -e, --pd_image
6d30a78a futility: cmd_update: Process FMAP and parse image version
035f0da2 futility: cmd_update: Access system firmware using external flashrom
039ad74d futility: cmd_update: Add '--emulate' option
e04be109 futility: cmd_update: Implement updater logic "FULL UPDATE".
0a368cac futility: cmd_update: Add "system property" and '--sys_props' to override
8017381e futility: cmd_update: Implement updater logic "RW UPDATE".
b77e2548 futility: cmd_update: Add 'mainfw_act' system property
6b1ead30 futility: cmd_update: Implement updater logic "TRY-RW" (--try)
eb0c9caf futility: cmd_update: Preserve image sections before update
9f27a900 futility: cmd_update: Check contents before starting to update
e25ffef4 futility: cmd_update: Use real system write protection status
f7b99d00 futility: cmd_update: Add vboot1 updater logic
b0f5a8f9 futility: cmd_update: Check platform compatibility before updating
c13d39fa futility: cmd_update: Check TPM key versions before updating
ede6a006 futility: cmd_update: Check RO and RW signing compatibility before updating
8b86ee5d futility: cmd_update: Add more legacy updater options
6a867bc4 futility: cmd_update: Correct updating logic for RW_LEGACY
27fc2478 futility: cmd_update: Preserve sections blocked by management engine
35c99021 futility: cmd_update: Revise debug and error message macro
b5a4e47c futility: cmd_update: Correctly handle error counter
50cf198c futility: cmd_update: Add new 'legacy' mode
da4e823f futility: cmd_update: Create and remove temporary files properly
1bb66a0c futility: cmd_update: Add --quirks for device-specific hacks
b4243c6b futility: cmd_update: Add quirk 'enlarge_image'
c3c9ae6a futility: cmd_update: Add quirk 'unlock_me_for_update'
382375b3 futility: cmd_update: Add quirk 'min_platform_version'
cabd2f8c futility: update: Fix update failure in factory mode due to wrong WP logic
ac8cb8dd futility: update: Add legacy option '--factory'
d6f7c16b futility: update: Skip TPM check if tpm_fwver is not valid.
f6198074 futility: update: Preserve new sections: RO_PRESERVE and RW_PRESERVE
f67b991a futility: update: Preserve RO_FSG
ee96e741 futility: update: Preserve RW_ELOG
b07165b5 futility: update: Allow tpm_fwver=0 and allow --force to waive TPM check
5a5be0c7 futility: update: Revise error messages
ba73f35e futility: update: Refactor 'emulation' (--emulate).
eb166257 futility: update: Add --programmer to override flashrom programmer for servo
5fa5e3b9 futility: update: Refactor: move updater logic to 'updater.c'
243e2115 futility: updater: Refactor: move command line processing to cmd_update.c
e7bcda54 futility: updater: Refactor: localize temp files management
8810b089 futility: updater: Refactor: move quirks to 'updater_quirks.c'
a1bfb650 futility: updater: Add default quirks
a2b9e356 futility: updater: Add quirk 'daisy_snow_dual_model' for daisy_snow
ba30c93b futility: updater: Preserve SMMSTORE and add quirk 'eve_smm_store'
38d06701 futility: updater: Support reading main image from stdin
f1609b8c futility: updater: Revise verbosity and error messages
fabf760f futility: updater: Add ASPRINTF macro
7aa34302 futility: updater: Refactor function names
077026fd futility: updater: Add '--archive' to read from an archive or directory
f7c44a32 futility: updater: Refactor how arguments were configured
1847ba4f futility: updater: Add --manifest to scan and print archive info
a71e0ccd futility: updater: Allow patching rootkey and vblock files
2ae23df7 futility: updater: Change default model name to FWID platform name
3d615c91 futility: updater: Do not preserve GBB flags in --factory mode.
10b3d4ed futility: updater: Add '--model' and select images by system model
622c35aa futility: updater: Support white label from VPD and --signature_id
c6781206 futility: updater: Support --mode=output and --output_dir
fb947ae0 futility: update: Add `--host_only` argument
67d66f18 futility: updater: Support --repack and --unpack
1f489393 futility: updater: Fix model detection error

BUG= chromium:882445 
TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility
BRANCH=None

Change-Id: I6c14133f59561a422a190b17fa8ff7e79c45d953
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/1348510

[add] https://crrev.com/8d840dd39a674eaf78b0a154c7c5267141ae182e/futility/cmd_update.c
[add] https://crrev.com/8d840dd39a674eaf78b0a154c7c5267141ae182e/tests/futility/models/link/setvars.sh
[add] https://crrev.com/8d840dd39a674eaf78b0a154c7c5267141ae182e/tests/futility/link.manifest.json
[add] https://crrev.com/8d840dd39a674eaf78b0a154c7c5267141ae182e/tests/futility/models/peppy/setvars.sh
[modify] https://crrev.com/8d840dd39a674eaf78b0a154c7c5267141ae182e/Makefile
[add] https://crrev.com/8d840dd39a674eaf78b0a154c7c5267141ae182e/tests/futility/models/whitetip/setvars.sh
[add] https://crrev.com/8d840dd39a674eaf78b0a154c7c5267141ae182e/futility/updater_archive.c
[add] https://crrev.com/8d840dd39a674eaf78b0a154c7c5267141ae182e/futility/updater.c
[add] https://crrev.com/8d840dd39a674eaf78b0a154c7c5267141ae182e/tests/futility/test_update.sh
[add] https://crrev.com/8d840dd39a674eaf78b0a154c7c5267141ae182e/futility/updater.h
[modify] https://crrev.com/8d840dd39a674eaf78b0a154c7c5267141ae182e/futility/futility.h
[modify] https://crrev.com/8d840dd39a674eaf78b0a154c7c5267141ae182e/tests/futility/run_test_scripts.sh
[add] https://crrev.com/8d840dd39a674eaf78b0a154c7c5267141ae182e/futility/updater_quirks.c

Labels: -merge-merged-factory-oak-8182.B -merge-merged-factory-reef-8811.B -merge-merged-factory-gru-9017.B -merge-merged-factory-eve-9667.B -merge-merged-factory-coral-10122.B -merge-merged-factory-scarlet-10211.B -merge-merged-factory-fizz-10167.B -merge-merged-factory-soraka-10323.39.B -merge-merged-factory-poppy-10504.B -merge-merged-factory-nami-10715.B -merge-merged-factory-nocturne-11066.B
Project Member

Comment 62 by bugdroid1@chromium.org, Dec 1

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/2c9ae44c63e621b2929c19532b83344f82b629f8

commit 2c9ae44c63e621b2929c19532b83344f82b629f8
Author: Hung-Te Lin <hungte@chromium.org>
Date: Sat Dec 01 21:19:07 2018

cros-firmware: Remove --extra, --script (CROS_FIRMWARE_SCRIPT) and --root

Since all boards are using updater5 and we don't need board customization
scripts anymore, there is no need to pass --root, --script and --extra.

BUG= chromium:882445 
TEST=emerge-$BOARD chromeos-firmware-$BOARD

Change-Id: I07ab9cf99b0f8cfcffcd3e5646811994b10be3ea
Reviewed-on: https://chromium-review.googlesource.com/1328405
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/2c9ae44c63e621b2929c19532b83344f82b629f8/eclass/cros-firmware.eclass

M73 has started and we're in final stage.

- All boards are now using "futility update"
- M73 will remove --script, --extra, and updater scripts (updater4.sh, updater5.sh)
- Migrate autotest and tests using setvars / SFX header to use --manifest.
- It is possible, but not necessary, to enable and move to the ZIP based format (sfx2).

Project Member

Comment 64 by bugdroid1@chromium.org, Dec 5

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/firmware/+/f37965ce5062f50a8e17245536bf4f57404068c5

commit f37965ce5062f50a8e17245536bf4f57404068c5
Author: Hung-Te Lin <hungte@chromium.org>
Date: Wed Dec 05 12:22:28 2018

pack: sfx2: Use zip to repack due to libzip not preserving SFX.

It is found that libzip does not preserve SFX when updating an archive.
This implies when doing --repack, the new updater will become an ZIP
archive without SFX and not executable.

The solution for now is to always re-create the archive using zip.
Also due to that, we have to update the time stamp just like sfx v1
(which was previously done by futility update --repack).

BUG= chromium:882445 
TEST=./pack_firmware_unittest.py; ./pack_firmware_functest.py

Change-Id: Ie30b85fd0fd024d85042bd8863f90cc9961cd1ec
Reviewed-on: https://chromium-review.googlesource.com/1343624
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>

[modify] https://crrev.com/f37965ce5062f50a8e17245536bf4f57404068c5/pack/sfx2.sh

Project Member

Comment 65 by bugdroid1@chromium.org, Dec 6

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/firmware/+/6bf413f1aa5ed3822aff4b6575079583b2bc33f4

commit 6bf413f1aa5ed3822aff4b6575079583b2bc33f4
Author: Hung-Te Lin <hungte@chromium.org>
Date: Thu Dec 06 22:35:16 2018

pack_firmware: Remove script-based updaters

The script-based updaters (updater4.sh, updater5.sh) are no longer used
by anyone since the logic is now always in `futility update` and
directly invoked by SFX program.

BUG= chromium:882445 
TEST=./pack_firmware_unittest.py; ./pack_firmware_functest.py

Change-Id: I52c85e32bb48c0b3b836b11a7b9b170d3cb84728
Reviewed-on: https://chromium-review.googlesource.com/1278550
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Evan Hernandez <evanhernandez@chromium.org>

[delete] https://crrev.com/319cf5ca68dc8d154b1606e80a3413a136c19a06/pack/dist/updater4.sh
[delete] https://crrev.com/319cf5ca68dc8d154b1606e80a3413a136c19a06/pack/dist/updater5.sh

Project Member

Comment 66 by bugdroid1@chromium.org, Dec 6

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/firmware/+/fca793af70ef53aeedff183883a2a40143dce3a6

commit fca793af70ef53aeedff183883a2a40143dce3a6
Author: Hung-Te Lin <hungte@chromium.org>
Date: Thu Dec 06 22:35:15 2018

pack_firmware: Remove 'extra'

The 'extra' argument has been deprecated so we can manage firmware
updater package in a better way, not allowing arbitrary customization.

BUG= chromium:882445 
TEST=./pack_firmware_unittest.py; ./pack_firmware_functest.py
CQ-DEPEND=CL:1328405

Change-Id: I60d1a1b34b6be15d11286e6bbf8600004f88d829
Reviewed-on: https://chromium-review.googlesource.com/1278552
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Evan Hernandez <evanhernandez@chromium.org>

[delete] https://crrev.com/f37965ce5062f50a8e17245536bf4f57404068c5/test/extra/fake_extra_tool
[delete] https://crrev.com/f37965ce5062f50a8e17245536bf4f57404068c5/test/usr/sbin/ectool
[modify] https://crrev.com/fca793af70ef53aeedff183883a2a40143dce3a6/pack_firmware_unittest.py
[delete] https://crrev.com/f37965ce5062f50a8e17245536bf4f57404068c5/test/reef-files/reef_fake_extra
[delete] https://crrev.com/f37965ce5062f50a8e17245536bf4f57404068c5/test/faketool
[modify] https://crrev.com/fca793af70ef53aeedff183883a2a40143dce3a6/pack_firmware_functest.py
[modify] https://crrev.com/fca793af70ef53aeedff183883a2a40143dce3a6/pack_firmware.py
[modify] https://crrev.com/fca793af70ef53aeedff183883a2a40143dce3a6/README.md

Project Member

Comment 67 by bugdroid1@chromium.org, Dec 6

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/firmware/+/0b616e1e0ada1d16d089f251da2bdebee6b2023b

commit 0b616e1e0ada1d16d089f251da2bdebee6b2023b
Author: Hung-Te Lin <hungte@chromium.org>
Date: Thu Dec 06 22:35:15 2018

pack_firmware: Remove --script

The --script has been removed in CL:1328405 that all updaters will be
packaged in same way, and we will remove the script in follow up CLs.

BUG= chromium:882445 
TEST=./pack_firmware_unittest.py; ./pack_firmware_functest.py
CQ-DEPEND=CL:1328405

Change-Id: Ic59a97ec6d7486b322d056fd0f4a985f781ea9f0
Reviewed-on: https://chromium-review.googlesource.com/1328421
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Evan Hernandez <evanhernandez@chromium.org>

[modify] https://crrev.com/0b616e1e0ada1d16d089f251da2bdebee6b2023b/pack_firmware_functest.py
[modify] https://crrev.com/0b616e1e0ada1d16d089f251da2bdebee6b2023b/pack_firmware.py
[modify] https://crrev.com/0b616e1e0ada1d16d089f251da2bdebee6b2023b/pack_firmware_unittest.py

Project Member

Comment 68 by bugdroid1@chromium.org, Dec 6

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/firmware/+/319cf5ca68dc8d154b1606e80a3413a136c19a06

commit 319cf5ca68dc8d154b1606e80a3413a136c19a06
Author: Hung-Te Lin <hungte@chromium.org>
Date: Thu Dec 06 22:35:16 2018

pack_firmware: Use futility directly and stop packing updater*.sh

The 'futility update' has now fully replaced update*.sh so we don't need
to have the stub script anymore.

BUG= chromium:882445 
TEST=./pack_firmware_unittest.py; ./pack_firmware_functest.py

Change-Id: I606503dcd0ceadc3311659b2e0df0b84febf4112
Reviewed-on: https://chromium-review.googlesource.com/1343618
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Evan Hernandez <evanhernandez@chromium.org>

[modify] https://crrev.com/319cf5ca68dc8d154b1606e80a3413a136c19a06/pack_firmware_functest.py
[modify] https://crrev.com/319cf5ca68dc8d154b1606e80a3413a136c19a06/pack_firmware.py
[modify] https://crrev.com/319cf5ca68dc8d154b1606e80a3413a136c19a06/pack/sfx.sh
[modify] https://crrev.com/319cf5ca68dc8d154b1606e80a3413a136c19a06/README.md

Project Member

Comment 69 by bugdroid1@chromium.org, Dec 8

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/firmware/+/717f40e7de2c640de7607f6dd1b9f3f0934f94f0

commit 717f40e7de2c640de7607f6dd1b9f3f0934f94f0
Author: Hung-Te Lin <hungte@chromium.org>
Date: Sat Dec 08 19:23:21 2018

pack: sfx: Remove 'VERSION.md5' from package content.

The VERSION.md5 should be replaced by archive meta data. For shar format,
we can unpack and do 'md5sum'. For ZIP format, the 'unzip -l' should
work. In either cases, we don't want to put a 'VERSION.md5' file in
package contents.

BUG= chromium:882445 
TEST=./pack_firmware_unittest.py; ./pack_firmware_functest.py

Change-Id: I357cfb0247e0fcd3dadb4639cb3e05af4fd9b1eb
Reviewed-on: https://chromium-review.googlesource.com/1356927
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Evan Hernandez <evanhernandez@chromium.org>

[modify] https://crrev.com/717f40e7de2c640de7607f6dd1b9f3f0934f94f0/pack/sfx2.sh
[modify] https://crrev.com/717f40e7de2c640de7607f6dd1b9f3f0934f94f0/pack_firmware_functest.py
[modify] https://crrev.com/717f40e7de2c640de7607f6dd1b9f3f0934f94f0/pack/sfx.sh

Project Member

Comment 70 by bugdroid1@chromium.org, Dec 9

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/firmware/+/5e0e4a64b843153c197c7b4dece8f1d82144ef88

commit 5e0e4a64b843153c197c7b4dece8f1d82144ef88
Author: Hung-Te Lin <hungte@chromium.org>
Date: Sun Dec 09 08:48:22 2018

pack_firmware: Stop putting image version info in SFX header

The `futility` now has a much better way of reporting image versions and
contents using `--manifest`. We should stop keeping version information
in SFX, which was hard to maintain when updating updater contents.

BUG= chromium:882445 
TEST=./pack_firmware_unittest.py; ./pack_firmware_functest.py

Change-Id: Ic57f98cbeb01402c03c3d6348cdf466940cb0de1
Reviewed-on: https://chromium-review.googlesource.com/1343619
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Evan Hernandez <evanhernandez@chromium.org>

[modify] https://crrev.com/5e0e4a64b843153c197c7b4dece8f1d82144ef88/pack_firmware_utils.py
[modify] https://crrev.com/5e0e4a64b843153c197c7b4dece8f1d82144ef88/pack_firmware_functest.py
[modify] https://crrev.com/5e0e4a64b843153c197c7b4dece8f1d82144ef88/pack_firmware_unittest.py
[modify] https://crrev.com/5e0e4a64b843153c197c7b4dece8f1d82144ef88/pack_firmware.py
[modify] https://crrev.com/5e0e4a64b843153c197c7b4dece8f1d82144ef88/pack/sfx.sh

Project Member

Comment 71 by bugdroid1@chromium.org, Dec 17

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/chromeos/cros-signing/+/ce0415e7f24e329afcc13fd991f80f7aa94fd210

commit ce0415e7f24e329afcc13fd991f80f7aa94fd210
Author: Hung-Te Lin <hungte@chromium.org>
Date: Mon Dec 17 05:42:49 2018

signer bot is updated so the manifest output is now stable.

I'll slowly start converting autotest/* to grab version info from manifest.
Status: Fixed (was: Started)
The "migration to updater5" is completed.

Updating autotest/* to manifest can be considered as a different improvement, also the change of ZIP based updater can be tracked in different issues.

Close the migration issue now. We're now always running updater5!

Sign in to add a comment