Read script parameters from config file. (from ToT to factory-980B)

make_factory_package.sh needs many parameters and to support multi-board
installation it has to be run twice (without and with --subfolder). This
change adds the functionality to read sections of parameters from a
config file and executes them in order.

Cherry-Picked-From: http://gerrit.chromium.org/gerrit/7473
Cherry-Picked-From: http://gerrit.chromium.org/gerrit/7698
Cherry-Picked-From: http://gerrit.chromium.org/gerrit/7764

BUG=chrome-os-partner:5850
TEST=1. Create a config file (mp_factory.conf) with the following
        content:
       [x86-zgb]
        --factory ~/trunk/src/build/images/${BOARD}/latest/chromiumos_factory_image.bin
        --release ~/trunk/src/build/images/${BOARD}/latest/chromiumos_image.bin
        --hwid_updater ~/trunk/src/platform/chromeos-hwid/hwid_bundle_zgb.sh
        --firmware_updater none
        --detect_release_image

       [x86-zgb-he]
        --subfolder x86-zgb-he
        --factory ~/trunk/src/build/images/${BOARD}/latest/chromiumos_factory_image.bin
        --release ~/trunk/src/build/images/${BOARD}/latest/chromiumos_image.bin
        --hwid_updater ~/trunk/src/platform/chromeos-hwid/hwid_bundle_zgb.sh
        --firmware_updater none
        --detect_release_image

     2. BOARD=x86-zgb ./make_factory_package.sh --config mp_factory.conf

Change-Id: Icf3a4c37fdd1b24b81c69b5f1ec9c85289c5bb2c
Reviewed-on: http://gerrit.chromium.org/gerrit/7852
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
1 file changed
tree: 8751704d72bd445b404655c8bebdd316e6a23142
  1. bin/
  2. build_library/
  3. chroot_version_hooks.d/
  4. lib/
  5. mod_for_factory_scripts/
  6. mod_for_test_scripts/
  7. sdk_lib/
  8. .gitignore
  9. archive_hwqual
  10. bash_completion
  11. build_image
  12. build_kernel_image.sh
  13. call_autoserv.py
  14. check_control_files.sh
  15. clean_loopback_devices
  16. common.sh
  17. cros_deps_diff
  18. cros_download_latest_image
  19. cros_generate_breakpad_symbols
  20. cros_generate_deps_graphs
  21. cros_generate_stacks_bvt
  22. cros_show_stacks
  23. dot_helper.py
  24. enable_localaccount.sh
  25. enter_chroot.sh
  26. exclude-list
  27. fixup_image_for_qemu.py
  28. get_latest_image.sh
  29. get_package_list
  30. image_to_usb.sh
  31. image_to_vm.sh
  32. make_chroot
  33. make_developer_script_runner.sh
  34. make_factory_package.sh
  35. make_netboot.sh
  36. make_universal_factory_shim.sh
  37. mk_memento_images.sh
  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. serve_factory_packages.py
  45. set_shared_user_password.sh
  46. sha256_partitions.sh
  47. ssh_test.sh
  48. start_devserver
  49. update_bootloaders.sh
  50. update_chroot
  51. update_kernel.sh
  52. upload_symbols
  53. verify_rootfs_chksum.sh