am 2bb389cd: am cec5432b: Remove old-style blobs handlers

* commit '2bb389cdd74ccb281d71f3d08445d17af9e9dc40':
  Remove old-style blobs handlers
diff --git a/BoardConfig.mk b/BoardConfig.mk
index 1a92e94..9f9d389 100644
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -15,5 +15,10 @@
 # Use the non-open-source part, if present
 -include vendor/samsung/maguro/BoardConfigVendor.mk
 
+# Use the open-source board-info file if none was set by the vendor
+# config.
+TARGET_BOARD_INFO_FILE ?= device/samsung/maguro/board-info.txt
+
 # Use the part that is common between all tunas
 include device/samsung/tuna/BoardConfig.mk
+
diff --git a/CleanSpec.mk b/CleanSpec.mk
new file mode 100644
index 0000000..08fde87
--- /dev/null
+++ b/CleanSpec.mk
@@ -0,0 +1,52 @@
+# Copyright (C) 2011 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.
+#
+
+# If you don't need to do a full clean build but would like to touch
+# a file or delete some intermediate files, add a clean step to the end
+# of the list.  These steps will only be run once, if they haven't been
+# run before.
+#
+# E.g.:
+#     $(call add-clean-step, touch -c external/sqlite/sqlite3.h)
+#     $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libz_intermediates)
+#
+# Always use "touch -c" and "rm -f" or "rm -rf" to gracefully deal with
+# files that are missing or have been moved.
+#
+# Use $(PRODUCT_OUT) to get to the "out/target/product/blah/" directory.
+# Use $(OUT_DIR) to refer to the "out" directory.
+#
+# If you need to re-do something that's already mentioned, just copy
+# the command and add it to the bottom of the list.  E.g., if a change
+# that you made last week required touching a file and a change you
+# made today requires touching the same file, just copy the old
+# touch step and add it to the end of the list.
+#
+# ************************************************
+# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
+# ************************************************
+
+# For example:
+#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/AndroidTests_intermediates)
+#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/core_intermediates)
+#$(call add-clean-step, find $(OUT_DIR) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f)
+#$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*)
+
+$(call add-clean-step, rm -rf $(TARGET_OUT_VENDOR)/lib/libsecril-client.so)
+$(call add-clean-step, rm -rf $(TARGET_OUT_VENDOR)/lib/hw/gps.omap4.hspa.so)
+$(call add-clean-step, rm -rf $(TARGET_OUT_VENDOR)/etc/gps.sirfgps.hspa.conf)
+# ************************************************
+# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
+# ************************************************
diff --git a/board-info.txt b/board-info.txt
index d8f418b..cf97d33 100644
--- a/board-info.txt
+++ b/board-info.txt
@@ -1,4 +1,7 @@
+# This is the open-source version of board-info.txt; it should contain
+# version of the radio and bootloader that are available to the
+# public.
 require board=tuna
-require version-bootloader=PRIMEKK15|PRIMELA03
-require version-baseband=I9250XXKK6|I9250XXLA2
+require version-bootloader=PRIMEKJ10|PRIMEKK15|PRIMEKL01|PRIMELA03
+require version-baseband=I9250XXKK6|I9250XXLA1|9250XXLA2
 
diff --git a/full_maguro.mk b/full_maguro.mk
index a13c4bd..a3f7fd7 100644
--- a/full_maguro.mk
+++ b/full_maguro.mk
@@ -40,3 +40,4 @@
 PRODUCT_DEVICE := maguro
 PRODUCT_BRAND := Android
 PRODUCT_MODEL := Full AOSP on Maguro
