Added command line parameter to specify OEM content location.

Added populating OEM partner partition with content.
Added creating flag file .consider_oobe for OEM partition to get mounted on OOBE.

BUG=http://crosbug.com/3828
TEST=Install Chrome OS on the device from USB stick. /mnt/partner_partition contains etc/... directory with customization manifests on first boot.

Review URL: http://codereview.chromium.org/2938003
This commit is contained in:
Denis Romanov 2010-07-12 22:44:42 +04:00
parent 87b169428f
commit 95bdf47a1a

View File

@ -74,6 +74,10 @@ DEFINE_integer verity_max_ios 1024 \
DEFINE_string verity_algorithm "sha1" \
"Cryptographic hash algorithm used for kernel vboot. Default : sha1"
DEFINE_string oem_customization \
"$GCLIENT_ROOT/src/platform/assets/oem_customization" \
"Path to directory containing OEM partner partition contents"
# Parse command line.
FLAGS "$@" || exit 1
eval set -- "${FLAGS_ARGV}"
@ -532,6 +536,20 @@ create_base_image() {
sudo tune2fs -L "${DISK_LABEL}" -U "${UUID}" -c 0 -i 0 "${OEM_LOOP_DEV}"
sudo mount "${OEM_LOOP_DEV}" "${OEM_FS_DIR}"
# Populate OEM partner partition.
if [ -n ${FLAGS_oem_customization} ]; then
if [ ! -d ${FLAGS_oem_customization} ]; then
echo "Specified OEM content directory does not exist. exiting."
exit 1
fi
for ITEM in `ls -A ${FLAGS_oem_customization}`
do sudo cp -a "${FLAGS_oem_customization}/$ITEM" "${OEM_FS_DIR}"
done
sudo find "${OEM_FS_DIR}" -type d -exec chmod 755 "{}" \;
sudo find "${OEM_FS_DIR}" -type f -exec chmod 644 "{}" \;
sudo chown -R root:root "${OEM_FS_DIR}"
fi
# -- Install packages into the root file system --
# We need to install libc manually from the cross toolchain.