New issue
Advanced search Search tips

Issue 713599 link

Starred by 1 user

Issue metadata

Status: Archived
Owner:
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

Move netboot_firmware_settings.py from factory repo to dev repo.

Project Member Reported by hungte@chromium.org, Apr 20 2017

Issue description

Background in https://chromium-review.googlesource.com/#/c/476531/ .

We should move src/platform/factory/setup/netboot_firmware_settings.py to  platform/dev, and change factory setup repo to be a symlink to dev. Since factory is currently built as "out-of-tree", we may also need to change the src/platform/factory/Makefile to defer setup/netboot_firmware_settings.py properly, using the version installed by platform/dev.

Then we may change chromeos-bootimage to stop using factory as cros_workon source - just use the installed dev host tools.
 

Comment 1 by sjg@chromium.org, May 16 2017

Owner: ddavenp...@chromium.org
Drew - possible next bug
Could you please clarify the part about "change factory setup repo to be a symlink to dev"? Since platform/factory and platform/dev are in different git repositories, I'm not sure how this could be done.

There appear to be other tools in factory/setup that reference netboot_firmware_settings.py. From the documentation and directory structure, it looks like the stuff in factory/setup is meant to be kept together (and maybe distributed to factories by itself?).

Thanks for the clarification.


I also noticed that there are two copies of fmap.py - one under factory/py/gooftool (which has a symlink in factory/setup), and another in third_party/flashmap. It looks like the one in factory has added an optional parameter to fmap_decode and ability to specify the test filename (among other formatting changes).

Can (should?) these changes be patched into the flashmap repository and remove the duplicate fmap.py from the factory repository?

Comment 4 by hungte@chromium.org, May 24 2017

Re#2

