20 Commits

Author SHA1 Message Date
Hung-Te Lin
e7ea070644 make_factory_package: allow updating HWID for image creation
BUG=chromium-os:16733
TEST=./make_factory_package --release RELEASE \
     --factory FACTORY --hwid HWID_UPDATER \
     --diskimg IMAGE_FILE

Change-Id: I1a817e1f176d22d830bf0ce8a6ccb6956086f749
Reviewed-on: http://gerrit.chromium.org/gerrit/3306
Reviewed-by: Jay Kim <yongjaek@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
2011-06-30 10:30:43 -07:00
Tom Wai-Hong Tam
06165e0880 Add complete script channel in make_factory_package.sh
A new parameter --complete_script is added a script to support the last-step
execution of factory install. This script is supported by a separated channel
in mini-omaha server.

BUG=chrome-os-partner:4229
TEST=./make_factory_package --release RELEASE --factory FACTORY \
  --firmware FIRMWARE --complete complete.sh # success
$ cat ../platform/dev/miniomaha.conf
config = [
{
   'qual_ids': set(["tegra2_kaen"]),
   'factory_image': 'rootfs-test.gz',
   'factory_checksum': 'jNk+g6VurGVmnW7kehvIK1gpkjw=',
   'release_image': 'rootfs-release.gz',
   'release_checksum': 'vkds6CqN8M+gTofM8VFefeG2o1Y=',
   'oempartitionimg_image': 'oem.gz',
   'oempartitionimg_checksum': '8ED3wHGIrxy/g81StZhJvHy7fJA=',
   'efipartitionimg_image': 'efi.gz',
   'efipartitionimg_checksum': 'eyoAysb4WkLmKagb515mlM3jhts=',
   'stateimg_image': 'state.gz',
   'stateimg_checksum': 'MD7X6Yc5Gipkqt3i7jMn5hoWBvM=',
   'firmware_image': 'firmware.gz',
   'firmware_checksum': 'yAdtPbG7vjwsCPO6AUJ+fyw8z78=',
   'complete_image': 'complete.gz',
   'complete_checksum': '8Nq3fhtK+mTZk3PkaVS47tqEHCI=',
 },
]
$ ls -l ../platform/dev/static/
total 473828
drwxr-xr-x 2 waihong eng       4096 May  5 15:43 cache/
-rw-r--r-- 1 waihong eng         56 Jun  2 17:25 complete.gz
-rw-r--r-- 1 waihong eng      26606 Jun  2 17:25 efi.gz
-rw-r--r-- 1 waihong eng     827934 Jun  2 17:25 firmware.gz
-rw-r--r-- 1 waihong eng      26125 Jun  2 17:25 oem.gz
lrwxrwxrwx 1 waihong eng          6 May  5 11:35 pkgroot -> /build
-rw-rw-rw- 1 root    root 222747636 Jun  2 17:25 rootfs-release.gz
-rw-rw-rw- 1 root    root 222767859 Jun  2 17:25 rootfs-test.gz
-rw-r--r-- 1 waihong eng   38284201 Jun  2 17:25 state.gz

Change-Id: I3ab36835c3d1cd564429d6d646dca80501986b14
Reviewed-on: http://gerrit.chromium.org/gerrit/2026
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: Tom Wai-Hong Tam <waihong@chromium.org>
2011-06-03 01:31:33 -07:00
Hung-Te Lin
fbc89da362 crosutils: add --hwid_updater in make_factory_package.sh
A new parameter --hwid_updater is added to support updating
HWID component list by mini-omaha server.

BUG=chrome-os-partner:4276
TEST=./make_factory_package --release RELEASE --factory FACTORY \
     --firmware FIRMWARE --hwid hwid_updater.sh # success

Change-Id: I5889bf63545f0ed118320b60963e22ebc00c76f7
Reviewed-on: http://gerrit.chromium.org/gerrit/1826
Reviewed-by: Nick Sanders <nsanders@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
2011-06-01 21:26:46 -07:00
Zdenek Behan
aabded5941 make_factory_package: allow calling from outside the chroot
As documented by the developer workflow, this script need to be
called from outside the chroot. This adds a temporary reference to
the new location of chromeos-common.sh, unbreaking the factory
workflow, and giving us time to come up with a better solution.

TEST=run inside the chroot and outside the chroot
BUG=chromium-os:11769

