New issue
Advanced search Search tips

Issue 837561 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

factory: Easy way to customize factory installers.

Project Member Reported by hungte@chromium.org, Apr 27 2018

Issue description

Currently in order to customize factory_shim or netboot, we have to override virtual and create ebuilds. This is somehow not very easy for partners. And we can expect this to be more common in future, due to Unified Build.

Planned changes:

 - Everything for customization should be in overlay:factory-board/files
 - factory_installer knows how to integrate files
 - initramfs/netboot knows how to integrate files more easily.

Current proposal with minimal changes:

 - files/installer should contain the structure to overlay in factory_install rootfs, and create the installer.tar factory resource.
 - factory_installer takes all files from there.
 - netboot installs factory_* (or take the resource as well?)

Meanwhile, we'll need to change board_customize_install to factory_install_board.sh, so netboot can find it easily.
 
Cc: marcochen@chromium.org
Project Member

Comment 2 by bugdroid1@chromium.org, Apr 30 2018

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

commit 53a6edbd4baa1f37f88e55b4fcacce69aef9411a
Author: Hung-Te Lin <hungte@chromium.org>
Date: Mon Apr 30 07:17:15 2018

factory_installer: Change customization file name to factory_install_board.sh

For easier integration, we should prefix 'factory-' to the customization
file name.

BUG= chromium:837561 
TEST=None

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

[modify] https://crrev.com/53a6edbd4baa1f37f88e55b4fcacce69aef9411a/factory_install.sh

Project Member

Comment 3 by bugdroid1@chromium.org, Apr 30 2018

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

commit 77ab714547d52d726ed389e0d0aa4a4d03ab0702
Author: Hung-Te Lin <hungte@chromium.org>
Date: Mon Apr 30 07:24:26 2018

Makefile: Revise resource system to a more easily customized way.

The factory-board and resource system has enabled Chromium OS factory
software to be easily customized. But to add files to the factory
related packages, for example chromeos-base/factory_installer or netboot
initramfs, we have to create a dedicated ebuild file and deal with the
portage virtual package system, which is pretty difficult for partners.

As a result, we want to generalize the resource system so all factory
related customization can be done in a single factory-board package.

The new folder 'resources' and the *.rsrc files are the new way to
construct resource tarball. Each *.rsrc contains the declaration of a
resource file - either from SYSROOT or BOARD_FILES_DIR or public repo.

BUG= chromium:837561 
TEST=make test; make resource

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

[add] https://crrev.com/77ab714547d52d726ed389e0d0aa4a4d03ab0702/resources/installer.rsrc
[add] https://crrev.com/77ab714547d52d726ed389e0d0aa4a4d03ab0702/devtools/mk/create_resources.py
[modify] https://crrev.com/77ab714547d52d726ed389e0d0aa4a4d03ab0702/Makefile
[add] https://crrev.com/77ab714547d52d726ed389e0d0aa4a4d03ab0702/resources/README.md

Comment 4 by hungte@chromium.org, Apr 30 2018

Cc: chromeos-factory-eng@google.com
Status: Fixed (was: Untriaged)
Changes for poppy factory branch were all merged. 

I have few minor CLs to improve more on ToT, but those are optional.
Project Member

Comment 5 by bugdroid1@chromium.org, Apr 30 2018

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

commit 79bb1fa6be9ab790f914fb1ba4e612a9d95ec7ab
Author: Hung-Te Lin <hungte@chromium.org>
Date: Mon Apr 30 08:18:08 2018

Makefile: Revise resource system to a more easily customized way.

The factory-board and resource system has enabled Chromium OS factory
software to be easily customized. But to add files to the factory
related packages, for example chromeos-base/factory_installer or netboot
initramfs, we have to create a dedicated ebuild file and deal with the
portage virtual package system, which is pretty difficult for partners.

As a result, we want to generalize the resource system so all factory
related customization can be done in a single factory-board package.

The new folder 'resources' and the *.rsrc files are the new way to
construct resource tarball. Each *.rsrc contains the declaration of a
resource file - either from SYSROOT or BOARD_FILES_DIR or public repo.

BUG= chromium:837561 
TEST=make test; make resource

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

[add] https://crrev.com/79bb1fa6be9ab790f914fb1ba4e612a9d95ec7ab/resources/installer.rsrc
[add] https://crrev.com/79bb1fa6be9ab790f914fb1ba4e612a9d95ec7ab/devtools/mk/create_resources.py
[modify] https://crrev.com/79bb1fa6be9ab790f914fb1ba4e612a9d95ec7ab/Makefile
[add] https://crrev.com/79bb1fa6be9ab790f914fb1ba4e612a9d95ec7ab/resources/README.md

Project Member

Comment 6 by bugdroid1@chromium.org, Apr 30 2018

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

commit f31ad8f45e6d159b2ced78f498d7cf6ec1356ade
Author: Hung-Te Lin <hungte@chromium.org>
Date: Mon Apr 30 08:20:12 2018