Just like how we did with chromeos-common.sh (which we've removed anyway). Have a link to ../../dev/.../XXX, and solve it when building the output in Makefile. 

Note factory is built out-of-tree in ebuild now, so symlink may not work in Makefile, we have copy directly from chroot.

Yes the factory/setup wants things to keep together for deployment, but it's ok if the file is a symlink from other repo (we had few files done in this way before).

You are free to send the patches to upstream flashmap.
Filed crbug/726356 for upstreaming and de-duping fmap.py
Project Member

Comment 6 by bugdroid1@chromium.org, Jun 14 2017

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

commit c4e868e7127c54b2920f18e166482a7f92a5f0ec
Author: Drew Davenport <ddavenport@chromium.org>
Date: Wed Jun 14 06:30:08 2017

factory: Move netboot_firmware_settings.py to dev

- Update fmap.py from upstream and add a comment
  about making changes to uptream
- Move netboot_firmware_settings.py to platform/dev and
  make the one in setup a symlink
- Don't add symlinks to external projects to the tar, since
  they may not be valid. Get the file from the source tree
  directly.

BUG= chromium:713599 
TEST=make test
TEST=make BOARD=snappy toolkit
TEST=emerge-snappy factory
CQ-DEPEND=CL:517246, CL:522389

Change-Id: I3b8da4a459c394cd9eb5a79dae1148b68b4994ee
Reviewed-on: https://chromium-review.googlesource.com/517363
Commit-Ready: Drew Davenport <ddavenport@chromium.org>
Tested-by: Drew Davenport <ddavenport@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Drew Davenport <ddavenport@chromium.org>

[rewrite] https://crrev.com/c4e868e7127c54b2920f18e166482a7f92a5f0ec/setup/netboot_firmware_settings.py
[add] https://crrev.com/c4e868e7127c54b2920f18e166482a7f92a5f0ec/devtools/mk/external_symlinks.lst
[modify] https://crrev.com/c4e868e7127c54b2920f18e166482a7f92a5f0ec/Makefile
[modify] https://crrev.com/c4e868e7127c54b2920f18e166482a7f92a5f0ec/py/gooftool/fmap.py

Project Member

Comment 7 by bugdroid1@chromium.org, Jun 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/dev-util/+/02b9608faddfe1680fe1f4bc2f6a1d749d45c466

commit 02b9608faddfe1680fe1f4bc2f6a1d749d45c466
Author: Drew Davenport <ddavenport@chromium.org>
Date: Wed Jun 14 06:30:08 2017

Add netboot_firmware_settings.py

Moved unmodified from factory repository. Will fix
python linter errors in follow-up CL.

BUG= chromium:713599 
TEST=none

Change-Id: I76a9ef0dc51c332458a1f481b9cdfe08ab52ead6
Reviewed-on: https://chromium-review.googlesource.com/517245
Commit-Ready: Drew Davenport <ddavenport@chromium.org>
Tested-by: Drew Davenport <ddavenport@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[add] https://crrev.com/02b9608faddfe1680fe1f4bc2f6a1d749d45c466/host/netboot_firmware_settings.py

Project Member

Comment 8 by bugdroid1@chromium.org, Jun 14 2017

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

commit 27e2f2a88f7f3cf27c7aeac8ccda85c46327a689
Author: Drew Davenport <ddavenport@chromium.org>
Date: Wed Jun 14 06:30:08 2017

chromeos-bootimage: Make non-cros_workon

- Install netboot_firmware_settings.py into chroot
- Install fmap.py into site-packages in chroot
- Make chromeos-bootimage non-cros_workon since it no
  longer needs to use factory as its cros_workon project
- Pass CROS_WORKON_SRCROOT to factory Makefile to resolve
  external symlink

BUG= chromium:713599 
TEST=emerge-snappy chromeos-bootimage
CQ-DEPEND=CL:517246

Change-Id: I0065c74493823c948c7250015931a07d007a07ff
Reviewed-on: https://chromium-review.googlesource.com/522389
Commit-Ready: Drew Davenport <ddavenport@chromium.org>
Tested-by: Drew Davenport <ddavenport@chromium.org>
Reviewed-by: Drew Davenport <ddavenport@chromium.org>

[rename] https://crrev.com/27e2f2a88f7f3cf27c7aeac8ccda85c46327a689/sys-boot/chromeos-bootimage/chromeos-bootimage-0.0.3.ebuild
[delete] https://crrev.com/3fede179cc97f43f94980553976abb09b8bb27a3/sys-boot/chromeos-bootimage/chromeos-bootimage-0.0.2-r1657.ebuild
[add] https://crrev.com/27e2f2a88f7f3cf27c7aeac8ccda85c46327a689/sys-boot/chromeos-bootimage/chromeos-bootimage-0.0.3-r1.ebuild
[modify] https://crrev.com/27e2f2a88f7f3cf27c7aeac8ccda85c46327a689/chromeos-base/cros-devutils/cros-devutils-9999.ebuild
[modify] https://crrev.com/27e2f2a88f7f3cf27c7aeac8ccda85c46327a689/sys-apps/flashmap/flashmap-9999.ebuild
[modify] https://crrev.com/27e2f2a88f7f3cf27c7aeac8ccda85c46327a689/chromeos-base/factory/factory-9999.ebuild
[modify] https://crrev.com/27e2f2a88f7f3cf27c7aeac8ccda85c46327a689/chromeos-base/factory-mini/factory-mini-9999.ebuild

Project Member

Comment 9 by bugdroid1@chromium.org, Jun 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/dev-util/+/3a9622e6c568753f9683d462de619133d8b96de1

commit 3a9622e6c568753f9683d462de619133d8b96de1
Author: Drew Davenport <ddavenport@chromium.org>
Date: Thu Jun 15 18:40:45 2017

netboot_firmware_settings.py: Prepend cwd to path

- Support running this tool from a symlink in factory

BUG= chromium:713599 
TEST=ran platform/factory/setup/netboot_firmware_settings.py

Change-Id: Ie388d02e9144af850e447a6819af04107f52d6bf
Reviewed-on: https://chromium-review.googlesource.com/535059
Commit-Ready: Drew Davenport <ddavenport@chromium.org>
Tested-by: Drew Davenport <ddavenport@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/3a9622e6c568753f9683d462de619133d8b96de1/host/netboot_firmware_settings.py

Status: Fixed (was: Available)
Project Member

Comment 11 by bugdroid1@chromium.org, Jun 30 2017

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

commit 8e480e7579d26da69d61ab60e941a862f12094d9
Author: Drew Davenport <ddavenport@chromium.org>
Date: Fri Jun 30 05:01:15 2017

factory: Fix for factory in minilayout

- Ignore unsafe symlinks when rsyncing the setup
  directory
- Resolve other symlinks after rsync, since there are no
  flags to resolve "safe" symlinks and ignore "unsafe" ones

BUG= chromium:713599 
TEST=make test
TEST=`emerge-snappy factory` in minilayout after creating a
    patch and applying it to factory.ebuild

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

[modify] https://crrev.com/8e480e7579d26da69d61ab60e941a862f12094d9/devtools/mk/bundle.sh

Comment 12 by sjg@google.com, Jul 5 2017

Labels: Team-BLD

Comment 13 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Sign in to add a comment