New issue
Advanced search Search tips

Issue 685706 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature

Blocking:
issue 680153
issue 685670



Sign in to add a comment

Support unified builds with depthcharge

Project Member Reported by sjg@chromium.org, Jan 26 2017

Issue description

Add support for building the depthcharge ELF images for multiple models (using reef).

This involves updating the depthcharge ebuild to build for all models supported by the board, when USE=uniboard is enabled.

 

Comment 1 by sjg@chromium.org, Jan 26 2017

Blocking: 680153

Comment 2 by sjg@chromium.org, Jan 26 2017

Blocking: 685670
Project Member

Comment 3 by bugdroid1@chromium.org, Feb 8 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/depthcharge/+/4513fac4ef06859b69bf2fa13c6c05556c558f76

commit 4513fac4ef06859b69bf2fa13c6c05556c558f76
Author: Simon Glass <sjg@chromium.org>
Date: Wed Feb 08 19:29:48 2017

Ensure that vboot is built in the expected directory

At present the vboot Makefile is called with a relative path, but since
it does not (appear to) run in the current directory, it can output files
into the wrong directory.

Pass the vboot Makefile an absolute path to resolve this problem. This
allows us (for example) to build depthcharge with a non-absolute directory
path.

BUG= chromium:685706 
BRANCH=none
TEST=emerge-reef --nodeps depthcharge; see that it builds OK

Signed-off-by: Simon Glass <sjg@chromium.org>

Change-Id: I5e363acea85608ff4f3e30550a578c9ae875f734
Reviewed-on: https://chromium-review.googlesource.com/433342
Commit-Ready: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>

[modify] https://crrev.com/4513fac4ef06859b69bf2fa13c6c05556c558f76/src/vboot/Makefile.inc

Project Member

Comment 4 by bugdroid1@chromium.org, Feb 9 2017

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

commit d54344f91d93d6a5fb6c2534bf96ed0ac4e255e6
Author: Simon Glass <sjg@chromium.org>
Date: Thu Feb 09 22:58:25 2017

depthcharge: Move the board selection code into a function

Rather than repeating the code twice, but it in a function and use it when
needed.

BUG= chromium:685706 
BRANCH=none
TEST=emerge-reef --nodeps depthcharge;
find /build/reef/firmware -name "depth*" -or -name "netboot*" -or -name "dev*" | sort
/build/reef/firmware/depthcharge
/build/reef/firmware/depthcharge.config
/build/reef/firmware/depthcharge/depthcharge.elf
/build/reef/firmware/depthcharge/depthcharge.elf.map
/build/reef/firmware/depthcharge/dev.elf
/build/reef/firmware/depthcharge/dev.elf.map
/build/reef/firmware/depthcharge/netboot.elf
/build/reef/firmware/depthcharge/netboot.elf.map

Change-Id: I93372ca7872e4c22163dc9eb779f374eefde3dd2
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/433521
Reviewed-by: Aaron Durbin <adurbin@chromium.org>

[modify] https://crrev.com/d54344f91d93d6a5fb6c2534bf96ed0ac4e255e6/sys-boot/depthcharge/depthcharge-9999.ebuild

Project Member

Comment 5 by bugdroid1@chromium.org, Feb 9 2017

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

commit 4d319b46465c91064e9582ff21668312db953d82
Author: Simon Glass <sjg@chromium.org>
Date: Thu Feb 09 22:58:26 2017

depthcharge: Use a function to avoid repeating options

The same options are used four times. Create a function to avoid repeating
this code. This means we pass these variables to all emake stages, rather
than just those that build the code. This will allow us to pass obj=<path>
(in a future commit) and have it do the right thing.

BUG= chromium:685706 
BRANCH=none
TEST=emerge-reef --nodeps depthcharge;
$ find /build/reef/firmware -name "depth*" -or -name "netboot*" -or -name "dev*" -or -name .config | sort
/build/reef/firmware/depthcharge
/build/reef/firmware/depthcharge.config
/build/reef/firmware/depthcharge/depthcharge.elf
/build/reef/firmware/depthcharge/depthcharge.elf.map
/build/reef/firmware/depthcharge/dev.elf
/build/reef/firmware/depthcharge/dev.elf.map
/build/reef/firmware/depthcharge/netboot.elf
/build/reef/firmware/depthcharge/netboot.elf.map

Change-Id: Icfc6f31cf2df033207f36763be215bb0de9bf539
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/433522
Reviewed-by: Aaron Durbin <adurbin@chromium.org>

[modify] https://crrev.com/4d319b46465c91064e9582ff21668312db953d82/sys-boot/depthcharge/depthcharge-9999.ebuild

Project Member

Comment 6 by bugdroid1@chromium.org, Feb 9 2017

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