factory_installer: Change customization file name to factory_install_board.sh

For easier integration, we should prefix 'factory-' to the customization
file name.

BUG= chromium:837561 
TEST=None

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

[modify] https://crrev.com/f31ad8f45e6d159b2ced78f498d7cf6ec1356ade/factory_install.sh

Project Member

Comment 7 by bugdroid1@chromium.org, Apr 30 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory_installer/+/5483c658666cf14ef184fd531fcc93af4f658493

commit 5483c658666cf14ef184fd531fcc93af4f658493
Author: Hung-Te Lin <hungte@chromium.org>
Date: Mon Apr 30 11:02:24 2018

factory_installer: Change customization file name to factory_install_board.sh

For easier integration, we should prefix 'factory-' to the customization
file name.

BUG= chromium:837561 
TEST=None

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

[modify] https://crrev.com/5483c658666cf14ef184fd531fcc93af4f658493/factory_install.sh

Project Member

Comment 8 by bugdroid1@chromium.org, Apr 30 2018

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

commit e7523ebdc9dc8647a150b6e96b53ffbe5738ba95
Author: Hung-Te Lin <hungte@chromium.org>
Date: Mon Apr 30 14:05:13 2018

Makefile: Revise resource system to a more easily customized way.

The factory-board and resource system has enabled Chromium OS factory
software to be easily customized. But to add files to the factory
related packages, for example chromeos-base/factory_installer or netboot
initramfs, we have to create a dedicated ebuild file and deal with the
portage virtual package system, which is pretty difficult for partners.

As a result, we want to generalize the resource system so all factory
related customization can be done in a single factory-board package.

The new folder 'resources' and the *.rsrc files are the new way to
construct resource tarball. Each *.rsrc contains the declaration of a
resource file - either from SYSROOT or BOARD_FILES_DIR or public repo.

BUG= chromium:837561 
TEST=make test; make resource

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

[add] https://crrev.com/e7523ebdc9dc8647a150b6e96b53ffbe5738ba95/resources/installer.rsrc
[add] https://crrev.com/e7523ebdc9dc8647a150b6e96b53ffbe5738ba95/devtools/mk/create_resources.py
[modify] https://crrev.com/e7523ebdc9dc8647a150b6e96b53ffbe5738ba95/Makefile
[add] https://crrev.com/e7523ebdc9dc8647a150b6e96b53ffbe5738ba95/resources/README.md

Project Member

Comment 9 by bugdroid1@chromium.org, May 4 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/initramfs/+/093fd2ce7aef034aa98b5e7234e79b6b067d45c4

commit 093fd2ce7aef034aa98b5e7234e79b6b067d45c4
Author: Hung-Te Lin <hungte@chromium.org>
Date: Fri May 04 10:02:52 2018

factory_netboot: Apply new factory resources.

To add additional files into netboot initramfs (usually for helping
factory_install_board.sh) easily, we should apply the Chrome OS factory
software resource system. Also removed the deprecated scripts.

BUG= chromium:837561 
CQ-DEPEND=CL:1029996
TEST= USE=factory_netboot_ramfs emerge-meowth chromeos-initramfs

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

[modify] https://crrev.com/093fd2ce7aef034aa98b5e7234e79b6b067d45c4/factory_netboot/Makefile

Project Member

Comment 10 by bugdroid1@chromium.org, May 18 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/initramfs/+/11fdf7f7f313e695491cd3ea3fd1338e77d0c52d

commit 11fdf7f7f313e695491cd3ea3fd1338e77d0c52d
Author: Hung-Te Lin <hungte@chromium.org>
Date: Fri May 18 02:22:54 2018

factory_netboot: Apply new factory resources.

To add additional files into netboot initramfs (usually for helping
factory_install_board.sh) easily, we should apply the Chrome OS factory
software resource system. Also removed the deprecated scripts.

BUG= chromium:837561 
CQ-DEPEND=CL:1029996
TEST= USE=factory_netboot_ramfs emerge-meowth chromeos-initramfs

Change-Id: Ica5d5215f70b19ae213494f800ca958ad48b8fb1
Reviewed-on: https://chromium-review.googlesource.com/1033512
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Yilun Lin <yllin@chromium.org>
(cherry picked from commit 093fd2ce7aef034aa98b5e7234e79b6b067d45c4)
Reviewed-on: https://chromium-review.googlesource.com/1065310
Reviewed-by: Chia-Hsiu Chang <chia-hsiu.chang@quantatw.com>
Commit-Queue: Chia-Hsiu Chang <chia-hsiu.chang@quantatw.com>
Tested-by: Chia-Hsiu Chang <chia-hsiu.chang@quantatw.com>

[modify] https://crrev.com/11fdf7f7f313e695491cd3ea3fd1338e77d0c52d/factory_netboot/Makefile

Sign in to add a comment