+PRODUCT_RESTRICT_VENDOR_FILES := true
diff --git a/proprietary-blobs.txt b/proprietary-blobs.txt
new file mode 100644
index 0000000..33f28c4
--- /dev/null
+++ b/proprietary-blobs.txt
@@ -0,0 +1,38 @@
+# Copyright (C) 2011 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 file is generated by device/common/generate-blob-lists.sh - DO NOT EDIT
+
+/system/bin/fRom
+/system/lib/libsecril-client.so
+/system/vendor/bin/pvrsrvctl
+/system/vendor/etc/sirfgps.conf
+/system/vendor/firmware/bcm4330.hcd
+/system/vendor/firmware/ducati-m3.bin
+/system/vendor/firmware/libpn544_fw.so
+/system/vendor/lib/egl/libEGL_POWERVR_SGX540_120.so
+/system/vendor/lib/egl/libGLESv1_CM_POWERVR_SGX540_120.so
+/system/vendor/lib/egl/libGLESv2_POWERVR_SGX540_120.so
+/system/vendor/lib/hw/gps.omap4.so
+/system/vendor/lib/hw/gralloc.omap4.so
+/system/vendor/lib/libglslcompiler.so
+/system/vendor/lib/libIMGegl.so
+/system/vendor/lib/libinvensense_mpl.so
+/system/vendor/lib/libpvr2d.so
+/system/vendor/lib/libpvrANDROID_WSEGL.so
+/system/vendor/lib/libPVRScopeServices.so
+/system/vendor/lib/libsec-ril.so
+/system/vendor/lib/libsrv_init.so
+/system/vendor/lib/libsrv_um.so
+/system/vendor/lib/libusc.so
diff --git a/self-extractors/broadcom/staging/BoardConfigMaguro.mk b/self-extractors/broadcom/staging/BoardConfigPartial.mk
similarity index 100%
rename from self-extractors/broadcom/staging/BoardConfigMaguro.mk
rename to self-extractors/broadcom/staging/BoardConfigPartial.mk
diff --git a/self-extractors/broadcom/staging/device-maguro.mk b/self-extractors/broadcom/staging/device-partial.mk
similarity index 81%
rename from self-extractors/broadcom/staging/device-maguro.mk
rename to self-extractors/broadcom/staging/device-partial.mk
index 414c0cf..118c94a 100644
--- a/self-extractors/broadcom/staging/device-maguro.mk
+++ b/self-extractors/broadcom/staging/device-partial.mk
@@ -12,9 +12,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-LOCAL_PATH := vendor/broadcom/maguro
-
 # Broadcom blob(s) necessary for Maguro hardware
-PRODUCT_COPY_FILES := \
-    $(LOCAL_PATH)/proprietary/bcm4330.hcd:system/vendor/firmware/bcm4330.hcd \
-
+PRODUCT_PACKAGES := \
+    bcm4330
diff --git a/self-extractors/broadcom/staging/proprietary/Android.mk b/self-extractors/broadcom/staging/proprietary/Android.mk
new file mode 100644
index 0000000..888c48f
--- /dev/null
+++ b/self-extractors/broadcom/staging/proprietary/Android.mk
@@ -0,0 +1,29 @@
+# Copyright (C) 2011 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.
+
+LOCAL_PATH := $(call my-dir)
+
+ifeq ($(TARGET_DEVICE),maguro)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := bcm4330
+LOCAL_MODULE_OWNER := broadcom
+LOCAL_SRC_FILES := bcm4330.hcd
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_SUFFIX := .hcd
+LOCAL_MODULE_CLASS := ETC
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/firmware
+include $(BUILD_PREBUILT)
+
+endif
diff --git a/self-extractors/csr/staging/BoardConfigMaguro.mk b/self-extractors/csr/staging/BoardConfigPartial.mk
similarity index 100%
rename from self-extractors/csr/staging/BoardConfigMaguro.mk
rename to self-extractors/csr/staging/BoardConfigPartial.mk
diff --git a/self-extractors/csr/staging/device-maguro.mk b/self-extractors/csr/staging/device-maguro.mk
deleted file mode 100644
index de44d61..0000000
--- a/self-extractors/csr/staging/device-maguro.mk
+++ /dev/null
@@ -1,21 +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.
-
-LOCAL_PATH := vendor/csr/maguro
-
-# CSR blob(s) necessary for Maguro hardware
-PRODUCT_COPY_FILES := \
-    $(LOCAL_PATH)/proprietary/sirfgps.conf:system/vendor/etc/sirfgps.conf \
-    $(LOCAL_PATH)/proprietary/gps.omap4.so:system/vendor/lib/hw/gps.omap4.so \
-
diff --git a/self-extractors/ti/staging/device-maguro.mk b/self-extractors/csr/staging/device-partial.mk
similarity index 76%
copy from self-extractors/ti/staging/device-maguro.mk
copy to self-extractors/csr/staging/device-partial.mk
index 6dc6a36..82da534 100644
--- a/self-extractors/ti/staging/device-maguro.mk
+++ b/self-extractors/csr/staging/device-partial.mk
@@ -12,9 +12,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-LOCAL_PATH := vendor/ti/maguro
-
-# TI blob(s) necessary for Maguro hardware
-PRODUCT_COPY_FILES := \
-    $(LOCAL_PATH)/proprietary/ducati-m3.bin:system/vendor/firmware/ducati-m3.bin \
-
+# CSR blob(s) necessary for Maguro hardware
+PRODUCT_PACKAGES := \
+    sirfgps \
+    gps.omap4
diff --git a/self-extractors/csr/staging/proprietary/Android.mk b/self-extractors/csr/staging/proprietary/Android.mk
new file mode 100644
index 0000000..8083553
--- /dev/null
+++ b/self-extractors/csr/staging/proprietary/Android.mk
@@ -0,0 +1,39 @@
+# Copyright (C) 2011 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.
+
+LOCAL_PATH := $(call my-dir)
+
+ifeq ($(TARGET_DEVICE),maguro)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := gps.omap4
+LOCAL_MODULE_OWNER := csr
+LOCAL_SRC_FILES := gps.omap4.so
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_SUFFIX := .so
+LOCAL_MODULE_CLASS := SHARED_LIBRARIES
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/lib/hw
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := sirfgps
+LOCAL_MODULE_OWNER := csr
+LOCAL_SRC_FILES := sirfgps.conf
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_SUFFIX := .conf
+LOCAL_MODULE_CLASS := ETC
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc
+include $(BUILD_PREBUILT)
+
+endif
diff --git a/self-extractors/generate-packages.sh b/self-extractors/generate-packages.sh
index 0365d11..da0c398 100755
--- a/self-extractors/generate-packages.sh
+++ b/self-extractors/generate-packages.sh
@@ -24,8 +24,10 @@
 # 239410 = IML74K
 # 257829 = IMM30B
 # 262866 = IMM30D
