board-specific: Move all board-specific configs

This is the other half of the board-specific config move where we import
the configs into this tree instead of build/.

Change-Id: I71a686fd20b98cf0f5eb9ddd18982b538df9bc90
diff --git a/boot.txt b/boot.txt
new file mode 100644
index 0000000..9a8ed81
--- /dev/null
+++ b/boot.txt
@@ -0,0 +1,24 @@
+fdt_addr=0x43000000
+fdt_file=fsl-imx8mq-phanbell.dtb
+image=Image
+script=boot.scr
+mmc_root="PARTUUID=70672ec3-5eee-49ff-b3b1-eb1fbd406bf5"
+sd_root="/dev/mmcblk1p2"
+
+# Power down the DarwiNN
+i2c dev 0
+i2c mw 0x1f 0x24 0x25 1
+
+# Check boot device to decide which root partition to use
+if test ${bootdev} = 1; then
+    setenv root ${sd_root}
+else
+    setenv root ${mmc_root}
+fi
+
+cmdline="console=ttymxc0,115200 earlycon=ec_imx6q,0x30860000,115200 root=${root} rootfstype=ext4 rw rootwait init=/sbin/init net.ifnames=0"
+
+ext2load mmc ${bootdev}:1 ${loadaddr} ${image}
+ext2load mmc ${bootdev}:1 ${fdt_addr} ${fdt_file}
+setenv bootargs ${cmdline}
+booti ${loadaddr} - ${fdt_addr}
diff --git a/defconfig b/defconfig
new file mode 100644
index 0000000..d5fe12f
--- /dev/null
+++ b/defconfig
@@ -0,0 +1,77 @@
+CONFIG_IKCONFIG=y
+CONFIG_TYPEC_TCPM=n
+CONFIG_TYPEC_TCPCI=n
+CONFIG_ANDROID_PARANOID_NETWORK=n
+CONFIG_BRCMFMAC=n
+CONFIG_BRCMFMAC_SDIO=n
+CONFIG_BRCMUTIL=n
+CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE=n
+CONFIG_KERNEL_GZIP=y
+CONFIG_KERNEL_LZO=n
+CONFIG_REGULATOR_BD71837=y
+CONFIG_MFD_BD71837=y
+CONFIG_LOG_BUF_SHIFT=17
+CONFIG_WLAN=y
+CONFIG_ATH10K=n
+
+# QCACLD-2.0
+CONFIG_CFG80211_INTERNAL_REGDB=y
+CONFIG_CFG80211_WEXT=y
+CONFIG_WIRELESS=y
+CONFIG_WIRELESS_EXT=y
+CONFIG_WEXT_CORE=y
+CONFIG_WEXT_PROC=y
+CONFIG_WEXT_PRIV=y
+CONFIG_WEXT_SPY=y
+CONFIG_QCA_CLD_WLAN=y
+# CONFIG_CLD_HL_SDIO_CORE is not set
+CONFIG_QCACLD_WLAN_LFR3=y
+CONFIG_PRIMA_WLAN_OKC=y
+CONFIG_PRIMA_WLAN_11AC_HIGH_TP=y
+CONFIG_WLAN_FEATURE_11W=y
+CONFIG_WLAN_FEATURE_LPSS=y
+CONFIG_QCOM_VOWIFI_11R=y
+CONFIG_WLAN_FEATURE_NAN=y
+CONFIG_WLAN_FEATURE_NAN_DATAPATH=y
+CONFIG_QCOM_TDLS=y
+CONFIG_QCOM_LTE_COEX=y
+CONFIG_WLAN_OFFLOAD_PACKETS=y
+CONFIG_WLAN_FEATURE_MEMDUMP=y
+CONFIG_WLAN_SYNC_TSF=y
+# CONFIG_QCA_WIFI_AUTOMOTIVE_CONC is not set
+# CONFIG_WLAN_UDP_RESPONSE_OFFLOAD is not set
+# CONFIG_WLAN_WOW_PULSE is not set
+# CONFIG_DPTRACE_ENABLE is not set
+
+CONFIG_I2C=y
+CONFIG_I2C_CHARDEV=y
+CONFIG_SND_SOC_FSL_ASOC_CARD=y
+CONFIG_SND_SOC_RT5645=y
+CONFIG_SND_SOC_RT5631=y
+CONFIG_SND_SOC_RL6231=y
+CONFIG_MFD_BD71837=y
+CONFIG_REGULATOR_BD71837=y
+CONFIG_MXC_CAMERA_OV5645_MIPI_V2=y
+CONFIG_SPI_IMX=y
+# CONFIG_REGULATOR_ISL91301 is not set
+CONFIG_PCIEASPM_POWER_SUPERSAVE=y
+CONFIG_LOCALVERSION_AUTO=n
+CONFIG_IMX8MQ_PHANBELL_POWERSAVE=y
+CONFIG_DRM_PANEL_TIANMA_S6D6FP0A2=y
+CONFIG_STAGING_GASKET_FRAMEWORK=y
+CONFIG_STAGING_APEX_DRIVER=y
+CONFIG_REGULATOR_APEX_PMIC=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGETFS=y
+CONFIG_USB_FUNCTIONFS=y
+CONFIG_USB_FUNCTIONFS_GENERIC=y
+CONFIG_USB_LIBCOMPOSITE=y
+CONFIG_CONFIGFS_FS=y
+CONFIG_CONFIGFS_F_FS=y
+CONFIG_CONFIGFS_F_MTP=y
+CONFIG_CONFIGFS_F_PTP=y
+CONFIG_CONFIGFS_F_UEVENT=y
+CONFIG_USB_F_FS=y
+CONFIG_USB_F_ACM=y
+CONFIG_USB_GADGETFS=y
+CONFIG_GOOGLE_APEX_POWER=y
diff --git a/flash.sh b/flash.sh
new file mode 100755
index 0000000..c964522
--- /dev/null
+++ b/flash.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+set -e
+
+ROOTDIR=$(dirname $0)/..
+SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+# If there's a boot.img in the same folder as flash.sh,
+# find artifacts in the directory containing the script.
+if [ -e ${SCRIPT_DIR}/boot.img ]; then
+    PRODUCT_OUT=${SCRIPT_DIR}
+else
+    PRODUCT_OUT=${PRODUCT_OUT:=${ROOTDIR}/out/target/product/imx8m_phanbell}
+fi
+
+
+fastboot flash bootloader0 ${PRODUCT_OUT}/u-boot.imx
+fastboot flash gpt ${PRODUCT_OUT}/partition-table.img
+fastboot reboot-bootloader
+fastboot erase misc
+fastboot flash boot ${PRODUCT_OUT}/boot.img
+fastboot flash rootfs ${PRODUCT_OUT}/rootfs.img
+fastboot reboot
diff --git a/fstab.emmc b/fstab.emmc
new file mode 100644
index 0000000..36592df
--- /dev/null
+++ b/fstab.emmc
@@ -0,0 +1,3 @@
+/dev/mmcblk0p3 / ext4 noatime,defaults 0 1
+/dev/mmcblk0p1 /boot ext2 noatime,defaults 0 2
+tmpfs /var/log tmpfs defaults 0 0
diff --git a/fstab.sdcard b/fstab.sdcard
new file mode 100644
index 0000000..99b420f
--- /dev/null
+++ b/fstab.sdcard
@@ -0,0 +1,3 @@
+/dev/mmcblk1p2 / ext4 noatime,defaults 0 1
+/dev/mmcblk1p1 /boot ext2 noatime,defaults 0 2
+tmpfs /var/log tmpfs defaults 0 0
diff --git a/partition-table.json b/partition-table.json
new file mode 100644
index 0000000..a39a449
--- /dev/null
+++ b/partition-table.json
@@ -0,0 +1,31 @@
+{
+  "settings": {
+    "disk_size": "7 GiB",
+    "disk_alignment": "8 MiB",
+    "disk_guid": "85b83f23-51c4-4403-8bac-906ff5800f4e"
+  },
+  "partitions": [
+    {
+      "label": "boot",
+      "size": "128 MiB",
+      "guid": "595059e1-7b18-4e71-98f8-86b0ef75fe34",
+      "type_guid": "brillo_boot",
+      "position": 1
+    },
+    {
+      "label": "misc",
+      "size": "1 MiB",
+      "guid": "auto",
+      "type_guid": "brillo_misc",
+      "position": 2
+    },
+    {
+      "label": "rootfs",
+      "size": "2 GiB",
+      "grow": true,
+      "guid": "70672ec3-5eee-49ff-b3b1-eb1fbd406bf5",
+      "type_guid": "brillo_system",
+      "position": 3
+    }
+  ]
+}