mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-25 18:55:24 +00:00
Add a script to put in a rootfs from one image into another.
Also add an option to prevent sign_official_build from attempting to re-sign the firmware. This is needed because we want both the SSD and RECOVERY images to have the same rootfs for delta updates to work correctly. BUG=chromium-os:7242 TEST=manually verified that rootfs gets replaced correctly (by verifying the rootfs hash). Change-Id: I2ca4f2bef938ca14301fed6a0b16c1a7dc2ba6d9 Review URL: http://codereview.chromium.org/3529007
This commit is contained in:
@@ -186,6 +186,11 @@ get_firmwarebin_from_shellball() {
|
||||
resign_firmware_payload() {
|
||||
local image=$1
|
||||
|
||||
if [ -n "${NO_FWUPDATE}" ]; then
|
||||
echo "Skipping firmware update."
|
||||
return
|
||||
fi
|
||||
|
||||
# Grab firmware image from the autoupdate shellball.
|
||||
local rootfs_dir=$(make_temp_dir)
|
||||
mount_image_partition ${image} 3 ${rootfs_dir}
|
||||
|
||||
29
scripts/image_signing/swap_rootfs.sh
Executable file
29
scripts/image_signing/swap_rootfs.sh
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
# Load common constants and variables.
|
||||
. "$(dirname "$0")/common.sh"
|
||||
|
||||
# Print usage string
|
||||
usage() {
|
||||
cat <<EOF
|
||||
Usage: $PROG dst_image src_image
|
||||
This will put the root file system from src_image into dst_image.
|
||||
EOF
|
||||
}
|
||||
|
||||
if [ $# -ne 2 ]; then
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
DST_IMAGE=$1
|
||||
SRC_IMAGE=$2
|
||||
|
||||
temp_rootfs=$(make_temp_file)
|
||||
extract_image_partition ${SRC_IMAGE} 3 ${temp_rootfs}
|
||||
replace_image_partition ${DST_IMAGE} 3 ${temp_rootfs}
|
||||
echo "RootFS from ${SRC_IMAGE} was copied into ${DST_IMAGE}"
|
||||
Reference in New Issue
Block a user