Add --bootargs option to build_image.

This allows appending extra kernel command line parameters to
the ARM kernel command line on the Voguev210 boards.

BUG=None
TEST=Built image

Review URL: http://codereview.chromium.org/1694021
This commit is contained in:
robotboy 2010-04-30 09:51:23 -07:00
parent 1bec876896
commit b75eee3d67
2 changed files with 14 additions and 2 deletions

View File

@ -21,6 +21,8 @@ DEFINE_string arch "" \
"The target architecture (\"arm\" or \"x86\")."
DEFINE_string board "$DEFAULT_BOARD" \
"The board to build an image for."
DEFINE_string arm_extra_bootargs "" \
"Additional command line options to pass to the ARM kernel."
# Usage.
FLAGS_HELP=$(cat <<EOF
@ -114,7 +116,11 @@ install_gpt $OUTDEV $ROOTFS_IMG $KERNEL_IMG $STATEFUL_IMG $PMBRCODE $ESP_IMG
if [[ "$ARCH" = "arm" ]]; then
# assume /dev/mmcblk1. we could not get this from ${OUTDEV}
DEVICE=1
MBR_SCRIPT_UIMG=$(make_arm_mbr ${START_KERN_A} ${NUM_KERN_SECTORS} ${DEVICE})
MBR_SCRIPT_UIMG=$(make_arm_mbr \
${START_KERN_A} \
${NUM_KERN_SECTORS} \
${DEVICE} \
"${FLAGS_arm_extra_bootargs}")
sudo dd bs=1 count=`stat --printf="%s" ${MBR_SCRIPT_UIMG}` \
if="$MBR_SCRIPT_UIMG" of=${OUTDEV} conv=notrunc
fi

View File

@ -43,6 +43,8 @@ DEFINE_boolean withtest $FLAGS_FALSE \
"Include packages required for testing and prepare image for testing"
DEFINE_string factory_server "" \
"Build a factory install image pointing to given server."
DEFINE_string arm_extra_bootargs "" \
"Additional command line options to pass to the ARM kernel."
# Parse command line.
FLAGS "$@" || exit 1
@ -440,7 +442,11 @@ trap delete_prompt EXIT
# Create the GPT-formatted image
${SCRIPTS_DIR}/build_gpt.sh \
--arch=${ARCH} --board=${FLAGS_board} "${OUTPUT_DIR}" "${OUTPUT_IMG}"
--arch=${ARCH} \
--board=${FLAGS_board} \
--arm_extra_bootargs="${FLAGS_arm_extra_bootargs}" \
"${OUTPUT_DIR}" \
"${OUTPUT_IMG}"
# Clean up temporary files.
rm -f "${ROOT_FS_IMG}" "${STATEFUL_IMG}" "${OUTPUT_DIR}/vmlinuz.image" \