commit 3b6b2c6370ab18584b34f3bb4a2702e8d4db31e3
Author: Simon Glass <sjg@chromium.org>
Date: Thu Feb 09 22:58:26 2017

depthcharge: Specify the build directory

Build the output in a 'build' directory. This is the default anyway, but
it identified a bug in the Makefile, so it seems good to put this in a
separate change.

Refactor dc_make() to have parameters for the target, builddir, etc.

BUG= chromium:685706 
BRANCH=none
TEST=emerge-reef --nodeps depthcharge;
$ find /build/reef/firmware -name "depth*" -or -name "netboot*" -or -name "dev*" -or -name .config | sort
/build/reef/firmware/depthcharge
/build/reef/firmware/depthcharge.config
/build/reef/firmware/depthcharge/depthcharge.elf
/build/reef/firmware/depthcharge/depthcharge.elf.map
/build/reef/firmware/depthcharge/dev.elf
/build/reef/firmware/depthcharge/dev.elf.map
/build/reef/firmware/depthcharge/netboot.elf
/build/reef/firmware/depthcharge/netboot.elf.map

Change-Id: I13235bf6f4f71642d34adbddcc3b4388ee0cc368
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/433523
Reviewed-by: Aaron Durbin <adurbin@chromium.org>

[modify] https://crrev.com/3b6b2c6370ab18584b34f3bb4a2702e8d4db31e3/sys-boot/depthcharge/depthcharge-9999.ebuild

Project Member

Comment 7 by bugdroid1@chromium.org, Feb 11 2017

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

commit 71f18c5b158ab58cf3b026462ca4129c58a7e79e
Author: Simon Glass <sjg@chromium.org>
Date: Sat Feb 11 17:26:23 2017

depthcharge: Move building into a separate function

With unified builds we want to build multiple images, one for each
supported model. In preparation for this, move building of the images into
a separate function.

Drop the 'tc-getCC' call at the same time. It outputs the toolchain but
does not set the CC environment variable, so does not seem useful.

Add a few comments as well.

BUG= chromium:685706 
BRANCH=none
TEST=emerge-reef --nodeps depthcharge;
$ find /build/reef/firmware -name "depth*" -or -name "netboot*" -or -name "dev*" -or -name .config | sort
/build/reef/firmware/depthcharge
/build/reef/firmware/depthcharge.config
/build/reef/firmware/depthcharge/depthcharge.elf
/build/reef/firmware/depthcharge/depthcharge.elf.map
/build/reef/firmware/depthcharge/dev.elf
/build/reef/firmware/depthcharge/dev.elf.map
/build/reef/firmware/depthcharge/netboot.elf
/build/reef/firmware/depthcharge/netboot.elf.map

Change-Id: I6945f5345d2f19c3c0dd60eca2087b6e55f2bb7a
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/433524
Reviewed-by: Aaron Durbin <adurbin@chromium.org>

[modify] https://crrev.com/71f18c5b158ab58cf3b026462ca4129c58a7e79e/sys-boot/depthcharge/depthcharge-9999.ebuild

Project Member

Comment 8 by bugdroid1@chromium.org, Feb 11 2017

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

commit 05af49dcbd06eda651ff973f268c538aa6c4e74c
Author: Simon Glass <sjg@chromium.org>
Date: Sat Feb 11 17:26:23 2017

depthcharge: Copy the .config file into the right place

Depthcharge's Makefile puts the .config in the current directory. We would
like it in the build directory, so that it will not be overwritten by
future builds.

Copy it there after it is created and drop the special case for .config in
the install step.

BUG= chromium:685706 
BRANCH=none
TEST=emerge-reef --nodeps depthcharge;
$ find /build/reef/firmware -name "depth*" -or -name "netboot*" -or -name "dev*"  | sort
/build/reef/firmware/depthcharge
/build/reef/firmware/depthcharge/depthcharge.config
/build/reef/firmware/depthcharge/depthcharge.elf
/build/reef/firmware/depthcharge/depthcharge.elf.map
/build/reef/firmware/depthcharge/dev.elf
/build/reef/firmware/depthcharge/dev.elf.map
/build/reef/firmware/depthcharge/netboot.elf
/build/reef/firmware/depthcharge/netboot.elf.map

Change-Id: I12877185cbacca32c7dea0612fad3e2e229c2130
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/433525
Reviewed-by: Aaron Durbin <adurbin@chromium.org>

[modify] https://crrev.com/05af49dcbd06eda651ff973f268c538aa6c4e74c/sys-boot/depthcharge/depthcharge-9999.ebuild

Project Member

Comment 9 by bugdroid1@chromium.org, Feb 11 2017

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