-ZIP=yakju-ota-262866.zip
-BUILD=imm30d
+# 241580 = IRL89
+# 241968 = IRM03
+ZIP=yakju-ota-241968.zip
+BUILD=irm03
 ROOTDEVICE=maguro
 DEVICE=maguro
 MANUFACTURER=samsung
@@ -51,7 +53,7 @@
     ;;
   imgtec)
     TO_EXTRACT="\
-            system/vendor/bin/pvrsrvinit \
+            system/vendor/bin/pvrsrvctl \
             system/vendor/lib/egl/libEGL_POWERVR_SGX540_120.so \
             system/vendor/lib/egl/libGLESv1_CM_POWERVR_SGX540_120.so \
             system/vendor/lib/egl/libGLESv2_POWERVR_SGX540_120.so \
diff --git a/self-extractors/imgtec/staging/BoardConfigMaguro.mk b/self-extractors/imgtec/staging/BoardConfigPartial.mk
similarity index 100%
rename from self-extractors/imgtec/staging/BoardConfigMaguro.mk
rename to self-extractors/imgtec/staging/BoardConfigPartial.mk
diff --git a/self-extractors/imgtec/staging/device-maguro.mk b/self-extractors/imgtec/staging/device-maguro.mk
deleted file mode 100644
index 36915cc..0000000
--- a/self-extractors/imgtec/staging/device-maguro.mk
+++ /dev/null
@@ -1,32 +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.
-
-LOCAL_PATH := vendor/imgtec/maguro
-
-# Imgtec blob(s) necessary for Maguro hardware
-PRODUCT_COPY_FILES += \
-    $(LOCAL_PATH)/proprietary/pvrsrvinit:system/vendor/bin/pvrsrvinit \
-    $(LOCAL_PATH)/proprietary/libEGL_POWERVR_SGX540_120.so:system/vendor/lib/egl/libEGL_POWERVR_SGX540_120.so \
-    $(LOCAL_PATH)/proprietary/libGLESv1_CM_POWERVR_SGX540_120.so:system/vendor/lib/egl/libGLESv1_CM_POWERVR_SGX540_120.so \
-    $(LOCAL_PATH)/proprietary/libGLESv2_POWERVR_SGX540_120.so:system/vendor/lib/egl/libGLESv2_POWERVR_SGX540_120.so \
-    $(LOCAL_PATH)/proprietary/gralloc.omap4.so:system/vendor/lib/hw/gralloc.omap4.so \
-    $(LOCAL_PATH)/proprietary/libglslcompiler.so:system/vendor/lib/libglslcompiler.so \
-    $(LOCAL_PATH)/proprietary/libIMGegl.so:system/vendor/lib/libIMGegl.so \
-    $(LOCAL_PATH)/proprietary/libpvr2d.so:system/vendor/lib/libpvr2d.so \
-    $(LOCAL_PATH)/proprietary/libpvrANDROID_WSEGL.so:system/vendor/lib/libpvrANDROID_WSEGL.so \
-    $(LOCAL_PATH)/proprietary/libPVRScopeServices.so:system/vendor/lib/libPVRScopeServices.so \
-    $(LOCAL_PATH)/proprietary/libsrv_init.so:system/vendor/lib/libsrv_init.so \
-    $(LOCAL_PATH)/proprietary/libsrv_um.so:system/vendor/lib/libsrv_um.so \
-    $(LOCAL_PATH)/proprietary/libusc.so:system/vendor/lib/libusc.so \
-
diff --git a/self-extractors/nxp/staging/device-maguro.mk b/self-extractors/imgtec/staging/device-partial.mk
similarity index 62%
copy from self-extractors/nxp/staging/device-maguro.mk
copy to self-extractors/imgtec/staging/device-partial.mk
index 96ad6fc..5dfa0b9 100644
--- a/self-extractors/nxp/staging/device-maguro.mk
+++ b/self-extractors/imgtec/staging/device-partial.mk
@@ -12,9 +12,18 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-LOCAL_PATH := vendor/nxp/maguro
-
-# NXP blob(s) necessary for Maguro hardware
-PRODUCT_COPY_FILES := \
-    $(LOCAL_PATH)/proprietary/libpn544_fw.so:system/vendor/firmware/libpn544_fw.so \
-
+# Imgtec blob(s) necessary for Maguro hardware
+PRODUCT_PACKAGES := \
+    pvrsrvctl \
+    libEGL_POWERVR_SGX540_120 \
+    libGLESv1_CM_POWERVR_SGX540_120 \
+    libGLESv2_POWERVR_SGX540_120 \
+    gralloc.omap4 \
+    libglslcompiler \
+    libIMGegl \
+    libpvr2d \
+    libpvrANDROID_WSEGL \
+    libPVRScopeServices \
+    libsrv_init \
+    libsrv_um \
+    libusc
diff --git a/self-extractors/imgtec/staging/proprietary/Android.mk b/self-extractors/imgtec/staging/proprietary/Android.mk
new file mode 100644
index 0000000..2d69bf3
--- /dev/null
+++ b/self-extractors/imgtec/staging/proprietary/Android.mk
@@ -0,0 +1,148 @@
+# Copyright (C) 2011 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.
+
+LOCAL_PATH := $(call my-dir)
+
+ifeq ($(TARGET_DEVICE),maguro)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := pvrsrvctl
+LOCAL_MODULE_OWNER := imgtec
+LOCAL_SRC_FILES := pvrsrvctl
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := EXECUTABLES
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/bin
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := libEGL_POWERVR_SGX540_120
+LOCAL_MODULE_OWNER := imgtec
+LOCAL_SRC_FILES := libEGL_POWERVR_SGX540_120.so
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_SUFFIX := .so
+LOCAL_MODULE_CLASS := SHARED_LIBRARIES
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/lib/egl
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := libGLESv1_CM_POWERVR_SGX540_120
+LOCAL_MODULE_OWNER := imgtec
+LOCAL_SRC_FILES := libGLESv1_CM_POWERVR_SGX540_120.so
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_SUFFIX := .so
+LOCAL_MODULE_CLASS := SHARED_LIBRARIES
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/lib/egl
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := libGLESv2_POWERVR_SGX540_120
+LOCAL_MODULE_OWNER := imgtec
+LOCAL_SRC_FILES := libGLESv2_POWERVR_SGX540_120.so
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_SUFFIX := .so
+LOCAL_MODULE_CLASS := SHARED_LIBRARIES
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/lib/egl
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := gralloc.omap4
+LOCAL_MODULE_OWNER := imgtec
+LOCAL_SRC_FILES := gralloc.omap4.so
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_SUFFIX := .so
+LOCAL_MODULE_CLASS := SHARED_LIBRARIES
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/lib/hw
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := libglslcompiler
+LOCAL_MODULE_OWNER := imgtec
+LOCAL_SRC_FILES := libglslcompiler.so
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_SUFFIX := .so
+LOCAL_MODULE_CLASS := SHARED_LIBRARIES
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/lib
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := libIMGegl
+LOCAL_MODULE_OWNER := imgtec
+LOCAL_SRC_FILES := libIMGegl.so
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_SUFFIX := .so
+LOCAL_MODULE_CLASS := SHARED_LIBRARIES
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/lib
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := libpvr2d
+LOCAL_MODULE_OWNER := imgtec
+LOCAL_SRC_FILES := libpvr2d.so
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_SUFFIX := .so
+LOCAL_MODULE_CLASS := SHARED_LIBRARIES
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/lib
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := libpvrANDROID_WSEGL
+LOCAL_MODULE_OWNER := imgtec
+LOCAL_SRC_FILES := libpvrANDROID_WSEGL.so
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_SUFFIX := .so
+LOCAL_MODULE_CLASS := SHARED_LIBRARIES
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/lib
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := libPVRScopeServices
+LOCAL_MODULE_OWNER := imgtec
+LOCAL_SRC_FILES := libPVRScopeServices.so
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_SUFFIX := .so
+LOCAL_MODULE_CLASS := SHARED_LIBRARIES
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/lib
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := libsrv_init
+LOCAL_MODULE_OWNER := imgtec
+LOCAL_SRC_FILES := libsrv_init.so
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_SUFFIX := .so
+LOCAL_MODULE_CLASS := SHARED_LIBRARIES
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/lib
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := libsrv_um
+LOCAL_MODULE_OWNER := imgtec
+LOCAL_SRC_FILES := libsrv_um.so
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_SUFFIX := .so
+LOCAL_MODULE_CLASS := SHARED_LIBRARIES
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/lib
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := libusc
+LOCAL_MODULE_OWNER := imgtec
+LOCAL_SRC_FILES := libusc.so
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_SUFFIX := .so
+LOCAL_MODULE_CLASS := SHARED_LIBRARIES
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/lib
+include $(BUILD_PREBUILT)
+
+endif
diff --git a/self-extractors/invensense/staging/BoardConfigMaguro.mk b/self-extractors/invensense/staging/BoardConfigPartial.mk
similarity index 100%
rename from self-extractors/invensense/staging/BoardConfigMaguro.mk
rename to self-extractors/invensense/staging/BoardConfigPartial.mk
diff --git a/self-extractors/invensense/staging/device-maguro.mk b/self-extractors/invensense/staging/device-partial.mk
similarity index 80%
rename from self-extractors/invensense/staging/device-maguro.mk
rename to self-extractors/invensense/staging/device-partial.mk
index 2b7afb0..81986a3 100644
--- a/self-extractors/invensense/staging/device-maguro.mk
+++ b/self-extractors/invensense/staging/device-partial.mk
@@ -12,9 +12,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-LOCAL_PATH := vendor/invensense/maguro
-
 # Invensense blob(s) necessary for Maguro hardware
