Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3536)

Unified Diff: build_image

Issue 2938003: Added command line parameter to specify OEM content location. (Closed) Base URL: ssh://git@chromiumos-git//crosutils.git
Patch Set: Removed touch .consider_oobe Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build_image
diff --git a/build_image b/build_image
index 9b94d99c5647889d739952f3e650b1a238e417a2..c521f4bef6c6c3d61b1d28e2cfc7c972dcebc6f2 100755
--- a/build_image
+++ b/build_image
@@ -74,6 +74,10 @@ DEFINE_integer vboot_max_ios 1024 \
DEFINE_string vboot_algorithm "sha1" \
"Cryptographic hash algorithm used for 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}"
@@ -530,6 +534,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.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698