xiaomi-whyred: new device (Xiaomi Redmi Note 5 Pro) (!1088)
Started porting pmOS to Xiaomi Redmi Note 5 Pro (whyred). What works so far: - Booting - SSH over USB - SD card detection (haven't tried flashing to internal storage because i'm afraid of bricking the device due to anti-rollback) - Vibration and LEDs - Screen - Hardware buttons - Touchscreen Untested: - WiFi - Camera - Audio - Bluetooth - GPS - Calls, SMS, Cellular network
This commit is contained in:
parent
f5016b949f
commit
790cda59be
25
device/testing/device-xiaomi-whyred/APKBUILD
Normal file
25
device/testing/device-xiaomi-whyred/APKBUILD
Normal file
|
@ -0,0 +1,25 @@
|
|||
# Contributor: Nikita Utkin <shockck84@gmail.com>
|
||||
# Maintainer: Nikita Utkin <shockck84@gmail.com>
|
||||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname="device-xiaomi-whyred"
|
||||
pkgdesc="Xiaomi Redmi Note 5"
|
||||
pkgver=1.0
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
options="!check !archcheck"
|
||||
depends="postmarketos-base linux-xiaomi-whyred mkbootimg mesa-dri-swrast mdss-fb-init-hack"
|
||||
makedepends="devicepkg-dev"
|
||||
source="deviceinfo"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
}
|
||||
|
||||
package() {
|
||||
devicepkg_package $startdir $pkgname
|
||||
}
|
||||
|
||||
|
||||
sha512sums="b76241a7e5ec46b736e53e0a375b6b4bb3e342590b604512e11e760bf1bd9d3c7988ab3d35b6e5de244dc419d32952ff3b8e20c94cf07f3038a35c769b6520fa deviceinfo"
|
34
device/testing/device-xiaomi-whyred/deviceinfo
Normal file
34
device/testing/device-xiaomi-whyred/deviceinfo
Normal file
|
@ -0,0 +1,34 @@
|
|||
# Reference: <https://postmarketos.org/deviceinfo>
|
||||
# Please use double quotes only. You can source this file in shell scripts.
|
||||
|
||||
deviceinfo_format_version="0"
|
||||
deviceinfo_name="Xiaomi Redmi Note 5"
|
||||
deviceinfo_manufacturer="Xiaomi"
|
||||
deviceinfo_codename="xiaomi-whyred"
|
||||
deviceinfo_year="2018"
|
||||
deviceinfo_dtb=""
|
||||
deviceinfo_modules_initfs=""
|
||||
deviceinfo_usb_rndis_function="rndis_bam.rndis"
|
||||
deviceinfo_arch="aarch64"
|
||||
|
||||
# Device related
|
||||
deviceinfo_keyboard="false"
|
||||
deviceinfo_external_storage="true"
|
||||
deviceinfo_screen_width="1080"
|
||||
deviceinfo_screen_height="2160"
|
||||
deviceinfo_dev_touchscreen=""
|
||||
deviceinfo_dev_touchscreen_calibration=""
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="fastboot"
|
||||
deviceinfo_kernel_cmdline="console=ttyMSM0,115200,n8 androidboot.console=ttyMSM0 earlycon=msm_serial_dm,0xc170000 androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x37 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 sched_enable_hmp=1 sched_enable_power_aware=1 service_locator.enable=1 swiotlb=1 androidboot.configfs=true androidboot.usbcontroller=a800000.dwc3 androidboot.selinux=permissive buildvariant=eng loglevel=8"
|
||||
deviceinfo_generate_bootimg="true"
|
||||
deviceinfo_bootimg_qcdt="false"
|
||||
deviceinfo_bootimg_dtb_second="false"
|
||||
deviceinfo_flash_offset_base="0x00000000"
|
||||
deviceinfo_flash_offset_kernel="0x00008000"
|
||||
deviceinfo_flash_offset_ramdisk="0x01000000"
|
||||
deviceinfo_flash_offset_second="0x00f00000"
|
||||
deviceinfo_flash_offset_tags="0x00000100"
|
||||
deviceinfo_flash_pagesize="4096"
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
diff --git a/drivers/net/ethernet/msm/rndis_ipa_trace.h b/drivers/net/ethernet/msm/rndis_ipa_trace.h
|
||||
index c0fc573..c18046b 100644
|
||||
--- a/drivers/net/ethernet/msm/rndis_ipa_trace.h
|
||||
+++ b/drivers/net/ethernet/msm/rndis_ipa_trace.h
|
||||
@@ -77,5 +77,5 @@ TRACE_EVENT(
|
||||
|
||||
/* This part must be outside protection */
|
||||
#undef TRACE_INCLUDE_PATH
|
||||
-#define TRACE_INCLUDE_PATH .
|
||||
+#define TRACE_INCLUDE_PATH ../../drivers/net/ethernet/msm/
|
||||
#include <trace/define_trace.h>
|
||||
diff --git a/drivers/platform/msm/ipa/ipa_v2/ipa_trace.h b/drivers/platform/msm/ipa/ipa_v2/ipa_trace.h
|
||||
index d70abdf..7f7e452 100644
|
||||
--- a/drivers/platform/msm/ipa/ipa_v2/ipa_trace.h
|
||||
+++ b/drivers/platform/msm/ipa/ipa_v2/ipa_trace.h
|
||||
@@ -131,5 +131,5 @@ TRACE_EVENT(
|
||||
|
||||
/* This part must be outside protection */
|
||||
#undef TRACE_INCLUDE_PATH
|
||||
-#define TRACE_INCLUDE_PATH .
|
||||
+#define TRACE_INCLUDE_PATH ../../drivers/platform/msm/ipa/ipa_v2/
|
||||
#include <trace/define_trace.h>
|
79
device/testing/linux-xiaomi-whyred/APKBUILD
Normal file
79
device/testing/linux-xiaomi-whyred/APKBUILD
Normal file
|
@ -0,0 +1,79 @@
|
|||
# Contributor: Nikita Utkin <shockck84@gmail.com>
|
||||
# Maintainer: Nikita Utkin <shockck84@gmail.com>
|
||||
# Reference: <https://postmarketos.org/vendorkernel>
|
||||
# Kernel config based on: arch/arm64/configs/whyred-perf_defconfig
|
||||
|
||||
pkgname="linux-xiaomi-whyred"
|
||||
pkgver=4.4.78
|
||||
pkgrel=0
|
||||
pkgdesc="Xiaomi Redmi Note 5 kernel fork"
|
||||
arch="aarch64"
|
||||
_carch="arm64"
|
||||
_flavor="xiaomi-whyred"
|
||||
url="https://kernel.org"
|
||||
license="GPL-2.0-only"
|
||||
options="!strip !check !tracedeps"
|
||||
# Compiling with latest gcc causes kernel panic, so here we use gcc6
|
||||
makedepends="bash bc bison devicepkg-dev flex openssl-dev perl gcc6"
|
||||
|
||||
if [ "${CC:0:5}" != "gcc6-" ]; then
|
||||
CC="gcc6-$CC"
|
||||
HOSTCC="gcc6-gcc"
|
||||
CROSS_COMPILE="gcc6-$CROSS_COMPILE"
|
||||
fi
|
||||
|
||||
# Source
|
||||
_repository="Xiaomi_Kernel_OpenSource"
|
||||
_commit="efbbb9cce47475c49f28d227b2a52eca6f0d02a7"
|
||||
_config="config-$_flavor.$arch"
|
||||
source="
|
||||
$pkgname-$_commit.zip::https://github.com/MiCode/$_repository/archive/$_commit.zip
|
||||
$_config
|
||||
gcc8-fix-put-user.patch
|
||||
fix-includes.patch
|
||||
fix-trace-includes.patch
|
||||
fix-vl53l0-includes.patch
|
||||
03_fix_rndis_ipa_trace_header_not_found.patch
|
||||
fix-usb-redundant-module-funcs.patch
|
||||
export-usb-gadget-funcs.patch
|
||||
exclude-unrelated-device-trees.patch
|
||||
"
|
||||
# exclude-unrelated-device-trees.patch removes device trees for Wayne (Redmi 6X)
|
||||
# and Tulip (Redmi Note 6 Pro), leaving only Whyred's.
|
||||
# This patch is neccessary to point the kernel to the correct device tree,
|
||||
# as it was using Wayne's device trees otherwise for some reason.
|
||||
# TODO: Find better way to force to use the correct device tree.
|
||||
builddir="$srcdir/$_repository-$_commit"
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC"
|
||||
}
|
||||
|
||||
build() {
|
||||
unset LDFLAGS
|
||||
make ARCH="$_carch" CC=$CC CROSS_COMPILE=$CROSS_COMPILE HOSTCC=$HOSTCC \
|
||||
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
|
||||
}
|
||||
|
||||
package() {
|
||||
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor"
|
||||
|
||||
# Modules
|
||||
unset LDFLAGS
|
||||
make ARCH="$_carch" CC="${CC:-gcc}" \
|
||||
INSTALL_MOD_PATH="$pkgdir" INSTALL_MOD_STRIP=1 \
|
||||
KBUILD_BUILD_VERSION="$((pkgrel + 1))-postmarketOS" \
|
||||
modules_install
|
||||
}
|
||||
|
||||
sha512sums="a4da46628917ed4b486a4c12ba8e75fde8db8a23f9311ef1a907f7a664d5c4f7266a9174b131a62cfd0c00f0498d05388fc9c20a68bf3ab4dd9565d3bd033393 linux-xiaomi-whyred-efbbb9cce47475c49f28d227b2a52eca6f0d02a7.zip
|
||||
6fd145779ded26af00f5bff82072771a6e79ff6e1c81aa4896f053ed799297c3416a9a28438ef6f3f0ab40dc8d3947476a5bdccb33889b9d23861f6b7976d612 config-xiaomi-whyred.aarch64
|
||||
197d40a214ada87fcb2dfc0ae4911704b9a93354b75179cd6b4aadbb627a37ec262cf516921c84a8b1806809b70a7b440cdc8310a4a55fca5d2c0baa988e3967 gcc8-fix-put-user.patch
|
||||
2d72e13a68c67c6af07b0e7e709f3feb57187964adef79d3c1cc7d73f75f5acccfcaa0d733d8d8746deadc220cb71d0bbd67ed11861bf9ee8dd07005f5d643eb fix-includes.patch
|
||||
a7885d5ea79026f88723bab685b86f2e3d7d14dbc29c1220ec6fa007a6ed5f5c6a1773b0f57c9ec413bca069deff16ca8cb2126bf428aff2e0957a9c1a0339a8 fix-trace-includes.patch
|
||||
f8ca292ebc8bffac59f31fca191f9a95cdbd405c0382299779a5dfcfadde5116dec3d868f9d5ea4e2b3965f6fb9822241121bc6121264af796c59bc2cd6da29e fix-vl53l0-includes.patch
|
||||
9c549714f03c7a7666e8aa7508a48cfdccab7cf3e97fb59c4df8fa97f75492365926f82c4a677c50780d68d4905504dcccbdd6de6344bd8d4b88b2331933ed46 03_fix_rndis_ipa_trace_header_not_found.patch
|
||||
85086f455f7ba08db2421862151b838cfefbd5131990bfa391863e0296cbb716f500cece07ad71a229274ae097bcebc81a2c99521c1b4e7ebdd65fa925a9ddf8 fix-usb-redundant-module-funcs.patch
|
||||
6bb86b54c7002e056a8eb21b159d4beb001ca6745645faf86d9208106390816aa07674dc6a11152a8b3fafae5ba93e0352de0813d1a9235b745150253be84e72 export-usb-gadget-funcs.patch
|
||||
4eff7d21cb15f769ee9667eb0a7d42f3439e12fc76046b409baea232fbbf935a2e960ef782361d712008ada0d57cff7cf5e8cecf6484a3037e73647f5dc58a51 exclude-unrelated-device-trees.patch"
|
5140
device/testing/linux-xiaomi-whyred/config-xiaomi-whyred.aarch64
Normal file
5140
device/testing/linux-xiaomi-whyred/config-xiaomi-whyred.aarch64
Normal file
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,25 @@
|
|||
diff --git a/arch/arm/boot/dts/qcom/Makefile b/arch/arm/boot/dts/qcom/Makefile
|
||||
index 2bad863d..ff75503e 100644
|
||||
--- a/arch/arm/boot/dts/qcom/Makefile
|
||||
+++ b/arch/arm/boot/dts/qcom/Makefile
|
||||
@@ -179,13 +179,13 @@ endif
|
||||
|
||||
dtb-$(CONFIG_ARCH_MSMHAMSTER) += msmhamster-rumi.dtb
|
||||
|
||||
-dtb-$(CONFIG_ARCH_SDM660) += sdm660-mtp_whyred.dtb \
|
||||
- sdm636-mtp_whyred.dtb \
|
||||
- sdm636-mtp_wayne.dtb \
|
||||
- sdm660-mtp_wayne_a1.dtb \
|
||||
- sdm660-mtp_wayne.dtb \
|
||||
- sdm660-mtp_tulip.dtb \
|
||||
- sdm636-mtp_tulip.dtb
|
||||
+dtb-$(CONFIG_ARCH_SDM660) += sdm660-mtp_whyred.dtb # \
|
||||
+ #sdm636-mtp_whyred.dtb \
|
||||
+ #sdm636-mtp_wayne.dtb \
|
||||
+ #sdm660-mtp_wayne_a1.dtb \
|
||||
+ #sdm660-mtp_wayne.dtb \
|
||||
+ #sdm660-mtp_tulip.dtb \
|
||||
+ #sdm636-mtp_tulip.dtb
|
||||
|
||||
dtb-$(CONFIG_ARCH_SDM630) += sdm630-rumi.dtb \
|
||||
sdm630-pm660a-rumi.dtb \
|
|
@ -0,0 +1,17 @@
|
|||
diff --git a/drivers/usb/gadget/debug.c b/drivers/usb/gadget/debug.c
|
||||
index 32a53299..fa5ff4ff 100644
|
||||
--- a/drivers/usb/gadget/debug.c
|
||||
+++ b/drivers/usb/gadget/debug.c
|
||||
@@ -126,8 +126,12 @@ err0:
|
||||
return ret;
|
||||
}
|
||||
|
||||
+EXPORT_SYMBOL(debug_debugfs_init);
|
||||
+
|
||||
void debug_debugfs_exit(void)
|
||||
{
|
||||
debugfs_remove_recursive(dbg_buffer.root);
|
||||
dbg_buffer.root = NULL;
|
||||
}
|
||||
+
|
||||
+EXPORT_SYMBOL(debug_debugfs_exit);
|
187
device/testing/linux-xiaomi-whyred/export-usb-gadget-funcs.patch
Normal file
187
device/testing/linux-xiaomi-whyred/export-usb-gadget-funcs.patch
Normal file
|
@ -0,0 +1,187 @@
|
|||
diff --git a/drivers/platform/msm/usb_bam.c b/drivers/platform/msm/usb_bam.c
|
||||
index a9bcabfd..02a96f1e 100644
|
||||
--- a/drivers/platform/msm/usb_bam.c
|
||||
+++ b/drivers/platform/msm/usb_bam.c
|
||||
@@ -470,6 +470,8 @@ int usb_bam_alloc_fifos(enum usb_ctrl cur_bam, u8 idx)
|
||||
return 0;
|
||||
}
|
||||
|
||||
+EXPORT_SYMBOL(usb_bam_alloc_fifos);
|
||||
+
|
||||
int usb_bam_free_fifos(enum usb_ctrl cur_bam, u8 idx)
|
||||
{
|
||||
struct usb_bam_ctx_type *ctx = &msm_usb_bam[cur_bam];
|
||||
@@ -531,6 +533,8 @@ int usb_bam_free_fifos(enum usb_ctrl cur_bam, u8 idx)
|
||||
return 0;
|
||||
}
|
||||
|
||||
+EXPORT_SYMBOL(usb_bam_free_fifos);
|
||||
+
|
||||
static int connect_pipe(enum usb_ctrl cur_bam, u8 idx, u32 *usb_pipe_idx)
|
||||
{
|
||||
int ret;
|
||||
@@ -1130,6 +1134,8 @@ int usb_bam_connect(enum usb_ctrl cur_bam, int idx, u32 *bam_pipe_idx)
|
||||
return 0;
|
||||
}
|
||||
|
||||
+EXPORT_SYMBOL(usb_bam_connect);
|
||||
+
|
||||
static int __sps_reset_pipe(enum usb_ctrl bam_type,
|
||||
struct sps_pipe *pipe, u32 idx)
|
||||
{
|
||||
@@ -1820,6 +1826,8 @@ void usb_bam_suspend(enum usb_ctrl cur_bam,
|
||||
usb_bam_start_suspend(&info[cur_bam]);
|
||||
}
|
||||
|
||||
+EXPORT_SYMBOL(usb_bam_suspend);
|
||||
+
|
||||
static void usb_bam_start_suspend(struct usb_bam_ipa_handshake_info *info_ptr)
|
||||
{
|
||||
struct usb_bam_pipe_connect *pipe_connect;
|
||||
@@ -2017,6 +2025,8 @@ void usb_bam_resume(enum usb_ctrl cur_bam,
|
||||
queue_work(ctx->usb_bam_wq, &info[cur_bam].resume_work);
|
||||
}
|
||||
|
||||
+EXPORT_SYMBOL(usb_bam_resume);
|
||||
+
|
||||
static void _msm_bam_wait_for_host_prod_granted(enum usb_ctrl bam_type)
|
||||
{
|
||||
struct usb_bam_ctx_type *ctx = &msm_usb_bam[bam_type];
|
||||
@@ -2598,6 +2608,8 @@ int usb_bam_register_wake_cb(enum usb_ctrl bam_type, u8 idx,
|
||||
return __usb_bam_register_wake_cb(bam_type, idx, callback, param, true);
|
||||
}
|
||||
|
||||
+EXPORT_SYMBOL(usb_bam_register_wake_cb);
|
||||
+
|
||||
int usb_bam_register_start_stop_cbs(enum usb_ctrl bam_type, u8 dst_idx,
|
||||
void (*start)(void *, enum usb_bam_pipe_dir),
|
||||
void (*stop)(void *, enum usb_bam_pipe_dir), void *param)
|
||||
@@ -2614,6 +2626,8 @@ int usb_bam_register_start_stop_cbs(enum usb_ctrl bam_type, u8 dst_idx,
|
||||
return 0;
|
||||
}
|
||||
|
||||
+EXPORT_SYMBOL(usb_bam_register_start_stop_cbs);
|
||||
+
|
||||
int usb_bam_disconnect_pipe(enum usb_ctrl bam_type, u8 idx)
|
||||
{
|
||||
struct usb_bam_ctx_type *ctx = &msm_usb_bam[bam_type];
|
||||
@@ -2675,6 +2689,8 @@ int usb_bam_disconnect_pipe(enum usb_ctrl bam_type, u8 idx)
|
||||
return 0;
|
||||
}
|
||||
|
||||
+EXPORT_SYMBOL(usb_bam_disconnect_pipe);
|
||||
+
|
||||
/**
|
||||
* is_ipa_hanlde_valid: Check if ipa_handle is valid or not
|
||||
* @ipa_handle: IPA Handle for producer or consumer
|
||||
diff --git a/drivers/usb/dwc3/dwc3-msm.c b/drivers/usb/dwc3/dwc3-msm.c
|
||||
index b933a702..358a721b 100644
|
||||
--- a/drivers/usb/dwc3/dwc3-msm.c
|
||||
+++ b/drivers/usb/dwc3/dwc3-msm.c
|
||||
@@ -437,6 +437,7 @@ int msm_data_fifo_config(struct usb_ep *ep, phys_addr_t addr,
|
||||
dst_pipe_idx);
|
||||
}
|
||||
|
||||
+EXPORT_SYMBOL(msm_data_fifo_config);
|
||||
|
||||
/**
|
||||
* Cleanups for msm endpoint on request complete.
|
||||
diff --git a/drivers/usb/gadget/debug.c b/drivers/usb/gadget/debug.c
|
||||
index 32a53299..fa5ff4ff 100644
|
||||
--- a/drivers/usb/gadget/debug.c
|
||||
+++ b/drivers/usb/gadget/debug.c
|
||||
@@ -126,8 +126,12 @@ err0:
|
||||
return ret;
|
||||
}
|
||||
|
||||
+EXPORT_SYMBOL(debug_debugfs_init);
|
||||
+
|
||||
void debug_debugfs_exit(void)
|
||||
{
|
||||
debugfs_remove_recursive(dbg_buffer.root);
|
||||
dbg_buffer.root = NULL;
|
||||
}
|
||||
+
|
||||
+EXPORT_SYMBOL(debug_debugfs_exit);
|
||||
diff --git a/drivers/usb/gadget/function/u_ctrl_qti.c b/drivers/usb/gadget/function/u_ctrl_qti.c
|
||||
index 013c54da..c7e18705 100644
|
||||
--- a/drivers/usb/gadget/function/u_ctrl_qti.c
|
||||
+++ b/drivers/usb/gadget/function/u_ctrl_qti.c
|
||||
@@ -320,6 +320,7 @@ void gqti_ctrl_update_ipa_pipes(void *gr, enum qti_port_type qport,
|
||||
|
||||
}
|
||||
|
||||
+EXPORT_SYMBOL(gqti_ctrl_update_ipa_pipes);
|
||||
|
||||
static int qti_ctrl_open(struct inode *ip, struct file *fp)
|
||||
{
|
||||
diff --git a/drivers/usb/gadget/function/u_data_ipa.c b/drivers/usb/gadget/function/u_data_ipa.c
|
||||
index d9a0b0e0..6f14c2fd 100644
|
||||
--- a/drivers/usb/gadget/function/u_data_ipa.c
|
||||
+++ b/drivers/usb/gadget/function/u_data_ipa.c
|
||||
@@ -367,6 +367,8 @@ void ipa_data_disconnect(struct gadget_ipa_port *gp, enum ipa_func_type func)
|
||||
queue_work(ipa_data_wq, &port->disconnect_w);
|
||||
}
|
||||
|
||||
+EXPORT_SYMBOL(ipa_data_disconnect);
|
||||
+
|
||||
/**
|
||||
* configure_fifo() - Configure USB BAM Pipe's data FIFO
|
||||
* @idx: USB BAM Pipe index
|
||||
@@ -863,6 +865,8 @@ err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
+EXPORT_SYMBOL(ipa_data_connect);
|
||||
+
|
||||
/**
|
||||
* ipa_data_start() - Restart USB endless transfer
|
||||
* @param: IPA data channel information
|
||||
@@ -989,6 +993,9 @@ void ipa_data_suspend(struct gadget_ipa_port *gp, enum ipa_func_type func,
|
||||
queue_work(ipa_data_wq, &port->suspend_w);
|
||||
spin_unlock_irqrestore(&port->port_lock, flags);
|
||||
}
|
||||
+
|
||||
+EXPORT_SYMBOL(ipa_data_suspend);
|
||||
+
|
||||
static void bam2bam_data_suspend_work(struct work_struct *w)
|
||||
{
|
||||
struct ipa_data_ch_info *port = container_of(w, struct ipa_data_ch_info,
|
||||
@@ -1119,6 +1126,8 @@ void ipa_data_resume(struct gadget_ipa_port *gp, enum ipa_func_type func,
|
||||
spin_unlock_irqrestore(&port->port_lock, flags);
|
||||
}
|
||||
|
||||
+EXPORT_SYMBOL(ipa_data_resume);
|
||||
+
|
||||
static void bam2bam_data_resume_work(struct work_struct *w)
|
||||
{
|
||||
struct ipa_data_ch_info *port = container_of(w, struct ipa_data_ch_info,
|
||||
@@ -1231,7 +1240,9 @@ void ipa_data_port_select(enum ipa_func_type func)
|
||||
port->ipa_params.src_client = IPA_CLIENT_USB_PROD;
|
||||
port->ipa_params.dst_client = IPA_CLIENT_USB_CONS;
|
||||
port->func_type = func;
|
||||
-};
|
||||
+}
|
||||
+
|
||||
+EXPORT_SYMBOL(ipa_data_port_select);
|
||||
|
||||
void ipa_data_free(enum ipa_func_type func)
|
||||
{
|
||||
@@ -1247,6 +1258,8 @@ void ipa_data_free(enum ipa_func_type func)
|
||||
}
|
||||
}
|
||||
|
||||
+EXPORT_SYMBOL(ipa_data_free);
|
||||
+
|
||||
/**
|
||||
* ipa_data_setup() - setup BAM2BAM IPA port
|
||||
*
|
||||
@@ -1306,6 +1319,8 @@ free_ipa_ports:
|
||||
return ret;
|
||||
}
|
||||
|
||||
+EXPORT_SYMBOL(ipa_data_setup);
|
||||
+
|
||||
void ipa_data_set_ul_max_xfer_size(u32 max_transfer_size)
|
||||
{
|
||||
if (!max_transfer_size) {
|
159
device/testing/linux-xiaomi-whyred/fix-includes.patch
Normal file
159
device/testing/linux-xiaomi-whyred/fix-includes.patch
Normal file
|
@ -0,0 +1,159 @@
|
|||
diff -ur a/drivers/bluetooth/btfm_slim.c b/drivers/bluetooth/btfm_slim.c
|
||||
--- a/drivers/bluetooth/btfm_slim.c 2020-01-20 16:35:42.770014356 -0800
|
||||
+++ b/drivers/bluetooth/btfm_slim.c 2020-01-20 16:36:48.808884668 -0800
|
||||
@@ -23,8 +23,8 @@
|
||||
#include <sound/soc.h>
|
||||
#include <sound/soc-dapm.h>
|
||||
#include <sound/tlv.h>
|
||||
-#include <btfm_slim.h>
|
||||
-#include <btfm_slim_wcn3990.h>
|
||||
+#include "btfm_slim.h"
|
||||
+#include "btfm_slim_wcn3990.h"
|
||||
#include <linux/bluetooth-power.h>
|
||||
|
||||
int btfm_slim_write(struct btfmslim *btfmslim,
|
||||
diff -ur a/drivers/bluetooth/btfm_slim_codec.c b/drivers/bluetooth/btfm_slim_codec.c
|
||||
--- a/drivers/bluetooth/btfm_slim_codec.c 2020-01-20 16:35:42.770014356 -0800
|
||||
+++ b/drivers/bluetooth/btfm_slim_codec.c 2020-01-20 16:36:48.812884599 -0800
|
||||
@@ -24,7 +24,7 @@
|
||||
#include <sound/soc.h>
|
||||
#include <sound/soc-dapm.h>
|
||||
#include <sound/tlv.h>
|
||||
-#include <btfm_slim.h>
|
||||
+#include "btfm_slim.h"
|
||||
|
||||
static int bt_soc_enable_status;
|
||||
|
||||
diff -ur a/drivers/bluetooth/btfm_slim_wcn3990.c b/drivers/bluetooth/btfm_slim_wcn3990.c
|
||||
--- a/drivers/bluetooth/btfm_slim_wcn3990.c 2020-01-20 16:35:42.770014356 -0800
|
||||
+++ b/drivers/bluetooth/btfm_slim_wcn3990.c 2020-01-20 16:36:48.812884599 -0800
|
||||
@@ -10,8 +10,8 @@
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
#include <linux/slimbus/slimbus.h>
|
||||
-#include <btfm_slim.h>
|
||||
-#include <btfm_slim_wcn3990.h>
|
||||
+#include "btfm_slim.h"
|
||||
+#include "btfm_slim_wcn3990.h"
|
||||
|
||||
/* WCN3990 Port assignment */
|
||||
struct btfmslim_ch wcn3990_rxport[] = {
|
||||
diff -ur a/drivers/bluetooth/btfm_slim_wcn3990.h b/drivers/bluetooth/btfm_slim_wcn3990.h
|
||||
--- a/drivers/bluetooth/btfm_slim_wcn3990.h 2020-01-20 16:35:42.770014356 -0800
|
||||
+++ b/drivers/bluetooth/btfm_slim_wcn3990.h 2020-01-20 16:36:48.812884599 -0800
|
||||
@@ -12,7 +12,7 @@
|
||||
#ifndef BTFM_SLIM_WCN3990_H
|
||||
#define BTFM_SLIM_WCN3990_H
|
||||
#ifdef CONFIG_BTFM_SLIM_WCN3990
|
||||
-#include <btfm_slim.h>
|
||||
+#include "btfm_slim.h"
|
||||
|
||||
/* Registers Address */
|
||||
#define CHRK_SB_COMP_TEST 0x00000000
|
||||
Only in b/drivers/bluetooth: btfm_slim_wcn3990.h.orig
|
||||
diff -ur a/drivers/gpu/msm/kgsl_events.c b/drivers/gpu/msm/kgsl_events.c
|
||||
--- a/drivers/gpu/msm/kgsl_events.c 2020-01-20 16:35:42.882012436 -0800
|
||||
+++ b/drivers/gpu/msm/kgsl_events.c 2020-01-20 16:36:48.816884531 -0800
|
||||
@@ -15,7 +15,7 @@
|
||||
#include <linux/list.h>
|
||||
#include <linux/workqueue.h>
|
||||
#include <linux/debugfs.h>
|
||||
-#include <kgsl_device.h>
|
||||
+#include "kgsl_device.h"
|
||||
|
||||
#include "kgsl_debugfs.h"
|
||||
#include "kgsl_trace.h"
|
||||
diff -ur a/drivers/media/platform/msm/camera_v2/common/cam_smmu_api.c b/drivers/media/platform/msm/camera_v2/common/cam_smmu_api.c
|
||||
--- a/drivers/media/platform/msm/camera_v2/common/cam_smmu_api.c 2020-01-20 16:35:42.958011133 -0800
|
||||
+++ b/drivers/media/platform/msm/camera_v2/common/cam_smmu_api.c 2020-01-20 16:36:48.812884599 -0800
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <linux/sizes.h>
|
||||
#include <soc/qcom/scm.h>
|
||||
#include <soc/qcom/secure_buffer.h>
|
||||
-#include <msm_camera_tz_util.h>
|
||||
+#include "msm_camera_tz_util.h"
|
||||
#include "cam_smmu_api.h"
|
||||
|
||||
#define SCRATCH_ALLOC_START SZ_128K
|
||||
diff -ur a/drivers/media/platform/msm/camera_v2/sensor/msm_sensor.h b/drivers/media/platform/msm/camera_v2/sensor/msm_sensor.h
|
||||
--- a/drivers/media/platform/msm/camera_v2/sensor/msm_sensor.h 2020-01-20 16:35:42.958011133 -0800
|
||||
+++ b/drivers/media/platform/msm/camera_v2/sensor/msm_sensor.h 2020-01-20 16:36:48.824884395 -0800
|
||||
@@ -31,9 +31,10 @@
|
||||
#include <media/msm_cam_sensor.h>
|
||||
#include <media/v4l2-subdev.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
-#include "msm_camera_i2c.h"
|
||||
-#include "msm_camera_dt_util.h"
|
||||
-#include "msm_sd.h"
|
||||
+
|
||||
+#include "io/msm_camera_i2c.h"
|
||||
+#include "io/msm_camera_dt_util.h"
|
||||
+#include "../msm_sd.h"
|
||||
|
||||
#define DEFINE_MSM_MUTEX(mutexname) \
|
||||
static struct mutex mutexname = __MUTEX_INITIALIZER(mutexname)
|
||||
diff -ur a/drivers/platform/msm/mhi/mhi_ssr.c b/drivers/platform/msm/mhi/mhi_ssr.c
|
||||
--- a/drivers/platform/msm/mhi/mhi_ssr.c 2020-01-20 16:35:43.110008525 -0800
|
||||
+++ b/drivers/platform/msm/mhi/mhi_ssr.c 2020-01-20 16:36:48.820884463 -0800
|
||||
@@ -11,8 +11,8 @@
|
||||
*/
|
||||
|
||||
#include <linux/pm_runtime.h>
|
||||
-#include <mhi_sys.h>
|
||||
-#include <mhi.h>
|
||||
+#include "mhi_sys.h"
|
||||
+#include "mhi.h"
|
||||
#include <soc/qcom/subsystem_restart.h>
|
||||
#include <soc/qcom/subsystem_notif.h>
|
||||
#include <linux/esoc_client.h>
|
||||
diff -ur a/include/trace/events/msm_cam.h b/include/trace/events/msm_cam.h
|
||||
--- a/include/trace/events/msm_cam.h 2020-01-20 16:35:43.717998100 -0800
|
||||
+++ b/include/trace/events/msm_cam.h 2020-01-20 16:36:48.824884395 -0800
|
||||
@@ -16,7 +16,7 @@
|
||||
#if !defined(_TRACE_MSM_VFE_H) || defined(TRACE_HEADER_MULTI_READ)
|
||||
#define _TRACE_MSM_VFE_H
|
||||
|
||||
-#include "msm_isp.h"
|
||||
+#include "../../../drivers/media/platform/msm/camera_v2/isp/msm_isp.h"
|
||||
#include <linux/types.h>
|
||||
#include <linux/tracepoint.h>
|
||||
|
||||
diff -ur a/sound/soc/msm/apq8096-auto.c b/sound/soc/msm/apq8096-auto.c
|
||||
--- a/sound/soc/msm/apq8096-auto.c 2020-01-20 16:35:43.829996179 -0800
|
||||
+++ b/sound/soc/msm/apq8096-auto.c 2020-01-20 16:36:48.832884258 -0800
|
||||
@@ -33,7 +33,7 @@
|
||||
#include <sound/q6core.h>
|
||||
#include <sound/pcm_params.h>
|
||||
#include <sound/info.h>
|
||||
-#include <device_event.h>
|
||||
+#include "device_event.h"
|
||||
#include "qdsp6v2/msm-pcm-routing-v2.h"
|
||||
|
||||
|
||||
diff -ur a/sound/soc/msm/msm8996.c b/sound/soc/msm/msm8996.c
|
||||
--- a/sound/soc/msm/msm8996.c 2020-01-20 16:35:43.829996179 -0800
|
||||
+++ b/sound/soc/msm/msm8996.c 2020-01-20 16:36:48.828884327 -0800
|
||||
@@ -31,7 +31,7 @@
|
||||
#include <sound/q6core.h>
|
||||
#include <sound/pcm_params.h>
|
||||
#include <sound/info.h>
|
||||
-#include <device_event.h>
|
||||
+#include "device_event.h"
|
||||
#include "qdsp6v2/msm-pcm-routing-v2.h"
|
||||
#include "../codecs/wcd9xxx-common.h"
|
||||
#include "../codecs/wcd9330.h"
|
||||
|
||||
|
||||
diff --git a/sound/soc/msm/msm8998.c b/sound/soc/msm/msm8998.c
|
||||
index 9159ea64..b99e9d1b 100644
|
||||
--- a/sound/soc/msm/msm8998.c
|
||||
+++ b/sound/soc/msm/msm8998.c
|
||||
@@ -33,7 +33,7 @@
|
||||
#include <sound/q6core.h>
|
||||
#include <sound/pcm_params.h>
|
||||
#include <sound/info.h>
|
||||
-#include <device_event.h>
|
||||
+#include "device_event.h"
|
||||
#include <linux/qdsp6v2/audio_notifier.h>
|
||||
#include "qdsp6v2/msm-pcm-routing-v2.h"
|
||||
#include "../codecs/wcd9335.h"
|
53
device/testing/linux-xiaomi-whyred/fix-trace-includes.patch
Normal file
53
device/testing/linux-xiaomi-whyred/fix-trace-includes.patch
Normal file
|
@ -0,0 +1,53 @@
|
|||
diff --git a/drivers/soc/qcom/tracer_pkt_private.h b/drivers/soc/qcom/tracer_pkt_private.h
|
||||
index fc760e6b..3a2f42d5 100644
|
||||
--- a/drivers/soc/qcom/tracer_pkt_private.h
|
||||
+++ b/drivers/soc/qcom/tracer_pkt_private.h
|
||||
@@ -15,7 +15,7 @@
|
||||
#undef TRACE_SYSTEM
|
||||
#define TRACE_SYSTEM tracer_pkt
|
||||
#undef TRACE_INCLUDE_PATH
|
||||
-#define TRACE_INCLUDE_PATH .
|
||||
+#define TRACE_INCLUDE_PATH ../drivers/soc/qcom
|
||||
#undef TRACE_INCLUDE_FILE
|
||||
#define TRACE_INCLUDE_FILE tracer_pkt_private
|
||||
|
||||
diff --git a/drivers/platform/msm/ipa/ipa_v3/ipa_trace.h b/drivers/platform/msm/ipa/ipa_v3/ipa_trace.h
|
||||
index b67899ba..fa36b3ed 100644
|
||||
--- a/drivers/platform/msm/ipa/ipa_v3/ipa_trace.h
|
||||
+++ b/drivers/platform/msm/ipa/ipa_v3/ipa_trace.h
|
||||
@@ -149,5 +149,5 @@ TRACE_EVENT(
|
||||
|
||||
/* This part must be outside protection */
|
||||
#undef TRACE_INCLUDE_PATH
|
||||
-#define TRACE_INCLUDE_PATH .
|
||||
+#define TRACE_INCLUDE_PATH ../drivers/platform/msm/ipa/ipa_v3
|
||||
#include <trace/define_trace.h>
|
||||
|
||||
|
||||
diff --git a/drivers/gpu/msm/adreno_trace.h b/drivers/gpu/msm/adreno_trace.h
|
||||
index 74c4c4e6..9525a231 100644
|
||||
--- a/drivers/gpu/msm/adreno_trace.h
|
||||
+++ b/drivers/gpu/msm/adreno_trace.h
|
||||
@@ -17,7 +17,7 @@
|
||||
#undef TRACE_SYSTEM
|
||||
#define TRACE_SYSTEM kgsl
|
||||
#undef TRACE_INCLUDE_PATH
|
||||
-#define TRACE_INCLUDE_PATH .
|
||||
+#define TRACE_INCLUDE_PATH ../../drivers/gpu/msm
|
||||
#undef TRACE_INCLUDE_FILE
|
||||
#define TRACE_INCLUDE_FILE adreno_trace
|
||||
|
||||
|
||||
diff --git a/drivers/gpu/msm/kgsl_trace.h b/drivers/gpu/msm/kgsl_trace.h
|
||||
index 6438c6e6..57970c68 100644
|
||||
--- a/drivers/gpu/msm/kgsl_trace.h
|
||||
+++ b/drivers/gpu/msm/kgsl_trace.h
|
||||
@@ -17,7 +17,7 @@
|
||||
#undef TRACE_SYSTEM
|
||||
#define TRACE_SYSTEM kgsl
|
||||
#undef TRACE_INCLUDE_PATH
|
||||
-#define TRACE_INCLUDE_PATH .
|
||||
+#define TRACE_INCLUDE_PATH ../../drivers/gpu/msm
|
||||
#undef TRACE_INCLUDE_FILE
|
||||
#define TRACE_INCLUDE_FILE kgsl_trace
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
diff --git a/drivers/usb/gadget/function/f_qc_rndis.c b/drivers/usb/gadget/function/f_qc_rndis.c
|
||||
index f1b55109..b63b4947 100644
|
||||
--- a/drivers/usb/gadget/function/f_qc_rndis.c
|
||||
+++ b/drivers/usb/gadget/function/f_qc_rndis.c
|
||||
@@ -1561,7 +1561,7 @@ bool rndis_qc_get_skip_ep_config(void)
|
||||
return rndis_ipa_params.skip_ep_cfg;
|
||||
}
|
||||
|
||||
-DECLARE_USB_FUNCTION_INIT(rndis_bam, qcrndis_alloc_inst, qcrndis_alloc);
|
||||
+DECLARE_USB_FUNCTION(rndis_bam, qcrndis_alloc_inst, qcrndis_alloc);
|
||||
|
||||
static int __init usb_qcrndis_init(void)
|
||||
{
|
||||
|
||||
|
||||
diff --git a/drivers/usb/gadget/function/f_qdss.c b/drivers/usb/gadget/function/f_qdss.c
|
||||
index 8536f10a..8924c76b 100644
|
||||
--- a/drivers/usb/gadget/function/f_qdss.c
|
||||
+++ b/drivers/usb/gadget/function/f_qdss.c
|
||||
@@ -1139,7 +1139,7 @@ static struct usb_function *qdss_alloc(struct usb_function_instance *fi)
|
||||
return &usb_qdss->port.function;
|
||||
}
|
||||
|
||||
-DECLARE_USB_FUNCTION_INIT(qdss, qdss_alloc_inst, qdss_alloc);
|
||||
+DECLARE_USB_FUNCTION(qdss, qdss_alloc_inst, qdss_alloc);
|
||||
static int __init usb_qdss_init(void)
|
||||
{
|
||||
int ret;
|
11
device/testing/linux-xiaomi-whyred/fix-vl53l0-includes.patch
Normal file
11
device/testing/linux-xiaomi-whyred/fix-vl53l0-includes.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
diff --git a/drivers/input/misc/vl53L0/Makefile b/drivers/input/misc/vl53L0/Makefile
|
||||
index f105e1c3..d207f030 100644
|
||||
--- a/drivers/input/misc/vl53L0/Makefile
|
||||
+++ b/drivers/input/misc/vl53L0/Makefile
|
||||
@@ -16,5 +16,6 @@ ccflags-y += -Idrivers/media/platform/msm/camera_v2/sensor/io
|
||||
ccflags-y += -Idrivers/media/platform/msm/camera_v2
|
||||
ccflags-y += -Idrivers/media/platform/msm/camera_v2/common
|
||||
ccflags-y += -Idrivers/media/platform/msm/camera_v2/sensor/cci
|
||||
+ccflags-y += -Idrivers/input/misc/vl53L0
|
||||
obj-$(CONFIG_INPUT_STMVL53L0) += stmvl53l0.o
|
||||
stmvl53l0-objs := stmvl53l0_module.o stmvl53l0_module-i2c.o stmvl53l0_module-cci.o src/vl53l0_api_calibration.o src/vl53l0_api_core.o src/vl53l0_api_histogram.o src/vl53l0_api_ranging.o src/vl53l0_api_strings.o src/vl53l0_api.o src/vl53l0_platform.o src/vl53l0_i2c_platform.o src/vl53l0_port_i2c.o src/vl53l010_api.o src/vl53l010_tuning.o
|
|
@ -0,0 +1 @@
|
|||
../../.shared-patches/linux/gcc7-give-up-on-ilog2-const-optimizations.patch
|
1
device/testing/linux-xiaomi-whyred/gcc8-fix-put-user.patch
Symbolic link
1
device/testing/linux-xiaomi-whyred/gcc8-fix-put-user.patch
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../.shared-patches/linux/gcc8-fix-put-user.patch
|
|
@ -0,0 +1 @@
|
|||
../../.shared-patches/linux/kernel-use-the-gnu89-standard-explicitly.patch
|
Loading…
Reference in New Issue
Block a user