Preparations for system as root

This mostly involves moving the DTB files plus some cleanups in
the Android.mk

Partial cherry-pick of Ibd011c6f2a7cdfdc36e695e717b337b563784876

Bug: 110097226
Change-Id: I6e6bc89fc20e430bdfbe376a0272d225577bf79c
Test: Local build and boot
diff --git a/shared/config/Android.mk b/shared/config/Android.mk
index 57e5c0e..4628b90 100644
--- a/shared/config/Android.mk
+++ b/shared/config/Android.mk
@@ -14,6 +14,8 @@
 # limitations under the License.
 #
 
+LOCAL_PATH := $(call my-dir)
+
 include $(CLEAR_VARS)
 
 # This section generates wpa_supplicant.conf using the target product name and
@@ -28,9 +30,18 @@
 
 include $(BUILD_SYSTEM)/base_rules.mk
 
-$(LOCAL_BUILT_MODULE): device/google/cuttlefish/shared/config/gen_wpa_supplicant_conf.sh
+$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/gen_wpa_supplicant_conf.sh
 	$(hide) echo "Generating $@"
 	$(hide) mkdir -p $(dir $@)
-	$(hide) device/google/cuttlefish/shared/config/gen_wpa_supplicant_conf.sh \
-	    "${TARGET_PRODUCT}" "${PRODUCT_MODEL}" "${PLATFORM_SDK_VERSION}" \
-	    > $@
+	$(hide) $< "${TARGET_PRODUCT}" "${PRODUCT_MODEL}" \
+	    "${PLATFORM_SDK_VERSION}" > $@
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := cuttlefish_dtb
+LOCAL_MODULE_CLASS := ETC
+LOCAL_MODULE_PATH := $(HOST_OUT)/config
+LOCAL_MODULE_STEM := cuttlefish.dtb
+LOCAL_SRC_FILES := cuttlefish.dtb
+
+include $(BUILD_PREBUILT)
diff --git a/shared/config/cuttlefish.dtb b/shared/config/cuttlefish.dtb
new file mode 100644
index 0000000..1c75cd6
--- /dev/null
+++ b/shared/config/cuttlefish.dtb
Binary files differ
diff --git a/shared/config/cuttlefish.dts b/shared/config/cuttlefish.dts
new file mode 100644
index 0000000..70a34fc
--- /dev/null
+++ b/shared/config/cuttlefish.dts
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2018 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.
+ */
+
+/dts-v1/;
+
+/ {
+	firmware {
+		android {
+			compatible = "android,firmware";
+			fstab {
+				compatible = "android,fstab";
+				system {
+					compatible = "android,system";
+					dev = "/dev/block/vda";
+					type = "ext4";
+					mnt_flags = "noatime,ro,errors=panic";
+					fsmgr_flags = "wait";
+				};
+
+				vendor {
+					compatible = "android,vendor";
+					dev = "/dev/block/vdd";
+					type = "ext4";
+					mnt_flags = "noatime,ro,errors=panic";
+					fsmgr_flags = "wait";
+				};
+			};
+		};
+	};
+};
diff --git a/shared/config/init.vsoc.rc b/shared/config/init.vsoc.rc
index 038e373..64f8a45 100644
--- a/shared/config/init.vsoc.rc
+++ b/shared/config/init.vsoc.rc
@@ -31,7 +31,6 @@
 
 on fs
     mount_all /vendor/etc/fstab.${ro.hardware}
-    wait /vendor/etc/selinux/nonplat_mac_permissions.xml
     restorecon_recursive /vendor
 
     # works around framework netiface enumeration issue