beyond2lte: clean up this mess

Change-Id: Id47eedfaeed354b48c519156b83ca78a0708d9be
diff --git a/BoardConfig.mk b/BoardConfig.mk
index a6b08e6..d930ee7 100644
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -13,23 +13,24 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-include device/samsung/exynos9820-common/BoardConfigPlatform.mk
+## Inherit from the common tree
+include device/samsung/exynos9820-common/BoardConfigCommon.mk
+
+## Inherit from the proprietary configuration
 include vendor/samsung/beyond2lte/BoardConfigVendor.mk
 
 DEVICE_PATH := device/samsung/beyond2lte
 
-PRODUCT_PLATFORM := exynos9820
-
-# APEX image
+## APEX image
 DEXPREOPT_GENERATE_APEX_IMAGE := true
 
-TARGET_SPECIFIC_HEADER_PATH += $(DEVICE_PATH)/hardware/include
+TARGET_SPECIFIC_HEADER_PATH += $(DEVICE_PATH)/include
 
-### DISPLAY
+## Display
 TARGET_SCREEN_DENSITY := 420
 
-### KERNEL
+## Kernel
 TARGET_KERNEL_CONFIG := exynos9820-beyond2lte_defconfig
 
-### VENDOR PROPS
+## Properties
 TARGET_VENDOR_PROP += $(DEVICE_PATH)/vendor.prop
diff --git a/device.mk b/device.mk
index d96bfa1..663dae6 100644
--- a/device.mk
+++ b/device.mk
@@ -14,18 +14,14 @@
 # limitations under the License.
 #
 
-### PLATFORM
-$(call inherit-product, device/samsung/exynos9820-common/platform.mk)
-### PROPRIETARY VENDOR FILES
+# Inherit from the common tree
+$(call inherit-product, device/samsung/exynos9820-common/common.mk)
+
+# Inherit proprietary files
 $(call inherit-product, vendor/samsung/beyond2lte/beyond2lte-vendor.mk)
 
-### DALVIK
+# Setup dalvik vm configs
 $(call inherit-product, frameworks/native/build/phone-xhdpi-6144-dalvik-heap.mk)
 
-DEVICE_PATH := device/samsung/beyond2lte
-
-DEVICE_PACKAGE_OVERLAYS += \
-	$(DEVICE_PATH)/overlay \
-	$(DEVICE_PATH)/overlay-lineage
-
-#include $(DEVICE_PATH)/device/*.mk
+# Overlays
+DEVICE_PACKAGE_OVERLAYS += $(LOCAL_PATH)/overlay
diff --git a/hardware/include/samsung_fingerprint_inscreen.h b/include/samsung_fingerprint_inscreen.h
similarity index 100%
rename from hardware/include/samsung_fingerprint_inscreen.h
rename to include/samsung_fingerprint_inscreen.h
diff --git a/lineage_beyond2lte.mk b/lineage_beyond2lte.mk
index 1a00183..541eab3 100644
--- a/lineage_beyond2lte.mk
+++ b/lineage_beyond2lte.mk
@@ -14,31 +14,30 @@
 # limitations under the License.
 #
 
