Commit cd5ae3f3 authored by sub77's avatar sub77
Browse files

multirom

parent d3109e4c
......@@ -20,7 +20,7 @@ TARGET_PREBUILT_KERNEL := device/samsung/matisse/zImage
INSTALLED_DTIMAGE_TARGET := device/samsung/matisse/dtb
# Kernel Inline
TARGET_KERNEL_SOURCE := kernel/samsung/msm8226
#TARGET_KERNEL_SOURCE := kernel/samsung/msm8226
ifneq ($(TARGET_KERNEL_SOURCE),)
TARGET_KERNEL_CONFIG := twrp_msm8226_defconfig
TARGET_KERNEL_VARIANT_CONFIG := twrp_matisse_defconfig
......@@ -63,15 +63,41 @@ TW_INCLUDE_CRYPTO := true
TW_INCLUDE_NTFS_3G := true
TW_NO_USB_STORAGE := true
TW_TARGET_USES_QCOM_BSP := true
#TW_THEME := landscape_hdpi
TW_THEME := landscape_hdpi
ifneq ($(TARGET_RECOVERY_IS_MULTIROM),)
TW_CUSTOM_THEME := device/samsung/matisse/theme/twres
endif
TW_BRIGHTNESS_PATH := "/sys/class/leds/lcd-backlight/brightness"
# MultiROM config
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/root/etc/twrp.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
# LOG
#TWRP_INCLUDE_LOGCAT := true
#TARGET_USES_LOGD := true
TW_DEVICE_SPECIFIC_VERSION := 3.0.0.7
MR_DEVICE_SPECIFIC_VERSION := d
TARGET_RECOVERY_IS_MULTIROM := true
TARGET_KERNEL_SEANDROIDENFORCE := true
TARGET_KERNEL_TAR := true
TARGET_KERNEL_TAR :=
TARGET_UPLOAD_AFH := true
TARGET_UPLOAD_SFTP :=
......@@ -46,19 +46,44 @@ $(INSTALLED_RECOVERYIMAGE_TARGET): $(MKBOOTIMG) $(INSTALLED_DTIMAGE_TARGET) \
$(hide) $(MKBOOTIMG) $(INTERNAL_RECOVERYIMAGE_ARGS) $(BOARD_MKBOOTIMG_ARGS) --dt $(INSTALLED_DTIMAGE_TARGET) --output $@
$(hide) $(call assert-max-image-size,$@,$(BOARD_RECOVERYIMAGE_PARTITION_SIZE))
@echo -e ${PRT_IMG}"Made recovery image: $@"${CL_RST}
ifeq ($(TARGET_KERNEL_SEANDROIDENFORCE),true)
$(hide) echo -n "SEANDROIDENFORCE" >> $(PRODUCT_OUT)/recovery.img
@echo -e ${PRT_IMG}"Patched SEANDROIDENFORCE kernel message"${CL_RST}
$(hide) echo -n "SEANDROIDENFORCE" >> $(PRODUCT_OUT)/recovery.img
@echo " SEANDROIDENFORCE "
endif
ifeq ($(TARGET_RECOVERY_IS_MULTIROM),true)
$(hide) cp $(PRODUCT_OUT)/recovery.img $(PRODUCT_OUT)/twrpm-$(TW_DEVICE_SPECIFIC_VERSION)_$(TARGET_DEVICE)_$(shell date -u +%Y%m%d-%H%M).img
ifeq ($(TARGET_KERNEL_TAR),true)
$(hide) tar -C $(PRODUCT_OUT) -H ustar -c recovery.img > $(PRODUCT_OUT)/recovery.tar
$(hide) cp $(PRODUCT_OUT)/recovery.tar $(PRODUCT_OUT)/twrpm-$(TW_DEVICE_SPECIFIC_VERSION)_$(TARGET_DEVICE)_$(shell date -u +%Y%m%d-%H%M).tar
ifeq ($(TARGET_UPLOAD_AFH),true)
$(hide) curl -T $(PRODUCT_OUT)/twrp*.tar -u ${AFHUSER}:${AFHPWD} ftp://uploads.androidfilehost.com --ftp-create-dirs
endif
endif
ifeq ($(TARGET_UPLOAD_AFH),true)
$(hide) curl -T $(PRODUCT_OUT)/twrp*.img -u ${AFHUSER}:${AFHPWD} ftp://uploads.androidfilehost.com --ftp-create-dirs
endif
endif
ifneq ($(TARGET_RECOVERY_IS_MULTIROM),true)
$(hide) cp $(PRODUCT_OUT)/recovery.img $(PRODUCT_OUT)/twrp-$(TW_DEVICE_SPECIFIC_VERSION)_$(TARGET_DEVICE)_$(shell date -u +%Y%m%d-%H%M).img
ifeq ($(TARGET_KERNEL_TAR),true)
$(hide) tar -C $(PRODUCT_OUT) -H ustar -c recovery.img > $(PRODUCT_OUT)/recovery.tar
$(hide) cp $(PRODUCT_OUT)/recovery.img $(PRODUCT_OUT)/twrp-$(TWVER)_$(TARGET_DEVICE)_$(shell date -u +%Y%m%d-%H%M).tar
$(hide) tar -C $(PRODUCT_OUT) -H ustar -c recovery.img > $(PRODUCT_OUT)/recovery.tar
$(hide) cp $(PRODUCT_OUT)/recovery.tar $(PRODUCT_OUT)/twrp-$(TW_DEVICE_SPECIFIC_VERSION)_$(TARGET_DEVICE)_$(shell date -u +%Y%m%d-%H%M).tar
ifeq ($(TARGET_UPLOAD_AFH),true)
$(hide) curl -T $(PRODUCT_OUT)/twrp*.tar -u ${AFHUSER}:${AFHPWD} ftp://uploads.androidfilehost.com --ftp-create-dirs auto/SamsungGalaxyTab410.1/40744-twrp/
endif
endif
$(hide) cp $(PRODUCT_OUT)/recovery.img $(PRODUCT_OUT)/twrp-$(TWVER)_$(TARGET_DEVICE)_$(shell date -u +%Y%m%d-%H%M).img
ifeq ($(TARGET_UPLOAD_AFH),true)
$(hide) curl -T $(PRODUCT_OUT)/twrp-*.img -u ${AFHUSER}:${AFHPWD} ftp://uploads.androidfilehost.com --ftp-create-dirs
$(hide) curl -T $(PRODUCT_OUT)/twrp-*.tar -u ${AFHUSER}:${AFHPWD} ftp://uploads.androidfilehost.com --ftp-create-dirs
ifeq ($(TARGET_UPLOAD_AFH),true)
$(hide) curl -T $(PRODUCT_OUT)/twrp*.img -u ${AFHUSER}:${AFHPWD} ftp://uploads.androidfilehost.com --ftp-create-dirs
endif
ifeq ($(TARGET_UPLOAD_SFTP),true)
$(hide) sftp $(PRODUCT_OUT)/recovery.img sub:/home/sub77
endif
LOCAL_PATH := $(call my-dir)
LZMA_BIN := $(shell which lzma)
ifneq ($(TARGET_KERNEL_SOURCE),)
CM_DTB_FILES = $(wildcard $(TOP)/$(TARGET_KERNEL_SOURCE)/arch/arm/boot/*.dtb)
CM_DTS_FILE = $(lastword $(subst /, ,$(1)))
DTB_FILE := $(addprefix $(KERNEL_OUT)/arch/arm/boot/,$(patsubst %.dts,%.dtb,$(call CM_DTS_FILE,$(1))))
ZIMG_FILE = $(addprefix $(KERNEL_OUT)/arch/arm/boot/,$(patsubst %.dts,%-zImage,$(call CM_DTS_FILE,$(1))))
KERNEL_ZIMG = $(KERNEL_OUT)/arch/arm/boot/zImage
define append-cm-dtb
mkdir -p $(KERNEL_OUT)/arch/arm/boot;\
$(foreach d, $(CM_DTB_FILES), \
cat $(KERNEL_ZIMG) $(call DTB_FILE,$(d)) > $(call ZIMG_FILE,$(d));)
endef
## Build and run dtbtool
DTBTOOL := $(HOST_OUT_EXECUTABLES)/dtbToolCM$(HOST_EXECUTABLE_SUFFIX)
INSTALLED_DTIMAGE_TARGET := $(PRODUCT_OUT)/dt.img
$(INSTALLED_DTIMAGE_TARGET): $(DTBTOOL) $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr $(INSTALLED_KERNEL_TARGET)
@echo -e ${CL_CYN}"Start DT image: $@"${CL_RST}
$(call append-cm-dtb)
$(call pretty,"Target dt image: $(INSTALLED_DTIMAGE_TARGET)")
$(hide) $(DTBTOOL) -2 -o $(INSTALLED_DTIMAGE_TARGET) -s $(BOARD_KERNEL_PAGESIZE) -p $(KERNEL_OUT)/scripts/dtc/ $(KERNEL_OUT)/arch/arm/boot/
@echo -e ${CL_CYN}"Made DT image: $@"${CL_RST}
endif
## Overload bootimg generation: Same as the original, + --dt arg
$(INSTALLED_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_FILES) $(INSTALLED_DTIMAGE_TARGET)
$(call pretty,"Target boot image: $@")
$(hide) $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_ARGS) $(BOARD_MKBOOTIMG_ARGS) --dt $(INSTALLED_DTIMAGE_TARGET) --output $@
$(hide) $(call assert-max-image-size,$@,$(BOARD_BOOTIMAGE_PARTITION_SIZE),raw)
@echo -e ${CL_CYN}"Made boot image: $@"${CL_RST}
## Overload bootimg generation: Same as the original, + --dt arg + LZMA compression
$(INSTALLED_RECOVERYIMAGE_TARGET): $(MKBOOTIMG) $(INSTALLED_DTIMAGE_TARGET) \
$(recovery_uncompressed_ramdisk) \
$(recovery_kernel)
@echo -e ${PRT_IMG}"----- Making compressed recovery ramdisk ------"${CL_RST}
$(hide) $(LZMA_BIN) < $(recovery_uncompressed_ramdisk) > $(recovery_ramdisk)
@echo -e ${PRT_IMG}"----- Making recovery image ------"${CL_RST}
$(hide) $(MKBOOTIMG) $(INTERNAL_RECOVERYIMAGE_ARGS) $(BOARD_MKBOOTIMG_ARGS) --dt $(INSTALLED_DTIMAGE_TARGET) --output $@
$(hide) $(call assert-max-image-size,$@,$(BOARD_RECOVERYIMAGE_PARTITION_SIZE))
@echo -e ${PRT_IMG}"Made recovery image: $@"${CL_RST}
ifeq ($(TARGET_KERNEL_SEANDROIDENFORCE),true)
$(hide) echo -n "SEANDROIDENFORCE" >> $(PRODUCT_OUT)/recovery.img
@echo " SEANDROIDENFORCE "
endif
ifeq ($(TARGET_RECOVERY_IS_MULTIROM),true)
$(hide) cp $(PRODUCT_OUT)/recovery.img $(PRODUCT_OUT)/twrpm-$(TW_DEVICE_SPECIFIC_VERSION)_$(TARGET_DEVICE)_$(shell date -u +%Y%m%d-%H%M).img
ifeq ($(TARGET_KERNEL_TAR),true)
$(hide) tar -C $(PRODUCT_OUT) -H ustar -c recovery.img > $(PRODUCT_OUT)/recovery.tar
$(hide) cp $(PRODUCT_OUT)/recovery.tar $(PRODUCT_OUT)/twrpm-$(TW_DEVICE_SPECIFIC_VERSION)_$(TARGET_DEVICE)_$(shell date -u +%Y%m%d-%H%M).tar
ifeq ($(TARGET_UPLOAD_AFH),true)
$(hide) curl -T $(PRODUCT_OUT)/twrp*.tar -u ${AFHUSER}:${AFHPWD} ftp://uploads.androidfilehost.com --ftp-create-dirs
endif
endif
ifeq ($(TARGET_UPLOAD_AFH),true)
$(hide) curl -T $(PRODUCT_OUT)/twrp*.img -u ${AFHUSER}:${AFHPWD} ftp://uploads.androidfilehost.com auto/SamsungGalaxyTab410.1/40744-twrp/ --ftp-create-dirs
endif
endif
ifneq ($(TARGET_RECOVERY_IS_MULTIROM),true)
$(hide) cp $(PRODUCT_OUT)/recovery.img $(PRODUCT_OUT)/twrp-$(TW_DEVICE_SPECIFIC_VERSION)_$(TARGET_DEVICE)_$(shell date -u +%Y%m%d-%H%M).img
ifeq ($(TARGET_KERNEL_TAR),true)
$(hide) tar -C $(PRODUCT_OUT) -H ustar -c recovery.img > $(PRODUCT_OUT)/recovery.tar
$(hide) cp $(PRODUCT_OUT)/recovery.tar $(PRODUCT_OUT)/twrp-$(TW_DEVICE_SPECIFIC_VERSION)_$(TARGET_DEVICE)_$(shell date -u +%Y%m%d-%H%M).tar
ifeq ($(TARGET_UPLOAD_AFH),true)
$(hide) curl -T $(PRODUCT_OUT)/twrp*.tar -u ${AFHUSER}:${AFHPWD} ftp://uploads.androidfilehost.com --ftp-create-dirs
endif
endif
ifeq ($(TARGET_UPLOAD_AFH),true)
$(hide) curl -T $(PRODUCT_OUT)/twrp*.img -u ${AFHUSER}:${AFHPWD} ftp://uploads.androidfilehost.com auto/SamsungGalaxyTab410.1/40744-twrp/ --ftp-create-dirs
endif
endif
/****************************************************************************
****************************************************************************
***
*** 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.
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