Initial commit of NabiSE
authorhuckleberrypie <peanuthead_069@yahoo.com>
Sun, 25 Mar 2018 03:41:37 +0000 (11:41 +0800)
committerhuckleberrypie <peanuthead_069@yahoo.com>
Sun, 25 Mar 2018 03:41:37 +0000 (11:41 +0800)
AndroidProducts.mk [new file with mode: 0644]
BoardConfig.mk [new file with mode: 0644]
boot.mk [new file with mode: 0644]
kernel [new file with mode: 0644]
omni_NabiSE.mk [new file with mode: 0644]
recovery.fstab [new file with mode: 0644]

diff --git a/AndroidProducts.mk b/AndroidProducts.mk
new file mode 100644 (file)
index 0000000..9be5ece
--- /dev/null
@@ -0,0 +1,2 @@
+PRODUCT_MAKEFILES := \
+    $(LOCAL_DIR)/omni_NabiSE.mk
diff --git a/BoardConfig.mk b/BoardConfig.mk
new file mode 100644 (file)
index 0000000..1b0f598
--- /dev/null
@@ -0,0 +1,22 @@
+TARGET_ARCH := arm
+TARGET_CPU_ABI := armeabi
+TARGET_ARCH_VARIANT := armv7-a-neon
+TARGET_CPU_VARIANT := cortex-a9
+
+BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x105c0000
+BOARD_FLASH_BLOCK_SIZE := 131072
+
+TARGET_PREBUILT_KERNEL := device/Mattel/NabiSE/kernel
+
+BOARD_MKBOOTIMG_ARGS := --base 80000000 --pagesize 2048 --kernel_offset 00008000 --ramdisk_offset 04000000 --tags_offset 06900000    --board 3.0.10 
+
+#MTK common twrp flags
+TW_NO_EXFAT := true
+TWHAVE_SELINUX := true
+#TW_USE_TOOLBOX := true
+TW_NO_EXFAT_FUSE := true
+TW_THEME := portrait_mdpi
+#RECOVERY_SDCARD_ON_DATA := true
+TW_USE_MODEL_HARDWARE_ID_FOR_DEVICE_ID := true
+TARGET_USE_CUSTOM_LUN_FILE_PATH := "/sys/devices/platform/mt_usb/gadget/lun%d/file"
+BOARD_CUSTOM_BOOTIMG_MK := device/Mattel/NabiSE/boot.mk
diff --git a/boot.mk b/boot.mk
new file mode 100644 (file)
index 0000000..2c4d7c5
--- /dev/null
+++ b/boot.mk
@@ -0,0 +1,32 @@
+# Source code Thanks to RD chrmhoffmann@XDA
+# https://github.com/chrmhoffmann/android_device_wiko_stairway/blob/cm-11.0/boot.mk
+
+define make_header
+  perl -e 'print pack("a4 L a32 a472", "\x88\x16\x88\x58", $$ARGV[0], $$ARGV[1], "\xFF"x472)' $(1) $(2) > $(3)
+endef
+
+# Dummy mkbootimg required or build error about boot.img on latter CM repo
+$(INSTALLED_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_FILES)
+       $(call pretty,"Target boot image: $@")
+       $(hide) $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_ARGS) --output $@
+       $(hide) $(call assert-max-image-size,$@,$(BOARD_BOOTIMAGE_PARTITION_SIZE),raw)
+       
+$(recovery_ramdisk).mtk.header: $(recovery_ramdisk)
+       size=$$($(call get-file-size,$(recovery_ramdisk))); \
+               $(call make_header, $$((size)), "RECOVERY", $@)
+$(recovery_ramdisk).mtk:  $(MKBOOTIMG) $(recovery_ramdisk).mtk.header
+       $(call pretty,"Adding MTK header to recovery ramdisk.")
+       cat $(recovery_ramdisk).mtk.header $(recovery_ramdisk) > $@
+
+INTERNAL_MTK_RECOVERYIMAGE_ARGS := \
+               --kernel $(PRODUCT_OUT)/kernel \
+               --ramdisk $(recovery_ramdisk).mtk
+
+$(INSTALLED_RECOVERYIMAGE_TARGET): $(MKBOOTIMG) \
+               $(recovery_ramdisk).mtk $(PRODUCT_OUT)/kernel
+       @echo -e ${CL_CYN}"----- Making recovery image ------"${CL_RST}
+       $(MKBOOTIMG) $(INTERNAL_MTK_RECOVERYIMAGE_ARGS) \
+               $(BOARD_MKBOOTIMG_ARGS) --output $@
+       $(hide) $(call assert-max-image-size,$@, \
+               $(BOARD_RECOVERYIMAGE_PARTITION_SIZE),raw)
+       @echo -e ${CL_CYN}"Made recovery image: $@"${CL_RST}
diff --git a/kernel b/kernel
new file mode 100644 (file)
index 0000000..df7d313
Binary files /dev/null and b/kernel differ
diff --git a/omni_NabiSE.mk b/omni_NabiSE.mk
new file mode 100644 (file)
index 0000000..b4cd95a
--- /dev/null
@@ -0,0 +1,12 @@
+$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)
+
+# Time Zone data Credits to desalesouche => http://forum.xda-developers.com/showpost.php?p=64850444&postcount=1204
+#PRODUCT_COPY_FILES += \
+#bionic/libc/zoneinfo/tzdata:recovery/root/system/usr/share/zoneinfo/tzdata
+
+PRODUCT_BUILD_PROP_OVERRIDES += \
+    PRODUCT_MODEL="" \
+    TARGET_DEVICE=""
+
+PRODUCT_NAME := omni_NabiSE
+PRODUCT_DEVICE := NabiSE
diff --git a/recovery.fstab b/recovery.fstab
new file mode 100644 (file)
index 0000000..c4da0f5
--- /dev/null
@@ -0,0 +1,30 @@
+# mount point  fstype    device        [device2]
+
+/boot      emmc  /dev/bootimg
+/recovery  emmc  /dev/recovery
+/system    ext4  /dev/block/mmcblk0p3
+/cache     ext4  /dev/block/mmcblk0p4
+/data      ext4  /dev/block/mmcblk0p5
+/emmc     vfat  /dev/block/mmcblk0p6  flags=display="Phone Storage";settingsstorage
+/sdcard    vfat  /dev/block/mmcblk1p1  flags=display="SD Card";storage;removable
+/sd-ext    auto  /dev/block/mmcblk1p2
+/nvram     emmc  /dev/nvram            flags=display="Nvram";backup=1
+/uboot     emmc  /dev/uboot            flags=display="Uboot";backup=1
+
+#/boot                 emmc    /dev/block/platform/mtk-msdc.0/by-name/boot             flags=display="Boot";backup=1
+#/recovery             emmc    /dev/block/platform/mtk-msdc.0/by-name/recovery flags=display="Recovery";backup=1
+#/system               ext4    /dev/block/platform/mtk-msdc.0/by-name/system   flags=display="System";backup=1
+#/cache                        ext4    /dev/block/platform/mtk-msdc.0/by-name/cache    flags=display="Cache"
+#/data                 ext4    /dev/block/platform/mtk-msdc.0/by-name/userdata flags=encryptable=/dev/block/platform/mtk-msdc.0/by-name/metadata
+#/nvram                        emmc    /dev/block/platform/mtk-msdc.0/by-name/nvram    flags=display="Nvram";backup=1;flashimg=1
+#/external_sd  auto    /dev/block/mmcblk1p1                                                    flags=display="External SDcard";storage;wipeingui;removable;backup=0
+#/usbotg               auto    /dev/block/sda1                                                                 flags=display="Usb-Otg";storage;removable;backup=0
+
+#/boot       mtd         boot
+#/recovery   mtd         recovery
+#/cache      yaffs2      cache
+#/data       yaffs2      userdata
+#/misc       mtd         misc
+#/system     yaffs2      system
+#/sdcard     vfat        /dev/block/mmcblk0p1
+#/sd-ext     ext4        /dev/block/mmcblk0p2