Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
halo
build
Commits
4ad00abb
Commit
4ad00abb
authored
8 years ago
by
Mark Stevens
Browse files
Options
Download
Email Patches
Plain Diff
Makefile adds build tag to ota image filename, certs updated for bzt
parent
d876805b
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
1083 additions
and
71 deletions
+1083
-71
.gitignore
.gitignore
+1
-0
core/Makefile
core/Makefile
+42
-0
core/dumpvar.mk
core/dumpvar.mk
+1
-1
target/product/security/media.pk8
target/product/security/media.pk8
+0
-0
target/product/security/media.x509.pem
target/product/security/media.x509.pem
+23
-22
target/product/security/platform.pk8
target/product/security/platform.pk8
+0
-0
target/product/security/platform.x509.pem
target/product/security/platform.x509.pem
+23
-22
target/product/security/shared.pk8
target/product/security/shared.pk8
+0
-0
target/product/security/shared.x509.pem
target/product/security/shared.x509.pem
+23
-22
tools/releasetools/add_img_to_target_files
tools/releasetools/add_img_to_target_files
+327
-1
tools/releasetools/add_img_to_target_files
tools/releasetools/add_img_to_target_files
+327
-1
tools/releasetools/img_from_target_files
tools/releasetools/img_from_target_files
+158
-1
tools/releasetools/img_from_target_files
tools/releasetools/img_from_target_files
+158
-1
No files found.
.gitignore
View file @
4ad00abb
*.diff
*.pyc
*.swp
This diff is collapsed.
Click to expand it.
core/Makefile
View file @
4ad00abb
...
...
@@ -1701,6 +1701,48 @@ $(INTERNAL_UPDATE_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) $(DISTTOOLS)
.PHONY
:
updatepackage
updatepackage
:
$(INTERNAL_UPDATE_PACKAGE_TARGET)
# -----------------------------------------------------------------
# The mkimage-ota package
name
:=
$(TARGET_PRODUCT)
ifeq
($(TARGET_BUILD_TYPE),debug)
name
:=
$(name)
_debug
endif
name
:=
$(name)
-rkimage-
$(FILE_NAME_TAG)
INTERNAL_MKIMAGE_OTA_PACKAGE_TARGET
:=
$(PRODUCT_OUT)
/
$(name)
.img
$(INTERNAL_RKIMAGE_PACKAGE_TARGET)
:
$(BUILT_TARGET_FILES_PACKAGE) $(DISTTOOLS)
@
echo
"Package:
$@
"
$(hide)
MKBOOTIMG
=
$(MKBOOTIMG)
\
./build/tools/releasetools/img_from_target_files
-v
\
-p
$(HOST_OUT)
\
$(BUILT_TARGET_FILES_PACKAGE)
$@
.PHONY
:
mkimage-ota
rkimage
:
$(INTERNAL_RKIMAGE_PACKAGE_TARGET)
# -----------------------------------------------------------------
# The rkupdate ota package
name
:=
$(TARGET_PRODUCT)
ifeq
($(TARGET_BUILD_TYPE),debug)
name
:=
$(name)
_debug
endif
name
:=
$(name)
-rkimage-
$(FILE_NAME_TAG)
INTERNAL_RKIMAGE_PACKAGE_TARGET
:=
$(PRODUCT_OUT)
/
$(name)
.img
$(INTERNAL_RKIMAGE_PACKAGE_TARGET)
:
$(BUILT_TARGET_FILES_PACKAGE) $(DISTTOOLS)
@
echo
"Package:
$@
"
$(hide)
MKBOOTIMG
=
$(MKBOOTIMG)
\
./build/tools/releasetools/img_from_target_files
-v
\
-p
$(HOST_OUT)
\
$(BUILT_TARGET_FILES_PACKAGE)
$@
.PHONY
:
rkimage
rkimage
:
$(INTERNAL_RKIMAGE_PACKAGE_TARGET)
# -----------------------------------------------------------------
# A zip of the symbols directory. Keep the full paths to make it
# more obvious where these files came from.
...
...
This diff is collapsed.
Click to expand it.
core/dumpvar.mk
View file @
4ad00abb
...
...
@@ -81,7 +81,7 @@ $(info HOST_ARCH=$(HOST_ARCH))
$(info
HOST_OS
=
$(HOST_OS)
)
$(info
HOST_OS_EXTRA
=
$(HOST_OS_EXTRA)
)
$(info
HOST_BUILD_TYPE
=
$(HOST_BUILD_TYPE)
)
$(info
BUILD_ID
=
$(BUILD_ID)
)
$(info
BUILD_ID
=
$(BUILD_ID)
-
$(BUILD_NUMBER)
)
$(info
OUT_DIR
=
$(OUT_DIR)
)
$(info
============================================)
endif
This diff is collapsed.
Click to expand it.
target/product/security/media.pk8
View file @
4ad00abb
No preview for this file type
This diff is collapsed.
Click to expand it.
target/product/security/media.x509.pem
View file @
4ad00abb
-----BEGIN CERTIFICATE-----
MIID+zCCAuOgAwIBAgIJAOxzTOe1iHc7MA0GCSqGSIb3DQEBCwUAMIGUMQswCQYD
VQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNTW91bnRhaW4g
VmlldzEQMA4GA1UECgwHQW5kcm9pZDEQMA4GA1UECwwHQW5kcm9pZDEQMA4GA1UE
AwwHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTAe
Fw0xNDEyMjMwNjQzMzNaFw00MjA1MTAwNjQzMzNaMIGUMQswCQYDVQQGEwJVUzET
MBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNTW91bnRhaW4gVmlldzEQMA4G
A1UECgwHQW5kcm9pZDEQMA4GA1UECwwHQW5kcm9pZDEQMA4GA1UEAwwHQW5kcm9p
ZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTCCASAwDQYJKoZI
hvcNAQEBBQADggENADCCAQgCggEBAMk8u979HtSzuaLD1eYEzop/kLYT7tHeJlze
VVUEu07b7HLg0ae7bHwBooOsly1mGbosoivfHqyp/7QLgTUNylGSKv/4HTWFgHD1
+zVkHqgyduX9SbvIiy3ReE4BqusHeGwhcCGFPBwdfufQonZ9mISEquGDpQFv1izD
uNWrUFtzH7uixr3MTWmHHQiWXN6+CNir99J1vthCTnsu18Zp1LJ96nJgqHxW6zMs
OnjmUpdYtp4+P3ostZx05K/Ib4LVQS7KBY7R8vLjIIdBiDxtVzFmVAVmcpmkPKHh
fDfUk9abMfjD1CMc27fZLb4HTVsakGZguKsXsXAFdYa7Eos8aasCAQOjUDBOMB0G
A1UdDgQWBBSwo+AhmGhORpnZkMYUAp8h/uo+cTAf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DnmewAhwhm/gX/
8PbYszob59ZhIX5AXWsf80ecDdEBOWSr4bdiBGzdV4B5goTlB21gQjSuERuccOFc
CKzw99k3IjV3hIw5yX1DBiQhMLFHBHZRUXsonYstkBSEFPt2AvdYVTj344EV2iAw
7VWJWQmw9n/2PXJfMmN8uiaFO4Fc05zJzK/GCKHawDodHb/TJeEJTky+zd5wsBY7
0H+crYkILcz9dxutU5JFJmn69yA78zJF9MH4tHv//GI+9FdNMbJjIHKoBRP2hUo9
6HziTiqmhj0SqmR6SWZZG1psHXd5u+mJKqh/hXG9AgEDo1AwTjAdBgNVHQ4EFgQU
jd2ncarIxxtfJ2Q8NpRiT68FxfowHwYDVR0jBBgwFoAUjd2ncarIxxtfJ2Q8NpRi
T68FxfowDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAfHB5qbdaUjDP
NS/oIV8KHlx+m3x4iWuM08ZtHk519W8OOJj3ZDHJV0fLEZTztsqrQXJ5AgpD3VKO
ZY4KZvFJ35p1VOtM8xol2fBvfHHAu8MvaMiCS7Tk1dkKancsVMff5GO/hO1aBzuF
cHUhgcI8IcetYYNFi7f8buUswPQqTDLV8zwKzQgmJiu8WJ0APdaf9LnzQk3YG09n
VtfgPnbBVmAyfduqsMoBHOv50RM6FD2PUpIIiqDU4hyWKTz/K65pIDWFmo21UAZv
vMgD2ZMSMML/Ornu3FbPGPrXbta27pAODKNBdL4S40Lugyp2JnKxj/D9n8eubYVl
xbZgF0PX2A==
-----END CERTIFICATE-----
This diff is collapsed.
Click to expand it.
target/product/security/platform.pk8
View file @
4ad00abb
No preview for this file type
This diff is collapsed.
Click to expand it.
target/product/security/platform.x509.pem
View file @
4ad00abb
-----BEGIN CERTIFICATE-----
MIID+zCCAuOgAwIBAgIJAP8GQTI8+VUSMA0GCSqGSIb3DQEBCwUAMIGUMQswCQYD
VQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNTW91bnRhaW4g
VmlldzEQ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itEnzrw5NOx1uuxjX1KeJ+Ts8UF
q7+Llet7CSCiaHoPgpSYvhMsBbGH3gFSaqUt6hTvAgEDo1AwTjAdBgNVHQ4EFgQU
HMOtjRlVx8O78nOXwh5R4CIV32wwHwYDVR0jBBgwFoAUHMOtjRlVx8O78nOXwh5R
4CIV32wwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAkF1QCCZ6dyxz
ZPzJzAz/R64DWWpGwFs3Pvn9RcyHyJRS3AMEc/9IIGdkGKFLETFLxsR6C0rGSRQy
LzLsCAK/9td2bSX4b4R5yx+XUZEhYxGFJZj/aUxisj4RPyVOuWYckYORi5H4tLFH
VGAjq+8MIipEDYJJEyz+jY9c21T3WpPEDbRY+VN2R8aXUWAM1Q1Z7plDEn3E4U/p
fpMWGQg3ubk8UWUW6PvxF46BSF1tUg0u5WUlNOWP1Y+P3gXFZ8CzwVEYSHB21oWc
2z1LWBGsJeq55buzlhVvDSbzTjBe0RPApGrLZNIXpoDg5UUEBC+T9G8yXGoRm0b1
W3jmeFO4bw==
-----END CERTIFICATE-----
This diff is collapsed.
Click to expand it.
target/product/security/shared.pk8
View file @
4ad00abb
No preview for this file type
This diff is collapsed.
Click to expand it.
target/product/security/shared.x509.pem
View file @
4ad00abb
-----BEGIN CERTIFICATE-----
MIID+zCCAuOgAwIBAgIJAI5FGVmx3kMjMA0GCSqGSIb3DQEBCwUAMIGUMQswCQYD
VQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNTW91bnRhaW4g
VmlldzEQMA4GA1UECgwHQW5kcm9pZDEQMA4GA1UECwwHQW5kcm9pZDEQMA4GA1UE
AwwHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTAe
Fw0xNDEyMjMwNjQzNTRaFw00MjA1MTAwNjQzNTRaMIGUMQswCQYDVQQGEwJVUzET
MBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1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bRPYzzFFf6i7l5BnP7MQxjavWx0o6tRAPSwD/qN/GXhJICK
cuBSUQTU0UjTyESO0vytiLcr8UY2M9u0F+FihV95Q6/RIUfSE+GzifOTrs5rh4tT
SbChcl6lUgGC3S4JATT/yHPcFqMYcXCOkx8PCuxbcKrCY67a9zqgSbVrcX/9VtYT
B/Ex/c16qS30KHUbdUQHP7g5fODgVKSvvhm3U7zltXrMrnDONyAY1u0ZxOfyWJxa
pV2tk2i48A2ss0s2AE3cbvHmtFKfIw6OJu5n0uB48rlfuHDqZ5jL04b7fLt+1JFQ
PssiHMnCnw==
-----END CERTIFICATE-----
This diff is collapsed.
Click to expand it.
tools/releasetools/add_img_to_target_files
deleted
120000 → 0
View file @
d876805b
add_img_to_target_files.py
\ No newline at end of file
This diff is collapsed.
Click to expand it.
tools/releasetools/add_img_to_target_files
0 → 100755
View file @
4ad00abb
#!/usr/bin/env python
#
# Copyright (C) 2014 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""
Given a target-files zipfile that does not contain images (ie, does
not have an IMAGES/ top-level subdirectory), produce the images and
add them to the zipfile.
Usage: add_img_to_target_files target_files
"""
import
sys
if
sys
.
hexversion
<
0x02070000
:
print
>>
sys
.
stderr
,
"Python 2.7 or newer is required."
sys
.
exit
(
1
)
import
errno
import
os
import
tempfile
import
zipfile
# missing in Python 2.4 and before
if
not
hasattr
(
os
,
"SEEK_SET"
):
os
.
SEEK_SET
=
0
import
build_image
import
common
OPTIONS
=
common
.
OPTIONS
OPTIONS
.
add_missing
=
False
OPTIONS
.
rebuild_recovery
=
False
def
AddSystem
(
output_zip
,
prefix
=
"IMAGES/"
,
recovery_img
=
None
,
boot_img
=
None
):
"""Turn the contents of SYSTEM into a system image and store it in
output_zip."""
prebuilt_path
=
os
.
path
.
join
(
OPTIONS
.
input_tmp
,
prefix
,
"system.img"
)
if
os
.
path
.
exists
(
prebuilt_path
):
print
"system.img already exists in %s, no need to rebuild..."
%
(
prefix
,)
return
def
output_sink
(
fn
,
data
):
ofile
=
open
(
os
.
path
.
join
(
OPTIONS
.
input_tmp
,
"SYSTEM"
,
fn
),
"w"
)
ofile
.
write
(
data
)
ofile
.
close
()
if
OPTIONS
.
rebuild_recovery
:
print
(
"Building new recovery patch"
)
common
.
MakeRecoveryPatch
(
OPTIONS
.
input_tmp
,
output_sink
,
recovery_img
,
boot_img
,
info_dict
=
OPTIONS
.
info_dict
)
block_list
=
common
.
MakeTempFile
(
prefix
=
"system-blocklist-"
,
suffix
=
".map"
)
imgname
=
BuildSystem
(
OPTIONS
.
input_tmp
,
OPTIONS
.
info_dict
,
block_list
=
block_list
)
common
.
ZipWrite
(
output_zip
,
imgname
,
prefix
+
"system.img"
)
common
.
ZipWrite
(
output_zip
,
block_list
,
prefix
+
"system.map"
)
def
BuildSystem
(
input_dir
,
info_dict
,
block_list
=
None
):
"""Build the (sparse) system image and return the name of a temp
file containing it."""
return
CreateImage
(
input_dir
,
info_dict
,
"system"
,
block_list
=
block_list
)
def
AddVendor
(
output_zip
,
prefix
=
"IMAGES/"
):
"""Turn the contents of VENDOR into a vendor image and store in it
output_zip."""
prebuilt_path
=
os
.
path
.
join
(
OPTIONS
.
input_tmp
,
prefix
,
"vendor.img"
)
if
os
.
path
.
exists
(
prebuilt_path
):
print
"vendor.img already exists in %s, no need to rebuild..."
%
(
prefix
,)
return
block_list
=
common
.
MakeTempFile
(
prefix
=
"vendor-blocklist-"
,
suffix
=
".map"
)
imgname
=
BuildVendor
(
OPTIONS
.
input_tmp
,
OPTIONS
.
info_dict
,
block_list
=
block_list
)
common
.
ZipWrite
(
output_zip
,
imgname
,
prefix
+
"vendor.img"
)
common
.
ZipWrite
(
output_zip
,
block_list
,
prefix
+
"vendor.map"
)
def
BuildVendor
(
input_dir
,
info_dict
,
block_list
=
None
):
"""Build the (sparse) vendor image and return the name of a temp
file containing it."""
return
CreateImage
(
input_dir
,
info_dict
,
"vendor"
,
block_list
=
block_list
)
def
CreateImage
(
input_dir
,
info_dict
,
what
,
block_list
=
None
):
print
"creating "
+
what
+
".img..."
img
=
common
.
MakeTempFile
(
prefix
=
what
+
"-"
,
suffix
=
".img"
)
# The name of the directory it is making an image out of matters to
# mkyaffs2image. It wants "system" but we have a directory named
# "SYSTEM", so create a symlink.
try
:
os
.
symlink
(
os
.
path
.
join
(
input_dir
,
what
.
upper
()),
os
.
path
.
join
(
input_dir
,
what
))
except
OSError
,
e
:
# bogus error on my mac version?
# File "./build/tools/releasetools/img_from_target_files", line 86, in AddSystem
# os.path.join(OPTIONS.input_tmp, "system"))
# OSError: [Errno 17] File exists
if
(
e
.
errno
==
errno
.
EEXIST
):
pass
image_props
=
build_image
.
ImagePropFromGlobalDict
(
info_dict
,
what
)
fstab
=
info_dict
[
"fstab"
]
if
fstab
:
image_props
[
"fs_type"
]
=
fstab
[
"/"
+
what
].
fs_type
if
what
==
"system"
:
fs_config_prefix
=
""
else
:
fs_config_prefix
=
what
+
"_"
fs_config
=
os
.
path
.
join
(
input_dir
,
"META/"
+
fs_config_prefix
+
"filesystem_config.txt"
)
if
not
os
.
path
.
exists
(
fs_config
):
fs_config
=
None
fc_config
=
os
.
path
.
join
(
input_dir
,
"BOOT/RAMDISK/file_contexts"
)
if
not
os
.
path
.
exists
(
fc_config
):
fc_config
=
None
succ
=
build_image
.
BuildImage
(
os
.
path
.
join
(
input_dir
,
what
),
image_props
,
img
,
fs_config
=
fs_config
,
fc_config
=
fc_config
,
block_list
=
block_list
)
assert
succ
,
"build "
+
what
+
".img image failed"
return
img
def
AddUserdata
(
output_zip
,
prefix
=
"IMAGES/"
):
"""Create an empty userdata image and store it in output_zip."""
prebuilt_path
=
os
.
path
.
join
(
OPTIONS
.
input_tmp
,
prefix
,
"userdata.img"
)
if
os
.
path
.
exists
(
prebuilt_path
):
print
"userdata.img already exists in %s, no need to rebuild..."
%
(
prefix
,)
return
image_props
=
build_image
.
ImagePropFromGlobalDict
(
OPTIONS
.
info_dict
,
"data"
)
# We only allow yaffs to have a 0/missing partition_size.
# Extfs, f2fs must have a size. Skip userdata.img if no size.
if
(
not
image_props
.
get
(
"fs_type"
,
""
).
startswith
(
"yaffs"
)
and
not
image_props
.
get
(
"partition_size"
)):
return
print
"creating userdata.img..."
# The name of the directory it is making an image out of matters to
# mkyaffs2image. So we create a temp dir, and within it we create an
# empty dir named "data", and build the image from that.
temp_dir
=
tempfile
.
mkdtemp
()
user_dir
=
os
.
path
.
join
(
temp_dir
,
"data"
)
os
.
mkdir
(
user_dir
)
img
=
tempfile
.
NamedTemporaryFile
()
fstab
=
OPTIONS
.
info_dict
[
"fstab"
]
if
fstab
:
image_props
[
"fs_type"
]
=
fstab
[
"/data"
].
fs_type
succ
=
build_image
.
BuildImage
(
user_dir
,
image_props
,
img
.
name
)
assert
succ
,
"build userdata.img image failed"
common
.
CheckSize
(
img
.
name
,
"userdata.img"
,
OPTIONS
.
info_dict
)
output_zip
.
write
(
img
.
name
,
prefix
+
"userdata.img"
)
img
.
close
()
os
.
rmdir
(
user_dir
)
os
.
rmdir
(
temp_dir
)
def
AddCache
(
output_zip
,
prefix
=
"IMAGES/"
):
"""Create an empty cache image and store it in output_zip."""
prebuilt_path
=
os
.
path
.
join
(
OPTIONS
.
input_tmp
,
prefix
,
"cache.img"
)
if
os
.
path
.
exists
(
prebuilt_path
):
print
"cache.img already exists in %s, no need to rebuild..."
%
(
prefix
,)
return
image_props
=
build_image
.
ImagePropFromGlobalDict
(
OPTIONS
.
info_dict
,
"cache"
)
# The build system has to explicitly request for cache.img.
if
"fs_type"
not
in
image_props
:
return
print
"creating cache.img..."
# The name of the directory it is making an image out of matters to
# mkyaffs2image. So we create a temp dir, and within it we create an
# empty dir named "cache", and build the image from that.
temp_dir
=
tempfile
.
mkdtemp
()
user_dir
=
os
.
path
.
join
(
temp_dir
,
"cache"
)
os
.
mkdir
(
user_dir
)
img
=
tempfile
.
NamedTemporaryFile
()
fstab
=
OPTIONS
.
info_dict
[
"fstab"
]
if
fstab
:
image_props
[
"fs_type"
]
=
fstab
[
"/cache"
].
fs_type
succ
=
build_image
.
BuildImage
(
user_dir
,
image_props
,
img
.
name
)
assert
succ
,
"build cache.img image failed"
common
.
CheckSize
(
img
.
name
,
"cache.img"
,
OPTIONS
.
info_dict
)
output_zip
.
write
(
img
.
name
,
prefix
+
"cache.img"
)
img
.
close
()
os
.
rmdir
(
user_dir
)
os
.
rmdir
(
temp_dir
)
def
AddImagesToTargetFiles
(
filename
):
OPTIONS
.
input_tmp
,
input_zip
=
common
.
UnzipTemp
(
filename
)
if
not
OPTIONS
.
add_missing
:
for
n
in
input_zip
.
namelist
():
if
n
.
startswith
(
"IMAGES/"
):
print
"target_files appears to already contain images."
sys
.
exit
(
1
)
try
:
input_zip
.
getinfo
(
"VENDOR/"
)
has_vendor
=
True
except
KeyError
:
has_vendor
=
False
OPTIONS
.
info_dict
=
common
.
LoadInfoDict
(
input_zip
)
if
"selinux_fc"
in
OPTIONS
.
info_dict
:
OPTIONS
.
info_dict
[
"selinux_fc"
]
=
os
.
path
.
join
(
OPTIONS
.
input_tmp
,
"BOOT"
,
"RAMDISK"
,
"file_contexts"
)
input_zip
.
close
()
output_zip
=
zipfile
.
ZipFile
(
filename
,
"a"
,
compression
=
zipfile
.
ZIP_DEFLATED
,
allowZip64
=
True
)
def
banner
(
s
):
print
"
\n\n
++++ "
+
s
+
" ++++
\n\n
"
banner
(
"boot"
)
prebuilt_path
=
os
.
path
.
join
(
OPTIONS
.
input_tmp
,
"IMAGES"
,
"boot.img"
)
boot_image
=
None
if
os
.
path
.
exists
(
prebuilt_path
):
print
"boot.img already exists in IMAGES/, no need to rebuild..."
if
OPTIONS
.
rebuild_recovery
:
boot_image
=
common
.
GetBootableImage
(
"IMAGES/boot.img"
,
"boot.img"
,
OPTIONS
.
input_tmp
,
"BOOT"
)
else
:
boot_image
=
common
.
GetBootableImage
(
"IMAGES/boot.img"
,
"boot.img"
,
OPTIONS
.
input_tmp
,
"BOOT"
)
if
boot_image
:
boot_image
.
AddToZip
(
output_zip
)
banner
(
"recovery"
)
recovery_image
=
None
prebuilt_path
=
os
.
path
.
join
(
OPTIONS
.
input_tmp
,
"IMAGES"
,
"recovery.img"
)
if
os
.
path
.
exists
(
prebuilt_path
):
print
"recovery.img already exists in IMAGES/, no need to rebuild..."
if
OPTIONS
.
rebuild_recovery
:
recovery_image
=
common
.
GetBootableImage
(
"IMAGES/recovery.img"
,
"recovery.img"
,
OPTIONS
.
input_tmp
,
"RECOVERY"
)
else
:
recovery_image
=
common
.
GetBootableImage
(
"IMAGES/recovery.img"
,
"recovery.img"
,
OPTIONS
.
input_tmp
,
"RECOVERY"
)
if
recovery_image
:
recovery_image
.
AddToZip
(
output_zip
)
banner
(
"system"
)
AddSystem
(
output_zip
,
recovery_img
=
recovery_image
,
boot_img
=
boot_image
)
if
has_vendor
:
banner
(
"vendor"
)
AddVendor
(
output_zip
)
banner
(
"userdata"
)
AddUserdata
(
output_zip
)
banner
(
"cache"
)
AddCache
(
output_zip
)
output_zip
.
close
()
def
main
(
argv
):
def
option_handler
(
o
,
a
):
if
o
in
(
"-a"
,
"--add_missing"
):
OPTIONS
.
add_missing
=
True
elif
o
in
(
"-r"
,
"--rebuild_recovery"
,):
OPTIONS
.
rebuild_recovery
=
True
else
:
return
False
return
True
args
=
common
.
ParseOptions
(
argv
,
__doc__
,
extra_opts
=
"ar"
,
extra_long_opts
=
[
"add_missing"
,
"rebuild_recovery"
,
],
extra_option_handler
=
option_handler
)
if
len
(
args
)
!=
1
:
common
.
Usage
(
__doc__
)
sys
.
exit
(
1
)
AddImagesToTargetFiles
(
args
[
0
])
print
"done."
if
__name__
==
'__main__'
:
try
:
common
.
CloseInheritedPipes
()
main
(
sys
.
argv
[
1
:])
except
common
.
ExternalError
,
e
:
print
print
" ERROR: %s"
%
(
e
,)
print
sys
.
exit
(
1
)
finally
:
common
.
Cleanup
()
This diff is collapsed.
Click to expand it.
tools/releasetools/img_from_target_files
deleted
120000 → 0
View file @
d876805b
img_from_target_files.py
\ No newline at end of file
This diff is collapsed.
Click to expand it.
tools/releasetools/img_from_target_files
0 → 100755
View file @
4ad00abb
#!/usr/bin/env python
#
# Copyright (C) 2008 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""
Given a target-files zipfile, produces an image zipfile suitable for
use with 'fastboot update'.
Usage: img_from_target_files [flags] input_target_files output_image_zip
-z (--bootable_zip)
Include only the bootable images (eg 'boot' and 'recovery') in
the output.
"""
import
sys
if
sys
.
hexversion
<
0x02070000
:
print
>>
sys
.
stderr
,
"Python 2.7 or newer is required."
sys
.
exit
(
1
)
import
errno
import
os
import
re
import
shutil
import
subprocess
import
tempfile
import
zipfile
# missing in Python 2.4 and before
if
not
hasattr
(
os
,
"SEEK_SET"
):
os
.
SEEK_SET
=
0
import
common
OPTIONS
=
common
.
OPTIONS
def
CopyInfo
(
output_zip
):
"""Copy the android-info.txt file from the input to the output."""
output_zip
.
write
(
os
.
path
.
join
(
OPTIONS
.
input_tmp
,
"OTA"
,
"android-info.txt"
),
"android-info.txt"
)
def
main
(
argv
):
bootable_only
=
[
False
]
def
option_handler
(
o
,
a
):
if
o
in
(
"-z"
,
"--bootable_zip"
):
bootable_only
[
0
]
=
True
else
:
return
False
return
True
args
=
common
.
ParseOptions
(
argv
,
__doc__
,
extra_opts
=
"z"
,
extra_long_opts
=
[
"bootable_zip"
],
extra_option_handler
=
option_handler
)
bootable_only
=
bootable_only
[
0
]
if
len
(
args
)
!=
2
:
common
.
Usage
(
__doc__
)
sys
.
exit
(
1
)
OPTIONS
.
input_tmp
,
input_zip
=
common
.
UnzipTemp
(
args
[
0
])
output_zip
=
zipfile
.
ZipFile
(
args
[
1
],
"w"
,
compression
=
zipfile
.
ZIP_DEFLATED
,
allowZip64
=
True
)
CopyInfo
(
output_zip
)
try
:
done
=
False
images_path
=
os
.
path
.
join
(
OPTIONS
.
input_tmp
,
"IMAGES"
)
if
os
.
path
.
exists
(
images_path
):
# If this is a new target-files, it already contains the images,
# and all we have to do is copy them to the output zip.
images
=
os
.
listdir
(
images_path
)
if
images
:
for
image
in
images
:
if
bootable_only
and
image
not
in
(
"boot.img"
,
"recovery.img"
):
continue
if
not
image
.
endswith
(
".img"
):
continue
common
.
ZipWrite
(
output_zip
,
os
.
path
.
join
(
images_path
,
image
),
image
)
done
=
True
if
not
done
:
# We have an old target-files that doesn't already contain the
# images, so build them.
import
add_img_to_target_files
OPTIONS
.
info_dict
=
common
.
LoadInfoDict
(
input_zip
)
# If this image was originally labelled with SELinux contexts,
# make sure we also apply the labels in our new image. During
# building, the "file_contexts" is in the out/ directory tree,
# but for repacking from target-files.zip it's in the root
# directory of the ramdisk.
if
"selinux_fc"
in
OPTIONS
.
info_dict
:
OPTIONS
.
info_dict
[
"selinux_fc"
]
=
os
.
path
.
join
(
OPTIONS
.
input_tmp
,
"BOOT"
,
"RAMDISK"
,
"file_contexts"
)
boot_image
=
common
.
GetBootableImage
(
"boot.img"
,
"boot.img"
,
OPTIONS
.
input_tmp
,
"BOOT"
)
if
boot_image
:
boot_image
.
AddToZip
(
output_zip
)
recovery_image
=
common
.
GetBootableImage
(
"recovery.img"
,
"recovery.img"
,
OPTIONS
.
input_tmp
,
"RECOVERY"
)
if
recovery_image
:
recovery_image
.
AddToZip
(
output_zip
)
def
banner
(
s
):
print
"
\n\n
++++ "
+
s
+
" ++++
\n\n
"
if
not
bootable_only
:
banner
(
"AddSystem"
)
add_img_to_target_files
.
AddSystem
(
output_zip
,
prefix
=
""
)
try
:
input_zip
.
getinfo
(
"VENDOR/"
)
banner
(
"AddVendor"
)
add_img_to_target_files
.
AddVendor
(
output_zip
,
prefix
=
""
)
except
KeyError
:
pass
# no vendor partition for this device
banner
(
"AddUserdata"
)
add_img_to_target_files
.
AddUserdata
(
output_zip
,
prefix
=
""
)
banner
(
"AddCache"
)
add_img_to_target_files
.
AddCache
(
output_zip
,
prefix
=
""
)
finally
:
print
"cleaning up..."
output_zip
.
close
()
shutil
.
rmtree
(
OPTIONS
.
input_tmp
)
print
"done."
if
__name__
==
'__main__'
:
try
:
common
.
CloseInheritedPipes
()
main
(
sys
.
argv
[
1
:])
except
common
.
ExternalError
,
e
:
print
print
" ERROR: %s"
%
(
e
,)
print
sys
.
exit
(
1
)
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment