完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
CPU:RK3399
系统:Android 7.1 1、通过串口打印或者adb获取模块的 pid 和 vid,顺便可以看到生成 4 个虚拟串口 /dev/ttyUSB* [ 11.734379] u*** 1-1.1: new high-speed USB device number 3 using ehci-platform [11.828247] u*** 1-1.1: New USB device found, idVendor=2c7c, idProduct=0125[11.828386] u*** 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0[11.828413] u*** 1-1.1: Product: Android [11.828436] u*** 1-1.1: Manufacturer: Android [11.835480] option 1-1.1:1.0: GSM modem (1-port) converter detected [11.841217] u*** 1-1.1: GSM modem (1-port) converter now attached to ttyUSB0 [11.844988] option 1-1.1:1.1: GSM modem (1-port) converter detected [11.851892] u*** 1-1.1: GSM modem (1-port) converter now attached to ttyUSB1 [11.853964] option 1-1.1:1.2: GSM modem (1-port) converter detected [11.864677] u*** 1-1.1: GSM modem (1-port) converter now attached to ttyUSB2 [11.865658] option 1-1.1:1.3: GSM modem (1-port) converter detected [11.871387] u*** 1-1.1: GSM modem (1-port) converter now attached to ttyUSB3 2、在代码中添加模块的 pid 和 vid,原始代码中已经包含移远的几个模块,仿照现有的添加 EC20 diff --git a/kernel/drivers/u***/serial/option.c b/kernel/drivers/u***/serial/option.c index 1799aa0..f6c9e5d100644 --- a/kernel/drivers/u***/serial/option.c+++ b/kernel/drivers/u***/serial/option.c @@-241,6 +241,7 @@ static void option_instat_callback(struct urb *urb);#define QUECTEL_VENDOR_ID 0x2c7c /*These Quectel products use Quectel's vendor ID*/ +#define QUECTEL_PRODUCT_EC20 0x0125 #define QUECTEL_PRODUCT_EC21 0x0121 #define QUECTEL_PRODUCT_EC25 0x0125 #define QUECTEL_PRODUCT_BG96 0x0296@@-1200,6 +1201,8 @@ static const struct u***_device_id option_ids[] ={ { USB_DEVICE(QUALCOMM_VENDOR_ID, YUGA_PRODUCT_CLM920_NC5), .driver_info= (kernel_ulong_t)&yuga_clm920_nc5_blacklist },/*Quectel products using Quectel vendor ID*/ +{ USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC20),+ .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, { USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC21), .driver_info= (kernel_ulong_t)&net_intf4_blacklist }, { USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC25) 3、添加模块的 so 库,此库需要移远提供,so 支持的系统要匹配,将 so 库拷贝到下面的路径 vendor/rockchip/common/phone/lib/libreference-ril.so 4、打开 device/rockchip/common/device.mk 文件,修改 rild.libpath 路径为 rild.libpath=/system/lib64/libreference-ril.so diff --git a/device/rockchip/common/device.mk b/device/rockchip/common/device.mk index be2cb2c..69034a7100755 --- a/device/rockchip/common/device.mk+++ b/device/rockchip/common/device.mk @@-699,7 +699,7@@ endif ifeq ($(strip $(BOARD_HAVE_DONGLE)),true) ifeq ($(strip $(TARGET_ARCH)), arm64) PRODUCT_PROPERTY_OVERRIDES+=- rild.libpath=/system/lib64/libril-rk29-dataonly.so+ rild.libpath=/system/lib64/libreference-ril.soelsePRODUCT_PROPERTY_OVERRIDES+= rild.libpath=/system/lib/libril-rk29-dataonly.so 因为 rk3399 是64位 CPU,所以 ifeq ($(strip $(TARGET_ARCH)), arm64) 条件成立。 但是前提都是 BOARD_HAVE_DONGLE 变量值为 true 注:本人测试,修改下面两个文件中的 rild.libpath 不起作用 device/rockchip/rk3399/system.prop device/rockchip/rk3399/rk3399_all/system.prop 5、编译时将 so 库拷贝到上面指定目录 /system/lib64/libreference-ril.so diff --git a/vendor/rockchip/common/phone/phone.mk b/vendor/rockchip/common/phone/phone.mk index 946aacd..f8fc6e7100755 --- a/vendor/rockchip/common/phone/phone.mk+++ b/vendor/rockchip/common/phone/phone.mk @@-8,7 +8,8 @@ PRODUCT_COPY_FILES += $(CUR_PATH)/phone/etc/ppp/ip-down:system/etc/ppp/ip-down $(CUR_PATH)/phone/etc/ppp/ip-up:system/etc/ppp/ip-up $(CUR_PATH)/phone/etc/ppp/call-pppd:system/etc/ppp/call-pppd - $(CUR_PATH)/phone/etc/operator_table:system/etc/operator_table+ $(CUR_PATH)/phone/etc/operator_table:system/etc/operator_table + $(CUR_PATH)/phone/lib/libreference-ril.so:system/lib64/libreference-ril.so ifeq ($(strip $(PRODUCT_MODEM)), DTS4108C) PRODUCT_COPY_FILES+= 6、设置 BOARD_HAVE_DONGLE 变量 diff --git a/device/rockchip/rk3399/rk3399_all.mk b/device/rockchip/rk3399/rk3399_all.mk index 7a2d870..ce5060c100755 --- a/device/rockchip/rk3399/rk3399_all.mk+++ b/device/rockchip/rk3399/rk3399_all.mk @@-63,7 +63,7 @@ BOARD_NFC_SUPPORT := falseBOARD_HAS_GPS := false#for 3G/4G modem dongle support-BOARD_HAVE_DONGLE := false +BOARD_HAVE_DONGLE := trueBOARD_GRAVITY_SENSOR_SUPPORT := true 此时移植完成,只要 so 库没问题,就可以正常上网。 如果 radio log 中打印如下信息: RIL_SAP_Init not defined or exported in /system/lib64/libril-rk29-dataonly.so 检查 rild.libpath 的路径和名称是否正确。 No /proc/cmdline exception=java.io.FileNotFoundException: /proc/cmdline (Permission denied) |
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
1988 浏览 1 评论
synopsys 的design ware:DW_fpv_div,浮点数除法器,默认32位下,想提升覆盖率(TMAX),如果用功能case去提升覆盖率呢?
2490 浏览 1 评论
RK3588 GStreamer调试四路鱼眼摄像头四宫格显示报错
5272 浏览 1 评论
【飞凌嵌入式OK3576-C开发板体验】RKNN神经网络-YOLO图像识别
254 浏览 0 评论
【飞凌嵌入式OK3576-C开发板体验】SSH远程登录网络配置及CAN通讯
1336 浏览 0 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-25 03:17 , Processed in 0.692259 second(s), Total 73, Slave 56 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号