FACTORY-980B: crosutils: 'archive_factory' to create factory bundles

To generate a bundle with mini-omaha and all utility scripts, we need a new
archive script.

This CL is merged from following list on ToT:

  crosutils: 'archive_factory' to create factory bundles
  Cherry-picked: http://gerrit.chromium.org/gerrit/7906
  crosutils: refine make_factory_package
  Cherry-picked: http://gerrit.chromium.org/gerrit/7904
  crosutils: allow factory scripts to be executed in a limited bundle environment
  Cherry-picked: http://gerrit.chromium.org/gerrit/7905
  crosutils: Revert "crosutils: refine make_factory_package"
  Cherry-picked: http://gerrit.chromium.org/gerrit/7916
  crosutils: add boilerplate comments for factory scripts
  Cherry-picked: http://gerrit.chromium.org/gerrit/7908

BUG=chrome-os-partner:5979
TEST=./archive_factory --factory_test factory_test \
       --factory_install factory_install --script . --dev ../platform/dev/ \
       --bin ../../chroot/usr/bin
  # output:
  [   0/2.4G]   adding: bin/cgpt  (stored 0%)
  [633K/2.4G]   adding: dev/autoupdate.py  (stored 0%)
  [658K/2.4G]   adding: dev/buildutil.py  (stored 0%)
  [660K/2.4G]   adding: dev/devserver.py  (stored 0%)
  [671K/2.4G]   adding: dev/static/ (stored 0%)
  [671K/2.4G]   adding: factory_test/chromiumos_factory_image.bin
  [1.9G/506M]   adding: factory_test/pack_partitions.sh  (stored 0%)
  [1.9G/506M]   adding: factory_test/unpack_partitions.sh  (stored 0%)
  [1.9G/506M]   adding: hwid/hwid_bundle_zgb_all.sh  (stored 0%)
  [1.9G/502M]   adding: install_shim/factory_install_shim.bin
  [2.4G/119K]   adding: install_shim/pack_partitions.sh  (stored 0%)
  [2.4G/115K]   adding: install_shim/unpack_partitions.sh  (stored 0%)
  [2.4G/112K]   adding: scripts/lib/cros_image_common.sh  (stored 0%)
  [2.4G/102K]   adding: scripts/lib/shflags/shflags  (stored 0%)
  [2.4G/ 71K]   adding: scripts/common.sh  (stored 0%)
  [2.4G/ 49K]   adding: scripts/chromeos-common.sh  (stored 0%)
  [2.4G/ 33K]   adding: scripts/make_factory_package.sh  (stored 0%)
  [2.4G/ 11K]   adding: scripts/make_universal_factory_shim.sh  (stored 0%)
  [2.4G/4.0K]   adding: scripts/mk_memento_images.sh  (stored 0%)

Change-Id: I868dc352dd84709508a55d769f51b5a2db0316d9
Reviewed-on: http://gerrit.chromium.org/gerrit/7922
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
5 files changed
tree: 484593d255fea700b144290ca08aafd3bad4e264
  1. .gitignore
  2. archive_factory
  3. archive_hwqual
  4. bash_completion
  5. bin/
  6. build_image
  7. build_kernel_image.sh
  8. build_library/
  9. call_autoserv.py
  10. check_control_files.sh
  11. chroot_version_hooks.d/
  12. clean_loopback_devices
  13. common.sh
  14. cros_deps_diff
  15. cros_download_latest_image
  16. cros_generate_breakpad_symbols
  17. cros_generate_deps_graphs
  18. cros_generate_stacks_bvt
  19. cros_show_stacks
  20. dot_helper.py
  21. enable_localaccount.sh
  22. enter_chroot.sh
  23. exclude-list
  24. fixup_image_for_qemu.py
  25. get_latest_image.sh
  26. get_package_list
  27. image_to_usb.sh
  28. image_to_vm.sh
  29. lib/
  30. make_chroot
  31. make_developer_script_runner.sh
  32. make_factory_package.sh
  33. make_netboot.sh
  34. make_universal_factory_shim.sh
  35. mk_memento_images.sh
  36. mod_for_factory_scripts/
  37. mod_for_test_scripts/
  38. mod_image_for_recovery.sh
  39. mod_image_for_test.sh
  40. mod_test_image_for_pyauto.sh
  41. mount_gpt_image.sh
  42. remote_access.sh
  43. run_chroot_version_hooks
  44. sdk_lib/
  45. serve_factory_packages.py
  46. set_shared_user_password.sh
  47. sha256_partitions.sh
  48. ssh_test.sh
  49. start_devserver
  50. update_bootloaders.sh
  51. update_chroot
  52. update_kernel.sh
  53. upload_symbols
  54. verify_rootfs_chksum.sh