From f5debbfee630f0d49b9dcb8a4eb0bfa83822ecc6 Mon Sep 17 00:00:00 2001 From: Joe Onorato Date: Mon, 7 May 2012 17:15:15 -0700 Subject: [PATCH 01/13] make product-graph now filtered Change-Id: I6bd93a87902e20a24c1c58152fb578ef1f4cb208 --- core/tasks/product-graph.mk | 26 +++++++++++--- tools/filter-product-graph.py | 68 +++++++++++++++++++++++++++++++++++ 2 files changed, 89 insertions(+), 5 deletions(-) create mode 100755 tools/filter-product-graph.py diff --git a/core/tasks/product-graph.mk b/core/tasks/product-graph.mk index 6442252bd0..70b5de86e0 100644 --- a/core/tasks/product-graph.mk +++ b/core/tasks/product-graph.mk @@ -16,9 +16,20 @@ products_pdf := $(OUT_DIR)/products.pdf products_graph := $(products_pdf:%.pdf=%.dot) +ifeq ($(strip $(ANDROID_PRODUCT_GRAPH)),) +products_list := $(INTERNAL_PRODUCT) +else +ifeq ($(strip $(ANDROID_PRODUCT_GRAPH)),--all) +products_list := --all +else +products_list := $(foreach prod,$(ANDROID_PRODUCT_GRAPH),$(call resolve-short-product-name,$(prod))) +endif +endif + +$(products_graph): PRIVATE_PRODUCTS := $(products_list) $(products_graph): - @echo Product graph DOT: $@ + @echo Product graph DOT: $@ for $(PRIVATE_PRODUCTS) $(hide) ( \ echo 'digraph {'; \ echo 'graph [ ratio=.5 ];'; \ @@ -27,12 +38,17 @@ $(products_graph): echo \"$(d)\" -\> \"$(p)\";)) \ $(foreach prod, \ $(sort $(foreach p,$(ALL_PRODUCTS), \ - $(foreach d,$(PRODUCTS.$(strip $(p)).INHERITS_FROM), \ - $(d))) \ + $(foreach d,$(PRODUCTS.$(strip $(p)).INHERITS_FROM), $(d))) \ $(foreach p,$(ALL_PRODUCTS),$(p))), \ - echo \"$(prod)\" [ label=\"$(dir $(prod))\\n$(notdir $(prod))\"];) \ + echo \"$(prod)\" [ \ + label=\"$(dir $(prod))\\n$(notdir $(prod))\\n\\n$(PRODUCTS.$(strip $(prod)).PRODUCT_MODEL)\\n$(PRODUCTS.$(strip $(prod)).PRODUCT_DEVICE)\" \ + $(if $(filter $(prod),$(PRIVATE_PRODUCTS)), \ + style=\"filled\" fillcolor=\"#FFFDB0\",) \ + ];) \ echo '}' \ - ) > $@ + ) \ + | ./build/tools/filter-product-graph.py $(PRIVATE_PRODUCTS) \ + > $@ # This rule doesn't include any nodes that don't inherit from # anything or don't have anything inherit from them, to make the diff --git a/tools/filter-product-graph.py b/tools/filter-product-graph.py new file mode 100755 index 0000000000..b3a5b42c39 --- /dev/null +++ b/tools/filter-product-graph.py @@ -0,0 +1,68 @@ +#!/usr/bin/env python +# vim: ts=2 sw=2 nocindent + +import re +import sys + +def choose_regex(regs, line): + for func,reg in regs: + m = reg.match(line) + if m: + return (func,m) + return (None,None) + +def gather(included, deps): + result = set() + for inc in included: + result.add(inc) + for d in deps: + if inc == d[1]: + result.add(d[0]) + return result + +def main(): + deps = [] + infos = [] + def dependency(m): + deps.append((m.group(1), m.group(2))) + def info(m): + infos.append((m.group(1), m.group(2))) + + REGS = [ + (dependency, re.compile(r'"(.*)"\s*->\s*"(.*)"')), + (info, re.compile(r'"(.*)"(\s*\[.*\])')), + ] + + lines = sys.stdin.readlines() + lines = [line.strip() for line in lines] + + for line in lines: + func,m = choose_regex(REGS, line) + if func: + func(m) + + # filter + sys.stderr.write("argv: " + str(sys.argv) + "\n") + if not (len(sys.argv) == 2 and sys.argv[1] == "--all"): + targets = sys.argv[1:] + + included = set(targets) + prevLen = -1 + while prevLen != len(included): + prevLen = len(included) + included = gather(included, deps) + + deps = [dep for dep in deps if dep[1] in included] + infos = [info for info in infos if info[0] in included] + + print "digraph {" + print "graph [ ratio=.5 ];" + for dep in deps: + print '"%s" -> "%s"' % dep + for info in infos: + print '"%s"%s' % info + print "}" + + +if __name__ == "__main__": + main() From 6ea77a2dc858ef7eec92c445a6003c105797a285 Mon Sep 17 00:00:00 2001 From: Joe Onorato Date: Mon, 7 May 2012 19:21:51 -0700 Subject: [PATCH 02/13] Use a more modern -j flag. Change-Id: I2498139dd41637a795ca43f830c952adb2856d83 --- tools/check_builds.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/check_builds.sh b/tools/check_builds.sh index fd380dd7d6..c255bf00d6 100644 --- a/tools/check_builds.sh +++ b/tools/check_builds.sh @@ -41,7 +41,7 @@ function do_builds do rm -rf $TEST_BUILD_DIR/$PREFIX-$1 make PRODUCT-$(echo $1 | sed "s/-.*//" )-installclean - make -j6 PRODUCT-$1 dist DIST_DIR=$TEST_BUILD_DIR/$PREFIX-$1 + make -j16 PRODUCT-$1 dist DIST_DIR=$TEST_BUILD_DIR/$PREFIX-$1 if [ $? -ne 0 ] ; then echo FAILED return From cc788043b724ce53ed3b7d39fe44e96ce6fb363b Mon Sep 17 00:00:00 2001 From: Joe Onorato Date: Fri, 18 May 2012 20:39:51 -0700 Subject: [PATCH 03/13] Add tool to parse make dependency info from new --deps flag. Change-Id: I59a88027d88cceee9f2933c84379612698952043 --- tools/parsedeps.py | 151 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100755 tools/parsedeps.py diff --git a/tools/parsedeps.py b/tools/parsedeps.py new file mode 100755 index 0000000000..32d8ad7d67 --- /dev/null +++ b/tools/parsedeps.py @@ -0,0 +1,151 @@ +#!/usr/bin/env python +# vim: ts=2 sw=2 + +import optparse +import re +import sys + + +class Dependency: + def __init__(self, tgt): + self.tgt = tgt + self.pos = "" + self.prereqs = set() + self.visit = 0 + + def add(self, prereq): + self.prereqs.add(prereq) + + +class Dependencies: + def __init__(self): + self.lines = {} + self.__visit = 0 + self.count = 0 + + def add(self, tgt, prereq): + t = self.lines.get(tgt) + if not t: + t = Dependency(tgt) + self.lines[tgt] = t + p = self.lines.get(prereq) + if not p: + p = Dependency(prereq) + self.lines[prereq] = p + t.add(p) + self.count = self.count + 1 + + def setPos(self, tgt, pos): + t = self.lines.get(tgt) + if not t: + t = Dependency(tgt) + self.lines[tgt] = t + t.pos = pos + + def get(self, tgt): + if self.lines.has_key(tgt): + return self.lines[tgt] + else: + return None + + def __iter__(self): + return self.lines.iteritems() + + def trace(self, tgt, prereq): + self.__visit = self.__visit + 1 + d = self.lines.get(tgt) + if not d: + return + return self.__trace(d, prereq) + + def __trace(self, d, prereq): + if d.visit == self.__visit: + return d.trace + if d.tgt == prereq: + return [ [ d ], ] + d.visit = self.__visit + result = [] + for pre in d.prereqs: + recursed = self.__trace(pre, prereq) + for r in recursed: + result.append([ d ] + r) + d.trace = result + return result + +def help(): + print "Commands:" + print " dep TARGET Print the prerequisites for TARGET" + print " trace TARGET PREREQ Print the paths from TARGET to PREREQ" + + +def main(argv): + opts = optparse.OptionParser() + opts.add_option("-i", "--interactive", action="store_true", dest="interactive", + help="Interactive mode") + (options, args) = opts.parse_args() + + deps = Dependencies() + + filename = args[0] + print "Reading %s" % filename + + if True: + f = open(filename) + for line in f: + line = line.strip() + if len(line) > 0: + if line[0] == '#': + pos,tgt = line.rsplit(":", 1) + pos = pos[1:].strip() + tgt = tgt.strip() + deps.setPos(tgt, pos) + else: + (tgt,prereq) = line.split(':', 1) + tgt = tgt.strip() + prereq = prereq.strip() + deps.add(tgt, prereq) + f.close() + + print "Read %d dependencies. %d targets." % (deps.count, len(deps.lines)) + while True: + line = raw_input("target> ") + if not line.strip(): + continue + split = line.split() + cmd = split[0] + if len(split) == 2 and cmd == "dep": + tgt = split[1] + d = deps.get(tgt) + if d: + for prereq in d.prereqs: + print prereq.tgt + elif len(split) == 3 and cmd == "trace": + tgt = split[1] + prereq = split[2] + if False: + print "from %s to %s" % (tgt, prereq) + trace = deps.trace(tgt, prereq) + if trace: + width = 0 + for g in trace: + for t in g: + if len(t.tgt) > width: + width = len(t.tgt) + for g in trace: + for t in g: + if t.pos: + print t.tgt, " " * (width-len(t.tgt)), " #", t.pos + else: + print t.tgt + print + else: + help() + +if __name__ == "__main__": + try: + main(sys.argv) + except KeyboardInterrupt: + print + except EOFError: + print + From d6b1d628be13202550cd7381fccc4e641190c0b8 Mon Sep 17 00:00:00 2001 From: Joe Onorato Date: Fri, 18 May 2012 20:41:38 -0700 Subject: [PATCH 04/13] Add a phony "nothing" goal that reads the makefiles but doesn't try to build anything. Change-Id: Idac551e5c796321e993b94761f5cbf5b55c1a994 --- core/main.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/main.mk b/core/main.mk index 6516fa6723..f7a5193d93 100644 --- a/core/main.mk +++ b/core/main.mk @@ -871,3 +871,7 @@ modules: .PHONY: showcommands showcommands: @echo >/dev/null + +.PHONY: nothing +nothing: + @echo Successfully read the makefiles. From f85cb7c936db4b7a6b39b1163591a61e166d9e11 Mon Sep 17 00:00:00 2001 From: Joe Onorato Date: Fri, 18 May 2012 20:43:14 -0700 Subject: [PATCH 05/13] Don't give the user tag to host modules automatically. Change-Id: I12d0a84786e5bf2224efd8684526b6097e6105d7 --- core/base_rules.mk | 31 +++++++++++++++++++++++-------- core/definitions.mk | 5 +++++ core/main.mk | 2 ++ 3 files changed, 30 insertions(+), 8 deletions(-) diff --git a/core/base_rules.mk b/core/base_rules.mk index 51fb3988fa..1d1078fd61 100644 --- a/core/base_rules.mk +++ b/core/base_rules.mk @@ -58,15 +58,19 @@ endif LOCAL_UNINSTALLABLE_MODULE := $(strip $(LOCAL_UNINSTALLABLE_MODULE)) LOCAL_MODULE_TAGS := $(sort $(LOCAL_MODULE_TAGS)) ifeq (,$(LOCAL_MODULE_TAGS)) -ifeq (true,$(LOCAL_UNINSTALLABLE_MODULE)) -LOCAL_MODULE_TAGS := optional -else -# Installable modules without tags fall back to user (which is changed to user eng below) -LOCAL_MODULE_TAGS := user -endif -#$(warning default tags: $(lastword $(filter-out config/% out/%,$(MAKEFILE_LIST)))) + ifeq (true,$(LOCAL_UNINSTALLABLE_MODULE)) + LOCAL_MODULE_TAGS := optional + else + ifneq ($(LOCAL_IS_HOST_MODULE),true) + # Installable target modules without tags fall back to user (which is changed to user eng + # below) + LOCAL_MODULE_TAGS := user + endif + endif + #$(warning default tags: $(lastword $(filter-out config/% out/%,$(MAKEFILE_LIST)))) endif + # Only the tags mentioned in this test are expected to be set by module # makefiles. Anything else is either a typo or a source of unexpected # behaviors. @@ -92,7 +96,7 @@ ifneq ($(filter $(LOCAL_MODULE_TAGS),user),) $(warning * Android.mk for the affected module, and add) $(warning * the LOCAL_MODULE value for that component) $(warning * into the PRODUCT_PACKAGES section of product) - $(warning * makefile(s) where it's necessary, if) + $(warning * makefile(s) where it is necessary, if) $(warning * appropriate.) $(warning * ) $(warning * If the component should be in EVERY build of ALL) @@ -544,6 +548,17 @@ $(installed_odex) : $(built_odex) | $(ACP) $(LOCAL_INSTALLED_MODULE) : $(installed_odex) endif +# All host modules that are not tagged with optional are automatically installed. +# Save the installed files in ALL_HOST_INSTALLED_FILES. +ifeq ($(LOCAL_IS_HOST_MODULE),true) + ifneq ($(filter optional,$(LOCAL_MODULE_TAGS)),optional) + ALL_HOST_INSTALLED_FILES += $(LOCAL_INSTALLED_MODULE) + endif + ifneq ($(filter user debug eng tests, $(LOCAL_MODULE_TAGS)),) + $(error $(LOCAL_MODULE_MAKEFILE): Module "$(LOCAL_MODULE)" has useless module tags: $(filter user debug eng tests, $(LOCAL_MODULE_TAGS)). It will be installed anyway.) + endif +endif + endif # !LOCAL_UNINSTALLABLE_MODULE diff --git a/core/definitions.mk b/core/definitions.mk index c1757f380e..6e87cc141d 100644 --- a/core/definitions.mk +++ b/core/definitions.mk @@ -55,6 +55,11 @@ ALL_MODULE_TAGS:= # its sub-variables.) ALL_MODULE_NAME_TAGS:= +# All host modules are automatically installed (i.e. outside +# of the product configuration scheme). This is a list of the +# install targets (LOCAL_INSTALLED_MODULE). +ALL_HOST_INSTALLED_FILES:= + # Full paths to all prebuilt files that will be copied # (used to make the dependency on acp) ALL_PREBUILT:= diff --git a/core/main.mk b/core/main.mk index f7a5193d93..7e7244e244 100644 --- a/core/main.mk +++ b/core/main.mk @@ -660,6 +660,8 @@ ifdef is_sdk_build $(error Module '$(m)' in PRODUCT_PACKAGES has nothing to install!))) endif +# Install all of the host modules +modules_to_install += $(sort $(modules_to_install) $(ALL_HOST_INSTALLED_FILES)) # build/core/Makefile contains extra stuff that we don't want to pollute this # top-level makefile with. It expects that ALL_DEFAULT_INSTALLED_MODULES From b4da6b50fe683233d7905f06842cc36f5966d980 Mon Sep 17 00:00:00 2001 From: Joe Onorato Date: Fri, 18 May 2012 20:43:41 -0700 Subject: [PATCH 06/13] host modules don't need LOCAL_MODULE_TAGS Change-Id: Ifec8e63eef512b281eb924ef92160e9e1bf97f6d --- tools/fs_config/Android.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/fs_config/Android.mk b/tools/fs_config/Android.mk index 5486bc22c7..5ef32dd34a 100644 --- a/tools/fs_config/Android.mk +++ b/tools/fs_config/Android.mk @@ -18,6 +18,5 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES := fs_config.c LOCAL_MODULE := fs_config LOCAL_FORCE_STATIC_EXECUTABLE := true -LOCAL_MODULE_TAGS := eng include $(BUILD_HOST_EXECUTABLE) From d23c3235fa183b8c4c78551c5947158d2db8d01f Mon Sep 17 00:00:00 2001 From: Joe Onorato Date: Mon, 21 May 2012 12:16:05 -0700 Subject: [PATCH 07/13] Dump the user tagged modules. Change-Id: I623821df3e48b358a6b898ccb13750f7dc54ddcf --- core/main.mk | 24 +++++++++++++++++++++++- core/product_config.mk | 6 ++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/core/main.mk b/core/main.mk index 7e7244e244..7598d863d5 100644 --- a/core/main.mk +++ b/core/main.mk @@ -616,6 +616,18 @@ endif # Use tags to get the non-APPS user modules. Use the product # definition files to get the APPS user modules. user_MODULES := $(sort $(call get-tagged-modules,user shell_$(TARGET_SHELL))) + +# Print the user modules that are not in ...PRODUCT_PACKAGES +ifeq (1,1) + $(warning Writing modules list: modules/$(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT).txt) + $(shell rm -f modules/$(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT).txt) + $(foreach m, \ + $(filter-out $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES), \ + $(call module-names-for-tag-list, user)), \ + $(shell echo $m >> modules/$(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT).txt)) +endif + + user_MODULES := $(user_MODULES) $(user_PACKAGES) eng_MODULES := $(sort $(call get-tagged-modules,eng)) @@ -657,7 +669,7 @@ ifdef is_sdk_build # Ensure every module listed in PRODUCT_PACKAGES gets something installed $(foreach m, $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES), \ $(if $(strip $(ALL_MODULES.$(m).INSTALLED)),,\ - $(error Module '$(m)' in PRODUCT_PACKAGES has nothing to install!))) + $(error $(ALL_MODULES.$(m).MAKEFILE): Module '$(m)' in PRODUCT_PACKAGES has nothing to install!))) endif # Install all of the host modules @@ -674,6 +686,16 @@ ALL_DEFAULT_INSTALLED_MODULES := endif # dont_bother +# Print the modules that we think we will install +ifeq (1,1) + $(warning Writing installed file list: installed/$(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT).txt) + $(shell rm -f installed/$(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT).txt) + $(foreach m, $(modules_to_install), \ + $(shell echo $m >> installed/$(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT).txt)) + $(error stop) +endif + + # These are additional goals that we build, in order to make sure that there # is as little code as possible in the tree that doesn't build. modules_to_check := $(foreach m,$(ALL_MODULES),$(ALL_MODULES.$(m).CHECKED)) diff --git a/core/product_config.mk b/core/product_config.mk index ea3e517671..9c85d2c514 100644 --- a/core/product_config.mk +++ b/core/product_config.mk @@ -199,6 +199,12 @@ $(dump-products) $(error done) endif +ifeq (a,b) +$(info PRODUCTS -----------) +$(foreach product, $(PRODUCTS), $(info $(PRODUCTS.$(product).PRODUCT_NAME)))# $(product))) +$(error stop) +endif + # Convert a short name like "sooner" into the path to the product # file defining that product. # From 8cfca47f5aa7a6e4c90082ab76db919ad45eb744 Mon Sep 17 00:00:00 2001 From: Joe Onorato Date: Tue, 22 May 2012 12:20:27 -0700 Subject: [PATCH 08/13] List the user modules explicitly, and we can get rid of the support for the user tag! Change-Id: I6f412ed4e08d784ed71ec170e870fcf30081963a --- target/product/core.mk | 136 +++++++++++++++++++++++++ target/product/generic_no_telephony.mk | 16 +++ 2 files changed, 152 insertions(+) diff --git a/target/product/core.mk b/target/product/core.mk index d637bd4c90..466216f330 100644 --- a/target/product/core.mk +++ b/target/product/core.mk @@ -22,7 +22,143 @@ PRODUCT_PROPERTY_OVERRIDES := \ ro.config.notification_sound=OnTheHunt.ogg \ ro.config.alarm_alert=Alarm_Classic.ogg +# Core modules (will move elsewhere) PRODUCT_PACKAGES := \ + 20-dns.conf \ + 95-configured \ + adb \ + adbd \ + am \ + android.policy \ + android.test.runner \ + app_process \ + applypatch \ + bmgr \ + bootanimation \ + bugreport \ + dbus-daemon \ + debuggerd \ + dhcpcd \ + dhcpcd-run-hooks \ + dnsmasq \ + dumpstate \ + dumpsys \ + framework \ + fsck_msdos \ + gralloc.default \ + gzip \ + ime \ + init \ + input \ + javax.obex \ + keystore \ + libEGL \ + libETC1 \ + libFFTEm \ + libGLES_android \ + libGLESv1_CM \ + libGLESv2 \ + libSR_AudioIn \ + libandroid \ + libandroid_runtime \ + libandroid_servers \ + libaudioeffect_jni \ + libaudioflinger \ + libbinder \ + libbundlewrapper \ + libc \ + libcamera_client \ + libcameraservice \ + libchromium_net \ + libctest \ + libcutils \ + libdbus \ + libdl \ + libdrm1 \ + libdrm1_jni \ + libeffects \ + libexif \ + libgui \ + libhardware \ + libhardware_legacy \ + libiprouteutil \ + libjni_latinime \ + libjnigraphics \ + libjpeg \ + liblog \ + libm \ + libmedia \ + libmedia_jni \ + libmediaplayerservice \ + libmtp \ + libnetlink \ + libnetutils \ + libpixelflinger \ + libpower \ + libreference-ril \ + libreverbwrapper \ + libril \ + librtp_jni \ + libsensorservice \ + libskia \ + libsonivox \ + libsoundpool \ + libsqlite \ + libsrec_jni \ + libstagefright \ + libstagefright_amrnb_common \ + libstagefright_avc_common \ + libstagefright_enc_common \ + libstagefright_foundation \ + libstagefright_omx \ + libstagefright_yuv \ + libstdc++ \ + libstlport \ + libsurfaceflinger \ + libsurfaceflinger_client \ + libsystem_server \ + libsysutils \ + libthread_db \ + libui \ + libusbhost \ + libutils \ + libvisualizer \ + libvorbisidec \ + libwebcore \ + libwpa_client \ + linker \ + logcat \ + logwrapper \ + mediaserver \ + monkey \ + mtpd \ + ndc \ + netcfg \ + netd \ + omx_tests \ + ping \ + platform.xml \ + pppd \ + pm \ + racoon \ + rild \ + run-as \ + schedtest \ + screenshot \ + sdcard \ + service \ + servicemanager \ + services \ + simg2img \ + surfaceflinger \ + svc \ + system_server \ + tc \ + toolbox \ + vdc \ + vold + +PRODUCT_PACKAGES += \ ApplicationsProvider \ BackupRestoreConfirmation \ Browser \ diff --git a/target/product/generic_no_telephony.mk b/target/product/generic_no_telephony.mk index 0c6e9acb68..049d7c080b 100644 --- a/target/product/generic_no_telephony.mk +++ b/target/product/generic_no_telephony.mk @@ -44,6 +44,22 @@ PRODUCT_PACKAGES := \ hostapd \ wpa_supplicant.conf +PRODUCT_PACKAGES += \ + audio \ + bluetoothd \ + brcm_patchram_plus \ + dhcpcd.conf \ + hciattach \ + libbluedroid \ + libbluetooth \ + libbluetoothd \ + libglib \ + network \ + pand \ + pppd \ + sdptool \ + wpa_supplicant + PRODUCT_PACKAGES += \ icu.dat From 529302d912e9ad6d62b56f98ffb718e5a4b23b18 Mon Sep 17 00:00:00 2001 From: Joe Onorato Date: Tue, 22 May 2012 14:08:50 -0700 Subject: [PATCH 09/13] Remove support for user tags in the build system. It is not forbidden to say LOCAL_MODULE_TAGS := user, and if you don't say LOCAL_MODULE_TAGS, it now defaults to optional. Change-Id: I0a0b200bb6f1c7bf1fe3a89cdc8f69678617526c --- core/base_rules.mk | 76 ++----- core/definitions.mk | 4 - core/envsetup.mk | 4 +- core/main.mk | 78 +++---- core/user_tags.mk | 499 -------------------------------------------- 5 files changed, 49 insertions(+), 612 deletions(-) delete mode 100644 core/user_tags.mk diff --git a/core/base_rules.mk b/core/base_rules.mk index 1d1078fd61..3b64d77f90 100644 --- a/core/base_rules.mk +++ b/core/base_rules.mk @@ -58,55 +58,31 @@ endif LOCAL_UNINSTALLABLE_MODULE := $(strip $(LOCAL_UNINSTALLABLE_MODULE)) LOCAL_MODULE_TAGS := $(sort $(LOCAL_MODULE_TAGS)) ifeq (,$(LOCAL_MODULE_TAGS)) - ifeq (true,$(LOCAL_UNINSTALLABLE_MODULE)) - LOCAL_MODULE_TAGS := optional - else - ifneq ($(LOCAL_IS_HOST_MODULE),true) - # Installable target modules without tags fall back to user (which is changed to user eng - # below) - LOCAL_MODULE_TAGS := user - endif - endif - #$(warning default tags: $(lastword $(filter-out config/% out/%,$(MAKEFILE_LIST)))) + LOCAL_MODULE_TAGS := optional endif +# User tags are not allowed anymore. Fail early because it will not be installed +# like it used to be. +ifneq ($(filter $(LOCAL_MODULE_TAGS),user),) + $(warning *** Module name: $(LOCAL_MODULE)) + $(warning *** Makefile location: $(LOCAL_MODULE_MAKEFILE)) + $(warning * ) + $(warning * Module is attempting to use the 'user' tag. This) + $(warning * used to cause the module to be installed automatically.) + $(warning * Now, the module must be listed in the PRODUCT_PACKAGES) + $(warning * section of a product makefile to have it installed.) + $(warning * ) + $(error user tag detected on module.) +endif # Only the tags mentioned in this test are expected to be set by module # makefiles. Anything else is either a typo or a source of unexpected # behaviors. -ifneq ($(filter-out user debug eng tests optional samples shell_ash shell_mksh,$(LOCAL_MODULE_TAGS)),) +ifneq ($(filter-out debug eng tests optional samples shell_ash shell_mksh,$(LOCAL_MODULE_TAGS)),) $(warning unusual tags $(LOCAL_MODULE_TAGS) on $(LOCAL_MODULE) at $(LOCAL_PATH)) endif -ifneq ($(filter $(LOCAL_MODULE_TAGS),user),) - ifeq ($(filter $(GRANDFATHERED_USER_MODULES),$(LOCAL_MODULE)),) - $(warning *** Module name: $(LOCAL_MODULE)) - $(warning *** Makefile location: $(LOCAL_PATH)) - $(warning * ) - $(warning * Each module must use a LOCAL_MODULE_TAGS in its) - $(warning * Android.mk. Possible tags declared by a module:) - $(warning * ) - $(warning * optional, debug, eng, tests, samples) - $(warning * ) - $(warning * If the module is expected to be in all builds) - $(warning * of a product, then it should use the) - $(warning * "optional" tag: ) - $(warning * ) - $(warning * Add "LOCAL_MODULE_TAGS := optional" in the) - $(warning * Android.mk for the affected module, and add) - $(warning * the LOCAL_MODULE value for that component) - $(warning * into the PRODUCT_PACKAGES section of product) - $(warning * makefile(s) where it is necessary, if) - $(warning * appropriate.) - $(warning * ) - $(warning * If the component should be in EVERY build of ALL) - $(warning * products, then add its LOCAL_MODULE value to the) - $(warning * PRODUCT_PACKAGES section of) - $(warning * build/target/product/core.mk) - $(warning * ) - $(error user tag detected on new module - user tags are only supported on legacy modules) - endif -endif + # Add implicit tags. # @@ -121,27 +97,11 @@ ifneq ($(gpl_license_file),) ALL_GPL_MODULE_LICENSE_FILES := $(sort $(ALL_GPL_MODULE_LICENSE_FILES) $(gpl_license_file)) endif -# -# If this module is listed on CUSTOM_MODULES, promote it to "user" -# so that it will be installed in $(TARGET_OUT). -# -ifneq (,$(filter $(LOCAL_MODULE),$(CUSTOM_MODULES))) - LOCAL_MODULE_TAGS := $(sort $(LOCAL_MODULE_TAGS) user) -endif - LOCAL_MODULE_CLASS := $(strip $(LOCAL_MODULE_CLASS)) ifneq ($(words $(LOCAL_MODULE_CLASS)),1) $(error $(LOCAL_PATH): LOCAL_MODULE_CLASS must contain exactly one word, not "$(LOCAL_MODULE_CLASS)") endif -# Those used to be implicitly ignored, but aren't any more. -# As of 20100110 there are no apps with the user tag. -ifeq ($(LOCAL_MODULE_CLASS),APPS) - ifneq ($(filter $(LOCAL_MODULE_TAGS),user),) - $(warning user tag on app $(LOCAL_MODULE) at $(LOCAL_PATH) - add your app to core.mk instead) - endif -endif - ifneq (true,$(LOCAL_UNINSTALLABLE_MODULE)) ifdef LOCAL_IS_HOST_MODULE partition_tag := @@ -554,8 +514,8 @@ ifeq ($(LOCAL_IS_HOST_MODULE),true) ifneq ($(filter optional,$(LOCAL_MODULE_TAGS)),optional) ALL_HOST_INSTALLED_FILES += $(LOCAL_INSTALLED_MODULE) endif - ifneq ($(filter user debug eng tests, $(LOCAL_MODULE_TAGS)),) - $(error $(LOCAL_MODULE_MAKEFILE): Module "$(LOCAL_MODULE)" has useless module tags: $(filter user debug eng tests, $(LOCAL_MODULE_TAGS)). It will be installed anyway.) + ifneq ($(filter debug eng tests, $(LOCAL_MODULE_TAGS)),) + $(error $(LOCAL_MODULE_MAKEFILE): Module "$(LOCAL_MODULE)" has useless module tags: $(filter debug eng tests, $(LOCAL_MODULE_TAGS)). It will be installed anyway.) endif endif diff --git a/core/definitions.mk b/core/definitions.mk index 6e87cc141d..1508cc656d 100644 --- a/core/definitions.mk +++ b/core/definitions.mk @@ -2045,10 +2045,6 @@ endef # when requested. include $(BUILD_SYSTEM)/distdir.mk -# ----------------------------------------------------------------- -# The modules allowed to use a user tag -include $(BUILD_SYSTEM)/user_tags.mk - # broken: # $(foreach file,$^,$(if $(findstring,.a,$(suffix $file)),-l$(file),$(file))) diff --git a/core/envsetup.mk b/core/envsetup.mk index ce222a974b..97b446700b 100644 --- a/core/envsetup.mk +++ b/core/envsetup.mk @@ -114,10 +114,10 @@ TARGET_COPY_OUT_RECOVERY := recovery # variables that we need in order to locate the output files. include $(BUILD_SYSTEM)/product_config.mk -build_variant := $(filter-out eng user userdebug tests,$(TARGET_BUILD_VARIANT)) +build_variant := $(filter-out user userdebug eng tests,$(TARGET_BUILD_VARIANT)) ifneq ($(build_variant)-$(words $(TARGET_BUILD_VARIANT)),-1) $(warning bad TARGET_BUILD_VARIANT: $(TARGET_BUILD_VARIANT)) -$(error must be empty or one of: eng user userdebug tests) +$(error must be empty or one of: user userdebug eng tests) endif # --------------------------------------------------------------- diff --git a/core/main.mk b/core/main.mk index 7598d863d5..ac6442ad73 100644 --- a/core/main.mk +++ b/core/main.mk @@ -224,13 +224,11 @@ include $(BUILD_SYSTEM)/definitions.mk # Bring in dex_preopt.mk include $(BUILD_SYSTEM)/dex_preopt.mk -ifneq ($(filter eng user userdebug,$(MAKECMDGOALS)),) +ifneq ($(filter user userdebug eng,$(MAKECMDGOALS)),) $(info ***************************************************************) $(info ***************************************************************) -$(info Don't pass '$(filter eng user userdebug tests,$(MAKECMDGOALS))' on \ +$(info Do not pass '$(filter user userdebug eng tests,$(MAKECMDGOALS))' on \ the make command line.) -# XXX The single quote on this line fixes gvim's syntax highlighting. -# Without which, the rest of this file is impossible to read. $(info Set TARGET_BUILD_VARIANT in buildspec.mk, or use lunch or) $(info choosecombo.) $(info ***************************************************************) @@ -279,13 +277,13 @@ endif # HAVE_SELINUX ## user/userdebug ## -user_variant := $(filter userdebug user,$(TARGET_BUILD_VARIANT)) +user_variant := $(filter user userdebug,$(TARGET_BUILD_VARIANT)) enable_target_debugging := true +tags_to_install := ifneq (,$(user_variant)) # Target is secure in user builds. ADDITIONAL_DEFAULT_PROPERTIES += ro.secure=1 - tags_to_install := user ifeq ($(user_variant),userdebug) # Pick up some extra useful tools tags_to_install += debug @@ -333,7 +331,7 @@ endif # !enable_target_debugging ## eng ## ifeq ($(TARGET_BUILD_VARIANT),eng) -tags_to_install := user debug eng +tags_to_install := debug eng ifneq ($(filter ro.setupwizard.mode=ENABLED, $(call collapse-pairs, $(ADDITIONAL_BUILD_PROPERTIES))),) # Don't require the setup wizard on eng builds ADDITIONAL_BUILD_PROPERTIES := $(filter-out ro.setupwizard.mode=%,\ @@ -345,7 +343,7 @@ endif ## tests ## ifeq ($(TARGET_BUILD_VARIANT),tests) -tags_to_install := user debug eng tests +tags_to_install := debug eng tests endif ## sdk ## @@ -362,7 +360,7 @@ endif # TODO: this should be eng I think. Since the sdk is built from the eng # variant. -tags_to_install := user debug eng +tags_to_install := debug eng ADDITIONAL_BUILD_PROPERTIES += xmpp.auto-presence=true ADDITIONAL_BUILD_PROPERTIES += ro.config.nocheckin=yes else # !sdk @@ -591,54 +589,45 @@ add-required-deps := # ------------------------------------------------------------------- # Figure out our module sets. - +# # Of the modules defined by the component makefiles, # determine what we actually want to build. -Default_MODULES := $(sort $(ALL_DEFAULT_INSTALLED_MODULES) \ - $(CUSTOM_MODULES)) -# TODO: Remove the 3 places in the tree that use -# ALL_DEFAULT_INSTALLED_MODULES and get rid of it from this list. ifdef FULL_BUILD # The base list of modules to build for this product is specified # by the appropriate product definition file, which was included # by product_config.make. - user_PACKAGES := $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES) - $(call expand-required-modules,user_PACKAGES,$(user_PACKAGES)) - user_PACKAGES := $(call module-installed-files, $(user_PACKAGES)) + product_MODULES := $(call module-installed-files, \ + $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES)) + ifeq (0,1) + $(info product_MODULES for $(TARGET_DEVICE) ($(INTERNAL_PRODUCT)):) + $(foreach p,$(product_MODULES),$(info : $(p))) + $(error done) + endif else # We're not doing a full build, and are probably only including # a subset of the module makefiles. Don't try to build any modules # requested by the product, because we probably won't have rules # to build them. - user_PACKAGES := -endif -# Use tags to get the non-APPS user modules. Use the product -# definition files to get the APPS user modules. -user_MODULES := $(sort $(call get-tagged-modules,user shell_$(TARGET_SHELL))) - -# Print the user modules that are not in ...PRODUCT_PACKAGES -ifeq (1,1) - $(warning Writing modules list: modules/$(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT).txt) - $(shell rm -f modules/$(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT).txt) - $(foreach m, \ - $(filter-out $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES), \ - $(call module-names-for-tag-list, user)), \ - $(shell echo $m >> modules/$(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT).txt)) + product_MODULES := endif - -user_MODULES := $(user_MODULES) $(user_PACKAGES) - -eng_MODULES := $(sort $(call get-tagged-modules,eng)) +# When modules are tagged with debug eng or tests, they are installed +# for those variants regardless of what the product spec says. debug_MODULES := $(sort $(call get-tagged-modules,debug)) +eng_MODULES := $(sort $(call get-tagged-modules,eng)) tests_MODULES := $(sort $(call get-tagged-modules,tests)) -ifeq ($(strip $(tags_to_install)),) -$(error ASSERTION FAILED: tags_to_install should not be empty) -endif -modules_to_install := $(sort $(Default_MODULES) \ - $(foreach tag,$(tags_to_install),$($(tag)_MODULES))) +# TODO: Remove the 3 places in the tree that use ALL_DEFAULT_INSTALLED_MODULES +# and get rid of it from this list. +# TODO: The shell is chosen by magic. Do we still need this? +modules_to_install := $(sort \ + $(ALL_DEFAULT_INSTALLED_MODULES) \ + $(product_MODULES) \ + $(foreach tag,$(tags_to_install),$($(tag)_MODULES)) \ + $(call get-tagged-modules, shell_$(TARGET_SHELL)) \ + $(CUSTOM_MODULES) \ + ) # Some packages may override others using LOCAL_OVERRIDES_PACKAGES. # Filter out (do not install) any overridden packages. @@ -686,15 +675,6 @@ ALL_DEFAULT_INSTALLED_MODULES := endif # dont_bother -# Print the modules that we think we will install -ifeq (1,1) - $(warning Writing installed file list: installed/$(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT).txt) - $(shell rm -f installed/$(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT).txt) - $(foreach m, $(modules_to_install), \ - $(shell echo $m >> installed/$(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT).txt)) - $(error stop) -endif - # These are additional goals that we build, in order to make sure that there # is as little code as possible in the tree that doesn't build. diff --git a/core/user_tags.mk b/core/user_tags.mk deleted file mode 100644 index e13969c256..0000000000 --- a/core/user_tags.mk +++ /dev/null @@ -1,499 +0,0 @@ -# -# Copyright (C) 2010 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. -# - -# This is the list of modules grandfathered to use a user tag - -# DO NOT ADD ANY NEW MODULE TO THIS FILE -# -# user modules are hard to control and audit and we don't want -# to add any new such module in the system - -GRANDFATHERED_USER_MODULES := - --include vendor/google/user_tags.mk - -GRANDFATHERED_USER_MODULES += \ - 20-dns.conf \ - 95-configured \ - aapt \ - acp \ - adb \ - AdbWinApi \ - AdbWinUsbApi \ - adbd \ - aidl \ - am \ - android \ - android-common \ - android-common-carousel \ - android.policy \ - androidprefs \ - android.test.runner \ - ant \ - antlr-2.7.7 \ - anttasks \ - apicheck \ - apkcheck \ - applypatch \ - app_process \ - archquery \ - atree \ - audio \ - badblocks \ - badblocks_host \ - bb2sym \ - bb_dump \ - bbprof \ - bcc \ - bison \ - bluetoothd \ - bmgr \ - bootanimation \ - brcm_patchram_plus \ - bugreport \ - cfassembler \ - check_stack \ - check_trace \ - com.android.phone.common \ - com.android.vcard \ - commons-compress-1.0 \ - content \ - copybit.qsd8k \ - copybit.s5pc110 \ - coverage \ - cpufeatures \ - cts \ - CtsAppSecurityTests \ - cts-dalvik-buildutil \ - dasm \ - dbus-daemon \ - ddmlib \ - ddmlib-prebuilt \ - ddmlibTests \ - ddms \ - ddmuilib \ - debuggerd \ - descGen \ - dexgen \ - dexpreopt \ - dex-tools \ - dhcpcd \ - dhcpcd.conf \ - dhcpcd-run-hooks \ - dictTest \ - dnsmasq \ - doclava \ - draw9patch \ - dumpeventlog \ - dumpkey \ - dump_regions \ - dumpstate \ - dumpsys \ - dx-tests \ - e2fsck \ - e2fsck_host \ - easymock \ - easymocklib \ - edify \ - elftree \ - emmalib \ - emulator \ - emulator-arm \ - emulator-mips \ - emulator-core \ - emulator-elff \ - emulator-hw \ - emulator-memcheck \ - emulator-tcg \ - emulator-ui \ - etc1tool \ - eventanalyzer \ - exc_dump \ - fastboot \ - framework \ - FrameworkCoreHostTests \ - frameworks-core-util-lib \ - fsck_msdos \ - fs_get_stats \ - fw_bcm4329_apsta.bin \ - fw_bcm4329.bin \ - genext2fs \ - gps.mahimahi \ - gralloc.default \ - gralloc.qsd8k \ - groovy-all-1.7.0 \ - grxmlcompile \ - guava \ - guavalib \ - gzip \ - hciattach \ - hierarchyviewer \ - hierarchyviewer1 \ - hierarchyviewer2 \ - hierarchyviewerlib \ - hist_trace \ - hosttestlib \ - icudata \ - idegen \ - ime \ - init \ - input \ - ip \ - jarjar \ - javax.obex \ - jcommon-1.0.12 \ - jdiff \ - jdwpspy \ - jfreechart-1.0.9 \ - jfreechart-1.0.9-swt \ - jsilver \ - jsr305 \ - jsr305lib \ - junit \ - jython \ - kxml2-2.3.0 \ - launch-wrapper \ - layoutlib \ - layoutlib_api \ - layoutlib_create \ - layoutlib_utils \ - liba2dp \ - libabi \ - libandroid \ - libandroid_runtime \ - libandroid_servers \ - libarity \ - libastl \ - libastl_host \ - libaudio \ - libaudioeffect_jni \ - libaudioflinger \ - libaudiointerface \ - libaudiopolicy \ - libaudiopolicybase \ - libbinder \ - libbluedroid \ - libbluetooth \ - libbluetoothd \ - libbuiltinplugin \ - libbundlewrapper \ - libbz \ - libc \ - libcamera_client \ - libcameraservice \ - libcamerastub \ - libc_common \ - libchromium_net \ - libc_nomalloc \ - libctest \ - libcutils \ - libdb \ - libdbus \ - libdiskconfig \ - libdiskconfig_host \ - libdl \ - libdrm1 \ - libdrm1_jni \ - libebl \ - libebl_arm \ - libebl_sh \ - libebl_mips \ - libedify \ - libeffects \ - libEGL \ - libelf \ - libESR_Portable \ - libESR_Shared \ - libETC1 \ - libext \ - libext2_blkid \ - libext2_blkid_host \ - libext2_com_err \ - libext2_com_err_host \ - libext2_e2p \ - libext2_e2p_host \ - libext2fs \ - libext2fs_host \ - libext2_profile \ - libext2_profile_host \ - libext2_uuid \ - libext2_uuid_host \ - libfdlibm \ - libfdlibm-host \ - libFFTEm \ - libfst \ - libft2 \ - libgdbus_static \ - libgif \ - libGLES_android \ - libGLESv1_CM \ - libGLESv2 \ - libglib \ - libgui \ - libhardware \ - libhardware_legacy \ - libhost \ - libhyphenation \ - libiprouteutil \ - libiptc \ - libjnigraphics \ - libjni_latinime \ - libjpeg \ - libjs \ - liblinenoise \ - libloc_api-rpc \ - liblog \ - libm \ - libmedia \ - libmedia_jni \ - libmediaplayerservice \ - libmincrypt \ - libminelf \ - libminui \ - libminzip \ - libmtdutils \ - libmtp \ - libmusicbundle \ - libneo_cgi \ - libneo_cs \ - libneo_util \ - libnetlink \ - libnetutils \ - libop \ - libOpenSLES \ - libopensles_helper \ - libOpenSLESUT \ - libpcap \ - libpixelflinger \ - libpixelflinger_static \ - libpng \ - libpopt \ - libpower \ - libprotobuf-cpp-2.3.0-full \ - libprotobuf-cpp-2.3.0-lite \ - libprotobuf-java-2.3.0-lite \ - libprotobuf-java-2.3.0-micro \ - librecovery_ui_htc \ - libreference-ril \ - libreverb \ - libreverbwrapper \ - libril \ - librilproto-java \ - librpc \ - librtp_jni \ - libsafe_iop \ - libSDL \ - libSDLmain \ - libsensorservice \ - libskia \ - libskiagl \ - libsonivox \ - libsoundpool \ - libspeex \ - libsqlite \ - libsqlite3_android \ - libSR_AcousticModels \ - libSR_AcousticState \ - libSR_AudioIn \ - libSR_Core \ - libSR_EventLog \ - libSR_G2P \ - libSR_Grammar \ - libSR_Nametag \ - libSR_Recognizer \ - libSR_Semproc \ - libSR_Session \ - libSR_Vocabulary \ - libstagefright \ - libstagefright_aacdec \ - libstagefright_aacenc \ - libstagefright_amrnb_common \ - libstagefright_amrnbdec \ - libstagefright_amrnbenc \ - libstagefright_amrwbdec \ - libstagefright_amrwbenc \ - libstagefright_avc_common \ - libstagefright_avcdec \ - libstagefright_avcenc \ - libstagefright_color_conversion \ - libstagefright_enc_common \ - libstagefright_foundation \ - libstagefright_g711dec \ - libstagefright_httplive \ - libstagefrighthw \ - libstagefright_id3 \ - libstagefright_m4vh263dec \ - libstagefright_m4vh263enc \ - libstagefright_matroska \ - libstagefright_mp3dec \ - libstagefright_mpeg2ts \ - libstagefright_omx \ - libstagefright_rtsp \ - libstagefright_vorbisdec \ - libstagefright_vpxdec \ - libstagefright_yuv \ - libstdc++ \ - libstlport \ - libstlport_static \ - libstorage \ - libsurfaceflinger \ - libsurfaceflinger_client \ - libsvoxpico \ - libsystem_server \ - libsysutils \ - libthread_db \ - libtinyxml \ - libtomcrypt \ - libtommath \ - libttspico \ - libttssynthproxy \ - libui \ - libunz \ - libusbhost \ - libutil \ - libutils \ - libv8 \ - libvisualizer \ - libvorbisidec \ - libvpx \ - libwebcore \ - libwpa_client \ - libwrapsim \ - libxml2 \ - libxslt \ - libzipfile \ - lights.kraken \ - lights.qsd8k \ - line_endings \ - linker \ - llvm-rs-link \ - localize \ - logcat \ - logwrapper \ - lsd \ - make_cfst \ - makedict \ - make_ext4fs \ - make_g2g \ - makekeycodes \ - make_ve_grammar \ - mediaserver \ - minigzip \ - mkbootfs \ - mkbootimg \ - mke2fs \ - mke2fs_host \ - mksdcard \ - mksnapshot \ - mkstubs \ - mkuserimg.sh \ - mkyaffs2image \ - mockrilcontroller \ - monkey \ - monkeyrunner \ - MonkeyRunnerTest \ - mtp \ - mtpd \ - ndc \ - netcfg \ - netd \ - network \ - ninepatch \ - oauth \ - obbtool \ - omx_tests \ - org.eclipse.core.commands_3.4.0.I20080509-2000 \ - org.eclipse.equinox.common_3.4.0.v20080421-2006 \ - org.eclipse.jface_3.4.2.M20090107-0800 \ - org-netbeans-api-visual \ - org-openide-util \ - osgi \ - pand \ - parseStringTest \ - ping \ - platform.xml \ - pm \ - post_trace \ - pppd \ - preload \ - profile_pid \ - profile_trace \ - q2dm \ - q2g \ - qemu-android \ - racoon \ - read_addr \ - read_method \ - read_pid \ - read_trace \ - resize2fs \ - resize2fs_host \ - rgb2565 \ - rsg-generator \ - run-as \ - runtime \ - schedtest \ - screenshot \ - screenshot2 \ - sdcard \ - sdklauncher \ - sdklib \ - sdkmanager \ - sdkstats \ - sdkuilib \ - sdk_v4 \ - sdk_v5 \ - sdk_v6 \ - sdk_v7 \ - sdk_v8 \ - sdptool \ - service \ - servicemanager \ - services \ - sig \ - sig-check \ - sig-create \ - signapk \ - signature-tools \ - spec-progress \ - sqlite3 \ - stack_dump \ - stringtemplate \ - surfaceflinger \ - svc \ - swing-worker-1.1 \ - swt \ - system_server \ - tblgen \ - tc \ - temp_layoutlib \ - test_g2g \ - test-progress \ - test-progress-new \ - test_swiarb \ - test_zipfile \ - toolbox \ - traceview \ - tune2fs \ - tune2fs_host \ - usbtest \ - vdc \ - vm-tests \ - vold \ - wdsclient \ - wpa_supplicant \ - yuv420sp2rgb \ - zipalign From 75493610b33323ccc958e2ff45e9eafb9750fa5d Mon Sep 17 00:00:00 2001 From: Joe Onorato Date: Tue, 22 May 2012 17:33:22 -0700 Subject: [PATCH 10/13] Fail when a non-vendor product references a vendor module. Change-Id: Ia5ca233e9b11f64b72074f65899d3041cf955c4c --- core/base_rules.mk | 2 ++ core/main.mk | 12 ++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/core/base_rules.mk b/core/base_rules.mk index 3b64d77f90..b13e3b50ed 100644 --- a/core/base_rules.mk +++ b/core/base_rules.mk @@ -568,6 +568,8 @@ ALL_MODULES.$(LOCAL_MODULE).EVENT_LOG_TAGS := \ $(ALL_MODULES.$(LOCAL_MODULE).EVENT_LOG_TAGS) $(event_log_tags) ALL_MODULES.$(LOCAL_MODULE).INTERMEDIATE_SOURCE_DIR := \ $(ALL_MODULES.$(LOCAL_MODULE).INTERMEDIATE_SOURCE_DIR) $(LOCAL_INTERMEDIATE_SOURCE_DIR) +ALL_MODULES.$(LOCAL_MODULE).MAKEFILE := \ + $(ALL_MODULES.$(LOCAL_MODULE).MAKEFILE) $(LOCAL_MODULE_MAKEFILE) ifdef LOCAL_MODULE_OWNER ALL_MODULES.$(LOCAL_MODULE).OWNER := \ $(strip $(ALL_MODULES.$(LOCAL_MODULE).OWNER) $(LOCAL_MODULE_OWNER)) diff --git a/core/main.mk b/core/main.mk index ac6442ad73..f76a8d15da 100644 --- a/core/main.mk +++ b/core/main.mk @@ -622,12 +622,12 @@ tests_MODULES := $(sort $(call get-tagged-modules,tests)) # and get rid of it from this list. # TODO: The shell is chosen by magic. Do we still need this? modules_to_install := $(sort \ - $(ALL_DEFAULT_INSTALLED_MODULES) \ - $(product_MODULES) \ - $(foreach tag,$(tags_to_install),$($(tag)_MODULES)) \ - $(call get-tagged-modules, shell_$(TARGET_SHELL)) \ - $(CUSTOM_MODULES) \ - ) + $(ALL_DEFAULT_INSTALLED_MODULES) \ + $(product_MODULES) \ + $(foreach tag,$(tags_to_install),$($(tag)_MODULES)) \ + $(call get-tagged-modules, shell_$(TARGET_SHELL)) \ + $(CUSTOM_MODULES) \ + ) # Some packages may override others using LOCAL_OVERRIDES_PACKAGES. # Filter out (do not install) any overridden packages. From 26ead966d72a436beddf02ef17268071cb982ce0 Mon Sep 17 00:00:00 2001 From: Joe Onorato Date: Wed, 11 Jul 2012 19:38:48 -0700 Subject: [PATCH 11/13] build system changes for jb-aah-dev merge Change-Id: I29e27505a0d9f7cc2932f725bfe1c83d804388bc --- core/main.mk | 13 +++++++------ target/product/core.mk | 9 ++------- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/core/main.mk b/core/main.mk index f76a8d15da..874bb0bca0 100644 --- a/core/main.mk +++ b/core/main.mk @@ -597,11 +597,12 @@ ifdef FULL_BUILD # The base list of modules to build for this product is specified # by the appropriate product definition file, which was included # by product_config.make. - product_MODULES := $(call module-installed-files, \ - $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES)) + product_MODULES := $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES) + $(call expand-required-modules,product_MODULES,$(product_MODULES)) + product_FILES := $(call module-installed-files, $(product_MODULES)) ifeq (0,1) - $(info product_MODULES for $(TARGET_DEVICE) ($(INTERNAL_PRODUCT)):) - $(foreach p,$(product_MODULES),$(info : $(p))) + $(info product_FILES for $(TARGET_DEVICE) ($(INTERNAL_PRODUCT)):) + $(foreach p,$(product_FILES),$(info : $(p))) $(error done) endif else @@ -609,7 +610,7 @@ else # a subset of the module makefiles. Don't try to build any modules # requested by the product, because we probably won't have rules # to build them. - product_MODULES := + product_FILES := endif # When modules are tagged with debug eng or tests, they are installed @@ -623,7 +624,7 @@ tests_MODULES := $(sort $(call get-tagged-modules,tests)) # TODO: The shell is chosen by magic. Do we still need this? modules_to_install := $(sort \ $(ALL_DEFAULT_INSTALLED_MODULES) \ - $(product_MODULES) \ + $(product_FILES) \ $(foreach tag,$(tags_to_install),$($(tag)_MODULES)) \ $(call get-tagged-modules, shell_$(TARGET_SHELL)) \ $(CUSTOM_MODULES) \ diff --git a/target/product/core.mk b/target/product/core.mk index 466216f330..9f022e667e 100644 --- a/target/product/core.mk +++ b/target/product/core.mk @@ -22,7 +22,7 @@ PRODUCT_PROPERTY_OVERRIDES := \ ro.config.notification_sound=OnTheHunt.ogg \ ro.config.alarm_alert=Alarm_Classic.ogg -# Core modules (will move elsewhere) +# Core modules (will move elsewhere, previously user tagged) PRODUCT_PACKAGES := \ 20-dns.conf \ 95-configured \ @@ -36,6 +36,7 @@ PRODUCT_PACKAGES := \ bmgr \ bootanimation \ bugreport \ + content \ dbus-daemon \ debuggerd \ dhcpcd \ @@ -51,7 +52,6 @@ PRODUCT_PACKAGES := \ init \ input \ javax.obex \ - keystore \ libEGL \ libETC1 \ libFFTEm \ @@ -77,7 +77,6 @@ PRODUCT_PACKAGES := \ libdrm1 \ libdrm1_jni \ libeffects \ - libexif \ libgui \ libhardware \ libhardware_legacy \ @@ -104,7 +103,6 @@ PRODUCT_PACKAGES := \ libsonivox \ libsoundpool \ libsqlite \ - libsrec_jni \ libstagefright \ libstagefright_amrnb_common \ libstagefright_avc_common \ @@ -135,13 +133,11 @@ PRODUCT_PACKAGES := \ ndc \ netcfg \ netd \ - omx_tests \ ping \ platform.xml \ pppd \ pm \ racoon \ - rild \ run-as \ schedtest \ screenshot \ @@ -149,7 +145,6 @@ PRODUCT_PACKAGES := \ service \ servicemanager \ services \ - simg2img \ surfaceflinger \ svc \ system_server \ From f3319452ad378c7818ff0eec1a57dfe0173304d9 Mon Sep 17 00:00:00 2001 From: Joe Onorato Date: Mon, 23 Jul 2012 13:51:44 -0700 Subject: [PATCH 12/13] More product debugging. Change-Id: I17b5d441e44ea39564263b32f963e2d3ac684232 --- core/tasks/product-graph.mk | 116 +++++++++++++++++++++----- tools/product_debug.py | 160 ++++++++++++++++++++++++++++++++++++ 2 files changed, 256 insertions(+), 20 deletions(-) create mode 100755 tools/product_debug.py diff --git a/core/tasks/product-graph.mk b/core/tasks/product-graph.mk index 70b5de86e0..1ccb20bf99 100644 --- a/core/tasks/product-graph.mk +++ b/core/tasks/product-graph.mk @@ -14,8 +14,31 @@ # limitations under the License. # +# the foreach and the if remove the single space entries that creep in because of the evals +define gather-all-products +$(sort $(foreach p, \ + $(eval _all_products_visited := ) + $(call all-products-inner, $(ALL_PRODUCTS)) \ + , $(if $(strip $(p)),$(strip $(p)),)) \ +) +endef + +define all-products-inner + $(foreach p,$(1),\ + $(if $(filter $(p),$(_all_products_visited)),, \ + $(p) \ + $(eval _all_products_visited += $(p)) \ + $(call all-products-inner, $(PRODUCTS.$(strip $(p)).INHERITS_FROM)) + ) \ + ) +endef + + +this_makefile := build/core/tasks/product-graph.mk + +products_svg := $(OUT_DIR)/products.svg products_pdf := $(OUT_DIR)/products.pdf -products_graph := $(products_pdf:%.pdf=%.dot) +products_graph := $(OUT_DIR)/products.dot ifeq ($(strip $(ANDROID_PRODUCT_GRAPH)),) products_list := $(INTERNAL_PRODUCT) else @@ -26,39 +49,92 @@ products_list := $(foreach prod,$(ANDROID_PRODUCT_GRAPH),$(call resolve-short-pr endif endif -$(products_graph): PRIVATE_PRODUCTS := $(products_list) +really_all_products := $(call gather-all-products) -$(products_graph): - @echo Product graph DOT: $@ for $(PRIVATE_PRODUCTS) +$(products_graph): PRIVATE_PRODUCTS := $(really_all_products) +$(products_graph): PRIVATE_PRODUCTS_FILTER := $(products_list) + +$(products_graph): $(this_makefile) + @echo Product graph DOT: $@ for $(PRIVATE_PRODUCTS_FILTER) $(hide) ( \ echo 'digraph {'; \ echo 'graph [ ratio=.5 ];'; \ - $(foreach p,$(ALL_PRODUCTS), \ - $(foreach d,$(PRODUCTS.$(strip $(p)).INHERITS_FROM), \ - echo \"$(d)\" -\> \"$(p)\";)) \ - $(foreach prod, \ - $(sort $(foreach p,$(ALL_PRODUCTS), \ - $(foreach d,$(PRODUCTS.$(strip $(p)).INHERITS_FROM), $(d))) \ - $(foreach p,$(ALL_PRODUCTS),$(p))), \ + $(foreach p,$(PRIVATE_PRODUCTS), \ + $(foreach d,$(PRODUCTS.$(strip $(p)).INHERITS_FROM), echo \"$(d)\" -\> \"$(p)\";)) \ + $(foreach prod, $(PRIVATE_PRODUCTS), \ echo \"$(prod)\" [ \ label=\"$(dir $(prod))\\n$(notdir $(prod))\\n\\n$(PRODUCTS.$(strip $(prod)).PRODUCT_MODEL)\\n$(PRODUCTS.$(strip $(prod)).PRODUCT_DEVICE)\" \ - $(if $(filter $(prod),$(PRIVATE_PRODUCTS)), \ - style=\"filled\" fillcolor=\"#FFFDB0\",) \ + $(if $(filter $(prod),$(PRIVATE_PRODUCTS_FILTER)), style=\"filled\" fillcolor=\"#FFFDB0\",) \ + fontcolor=\"darkblue\" href=\"products/$(prod).html\" \ ];) \ echo '}' \ ) \ - | ./build/tools/filter-product-graph.py $(PRIVATE_PRODUCTS) \ + | ./build/tools/filter-product-graph.py $(PRIVATE_PRODUCTS_FILTER) \ > $@ -# This rule doesn't include any nodes that don't inherit from -# anything or don't have anything inherit from them, to make the -# graph more readable. To add that, add this line to the rule -# below: -# $(foreach p,$(ALL_PRODUCTS), echo \"$(p)\";) \ +# Evaluates to the name of the product file +# $(1) product file +define product-debug-filename +$(OUT_DIR)/products/$(strip $(1)).html +endef + +# Makes a rule for the product debug info +# $(1) product file +define transform-product-debug +$(OUT_DIR)/products/$(strip $(1)).txt: $(this_makefile) + @echo Product debug info file: $$@ + $(hide) rm -f $$@ + $(hide) mkdir -p $$(dir $$@) + $(hide) echo 'FILE=$(strip $(1))' >> $$@ + $(hide) echo 'PRODUCT_NAME=$$(PRODUCTS.$(strip $(1)).PRODUCT_NAME)' >> $$@ + $(hide) echo 'PRODUCT_MODEL=$$(PRODUCTS.$(strip $(1)).PRODUCT_MODEL)' >> $$@ + $(hide) echo 'PRODUCT_LOCALES=$$(PRODUCTS.$(strip $(1)).PRODUCT_LOCALES)' >> $$@ + $(hide) echo 'PRODUCT_AAPT_CONFIG=$$(PRODUCTS.$(strip $(1)).PRODUCT_AAPT_CONFIG)' >> $$@ + $(hide) echo 'PRODUCT_AAPT_PREF_CONFIG=$$(PRODUCTS.$(strip $(1)).PRODUCT_AAPT_PREF_CONFIG)' >> $$@ + $(hide) echo 'PRODUCT_PACKAGES=$$(PRODUCTS.$(strip $(1)).PRODUCT_PACKAGES)' >> $$@ + $(hide) echo 'PRODUCT_DEVICE=$$(PRODUCTS.$(strip $(1)).PRODUCT_DEVICE)' >> $$@ + $(hide) echo 'PRODUCT_MANUFACTURER=$$(PRODUCTS.$(strip $(1)).PRODUCT_MANUFACTURER)' >> $$@ + $(hide) echo 'PRODUCT_PROPERTY_OVERRIDES=$$(PRODUCTS.$(strip $(1)).PRODUCT_PROPERTY_OVERRIDES)' >> $$@ + $(hide) echo 'PRODUCT_DEFAULT_PROPERTY_OVERRIDES=$$(PRODUCTS.$(strip $(1)).PRODUCT_DEFAULT_PROPERTY_OVERRIDES)' >> $$@ + $(hide) echo 'PRODUCT_CHARACTERISTICS=$$(PRODUCTS.$(strip $(1)).PRODUCT_CHARACTERISTICS)' >> $$@ + $(hide) echo 'PRODUCT_COPY_FILES=$$(PRODUCTS.$(strip $(1)).PRODUCT_COPY_FILES)' >> $$@ + $(hide) echo 'PRODUCT_OTA_PUBLIC_KEYS=$$(PRODUCTS.$(strip $(1)).PRODUCT_OTA_PUBLIC_KEYS)' >> $$@ + $(hide) echo 'PRODUCT_EXTRA_RECOVERY_KEYS=$$(PRODUCTS.$(strip $(1)).PRODUCT_EXTRA_RECOVERY_KEYS)' >> $$@ + $(hide) echo 'PRODUCT_PACKAGE_OVERLAYS=$$(PRODUCTS.$(strip $(1)).PRODUCT_PACKAGE_OVERLAYS)' >> $$@ + $(hide) echo 'DEVICE_PACKAGE_OVERLAYS=$$(PRODUCTS.$(strip $(1)).DEVICE_PACKAGE_OVERLAYS)' >> $$@ + $(hide) echo 'PRODUCT_TAGS=$$(PRODUCTS.$(strip $(1)).PRODUCT_TAGS)' >> $$@ + $(hide) echo 'PRODUCT_SDK_ADDON_NAME=$$(PRODUCTS.$(strip $(1)).PRODUCT_SDK_ADDON_NAME)' >> $$@ + $(hide) echo 'PRODUCT_SDK_ADDON_COPY_FILES=$$(PRODUCTS.$(strip $(1)).PRODUCT_SDK_ADDON_COPY_FILES)' >> $$@ + $(hide) echo 'PRODUCT_SDK_ADDON_COPY_MODULES=$$(PRODUCTS.$(strip $(1)).PRODUCT_SDK_ADDON_COPY_MODULES)' >> $$@ + $(hide) echo 'PRODUCT_SDK_ADDON_DOC_MODULES=$$(PRODUCTS.$(strip $(1)).PRODUCT_SDK_ADDON_DOC_MODULES)' >> $$@ + $(hide) echo 'PRODUCT_DEFAULT_WIFI_CHANNELS=$$(PRODUCTS.$(strip $(1)).PRODUCT_DEFAULT_WIFI_CHANNELS)' >> $$@ + $(hide) echo 'PRODUCT_DEFAULT_DEV_CERTIFICATE=$$(PRODUCTS.$(strip $(1)).PRODUCT_DEFAULT_DEV_CERTIFICATE)' >> $$@ + $(hide) echo 'PRODUCT_RESTRICT_VENDOR_FILES=$$(PRODUCTS.$(strip $(1)).PRODUCT_RESTRICT_VENDOR_FILES)' >> $$@ + $(hide) echo 'PRODUCT_FACTORY_RAMDISK_MODULES=$$(PRODUCTS.$(strip $(1)).PRODUCT_FACTORY_RAMDISK_MODULES)' >> $$@ + $(hide) echo 'PRODUCT_VENDOR_KERNEL_HEADERS=$$(PRODUCTS.$(strip $(1)).PRODUCT_VENDOR_KERNEL_HEADERS)' >> $$@ + +$(call product-debug-filename, $(p)): \ + $(OUT_DIR)/products/$(strip $(1)).txt \ + build/tools/product_debug.py \ + $(this_makefile) + @echo Product debug html file: $$@ + $(hide) mkdir -p $$(dir $$@) + $(hide) cat $$< | build/tools/product_debug.py > $$@ +endef + +product_debug_files:= +$(foreach p,$(really_all_products), \ + $(eval $(call transform-product-debug, $(p))) \ + $(eval product_debug_files += $(call product-debug-filename, $(p))) \ + ) $(products_pdf): $(products_graph) @echo Product graph PDF: $@ dot -Tpdf -Nshape=box -o $@ $< -product-graph: $(products_pdf) +$(products_svg): $(products_graph) $(product_debug_files) + @echo Product graph SVG: $@ + dot -Tsvg -Nshape=box -o $@ $< + +product-graph: $(products_pdf) $(products_svg) diff --git a/tools/product_debug.py b/tools/product_debug.py new file mode 100755 index 0000000000..661c5b7cd8 --- /dev/null +++ b/tools/product_debug.py @@ -0,0 +1,160 @@ +#!/usr/bin/env python +# +# Copyright (C) 2012 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. + +import os +import re +import sys + +def break_lines(key, val): + # these don't get split + if key in ("PRODUCT_MODEL"): + return (key,val) + return (key, "\n".join(val.split())) + +def split_line(line): + words = line.split("=", 1) + if len(words) == 1: + return (words[0], "") + else: + return (words[0], words[1]) + +def sort_lines(text): + lines = text.split() + lines.sort() + return "\n".join(lines) + +def parse_variables(lines): + return [split_line(line) for line in lines if line.strip()] + +def render_variables(variables): + variables = dict(variables) + del variables["FILE"] + variables = list(variables.iteritems()) + variables.sort(lambda a, b: cmp(a[0], b[0])) + return ("" + + "\n".join([ "" % { "key": key, "val": val } + for key,val in variables]) + +"
%(key)s%(val)s
") + +def linkify_inherit(variables, text, func_name): + groups = re.split("(\\$\\(call " + func_name + ",.*\\))", text) + result = "" + for i in range(0,len(groups)/2): + i = i * 2 + result = result + groups[i] + s = groups[i+1] + href = s.split(",", 1)[1].strip()[:-1] + href = href.replace("$(SRC_TARGET_DIR)", "build/target") + href = ("../" * variables["FILE"].count("/")) + href + ".html" + result = result + "%s" % (href,s) + result = result + groups[-1] + return result + +def render_original(variables, text): + text = linkify_inherit(variables, text, "inherit-product") + text = linkify_inherit(variables, text, "inherit-product-if-exists") + return text + +def read_file(fn): + f = file(fn) + text = f.read() + f.close() + return text + +def main(argv): + # read the variables + lines = sys.stdin.readlines() + variables = parse_variables(lines) + + # format the variables + variables = [break_lines(key,val) for key,val in variables] + + # now it's a dict + variables = dict(variables) + + sorted_vars = ( + "PRODUCT_COPY_FILES", + "PRODUCT_PACKAGES", + "PRODUCT_LOCALES", + "PRODUCT_FACTORY_RAMDISK_MODULES", + "PRODUCT_PROPERTY_OVERRIDES", + ) + + for key in sorted_vars: + variables[key] = sort_lines(variables[key]) + + # the original file + original = read_file(variables["FILE"]) + + # formatting + values = dict(variables) + values.update({ + "variables": render_variables(variables), + "original": render_original(variables, original), + }) + print """ + + + + %(FILE)s + + + +

%(FILE)s

+Original +Variables +

Original

+
%(original)s
+

Variables

+%(variables)s + + +""" % values + +if __name__ == "__main__": + main(sys.argv) From 22273e6cfed9a62d78fd2f955f45567afd52676c Mon Sep 17 00:00:00 2001 From: Joe Onorato Date: Mon, 23 Jul 2012 18:20:07 -0700 Subject: [PATCH 13/13] Move the old user tagged modules over to base.mk so mini and core both share them. Change-Id: I9d3a3c165fa56d4ca137b3c06e249e1deea6a1c5 --- target/product/base.mk | 147 +++++++++++++++++++++++++++++++++++++++++ target/product/core.mk | 134 +------------------------------------ target/product/mini.mk | 11 ++- 3 files changed, 160 insertions(+), 132 deletions(-) create mode 100644 target/product/base.mk diff --git a/target/product/base.mk b/target/product/base.mk new file mode 100644 index 0000000000..afde9b5802 --- /dev/null +++ b/target/product/base.mk @@ -0,0 +1,147 @@ +# +# Copyright (C) 2012 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. +# + +# Base modules (will move elsewhere, previously user tagged) +PRODUCT_PACKAGES += \ + 20-dns.conf \ + 95-configured \ + adb \ + adbd \ + am \ + android.policy \ + android.test.runner \ + app_process \ + applypatch \ + bmgr \ + bootanimation \ + bugreport \ + content \ + dbus-daemon \ + debuggerd \ + dhcpcd \ + dhcpcd-run-hooks \ + dnsmasq \ + dumpstate \ + dumpsys \ + framework \ + fsck_msdos \ + gralloc.default \ + gzip \ + ime \ + init \ + input \ + javax.obex \ + libEGL \ + libETC1 \ + libFFTEm \ + libGLES_android \ + libGLESv1_CM \ + libGLESv2 \ + libSR_AudioIn \ + libandroid \ + libandroid_runtime \ + libandroid_servers \ + libaudioeffect_jni \ + libaudioflinger \ + libbinder \ + libbundlewrapper \ + libc \ + libcamera_client \ + libcameraservice \ + libchromium_net \ + libctest \ + libcutils \ + libdbus \ + libdl \ + libdrm1 \ + libdrm1_jni \ + libeffects \ + libgui \ + libhardware \ + libhardware_legacy \ + libiprouteutil \ + libjni_latinime \ + libjnigraphics \ + libjpeg \ + liblog \ + libm \ + libmedia \ + libmedia_jni \ + libmediaplayerservice \ + libmtp \ + libnetlink \ + libnetutils \ + libpixelflinger \ + libpower \ + libreference-ril \ + libreverbwrapper \ + libril \ + librtp_jni \ + libsensorservice \ + libskia \ + libsonivox \ + libsoundpool \ + libsqlite \ + libstagefright \ + libstagefright_amrnb_common \ + libstagefright_avc_common \ + libstagefright_enc_common \ + libstagefright_foundation \ + libstagefright_omx \ + libstagefright_yuv \ + libstdc++ \ + libstlport \ + libsurfaceflinger \ + libsurfaceflinger_client \ + libsystem_server \ + libsysutils \ + libthread_db \ + libui \ + libusbhost \ + libutils \ + libvisualizer \ + libvorbisidec \ + libwebcore \ + libwpa_client \ + linker \ + logcat \ + logwrapper \ + mediaserver \ + monkey \ + mtpd \ + ndc \ + netcfg \ + netd \ + ping \ + platform.xml \ + pppd \ + pm \ + racoon \ + run-as \ + schedtest \ + screenshot \ + sdcard \ + service \ + servicemanager \ + services \ + surfaceflinger \ + svc \ + system_server \ + tc \ + toolbox \ + vdc \ + vold + diff --git a/target/product/core.mk b/target/product/core.mk index 9f022e667e..8a7d6dfc09 100644 --- a/target/product/core.mk +++ b/target/product/core.mk @@ -22,137 +22,6 @@ PRODUCT_PROPERTY_OVERRIDES := \ ro.config.notification_sound=OnTheHunt.ogg \ ro.config.alarm_alert=Alarm_Classic.ogg -# Core modules (will move elsewhere, previously user tagged) -PRODUCT_PACKAGES := \ - 20-dns.conf \ - 95-configured \ - adb \ - adbd \ - am \ - android.policy \ - android.test.runner \ - app_process \ - applypatch \ - bmgr \ - bootanimation \ - bugreport \ - content \ - dbus-daemon \ - debuggerd \ - dhcpcd \ - dhcpcd-run-hooks \ - dnsmasq \ - dumpstate \ - dumpsys \ - framework \ - fsck_msdos \ - gralloc.default \ - gzip \ - ime \ - init \ - input \ - javax.obex \ - libEGL \ - libETC1 \ - libFFTEm \ - libGLES_android \ - libGLESv1_CM \ - libGLESv2 \ - libSR_AudioIn \ - libandroid \ - libandroid_runtime \ - libandroid_servers \ - libaudioeffect_jni \ - libaudioflinger \ - libbinder \ - libbundlewrapper \ - libc \ - libcamera_client \ - libcameraservice \ - libchromium_net \ - libctest \ - libcutils \ - libdbus \ - libdl \ - libdrm1 \ - libdrm1_jni \ - libeffects \ - libgui \ - libhardware \ - libhardware_legacy \ - libiprouteutil \ - libjni_latinime \ - libjnigraphics \ - libjpeg \ - liblog \ - libm \ - libmedia \ - libmedia_jni \ - libmediaplayerservice \ - libmtp \ - libnetlink \ - libnetutils \ - libpixelflinger \ - libpower \ - libreference-ril \ - libreverbwrapper \ - libril \ - librtp_jni \ - libsensorservice \ - libskia \ - libsonivox \ - libsoundpool \ - libsqlite \ - libstagefright \ - libstagefright_amrnb_common \ - libstagefright_avc_common \ - libstagefright_enc_common \ - libstagefright_foundation \ - libstagefright_omx \ - libstagefright_yuv \ - libstdc++ \ - libstlport \ - libsurfaceflinger \ - libsurfaceflinger_client \ - libsystem_server \ - libsysutils \ - libthread_db \ - libui \ - libusbhost \ - libutils \ - libvisualizer \ - libvorbisidec \ - libwebcore \ - libwpa_client \ - linker \ - logcat \ - logwrapper \ - mediaserver \ - monkey \ - mtpd \ - ndc \ - netcfg \ - netd \ - ping \ - platform.xml \ - pppd \ - pm \ - racoon \ - run-as \ - schedtest \ - screenshot \ - sdcard \ - service \ - servicemanager \ - services \ - surfaceflinger \ - svc \ - system_server \ - tc \ - toolbox \ - vdc \ - vold - PRODUCT_PACKAGES += \ ApplicationsProvider \ BackupRestoreConfirmation \ @@ -288,3 +157,6 @@ ifeq ($(HAVE_SELINUX),true) property_contexts \ mac_permissions.xml endif + +$(call inherit-product, $(SRC_TARGET_DIR)/product/base.mk) + diff --git a/target/product/mini.mk b/target/product/mini.mk index 8a744284d8..5db6f3d0f2 100644 --- a/target/product/mini.mk +++ b/target/product/mini.mk @@ -51,6 +51,7 @@ PRODUCT_PROPERTY_OVERRIDES += \ ro.config.notification_sound=OnTheHunt.ogg \ ro.config.alarm_alert=Alarm_Classic.ogg +# Please keep this list sorted alphabetically PRODUCT_PACKAGES += \ ApplicationsProvider \ ContactsProvider \ @@ -63,6 +64,8 @@ PRODUCT_PACKAGES += \ TelephonyProvider \ UserDictionaryProvider \ apache-xml \ + audio \ + bluetoothd \ bouncycastle \ bu \ cacerts \ @@ -80,6 +83,7 @@ PRODUCT_PACKAGES += \ dx \ ext \ framework-res \ + hciattach \ hprof-conv \ icu.dat \ installd \ @@ -133,11 +137,15 @@ PRODUCT_PACKAGES += \ libwebrtc_audio_preprocessing \ libwilhelm \ libz \ + lint \ mdnsd \ + network \ + pand \ requestsync \ screencap \ + sdptool \ sensorservice \ - lint + wpa_supplicant PRODUCT_COPY_FILES += \ system/core/rootdir/init.usb.rc:root/init.usb.rc \ @@ -202,6 +210,7 @@ PRODUCT_PROPERTY_OVERRIDES += \ ro.config.ringtone=Ring_Synth_04.ogg \ ro.config.notification_sound=pixiedust.ogg +$(call inherit-product, $(SRC_TARGET_DIR)/product/base.mk) $(call inherit-product-if-exists, frameworks/base/data/keyboards/keyboards.mk) $(call inherit-product-if-exists, frameworks/base/data/fonts/fonts.mk) $(call inherit-product-if-exists, frameworks/base/data/sounds/AudioPackage5.mk)