-PRODUCT_COPY_FILES := \
-    $(LOCAL_PATH)/proprietary/libinvensense_mpl.so:system/vendor/lib/libinvensense_mpl.so \
-
+PRODUCT_PACKAGES := \
+    libinvensense_mpl
diff --git a/self-extractors/invensense/staging/proprietary/Android.mk b/self-extractors/invensense/staging/proprietary/Android.mk
new file mode 100644
index 0000000..df7bfb2
--- /dev/null
+++ b/self-extractors/invensense/staging/proprietary/Android.mk
@@ -0,0 +1,29 @@
+# Copyright (C) 2011 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.
+
+LOCAL_PATH := $(call my-dir)
+
+ifeq ($(TARGET_DEVICE),maguro)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := libinvensense_mpl
+LOCAL_MODULE_OWNER := invensense
+LOCAL_SRC_FILES := libinvensense_mpl.so
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_SUFFIX := .so
+LOCAL_MODULE_CLASS := SHARED_LIBRARIES
+LOCAL_MODULE_PATH := $(TARGET_OUT)/vendor/lib
+include $(BUILD_PREBUILT)
+
+endif
diff --git a/self-extractors/nxp/staging/BoardConfigMaguro.mk b/self-extractors/nxp/staging/BoardConfigPartial.mk
similarity index 100%
rename from self-extractors/nxp/staging/BoardConfigMaguro.mk
rename to self-extractors/nxp/staging/BoardConfigPartial.mk
diff --git a/self-extractors/nxp/staging/device-maguro.mk b/self-extractors/nxp/staging/device-partial.mk
similarity index 81%
rename from self-extractors/nxp/staging/device-maguro.mk
rename to self-extractors/nxp/staging/device-partial.mk
index 96ad6fc..94593f2 100644
--- a/self-extractors/nxp/staging/device-maguro.mk
+++ b/self-extractors/nxp/staging/device-partial.mk
@@ -12,9 +12,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-LOCAL_PATH := vendor/nxp/maguro
-
 # NXP blob(s) necessary for Maguro hardware
