Commit graph

8 commits

Author SHA1 Message Date
Ying Wang
934d9b158e Add selinux and verity support to custom image generation.
New custom image configuration variables:
- CUSTOM_IMAGE_SELINUX, set to "true" if the image supports selinux.
- CUSTOM_IMAGE_SUPPORT_VERITY, set to "true" if the product supports verity.
- CUSTOM_IMAGE_VERITY_BLOCK_DEVICE

Also changed the staging directory name to the mount point, like we do
for other images built by the build system.

Bug: 19609718
Change-Id: I6bbf06b79eee63e4c77834f2e6f1d5a7f7e00a12
(cherry picked from commit 7d51a40295)
2015-06-03 09:56:31 -07:00
Ying Wang
4540a85dd4 Support to configure and build multiple custom images.
Build additional images requested by the product makefile.
This script gives the ability to build multiple additional images and
you can configure what modules/files to include in each image.
1. Define PRODUCT_CUSTOM_IMAGE_MAKEFILES in your product makefile.
   PRODUCT_CUSTOM_IMAGE_MAKEFILES is a list of makefiles.
   Each makefile configures an image.
   For image configuration makefile foo/bar/xyz.mk, the built image
   file name
   will be xyz.img. So make sure they won't conflict.
2. In each image's configuration makefile, you can define variables:
  - CUSTOM_IMAGE_MOUNT_POINT, the mount point, such as "oem", "odm"
    etc.
  - CUSTOM_IMAGE_PARTITION_SIZE
  - CUSTOM_IMAGE_FILE_SYSTEM_TYPE
  - CUSTOM_IMAGE_DICT_FILE, a text file defining a dictionary
    accepted by BuildImage() in tools/releasetools/build_image.py.
  - CUSTOM_IMAGE_MODULES, a list of module names you want to include
    in the image; Not only the module itself will be installed to proper
    path in the image, you can also piggyback additional files/directories
    with the module's LOCAL_PICKUP_FILES.
  - CUSTOM_IMAGE_COPY_FILES, a list of "<src>:<dest>" to be copied to
    the image. <dest> is relativ to the root of the image.

To build all those images, run "make custom_images".

Bug: 19609718
Change-Id: Ic73587e08503a251be27797c7b00329716051927
(cherry picked from commit 5fcf1094f9)
2015-06-03 09:56:29 -07:00
Ying Wang
a47420a22d Break package-modules build recipe to mutliple lines
To fix "Argument list too long" error seen on some machines.

Change-Id: I6f34668e938412751e257b4b543358e1fc0809a1
2014-09-24 10:19:14 -07:00
Ying Wang
c947b4a8ae Also include the binaries for the 2nd arch.
Also include the binaries for the 2nd arch when building module
packages.

Change-Id: I50d2c7451a77cbccdb365c8efea6c77f5147fde6
2014-06-16 16:34:40 -07:00
Ying Wang
3380d3a1ae Explicit record the modules' built-file:installed-file
- This simplifies the logic to get the mapping of built-file to
  installed-file. Previously we used file suffix matching which is error
  prone and not scalable.
- With this change the .odex files will be included automatically.

Bug: 13585955
Change-Id: I4599abf93b9d501bac7aca7758d7f3aee21b3e36
2014-05-19 13:03:36 -07:00
Ying Wang
92213a8ae4 Put modules with install path to system/ to DATA/ in the zip file.
Change-Id: I3948c28bb3f988d57da41d6eb8f97da4e20b0e86
2014-05-15 20:45:39 -07:00
Ying Wang
571fee8985 Target "tests" now only builds the modules tagged as "tests"
But not install them.
This prevents "make tests" polluting system.img or userdata.img.
We have new mechanism to build and package up modules into zip file in
build/core/tasks/tools.
Change package-modules.mk to install DATA/ instead of data/ in the
zip file; Better handle of module name conflicting.

Bug: 13585955
Change-Id: I7586a8c7995b984c9ead0ba2fa84dd5d2dd20bd1
2014-05-08 14:52:39 -07:00
Ying Wang
3b81aabbd0 Add tool to package up built modules.
With this change, you can package up modules while avoiding installing
them to the system.img or userdata.img.
- build/core/tasks/tools/package-modules.mk
  You can use this template to package up modules into a zip file and
  preserve the installed file paths.
- LOCAL_PICKUP_FILES, you can use this variable to package up extra
  files/directories.

Bug: 13585955
Change-Id: I103042b24ccf17cf5dc90c016d97ed1dd293e50b
2014-05-05 16:46:52 -07:00