RK3576 Android14 kernel6.1 EC20-4G模块
完整补丁
通过网盘分享的文件:RK3576-Android14-成功补丁
链接: https://pan.baidu.com/s/14uaspht6Yp2PaCiJreG7kg
提取码: 1234
下方的文字版补丁 不会显示出新增文件的内容 ,具体新增的文件请参考完整补丁。
device_rockchip_common.patch
diff --git a/BoardConfig.mk b/BoardConfig.mk
index 1eb5def1..5cce6170 100644
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -46,7 +46,7 @@ TARGET_BOARD_PLATFORM_PRODUCT ?= tablet
endif
endif
-TARGET_ARCH ?= arm
+TARGET_ARCH ?= arm64
TARGET_ARCH_VARIANT ?= armv7-a-neon
ARCH_ARM_HAVE_TLS_REGISTER ?= true
TARGET_CPU_ABI ?= armeabi-v7a
@@ -62,7 +62,7 @@ BOARD_BOOT_HEADER_VERSION ?= 2
BOARD_MKBOOTIMG_ARGS :=
BOARD_PREBUILT_DTBOIMAGE ?= $(TARGET_DEVICE_DIR)/dtbo.img
BOARD_ROCKCHIP_VIRTUAL_AB_ENABLE ?= false
-BOARD_SELINUX_ENFORCING ?= true
+BOARD_SELINUX_ENFORCING ?= false
PRODUCT_KERNEL_ARCH ?= arm
BOARD_ROCKCHIP_PKVM ?= false
@@ -114,6 +114,8 @@ else
DEVICE_MATRIX_FILE ?= device/rockchip/common/manifests/compatibility_matrix.xml
endif
+
+
# GPU configration
TARGET_BOARD_PLATFORM_GPU ?= mali-t760
GRAPHIC_MEMORY_PROVIDER ?= ump
@@ -168,6 +170,9 @@ TARGET_BOOTLOADER_BOARD_NAME ?= rk30sdk
TARGET_NO_BOOTLOADER ?= true
ifeq ($(filter atv box car, $(strip $(TARGET_BOARD_PLATFORM_PRODUCT))), )
DEVICE_PACKAGE_OVERLAYS += device/rockchip/common/overlay
+ifneq ($(BOARD_HAS_RK_4G_MODEM), true)
+DEVICE_PACKAGE_OVERLAYS += device/rockchip/common/overlay_wifi_only
+endif
endif
TARGET_RELEASETOOLS_EXTENSIONS := device/rockchip/common
@@ -323,8 +328,8 @@ BOARD_FORCE_UDISK_VISIBLE ?= true
BOARD_DISABLE_SAFE_MODE ?= true
#enable 3g dongle
-BOARD_HAVE_DONGLE ?= false
-
+BOARD_HAVE_DONGLE ?= true
+BOARD_HAS_RK_4G_MODEM ?= true
#for boot and shutdown animation ringing
BOOT_SHUTDOWN_ANIMATION_RINGING ?= false
@@ -353,6 +358,65 @@ BOARD_BLUETOOTH_SUPPORT ?= true
BOARD_BLUETOOTH_LE_SUPPORT ?= true
BOARD_WIFI_SUPPORT ?= true
+PRODUCT_PACKAGES += \
+ CarrierDefaultApp \
+ CarrierConfig \
+ TelephonyProvider \
+ TeleService \
+ Telecom \
+ rild \
+ libquec-EC20-ril \
+ dhcpcd
+
+PRODUCT_COPY_FILES += vendor/rockchip/common/phone/etc/apns-full-conf.xml:system/etc/apns-conf.xml
+
+ifeq ($(strip $(BOARD_HAS_RK_4G_MODEM)),true)
+DEVICE_MANIFEST_FILE += device/rockchip/common/4g_modem/manifest.xml
+endif
+
+PRODUCT_PACKAGES += \
+ android.hardware.secure_element@1.0 \
+ android.hardware.secure_element@1.1 \
+ android.hardware.secure_element@1.2 \
+ android.hardware.secure_element@1.0.vendor \
+ android.hardware.secure_element@1.1.vendor \
+ android.hardware.secure_element@1.2.vendor
+
+PRODUCT_PACKAGES += \
+ android.hardware.radio@1.5-radio-service \
+ android.hardware.radio.config@1.2-service \
+ android.hardware.radio.config@1.0-service \
+ android.hardware.radio.config@1.0.vendor \
+ android.hardware.radio.config@1.2.vendor \
+ android.hardware.radio@1.5.vendor \
+ libhwbinder.vendor
+
+#PRODUCT_PACKAGES += \
+ android.hardware.radio@1.2-radio-service \
+ android.hardware.radio.config@1.0-service
+
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.boot.noril=false \
+ ro.telephony.default_network=9
+
+
+# ifeq ($(strip $(TARGET_ARCH)), arm64)
+PRODUCT_PROPERTY_OVERRIDES += \
+ vendor.rild.libpath=/vendor/lib64/libquec-EC20-ril.so
+
+PRODUCT_COPY_FILES += \
+ device/rockchip/common/4g_modem/bin64/dhcpcd:vendor/bin/dhcpcd \
+ device/rockchip/common/4g_modem/quec/ip-down:system/etc/ppp/ip-down \
+ device/rockchip/common/4g_modem/quec/ip-up:system/etc/ppp/ip-up \
+ device/rockchip/common/4g_modem/quec/chat:system/bin/chat \
+ device/rockchip/common/4g_modem/quec/apns-full-conf.xml:system/etc/apns-conf.xml \
+ device/rockchip/common/4g_modem/quec/libquec-EC20-ril.so:vendor/lib64/libquec-EC20-ril.so \
+ device/rockchip/common/4g_modem/quec/libril.so:vendor/lib64/libril.so \
+ device/rockchip/common/4g_modem/quec/ql-ril.conf:vendor/etc/ql-ril.conf \
+ device/rockchip/common/4g_modem/quec/ql-ril.conf:system/etc/ql-ril.conf \
+ device/rockchip/common/4g_modem/quec/gps_cfg.inf:vendor/etc/gps_cfg.inf
+
+
#for rk DLNA
PRODUCT_HAVE_DLNA ?= false
diff --git a/init.connectivity.rc b/init.connectivity.rc
index 22929957..26a069cd 100755
--- a/init.connectivity.rc
+++ b/init.connectivity.rc
@@ -20,6 +20,7 @@ on zygote-start
chmod 0660 /dev/ttyS0
chmod 0660 /dev/ttyS1
chmod 0660 /dev/ttyS4
+ chmod 0660 /dev/ttyS6
chmod 0660 /dev/ttyS7
chmod 0660 /dev/ttyS8
chmod 0660 /dev/ttyS9
@@ -30,6 +31,7 @@ on zygote-start
chown bluetooth system /dev/ttyS0
chown bluetooth system /dev/ttyS1
chown bluetooth system /dev/ttyS4
+ chown bluetooth system /dev/ttyS6
chown bluetooth system /dev/ttyS7
chown bluetooth system /dev/ttyS8
chown bluetooth system /dev/ttyS9
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
index 32d04cea..71f04e42 100644
--- a/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -20,16 +20,16 @@
<resources>
<!-- This device is not "voice capable"; it's data-only. -->
- <bool name="config_voice_capable">false</bool>
+ <bool name="config_voice_capable">true</bool>
<!-- This device does not allow sms service. -->
- <bool name="config_sms_capable">false</bool>
+ <bool name="config_sms_capable">true</bool>
<!-- Flag indicating whether the current device allows data.
If true, this means that the device supports data connectivity through
the telephony network.
This can be overridden to false for devices that support voice and/or sms . -->
- <bool name="config_mobile_data_capable">false</bool>
+ <bool name="config_mobile_data_capable">true</bool>
<!-- If this is true, the screen will come on when you unplug usb/power/whatever. -->
<bool name="config_unplugTurnsOnScreen">true</bool>
diff --git a/rootdir/ueventd.rockchip.rc b/rootdir/ueventd.rockchip.rc
index 0d5edd80..9a46019c 100644
--- a/rootdir/ueventd.rockchip.rc
+++ b/rootdir/ueventd.rockchip.rc
@@ -51,6 +51,12 @@ import /vendor/etc/ueventd.car.rc
/dev/accelirq 0660 system system
/dev/compassirq 0660 system system
+/dev/ttyACM* 0666 radio radio
+/dev/cdc-wdm* 0666 radio radio
+/dev/qcqmi* 0660 radio radio
+/dev/cdc-acm* 0660 radio radio
+/dev/ttyUSB* 0666 radio radio
+
# for GPS
#/dev/ttyS3 0600 gps gps
/dev/gps 0660 gps gps
device_rockchip_rk3576.patch
diff --git a/device.mk b/device.mk
index 7fbe1f2..55c18e0 100755
--- a/device.mk
+++ b/device.mk
@@ -74,6 +74,9 @@ PRODUCT_PROPERTY_OVERRIDES += \
ro.ril.ecclist=112,911 \
ro.opengles.version=196610 \
wifi.interface=wlan0 \
+ ro.telephony.default_network=9 \
+ rild.libpath=/vendor/lib64/libquec-EC20-ril.so \
+ rild.libargs=-d /dev/ttyUSB2 \
ro.audio.monitorOrientation=true \
debug.nfc.fw_download=false \
debug.nfc.se=false \
diff --git a/init.gki.rc b/init.gki.rc
index fac9efd..90a8c5d 100755
--- a/init.gki.rc
+++ b/init.gki.rc
@@ -1,7 +1,7 @@
on init
- write /sys/devices/platform/23000000.usb/power/control auto
- write /sys/devices/platform/23000000.usb/power/autosuspend_delay_ms 1000
- write /sys/devices/platform/23400000.usb/power/control auto
- write /sys/devices/platform/23400000.usb/power/autosuspend_delay_ms 1000
+ write /sys/devices/platform/23000000.usb/power/control on
+ write /sys/devices/platform/23000000.usb/power/autosuspend_delay_ms -1
+ write /sys/devices/platform/23400000.usb/power/control on
+ write /sys/devices/platform/23400000.usb/power/autosuspend_delay_ms -1
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
index 58a7e08..493c3c6 100755
--- a/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -32,6 +32,16 @@
<string-array translatable="false" name="networkAttributes">
<item>"wifi,1,1,2,-1,true"</item>
<item>"bluetooth,7,7,0,-1,true"</item>
+ <!--support for 4G Mobile Network, wucaicheng,1378913492@qq.com,20230817 start-->
+ <item>"mobile,0,0,0,-1,true"</item>
+ <item>"mobile_mms,2,0,2,60000,false"</item>
+ <item>"mobile_supl,3,0,2,60000,true"</item>
+ <item>"mobile_dun,4,0,2,60000,true"</item>
+ <item>"mobile_hipri,5,0,3,60000,true"</item>
+ <item>"mobile_fota,10,0,2,60000,true"</item>
+ <item>"mobile_ims,11,0,2,60000,true"</item>
+ <item>"mobile_cbs,12,0,2,60000,true"</item>
+ <!--support for 4G Mobile Network, wucaicheng,1378913492@qq.com,20230817 end-->
<item>"ethernet,9,9,9,-1,true"</item>
</string-array>
@@ -62,6 +72,8 @@
1: 2 button mode (back, home buttons + swipe up for overview)
2: gestures only for back, home and overview -->
<integer name="config_navBarInteractionMode">0</integer>
- <bool name="config_swipe_up_gesture_setting_available">true</bool>
+ <bool name="config_swipe_up_gesture_setting_available">true</bool>
+ <bool name="config_hotswapCapable">true</bool>
+ <bool name="config_mobile_data_capable">true</bool>
</resources>
external_usb_modeswitch.patch
diff --git a/usb_dongle/G3Dev.cpp b/usb_dongle/G3Dev.cpp
index 55d928d..2e3a5ff 100644
--- a/usb_dongle/G3Dev.cpp
+++ b/usb_dongle/G3Dev.cpp
@@ -76,10 +76,10 @@ int G3Dev::handleUsbEvent(NetlinkEvent *evt) {
char configure_file[2048];
- sprintf(configure_file, "/vendor/etc/usb_modeswitch.d/%04x_%04x", vid, pid);
+ (void)sprintf(configure_file, "/vendor/etc/usb_modeswitch.d/%04x_%04x", vid, pid);
if( access(configure_file, 0) == 0 )
{
- sprintf(modeswitch_cmd, "/vendor/bin/usb_modeswitch -W -v %04x -p %04x -c %s &", vid, pid,configure_file);
+ (void)sprintf(modeswitch_cmd, "/vendor/bin/usb_modeswitch -W -v %04x -p %04x -c %s &", vid, pid,configure_file);
SLOGD("=== USB Switch: %s", modeswitch_cmd);
system(modeswitch_cmd);
}
@@ -90,8 +90,8 @@ int G3Dev::handleUsbEvent(NetlinkEvent *evt) {
}
int G3Dev::handleScsiEvent(NetlinkEvent *evt) {
/*
- 有一定概率在usb_device 这个event中执行的usb_modeswitch没有成功,作为补足
- 手段,在SCSI这个event中再次执行usb_modeswitch
+ 锟斤拷一锟斤拷锟斤拷锟斤拷锟斤拷usb_device 锟斤拷锟絜vent锟斤拷执锟叫碉拷usb_modeswitch没锟叫成癸拷锟斤拷锟斤拷为锟斤拷锟斤拷
+ 锟街段o拷锟斤拷SCSI锟斤拷锟絜vent锟斤拷锟劫达拷执锟斤拷usb_modeswitch
*/
if(evt->getAction()==NetlinkEvent::Action::kAdd && modeswitch_cmd[0] != 0)
{
@@ -109,11 +109,11 @@ int G3Dev::handleUsb(){
int pid,vid;
this->get_tty_id(&vid,& pid);
- sprintf(configure_file, "/vendor/etc/usb_modeswitch.d/%04x_%04x", vid,pid);
+ (void)sprintf(configure_file, "/vendor/etc/usb_modeswitch.d/%04x_%04x", vid,pid);
SLOGD("=== config_file is: %04x_%04x", vid ,pid);
if( access(configure_file, 0) == 0 )
{
- sprintf(modeswitch_cmd, "/vendor/bin/usb_modeswitch -W -v %04x -p %04x -c %s &", vid, pid,configure_file);
+ (void)sprintf(modeswitch_cmd, "/vendor/bin/usb_modeswitch -W -v %04x -p %04x -c %s &", vid, pid,configure_file);
SLOGD("=== USB Switch: %s", modeswitch_cmd);
system(modeswitch_cmd);
@@ -139,10 +139,10 @@ int G3Dev:: get_tty_id(int *vid, int* pid)
return -2;
if(fread(buf, 1, 4, fp) != 4)
{
- fclose(fp);
+ (void)fclose(fp);
return -2;
}
- fclose(fp);
+ (void)fclose(fp);
*vid = atox(buf, 16);
char vidpath[PATH_MAX]="/sys/bus/usb/devices/1-1";
//sys/bus/usb/devices/1-1
@@ -153,10 +153,10 @@ int G3Dev:: get_tty_id(int *vid, int* pid)
return -3;
if(fread(buf, 1, 4, fp) != 4)
{
- fclose(fp);
+ (void)fclose(fp);
return -3;
}
- fclose(fp);
+ (void)fclose(fp);
*pid =atox(buf, 16);
return 0;
hardware_interfaces.patch
diff --git a/compatibility_matrices/compatibility_matrix.7.xml b/compatibility_matrices/compatibility_matrix.7.xml
index bc5a5c41d..752ef88d3 100644
--- a/compatibility_matrices/compatibility_matrix.7.xml
+++ b/compatibility_matrices/compatibility_matrix.7.xml
@@ -508,9 +508,17 @@
<instance>default</instance>
</interface>
</hal>
- <hal format="aidl" optional="true">
+ <hal format="hidl" optional="true">
<name>android.hardware.radio.config</name>
- <version>1</version>
+ <!--
+ Note: Devices launching with target-level 4, if implementing the
+ radio config HAL, must provide an implementation of 1.1 IRadioConfig
+ that can handle version 1.2 of IRadioConfigResponse and
+ IRadioConfigIndication.
+ -->
+ <version>1.0</version>
+ <version>1.1</version>
+ <version>1.2</version>
<interface>
<name>IRadioConfig</name>
<instance>default</instance>
@@ -565,6 +573,28 @@
<instance>slot2</instance>
<instance>slot3</instance>
</interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.radio</name>
+ <version>1.1</version>
+ <version>1.2</version>
+ <version>1.3</version>
+ <version>1.4</version>
+ <version>1.5</version>
+ <interface>
+ <name>IRadio</name>
+ <instance>slot1</instance>
+ <instance>slot2</instance>
+ <instance>slot3</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.radio.deprecated</name>
+ <version>1.0</version>
+ <interface>
+ <name>IOemHook</name>
+ <instance>slot1</instance>
+ </interface>
</hal>
<hal format="aidl" optional="true">
<name>android.hardware.radio.voice</name>
diff --git a/compatibility_matrices/compatibility_matrix.8.xml b/compatibility_matrices/compatibility_matrix.8.xml
index 27876a394..51835338a 100644
--- a/compatibility_matrices/compatibility_matrix.8.xml
+++ b/compatibility_matrices/compatibility_matrix.8.xml
@@ -416,6 +416,56 @@
<instance>default</instance>
</interface>
</hal>
+
+ <hal format="hidl" optional="true">
+ <name>android.hardware.radio</name>
+ <version>1.1</version>
+ <version>1.2</version>
+ <version>1.3</version>
+ <version>1.4</version>
+ <version>1.5</version>
+ <version>1.6</version>
+ <interface>
+ <name>IRadio</name>
+ <instance>slot1</instance>
+ <instance>slot2</instance>
+ <instance>slot3</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.radio</name>
+ <version>1.2</version>
+ <interface>
+ <name>ISap</name>
+ <instance>slot1</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.radio.deprecated</name>
+ <version>1.0</version>
+ <interface>
+ <name>IOemHook</name>
+ <instance>slot1</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.radio.config</name>
+ <version>1.0</version>
+ <version>1.1</version>
+ <interface>
+ <name>IRadioConfig</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.radio.config</name>
+ <version>1.3</version>
+ <interface>
+ <name>IRadioConfig</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+
<hal format="aidl" optional="true">
<name>android.hardware.radio.config</name>
<version>2</version>
hardware_ril.patch
diff --git a/rild/rild.c b/rild/rild.c
index 781db78..9cd5e32 100644
--- a/rild/rild.c
+++ b/rild/rild.c
@@ -84,6 +84,70 @@ static struct RIL_Env s_rilEnv = {
extern void RIL_startEventLoop();
+typedef struct{
+ char *PidVid;
+ char *ttyPort;
+ char *libPath;
+ }rild_t;
+
+ rild_t rild_list[]={
+ {"2c7c:0125","-d /dev/ttyUSB2","/vendor/lib64/libquec-EC20-ril.so"},/* Quectel EC20 R2.0/EC20 R2.1/EC25/EG25-G/EM05 */
+ {"2c7c:0121","-d /dev/ttyUSB3","/vendor/lib64/libreference-ril-EC21.so"},/* Quectel EC21/EG21-G */
+ {"2c7c:0191","-d /dev/ttyUSB3","/vendor/lib64/libreference-ril-EG91.so"},/* Quectel EG91 */
+ {"2c7c:0195","-d /dev/ttyUSB3","/vendor/lib64/libreference-ril-EG95.so"},/* Quectel EG95 */
+ {"2c7c:0306","-d /dev/ttyUSB3","/vendor/lib64/libreference-ril-EG06.so"},/* Quectel EG06/EP06/EM06 */
+ {"2c7c:0512","-d /dev/ttyUSB3","/vendor/lib64/libreference-ril-EG12.so"},/* Quectel EG12/EM12/EG18 */
+ {"2c7c:0296","-d /dev/ttyUSB3","/vendor/lib64/libreference-ril-BG96.so"},/* Quectel BG96 */
+ {"2c7c:0700","-d /dev/ttyUSB3","/vendor/lib64/libreference-ril-BG95.so"},/* Quectel BG95/BG77/BG600L-M3/BC69 */
+ {"2c7c:0435","-d /dev/ttyUSB3","/vendor/lib64/libreference-ril-AG35.so"},/* Quectel AG35 */
+ {"2c7c:0415","-d /dev/ttyUSB3","/vendor/lib64/libreference-ril-AG15.so"},/* Quectel AG15 */
+ {"2c7c:0452","-d /dev/ttyUSB3","/vendor/lib64/libreference-ril-AG520R.so"},/* Quectel AG520R */
+ {"2c7c:0455","-d /dev/ttyUSB3","/vendor/lib64/libreference-ril-AG550R.so"},/* Quectel AG550R */
+ {"2c7c:0620","-d /dev/ttyUSB3","/vendor/lib64/libreference-ril-EC20.so"},/* Quectel EG20 */
+ {"2c7c:0800","-d /dev/ttyUSB3","/vendor/lib64/libreference-ril-RG500Q.so"},/* Quectel RG500Q/RM500Q/RG510Q/RM510Q */
+ {"2c7c:6026","-d /dev/ttyUSB3","/vendor/lib64/libreference-ril-EC200T.so"},/* Quectel EC200T*/
+
+ {"05c6:9025","-d /dev/ttyUSB1","/system/lib64/libreference-ril-CLM920.so"},/*YUGA CLM920*/
+
+ {NULL,NULL,NULL}
+
+ };
+ int get_usb_pid_vid(char **pPort,char **pPath){
+
+ int count = 30;
+ FILE *fp = NULL;
+ char data[100] = {'0'};
+
+ ALOGE("GWDBG get_usb_pid_vid start\n");
+ while(count--){
+ fp = popen("lsusb", "r");
+ if (fp == NULL){
+ ALOGE("GWDEB popen error!\n");
+ }
+ while (fgets(data, sizeof(data), fp) != NULL){
+
+ for(int i=0;rild_list[i].PidVid != NULL; i++){
+ //ALOGE("%s %s\n",data,rild_list[i].PidVid);
+ if(strstr(data,rild_list[i].PidVid)) {
+ ALOGE("%s\n%s\n%s\n",rild_list[i].PidVid,rild_list[i].ttyPort,rild_list[i].libPath);
+ *pPort = rild_list[i].ttyPort;
+ *pPath = rild_list[i].libPath;
+ pclose(fp);
+ ALOGE("GWDBG get_usb_pid_vid end ");
+ return 0;
+ }
+ }
+ }
+ ALOGE("GWDBG get_usb_pid_vid again\n");
+ pclose(fp);
+ sleep(1);
+ }
+ ALOGE("GWDBG get_usb_pid_vid end\n\n");
+ return -1;
+ }
+ /*multi 4G/5Gmodule, wucaicheng,1378913492@qq.com,20230817 end*/
+
+
static int make_argv(char * args, char ** argv) {
// Note: reserve argv[0]
int count = 1;
@@ -99,9 +163,11 @@ static int make_argv(char * args, char ** argv) {
}
int main(int argc, char **argv) {
- // vendor ril lib path either passed in as -l parameter, or read from rild.libpath property
- const char *rilLibPath = NULL;
- // ril arguments either passed in as -- parameter, or read from rild.libargs property
+ // // vendor ril lib path either passed in as -l parameter, or read from rild.libpath property
+ // const char *rilLibPath = NULL;
+ // // ril arguments either passed in as -- parameter, or read from rild.libargs property
+ char * rilLibPath = NULL;
+ char * rilLibProt = NULL;
char **rilArgv;
// handle for vendor ril lib
void *dlHandle;
@@ -162,11 +228,13 @@ int main(int argc, char **argv) {
rilLibPath = libPath;
}
}
-
+ get_usb_pid_vid(&rilLibProt,&rilLibPath);
+
+ ALOGE("rilLibProt:%s rilLibPath:%s\n",rilLibProt,rilLibPath);
dlHandle = dlopen(rilLibPath, RTLD_NOW);
if (dlHandle == NULL) {
- RLOGE("dlopen failed: %s", dlerror());
+ ALOGE("dlopen failed: %s", dlerror());
exit(EXIT_FAILURE);
}
@@ -200,34 +268,38 @@ int main(int argc, char **argv) {
static char args[PROPERTY_VALUE_MAX];
rilArgv = newArgv;
property_get(LIB_ARGS_PROPERTY, args, "");
+
+ ALOGE("GWDBG LIB_ARGS_PROPERTY args:%s rilLibProt:%s\n\n",args,rilLibProt);
+ strcpy(args,rilLibProt);
argc = make_argv(args, rilArgv);
}
-
+ ALOGE("GWDBG rilArgv argc:%d rilArgv:%s %s\n\n",argc,(char*)rilArgv,rilLibPath);
+ ALOGE("GWDBG rilLibProt:%s rilLibPath:%s\n",rilLibProt,rilLibPath);
rilArgv[argc++] = "-c";
rilArgv[argc++] = (char*)clientId;
- RLOGD("RIL_Init argc = %d clientId = %s", argc, rilArgv[argc-1]);
+ ALOGE("RIL_Init argc = %d clientId = %s", argc, rilArgv[argc-1]);
// Make sure there's a reasonable argv[0]
rilArgv[0] = argv[0];
funcs = rilInit(&s_rilEnv, argc, rilArgv);
- RLOGD("RIL_Init rilInit completed");
+ ALOGE("RIL_Init rilInit completed");
RIL_register(funcs);
- RLOGD("RIL_Init RIL_register completed");
+ ALOGE("RIL_Init RIL_register completed");
if (rilUimInit) {
- RLOGD("RIL_register_socket started");
+ ALOGE("RIL_register_socket started");
RIL_register_socket(rilUimInit, RIL_SAP_SOCKET, argc, rilArgv);
}
- RLOGD("RIL_register_socket completed");
+ ALOGE("RIL_register_socket completed");
rilc_thread_pool();
done:
- RLOGD("RIL_Init starting sleep loop");
+ALOGE("RIL_Init starting sleep loop");
while (true) {
sleep(UINT32_MAX);
}
diff --git a/rild/rild.rc b/rild/rild.rc
index f6beb54..5bf518e 100644
--- a/rild/rild.rc
+++ b/rild/rild.rc
@@ -1,4 +1,4 @@
-service vendor.ril-daemon /vendor/bin/hw/rild
+service ril-daemon /vendor/bin/hw/rild -l /vendor/lib64/libquec-EC20-ril.so
class main
user radio
group radio cache inet misc audio log readproc wakelock
kernel-6.1.patch
diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
index 3f7f2b1cfc81..c9a11e64062d 100644
--- a/arch/arm64/boot/dts/rockchip/Makefile
+++ b/arch/arm64/boot/dts/rockchip/Makefile
@@ -349,3 +349,4 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-evb8-lp4x-v10.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-tablet-rk806-single-v10.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-tablet-v10.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-tablet-v11.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += tspi-3m-rk3576.dtb
\ No newline at end of file
diff --git a/arch/arm64/configs/rockchip_defconfig b/arch/arm64/configs/rockchip_defconfig
index 6f88a769967f..13202683b3b9 100644
--- a/arch/arm64/configs/rockchip_defconfig
+++ b/arch/arm64/configs/rockchip_defconfig
@@ -1069,3 +1069,11 @@ CONFIG_SCHEDSTATS=y
CONFIG_BUG_ON_DATA_CORRUPTION=y
CONFIG_ENABLE_DEFAULT_TRACERS=y
# CONFIG_RUNTIME_TESTING_MENU is not set
+CONFIG_LTE=y
+CONFIG_LTE_RM310=y
+CONFIG_USB_SERIAL_WWAN=y
+CONFIG_PPPOLAC=y
+CONFIG_PPPOPNS=y
+CONFIG_SLIP=y
+CONFIG_SLHC=y
+CONFIG_USB_NET_CDCETHER=y
\ No newline at end of file
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 9e63b8c43f3e..9f89913b2d11 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -596,6 +596,7 @@ config USB4_NET
called thunderbolt-net.
source "drivers/net/hyperv/Kconfig"
+source "drivers/net/lte/Kconfig"
config NETDEVSIM
tristate "Simulated networking device"
diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index c2f4d4bbf65a..ddf4e6bbaa1c 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -91,3 +91,4 @@ thunderbolt-net-y += thunderbolt.o
obj-$(CONFIG_USB4_NET) += thunderbolt-net.o
obj-$(CONFIG_NETDEVSIM) += netdevsim/
obj-$(CONFIG_NET_FAILOVER) += net_failover.o
+obj-$(CONFIG_LTE) += lte/
diff --git a/drivers/net/usb/Makefile b/drivers/net/usb/Makefile
index 4964f7b326fb..92bd6180ae1f 100644
--- a/drivers/net/usb/Makefile
+++ b/drivers/net/usb/Makefile
@@ -37,6 +37,7 @@ obj-$(CONFIG_USB_NET_CX82310_ETH) += cx82310_eth.o
obj-$(CONFIG_USB_NET_CDC_NCM) += cdc_ncm.o
obj-$(CONFIG_USB_NET_HUAWEI_CDC_NCM) += huawei_cdc_ncm.o
obj-$(CONFIG_USB_VL600) += lg-vl600.o
+obj-$(CONFIG_USB_NET_QMI_WWAN) += qmi_wwan_q.o
obj-$(CONFIG_USB_NET_QMI_WWAN) += qmi_wwan.o
obj-$(CONFIG_USB_NET_CDC_MBIM) += cdc_mbim.o
obj-$(CONFIG_USB_NET_CH9200) += ch9200.o
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index b5ee8518fcc7..5dfd7c06a17d 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -1156,6 +1156,23 @@ static const struct usb_device_id option_ids[] = {
{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x0023)}, /* ONYX 3G device */
{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9000), /* SIMCom SIM5218 */
.driver_info = NCTRL(0) | NCTRL(1) | NCTRL(2) | NCTRL(3) | RSVD(4) },
+ //EC20, wucaicheng,1378913492@qq.com,20230817
+ #if 1 //Added by Quectel
+ { USB_DEVICE(0x2C7C, 0x0125) }, /* Quectel EC20 R2.0/EC20 R2.1/EC25/EG25-G/EM05 */
+ { USB_DEVICE(0x2C7C, 0x0121) }, /* Quectel EC21/EG21-G */
+ { USB_DEVICE(0x2C7C, 0x0191) }, /* Quectel EG91 */
+ { USB_DEVICE(0x2C7C, 0x0195) }, /* Quectel EG95 */
+ { USB_DEVICE(0x2C7C, 0x0306) }, /* Quectel EG06/EP06/EM06 */
+ { USB_DEVICE(0x2C7C, 0x0512) }, /* Quectel EG12/EM12/EG18 */
+ { USB_DEVICE(0x2C7C, 0x0296) }, /* Quectel BG96 */
+ { USB_DEVICE(0x2C7C, 0x0700) }, /* Quectel BG95/BG77/BG600L-M3/BC69 */
+ { USB_DEVICE(0x2C7C, 0x0435) }, /* Quectel AG35 */
+ { USB_DEVICE(0x2C7C, 0x0415) }, /* Quectel AG15 */
+ { USB_DEVICE(0x2C7C, 0x0452) }, /* Quectel AG520R */
+ { USB_DEVICE(0x2C7C, 0x0455) }, /* Quectel AG550R */
+ { USB_DEVICE(0x2C7C, 0x0620) }, /* Quectel EG20 */
+ { USB_DEVICE(0x2C7C, 0x0800) }, /* Quectel RG500Q/RM500Q/RG510Q/RM510Q */
+ #endif
/* Quectel products using Qualcomm vendor ID */
{ USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC15)},
{ USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC20),
@@ -2361,6 +2378,9 @@ static struct usb_serial_driver option_1port_device = {
#ifdef CONFIG_PM
.suspend = usb_wwan_suspend,
.resume = usb_wwan_resume,
+ #if 1 //Added by Quectel
+ .reset_resume = usb_wwan_resume,
+ #endif
#endif
};
diff --git a/drivers/usb/serial/usb_wwan.c b/drivers/usb/serial/usb_wwan.c
index 0017f6e969e1..70a5a66f09a5 100644
--- a/drivers/usb/serial/usb_wwan.c
+++ b/drivers/usb/serial/usb_wwan.c
@@ -424,7 +424,7 @@ static struct urb *usb_wwan_setup_urb(struct usb_serial_port *port,
struct usb_serial *serial = port->serial;
struct usb_wwan_intf_private *intfdata = usb_get_serial_data(serial);
struct urb *urb;
-
+ struct usb_device_descriptor *desc = &serial->dev->descriptor;
urb = usb_alloc_urb(0, GFP_KERNEL); /* No ISO */
if (!urb)
return NULL;
@@ -435,6 +435,14 @@ static struct urb *usb_wwan_setup_urb(struct usb_serial_port *port,
if (intfdata->use_zlp && dir == USB_DIR_OUT)
urb->transfer_flags |= URB_ZERO_PACKET;
+ //EC20, wucaicheng,1378913492@qq.com,20230817
+ #if 1 //Added by Quectel for zero packet
+ if (dir == USB_DIR_OUT) {
+ desc = &serial->dev->descriptor;
+ if (desc->idVendor == cpu_to_le16(0x2C7C))
+ urb->transfer_flags |= URB_ZERO_PACKET;
+ }
+ #endif
return urb;
}
diff --git a/kernel/configs/pcie_wifi.config b/kernel/configs/pcie_wifi.config
deleted file mode 100644
index 276885614456..000000000000
--- a/kernel/configs/pcie_wifi.config
+++ /dev/null
@@ -1,2 +0,0 @@
-# CONFIG_BCMDHD_SDIO is not set
-CONFIG_BCMDHD_PCIE=y
diff --git a/logo.bmp b/logo.bmp
index 750a0bb18043..6eadb944eab6 100644
Binary files a/logo.bmp and b/logo.bmp differ
diff --git a/logo_kernel.bmp b/logo_kernel.bmp
index 1afef1ed156e..35ec76e69a45 100644
Binary files a/logo_kernel.bmp and b/logo_kernel.bmp differ
system_core.patch
diff --git a/init/devices.cpp b/init/devices.cpp
index d29ffd604..73b36582b 100644
--- a/init/devices.cpp
+++ b/init/devices.cpp
@@ -563,6 +563,8 @@ void DeviceHandler::HandleUevent(const Uevent& uevent) {
int device_id = uevent.minor % 128 + 1;
devpath = StringPrintf("/dev/bus/usb/%03d/%03d", bus_id, device_id);
}
+ } else if (uevent.subsystem == "usbmisc" && !uevent.device_name.empty()) {
+ devpath = "/dev/" + uevent.device_name;
} else if (StartsWith(uevent.subsystem, "usb")) {
// ignore other USB events
return;
system_libvintf.patch
diff --git a/check_vintf.cpp b/check_vintf.cpp
index 4bb5d82..9e22cfb 100644
--- a/check_vintf.cpp
+++ b/check_vintf.cpp
@@ -434,10 +434,10 @@ void AddResult(std::optional<android::base::Error<>>* retError,
SetErrorCode(retError, other.error().code()) << other.error() << additionalMessage;
}
-static constexpr const char* gCheckMissingHalsSuggestion{
- "\n- If this is a new package, add it to the latest framework compatibility matrix."
- "\n- If no interface should be added to the framework compatibility matrix (e.g. "
- "types-only package), add it to the exempt list in libvintf_fcm_exclude."};
+// static constexpr const char* gCheckMissingHalsSuggestion{
+// "\n- If this is a new package, add it to the latest framework compatibility matrix."
+// "\n- If no interface should be added to the framework compatibility matrix (e.g. "
+// "types-only package), add it to the exempt list in libvintf_fcm_exclude."};
android::base::Result<void> checkAllFiles(const Dirmap& dirmap, const Properties& props,
std::shared_ptr<StaticRuntimeInfo> runtimeInfo) {
@@ -533,6 +533,7 @@ int checkOne(const Dirmap& dirmap, const Properties& props) {
LOG(ERROR) << "ERROR: Cannot fetch system matrix.";
return EX_SOFTWARE;
}
+ #if 0
auto res = vintfObject->checkMissingHalsInMatrices(HidlInterfaceMetadata::all(),
AidlInterfaceMetadata::all(),
ShouldCheckMissingHalsInFcm);
@@ -547,6 +548,7 @@ int checkOne(const Dirmap& dirmap, const Properties& props) {
LOG(ERROR) << "ERROR: " << res.error();
return EX_SOFTWARE;
}
+ #endif
return EX_OK;
}
vendor_rockchip_common.patch
diff --git a/phone/etc/apns-full-conf.xml b/phone/etc/apns-full-conf.xml
index 5718e10a..47d9768a 100644
--- a/phone/etc/apns-full-conf.xml
+++ b/phone/etc/apns-full-conf.xml
@@ -20,6 +20,12 @@
<!-- use empty string to specify no proxy or port -->
<!-- This version must agree with that in apps/common/res/apns.xml -->
<apns version="8">
+ <apn carrier="China Telecom" mcc="460" mnc="11" apn="ctnet" type="default,supl" />
+ <apn carrier="中国移动物联网4G" mcc="460" mnc="04" apn="cmiot" type="default,supl" />
+ <apn carrier="中国移动物联网2G" mcc="460" mnc="04" apn="cmmtm" type="default,supl" />
+ <apn carrier="中国联通物联网gzm2mapn" mcc="460" mnc="06" apn="unim2m.gzm2mapn" port="80" type="default,supl" />
+ <apn carrier="中国联通物联网njm2mapn" mcc="460" mnc="06" apn="unim2m.njm2mapn" type="default,supl" />
+ <apn carrier="中国电信物联网m2m" mcc="460" mnc="03" apn="CTNET" user="m2m" password="vnet.mobi" type="default" />
<apn carrier="AT&T PHONE TEST SIM"
carrier_id = "1911"
diff --git a/phone/phone.mk b/phone/phone.mk
index 61881e46..351d822d 100755
--- a/phone/phone.mk
+++ b/phone/phone.mk
@@ -27,7 +27,7 @@ PRODUCT_PACKAGES += \
PRODUCT_PROPERTY_OVERRIDES +=ro.boot.noril=false
else
-PRODUCT_PROPERTY_OVERRIDES +=ro.boot.noril=true
+PRODUCT_PROPERTY_OVERRIDES +=ro.boot.noril=false
endif


评论