-PRODUCT_COPY_FILES := \
-    $(LOCAL_PATH)/proprietary/libpn544_fw.so:system/vendor/firmware/libpn544_fw.so \
-
+PRODUCT_PACKAGES := \
+    libpn544_fw
diff --git a/self-extractors/nxp/staging/proprietary/Android.mk b/self-extractors/nxp/staging/proprietary/Android.mk
new file mode 100644
index 0000000..352c466
--- /dev/null
+++ b/self-extractors/nxp/staging/proprietary/Android.mk
@@ -0,0 +1,29 @@
+# Copyright (C) 2011 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.
+
+LOCAL_PATH := $(call my-dir)
+
+ifeq ($(TARGET_DEVICE),maguro)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := libpn544_fw
+LOCAL_MODULE_OWNER := nxp
+LOCAL_SRC_FILES := libpn544_fw.so
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_SUFFIX := .so
+LOCAL_MODULE_CLASS := SHARED_LIBRARIES
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/firmware
+include $(BUILD_PREBUILT)
+
+endif
diff --git a/self-extractors/root/BoardConfigVendor.mk b/self-extractors/root/BoardConfigVendor.mk
index b685549..ca10d74 100644
--- a/self-extractors/root/BoardConfigVendor.mk
+++ b/self-extractors/root/BoardConfigVendor.mk
@@ -12,7 +12,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-LOCAL_STEM := maguro/BoardConfigMaguro.mk
+LOCAL_STEM := maguro/BoardConfigPartial.mk
 
 -include vendor/broadcom/$(LOCAL_STEM)
 -include vendor/csr/$(LOCAL_STEM)