Change-Id: Icb90211111629ed037bc40682a94200d949050e0

Review URL: http://codereview.chromium.org/6462007
2011-02-09 01:16:04 +01:00
Greg Spencer
798d75f3be This starts to fix the scripts so that they load from /usr/lib/crosutils
from within the chroot.

It also fixes a number of style issues.

It changes the meaning of cros_workon "list-all" to list all available
packages, and adds "list-live" to list all live packages.

It changes things that load chromeos-common.sh from the installer to
load it from /usr/lib/installer.

BUG=chromium-os:4230
TEST=synced, rebuilt chroot, made packages, made images, built chrome
from source, and wrote an image to a USB stick.

Review URL: http://codereview.chromium.org/6240018

Change-Id: I90c34420af1a64020402bafef8e9e77f56837c02
2011-02-01 22:04:49 -08:00
Nick Sanders
2a517638ef Add legacy fixup for diskimg
make_factory_package.sh --diskimg can now boot on H2O bios.

BUG=chromeium-os:10915
TEST=boots

Change-Id: I8358247e475fa2d4298e225fa9445b00e4dad253

Review URL: http://codereview.chromium.org/6296001
(cherry picked from commit 10418cc13c298f3514fdc5898655132cb9b09037)

Review URL: http://codereview.chromium.org/6278003
2011-01-18 22:20:03 -08:00
Hung-Te Lin
4653cbd0e5 crosutils/make_factory_package.sh: support full SSD image as target outside chroot
When running outside chroot, we should use locate_cgpt + "$GPT" to invoke cgpt;
otherwise it may be not in system PATH.

For dealing with a true SSD image (over USB, for example) this CL also improved
data writing speed from <2M/s to 8M/s+ (over USB).

BUG=chromium-os:10531
TEST=./make_factory_package.sh \
  --factory=../build/images/x86-mario/latest/chromiumos_factory_image.bin \
  --release=../build/images/x86-mario/latest//chromiumos_image.bin \
  --diskimg=/dev/sdb

Also tested:
  --diskimg=blah # local file
  (chroot) --diskimg=/dev/sdd
  (chroot) --diskimg=blah

Change-Id: I647d97fe388f5b6a6223fa8cacfecdf00265f60c

Review URL: http://codereview.chromium.org/6261003
2011-01-13 16:59:42 +08:00
Hung-Te Lin
c584cf0e95 crosutils/make_factory_package.sh: Support relative path
Since there's a pushd call when building images, we have to first retrieve
the complete (full/absolute) path of target disk image.

BUG=chromium-os:10706
TEST=make_factory_package.sh \
     --factory ../build/images/x86-mario/latest/factory_image.bin \
     --release ../build/images/x86-mario/latest/chromiumos_image.bin \
     --diskimg blah_relative.bin

Change-Id: I02e2edb0f76b724337a82dd400297877681bc338

Review URL: http://codereview.chromium.org/6244003
2011-01-13 15:34:59 +08:00
Nick Sanders
607c0780c0 Allow disk image target for copy machine.
BUG=10531
TEST=build and imaged a mario

Change-Id: I60790f178159d707f610ba1668c29179a6c32e61

Review URL: http://codereview.chromium.org/6050006
2010-12-28 22:27:11 -08:00
Hung-Te Lin
062947926e cros_utils: refine factory and imaging related scripts
Major changes are:
 - prefix functions in cros_image_common with 'image' to avoid naming conflicts
 - use awk to replace grep+sed+cut
 - use case to handle board name list
 - factory_setup.sh should return error if applying patch failed
 - refine for shell script coding style guide:
   * replace `` with $()
   * quote variables
   * replace "! -z" by "-n"
   * no space between redirection symbol (>) and target name (eg, >>filename)
   * 1> should be simply >
   * no trailing \ for && and ||

BUG=chrome-os-partner:1583
TEST=manually verified:
 ./image_to_usb.sh --factory # calls mod_image_for_test --factory, and works fine
 ./make_factory_package.sh --factory PATH_TO_IMAGE --release PATH_TO_IMAGE ...
  # factory payloads were created successfully

Change-Id: I6bb10bdfb12cbdb14e9816b3ad72dfe4b7b0472f

Review URL: http://codereview.chromium.org/5168001
2010-11-18 14:47:38 +08:00
Kris Rambish
43c22803a1 Make removing the last ] more full-proof
Make removal of last ] more full-proof

