make_image: Fake vmlinuz_hd.vblock on ARM.

- This unbreaks the devserver's update server for ARM.
- This also unforks some of build_image.

BUG=None
TEST=Installed to tegra2_seaboard from USB without --skip_vblock,
     updated tegra2_seaboard.

Review URL: http://codereview.chromium.org/3493004

Change-Id: I6e66344de51609393407934f78aa20f49974efef
This commit is contained in:
Kenneth Waters 2010-09-22 13:54:44 -07:00
parent bc9981cc90
commit 9bc78b3acb
2 changed files with 7 additions and 4 deletions

View File

@ -191,10 +191,8 @@ make_image_bootable() {
# In original CL: http://codereview.chromium.org/2868044, this was done in
# create_base_image(). However, it could break the build if it is a clean
# build because vmlinuz_hd.vblock hasn't been created by build_kernel_image.sh
if [[ "${FLAGS_arch}" = "x86" ]]; then
sudo cp "${FLAGS_output_dir}/vmlinuz_hd.vblock" \
"${FLAGS_statefulfs_mountpoint}"
fi
sudo cp "${FLAGS_output_dir}/vmlinuz_hd.vblock" \
"${FLAGS_statefulfs_mountpoint}"
# START_KERN_A is set by the first call to install the gpt.
local koffset="$(partoffset ${image} 2)"

View File

@ -226,6 +226,11 @@ elif [[ "${FLAGS_arch}" = "arm" ]]; then
rm -f "${FLAGS_to}"
dd if="${kernel_script_img}" of="${FLAGS_to}" bs=512 count="${script_size}"
dd if="${kernel_image}" of="${FLAGS_to}" bs=512 seek="${script_size}"
# TODO: HACK: Until the kernel partition contains a signed image, create a
# phony hd.vblock to keep chromeos-install and cros_generate_update_payload
# working.
dd if="${FLAGS_to}" of="${FLAGS_hd_vblock}" bs=64K count=1
else
error "Unknown arch: ${FLAGS_arch}"
fi