+## Inherit from generic products, most specific first
 $(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
 $(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)
-$(call inherit-product, $(SRC_TARGET_DIR)/product/languages_full.mk)
-# Product API level
+
+## Product API level
 $(call inherit-product, $(SRC_TARGET_DIR)/product/product_launched_with_p.mk)
 
-# Inscreen Fingerprint HAL
+## Inscreen Fingerprint HAL
 TARGET_HAVE_FOD := true
 
-# Inherit device configuration
+## Inherit from beyond2lte device
 $(call inherit-product, device/samsung/beyond2lte/device.mk)
 
-### BOOTANIMATION
-# vendor/lineage/config/common_full_phone.mk
+## Boot Animation
 TARGET_SCREEN_HEIGHT := 3040
 TARGET_SCREEN_WIDTH := 1440
-# vendor/lineage/config/common.mk
 
-### LINEAGE
+## Inherit some common Lineage stuff
 $(call inherit-product, vendor/lineage/config/common_full_phone.mk)
 
-# Enable updating of APEXes
+## Enable updating of APEXes
 $(call inherit-product, $(SRC_TARGET_DIR)/product/updatable_apex.mk)
 
-## Device identifier. This must come after all inclusions
+## Device identifier, this must come after all inclusions
 PRODUCT_NAME := lineage_beyond2lte
 PRODUCT_DEVICE := beyond2lte
 PRODUCT_BRAND := samsung
@@ -47,11 +46,8 @@
 PRODUCT_PDA_MODEL := G975F
 PRODUCT_PDA_MODEL_VERSION := XXSBFUE6
 PRODUCT_PDA_VERSION := $(PRODUCT_PDA_MODEL)$(PRODUCT_PDA_MODEL_VERSION)
+
 PRODUCT_GMS_CLIENTID_BASE := android-samsung
 
 PRODUCT_PRODUCT_PROPERTIES += \
     ro.build.PDA=$(PRODUCT_PDA_VERSION)
-
-ifneq ($(LINEAGE_DEV_CERTIFICATE),)
-    PRODUCT_DEFAULT_DEV_CERTIFICATE := $(LINEAGE_DEV_CERTIFICATE)
-endif
diff --git a/proprietary-files.txt b/proprietary-files.txt
index 84a4845..bb178f3 100644
--- a/proprietary-files.txt
+++ b/proprietary-files.txt
@@ -1,11 +1,11 @@
 # Proprietary files - from Samsung package version G975FXXSBFUE6, unless pinned
 
-### AUDIO
+## Audio
 vendor/etc/floating_feature.xml
 vendor/etc/mixer_gains.xml
 vendor/lib/librecordalive.so
 
-### AUDIO_FIRMWARE
+## Audio Firmware
 vendor/firmware/APBargeIn_AUDIO_SLSI.bin
 vendor/firmware/APBiBF_AUDIO_SLSI.bin
 vendor/firmware/APDV_AUDIO_SLSI.bin
@@ -13,47 +13,28 @@
 vendor/firmware/AP_AUDIO_SLSI.bin
 vendor/firmware/SoundBoosterParam.bin
 
-### BIOMETRICS_FINGERPRINT
-vendor/lib/libbauthserver.so
-vendor/lib/libbauthtzcommon.so
-vendor/lib64/libbauthserver.so
-vendor/lib64/libbauthtzcommon.so
-
-### BLUETOOTH_FIRMWARE
+## Bluetooth Firmware
 vendor/firmware/bcm4375B0_murata.hcd
 vendor/firmware/bcm4375B0_semco.hcd
 vendor/firmware/bcm4375B1_murata.hcd
 vendor/firmware/bcm4375B1_semco.hcd
 vendor/firmware/bcm4375B1_semco_sem.hcd
 
-### CAMERA
+## Camera
 vendor/lib/hw/camera.exynos9820.so
 vendor/lib64/hw/camera.exynos9820.so
 
-### CAMERA_DEPENDENCIES
+## Camera dependencies
 vendor/lib/libexynoscamera3.so
 vendor/lib64/libexynoscamera3.so
 
-### GPS/GNSS
-vendor/lib64/libwrappergps.so
+## Fingerprint
+vendor/lib/libbauthserver.so
+vendor/lib/libbauthtzcommon.so
+vendor/lib64/libbauthserver.so
+vendor/lib64/libbauthtzcommon.so
 
-### OMX_FIRMWARE
-vendor/firmware/fimc_is_lib.bin
-vendor/firmware/fimc_is_rta.bin
-
-### RIL
-vendor/bin/secril_config_svc
-vendor/etc/init/init.baseband.rc
-vendor/lib/libsec-ril.so
-vendor/lib/libsec-ril-dsds.so
-vendor/lib64/libsec-ril.so
-vendor/lib64/libsec-ril-dsds.so
-
-### SAMSUNG_SLSI_HWC
-vendor/lib/libexynosdisplay.so
-vendor/lib64/libexynosdisplay.so
-
-### SAMSUNG_SLSI_FIRMWARE
+## Firmware
 vendor/firmware/cs35l40-bot-dsp1-spk-prot-calib.bin
 vendor/firmware/cs35l40-bot-dsp1-spk-prot.bin
 vendor/firmware/cs35l40-rcv-dsp1-spk-prot-calib.bin
@@ -63,13 +44,32 @@
 vendor/firmware/setfile_3m3.bin
 vendor/firmware/setfile_3p9.bin
 
-### SENSORS
+## GPS
+vendor/lib64/libwrappergps.so
+
+## HWC
+vendor/lib/libexynosdisplay.so
+vendor/lib64/libexynosdisplay.so
+
+## OMX Firmware
+vendor/firmware/fimc_is_lib.bin
+vendor/firmware/fimc_is_rta.bin
+
+## RIL
+vendor/bin/secril_config_svc
+vendor/etc/init/init.baseband.rc
+vendor/lib/libsec-ril.so
+vendor/lib/libsec-ril-dsds.so
+vendor/lib64/libsec-ril.so
+vendor/lib64/libsec-ril-dsds.so
+
+## Sensors
 vendor/lib/sensors.bio.so
 vendor/lib/sensors.sensorhub.so
 vendor/lib64/sensors.bio.so
 vendor/lib64/sensors.sensorhub.so
 
-### TEEGRIS_FIRMWARE
+## TEEGRIS Firmware
 vendor/tee/00000000-0000-0000-0000-00000000dead
 vendor/tee/00000000-0000-0000-0000-000000534b4d
 vendor/tee/00000000-0000-0000-0000-0053545354ab
@@ -79,7 +79,7 @@
 vendor/tee/00000000-0000-0000-0000-657365447276
 vendor/tee/driver/00000000-0000-0000-0000-53626f786476
 
-### WIFI
+## Wi-Fi
 vendor/firmware/bcmdhd_clm.blob
 vendor/firmware/nvram.txt_1rh_es43_b1
 vendor/firmware/nvram.txt_CS01_semco_b1
diff --git a/vendor.prop b/vendor.prop
index e57e98a..9db9fcf 100644
--- a/vendor.prop
+++ b/vendor.prop
@@ -1,2 +1,2 @@
-### RIL
+## RIL
 ro.telephony.default_network=9,9