Move firmware updater logic to vboot_reference |
||||||||||||||||
Issue descriptionThe firmware updater (src/platform/firmware) had a long history of being shell script + self-extraction bundle. That gives us lots of flexibility and convenient, but also made it hard to maintain or compatibility issues like not able to do 32->64 AU, dependency of userland, ... etc. Recently the updater v3 Chromebooks are going EOL, which means we can now serve all boards by a single updater logic - udpater v4. With this change, I feel we can finally get rid of all the hacks in updater, and turn that into part of the vboot. There are few benefits: 1. if there a simple command (without bundled fw), user and developers can be even easier to check if a self-built (RW) image is compatible with current system , and install it easily without destroying HWID stuff. 2. We may be able to compile a single statically linked executable with minimal external dependency, making 32->64 AU possible again. 3. Firmare using vboot can have an official implementation of how updater should be made. 4. May be more consistent with other updating tools, for example touch firmware and Cr50. My early proposal: 1. In futility add command "check_compat" to do "check firmware image compatibility (to current system)". 2. In futility add command "update" to update AC / EC, supporting different modes as today. 3. Change platform/firmware script to call futility for most logic. 4. Figure out the way to convert or support updater customization scripts. 5. Eventually, if possible, we can stop using shar and pack firmware in a different way, for example zip. Design doc: go/updater5
Showing comments 4 - 103
of 103
Older ›
,
Aug 20
btw, updater script is now simply 1700 lines of dash, so I think having that converted to a single cmd C file should not be too hard to maintain.
,
Aug 20
Btw, for migrating updater_custsom, lots of work was done in my previous refactoring that moved to board-setgoofdfirmware. What left now are: (zako) update SI_DESC if current version is smaller to given one. (whirlwind) support different sized SPI (arkham) support different sized SPI (storm) support different sized SPI (gale) support different sized SPI These can be done as a special logic or allowing known sizes. (cave) allow post-MP ME update & ME update hacks (caroline) allow post-MP ME update & ME update hacks (asuka) allow post-MP ME update & ME update hacks (chell) write protect PD if not yet, allow post-MP ME update & ME update hacks (sentry) write protect PD if not yet & ME update hacks (lars) write protect PD if not yet & ME update hacks (eve) ME update hacks (samus) hack to updating EC RO (daisy-spring) select between RO-normal and RW-update (daisy[-snow]) select between RO-normal and RW-update, and select firmware per board rev. This may be done as special settings. (glados) fix broken PD fmap, clear gbb flags This should probably be dropped since glados is a reference board. (poppy) reject update for old board revs (scarlet) reject update for old board revs These can be done as a new settings for minimal board rev to support.
,
Aug 21
A WIP version for how this would look like: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1182701
,
Aug 31
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/d5e8445e3fd4694802e2246dd7e4c0df55ef0adc commit d5e8445e3fd4694802e2246dd7e4c0df55ef0adc Author: Hung-Te Lin <hungte@chromium.org> Date: Fri Aug 31 12:22:44 2018 futility: Add 'update' command for updating firmware A reference firmware updater for all systems running vboot using FMAP for layout. The updater is currently a dummy implementation and will be completed with incoming changes. BUG= chromium:875551 TEST=make futil; build/futility/futility update; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: I57bec91c178749b79a19789f9599f5f9048fced8 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1182701 Reviewed-by: Randall Spangler <rspangler@chromium.org> [add] https://crrev.com/d5e8445e3fd4694802e2246dd7e4c0df55ef0adc/futility/cmd_update.c [modify] https://crrev.com/d5e8445e3fd4694802e2246dd7e4c0df55ef0adc/Makefile [modify] https://crrev.com/d5e8445e3fd4694802e2246dd7e4c0df55ef0adc/tests/futility/run_test_scripts.sh [add] https://crrev.com/d5e8445e3fd4694802e2246dd7e4c0df55ef0adc/tests/futility/test_update.sh
,
Aug 31
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/fdbb87b113897d08cc0c8b9c4c460d02b47063f7 commit fdbb87b113897d08cc0c8b9c4c460d02b47063f7 Author: Hung-Te Lin <hungte@chromium.org> Date: Fri Aug 31 12:22:44 2018 futility: Add 'Error' utility macro An 'Error' is easier than writing fprintf(stderr, "ERROR: %s", ...). BUG= chromium:875551 TEST=make futil; BRANCH=None Change-Id: Id4a849014dc202319dc1932289c68f43b2430c7d Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1183647 Reviewed-by: Randall Spangler <rspangler@chromium.org> [modify] https://crrev.com/fdbb87b113897d08cc0c8b9c4c460d02b47063f7/futility/futility.h
,
Aug 31
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/6de8d9a5b1a84a7ed93eda6bdb11dcd4995d110a commit 6de8d9a5b1a84a7ed93eda6bdb11dcd4995d110a Author: Hung-Te Lin <hungte@chromium.org> Date: Fri Aug 31 12:22:45 2018 futility: cmd_update: Support loading image files by -i, -e, --pd_image To specify images, we want to read them from files specified from command line: -i: AP (host) firmware image. -e: EC firmware image. --pd_image: PD firmware image (deprecated). BUG= chromium:875551 TEST=make futil; futility update -i /build/eve/firmware/image.bin tests/futility/run_test_script.sh $(pwd)/build/futility BRANCH=None Change-Id: I3c2dbe3d3ce4619aa7e044a154be3aba7ab9181c Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1183648 Reviewed-by: Randall Spangler <rspangler@chromium.org> [modify] https://crrev.com/6de8d9a5b1a84a7ed93eda6bdb11dcd4995d110a/futility/cmd_update.c [modify] https://crrev.com/6de8d9a5b1a84a7ed93eda6bdb11dcd4995d110a/tests/futility/test_update.sh
,
Aug 31
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/8c3a895e7f7ecef9147ffd8b421626db97216d6f commit 8c3a895e7f7ecef9147ffd8b421626db97216d6f Author: Hung-Te Lin <hungte@chromium.org> Date: Fri Aug 31 12:22:45 2018 futility: cmd_update: Process FMAP and parse image version Add `find_firmware_section` and `firmware_section_exists` utility functions to manipulate FMAP based sections easily. It is used by parsing of image version strings, which helps indicating the firmware versions going to be updated. BUG= chromium:875551 TEST=make futil; futility update -i /build/eve/firmware/image.bin tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: I458fa8c31c45dbbd29614c3d6ccd586e46a3ed0b Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1183649 Reviewed-by: Randall Spangler <rspangler@chromium.org> [modify] https://crrev.com/8c3a895e7f7ecef9147ffd8b421626db97216d6f/futility/cmd_update.c [modify] https://crrev.com/8c3a895e7f7ecef9147ffd8b421626db97216d6f/tests/futility/test_update.sh
,
Aug 31
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/09c1c22dff11a588e9f27c57c4574930f2e168dd commit 09c1c22dff11a588e9f27c57c4574930f2e168dd Author: Hung-Te Lin <hungte@chromium.org> Date: Fri Aug 31 12:22:46 2018 futility: cmd_update: Access system firmware using external flashrom To manipulate the firmware contents on device, we need to access the flash chipset (usually via SPI) on system. The `host_flashrom` provides a way to call external program "flashrom" for reading and writing firmware. So the `update_firmware` can now load "system current firmware" using flashrom. Note in the future we may want to statically link the flashrom as library so there won't be external dependency. BUG= chromium:875551 TEST=make futil; futility update -i IMAGE tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: I52f2d4fe4fe4dd660f762a5a75e3367820717e19 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1183650 Reviewed-by: Randall Spangler <rspangler@chromium.org> [modify] https://crrev.com/09c1c22dff11a588e9f27c57c4574930f2e168dd/futility/cmd_update.c [modify] https://crrev.com/09c1c22dff11a588e9f27c57c4574930f2e168dd/tests/futility/test_update.sh
,
Aug 31
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/c1f9b056a3a7f15f33581a0cf6ae3bf5af828e7a commit c1f9b056a3a7f15f33581a0cf6ae3bf5af828e7a Author: Hung-Te Lin <hungte@chromium.org> Date: Fri Aug 31 12:22:47 2018 futility: cmd_update: Implement updater logic "FULL UPDATE". The logic is same as --mode=factory or --mode=recovery,--wp=0 in legacy firmware updater. BUG= chromium:875551 TEST=make futil; futility update -i IMAGE tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: Ifbfc4fb76f954483e779c8b508377d07561b67da Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1183651 Reviewed-by: Randall Spangler <rspangler@chromium.org> [modify] https://crrev.com/c1f9b056a3a7f15f33581a0cf6ae3bf5af828e7a/futility/cmd_update.c [modify] https://crrev.com/c1f9b056a3a7f15f33581a0cf6ae3bf5af828e7a/tests/futility/test_update.sh
,
Aug 31
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/677b535dda16fe8662d646860ff84b1ed744d902 commit 677b535dda16fe8662d646860ff84b1ed744d902 Author: Hung-Te Lin <hungte@chromium.org> Date: Fri Aug 31 12:22:46 2018 futility: cmd_update: Add '--emulate' option To help debugging and testing, we may want to run updater against an image file instead of modifying real system firmware. The --emulate allows running with all checks and reading, and outputs to given file. BUG= chromium:875551 TEST=make futil; futility update -i IMAGE --emulate IMAGE2 tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: Ic52fe60a1468f29245cade70f859513d8d117c9c Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1184953 Reviewed-by: Randall Spangler <rspangler@chromium.org> [modify] https://crrev.com/677b535dda16fe8662d646860ff84b1ed744d902/futility/cmd_update.c [modify] https://crrev.com/677b535dda16fe8662d646860ff84b1ed744d902/tests/futility/test_update.sh
,
Aug 31
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/75e3c5bb621cf26d7fd774a6603e224ad4120f59 commit 75e3c5bb621cf26d7fd774a6603e224ad4120f59 Author: Hung-Te Lin <hungte@chromium.org> Date: Fri Aug 31 18:19:59 2018 futility: cmd_update: Add 'mainfw_act' system property Add the system property 'mainfw_act'. In both vboot1 and vboot2, the try-rw update process will need to figure out what is current (active) firmware slot, which is the "mainfw_act" system property. BUG= chromium:875551 TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility futility --debug update -i IMAGE --sys_prop 0; futility --debug update -i IMAGE --sys_prop 1; BRANCH=None Change-Id: Ie745726107bff416549ba095a3defdd4cc98d32d Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1183652 Reviewed-by: Randall Spangler <rspangler@chromium.org> [modify] https://crrev.com/75e3c5bb621cf26d7fd774a6603e224ad4120f59/futility/cmd_update.c [modify] https://crrev.com/75e3c5bb621cf26d7fd774a6603e224ad4120f59/tests/futility/test_update.sh
,
Aug 31
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/d7d098dfc83c8ae7dd09f07738d22bd8f506a049 commit d7d098dfc83c8ae7dd09f07738d22bd8f506a049 Author: Hung-Te Lin <hungte@chromium.org> Date: Fri Aug 31 18:19:58 2018 futility: cmd_update: Add "system property" and '--sys_props' to override When updating firmware, we may need to get some system environment status, like which firmware slot was selected and boot (active), or setting cookies so the next boot will be using right (updated) slot. In verified boot, these status are manipulated by "system property" using API Vb{Get,Set}SystemProperty{String,Int}. The user land tool is `crossystem`. In order to run the firmware updater for testing and debugging, we need an easy way to toggle getting real system status, or fetch from predefined values. A new 'system_property' structure is introduced and included as part of `updater_config`. Each property can be access by `get_system_property(property_type)` function. If the value was not fetched yet, the function will call corresponding 'getter' function defined in property and then cache it. A new parameter '--sys_props` is also introduced so we can easily override them from command line so the updater will not get status from running system. The --sys_props takes a list of integers, eliminated by space or comma. For example, "1,2,3" => overrides [0]=1, [1]=2, [2]=3. "1 2,3" => overrides [0]=1, [1]=2, [2]=3. "1, ,3" => overrides [0]=1, [2]=3. BUG= chromium:875551 TEST=make futil; futility update -i IMAGE tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: Ia2e06a953da1480da9a94f7f397802caa7468efa Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1188015 [modify] https://crrev.com/d7d098dfc83c8ae7dd09f07738d22bd8f506a049/futility/cmd_update.c [modify] https://crrev.com/d7d098dfc83c8ae7dd09f07738d22bd8f506a049/tests/futility/test_update.sh
,
Aug 31
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/8d8acddf86a76702438aff5f2f8f57df3ff73dd8 commit 8d8acddf86a76702438aff5f2f8f57df3ff73dd8 Author: Hung-Te Lin <hungte@chromium.org> Date: Fri Aug 31 18:19:58 2018 futility: cmd_update: Implement updater logic "RW UPDATE". The logic is same as --mode=recovery,--wp=1 in legacy firmware updater. An debugging option '--wp' is introduced so user can easily switch between FULL UPDATE (--wp=0) or RW UPDATE (--wp=1). BUG= chromium:875551 TEST=make futil; futility update -i IMAGE --wp=0; futility update -i IMAGE --wp=1; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: Ic7d8aa8b327296988ebf80a8e737e8893b7870ea Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1188016 Reviewed-by: Randall Spangler <rspangler@chromium.org> [modify] https://crrev.com/8d8acddf86a76702438aff5f2f8f57df3ff73dd8/futility/cmd_update.c [modify] https://crrev.com/8d8acddf86a76702438aff5f2f8f57df3ff73dd8/tests/futility/test_update.sh
,
Aug 31
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/ad02d85e4fe8c2f96cf7abd3db25eafda056952e commit ad02d85e4fe8c2f96cf7abd3db25eafda056952e Author: Hung-Te Lin <hungte@chromium.org> Date: Fri Aug 31 18:19:59 2018 futility: cmd_update: Implement updater logic "TRY-RW" (--try) In vboot2, to try one RW (unused) section on next boot, we have to: - Find mainfw_act - Select and update to the "other" slot - Set system property fw_try_{next,count} values to try in next boot. The new '--try' (-t) option can trigger the mode if available. BUG= chromium:875551 TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility futility update --emulation FILE -i IMAGE -t --sys_prop 0; # Updates to B. futility update --emulation FILE -i IMAGE -t --sys_prop 1; # Updates to A. BRANCH=None Change-Id: I4b4662616a7181d2f37307238b7b80ae82369768 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1188017 Reviewed-by: Randall Spangler <rspangler@chromium.org> [modify] https://crrev.com/ad02d85e4fe8c2f96cf7abd3db25eafda056952e/futility/cmd_update.c [modify] https://crrev.com/ad02d85e4fe8c2f96cf7abd3db25eafda056952e/tests/futility/test_update.sh
,
Sep 1
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/b7a007a22971e3a257b40844d4f685875ee56d5e commit b7a007a22971e3a257b40844d4f685875ee56d5e Author: Hung-Te Lin <hungte@chromium.org> Date: Sat Sep 01 10:26:35 2018 futility: cmd_update: Preserve image sections before update When updating RO (or going to compare with contents), we need to preserve (copy) section data from system active firmware image. The `preserve_images` will try to preserve a list of known sections in full update (`--wp=0`) mode, so we VPD data and HWID won't be lost. BUG= chromium:875551 TEST=make futil; tests/futility/run_test_scripts.sh BRANCH=None Change-Id: I85c4ba972853dbc0fc101bee269c0effe70988b1 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1183653 Reviewed-by: Randall Spangler <rspangler@chromium.org> [modify] https://crrev.com/b7a007a22971e3a257b40844d4f685875ee56d5e/futility/cmd_update.c [modify] https://crrev.com/b7a007a22971e3a257b40844d4f685875ee56d5e/tests/futility/test_update.sh
,
Sep 4
Charles, FYI.
,
Sep 5
A bit late to the party... Another goal we were look at was integration testability across cros config, fw packer, signer, and fw updater. The project is a bit dated, but explained here: https://docs.google.com/document/d/16pWOcoVAGLyTEWcwnPMU_kLKc_X-ln2dAC_NBD0tHOs/edit#heading=h.bzo3hchj7ytj
,
Sep 5
I'm recently feeling we should move the updater into a simplified design that - There is a single binary, image.bin. = image.bin can have both EC RO and RW = image.bin can have an instruction for what update hacks it needs (replacing updater_custom.sh) = the only needed tool to update firmware is futility & flashrom (and hope we can merge flashrom into futility in future) = if multiple vblocks are provided, put them in an unused CBFS in input image. In this way, we should stop embedding programs and scripts into firmware updater, and let the system contain only one single image. The chromeos-firmwareupdate script may keep being a tiny stub following an archive (maybe shar or zip). AU should do chroot to run futility from new rootfs (again). I think the work here, at least so far of moving shell script into futility updater, won't conflict with the signer integration. The first step would be still a chromeos-firmwareupdate packed using shar, except it'll contain only a very small script and calling futility. So the process for signer is the same. But in future we can think about how to simplify things.
,
Sep 5
Another idea is to just put image.bin into FIRMWARE partition so it'll be no longer on rootfs (save more space!). The Golden Eye + update_engine may push correct firmware according to board/model/HWID as one of the payload (just like kernel and rootfs), write into FIRMWARE partition, then calling chromeos-firmwareupdate will simply invoke futility and fetch the image from FIRMWARE partition. In recovery image, the FIRWMARE partition should be already provisioned. This is probably a good idea except if we have multiple images for unified build and the total size is larger than firmware partition... 1. how we store all firmware on recovery images 2. how we send all firmware into signer bot to sign properly. Possible solution is to allow increasing FIRMWARE partition size when needed. - for recovery, the FIRMWARE partition should be in correct (enough) size for all images - for AU via update_engine, we choose the right firmware according to HWID + Model, and then only that. Since the firmware partition should be larger than single image, it should not be a problem. - FIRMWARE partition may or may not need file system. We can even dump a ZIP to it, as long as futility can read it.
,
Sep 5
And BTW, "futility update" will be having all features we've ever implemented in updater4 + all customization scripts after all changes merged. So the road ahead will be: - Push all futility changes - Push updater5.sh (the new script), with customizations defined there, and make updater5.sh the default script. - Change chromeos-postinst to call firmware updater inside chroot to newly installed rootfs - Sunset updater4.sh and move all to updater5 - Stop embedding extra programs and just keep firmware images in shell ball - Consider changing shell ball to a better format, for example pure ZIP with small leading shell script - Fix autotest, factory and all related programs to work with the new format
,
Sep 5
Is there a single FIRMWARE partition, or is there one for each kernel slot (A vs. B)?
,
Sep 5
The following revision refers to this bug: https://chrome-internal.googlesource.com/chromeos/overlays/overlay-variant-daisy-spring-private/+/9d09886c776419d28a88adc3c5db4a7fbd86d5e0 commit 9d09886c776419d28a88adc3c5db4a7fbd86d5e0 Author: Hung-Te Lin <hungte@chromium.org> Date: Wed Sep 05 08:25:51 2018
,
Sep 5
The following revision refers to this bug: https://chrome-internal.googlesource.com/chromeos/overlays/overlay-daisy-private/+/e745b2daf031ef5f39db88a3e9768506d79534b2 commit e745b2daf031ef5f39db88a3e9768506d79534b2 Author: Hung-Te Lin <hungte@chromium.org> Date: Wed Sep 05 08:25:56 2018
,
Sep 5
The following revision refers to this bug: https://chrome-internal.googlesource.com/chromeos/overlays/overlay-samus-private/+/e0e892fd7ee3d800b7a1dbe231ce66474c73588b commit e0e892fd7ee3d800b7a1dbe231ce66474c73588b Author: Hung-Te Lin <hungte@chromium.org> Date: Wed Sep 05 08:25:51 2018
,
Sep 5
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/86e12ef99dfcc71c6e4903e3ed892330e78f66ff commit 86e12ef99dfcc71c6e4903e3ed892330e78f66ff Author: Hung-Te Lin <hungte@chromium.org> Date: Wed Sep 05 23:10:58 2018 futility: cmd_update: Check RO and RW signing compatibility before updating If the RW is not signed by RO root key then verified boot will fail and enter recovery mode. This may happen when user is trying to flash a DEV (or PreMP) signed firmware on a MP-signed device, with write protection enabled. BUG= chromium:875551 TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: I1cee0b5f42f1f403d9baa5f9b2659f75511fbcb8 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1183659 Reviewed-by: Randall Spangler <rspangler@chromium.org> [modify] https://crrev.com/86e12ef99dfcc71c6e4903e3ed892330e78f66ff/futility/cmd_update.c [modify] https://crrev.com/86e12ef99dfcc71c6e4903e3ed892330e78f66ff/tests/futility/test_update.sh
,
Sep 5
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/e53fbd1be95a79db0f66382cd0207a6bbd990309 commit e53fbd1be95a79db0f66382cd0207a6bbd990309 Author: Hung-Te Lin <hungte@chromium.org> Date: Wed Sep 05 23:10:57 2018 futility: cmd_update: Check TPM key versions before updating In verified boot, the key versions stored in TPM will be checked before being able to load and run a signed RW firmware. This is also known as anti-rollback check. To prevent user installing an incompatible RO (even RW) and then being not able to boot, we should check TPM key versions (by `tpm_fwver` system property) before starting to update. BUG= chromium:875551 TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: I6d50a6e475001d76fbcbe680a3f8b10f62354096 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1189249 Reviewed-by: Randall Spangler <rspangler@chromium.org> [modify] https://crrev.com/e53fbd1be95a79db0f66382cd0207a6bbd990309/futility/cmd_update.c [modify] https://crrev.com/e53fbd1be95a79db0f66382cd0207a6bbd990309/tests/futility/test_update.sh
,
Sep 5
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/bb455cbac0c99f643f76e99b238ce337d45fc219 commit bb455cbac0c99f643f76e99b238ce337d45fc219 Author: Hung-Te Lin <hungte@chromium.org> Date: Wed Sep 05 23:10:58 2018 futility: cmd_update: Add more legacy updater options To make it easier for integration with legacy firmware updater, we want to add few options: -m, --mode MODE -d, --debug -v, --verbose BUG= chromium:875551 TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: I6f045db0a8e9b5c73c1f0be2b52a71a7ee2a495e Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1193043 Reviewed-by: Randall Spangler <rspangler@chromium.org> [modify] https://crrev.com/bb455cbac0c99f643f76e99b238ce337d45fc219/futility/cmd_update.c
,
Sep 5
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/025593e7362a5aff6497ccdb421a73a0d8bcb329 commit 025593e7362a5aff6497ccdb421a73a0d8bcb329 Author: Hung-Te Lin <hungte@chromium.org> Date: Wed Sep 05 23:10:59 2018 futility: cmd_update: Correct updating logic for RW_LEGACY The RW_LEGACY logic has been changed recently and need cbfstool to help identifying if update can be performed silently. BUG= chromium:875551 TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: Ida38bb8886b17c2f7bbb2c14d072508d4b9c5809 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1194821 Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Joel Kitching <kitching@chromium.org> [modify] https://crrev.com/025593e7362a5aff6497ccdb421a73a0d8bcb329/futility/cmd_update.c
,
Sep 6
Re#24 Currently there's just one, but I think that is not a problem because in current flow, we don't need to call updater from old rootfs even if the updating process failed.
,
Sep 6
or, if needed, we can change the partition to a larger space and to it internally: either make it an fs with roota/image.bin rootb/image.bin Or just build a zip with these file names and then just dd to partition.
,
Sep 6
trying to move any logic out of the rootfs and to any other partition should give tremendous pause for a number of reasons: - the current AU logic does not support anything other than root/kern a/b - the firmware partition has never been used on devices before - so end users might have deleted/resized/formatted it on us - we've had nothing guaranteeing its sanity - the firmware partition is only 8 MiB (so, with a filesystem, even less space available) - seems like we'd blow that budget even on existing unibuild systems - the rootfs is protected by dm-verity while the firmware partition is not - trying to mount corrupted/unverified filesystems there affect the kernel - root a/b has rollback, but the firmware partition does not of course, none of this is insurmountable, but i think any use of the firmware partition needs to be thought out and ddoc-ed first. that might be too large to bite off for this current iteration work though.
,
Sep 6
I agree firmware partition won't be engaged soon (even not planned, just my random thoughts). As said in c#23, the short term and mid term goal would be still using a program inside rootfs. Meanwhile, > the firmware partition is only 8 MiB (so, with a filesystem, even less space available) We can do a raw dump of archive format (like zip) to prevent losing space > seems like we'd blow that budget even on existing unibuild systems As explained, unibuild contain multiple firmware images, but if we introduce more logic on Omaha & update_engine, it is possible each device should only need to download "1" image for its own - no need to get firmware images by other devices sharing same unibuild. And for recovery, we can simply increase the firmware partition size there so it can contain all images needed (since recovery does not need partition table to be the same). > - the rootfs is protected by dm-verity while the firmware partition is not The firmware has its own signing mechanism so I'm not too worried about this. The updater can load and verify images. > root a/b has rollback, but the firmware partition does not But we also don't do rollback for firmware. Unless if user enters developer mode, there's no any mechanism to run the updater when rollbacked.
,
Sep 6
BTW, the idea of moving firmware images outside rootfs comes from Stefan's sharing me the "FWUPD design doc", and if that works then we probably also don't need firmware partition (I only introduced firmware partition in case if FWUPD can't be integrated in the end)
,
Sep 6
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/9c5cf4bf47f3f58097d5fde3a1c03cdcd0c9449f commit 9c5cf4bf47f3f58097d5fde3a1c03cdcd0c9449f Author: Hung-Te Lin <hungte@chromium.org> Date: Thu Sep 06 04:04:17 2018 futility: cmd_update: Preserve sections blocked by management engine On Intel platforms, when management engine is not in manufacturing mode the SI_DESC will be read only and SI_ME can't be accessed by CPU. For RW-FULL mode when we want to reflash whole firmware, flashrom will skip SI_ME but it'll still try to update SI_DESC if the content looks different, which would make all firmware update to fail when a new image is pushed with different SI_DESC contents. As a result, we have to preserve and skip SI_DESC changes when ME is locked. BUG= chromium:875551 TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: I834405ad519dcb7ccd44073addfd63e844b74168 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1197022 Reviewed-by: Randall Spangler <rspangler@chromium.org> [modify] https://crrev.com/9c5cf4bf47f3f58097d5fde3a1c03cdcd0c9449f/futility/cmd_update.c
,
Sep 6
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/250e05645d7e89a106af3bd4f63ec9404da7913a commit 250e05645d7e89a106af3bd4f63ec9404da7913a Author: Hung-Te Lin <hungte@chromium.org> Date: Thu Sep 06 04:04:18 2018 futility: cmd_update: Revise debug and error message macro To simplify debugging with logs, we want to print "current function" in almost every debug and error messages. To prevent typing __FUNCTION__ everywhere, two new macros ERROR and DEBUG are introduced, to print messages in ERROR: <function>: <message>\n and DEBUG: <function>: <message>\n . BUG= chromium:875551 TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: If680f436042d58a32e2b4f534d4c22958f68d021 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1197023 Reviewed-by: Randall Spangler <rspangler@chromium.org> [modify] https://crrev.com/250e05645d7e89a106af3bd4f63ec9404da7913a/futility/cmd_update.c
,
Sep 6
> As explained, unibuild contain multiple firmware images, but if we introduce more logic on Omaha & update_engine, it is possible each device should only need to download "1" image for its own - no need to get firmware images by other devices sharing same unibuild. if the files are downloaded, then there's really no need for the firmware partition at all. it can be downloaded somewhere using a standard secure method (like DLC). > And for recovery, we can simply increase the firmware partition size there so it can contain all images needed (since recovery does not need partition table to be the same). while true, we can never require recovery flow to adjust the partition table. it's why we consider the partition layout fixed once a device ships. > The firmware has its own signing mechanism so I'm not too worried about this. that doesn't help if the filesystem itself has been corrupted in a way that crashes/exploits the kernel.
,
Sep 6
I agree DLC may be better approach than firmware partition. The assumption was that it may be easier for update_engine to push partition based updates (since it already supports kernel part + rootfs part). But if we can download files then yes there's no need of storing files on partition. Although, that would create another problem of how we update firmware in recovery (offline) mode...
,
Sep 6
with recovery images, we could prepopulate downloaded DLC somewhere (like the stateful). we have a bit more flexibility there. we'll probably need to overhaul the recovery process anyways as i think we're blowing our initramfs size budget and the shell code has grown way too complex.
,
Sep 6
I'm onboard with separating out the signing logic further so that we can ship targeted payloads (fw, config, etc...) on a per device basis even though is shares the core build. We've been kicking this idea around for a bit and I think it's inevitably our growth path ... especially as the re-use of images grows over time.
,
Sep 7
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/e5cd1b321916df9c36770f06d28ec86bca98d116 commit e5cd1b321916df9c36770f06d28ec86bca98d116 Author: Hung-Te Lin <hungte@chromium.org> Date: Fri Sep 07 21:29:04 2018 futility: cmd_update: Correctly handle error counter The errorcnt in do_update should not add function return values directly because the function may return negative values, which would lead to wrong results. Instead we can process using '!!' so the returned value will always be zero or positive integers. BUG= chromium:875551 TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: I9f450b2ee8d86035288f06bdb314dfb1dce3ca64 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1209023 Reviewed-by: Joel Kitching <kitching@chromium.org> [modify] https://crrev.com/e5cd1b321916df9c36770f06d28ec86bca98d116/futility/cmd_update.c
,
Sep 9
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/firmware/+/0e3c59515fcce2931d5503bf6d89237b10f2ca52 commit 0e3c59515fcce2931d5503bf6d89237b10f2ca52 Author: Hung-Te Lin <hungte@chromium.org> Date: Sun Sep 09 17:33:52 2018 pack_firmware: Change default tools to empty for updater5 Since chromium:765753, the postinst now always runs updater inside the new rootfs (using chroot) so bundling tool programs (flashrom, crossystem, mosys, ...) is no longer needed for AU and recovery. There may be still developers grabbing an older/newer version of chromeos-firmwareupdate and run it directly on different rootfs, where the related programs may be not compatible and cause updating to fail -- especially in early proto stages. However, this may be not super critical to support, especially since, we have zero testing/validation making sure we actually bundle all the binaries we care about (for example, mosys calls other programs like vpd_get_value). Plus, currently we are moving updating logic into futility itself (chromium:875551). As a result, in this patch we are going to experiment "no tools bundled" on new devices using updater5 (which will run the futility based updater) and then decide if we should remove all tools for all devices. BUG= chromium:765499 , chromium:765753 , chromium:875551 TEST=./pack_firmware_unittest.py ./pack_firmware_functest.py Set CROS_FIRMWARE_SCRIPT=updater5.sh in ebuild and then emerge-$BOARD chromeos-firmware-$BOARD; /build/$BOARD/usr/sbin/chromeos-firmwareupdate -V # no tools Change-Id: I5b388129ac3961ef5a52767b861cb70bbee596c9 Reviewed-on: https://chromium-review.googlesource.com/1215102 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/0e3c59515fcce2931d5503bf6d89237b10f2ca52/pack_firmware_unittest.py [modify] https://crrev.com/0e3c59515fcce2931d5503bf6d89237b10f2ca52/pack_firmware.py
,
Sep 10
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/c6c620194ff4a44626b550338973df7aa00886f7 commit c6c620194ff4a44626b550338973df7aa00886f7 Author: Hung-Te Lin <hungte@chromium.org> Date: Mon Sep 10 08:13:19 2018 futility: cmd_update: Add --quirks for device-specific hacks The firmware updater usually needs to apply many special rules for particular device, previously done by the 'updater_custom.sh' script. In futility updater, we want to support that by a 'quirks' system, that the updater package can declare a list of needed quirks and send to updater as `futility update --quirks LIST`. Currently only a dummy "test" quirks is defined. The real quirks will be added in follow up changes. BUG= chromium:875551 TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: Ic935d69a54473f2347964e7c161ffcdc0af43ec6 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1198804 Reviewed-by: Randall Spangler <rspangler@chromium.org> [modify] https://crrev.com/c6c620194ff4a44626b550338973df7aa00886f7/futility/cmd_update.c [modify] https://crrev.com/c6c620194ff4a44626b550338973df7aa00886f7/tests/futility/test_update.sh
,
Sep 10
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/8c564a18969b14f7a86ffd93089bba9f37cb53a5 commit 8c564a18969b14f7a86ffd93089bba9f37cb53a5 Author: Hung-Te Lin <hungte@chromium.org> Date: Mon Sep 10 08:13:20 2018 futility: cmd_update: Add quirk 'enlarge_image' Some devices may have shipped with a smaller image that the real flash may be larger, especially if the device's original flash has been EOL'ed. The quirk 'enlarge_image' allows changing image size according to current_image size by padding 0xFF (flash default value). BUG= chromium:875551 TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: I84373cfa9bcbd98a2cd96a7dd4bed27a6f724cf3 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1198806 Reviewed-by: Randall Spangler <rspangler@chromium.org> [modify] https://crrev.com/8c564a18969b14f7a86ffd93089bba9f37cb53a5/futility/cmd_update.c [modify] https://crrev.com/8c564a18969b14f7a86ffd93089bba9f37cb53a5/tests/futility/test_update.sh
,
Sep 10
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/f5223d920707f24724390019c14c2f759d51f71a commit f5223d920707f24724390019c14c2f759d51f71a Author: Hung-Te Lin <hungte@chromium.org> Date: Mon Sep 10 08:13:20 2018 futility: cmd_update: Add quirk 'unlock_me_for_update' On recent Intel platforms, flashing to SI_ME may get corrupted due to ME execution in parallel. If we lock SI_ME immediately (by writing the new SI_DESC), the device may fail to boot due to ME execution failure. As a result, a quirk is added so the firmware updater will never lock SI_ME. The Flash Master values are always unlocked when updating SI_ME, and after system reboot, a board-postinst script should check ME status and reflash SI_DESC only if SI_ME looks all good. BUG= chromium:875551 TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: I584aa373797e2b4c2608f07aac21c16cdb34a5c4 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1198807 Reviewed-by: Randall Spangler <rspangler@chromium.org> [modify] https://crrev.com/f5223d920707f24724390019c14c2f759d51f71a/futility/cmd_update.c [modify] https://crrev.com/f5223d920707f24724390019c14c2f759d51f71a/tests/futility/test_update.sh
,
Sep 10
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/e0b83db84ae33e3b02c975c522e924f13d896d79 commit e0b83db84ae33e3b02c975c522e924f13d896d79 Author: Hung-Te Lin <hungte@chromium.org> Date: Mon Sep 10 08:13:18 2018 futility: cmd_update: Add new 'legacy' mode For devices that do not have update tag provisioned in legacy CBFS, we need a way to push and enforce the updater to complete first migration. The '--mode=legacy' provides a short cut to do "flashrom -p host -w image -i RW_LEGACY" Devices that need newer (or latest) legacy firmware should invoke firmware updater in their initialization or setup process, to enforce updating RW_LEGACY. BUG= chromium:875551 TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: I87db067ad134e82bbbdc937bd2880c6731ec892b Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1198808 Reviewed-by: Randall Spangler <rspangler@chromium.org> [modify] https://crrev.com/e0b83db84ae33e3b02c975c522e924f13d896d79/futility/cmd_update.c [modify] https://crrev.com/e0b83db84ae33e3b02c975c522e924f13d896d79/tests/futility/test_update.sh
,
Sep 10
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/fe6d3ddf1aed16d0708f9f4d2e0aecf8eac05994 commit fe6d3ddf1aed16d0708f9f4d2e0aecf8eac05994 Author: Hung-Te Lin <hungte@chromium.org> Date: Mon Sep 10 08:13:21 2018 futility: cmd_update: Add quirk 'min_platform_version' Many device may have some minor difference in early builds, for example (board id) rev 0 and rev 1 may have GPIO pins connected to different components. Usually the firmware should read board identifier and do the right mapping, but sometimes the firmware may be totally incompatible and no way to workaround (for example even the CPU may be different). The min_platform_version is introduced so we can prevent updating to incompatible systems, by reading $(mosys platform version). BUG= chromium:875551 TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: I418fee1aad884551b38ac25c340b2797b8503596 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1198815 Reviewed-by: Randall Spangler <rspangler@chromium.org> [modify] https://crrev.com/fe6d3ddf1aed16d0708f9f4d2e0aecf8eac05994/futility/cmd_update.c [modify] https://crrev.com/fe6d3ddf1aed16d0708f9f4d2e0aecf8eac05994/tests/futility/test_update.sh
,
Sep 10
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/f917d4d2324a9316603f50e8311639a6093180a3 commit f917d4d2324a9316603f50e8311639a6093180a3 Author: Hung-Te Lin <hungte@chromium.org> Date: Mon Sep 10 08:13:19 2018 futility: cmd_update: Create and remove temporary files properly When running on DUT we should create temporary files using system calls instead of using hard-coded path and file name. The new create_temp_file() will collect all temporary files and remove them all when the remove_temp_files() is invoked (usually at end of program). BUG= chromium:875551 TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: I866dd8dfe7acbf8c5a586249ea2d19f33891672d Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1203334 Reviewed-by: Randall Spangler <rspangler@chromium.org> [modify] https://crrev.com/f917d4d2324a9316603f50e8311639a6093180a3/futility/cmd_update.c
,
Sep 10
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/firmware/+/dbd9906d579fe68543cb1fe9c58e4734cd8394ea commit dbd9906d579fe68543cb1fe9c58e4734cd8394ea Author: Hung-Te Lin <hungte@chromium.org> Date: Mon Sep 10 08:13:26 2018 updater5: A new updater script using `futility update` With the new 'futility update' command, we can largely move the updater logic out from shell scripts. To simplify the transition process, a new `updater5.sh` is created so we can migrate only selected boards. The updater5 is forked from updater4, with all updating logic removed and only preserved argument processing and image / key selection (especially for unified build and white label tags). The preparation and packaging of updater shar is still the same - this may be improved and changed in future. BUG= chromium:875551 TEST=manually added CROS_FIRMWARE_SCRIPT="updater5.sh", emerge-eve chromeos-firmware-eve and then executed the chromeos-firmwareupdate --mode=autoupdate Change-Id: I550523f49c333c738189ab057492c0756bec8586 Reviewed-on: https://chromium-review.googlesource.com/1196624 Commit-Ready: Hung-Te Lin <hungte@chromium.org> Tested-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Hung-Te Lin <hungte@chromium.org> [rewrite] https://crrev.com/dbd9906d579fe68543cb1fe9c58e4734cd8394ea/pack_dist/updater5.sh
,
Sep 10
Ok, the primary work is done: we have 'futility update' now and script5 is ready. There can be another issue to start and track the pilot runs of deploying 'futility' based updaters.
,
Sep 10
The following revision refers to this bug: https://chrome-internal.googlesource.com/chromeos/overlays/overlay-zako-private/+/9469ae4c3ed7b9412301c3953fae86f493e2d548 commit 9469ae4c3ed7b9412301c3953fae86f493e2d548 Author: Hung-Te Lin <hungte@chromium.org> Date: Mon Sep 10 15:14:06 2018
,
Sep 28
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/ba71ad66e335d063f613fecc62703878f7359a46 commit ba71ad66e335d063f613fecc62703878f7359a46 Author: Hung-Te Lin <hungte@chromium.org> Date: Fri Sep 28 02:43:58 2018 futility: update: Refactor: move updater logic to 'updater.c' The updater is getting more complicated and we may want to split into few modules, for example "updater", "quirks", and "host". The first step is to change cmd_update.c to updater.c (to preserve most GIT history). BUG= chromium:875551 TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: Icae37db8720162130cf38767fec14a970cc9899d Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1245642 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Reviewed-by: Joel Kitching <kitching@chromium.org> [rename] https://crrev.com/ba71ad66e335d063f613fecc62703878f7359a46/futility/updater.c [modify] https://crrev.com/ba71ad66e335d063f613fecc62703878f7359a46/Makefile
,
Oct 2
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/01d778c16a9272892ed8296d101ad299e1092e6c commit 01d778c16a9272892ed8296d101ad299e1092e6c Author: Hung-Te Lin <hungte@chromium.org> Date: Tue Oct 02 12:19:07 2018 futility: updater: Refactor: move command line processing to cmd_update.c Move the do_update back to cmd_update with better initialization. The update.c now has few APIs to invoke the firmware updater without relying command line processing. BUG= chromium:875551 TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: I99f792bf902ed72e487242ac8872aec384783555 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1245643 [add] https://crrev.com/01d778c16a9272892ed8296d101ad299e1092e6c/futility/updater.h [add] https://crrev.com/01d778c16a9272892ed8296d101ad299e1092e6c/futility/cmd_update.c [modify] https://crrev.com/01d778c16a9272892ed8296d101ad299e1092e6c/futility/updater.c [modify] https://crrev.com/01d778c16a9272892ed8296d101ad299e1092e6c/Makefile
,
Oct 2
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/2c7dfb4ebbe0428e3c52b9786024533111fb3bc7 commit 2c7dfb4ebbe0428e3c52b9786024533111fb3bc7 Author: Hung-Te Lin <hungte@chromium.org> Date: Tue Oct 02 12:19:08 2018 futility: updater: Refactor: localize temp files management The creation and deletion of temp files can be managed in same context where updater config lives. BUG= chromium:875551 TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: Ic1745d27a071047d4882b21905bd11e15b5632cd Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1245644 Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Joel Kitching <kitching@chromium.org> [modify] https://crrev.com/2c7dfb4ebbe0428e3c52b9786024533111fb3bc7/futility/updater.h [modify] https://crrev.com/2c7dfb4ebbe0428e3c52b9786024533111fb3bc7/futility/cmd_update.c [modify] https://crrev.com/2c7dfb4ebbe0428e3c52b9786024533111fb3bc7/futility/updater.c
,
Oct 2
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/ff34fd79a3a513f12735f469621f560f463c055c commit ff34fd79a3a513f12735f469621f560f463c055c Author: Hung-Te Lin <hungte@chromium.org> Date: Tue Oct 02 12:19:08 2018 futility: updater: Refactor: move quirks to 'updater_quirks.c' There will be more and more board-specific quirks in future and we want to put them together into a special module. BUG= chromium:875551 TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: I4fd2ff5e2b2e891cbd3da8c9393c6fbdf7024c75 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1245645 [modify] https://crrev.com/ff34fd79a3a513f12735f469621f560f463c055c/futility/updater.h [modify] https://crrev.com/ff34fd79a3a513f12735f469621f560f463c055c/futility/updater.c [modify] https://crrev.com/ff34fd79a3a513f12735f469621f560f463c055c/Makefile [add] https://crrev.com/ff34fd79a3a513f12735f469621f560f463c055c/futility/updater_quirks.c
,
Oct 2
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/9997820ded8be4e1c94567f495d63122c88b2a03 commit 9997820ded8be4e1c94567f495d63122c88b2a03 Author: Hung-Te Lin <hungte@chromium.org> Date: Tue Oct 02 12:19:09 2018 futility: updater: Add default quirks For people running updater directly without the packaged firmware updater (chromeos-firmwareupdate), it is easier if we identify the quirks inside updater itself instead of the wrapper script. This change enables getting "default quirks" by target image RO version so we won't need to pack firmware images first. BUG= chromium:875551 TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: I179227f7a829577dc9fe5deb085fdee1a738c070 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1245663 Reviewed-by: Randall Spangler <rspangler@chromium.org> [modify] https://crrev.com/9997820ded8be4e1c94567f495d63122c88b2a03/futility/updater.h [modify] https://crrev.com/9997820ded8be4e1c94567f495d63122c88b2a03/futility/updater.c [modify] https://crrev.com/9997820ded8be4e1c94567f495d63122c88b2a03/futility/updater_quirks.c
,
Oct 2
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/bbe5fda1e8f35bd242ba2e2766a110bada4389e4 commit bbe5fda1e8f35bd242ba2e2766a110bada4389e4 Author: Hung-Te Lin <hungte@chromium.org> Date: Tue Oct 02 16:17:11 2018 futility: updater: Support reading main image from stdin "Can we make futility support stdin like flashrom? I typically flash with: ssh root@DUT flashrom -p host - < foo.bin" Yes we can: ssh root@DUT futility update -i - < foo.bin BUG= chromium:875551 TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: Ib1ee5d4c882620e3b6f56fd5e4692b4829cf025a Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1251141 Reviewed-by: Raul E Rangel <rrangel@chromium.org> [modify] https://crrev.com/bbe5fda1e8f35bd242ba2e2766a110bada4389e4/futility/updater.c [modify] https://crrev.com/bbe5fda1e8f35bd242ba2e2766a110bada4389e4/tests/futility/test_update.sh
,
Oct 2
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/b95aa03f38d2073e68968145c99a216e4d45084f commit b95aa03f38d2073e68968145c99a216e4d45084f Author: Hung-Te Lin <hungte@chromium.org> Date: Tue Oct 02 16:17:11 2018 futility: updater: Revise verbosity and error messages `futility` used to print debug messages to stdout, but there is a side effect that stdout may be buffered and then flush later than stderr. For example, when calling futility via ssh, we will see flashrom messages before any of futility's own messages. Also, many people want to get flashrom verbose messages (-V). With this change, when calling ERROR and DEBUG, we will always output to stderr. This also enables better parameter type checking. `-d` and `-v` both contribute to verbosity, that will be converted to -V's when calling flashrom. BUG= chromium:875551 TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: I1d22a8054fc43cdc5e6c7415e131cc9826fbff0c Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1251145 [modify] https://crrev.com/b95aa03f38d2073e68968145c99a216e4d45084f/futility/updater.h [modify] https://crrev.com/b95aa03f38d2073e68968145c99a216e4d45084f/futility/cmd_update.c [modify] https://crrev.com/b95aa03f38d2073e68968145c99a216e4d45084f/futility/updater.c [modify] https://crrev.com/b95aa03f38d2073e68968145c99a216e4d45084f/tests/futility/test_update.sh [modify] https://crrev.com/b95aa03f38d2073e68968145c99a216e4d45084f/futility/updater_quirks.c
,
Oct 5
,
Oct 11
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/64a7ae416b2b537179122562d5b399a3b6e80cbd commit 64a7ae416b2b537179122562d5b399a3b6e80cbd Author: Hung-Te Lin <hungte@chromium.org> Date: Thu Oct 11 15:55:54 2018 vboot_reference: Add libzip as dependency Since CL:1253229, the `futility update` command can read from archives, including infozip type files. To support that, we want to include libzip as package dependency. BUG= chromium:875551 TEST=sudo emerge vboot_reference; emerge-$BOARD vboot_reference; build_image test Change-Id: I106c530905c2f6f572ac201981cce6bc2b0370f4 Reviewed-on: https://chromium-review.googlesource.com/1270379 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/64a7ae416b2b537179122562d5b399a3b6e80cbd/chromeos-base/vboot_reference/vboot_reference-9999.ebuild
,
Oct 13
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/7db7a6db8f0719fe0fda8219c7111c7caf0b4546 commit 7db7a6db8f0719fe0fda8219c7111c7caf0b4546 Author: Hung-Te Lin <hungte@chromium.org> Date: Sat Oct 13 18:42:13 2018 futility: updater: Add '--archive' to read from an archive or directory A firmware update is usually released as a package with multiple images, instructions, signed vblocks and other files. To work with that, a new argument '--archive' is added. The --archive accepts a directory or file, and will determine the correct driver automatically. For resources (for example --image) in relative path, updater should find files from archive. Note in current implementation, only ZIP is supported for file type drivers (and need the system to have libzip already installed). BUG= chromium:875551 TEST=TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: I6a91cbe73fb4ee203c5fa4607f6651a39ba854d5 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1253229 Reviewed-by: Randall Spangler <rspangler@chromium.org> [modify] https://crrev.com/7db7a6db8f0719fe0fda8219c7111c7caf0b4546/futility/cmd_update.c [modify] https://crrev.com/7db7a6db8f0719fe0fda8219c7111c7caf0b4546/Makefile [add] https://crrev.com/7db7a6db8f0719fe0fda8219c7111c7caf0b4546/futility/updater_archive.c [modify] https://crrev.com/7db7a6db8f0719fe0fda8219c7111c7caf0b4546/futility/updater.c [modify] https://crrev.com/7db7a6db8f0719fe0fda8219c7111c7caf0b4546/tests/futility/test_update.sh [modify] https://crrev.com/7db7a6db8f0719fe0fda8219c7111c7caf0b4546/futility/updater.h [modify] https://crrev.com/7db7a6db8f0719fe0fda8219c7111c7caf0b4546/futility/updater_quirks.c
,
Oct 13
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/050f66f11e1879594d0705974daf1075863e1d21 commit 050f66f11e1879594d0705974daf1075863e1d21 Author: Hung-Te Lin <hungte@chromium.org> Date: Sat Oct 13 18:42:12 2018 futility: updater: Add ASPRINTF macro When calling `asprintf`, if the return value is negative value then the strp parameter is not allocated. Updater will need to call asprintf very often in future, and we should abort immediately if asprintf can't allocate buffer, since that implies either we are running out of memory, or the system has gone very wrong. Instead of writing if (asprintf(...) < 0) { ERROR(); return...} everywhere, it seems easier to just add a macro and abort as exit(1). BUG= chromium:875551 TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: I8ea5f6c22dcc8225bc53fbd54b4b41a928f84910 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1260803 Reviewed-by: Randall Spangler <rspangler@chromium.org> [modify] https://crrev.com/050f66f11e1879594d0705974daf1075863e1d21/futility/updater.h [modify] https://crrev.com/050f66f11e1879594d0705974daf1075863e1d21/futility/updater.c [modify] https://crrev.com/050f66f11e1879594d0705974daf1075863e1d21/futility/updater_quirks.c
,
Oct 13
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/7c94d5be063a5950b8af558739b7c351eddd3ced commit 7c94d5be063a5950b8af558739b7c351eddd3ced Author: Hung-Te Lin <hungte@chromium.org> Date: Sat Oct 13 18:42:13 2018 futility: updater: Refactor how arguments were configured We are going to have more command line arguments that must be passed to updater_setup_config, and it is better to manage so many variables in a struct. Also, revised the order or argument processing so that simple settings are now processed first, then complicated ones or those with dependency. BUG= chromium:875551 TEST=TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: I03ac036d26e49cdf924c03d6e86a272ce89fc2aa Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1265575 Reviewed-by: Randall Spangler <rspangler@chromium.org> [modify] https://crrev.com/7c94d5be063a5950b8af558739b7c351eddd3ced/futility/updater.h [modify] https://crrev.com/7c94d5be063a5950b8af558739b7c351eddd3ced/futility/cmd_update.c [modify] https://crrev.com/7c94d5be063a5950b8af558739b7c351eddd3ced/futility/updater.c
,
Oct 13
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/66381ae51d7da4a385b5898473d3ccaa8ee20c11 commit 66381ae51d7da4a385b5898473d3ccaa8ee20c11 Author: Hung-Te Lin <hungte@chromium.org> Date: Sat Oct 13 18:42:13 2018 futility: updater: Refactor function names No real function changes. For incoming changes, we want to rename the shared functions to make it more clear (and more consistent) in hot it was used, including: - load_image: should be load_firmware_image(image, filename) - free_image: should be free_firmware_image - reload_image: should be reload_firmware_image - load_system_image: should be load_system_firmware - create_temp_file: should be updater_create_temp_file to make it more clear it is created for updater (and deleted when updater has finished) BUG= chromium:875551 TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: I120e30b5a4c40ccce03e5f361734f2583476703a Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1270322 Reviewed-by: Randall Spangler <rspangler@chromium.org> [modify] https://crrev.com/66381ae51d7da4a385b5898473d3ccaa8ee20c11/futility/updater.h [modify] https://crrev.com/66381ae51d7da4a385b5898473d3ccaa8ee20c11/futility/updater.c [modify] https://crrev.com/66381ae51d7da4a385b5898473d3ccaa8ee20c11/futility/updater_quirks.c
,
Oct 14
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/3e6397d3d612a6436052c163b8686020357e7442 commit 3e6397d3d612a6436052c163b8686020357e7442 Author: Hung-Te Lin <hungte@chromium.org> Date: Sun Oct 14 04:59:21 2018 futility: updater: Add --manifest to scan and print archive info The firmware updater packages used to rely on a pre-generated VERSION file to report what files were included and their image versions. Its format was hard to parse, and may be out-dated if people repack without updating VERSION file. The firmware updater today has the ability to read and parse version, key hash, ... etc everything we need, so it seems more reasonable to just let firmware updater scan updater package and print the information in JSON format, so it will be very easy to fetch latest information. To make sure the output is purely JSON, the start and end messages are now sent to stderr instead of stdout. BUG= chromium:875551 TEST=TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: Ifa468fbb3adf798c7931f015258e6c6ce93de993 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1260804 [modify] https://crrev.com/3e6397d3d612a6436052c163b8686020357e7442/futility/cmd_update.c [add] https://crrev.com/3e6397d3d612a6436052c163b8686020357e7442/tests/futility/link.manifest.json [modify] https://crrev.com/3e6397d3d612a6436052c163b8686020357e7442/futility/updater_archive.c [modify] https://crrev.com/3e6397d3d612a6436052c163b8686020357e7442/futility/updater.c [modify] https://crrev.com/3e6397d3d612a6436052c163b8686020357e7442/tests/futility/test_update.sh [modify] https://crrev.com/3e6397d3d612a6436052c163b8686020357e7442/futility/updater.h
,
Oct 15
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/c5cdf6fce6b0c0116bf4bcf522fce38bb05ab6d4 commit c5cdf6fce6b0c0116bf4bcf522fce38bb05ab6d4 Author: Hung-Te Lin <hungte@chromium.org> Date: Mon Oct 15 23:01:59 2018 futility: updater: Allow patching rootkey and vblock files For white label projects, the firmware updater has to select correct root key and corresponding vblock files per different LOEM. In Unified build, multiple models may share same firmware base image, with different key files (per OEM). As a result, we have to apply the key files before using the firmware image files. This change adds the "patch" information when building manifest, and prints the correct key hash in `--manifest` mode. BUG= chromium:875551 TEST=TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: Ib5e31af5262a0989a5a474d0683c83121f24cc78 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1270323 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Reviewed-by: Randall Spangler <rspangler@chromium.org> [modify] https://crrev.com/c5cdf6fce6b0c0116bf4bcf522fce38bb05ab6d4/futility/updater.h [modify] https://crrev.com/c5cdf6fce6b0c0116bf4bcf522fce38bb05ab6d4/futility/updater_archive.c [modify] https://crrev.com/c5cdf6fce6b0c0116bf4bcf522fce38bb05ab6d4/futility/updater.c [modify] https://crrev.com/c5cdf6fce6b0c0116bf4bcf522fce38bb05ab6d4/tests/futility/link.manifest.json
,
Oct 15
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/firmware/+/71d50844d9849163df202a8de193073b165d48ab commit 71d50844d9849163df202a8de193073b165d48ab Author: Hung-Te Lin <hungte@chromium.org> Date: Mon Oct 15 23:01:51 2018 pack_stub: Add --manifest for JSON manifest The 'futility update' now supports printing manifest info of package content (image files, keys, models, and ro/rw versions) and is the better info for machine to parse. We should always include that if available. BUG= chromium:875551 TEST=./pack_firmware_unittest.py; ./pack_firmware_functest.py Change-Id: I719d8a4582c70e9c55ae44b6d60e25d1eda539c1 Reviewed-on: https://chromium-review.googlesource.com/1278694 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Hung-Te Lin <hungte@chromium.org> [modify] https://crrev.com/71d50844d9849163df202a8de193073b165d48ab/pack_stub [modify] https://crrev.com/71d50844d9849163df202a8de193073b165d48ab/pack_firmware_functest.py
,
Oct 18
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/firmware/+/9919505fb31b8d07f16436852474f846d83a6689 commit 9919505fb31b8d07f16436852474f846d83a6689 Author: Hung-Te Lin <hungte@chromium.org> Date: Thu Oct 18 21:53:27 2018 pack: Change --sb_extract and --sb_repack to --unpack and --pack. The firmware updaters are not shell ball anymore, so we'd like to rename the command `--sb_extract` (which stands for "shell ball extract") to simpler ones: --unpack and --repack. The --sb_* commands are kept for backward compatibility, especially for signing. This also helps unifying README docs for v1 and v2 SFX. BUG= chromium:875551 TEST=None, just adding new SFX file, not applied yet. Change-Id: I387468605988d67cffd4fce0ca044a1de4a8faee Reviewed-on: https://chromium-review.googlesource.com/1282543 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/9919505fb31b8d07f16436852474f846d83a6689/pack/sfx.sh [modify] https://crrev.com/9919505fb31b8d07f16436852474f846d83a6689/pack/README.md
,
Oct 19
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/1f2e477349fd3a14c8821ffc0bc4aa48f63e6dd5 commit 1f2e477349fd3a14c8821ffc0bc4aa48f63e6dd5 Author: Hung-Te Lin <hungte@chromium.org> Date: Fri Oct 19 05:38:01 2018 futility: updater: Change default model name to FWID platform name For devices not using Unified Build, the firmware updater may contain a single set of firmware images. To make the manifest more consistent for both cases (Unified Build or not), we want to change to model name to be the platform name from FWID if available. This does not make sense because for these devices, usually platform = board = model, and it helps to make sure programs parsing manifest won't try to use the hard coded name 'default' (which does not always work in Unified Build). BUG= chromium:875551 TEST=TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: I6d56336f3b30981e3e936fa63dec7dd45d74b31a Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1278418 Reviewed-by: Randall Spangler <rspangler@chromium.org> [modify] https://crrev.com/1f2e477349fd3a14c8821ffc0bc4aa48f63e6dd5/futility/updater_archive.c [modify] https://crrev.com/1f2e477349fd3a14c8821ffc0bc4aa48f63e6dd5/tests/futility/link.manifest.json
,
Oct 19
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/277f24c4e0afe953edc5c40657f458afd0358023 commit 277f24c4e0afe953edc5c40657f458afd0358023 Author: Hung-Te Lin <hungte@chromium.org> Date: Fri Oct 19 19:19:36 2018 vboot_reference: Change libzip dependency by sub slot We are going to uprev libzip to 1.3.0, and since vboot_reference is part of cros_sdk, we need to get the signing tools as well. The new libzip needs sub slot, which is defined in EAPI=5, so we have to change both. BUG= chromium:875551 TEST=sudo emerge vboot_reference; emerge-$BOARD vboot_reference; build_image test CQ-DEPEND=CL:1285990 Change-Id: I6f80ec7ab2470a5c02f2ed3638d0c9cacf52a8dc Reviewed-on: https://chromium-review.googlesource.com/1287989 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/277f24c4e0afe953edc5c40657f458afd0358023/chromeos-base/vboot_reference/vboot_reference-9999.ebuild
,
Oct 19
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/portage-stable/+/5832053f82328763308a77c5fd12aeeb37ae364b commit 5832053f82328763308a77c5fd12aeeb37ae364b Author: Hung-Te Lin <hungte@chromium.org> Date: Fri Oct 19 19:19:35 2018 libzip: upgraded package to upstream Upgraded dev-libs/libzip to version 1.3.0 on amd64 BUG= chromium:875551 TEST=emerge libzip vboot_reference; build_packages; build_image; pass cq. CQ-DEPEND=CL:1287989 Change-Id: I65bf5b22165a5685d0d3b2b5d3f2b9198020f33d Reviewed-on: https://chromium-review.googlesource.com/1285990 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/5832053f82328763308a77c5fd12aeeb37ae364b/dev-libs/libzip/Manifest [delete] https://crrev.com/30f4dcd1f4c7ae6fa1304e2d2a204fbafdc97df7/metadata/md5-cache/dev-libs/libzip-0.11.1 [delete] https://crrev.com/30f4dcd1f4c7ae6fa1304e2d2a204fbafdc97df7/dev-libs/libzip/files/libzip-0.11-fix_pkgconfig.patch [add] https://crrev.com/5832053f82328763308a77c5fd12aeeb37ae364b/metadata/md5-cache/dev-libs/libzip-1.3.0 [add] https://crrev.com/5832053f82328763308a77c5fd12aeeb37ae364b/dev-libs/libzip/files/libzip-1.2.0-fts.patch [delete] https://crrev.com/30f4dcd1f4c7ae6fa1304e2d2a204fbafdc97df7/dev-libs/libzip/files/libzip-0.10_rc1-fix_headers.patch [delete] https://crrev.com/30f4dcd1f4c7ae6fa1304e2d2a204fbafdc97df7/dev-libs/libzip/libzip-0.11.1.ebuild [add] https://crrev.com/5832053f82328763308a77c5fd12aeeb37ae364b/dev-libs/libzip/libzip-1.3.0.ebuild [modify] https://crrev.com/5832053f82328763308a77c5fd12aeeb37ae364b/dev-libs/libzip/metadata.xml [rename] https://crrev.com/5832053f82328763308a77c5fd12aeeb37ae364b/dev-libs/libzip/files/libzip-1.2.0-headers.patch
,
Oct 22
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/92fe37cef28d58f6d64c625b30e72fab99ff42a5 commit 92fe37cef28d58f6d64c625b30e72fab99ff42a5 Author: Hung-Te Lin <hungte@chromium.org> Date: Mon Oct 22 13:16:35 2018 futility: updater: Add '--model' and select images by system model For devices using Unified Build, we have to select and load images from archive by model configuration (setvars.sh). The system model can be retrieved by $(mosys platform model), but for developers who want to simulate or get images for particular platform, a command line argument --model is needed. BUG= chromium:875551 TEST=TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: I8f4a6735b34bc694a05808b001c7309623b2afa3 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1278419 Reviewed-by: Randall Spangler <rspangler@chromium.org> [modify] https://crrev.com/92fe37cef28d58f6d64c625b30e72fab99ff42a5/futility/cmd_update.c [add] https://crrev.com/92fe37cef28d58f6d64c625b30e72fab99ff42a5/tests/futility/models/link/setvars.sh [add] https://crrev.com/92fe37cef28d58f6d64c625b30e72fab99ff42a5/tests/futility/models/peppy/setvars.sh [modify] https://crrev.com/92fe37cef28d58f6d64c625b30e72fab99ff42a5/futility/updater_archive.c [modify] https://crrev.com/92fe37cef28d58f6d64c625b30e72fab99ff42a5/futility/updater.c [modify] https://crrev.com/92fe37cef28d58f6d64c625b30e72fab99ff42a5/tests/futility/test_update.sh [modify] https://crrev.com/92fe37cef28d58f6d64c625b30e72fab99ff42a5/futility/updater.h
,
Oct 22
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/4e066900210883a4f502e626998daf79b9b66665 commit 4e066900210883a4f502e626998daf79b9b66665 Author: Hung-Te Lin <hungte@chromium.org> Date: Mon Oct 22 13:16:35 2018 futility: updater: Support white label from VPD and --signature_id For white label devices, we have to select and patch key files (root key and vblock) by VPD (`whitelabel_tag` or `customization_id`). The white label tag VPD will be processed and converted to a "signature ID" for key selection. To support that, updater has to fetch current (system) image if the matched model is following white label (so we can read VPD from it). For developers who want to load and use particular files, they can use --signature_id to override VPD values. BUG= chromium:875551 TEST=TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: I3630bae28d1a8493b56d0e5efd29f3c61a470379 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1278420 [modify] https://crrev.com/4e066900210883a4f502e626998daf79b9b66665/futility/cmd_update.c [add] https://crrev.com/4e066900210883a4f502e626998daf79b9b66665/tests/futility/models/whitetip/setvars.sh [modify] https://crrev.com/4e066900210883a4f502e626998daf79b9b66665/futility/updater_archive.c [modify] https://crrev.com/4e066900210883a4f502e626998daf79b9b66665/futility/updater.c [modify] https://crrev.com/4e066900210883a4f502e626998daf79b9b66665/tests/futility/test_update.sh [modify] https://crrev.com/4e066900210883a4f502e626998daf79b9b66665/futility/updater.h
,
Oct 22
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/6b5f9978fbfcfcab96b56a53429c9fd377176a9c commit 6b5f9978fbfcfcab96b56a53429c9fd377176a9c Author: Hung-Te Lin <hungte@chromium.org> Date: Mon Oct 22 13:16:36 2018 futility: updater: Support --mode=output and --output_dir For backward compatibility, we need to support the 'output' mode in legacy firmware updater. The output must select right files according to system model, and apply all white label transform if needed. BUG= chromium:875551 TEST=TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: Ib433647317fa97387aa4a7f8f2101b47e6ca2123 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1282084 [modify] https://crrev.com/6b5f9978fbfcfcab96b56a53429c9fd377176a9c/futility/updater.h [modify] https://crrev.com/6b5f9978fbfcfcab96b56a53429c9fd377176a9c/futility/cmd_update.c [modify] https://crrev.com/6b5f9978fbfcfcab96b56a53429c9fd377176a9c/futility/updater.c [modify] https://crrev.com/6b5f9978fbfcfcab96b56a53429c9fd377176a9c/tests/futility/test_update.sh
,
Oct 23
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/9262fdd9651c44a0f1ca28ccd876543396baf1ce commit 9262fdd9651c44a0f1ca28ccd876543396baf1ce Author: Hung-Te Lin <hungte@chromium.org> Date: Tue Oct 23 20:01:33 2018 futility: Preserve programmer in free_firmware_image The `programmer` cannot be decided in `load_firmware_image` and is always specified (and managed) by an outer context, and should be preserved even when we call `free_firmware_image`. This helps reloading or removing loaded images at runtime. BUG= chromium:875551 TEST=TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: I22f698d4a7118197379e11556b18f70ecd023ca2 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1295209 Reviewed-by: Randall Spangler <rspangler@chromium.org> [modify] https://crrev.com/9262fdd9651c44a0f1ca28ccd876543396baf1ce/futility/updater.c [modify] https://crrev.com/9262fdd9651c44a0f1ca28ccd876543396baf1ce/futility/updater_quirks.c
,
Oct 23
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/4840df70f7bb8a8a13df6ad28a55be0ebf7de3ab commit 4840df70f7bb8a8a13df6ad28a55be0ebf7de3ab Author: Hung-Te Lin <hungte@chromium.org> Date: Tue Oct 23 20:01:33 2018 futility: update: Add `--host_only` argument The legacy firmware updater can update explicitly only some type of images by using `--[no]update_main`, `--[no]update_ec`, `--[no]update_pd`. Since software sync is introduced, usually it does not make sense to only update EC or PD; instead the real request is to "ignore provided EC and PD images and update only host". The new `--host_only` argument provides an easy way to ignore images in command line (`--ec_image`, `--pd_image`) and archives (`ec.bin`, `pd.bin`). BUG= chromium:875551 TEST=TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: Idf403680880cd58a00867172ccec97fd60c1b826 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1295210 Reviewed-by: Randall Spangler <rspangler@chromium.org> [modify] https://crrev.com/4840df70f7bb8a8a13df6ad28a55be0ebf7de3ab/futility/updater.h [modify] https://crrev.com/4840df70f7bb8a8a13df6ad28a55be0ebf7de3ab/futility/cmd_update.c [modify] https://crrev.com/4840df70f7bb8a8a13df6ad28a55be0ebf7de3ab/futility/updater.c [modify] https://crrev.com/4840df70f7bb8a8a13df6ad28a55be0ebf7de3ab/tests/futility/test_update.sh
,
Oct 24
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/5fca7678e48d920749b8f49f0502f254072ada94 commit 5fca7678e48d920749b8f49f0502f254072ada94 Author: Hung-Te Lin <hungte@chromium.org> Date: Wed Oct 24 04:34:19 2018 futility: updater: Change default model name to FWID platform name For devices not using Unified Build, the firmware updater may contain a single set of firmware images. To make the manifest more consistent for both cases (Unified Build or not), we want to change to model name to be the platform name from FWID if available. This does not make sense because for these devices, usually platform = board = model, and it helps to make sure programs parsing manifest won't try to use the hard coded name 'default' (which does not always work in Unified Build). BUG= chromium:875551 TEST=TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: I6d56336f3b30981e3e936fa63dec7dd45d74b31a Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1278418 Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/1296941 [modify] https://crrev.com/5fca7678e48d920749b8f49f0502f254072ada94/futility/updater_archive.c [modify] https://crrev.com/5fca7678e48d920749b8f49f0502f254072ada94/tests/futility/link.manifest.json
,
Oct 24
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/f4352c8c09a866013a243e5e4ae4eff895bc0d46 commit f4352c8c09a866013a243e5e4ae4eff895bc0d46 Author: Hung-Te Lin <hungte@chromium.org> Date: Wed Oct 24 04:34:22 2018 futility: updater: Add '--model' and select images by system model For devices using Unified Build, we have to select and load images from archive by model configuration (setvars.sh). The system model can be retrieved by $(mosys platform model), but for developers who want to simulate or get images for particular platform, a command line argument --model is needed. BUG= chromium:875551 TEST=TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: I8f4a6735b34bc694a05808b001c7309623b2afa3 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1278419 Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/1296943 [modify] https://crrev.com/f4352c8c09a866013a243e5e4ae4eff895bc0d46/futility/cmd_update.c [add] https://crrev.com/f4352c8c09a866013a243e5e4ae4eff895bc0d46/tests/futility/models/link/setvars.sh [add] https://crrev.com/f4352c8c09a866013a243e5e4ae4eff895bc0d46/tests/futility/models/peppy/setvars.sh [modify] https://crrev.com/f4352c8c09a866013a243e5e4ae4eff895bc0d46/futility/updater_archive.c [modify] https://crrev.com/f4352c8c09a866013a243e5e4ae4eff895bc0d46/futility/updater.c [modify] https://crrev.com/f4352c8c09a866013a243e5e4ae4eff895bc0d46/tests/futility/test_update.sh [modify] https://crrev.com/f4352c8c09a866013a243e5e4ae4eff895bc0d46/futility/updater.h
,
Oct 24
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/9f9df9aae02ba31b0a3c484dca0a8fffd5000893 commit 9f9df9aae02ba31b0a3c484dca0a8fffd5000893 Author: Hung-Te Lin <hungte@chromium.org> Date: Wed Oct 24 04:34:23 2018 futility: updater: Support white label from VPD and --signature_id For white label devices, we have to select and patch key files (root key and vblock) by VPD (`whitelabel_tag` or `customization_id`). The white label tag VPD will be processed and converted to a "signature ID" for key selection. To support that, updater has to fetch current (system) image if the matched model is following white label (so we can read VPD from it). For developers who want to load and use particular files, they can use --signature_id to override VPD values. BUG= chromium:875551 TEST=TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: I3630bae28d1a8493b56d0e5efd29f3c61a470379 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1278420 Reviewed-on: https://chromium-review.googlesource.com/c/1296944 [modify] https://crrev.com/9f9df9aae02ba31b0a3c484dca0a8fffd5000893/futility/cmd_update.c [add] https://crrev.com/9f9df9aae02ba31b0a3c484dca0a8fffd5000893/tests/futility/models/whitetip/setvars.sh [modify] https://crrev.com/9f9df9aae02ba31b0a3c484dca0a8fffd5000893/futility/updater_archive.c [modify] https://crrev.com/9f9df9aae02ba31b0a3c484dca0a8fffd5000893/futility/updater.c [modify] https://crrev.com/9f9df9aae02ba31b0a3c484dca0a8fffd5000893/tests/futility/test_update.sh [modify] https://crrev.com/9f9df9aae02ba31b0a3c484dca0a8fffd5000893/futility/updater.h
,
Oct 24
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/6fa6315a19ef8eb08b1468ccd92c970040c7f03d commit 6fa6315a19ef8eb08b1468ccd92c970040c7f03d Author: Hung-Te Lin <hungte@chromium.org> Date: Wed Oct 24 04:37:56 2018 futility: updater: Support --mode=output and --output_dir For backward compatibility, we need to support the 'output' mode in legacy firmware updater. The output must select right files according to system model, and apply all white label transform if needed. BUG= chromium:875551 TEST=TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: Ib433647317fa97387aa4a7f8f2101b47e6ca2123 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1282084 Reviewed-on: https://chromium-review.googlesource.com/c/1296945 [modify] https://crrev.com/6fa6315a19ef8eb08b1468ccd92c970040c7f03d/futility/updater.h [modify] https://crrev.com/6fa6315a19ef8eb08b1468ccd92c970040c7f03d/futility/cmd_update.c [modify] https://crrev.com/6fa6315a19ef8eb08b1468ccd92c970040c7f03d/futility/updater.c [modify] https://crrev.com/6fa6315a19ef8eb08b1468ccd92c970040c7f03d/tests/futility/test_update.sh
,
Oct 24
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/0e6f491742425261feed32eec143146747c07c7c commit 0e6f491742425261feed32eec143146747c07c7c Author: Hung-Te Lin <hungte@chromium.org> Date: Wed Oct 24 04:37:58 2018 futility: update: Add `--host_only` argument The legacy firmware updater can update explicitly only some type of images by using `--[no]update_main`, `--[no]update_ec`, `--[no]update_pd`. Since software sync is introduced, usually it does not make sense to only update EC or PD; instead the real request is to "ignore provided EC and PD images and update only host". The new `--host_only` argument provides an easy way to ignore images in command line (`--ec_image`, `--pd_image`) and archives (`ec.bin`, `pd.bin`). BUG= chromium:875551 TEST=TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: Idf403680880cd58a00867172ccec97fd60c1b826 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1295210 Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/1296946 [modify] https://crrev.com/0e6f491742425261feed32eec143146747c07c7c/futility/updater.h [modify] https://crrev.com/0e6f491742425261feed32eec143146747c07c7c/futility/cmd_update.c [modify] https://crrev.com/0e6f491742425261feed32eec143146747c07c7c/futility/updater.c [modify] https://crrev.com/0e6f491742425261feed32eec143146747c07c7c/tests/futility/test_update.sh
,
Oct 24
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/124fa1da4184220ed061ce6fc66683c5df6578c7 commit 124fa1da4184220ed061ce6fc66683c5df6578c7 Author: Hung-Te Lin <hungte@chromium.org> Date: Wed Oct 24 04:37:59 2018 futility: Preserve programmer in free_firmware_image The `programmer` cannot be decided in `load_firmware_image` and is always specified (and managed) by an outer context, and should be preserved even when we call `free_firmware_image`. This helps reloading or removing loaded images at runtime. BUG= chromium:875551 TEST=TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: I22f698d4a7118197379e11556b18f70ecd023ca2 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1295209 Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/1296947 [modify] https://crrev.com/124fa1da4184220ed061ce6fc66683c5df6578c7/futility/updater.c [modify] https://crrev.com/124fa1da4184220ed061ce6fc66683c5df6578c7/futility/updater_quirks.c
,
Oct 24
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/firmware/+/b87043ebec76466000eadec045d7316ad77df536 commit b87043ebec76466000eadec045d7316ad77df536 Author: Hung-Te Lin <hungte@chromium.org> Date: Wed Oct 24 20:03:00 2018 pack: updater{3,4}: Deprecate `--check_keys` by `--force` The `--check_keys` option was deprecated by `--force` in updater5 and we want to make the behavior being the same for all updaters. BUG= chromium:875551 TEST=./pack_firmware_functest.sh; ./pack_firmware_unittest.sh Change-Id: Ib1261c7e8de15d18fe4ccebc48931f9955579523 Reviewed-on: https://chromium-review.googlesource.com/1295069 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com> [modify] https://crrev.com/b87043ebec76466000eadec045d7316ad77df536/pack/dist/updater4.sh [modify] https://crrev.com/b87043ebec76466000eadec045d7316ad77df536/pack/dist/updater3.sh
,
Oct 24
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/firmware/+/8d3864bacd830b87879090dd841b49904dcaf16a commit 8d3864bacd830b87879090dd841b49904dcaf16a Author: Hung-Te Lin <hungte@chromium.org> Date: Wed Oct 24 20:03:00 2018 pack: Add `--host_only` to deprecate `--[no]update_{ec,pd}` The --[no]update_* were deprecated by --host_only in updater5 (`futility update`) so we want to include --host_only in shell script version and make the migration easier, that all testing scripts (i.e., FAFT) can always use the new argument. BUG= chromium:875551 TEST=./pack_firmware_functest.sh; ./pack_firmware_unittest.sh CQ-DEPEND=CL:1295210 Change-Id: If1c81f10b0cd323e30e71ed719b0575df9882246 Reviewed-on: https://chromium-review.googlesource.com/1295449 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com> [modify] https://crrev.com/8d3864bacd830b87879090dd841b49904dcaf16a/pack/dist/common.sh
,
Oct 24
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/e1cc2b8ef8d27945043daf0e961fa1ddd40acfd4 commit e1cc2b8ef8d27945043daf0e961fa1ddd40acfd4 Author: Hung-Te Lin <hungte@chromium.org> Date: Wed Oct 24 20:03:18 2018 futility: updater: Support --repack and --unpack In order to make the firmware updater package more consistent file contents (for example, we don't want time stamps, and better if the files are always physically located in same order) we want to create and manipulate the ZIP based package directly using updater. BUG= chromium:875551 TEST=TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: Ie4c5aafe51f633729de2879c73bf7074a695151f Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1286173 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> [modify] https://crrev.com/e1cc2b8ef8d27945043daf0e961fa1ddd40acfd4/futility/updater.h [modify] https://crrev.com/e1cc2b8ef8d27945043daf0e961fa1ddd40acfd4/futility/cmd_update.c [modify] https://crrev.com/e1cc2b8ef8d27945043daf0e961fa1ddd40acfd4/futility/updater_archive.c [modify] https://crrev.com/e1cc2b8ef8d27945043daf0e961fa1ddd40acfd4/futility/updater.c
,
Oct 26
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/firmware/+/b4d4f044cddbf4fd97879b637af0297344703f3e commit b4d4f044cddbf4fd97879b637af0297344703f3e Author: Hung-Te Lin <hungte@chromium.org> Date: Fri Oct 26 19:14:57 2018 pack: sfx2: A new ZIP based package SFX for firmware updater The firmware updater using shar was very inefficient when the updater package goes bigger. For example, the updater for Coral has 8 images for 18 models, making a file in 47000469 bytes. Extraction (for any modes) takes 3.583s on a Z840 system. The ZIP format is well supported on most systems and has an index system that we can directly seek and extract files we need. The ZIP archive for Coral is only 33041228 bytes, and dumping the version file from archive (time unzip -p zip_file VERSION) takes only 0.004s. Also, the stub (SFX) for execution, extraction, and repacking is more easily maintained. `futility` is now linked with libzip and can access ZIP archives. For platforms without futility (for example if a developer wants to extract the contents, see manifest, or repack) we can also use zip and unzip. That also helps even viewing contents on Chromebooks using file browser. BUG= chromium:875551 TEST=None, just adding new SFX file, not applied yet. Change-Id: I850f85b39fb843fe4f9f4b0befe004b170ac01d2 Reviewed-on: https://chromium-review.googlesource.com/1223591 Commit-Ready: Hung-Te Lin <hungte@chromium.org> Tested-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> [add] https://crrev.com/b4d4f044cddbf4fd97879b637af0297344703f3e/pack/sfx2.sh [modify] https://crrev.com/b4d4f044cddbf4fd97879b637af0297344703f3e/pack/README.md
,
Oct 29
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/b01c83f68118c6d026c31a80aae99b329cb0df4f commit b01c83f68118c6d026c31a80aae99b329cb0df4f Author: Hung-Te Lin <hungte@chromium.org> Date: Mon Oct 29 18:21:43 2018 futility: updater: Fix model detection error In mosys, $(mosys platform name) currently returns the board (family) name while the real model name needs $(mosys platform model). BUG= chromium:875551 TEST=TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: Ie3355ca94d577e88a2140567b9284da40c0b39c5 Reviewed-on: https://chromium-review.googlesource.com/1301013 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/b01c83f68118c6d026c31a80aae99b329cb0df4f/futility/updater_archive.c
,
Oct 31
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/firmware/+/f5d5098fa56bdc705d95218ca04a4df784f5f29e commit f5d5098fa56bdc705d95218ca04a4df784f5f29e Author: Hung-Te Lin <hungte@chromium.org> Date: Wed Oct 31 15:17:24 2018 pack: Simplify updater5 by having all logic inside `futility update` The `futility update` command has now supported all arguments and functions that updater*.sh provides and we can replace the whole script by a single `futility update -a . "$@"` command. Note there are few legacy options not supported by futility (should be deprecated when the migration for FAFT has been completed) and are translated before invoking futility. BUG= chromium:875551 TEST=./pack_firmware_functest.sh; ./pack_firmware_unittest.sh CQ-DEPEND=CL:1301013 Change-Id: Id61fc3a42da92449ca256b34a453d321da37bb4b Reviewed-on: https://chromium-review.googlesource.com/1295070 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/f5d5098fa56bdc705d95218ca04a4df784f5f29e/pack/dist/updater5.sh
,
Nov 3
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/b7ed07b5a92a2b93eeef0d8728b9b87d4be143c3 commit b7ed07b5a92a2b93eeef0d8728b9b87d4be143c3 Author: Hung-Te Lin <hungte@chromium.org> Date: Sat Nov 03 13:17:52 2018 futility: updater: Fix model detection error In mosys, $(mosys platform name) currently returns the board (family) name while the real model name needs $(mosys platform model). BUG= chromium:875551 TEST=TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: Ie3355ca94d577e88a2140567b9284da40c0b39c5 Reviewed-on: https://chromium-review.googlesource.com/1301013 Commit-Ready: Hung-Te Lin <hungte@chromium.org> Tested-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> (cherry picked from commit b01c83f68118c6d026c31a80aae99b329cb0df4f) Reviewed-on: https://chromium-review.googlesource.com/c/1317048 Reviewed-by: Hung-Te Lin <hungte@chromium.org> Commit-Queue: Hung-Te Lin <hungte@chromium.org> Trybot-Ready: Hung-Te Lin <hungte@chromium.org> [modify] https://crrev.com/b7ed07b5a92a2b93eeef0d8728b9b87d4be143c3/futility/updater_archive.c
,
Nov 3
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/5a6139eb889234ca7119a5db19d0ffa283f4eca3 commit 5a6139eb889234ca7119a5db19d0ffa283f4eca3 Author: Hung-Te Lin <hungte@chromium.org> Date: Sat Nov 03 15:11:01 2018 vboot_reference: Add libzip as dependency Since CL:1253229, the `futility update` command can read from archives, including infozip type files. To support that, we want to include libzip as package dependency. BUG= chromium:875551 TEST=sudo emerge vboot_reference; emerge-$BOARD vboot_reference; build_image test Change-Id: I106c530905c2f6f572ac201981cce6bc2b0370f4 Reviewed-on: https://chromium-review.googlesource.com/1270379 Commit-Ready: Hung-Te Lin <hungte@chromium.org> Tested-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> (cherry picked from commit 64a7ae416b2b537179122562d5b399a3b6e80cbd) Reviewed-on: https://chromium-review.googlesource.com/c/1316969 Reviewed-by: Hung-Te Lin <hungte@chromium.org> Commit-Queue: Hung-Te Lin <hungte@chromium.org> Trybot-Ready: Hung-Te Lin <hungte@chromium.org> [modify] https://crrev.com/5a6139eb889234ca7119a5db19d0ffa283f4eca3/chromeos-base/vboot_reference/vboot_reference-9999.ebuild
,
Nov 3
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/8878c57898b187077f8354e618744765d48fde2a commit 8878c57898b187077f8354e618744765d48fde2a Author: Hung-Te Lin <hungte@chromium.org> Date: Sat Nov 03 15:11:02 2018 vboot_reference: Add libzip as dependency Since CL:1253229, the `futility update` command can read from archives, including infozip type files. To support that, we want to include libzip as package dependency. BUG= chromium:875551 TEST=sudo emerge vboot_reference; emerge-$BOARD vboot_reference; build_image test Change-Id: I106c530905c2f6f572ac201981cce6bc2b0370f4 Reviewed-on: https://chromium-review.googlesource.com/1270379 Commit-Ready: Hung-Te Lin <hungte@chromium.org> Tested-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> (cherry picked from commit 64a7ae416b2b537179122562d5b399a3b6e80cbd) Reviewed-on: https://chromium-review.googlesource.com/c/1316968 Reviewed-by: Hung-Te Lin <hungte@chromium.org> Commit-Queue: Hung-Te Lin <hungte@chromium.org> Trybot-Ready: Hung-Te Lin <hungte@chromium.org> [modify] https://crrev.com/8878c57898b187077f8354e618744765d48fde2a/chromeos-base/vboot_reference/vboot_reference-9999.ebuild
,
Nov 3
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/57d5b558daf50c07fda038a118dc20894c112ec8 commit 57d5b558daf50c07fda038a118dc20894c112ec8 Author: Hung-Te Lin <hungte@chromium.org> Date: Sat Nov 03 15:13:37 2018 vboot_reference: Add libzip as dependency Since CL:1253229, the `futility update` command can read from archives, including infozip type files. To support that, we want to include libzip as package dependency. BUG= chromium:875551 TEST=sudo emerge vboot_reference; emerge-$BOARD vboot_reference; build_image test Change-Id: I106c530905c2f6f572ac201981cce6bc2b0370f4 Reviewed-on: https://chromium-review.googlesource.com/1270379 Commit-Ready: Hung-Te Lin <hungte@chromium.org> Tested-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> (cherry picked from commit 64a7ae416b2b537179122562d5b399a3b6e80cbd) Reviewed-on: https://chromium-review.googlesource.com/c/1316970 Reviewed-by: Hung-Te Lin <hungte@chromium.org> Commit-Queue: Hung-Te Lin <hungte@chromium.org> Trybot-Ready: Hung-Te Lin <hungte@chromium.org> [modify] https://crrev.com/57d5b558daf50c07fda038a118dc20894c112ec8/chromeos-base/vboot_reference/vboot_reference-9999.ebuild
,
Nov 3
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/8bbb63926e036c7e20bd7d462bbcf260ae729308 commit 8bbb63926e036c7e20bd7d462bbcf260ae729308 Author: Hung-Te Lin <hungte@chromium.org> Date: Sat Nov 03 15:13:38 2018 vboot_reference: Add libzip as dependency Since CL:1253229, the `futility update` command can read from archives, including infozip type files. To support that, we want to include libzip as package dependency. BUG= chromium:875551 TEST=sudo emerge vboot_reference; emerge-$BOARD vboot_reference; build_image test Change-Id: I106c530905c2f6f572ac201981cce6bc2b0370f4 Reviewed-on: https://chromium-review.googlesource.com/1270379 Commit-Ready: Hung-Te Lin <hungte@chromium.org> Tested-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> (cherry picked from commit 64a7ae416b2b537179122562d5b399a3b6e80cbd) Reviewed-on: https://chromium-review.googlesource.com/c/1316972 Reviewed-by: Hung-Te Lin <hungte@chromium.org> Commit-Queue: Hung-Te Lin <hungte@chromium.org> Trybot-Ready: Hung-Te Lin <hungte@chromium.org> [modify] https://crrev.com/8bbb63926e036c7e20bd7d462bbcf260ae729308/chromeos-base/vboot_reference/vboot_reference-9999.ebuild
,
Nov 3
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/6db442b2831b3708e3d2055f850986161e735ce4 commit 6db442b2831b3708e3d2055f850986161e735ce4 Author: Hung-Te Lin <hungte@chromium.org> Date: Sat Nov 03 15:13:40 2018 vboot_reference: Add libzip as dependency Since CL:1253229, the `futility update` command can read from archives, including infozip type files. To support that, we want to include libzip as package dependency. BUG= chromium:875551 TEST=sudo emerge vboot_reference; emerge-$BOARD vboot_reference; build_image test Change-Id: I106c530905c2f6f572ac201981cce6bc2b0370f4 Reviewed-on: https://chromium-review.googlesource.com/1270379 Commit-Ready: Hung-Te Lin <hungte@chromium.org> Tested-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> (cherry picked from commit 64a7ae416b2b537179122562d5b399a3b6e80cbd) Reviewed-on: https://chromium-review.googlesource.com/c/1316971 Reviewed-by: Hung-Te Lin <hungte@chromium.org> Commit-Queue: Hung-Te Lin <hungte@chromium.org> Trybot-Ready: Hung-Te Lin <hungte@chromium.org> [modify] https://crrev.com/6db442b2831b3708e3d2055f850986161e735ce4/chromeos-base/vboot_reference/vboot_reference-9999.ebuild
,
Nov 3
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/049a7b1eac67e828d94cf57720dc1d0389bfede4 commit 049a7b1eac67e828d94cf57720dc1d0389bfede4 Author: Hung-Te Lin <hungte@chromium.org> Date: Sat Nov 03 15:16:14 2018 vboot_reference: Add libzip as dependency Since CL:1253229, the `futility update` command can read from archives, including infozip type files. To support that, we want to include libzip as package dependency. BUG= chromium:875551 TEST=sudo emerge vboot_reference; emerge-$BOARD vboot_reference; build_image test Change-Id: I106c530905c2f6f572ac201981cce6bc2b0370f4 Reviewed-on: https://chromium-review.googlesource.com/1270379 Commit-Ready: Hung-Te Lin <hungte@chromium.org> Tested-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> (cherry picked from commit 64a7ae416b2b537179122562d5b399a3b6e80cbd) Reviewed-on: https://chromium-review.googlesource.com/c/1316975 Reviewed-by: Hung-Te Lin <hungte@chromium.org> Commit-Queue: Hung-Te Lin <hungte@chromium.org> Trybot-Ready: Hung-Te Lin <hungte@chromium.org> [modify] https://crrev.com/049a7b1eac67e828d94cf57720dc1d0389bfede4/chromeos-base/vboot_reference/vboot_reference-9999.ebuild
,
Nov 3
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/45e46d652bfadb7670b982ac2b7220574f7d03c3 commit 45e46d652bfadb7670b982ac2b7220574f7d03c3 Author: Hung-Te Lin <hungte@chromium.org> Date: Sat Nov 03 15:16:16 2018 vboot_reference: Add libzip as dependency Since CL:1253229, the `futility update` command can read from archives, including infozip type files. To support that, we want to include libzip as package dependency. BUG= chromium:875551 TEST=sudo emerge vboot_reference; emerge-$BOARD vboot_reference; build_image test Change-Id: I106c530905c2f6f572ac201981cce6bc2b0370f4 Reviewed-on: https://chromium-review.googlesource.com/1270379 Commit-Ready: Hung-Te Lin <hungte@chromium.org> Tested-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> (cherry picked from commit 64a7ae416b2b537179122562d5b399a3b6e80cbd) Reviewed-on: https://chromium-review.googlesource.com/c/1316973 Reviewed-by: Hung-Te Lin <hungte@chromium.org> Commit-Queue: Hung-Te Lin <hungte@chromium.org> Trybot-Ready: Hung-Te Lin <hungte@chromium.org> [modify] https://crrev.com/45e46d652bfadb7670b982ac2b7220574f7d03c3/chromeos-base/vboot_reference/vboot_reference-9999.ebuild
,
Nov 3
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/584e5312dcbc2a72213617b181847fbd1bdd9f93 commit 584e5312dcbc2a72213617b181847fbd1bdd9f93 Author: Hung-Te Lin <hungte@chromium.org> Date: Sat Nov 03 15:16:17 2018 vboot_reference: Add libzip as dependency Since CL:1253229, the `futility update` command can read from archives, including infozip type files. To support that, we want to include libzip as package dependency. BUG= chromium:875551 TEST=sudo emerge vboot_reference; emerge-$BOARD vboot_reference; build_image test Change-Id: I106c530905c2f6f572ac201981cce6bc2b0370f4 Reviewed-on: https://chromium-review.googlesource.com/1270379 Commit-Ready: Hung-Te Lin <hungte@chromium.org> Tested-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> (cherry picked from commit 64a7ae416b2b537179122562d5b399a3b6e80cbd) Reviewed-on: https://chromium-review.googlesource.com/c/1316974 Reviewed-by: Hung-Te Lin <hungte@chromium.org> Commit-Queue: Hung-Te Lin <hungte@chromium.org> Trybot-Ready: Hung-Te Lin <hungte@chromium.org> [modify] https://crrev.com/584e5312dcbc2a72213617b181847fbd1bdd9f93/chromeos-base/vboot_reference/vboot_reference-9999.ebuild
,
Nov 25
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/356d5f1c866655af435400da91ecb6010f96ceb9 commit 356d5f1c866655af435400da91ecb6010f96ceb9 Author: Hung-Te Lin <hungte@chromium.org> Date: Sun Nov 25 03:21:29 2018 futility: updater: Revise output messages for debug logs In auto update and recovery, the firmware updater was executed with both stdout and stderr logged. However, the logs usually comes with all stderr first then all stdout. This makes it harder to debug because the messages logged in out of order. TO solve that, few macros are introduced: INFO: for useful information. STATUS: the most common information, usually comes with a prefix code. And all messages should now go to stderr except the final execution result (and those output commands, for example --manifest). BUG= chromium:875551 TEST=TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility CQ-DEPEND=CL:1345250 BRANCH=None Change-Id: Ie0dc6594ece10e7e15caf9c36353e2b3ec8754c5 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1345611 Reviewed-by: Youcheng Syu <youcheng@chromium.org> [modify] https://crrev.com/356d5f1c866655af435400da91ecb6010f96ceb9/futility/updater.h [modify] https://crrev.com/356d5f1c866655af435400da91ecb6010f96ceb9/futility/cmd_update.c [modify] https://crrev.com/356d5f1c866655af435400da91ecb6010f96ceb9/futility/updater_archive.c [modify] https://crrev.com/356d5f1c866655af435400da91ecb6010f96ceb9/futility/updater.c [modify] https://crrev.com/356d5f1c866655af435400da91ecb6010f96ceb9/futility/updater_quirks.c
,
Nov 27
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/ba37ad250c708624ac83de00f3c41e2852122ed9 commit ba37ad250c708624ac83de00f3c41e2852122ed9 Author: Hung-Te Lin <hungte@chromium.org> Date: Tue Nov 27 15:57:51 2018 futility: updater: Revise error message when model is not defined in manifest "Model '%s' is not defined in manifest." is not very easy to understand for people who are debugging devices in early stages. We should provide better instructions. For example, running with Coral updater will now show: ERROR: manifest_find_model: Cannot get model name. You are probably running an image for wrong board, or a device in early stage that 'mosys' command is not ready, or image from old (or factory) branches that Unified Build config is not updated yet for 'mosys'. Please check command 'mosys platform model', which should output one of the supported models below: unprovisioned_meep sparky orbatrix unprovisioned_fleex grabbiter bobba unprovisioned_bobba mimrock fleex meep yorp phaser360 sparky360 phaser bobba360 unprovisioned_phaser bip BUG= chromium:875551 TEST=TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: Ib17fcb654d1530b94c44cf21aaa28717841f11ed Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1351171 Reviewed-by: Cheng-Han Yang <chenghan@chromium.org> Reviewed-by: Ting Shen <phoenixshen@chromium.org> [modify] https://crrev.com/ba37ad250c708624ac83de00f3c41e2852122ed9/futility/updater_archive.c [modify] https://crrev.com/ba37ad250c708624ac83de00f3c41e2852122ed9/tests/futility/test_update.sh
,
Nov 30
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/36fb82c7cba832008152dc33429af30f39d5d3dd commit 36fb82c7cba832008152dc33429af30f39d5d3dd Author: Hung-Te Lin <hungte@chromium.org> Date: Fri Nov 30 16:00:45 2018 futility: updater: Revise error message when model is not defined in manifest "Model '%s' is not defined in manifest." is not very easy to understand for people who are debugging devices in early stages. We should provide better instructions. For example, running with Coral updater will now show: ERROR: manifest_find_model: Cannot get model name. You are probably running an image for wrong board, or a device in early stage that 'mosys' command is not ready, or image from old (or factory) branches that Unified Build config is not updated yet for 'mosys'. Please check command 'mosys platform model', which should output one of the supported models below: unprovisioned_meep sparky orbatrix unprovisioned_fleex grabbiter bobba unprovisioned_bobba mimrock fleex meep yorp phaser360 sparky360 phaser bobba360 unprovisioned_phaser bip BUG= chromium:875551 TEST=TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: Ib17fcb654d1530b94c44cf21aaa28717841f11ed Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1351171 Reviewed-by: Cheng-Han Yang <chenghan@chromium.org> Reviewed-by: Ting Shen <phoenixshen@chromium.org> Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/1355750 Reviewed-by: Furquan Shaikh <furquan@chromium.org> Commit-Queue: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org> Trybot-Ready: Furquan Shaikh <furquan@chromium.org> [modify] https://crrev.com/36fb82c7cba832008152dc33429af30f39d5d3dd/futility/updater_archive.c [modify] https://crrev.com/36fb82c7cba832008152dc33429af30f39d5d3dd/tests/futility/test_update.sh
,
Dec 9
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/firmware/+/937cfd3a79d407473ccaa05d667924f6b7ac58a2 commit 937cfd3a79d407473ccaa05d667924f6b7ac58a2 Author: Hung-Te Lin <hungte@chromium.org> Date: Sun Dec 09 18:09:15 2018 pack_firmware: Remove unused version info from setvars The version info in setvars is no longer used by updater. BUG= chromium:875551 TEST=./pack_firmware_unittest.py; ./pack_firmware_functest.py Change-Id: I896bd7999b1faae5537cecf14a46041cf21869c6 Reviewed-on: https://chromium-review.googlesource.com/1356924 Commit-Ready: Hung-Te Lin <hungte@chromium.org> Tested-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Evan Hernandez <evanhernandez@chromium.org> [modify] https://crrev.com/937cfd3a79d407473ccaa05d667924f6b7ac58a2/pack/setvars_template [modify] https://crrev.com/937cfd3a79d407473ccaa05d667924f6b7ac58a2/pack_firmware_functest.py [modify] https://crrev.com/937cfd3a79d407473ccaa05d667924f6b7ac58a2/pack_firmware.py [modify] https://crrev.com/937cfd3a79d407473ccaa05d667924f6b7ac58a2/pack_firmware_utils.py
Showing comments 4 - 103
of 103
Older ›
|
||||||||||||||||
►
Sign in to add a comment |
||||||||||||||||