Commit 6639eb7c authored by sub77's avatar sub77
Browse files

multirom support

parent 910c85ed
PRODUCT_MAKEFILES := $(LOCAL_DIR)/omni_matisse.mk
PRODUCT_MAKEFILES := $(LOCAL_DIR)/omni_matisse.mk $(LOCAL_DIR)/mrom_matisse.mk
# Release name
PRODUCT_RELEASE_NAME := matisse
$(call inherit-product, build/target/product/embedded.mk)
# Inherit from our custom product configuration
$(call inherit-product, vendor/omni/config/common.mk)
# MultiROM config
MR_DEVICE_SPECIFIC_VERSION := b
RECOVERY_VARIANT := multirom
TARGET_RECOVERY_IS_MULTIROM := true
DEVICE_RESOLUTION := 800x1280
BOARD_MKBOOTIMG_ARGS += --board mrom$(shell date -u +%Y%m%d)-01
MR_DEVICE_VARIANTS := matissewifi
MR_DEVICE_VARIANTS += matissewifiue
MR_DEVICE_VARIANTS += matisse3g
MR_INFOS := device/samsung/matisse/multirom/mrom_infos
MR_INIT_DEVICES := device/samsung/matisse/multirom/mr_init_devices.c
MR_FSTAB := device/samsung/matisse/recovery.fstab
MR_INPUT_TYPE := type_b
MR_DPI := hdpi
MR_DPI_MUL := 1
MR_DPI_FONT := 160
MR_KEXEC_MEM_MIN := 0x06200000
MR_KEXEC_DTB := true
MR_PIXEL_FORMAT := "RGBX_8888"
MR_USE_QCOM_OVERLAY := true
MR_QCOM_OVERLAY_HEADER := device/samsung/matisse/multirom/mr_qcom_overlay.h
MR_QCOM_OVERLAY_CUSTOM_PIXEL_FORMAT := MDP_RGBX_8888
MR_CONTINUOUS_FB_UPDATE := true
MR_DEVICE_HOOKS_VER := 3
## Device identifier. This must come after all inclusions
PRODUCT_DEVICE := matisse
PRODUCT_NAME := mrom_matisse
PRODUCT_BRAND := samsung
PRODUCT_MODEL := SM-T530
PRODUCT_MANUFACTURER := samsung
/****************************************************************************
****************************************************************************
***
*** This header was automatically generated from a Linux kernel header
*** of the same name, to make information necessary for userspace to
*** call into the kernel available to libc. It contains only constants,
*** structures, and macros generated from the original header, and thus,
*** contains no copyrightable information.
***
*** To edit the content of this header, modify the corresponding
*** source file (e.g. under external/kernel-headers/original/) then
*** run bionic/libc/kernel/tools/update_all.py
***
*** Any manual change here will be lost the next time this script will
*** be run. You've been warned!
***
****************************************************************************
****************************************************************************/
#ifndef _UAPI_ION_H
#define _UAPI_ION_H
#include <linux/ioctl.h>
#include <linux/types.h>
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
typedef int ion_user_handle_t;
enum ion_heap_type {
ION_HEAP_TYPE_SYSTEM,
ION_HEAP_TYPE_SYSTEM_CONTIG,
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
ION_HEAP_TYPE_CARVEOUT,
ION_HEAP_TYPE_CHUNK,
ION_HEAP_TYPE_DMA,
ION_HEAP_TYPE_CUSTOM,
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
ION_NUM_HEAPS = 16,
};
#define ION_HEAP_SYSTEM_MASK (1 << ION_HEAP_TYPE_SYSTEM)
#define ION_HEAP_SYSTEM_CONTIG_MASK (1 << ION_HEAP_TYPE_SYSTEM_CONTIG)
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define ION_HEAP_CARVEOUT_MASK (1 << ION_HEAP_TYPE_CARVEOUT)
#define ION_HEAP_TYPE_DMA_MASK (1 << ION_HEAP_TYPE_DMA)
#define ION_NUM_HEAP_IDS sizeof(unsigned int) * 8
#define ION_FLAG_CACHED 1
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define ION_FLAG_CACHED_NEEDS_SYNC 2
struct ion_allocation_data {
size_t len;
size_t align;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
unsigned int heap_id_mask;
unsigned int flags;
ion_user_handle_t handle;
};
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
struct ion_fd_data {
ion_user_handle_t handle;
int fd;
};
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
struct ion_handle_data {
ion_user_handle_t handle;
};
struct ion_custom_data {
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
unsigned int cmd;
unsigned long arg;
};
#define ION_IOC_MAGIC 'I'
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define ION_IOC_ALLOC _IOWR(ION_IOC_MAGIC, 0, struct ion_allocation_data)
#define ION_IOC_FREE _IOWR(ION_IOC_MAGIC, 1, struct ion_handle_data)
#define ION_IOC_MAP _IOWR(ION_IOC_MAGIC, 2, struct ion_fd_data)
#define ION_IOC_SHARE _IOWR(ION_IOC_MAGIC, 4, struct ion_fd_data)
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define ION_IOC_IMPORT _IOWR(ION_IOC_MAGIC, 5, struct ion_fd_data)
#define ION_IOC_SYNC _IOWR(ION_IOC_MAGIC, 7, struct ion_fd_data)
#define ION_IOC_CUSTOM _IOWR(ION_IOC_MAGIC, 6, struct ion_custom_data)
#endif
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#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/devices/virtual/mem/null",
"/sys/devices/virtual/misc/fuse",
// Framebuffer
"/sys/class/graphics/fb0",
// Storage Devices
"/sys/block/mmcblk0",
"/sys/devices/msm_sdcc.1",
"/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/mmcblk0p21", //persist
"/sys/devices/msm_sdcc.1/mmc_host/mmc0/mmc0:0001/block/mmcblk0/mmcblk0p14", //boot
"/sys/devices/msm_sdcc.1/mmc_host/mmc0/mmc0:0001/block/mmcblk0/mmcblk0p15", //recovery
"/sys/devices/msm_sdcc.1/mmc_host/mmc0/mmc0:0001/block/mmcblk0/mmcblk0p24", //cache
"/sys/devices/msm_sdcc.1/mmc_host/mmc0/mmc0:0001/block/mmcblk0/mmcblk0p23", //system
"/sys/devices/msm_sdcc.1/mmc_host/mmc0/mmc0:0001/block/mmcblk0/mmcblk0p26", //userdata
"/sys/block/mmcblk1",
"/sys/devices/msm_sdcc.2/mmc_host/mmc1",
"/sys/devices/msm_sdcc.2/mmc_host/mmc1/mmc1:59b4",
"/sys/devices/msm_sdcc.2/mmc_host/mmc1/mmc1:59b4/block/mmcblk1",
"/sys/devices/msm_sdcc.2/mmc_host/mmc1/mmc1:59b4/block/mmcblk1/mmcblk1p1",
"/sys/devices/msm_sdcc.2/mmc_host/mmc1/mmc1:59b4/block/mmcblk1/mmcblk1p2",
"/sys/devices/msm_sdcc.2/mmc_host/mmc1/mmc1:59b4/block/mmcblk1/mmcblk1p3",
"/sys/devices/msm_sdcc.2/mmc_host/mmc1/mmc1:59b4/block/mmcblk1/mmcblk1p4",
"/sys/bus/mmc",
"/sys/bus/mmc/drivers/mmcblk",
"/sys/module/mmc_core",
"/sys/module/mmcblk",
// Input
"/sys/devices/gpio_keys.84/input*",
"/sys/devices/virtual/input*",
"/sys/devices/virtual/misc/uinput",
"/sys/devices/f9927000.i2c/i2c-5/5-004a/input*",
// For adb
"/sys/devices/virtual/tty/ptmx",
"/sys/devices/virtual/misc/android_adb",
"/sys/devices/virtual/android_usb/android0/f_adb",
"/sys/bus/usb",
// for qualcomm overlay - /dev/ion
"/sys/devices/virtual/misc/ion",
NULL
};
#ifndef MR_QCOM_OVERLAY_H
#define MR_QCOM_OVERLAY_H
#include "msm_ion.h"
#include "msm_mdp.h"
#endif
# 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"
# This file contains info about ROMs capabilites and boot process.
# It should be placed in ROM's folder (eg. /media/multirom/roms/*rom_name*)
# and must be named "rom_info.txt".
# 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"
root_img="%m/data.img"
root_img_fs="ext4"
# 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="zImage"
initrd_path="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 console=tty1 root=%d rootfstype=%r rw rootflags=defaults,noatime,nodiratime"
img_cmdline="loop=%s loopfstype=%f"
dir_cmdline="rootsubdir=%s"
/****************************************************************************
****************************************************************************
***
*** This header was automatically generated from a Linux kernel header
*** of the same name, to make information necessary for userspace to
*** call into the kernel available to libc. It contains only constants,
*** structures, and macros generated from the original header, and thus,
*** contains no copyrightable information.
***
*** To edit the content of this header, modify the corresponding
*** source file (e.g. under external/kernel-headers/original/) then
*** run bionic/libc/kernel/tools/update_all.py
***
*** Any manual change here will be lost the next time this script will
*** be run. You've been warned!
***
****************************************************************************
****************************************************************************/
#ifndef _UAPI_MSM_ION_H
#define _UAPI_MSM_ION_H
#include "ion.h"
enum msm_ion_heap_types {
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
ION_HEAP_TYPE_MSM_START = ION_HEAP_TYPE_CUSTOM + 1,
ION_HEAP_TYPE_SECURE_DMA = ION_HEAP_TYPE_MSM_START,
ION_HEAP_TYPE_REMOVED,
};
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
enum ion_heap_ids {
INVALID_HEAP_ID = -1,
ION_CP_MM_HEAP_ID = 8,
ION_CP_MFC_HEAP_ID = 12,
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
ION_CP_WB_HEAP_ID = 16,
ION_CAMERA_HEAP_ID = 20,
ION_SYSTEM_CONTIG_HEAP_ID = 21,
ION_ADSP_HEAP_ID = 22,
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
ION_PIL1_HEAP_ID = 23,
ION_SF_HEAP_ID = 24,
ION_SYSTEM_HEAP_ID = 25,
ION_PIL2_HEAP_ID = 26,
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
ION_QSECOM_HEAP_ID = 27,
ION_AUDIO_HEAP_ID = 28,
ION_MM_FIRMWARE_HEAP_ID = 29,
ION_HEAP_ID_RESERVED = 31
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
};
#define ION_IOMMU_HEAP_ID ION_SYSTEM_HEAP_ID
#define ION_HEAP_TYPE_IOMMU ION_HEAP_TYPE_SYSTEM
enum ion_fixed_position {
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
NOT_FIXED,
FIXED_LOW,
FIXED_MIDDLE,
FIXED_HIGH,
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
};
enum cp_mem_usage {
VIDEO_BITSTREAM = 0x1,
VIDEO_PIXEL = 0x2,
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
VIDEO_NONPIXEL = 0x3,
DISPLAY_SECURE_CP_USAGE = 0x4,
CAMERA_SECURE_CP_USAGE = 0x5,
MAX_USAGE = 0x6,
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
UNKNOWN = 0x7FFFFFFF,
};
#define ION_FLAG_SECURE (1 << ION_HEAP_ID_RESERVED)
#define ION_FLAG_FORCE_CONTIGUOUS (1 << 30)
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define ION_FLAG_POOL_FORCE_ALLOC (1 << 16)
#define ION_SECURE ION_FLAG_SECURE
#define ION_FORCE_CONTIGUOUS ION_FLAG_FORCE_CONTIGUOUS
#define ION_HEAP(bit) (1 << (bit))
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define ION_ADSP_HEAP_NAME "adsp"
#define ION_SYSTEM_HEAP_NAME "system"
#define ION_VMALLOC_HEAP_NAME ION_SYSTEM_HEAP_NAME
#define ION_KMALLOC_HEAP_NAME "kmalloc"
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define ION_AUDIO_HEAP_NAME "audio"
#define ION_SF_HEAP_NAME "sf"
#define ION_MM_HEAP_NAME "mm"
#define ION_CAMERA_HEAP_NAME "camera_preview"
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define ION_IOMMU_HEAP_NAME "iommu"
#define ION_MFC_HEAP_NAME "mfc"
#define ION_WB_HEAP_NAME "wb"
#define ION_MM_FIRMWARE_HEAP_NAME "mm_fw"
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define ION_PIL1_HEAP_NAME "pil_1"
#define ION_PIL2_HEAP_NAME "pil_2"
#define ION_QSECOM_HEAP_NAME "qsecom"
#define ION_SET_CACHED(__cache) (__cache | ION_FLAG_CACHED)
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define ION_SET_UNCACHED(__cache) (__cache & ~ION_FLAG_CACHED)
#define ION_IS_CACHED(__flags) ((__flags) & ION_FLAG_CACHED)
struct ion_flush_data {
ion_user_handle_t handle;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
int fd;
void *vaddr;
unsigned int offset;
unsigned int length;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
};
struct ion_prefetch_data {
int heap_id;
unsigned long len;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
};
#define ION_IOC_MSM_MAGIC 'M'
#define ION_IOC_CLEAN_CACHES _IOWR(ION_IOC_MSM_MAGIC, 0, struct ion_flush_data)
#define ION_IOC_INV_CACHES _IOWR(ION_IOC_MSM_MAGIC, 1, struct ion_flush_data)
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define ION_IOC_CLEAN_INV_CACHES _IOWR(ION_IOC_MSM_MAGIC, 2, struct ion_flush_data)
#define ION_IOC_PREFETCH _IOWR(ION_IOC_MSM_MAGIC, 3, struct ion_prefetch_data)
#define ION_IOC_DRAIN _IOWR(ION_IOC_MSM_MAGIC, 4, struct ion_prefetch_data)
#endif
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
This diff is collapsed.
add_lunch_combo omni_matisse-eng
add_lunch_combo omni_matisse-userdebug
add_lunch_combo mrom_matisse-eng
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