commit 30720e9608fb2a3eb4a700df5e3b0cfbcb3818c3
Author: Simon Glass <sjg@chromium.org>
Date: Sat Feb 11 17:26:24 2017

depthcharge: Move the install code into a separate function

With unified builds we want to install depthcharge for all models. As a
first step, move the install code into a separate function.

BUG= chromium:685706 
BRANCH=none
TEST=emerge-reef --nodeps depthcharge;
$ find /build/reef/firmware -name "depth*" -or -name "netboot*" -or -name "dev*" -or -name .config | sort
/build/reef/firmware/depthcharge
/build/reef/firmware/depthcharge/.config
/build/reef/firmware/depthcharge/depthcharge.elf
/build/reef/firmware/depthcharge/depthcharge.elf.map
/build/reef/firmware/depthcharge/dev.elf
/build/reef/firmware/depthcharge/dev.elf.map
/build/reef/firmware/depthcharge/netboot.elf
/build/reef/firmware/depthcharge/netboot.elf.map

Change-Id: I40a78752e289c0d42b8791f4657e1b370dc7d1a9
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/433526
Reviewed-by: Aaron Durbin <adurbin@chromium.org>

[modify] https://crrev.com/30720e9608fb2a3eb4a700df5e3b0cfbcb3818c3/sys-boot/depthcharge/depthcharge-9999.ebuild

Project Member

Comment 10 by bugdroid1@chromium.org, Feb 11 2017

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

commit 26b3de1b0b7cd5625bba679d0372be3aed4eac83
Author: Simon Glass <sjg@chromium.org>
Date: Sat Feb 11 23:04:41 2017

depthcharge: Add support for unified builds

When unified builds is active, build and install depthcharge for all
models.

BUG= chromium:685706 
BRANCH=none
TEST=emerge-reef --nodeps depthcharge;
$ find /build/reef/firmware -name "depth*" -or -name "netboot*" -or -name "dev*" -or -name .config | sort
/build/reef/firmware/depthcharge
/build/reef/firmware/depthcharge/.config
/build/reef/firmware/depthcharge/depthcharge.elf
/build/reef/firmware/depthcharge/depthcharge.elf.map
/build/reef/firmware/depthcharge/dev.elf
/build/reef/firmware/depthcharge/dev.elf.map
/build/reef/firmware/depthcharge/netboot.elf
/build/reef/firmware/depthcharge/netboot.elf.map

$ USE=unibuild emerge-reef --nodeps depthcharge;
$ find /build/reef/firmware -name "depth*" -or -name "netboot*" -or -name "dev*" -or -name .config | sort
/build/reef/firmware/pyro/depthcharge
/build/reef/firmware/pyro/depthcharge/.config
/build/reef/firmware/pyro/depthcharge/depthcharge.elf
/build/reef/firmware/pyro/depthcharge/depthcharge.elf.map
/build/reef/firmware/pyro/depthcharge/dev.elf
/build/reef/firmware/pyro/depthcharge/dev.elf.map
/build/reef/firmware/pyro/depthcharge/netboot.elf
/build/reef/firmware/pyro/depthcharge/netboot.elf.map
/build/reef/firmware/reef/depthcharge
/build/reef/firmware/reef/depthcharge/.config
/build/reef/firmware/reef/depthcharge/depthcharge.elf
/build/reef/firmware/reef/depthcharge/depthcharge.elf.map
/build/reef/firmware/reef/depthcharge/dev.elf
/build/reef/firmware/reef/depthcharge/dev.elf.map
/build/reef/firmware/reef/depthcharge/netboot.elf
/build/reef/firmware/reef/depthcharge/netboot.elf.map
/build/reef/firmware/snappy/depthcharge
/build/reef/firmware/snappy/depthcharge/.config
/build/reef/firmware/snappy/depthcharge/depthcharge.elf
/build/reef/firmware/snappy/depthcharge/depthcharge.elf.map
/build/reef/firmware/snappy/depthcharge/dev.elf
/build/reef/firmware/snappy/depthcharge/dev.elf.map
/build/reef/firmware/snappy/depthcharge/netboot.elf
/build/reef/firmware/snappy/depthcharge/netboot.elf.map

Change-Id: I5ab67b41436fa34e3d1073458a56184d97f40f14
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/433527
Reviewed-by: Aaron Durbin <adurbin@chromium.org>

[modify] https://crrev.com/26b3de1b0b7cd5625bba679d0372be3aed4eac83/sys-boot/depthcharge/depthcharge-9999.ebuild

Comment 11 by sjg@chromium.org, Feb 13 2017

Status: Started (was: Available)

Comment 12 by sjg@chromium.org, Feb 13 2017

Status: Fixed (was: Started)

Sign in to add a comment