Skip to content

Commit

Permalink
tank: Cleanup and organize.
Browse files Browse the repository at this point in the history
Signed-off-by: R0rt1z2 <[email protected]>
  • Loading branch information
R0rt1z2 committed Apr 12, 2020
1 parent ba771db commit b7b52f5
Show file tree
Hide file tree
Showing 40 changed files with 61 additions and 185 deletions.
59 changes: 8 additions & 51 deletions BoardConfig.mk
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

# headers
# Headers
TARGET_SPECIFIC_HEADER_PATH := device/amazon/tank/include

# inherit from the proprietary version
# Inherit from the proprietary version
-include vendor/amazon/tank/BoardConfig.mk

# Dalvik
DALVIK_VM_LIB := true

# Platform
Expand All @@ -14,9 +14,6 @@ TARGET_BOARD_PLATFORM_GPU := mali-450mp4
# Bootloader
TARGET_NO_BOOTLOADER := true

# Extra scripts
TARGET_RELEASETOOL_OTA_FROM_TARGET_SCRIPT := device/amazon/tank/releasetools/ota_from_target_files

# Architecture
TARGET_ARCH := arm
TARGET_CPU_VARIANT := cortex-a7
Expand All @@ -26,17 +23,10 @@ TARGET_CPU_ABI := armeabi-v7a
TARGET_CPU_ABI2 := armeabi
TARGET_CPU_SMP := true

# Kernel Config
#BOARD_MKBOOTIMG_ARGS := --ramdisk_offset 0x04000000 --tags_offset 0x00000100
#BOARD_KERNEL_CMDLINE := androidboot.selinux=permissive
#BOARD_KERNEL_BASE := 0x80000000
#BOARD_KERNEL_PAGESIZE := 4096
#BOARD_PAGE_SIZE := 0x800


# Kernel
BOARD_CUSTOM_BOOTIMG_MK := device/amazon/tank/mkbootimg.mk
BOARD_MKBOOTIMG_ARGS := --ramdisk_offset 0x04000000 --tags_offset 0x00000100
BOARD_MKBOOTIMG_ARGS := --ramdisk_offset $(BOARD_RAMDISK_OFFSET) --tags_offset $(BOARD_KERNEL_TAGS_OFFSET)
BOARD_KERNEL_CMDLINE := bootopt=64S3,32N2,32N2 androidboot.selinux=permissive
TARGET_KERNEL_CONFIG := tank_defconfig
TARGET_KERNEL_SOURCE := kernel/amazon/mt8127
BOARD_KERNEL_BASE := 0x80000000
Expand All @@ -46,18 +36,10 @@ BOARD_RAMDISK_OFFSET := 0x04000000
BOARD_SECOND_OFFSET := 0x00f00000
TARGET_KERNEL_CROSS_COMPILE_PREFIX := arm-eabi-


BOARD_KERNEL_CMDLINE := androidboot.selinux=permissive
#BOARD_KERNEL_CMDLINE := androidboot.console=ttyMSM0 androidboot.hardware=qcom
#BOARD_KERNEL_CMDLINE += user_debug=31 msm_rtb.filter=0x37 ehci-hcd.park=3
#BOARD_KERNEL_CMDLINE += service_locator.enable=1
#BOARD_KERNEL_CMDLINE += swiotlb=2048

# MediaTek Flags
BOARD_HAS_MTK_HARDWARE := true
MTK_HARDWARE := true

#TARGET_PREBUILT_KERNEL := device/amazon/tank/boot.img