diff --git a/self-extractors/root/device-vendor.mk b/self-extractors/root/device-vendor.mk
index c266dda..833cbcd 100644
--- a/self-extractors/root/device-vendor.mk
+++ b/self-extractors/root/device-vendor.mk
@@ -12,7 +12,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-LOCAL_STEM := maguro/device-maguro.mk
+LOCAL_STEM := maguro/device-partial.mk
 
 $(call inherit-product-if-exists, vendor/broadcom/$(LOCAL_STEM))
 $(call inherit-product-if-exists, vendor/csr/$(LOCAL_STEM))
diff --git a/self-extractors/samsung/staging/BoardConfigMaguro.mk b/self-extractors/samsung/staging/BoardConfigPartial.mk
similarity index 100%
rename from self-extractors/samsung/staging/BoardConfigMaguro.mk
rename to self-extractors/samsung/staging/BoardConfigPartial.mk
diff --git a/self-extractors/samsung/staging/device-maguro.mk b/self-extractors/samsung/staging/device-maguro.mk
deleted file mode 100644
index 718c496..0000000
--- a/self-extractors/samsung/staging/device-maguro.mk
+++ /dev/null
@@ -1,22 +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.
-
-LOCAL_PATH := vendor/samsung/maguro
-
-# Samsung blob(s) necessary for Maguro hardware
-PRODUCT_COPY_FILES += \
-    $(LOCAL_PATH)/proprietary/fRom:system/bin/fRom \
-    $(LOCAL_PATH)/proprietary/libsecril-client.so:system/lib/libsecril-client.so \
-    $(LOCAL_PATH)/proprietary/libsec-ril.so:system/vendor/lib/libsec-ril.so \
-
diff --git a/self-extractors/ti/staging/device-maguro.mk b/self-extractors/samsung/staging/device-partial.mk
similarity index 76%
copy from self-extractors/ti/staging/device-maguro.mk
copy to self-extractors/samsung/staging/device-partial.mk
index 6dc6a36..3f1b7f5 100644
--- a/self-extractors/ti/staging/device-maguro.mk
+++ b/self-extractors/samsung/staging/device-partial.mk
@@ -12,9 +12,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-LOCAL_PATH := vendor/ti/maguro
-
-# TI blob(s) necessary for Maguro hardware
-PRODUCT_COPY_FILES := \
-    $(LOCAL_PATH)/proprietary/ducati-m3.bin:system/vendor/firmware/ducati-m3.bin \
-
+# Samsung blob(s) necessary for Maguro hardware
+PRODUCT_PACKAGES := \
+    fRom \
+    libsec-ril \
+    libsecril-client
diff --git a/self-extractors/samsung/staging/proprietary/Android.mk b/self-extractors/samsung/staging/proprietary/Android.mk
new file mode 100644
index 0000000..cd34265
--- /dev/null
+++ b/self-extractors/samsung/staging/proprietary/Android.mk
@@ -0,0 +1,48 @@
+# Copyright (C) 2011 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.
+
+LOCAL_PATH := $(call my-dir)
+
+ifeq ($(TARGET_DEVICE),maguro)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := fRom
+LOCAL_MODULE_OWNER := samsung
+LOCAL_SRC_FILES := fRom
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := EXECUTABLES
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/bin
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := libsec-ril
+LOCAL_MODULE_OWNER := samsung
+LOCAL_SRC_FILES := libsec-ril.so
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_SUFFIX := .so
+LOCAL_MODULE_CLASS := SHARED_LIBRARIES
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/lib
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := libsecril-client
+LOCAL_MODULE_OWNER := samsung
+LOCAL_SRC_FILES := libsecril-client.so
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_SUFFIX := .so
+LOCAL_MODULE_CLASS := SHARED_LIBRARIES
+LOCAL_MODULE_PATH := $(TARGET_OUT)/lib
+include $(BUILD_PREBUILT)
+
+endif
diff --git a/self-extractors/ti/staging/BoardConfigMaguro.mk b/self-extractors/ti/staging/BoardConfigPartial.mk
similarity index 100%
rename from self-extractors/ti/staging/BoardConfigMaguro.mk
rename to self-extractors/ti/staging/BoardConfigPartial.mk
diff --git a/self-extractors/ti/staging/device-maguro.mk b/self-extractors/ti/staging/device-partial.mk
similarity index 81%
rename from self-extractors/ti/staging/device-maguro.mk
rename to self-extractors/ti/staging/device-partial.mk
index 6dc6a36..427009b 100644
--- a/self-extractors/ti/staging/device-maguro.mk
+++ b/self-extractors/ti/staging/device-partial.mk
@@ -12,9 +12,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-LOCAL_PATH := vendor/ti/maguro
-
 # TI blob(s) necessary for Maguro hardware
-PRODUCT_COPY_FILES := \
-    $(LOCAL_PATH)/proprietary/ducati-m3.bin:system/vendor/firmware/ducati-m3.bin \
-
+PRODUCT_PACKAGES := \
+    ducati-m3
diff --git a/self-extractors/ti/staging/proprietary/Android.mk b/self-extractors/ti/staging/proprietary/Android.mk
new file mode 100644
index 0000000..baf9aaa
--- /dev/null
+++ b/self-extractors/ti/staging/proprietary/Android.mk
@@ -0,0 +1,29 @@
+# Copyright (C) 2011 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.
+
+LOCAL_PATH := $(call my-dir)
+
+ifeq ($(TARGET_DEVICE),maguro)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := ducati-m3
+LOCAL_MODULE_OWNER := ti
+LOCAL_SRC_FILES := ducati-m3.bin
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_SUFFIX := .bin
+LOCAL_MODULE_CLASS := ETC
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/firmware
+include $(BUILD_PREBUILT)
+
+endif