客户在全志R16平台的问题合集20171128
2017/10/19 16:41
版本:V1.0
W工,您好!
问题1:
我是XXXXXX科技有限公司的陈工,在调试贵公司的R16开发板(系统为安卓4.4)的LVDS屏的时,你们的屏幕是1280x800,18位的屏,我们的是(分辨率为)1024x600、18位的屏,我修改了下面的信息,但是开机后整体画面有偏移,画面偏左而且没有占满整个屏(附件图中红框部分属于屏幕正常显示区域),下方的几个虚拟按键也没有显示出来。我修改行后沿时间跟场后沿时间并没有效果,请问还需要做什么修改吗?
lcd_x = 1024
lcd_y = 600
lcd_dclk_freq = 65
lcd_hbp = 220
lcd_ht = 1400
lcd_hspw = 60
lcd_vbp = 7
lcd_vt = 800
lcd_vspw = 10
屏幕验证过,右边的黑边鼠标能拖过去,能显示在上面。
Q:\r16v11\gc2035_parrotv1.1\lichee\tools\pack\chips\sun8iw5p1\configs\evb-30\sys_config.fex
;----------------------------------------------------------------------------------
;disp init configuration
;
;disp_mode (0:screen0<screen0,fb0>)
;screenx_output_type (0:none; 1:lcd; 3:hdmi;)
;screenx_output_mode (used for hdmi output, 0:480i 1:576i 2:480p 3:576p 4:720p50)
; (5:720p60 6:1080i50 7:1080i60 8:1080p24 9:1080p50 10:1080p60)
;fbx format (4:RGB655 5:RGB565 6:RGB556 7:ARGB1555 8:RGBA5551 9:RGB888 10:ARGB8888 12:ARGB4444)
;fbx pixel sequence (0:ARGB 1:BGRA 2:ABGR 3:RGBA)
;fb0_scaler_mode_enable(scaler mode enable, used FE)
;fbx_width,fbx_height (framebuffer horizontal/vertical pixels, fix to output resolution while equal 0)
;lcdx_backlight (lcd init backlight,the range:[0,256],default:197
;lcdx_yy (lcd init screen bright/contrast/saturation/hue, value:0~100, default:50/50/57/50)
;lcd0_contrast (LCD contrast, 0~100)
;lcd0_saturation (LCD saturation, 0~100)
;lcd0_hue (LCD hue, 0~100)
;----------------------------------------------------------------------------------
[disp_init]
disp_init_enable = 1
disp_mode = 0
screen0_output_type = 1
screen0_output_mode = 4
screen1_output_type = 1
screen1_output_mode = 4
fb0_format = 10
fb0_pixel_sequence = 0
fb0_scaler_mode_enable = 0
fb0_width = 0
fb0_height = 0
fb1_format = 10
fb1_pixel_sequence = 0
fb1_scaler_mode_enable = 0
fb1_width = 0
fb1_height = 0
lcd0_backlight = 50
lcd1_backlight = 50
lcd0_bright = 50
lcd0_contrast = 50
lcd0_saturation = 57
lcd0_hue = 50
lcd1_bright = 50
lcd1_contrast = 50
lcd1_saturation = 57
lcd1_hue = 50
;----------------------------------------------------------------------------------
;lcd0 configuration
;lcd_if: 0:hv(sync+de); 1:8080; 2:ttl; 3:lvds; 4:dsi; 5:edp; 6:extend dsi
;lcd_x: lcd horizontal resolution
;lcd_y: lcd vertical resolution
;lcd_width: width of lcd in mm
;lcd_height: height of lcd in mm
;lcd_dclk_freq: in MHZ unit
;lcd_pwm_freq: in HZ unit
;lcd_pwm_pol: lcd backlight PWM polarity
;lcd_pwm_max_limit lcd backlight PWM max limit(<=255)
;lcd_hbp: hsync back porch
;lcd_ht: hsync total cycle
;lcd_vbp: vsync back porch
;lcd_vt: vysnc total cycle
;lcd_hspw: hsync plus width
;lcd_vspw: vysnc plus width
;lcd_lvds_if: 0:single link; 1:dual link
;lcd_lvds_colordepth: 0:8bit; 1:6bit
;lcd_lvds_mode: 0:NS mode; 1:JEIDA mode
;lcd_frm: 0:disable; 1:enable rgb666 dither; 2:enable rgb656 dither
;lcd_io_phase: 0:noraml; 1:intert phase(0~3bit: vsync phase; 4~7bit:hsync phase;
; 8~11bit:dclk phase; 12~15bit:de phase)
;lcd_gamma_en lcd gamma correction enable
;lcd_bright_curve_en lcd bright curve correction enable
;lcd_cmap_en lcd color map function enable
;deu_mode 0:smoll lcd screen; 1:large lcd screen(larger than 10inch)
;lcdgamma4iep: Smart Backlight parameter, lcd gamma vale * 10;
; decrease it while lcd is not bright enough; increase while lcd is too bright
;smart_color 90:normal lcd screen 65:retina lcd screen(9.7inch)
;----------------------------------------------------------------------------------
[lcd0_para]
lcd_used = 1
lcd_driver_name = "default_lcd"
lcd_if = 3
lcd_x = 1024
lcd_y = 600
lcd_width = 150
lcd_height = 94
lcd_dclk_freq = 65
lcd_pwm_used = 1
lcd_pwm_ch = 0
lcd_pwm_freq = 50000
lcd_pwm_pol = 1
lcd_hbp = 20
lcd_ht = 1400
lcd_hspw = 10
lcd_vbp = 10
lcd_vt = 800
lcd_vspw = 5
lcd_lvds_if = 0
lcd_lvds_colordepth = 1
lcd_lvds_mode = 0
lcd_frm = 1
lcd_gamma_en = 0
lcd_bright_curve_en = 0
lcd_cmap_en = 0
deu_mode = 0
lcdgamma4iep = 22
smart_color = 90
lcd_bl_en = port:PD13<1><0><default><1>
lcd_power = "axp22_dc1sw"
lcdd0 = port:PD18<3><0><default><default>
lcdd1 = port:PD19<3><0><default><default>
lcdd2 = port:PD20<3><0><default><default>
lcdd3 = port:PD21<3><0><default><default>
lcdd4 = port:PD22<3><0><default><default>
lcdd5 = port:PD23<3><0><default><default>
lcdd6 = port:PD24<3><0><default><default>
lcdd7 = port:PD25<3><0><default><default>
lcdd8 = port:PD26<3><0><default><default>
lcdd9 = port:PD27<3><0><default><default>
;----------------------------------------------------------------------------------
;pwm config
;----------------------------------------------------------------------------------
[pwm0_para]
pwm_used = 0
pwm_positive = port:PH00<2><0><default><default>
[pwm1_para]
pwm_used = 0
pwm_positive = port:PH01<2><0><default><default>
LVDS接口的LCD屏幕右边有黑条.jpg
lvds格式的lcd的屏幕参数配置.png
马上想起来很久很久碰到的一个问题,通过全志A31S平台的HDMI接口输出854x480分辨率(TI的DLP)的时候,看见右边有一个黑条,调了一个星期,做驱动的和做Android的在扯皮!后来做硬件的一句话:你们看看,那个黑条是不是Android的虚拟导航条?最后那个做Android的小子咬死不承认问题,在老大强烈要求之后,那个小子才将虚拟导航条的宽度缩减了一半,马上黑条变小了。最后他不得已修改为宽度为0,解决问题了。
解决方法:
修改了/android/frameworks/base/core/res/res/values/dimens.xml里的status_bar_height修改成0,然后把android/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java里的addNavigationBar();方法屏蔽掉
Q:\r16v11\gc2035_parrotv1.1\android\frameworks\base\core\res\res\values\dimens.xml
<!-- <dimen name="status_bar_height">25dip</dimen>-->
<dimen name="status_bar_height">0dip</dimen>
<!-- Height of the bottom navigation / system bar. -->
<dimen name="navigation_bar_height">48dp</dimen>
<!-- Height of the bottom navigation bar in portrait; often the same as @dimen/navigation_bar_height -->
<dimen name="navigation_bar_height_landscape">48dp</dimen>
<!-- Width of the navigation bar when it is placed vertically on the screen -->
<dimen name="navigation_bar_width">42dp</dimen>
<!-- Height of notification icons in the status bar -->
<dimen name="status_bar_icon_size">24dip</dimen>
<!-- Size of the giant number (unread count) in the notifications -->
<dimen name="status_bar_content_number_size">48sp</dimen>
<!-- Height of the system bar (combined status & navigation); used by
SystemUI internally, not respected by the window manager. -->
<dimen name="system_bar_height">@dimen/navigation_bar_height</dimen>
[email protected]:/home/rediron/r16v11/gc2035_parrotv1.1$
[email protected]:/home/rediron/r16v11/gc2035_parrotv1.1$ find . -name PhoneStatusBar.java
./android/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
[email protected]:/home/rediron/r16v11/gc2035_parrotv1.1$
Q:\r16v11\gc2035_parrotv1.1\android\frameworks\base\packages\SystemUI\src\com\android\systemui\statusbar\phone\PhoneStatusBar.java
@Override
public void start() {
mDisplay = ((WindowManager)mContext.getSystemService(Context.WINDOW_SERVICE))
.getDefaultDisplay();
updateDisplaySize();
super.start(); // calls createAndAddWindows()
//addNavigationBar();
// Lastly, call to the icon policy to install/update all the icons.
mIconPolicy = new PhoneStatusBarPolicy(mContext);
mHeadsUpObserver.onChange(true); // set up
if (ENABLE_HEADS_UP) {
mContext.getContentResolver().registerContentObserver(
Settings.Global.getUriFor(SETTING_HEADS_UP), true,
mHeadsUpObserver);
}
}
问题2:
假如把开发板上的wifi模块改成AP6210应该怎么修改,我修改了/android/device/softwinner/astar-evb30目录下的astar_evb30.mk 文件和BoardConfig.mk 文件,但打开wifi时会报错(参附件6210.txt)
Q:\r16v11\gc2035_parrotv1.1\android\device\softwinner\astar-evb30\BoardConfig.mk
# 1.2 broadcom wifi support
BOARD_WIFI_VENDOR := broadcom
ifeq ($(BOARD_WIFI_VENDOR), broadcom)
BOARD_WPA_SUPPLICANT_DRIVER := NL80211
WPA_SUPPLICANT_VERSION := VER_0_8_X
BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_bcmdhd
BOARD_HOSTAPD_DRIVER := NL80211
BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_bcmdhd
BOARD_WLAN_DEVICE := bcmdhd
WIFI_DRIVER_FW_PATH_PARAM := "/sys/module/bcmdhd/parameters/firmware_path"
SW_BOARD_USR_WIFI := AP6212
endif
Q:\r16v11\gc2035_parrotv1.1\android\device\softwinner\astar-evb30\astar_evb30.mk
# ap6181/6210/6330 sdio wifi fw and nvram
#$(call inherit-product-if-exists, hardware/broadcom/wlan/firmware/ap6181/device-bcm.mk)
$(call inherit-product-if-exists, hardware/broadcom/wlan/firmware/ap6212/device-bcm.mk)
#$(call inherit-product-if-exists, hardware/broadcom/wlan/firmware/ap6330/device-bcm.mk)
AP6210的启动LOG截图CatchE78A(11-15-(12-11-15-36-50).jpg
配置AP6210 1 Catch38ED(11-15-(12-11-15-36-50).jpg
配置AP6210 2 InsertPic_83C8(1(12-11-15-36-50).png
配置AP6210 3 InsertPic_2379(1(12-11-15-36-50).png
出错的LOG:
D/WifiService( 489): setWifiEnabled: true pid=776, uid=1000
D/WifiHW ( 103): Enter: wifi_get_fw_path function, fw_type=0,
D/WifiHW ( 103): Eneter: wifi_change_fw_path, fwpath = /system/vendor/modules/fw_bcm43438a0.bin.
E/WifiHW ( 103): Failed to open wlan fw path param (No such file or directory)
E/SoftapController( 103): Softap fwReload failed
E/WifiStateMachine( 489): Failed to reload STA firmware java.lang.IllegalStateException: command ‘9 softap fwreload wlan0 STA‘ failed with ‘400 9 SoftAP command has failed‘
W/CommandListener( 103): Failed to retrieve HW addr for wlan0 (No such device)
D/CommandListener( 103): Setting iface cfg
E/WifiStateMachine( 489): Unable to change interface settings: java.lang.IllegalStateException: command ‘11 interface setcfg wlan0 0.0.0.0 0 down‘ failed with ‘400 11 Failed to set address (No such device)‘
E/WifiHW ( 489): ctrl_interface != /data/misc/wifi/sockets
D/WifiMonitor( 489): startMonitoring(wlan0) with mConnected = false
D/BluetoothAdapter( 776): 1102903192: getState() : mService = null. Returning STATE_OFF
I/wpa_supplicant( 1360): Successfully initialized wpa_supplicant
I/wpa_supplicant( 1360): rfkill: Cannot open RFKILL control device
E/wpa_supplicant( 1360): Could not read interface wlan0 flags: No such device
E/wpa_supplicant( 1360): wlan0: Failed to initialize driver interface
V/AudioFlinger( 108): releasing 8 from 969
V/AudioFlinger( 108): decremented refcount to 0
V/AudioFlinger( 108): purging stale effects
I/MediaFocusControl( 489): AudioFocus abandonAudioFocus() from [email protected][email protected]
I/ActivityManager( 489): Start proc com.android.musicfx for broadcast com.android.musicfx/.ControlPanelReceiver: pid=1365 uid=10008 gids={50008, 3003, 3002}
I/PackageManager( 489): Running dexopt on: com.android.musicfx
V/MusicFXControlPanelReceiver( 1365): onReceive
V/MusicFXControlPanelReceiver( 1365): Action: android.media.action.CLOSE_AUDIO_EFFECT_CONTROL_SESSION
V/MusicFXControlPanelReceiver( 1365): Package name: com.android.music
V/MusicFXControlPanelReceiver( 1365): Audio session: 8
V/MusicFXControlPanelEffect( 1365): closeSession([email protected], com.android.music, 8)
E/WifiHW ( 489): Supplicant not running, cannot connect
E/WifiHW ( 489): Supplicant not running, cannot connect
E/WifiHW ( 489): Supplicant not running, cannot connect
E/WifiHW ( 489): Supplicant not running, cannot connect
E/WifiHW ( 489): Supplicant not running, cannot connect
E/WifiMonitor( 489): startMonitoring(wlan0) failed!
E/WifiStateMachine( 489): Failed to setup control channel, restart supplicant
D/WifiHW ( 489): Enter wifi_unload_driver Function.
D/WifiHW ( 103): Enter: wifi_get_fw_path function, fw_type=0,
D/WifiHW ( 103): Eneter: wifi_change_fw_path, fwpath = /system/vendor/modules/fw_bcm43438a0.bin.
E/WifiHW ( 103): Failed to open wlan fw path param (No such file or directory)
E/SoftapController( 103): Softap fwReload failed
E/WifiStateMachine( 489): Failed to reload STA firmware java.lang.IllegalStateException: command ‘12 softap fwreload wlan0 STA‘ failed with ‘400 12 SoftAP command has failed‘
W/CommandListener( 103): Failed to retrieve HW addr for wlan0 (No such device)
D/CommandListener( 103): Setting iface cfg
E/WifiStateMachine( 489): Unable to change interface settings: java.lang.IllegalStateException: command ‘14 interface setcfg wlan0 0.0.0.0 0 down‘ failed with ‘400 14 Failed to set address (No such device)‘
D/BluetoothAdapter( 776): 1102903192: getState() : mService = null. Returning STATE_OFF
E/WifiMonitor( 489): startMonitor called with unknown iface=wlan0
I/wpa_supplicant( 1399): Successfully initialized wpa_supplicant
I/wpa_supplicant( 1399): rfkill: Cannot open RFKILL control device
E/wpa_supplicant( 1399): Could not read interface wlan0 flags: No such device
E/wpa_supplicant( 1399): wlan0: Failed to initialize driver interface
D/dalvikvm( 1203): GC_CONCURRENT freed 1868K, 25% free 5830K/7740K, paused 21ms+1ms, total 90ms
D/BatteryService( 489): wanglei --> mBatteryProps.batteryTemperature = 300
^C
130|[email protected]:/ $ ls /system/vendor/modules/fw_bcm43438a0.bin
/system/vendor/modules/fw_bcm43438a0.bin
由于AP6210正基已经停产,退出了支持序列。不需要浪费时间了!
问题3:
电源管理芯片我想设置DLDO3,输出为2.8V,我给寄存器地址0x12写入0xff,把DLDO3开关控制寄存器打开,根据计算往寄存器地址0x17写入0x15,但是并没有输出电压,开机信息读寄存器的值,读出的值是我写进去的值(红色箭头处是我写进去的值)。
电源1 Catch(11-28-12-4(12-11-15-35-19).jpg
电源2 CatchBFDC(11-28-(12-11-15-35-19).jpg
(你们应该是要配置摄像头的电压^_。下次提问的时候可以说明一下你们的目的,这样我回答问题更有针对性!)
请参照:Rxx-user guide20170727全志的FAQ.pdf:3.3.电源配置(第18页)
Q:\r16v11\ov5640_parrotv1.1\lichee\tools\pack\chips\sun8iw5p1\configs\evb-30\sys_config.fex
;----------------------------------------------------------------------------------
;dcdc1_vol ---set dcdc1 voltage,mV,1600-3400,100mV/step
;dcdc2_vol ---set dcdc2 voltage,mV,600-1540,20mV/step
;dcdc3_vol ---set dcdc3 voltage,mV,600-1860,20mV/step
;dcdc4_vol ---set dcdc4 voltage,mV,600-1540,20mV/step
;dcdc5_vol ---set dcdc5 voltage,mV,1000-2550,50mV/step
;aldo2_vol ---set aldo2 voltage,mV,700-3300,100mV/step
;aldo3_vol ---set aldo3 voltage,mV,700-3300,100mV/step
;----------------------------------------------------------------------------------
[power_sply]
dcdc1_vol = 3000
dcdc2_vol = 1100
dcdc3_vol = 1200
dcdc4_vol = 0
dcdc5_vol = 1500
aldo2_vol = 2500
aldo3_vol = 3000
dldo3_vol = 2800
;gpio0_vol = 2800
ldoio0_vol = 2800
问题4:
安卓的开机打印信息很少(安卓4.4.2),我查看proc/sys/kernel/printk,打印的是4417.源码/lichee/linux-3.4/kernel/printk.c文件中已经定义了#define DEFAULT_CONSOLE_LOGLEVEL 7,为什么编译后还是显示4417,请问你们这个打印信息的等级在那里修改?
20161215请问全志的android平台的kernel启动早期的 打印信息 全关了吗.pdf
[email protected]:~/wyb/bt1_parrot_v1.1_20161212/lichee/linux-3.4$ make ARCH=arm menuconfig
General setup --->
(16) Kernel log buffer size (16 => 64KB, 17 => 128KB)
修改为:
(18) Kernel log buffer size (16 => 64KB, 17 => 128KB)
Q:\r16v11\ov5640_parrotv1.1\lichee\tools\pack\chips\sun8iw5p1\configs\default\env.cfg
bootdelay=3
#default bootcmd, will change at runtime according to key press
bootcmd=run setargs_nand boot_normal#default nand boot
#kernel command arguments
console=ttyS0,115200
nand_root=/dev/nandd
mmc_root=/dev/mmcblk0p7
init=/init
loglevel=8
修改完成之后:
[email protected]:/ $
[email protected]:/ $ cat proc/sys/kernel/printk
8417
[email protected]:/ $
问题5、
安卓4.4 init.sun8i.rc这个文件应该在那里修改呢?我修改/device/softwinner/astar-evb30目录下的init.sun8i.rc文件,编译后out目录下的文件并没有修改。是我修改的文件错了吗?
修改init.sun8i.rc这个文件,只要把你要修改的内容那部分全部屏蔽掉,然后在下面重新写一个。
# virtual sdcard daemon running as media_rw (1023)
# service sdcard /system/bin/sdcard -u 1023 -g 1023 -l /data/media /mnt/shell/emulated
#class late_start
# ril related services
service ril-daemon /system/bin/rild -l libsoftwinner-ril.so -- -d /dev/ttyUSB2
class main
socket rild stream 660 root radio
socket rild-debug stream 660 radio system
user root
disabled
group radio cache inet misc audio sdcard_rw log
修改为:
# virtual sdcard daemon running as media_rw (1023)
# service sdcard /system/bin/sdcard -u 1023 -g 1023 -l /data/media /mnt/shell/emulated
#class late_start
# ril related services
#service ril-daemon /system/bin/rild -l libsoftwinner-ril.so -- -d /dev/ttyUSB2
#class main
#socket rild stream 660 root radio
#socket rild-debug stream 660 radio system
#user root
#disabled
#group radio cache inet misc audio sdcard_rw log
service ril-daemon /system/bin/rild -l libreference-ril.myzr.so -- -d /dev/ttyUSB2
class main
socket rild stream 660 root radio
socket rild-debug stream 660 radio system
user root
disabled
group radio cache inet misc audio sdcard_rw log
可选方式:
[email protected]:/home/rediron/r16v11/ov5640_parrotv1.1/android$ source build/envsetup.sh
including device/asus/flo/vendorsetup.sh
including device/asus/tilapia/vendorsetup.sh
including device/asus/grouper/vendorsetup.sh
including device/asus/deb/vendorsetup.sh
including device/lge/mako/vendorsetup.sh
including device/lge/hammerhead/vendorsetup.sh
including device/softwinner/r16-bell-one/vendorsetup.sh
including device/softwinner/polaris-common/vendorsetup.sh
including device/softwinner/astar-evb20/vendorsetup.sh
including device/softwinner/astar-evb/vendorsetup.sh
including device/softwinner/astar-evb30/vendorsetup.sh
including device/softwinner/bellone-sc3813r/vendorsetup.sh
including device/generic/x86/vendorsetup.sh
including device/generic/armv7-a-neon/vendorsetup.sh
including device/generic/mips/vendorsetup.sh
including device/samsung/manta/vendorsetup.sh
including sdk/bash_completion/adb.bash
[email protected]:/home/rediron/r16v11/ov5640_parrotv1.1/android$ lunch
You‘re building on Linux
Lunch menu... pick a combo:
1. aosp_arm-eng
2. aosp_x86-eng
3. aosp_mips-eng
4. vbox_x86-eng
5. aosp_flo-userdebug
6. aosp_tilapia-userdebug
7. aosp_grouper-userdebug
8. aosp_deb-userdebug
9. aosp_mako-userdebug
10. aosp_hammerhead-userdebug
11. r16_bell_one-eng
12. astar_evb20-eng
13. astar_evb-eng
14. astar_evb30-eng
15. bellone_sc3813r-eng
16. mini_x86-userdebug
17. mini_armv7a_neon-userdebug
18. mini_mips-userdebug
19. aosp_manta-userdebug
Which would you like? [aosp_arm-eng] 14
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.4.2
TARGET_PRODUCT=astar_evb30
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=cortex-a7
HOST_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-3.13.0-24-generic-x86_64-with-Ubuntu-14.04-trusty
HOST_BUILD_TYPE=release
BUILD_ID=KVT49L
OUT_DIR=out
============================================
[email protected]m-Product-Name:/home/rediron/r16v11/ov5640_parrotv1.1/android$ make installclean
[email protected]:/home/rediron/r16v11/ov5640_parrotv1.1/android$ make -j12
[email protected]:/home/rediron/r16v11/ov5640_parrotv1.1/android$ pack -d