# Flags
TARGET_GLOBAL_CFLAGS += -mfpu=neon -mfloat-abi=softfp
TARGET_GLOBAL_CPPFLAGS += -DMTK_HARDWARE -mfpu=neon -mfloat-abi=softfp
Expand All @@ -73,8 +55,6 @@ BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
BOARD_HOSTAPD_DRIVER := NL80211
BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
WIFI_DRIVER_FW_PATH_PARAM := "/sys/module/bcmdhd/parameters/firmware_path"
#WIFI_DRIVER_FW_PATH_AP := "/vendor/firmware/fw_bcmdhd_apsta.bin"
#WIFI_DRIVER_FW_PATH_STA := "/vendor/firmware/fw_bcmdhd.bin"
WIFI_DRIVER_FW_PATH_STA := "/vendor/firmware/brcm/bcm43569a2-firmware.bin"
WIFI_DRIVER_MODULE_PATH := "/system/lib/modules/bcmdhd.ko"
WIFI_DRIVER_MODULE_NAME := "bcmdhd"
Expand All @@ -93,7 +73,6 @@ TARGET_USES_ION := true
TARGET_DISPLAY_USE_RETIRE_FENCE := true
MAX_EGL_CACHE_KEY_SIZE := 12*1024
MAX_EGL_CACHE_SIZE := 1024*1024

TARGET_RUNNING_WITHOUT_SYNC_FRAMEWORK := true
TARGET_HAS_WAITFORVSYNC := true

Expand All @@ -109,6 +88,7 @@ BOARD_USERDATAIMAGE_PARTITION_SIZE := 6583598592
BOARD_FLASH_BLOCK_SIZE := 131072
TARGET_USERIMAGES_USE_EXT4 := true

# OTA
BLOCK_BASED_OTA := false

# Vold
Expand All @@ -118,28 +98,5 @@ TARGET_USE_CUSTOM_LUN_FILE_PATH := /sys/devices/platform/mt_usb/musb-hdrc.0.auto
TARGET_OTA_ASSERT_DEVICE := tank
TARGET_BOOTLOADER_BOARD_NAME := tank

# Shims
TARGET_LD_SHIM_LIBS := \
/system/lib/libasp.so|libshim_asp.so \

# Other (MISC)
$(shell mkdir -p $(OUT)/obj/KERNEL_OBJ/usr)

# TWRP
#ifneq (,$(strip $(wildcard bootable/recovery-twrp/twrp.cpp)))
#RECOVERY_VARIANT := twrp
#endif
#DEVICE_RESOLUTION := 600x1024
#TW_EXCLUDE_MTP := false
#RECOVERY_SDCARD_ON_DATA := true
#TW_BRIGHTNESS_PATH := /sys/devices/platform/leds-mt65xx/leds/lcd-backlight/brightness
#TARGET_RECOVERY_LCD_BACKLIGHT_PATH := /sys/devices/platform/leds-mt65xx/leds/lcd-backlight/brightness
#RECOVERY_GRAPHICS_USE_LINELENGTH := true
#RECOVERY_FSTAB_VERSION := 2
#TW_THEME := landscape_mdpi
#TWRP_EVENT_LOGGING := true
#RECOVERY_TOUCHSCREEN_SWAP_XY := true
#RECOVERY_GRAPHICS_USE_LINELENGTH := true
#RECOVERY_TOUCHSCREEN_FLIP_Y := true
#RECOVERY_TOUCHSCREEN_FLIP_X := true
#BOARD_HAS_FLIPPED_SCREEN := true

1 change: 1 addition & 0 deletions apps/Android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include $(call all-subdir-makefiles)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions bluetooth/bdroid_buildcfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#ifndef _BDROID_BUILDCFG_H
#define _BDROID_BUILDCFG_H

#define BTM_DEF_LOCAL_NAME "FireTV Stick 2"