Change-Id: I002e5ed513066a214fd6353f66e05bf5458f6ad4

BUG=7115
TEST= No file, with --subfolder
  No file, without --subfolder
  Empty file
  File with one config already in it, with --subfolder
  File with one config and garbage at the end, with --subfolder
  File with one config and newlines at the end, with --subfolder
  File with one config, without subfolder

Review URL: http://codereview.chromium.org/4688004
2010-11-15 11:26:22 -08:00
Hung-Te Lin
bcc60b625d crosutils: move image_common.sh to lib/cros_image_common.sh
The team is moving utility/library scripts into 'lib' folder.
image_common.sh should follow this policy.

Also refined the parameter check of mk_memento_images.sh

BUG=chromium-os:5208
TEST=./make_factory_package.sh --factory PATH_TO_FACTORY --release PATH_TO_RELEASE;
     # factory bundle created successfully
     ./mk_memento_images.sh PATH_TO_PART2 PATH_TO_PART3
     # update.gz created successfully
     ./mk_memento_images.sh PATH_TO_IMGE 2 3
     # update.gz created successfully

Change-Id: I3afecf05da2832986723f28b595045d0540ea9e9

Review URL: http://codereview.chromium.org/4825004
2010-11-13 05:36:20 +08:00
Hung-Te Lin
51484a96e9 crosutils: refine memento image / factory package creation
This CL improves creation of memento / factory image payload by:
 - verbose progress report
 - allowing to compress by pigz, the parallel version of gzip
 - prevents unpacking entire image if partition tools (cgpt/parted)
   is available.

BUG=chromium-os:6536,chromium-os:5208
TEST=Verified executing "time ./make_factory_package.sh ..." for ToT factory bundle:
 - before this CL (memento gzip param is not -9): 3m53.126s
 - after this CL, without pigz, with cgpt: 2m34.897s
 - after this CL, with pigz+cgpt, memento_gz=-9: 0m45.603s
 - after this CL, with pigz, without cgpt/parted, memento_gz=-9: 1m49.748s
 Also verified such bundle can be installed on a real netbook device.

Change-Id: Ie182844ea5482d6d321b9549fa584377edf7dfe3

Review URL: http://codereview.chromium.org/4824003
2010-11-13 02:43:14 +08:00
Huyen Nguyen
1330edb593 Fix bug where square bracket is not removed before appending new rule.
Change-Id: I5618b211abd69b4e3774fa6e4009183ef996a8d8

BUG=8815
TEST=run locally

Review URL: http://codereview.chromium.org/4498004
2010-11-05 16:15:46 -07:00
Huyen Nguyen
41a2b700a2 Fix bug where subfolder is not add to path of firmware.
Change-Id: I5521baa3a2b176167f827034166ffcd443a6a793

BUG=8711
TEST=run locally

Review URL: http://codereview.chromium.org/4413004
2010-11-04 12:40:28 -07:00
Kris Rambish
d07981d619 Adding append to make_factory_package
Change-Id: I37f0c93d1285c27731b58a977b91aa85f4fb2e63

BUG=7115
TEST=

Review URL: http://codereview.chromium.org/4006003
2010-10-22 15:32:28 -07:00
Nick Sanders
bfbb74f667 allow firmware fetch
Review URL: http://codereview.chromium.org/3013066
2010-08-09 12:14:56 -07:00
Nick Sanders
ec29805fde Fix firmware packaging
BUG=none
TEST="run make_factory_package.sh --factory=X --release=X, doesn't crash"

Review URL: http://codereview.chromium.org/2858021
2010-06-21 21:52:43 -07:00
Tom Wai-Hong Tam
fe3d8268f9 Pack firmware into an image and do update in factory install (separated git).
Since different platforms have different instructions to update their firmware.
In order not to depend on the install shim, we pack all firmware update files
into a single file, i.e. an executable shell script with embedded files.

The original CL (http://codereview.chromium.org/2366001) is reviewed and is
broken down into 5 CLs. This is one of them.

Review URL: http://codereview.chromium.org/2792013
2010-06-14 09:55:41 +08:00
Nick Sanders
7c982f7398 Update factory installer, factory test
* Fix build breaks
* Update to work with EFI bios

Review URL: http://codereview.chromium.org/2132008
2010-05-19 22:17:08 -07:00