diff --git a/fixup_image_for_qemu.py b/fixup_image_for_qemu.py index b0e5ee0dcb..19282899b8 100755 --- a/fixup_image_for_qemu.py +++ b/fixup_image_for_qemu.py @@ -35,7 +35,7 @@ XORG_CONF_FILENAME = os.path.join('etc', 'X11', 'xorg.conf') EFI_CODE_MARKER_START = r'echo "Updating grub target for EFI BIOS"' EFI_CODE_MARKER_END = \ - r"""gpt -S boot -i $NEW_PART_NUM -b /tmp/oldpmbr.bin ${ROOT_DEV} 2>&1 + r"""sh "${INSTALL_ROOT}"/usr/sbin/chromeos-firmwareupdate fi else""" diff --git a/image_to_vm.sh b/image_to_vm.sh index 8450639276..ab29ddcced 100755 --- a/image_to_vm.sh +++ b/image_to_vm.sh @@ -69,6 +69,8 @@ IMAGES_DIR="${DEFAULT_BUILD_ROOT}/images/${FLAGS_board}" # Default to the most recent image if [ -z "${FLAGS_from}" ] ; then FLAGS_from="${IMAGES_DIR}/$(ls -t $IMAGES_DIR | head -1)" +else + pushd "${FLAGS_from}" && FLAGS_from=`pwd` && popd fi if [ -z "${FLAGS_to}" ] ; then FLAGS_to="${FLAGS_from}" @@ -170,7 +172,7 @@ sudo dd if=/dev/zero of="${TEMP_IMG}" bs=1 count=1 \ # Set up the partition table install_gpt "${TEMP_IMG}" "${TEMP_ROOTFS}" "${TEMP_KERN}" "${TEMP_STATE}" \ - "${TEMP_PMBR}" "${TEMP_ESP}" true false ${FLAGS_rootfs_partition_size} + "${TEMP_PMBR}" "${TEMP_ESP}" false ${FLAGS_rootfs_partition_size} # Copy into the partition parts of the file dd if="${TEMP_ROOTFS}" of="${TEMP_IMG}" conv=notrunc bs=512 \ seek="${START_ROOTFS_A}"