#define BTM_WBS_INCLUDED TRUE
#define BTIF_HF_WBS_PREFERRED TRUE
#define BLE_VND_INCLUDED TRUE
Expand Down
Binary file removed boot.img
Binary file not shown.
Binary file removed charger/battery_0.png
Binary file not shown.
Binary file removed charger/battery_1.png
Binary file not shown.
Binary file removed charger/battery_2.png
Binary file not shown.
Binary file removed charger/battery_3.png
Binary file not shown.
Binary file removed charger/battery_4.png
Binary file not shown.
Binary file removed charger/battery_5.png
Binary file not shown.
Binary file removed charger/battery_charge.png
Binary file not shown.
Binary file removed charger/battery_fail.png
Binary file not shown.
10 changes: 4 additions & 6 deletions cm.mk
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
# Inherit some common CM stuff.
$(call inherit-product, vendor/cm/config/common_full_tv.mk)

# Include CM LatinIME dictionaries
#PRODUCT_PACKAGE_OVERLAYS += vendor/cm/overlay/dictionaries

# Inherit device configuration for Fire TV Stick
# Inherit device configuration for Fire TV Stick 2
$(call inherit-product, device/amazon/tank/full_tank.mk)

# Screen Resolution
TARGET_SCREEN_WIDTH := 600
TARGET_SCREEN_HEIGHT := 1024

# Device identifier
PRODUCT_DEVICE := tank
PRODUCT_NAME := cm_tank
#PRODUCT_RELEASE_NAME := tank
PRODUCT_BRAND := google
PRODUCT_MODEL := tank
PRODUCT_MANUFACTURER := amzn


# Override the fingerprint
PRODUCT_BUILD_PROP_OVERRIDES += \
BUILD_FINGERPRINT=SHARP/an_np40/an_np40:5.1/LMY47M/20180306:user/release-keys \
PRIVATE_BUILD_DESC="an_np40-user 5.1 LMY47M 20180306 release-keys"
14 changes: 3 additions & 11 deletions full_tank.mk
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
### Android TV

# ATV
PRODUCT_IS_ATV_SDK := true

PRODUCT_CHARACTERISTICS := tv,nosdcard

# Include drawables for various densities.
Expand Down Expand Up @@ -125,16 +123,10 @@ $(call inherit-product-if-exists, frameworks/base/data/keyboards/keyboards.mk)
$(call inherit-product-if-exists, frameworks/webview/chromium/chromium.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_minimal.mk)


######## tank

# Ramdisk
PRODUCT_COPY_FILES += \
$(call find-copy-subdir-files,*,device/amazon/tank/rootdir,root)

#PRODUCT_COPY_FILES += \
# device/amazon/tank/boot.img:kernel

# Inherit from the common Open Source product configuration
$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk)

Expand Down Expand Up @@ -207,10 +199,10 @@ PRODUCT_PACKAGES += \
PRODUCT_PACKAGES += \
libshim_asp

# call dalvik heap config
# Call dalvik heap config
$(call inherit-product, frameworks/native/build/tablet-7in-hdpi-1024-dalvik-heap.mk)

# call hwui memory config
# Call hwui memory config
$(call inherit-product-if-exists, frameworks/native/build/phone-xxhdpi-2048-hwui-memory.mk)

# Get non-open-source specific aspects
Expand Down
3 changes: 3 additions & 0 deletions include/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# NOTE: Do Not edit configs files if you dont understand

- Adapted by Zormax
2 changes: 0 additions & 2 deletions include/readme

This file was deleted.

3 changes: 0 additions & 3 deletions proprietary-files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,6 @@ vendor/smartvolume/tank/wired_headphone.csv
vendor/smartvolume/tank/wired_headset.csv
xbin/trapz
xbin/wl

#vendor/app/Ds/Ds.apk:

usr/keylayout/Vendor_1949_Product_0401.kl
usr/keylayout/Vendor_1949_Product_0404.kl
usr/keylayout/Vendor_1949_Product_0407.kl
Expand Down
4 changes: 0 additions & 4 deletions releasetools/extra_script

This file was deleted.

40 changes: 0 additions & 40 deletions releasetools/ota_from_target_files

This file was deleted.

File renamed without changes.
Loading

0 comments on commit b7b52f5

Please sign in to comment.