Commit 0b5e0741 authored by sub77's avatar sub77
Browse files

Add MultiROM support

parent 881632e4
......@@ -21,7 +21,7 @@ TARGET_CUSTOM_KERNEL_HEADERS := device/motorola/falcon/include
BOARD_CUSTOM_BOOTIMG_MK := device/motorola/falcon/mkbootimg.mk
BOARD_KERNEL_CMDLINE := androidboot.bootdevice=msm_sdcc.1 androidboot.hardware=qcom vmalloc=400M androidboot.selinux=permissive
BOARD_KERNEL_PAGESIZE := 2048
BOARD_MKBOOTIMG_ARGS := --ramdisk_offset 0x01000000
BOARD_MKBOOTIMG_ARGS := --ramdisk_offset 0x01000000 --board mrom$(shell date -u +%Y%m%d)-01
# Init
TARGET_INCREASES_COLDBOOT_TIMEOUT := true
......@@ -31,22 +31,39 @@ TARGET_USERIMAGES_USE_EXT4 := true
TARGET_USERIMAGES_USE_F2FS := true
BOARD_HAS_NO_REAL_SDCARD := true
RECOVERY_SDCARD_ON_DATA := true
RECOVERY_GRAPHICS_USE_LINELENGTH := true
# Partitions
BOARD_BOOTIMAGE_PARTITION_SIZE := 10485760
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 10485760
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 11485760
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1023410176
BOARD_USERDATAIMAGE_PARTITION_SIZE := 5930598400 # 5930614784 - 16384
BOARD_FLASH_BLOCK_SIZE := 131072 # (BOARD_KERNEL_PAGESIZE * 64) macro
BOARD_SUPPRESS_SECURE_ERASE := true
# TWRP
TW_DEVICE_SPECIFIC_VERSION := 3.0.2-1
TW_DEFAULT_EXTERNAL_STORAGE := true
TW_EXCLUDE_DEFAULT_USB_INIT := true
TW_EXCLUDE_SUPERSU := true
TW_IGNORE_MAJOR_AXIS_0 := true
TW_INCLUDE_CRYPTO := true
TW_INCLUDE_NTFS_3G := true
# TW_INCLUDE_NTFS_3G := true
TW_NO_USB_STORAGE := true
TW_TARGET_USES_QCOM_BSP := true
TW_THEME := portrait_hdpi
# MultiROM config. MultiROM also uses parts of TWRP config
TARGET_RECOVERY_IS_MULTIROM := true
MR_ALLOW_NKK71_NOKEXEC_WORKAROUND := true
MR_DEVICE_SPECIFIC_VERSION := d
MR_INPUT_TYPE := type_b
MR_INIT_DEVICES := device/motorola/falcon/multirom/mr_init_devices.c
MR_DPI := hdpi
MR_DPI_FONT := 160
MR_FSTAB := device/motorola/falcon/recovery/root/etc/twrp.fstab
MR_KEXEC_MEM_MIN := 0x05000000
MR_KEXEC_DTB := true
MR_INFOS := device/motorola/falcon/multirom/infos
MR_PIXEL_FORMAT := "RGBX_8888"
MR_DEVICE_VARIANTS := xt1031 xt1032 xt1033 xt1034 falcon_umts falcon_umtsds falcon_cdma falcon_retuaws falcon falcon_gpe
# This file contains info about ROMs capabilites and boot process.
# It should be placed in ROM's folder.
# Make sure you got the syntax correct, as the parser is probably pretty
# dumb. Lines with comments must start with #. Beware the whitespaces.
# If you need to use " character in string, just use it, no need to escape it
# MultiROM searches for first and last " on the line.
# These comments should not be deleted.
# So far, the only supported ROM type for these files is kexec-based linux
type="kexec"
# Paths to root of the ROM.
# Both image and folder can be specified at one time, MultiROM will use
# the one which it can find. If both are present, folder is used.
# Must _not_ contain spaces.
# Path is from root of the root partition, but you will usually want
# to use following alias:
# - %m - ROM's folder (eg. /media/multirom/roms/*rom_name*)
root_dir="%m"
# Path to kernel and initrd. Kernel path _must_ be specified.
# Paths are relative to the folder in which is this file
# Those can be outside the root folder/image, or use %r if it is in there:
# kernel_path="%r/boot/vmlinuz"
# If ROM is in images, it will mount the image and load it from there.
# You can use * _at the end of the filename_ as wildcard character.
kernel_path="%r/zImage"
initrd_path="%r/initrd.img"
# Set up the cmdline
# img_cmdline and dir_cmdline are appended to base_cmdline.
# Several aliases are used:
# - %b - base command line from bootloader. You want this as first thing in cmdline.
# - %d - root device. is either "UUID=..." (USB drive) or "/dev/mmcblk0p9" or "/dev/mmcblk0p10"
# - %r - root fs type
# - %s - root directory, from root of the root device
# - %i - root image, from root of the root device
# - %f - fs of the root image
base_cmdline="%b selinux=0"
dir_cmdline="data_subdir=%s/data"
#include <stdlib.h>
// These are paths to folders in /sys which contain "uevent" file
// need to init this device.
// MultiROM needs to init framebuffer, mmc blocks, input devices,
// some ADB-related stuff and USB drives, if OTG is supported
// You can use * at the end to init this folder and all its subfolders
const char *mr_init_devices[] =
{
"/sys/class/graphics/fb0",
"/sys/block/mmcblk0",
"/sys/devices/msm_sdcc.1*",
"/sys/devices/msm_sdcc.1/mmc_host",
"/sys/devices/msm_sdcc.1/mmc_host/mmc0",
"/sys/devices/msm_sdcc.1/mmc_host/mmc0/mmc0:0001",
"/sys/devices/msm_sdcc.1/mmc_host/mmc0/mmc0:0001/block/mmcblk0",
"/sys/devices/msm_sdcc.1/mmc_host/mmc0/mmc0:0001/block/mmcblk0/mmcblk0p7",
"/sys/devices/msm_sdcc.1/mmc_host/mmc0/mmc0:0001/block/mmcblk0/mmcblk0p25",
"/sys/devices/msm_sdcc.1/mmc_host/mmc0/mmc0:0001/block/mmcblk0/mmcblk0p23",
"/sys/bus/mmc",
"/sys/bus/mmc/drivers/mmcblk",
"/sys/module/mmc_core",
"/sys/module/mmcblk",
"/sys/class/input/input2",
"/sys/class/input/input2/event2",
"/sys/class/input/input4",
"/sys/class/input/input4/event4",
"/sys/class/input/input3",
"/sys/class/input/input3/event3",
"/sys/class/misc/uinput",
"/sys/class/input/input0",
"/sys/class/input/input0/event0",
"/sys/class/input/input1",
"/sys/class/input/input1/event1",
// for adb
"/sys/class/tty/ptmx",
"/sys/devices/msm_sdcc.1/mmc_host/mmc0/mmc0:0001/block/mmcblk0/mmcblk0p23",
"/sys/devices/msm_sdcc.1/mmc_host/mmc0/mmc0:0001/block/mmcblk0/mmcblk0p24",
"/sys/class/misc/android_adb",
"/sys/class/android_usb/android0/f_adb",
"/sys/bus/usb",
//Mount persist and firmware
"/sys/devices/msm_sdcc.1/mmc_host/mmc0/mmc0:0001/block/mmcblk0/mmcblk0p26",
"/sys/devices/msm_sdcc.1/mmc_host/mmc0/mmc0:0001/block/mmcblk0/mmcblk0p1",
// USB Drive is in here
"/sys/devices/platform/msm_hsusb_host*",
// exfat requires fuse device
"/sys/devices/virtual/misc/fuse",
NULL
};
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment