剛下載的 MSM8909 , compile 後, 卻發現...
開機的UART Console LOG 只有幾秒(一但 boot console, early console被turn off 後就沒LOG了)
我們公司的UART 只接了2隻pin 腳, 即 :
GPIO4--> UART TX
GPIO5--> UART RX
就醬~~
結果就是... 沒LOG 了....
當然依QC給的文件 80-NU767-1 去改...
不過... 應該沒啥用... 呵~~
先給解法, 喜歡找為什麼的人, 就再往後看怎麼debug吧~~
解法:
kernel/arch/arm/configs/msm8909-xxx_defconfig:
查看看起下的是否都有開?
CONFIG_SERIAL_MSM
CONFIG_SERIAL_MSM_CONSOLE
CONFIG_SERIAL_MSM_HS
CONFIG_SERIAL_MSM_HSL
CONFIG_SERIAL_MSM_HSL_CONSOLE
CONFIG_GPIOLIB
CONFIG_GPIO_GENERIC
CONFIG_GPIO_MSM_V3
主要是這部份(應該有多開了幾項, 各位大大可以查一下那幾項可省)
CONFIG_PINCTRL
CONFIG_PINMUX
CONFIG_PINCONF
CONFIG_GENERIC_PINCONF
CONFIG_PINCTRL_SINGLE
CONFIG_USE_PINCTRL_IRQ
CONFIG_PINCTRL_MSM_TLMM
如此就OK了~~
簡言之就是... dts中明明就是用pinctrl 去調控pin的設定,
可是卻沒有driver去handle, 因此當然就不會動囉~~
DEBUG技巧:
1. QC的Kernel是採用3.1x, 因此, 所有的devices 的註冊是源自device tree
也就是板子上有那些週邊全靠device tree來決定,
所以...... 第一步當然是先確認 UART的node是否有被正常讀到...
我在查的時後, 利用修改:
kernel/driver/base/core.c中的 device_register, 填加一行
pr_err("========== %s: %s \n", __func__, dev->of_node->name);
再利用開機時 boot UART console還可印訊息掃出kernel找到的 device nodes
2. 修改 kernel/driver/base/bus.c 印出找到那些bus裝置
在 bus_register 印出 bus->name
3. 修改 platform_driver_probe 印出那些driver正常被 probe(有device tree node且driver有配到)
印 drv->driver.name
4. 接下去當然是改
driver/tty/serial/msm_serialxxxx.c了
查的時後可以看到 有node, 但無法probe...
所以應該是driver的對映配對有問題...
這下問題就簡單很多啦~~
a. 找找config設定
b. 是否ID 配對有問題
c. 是否 driver 在 probe時有錯誤
2015年2月16日 星期一
2015年2月4日 星期三
Compile Qualcomm MSM8909
OS: Ubuntu 12.04 Desktop 64bit
安裝compile環境:
前往https://www.codeaurora.org/xwiki/bin/QAEP/release找一份Qualcomm 8x09的code下載,
指令為 (假設要download LA.BR.1.2.3-02010):
repo init -u git://codeaurora.org/platform/manifest.git -b release -m LA.BR.1.2.3-02010-8x09.0.xml --repo-url=git://codeaurora.org/tools/repo.git
詳情請參考: https://www.codeaurora.org/xwiki/bin/QAEP/WebHome
compile:
cd 該目錄
source build/envsetup.sh
lunch msm8909-userdebug
make -j8 (假定PC有8核CPU, 可cat /proc/cpuinfo取得核心數)
$(HOME)/ARM_Compiler_5
$(HOME)/Qualcomm/HEXAGON_Tools/5.0.x
注意: ARM Compile需要另安裝一個 license server (此假定在安裝在 主機: 192.168.0.1)
setup.sh設定檔1(modem 專用)內容:
export COMPILE_TOOLS_ROOT=$HOME
export HEXAGON_ROOT=$COMPILE_TOOLS_ROOT/Qualcomm/HEXAGON_Tools
export HEXAGON_RTOS_RELEASE=6.4.04
export HEXAGON_Q6VERSION=v5
export HEXAGON_IMAGE_ENTRY=0x08000000
export ARMTOOLS=ARMCT5.01
export ARMROOT=$COMPILE_TOOLS_ROOT/ARM_Compiler_5
export ARM_COMPILER_PATH=$ARMROOT/bin64
export ARMHOME=$ARMROOT
export ARMLIB=$ARMROOT/lib
export ARMINCLUDE=$ARMROOT/include
export ARMBIN=$ARMROOT/bin64
export ARMINC=$ARMINCLUDE
export ARMLMD_LICENSE_FILE=8224@192.168.0.1
export SCONS_MAX_NUM_JOBS=1
export PYTHON_PATH=/usr/bin/python
export PYTHONPATH=/usr/bin/python
export MAKE_PATH=/usr/bin/make
export PATH=$MAKE_PATH:$ARM_COMPILER_PATH:$HEXAGON_ROOT/$HEXAGON_RTOS_RELEASE/qc/bin:$HEXAGON_ROOT/$HEXAGON_RTOS_RELEASE/gnu/bin:$PATH:PYTHONPATH
setup.sh設定檔2 內容:
export COMPILE_TOOLS_ROOT=$HOME
export ARMTOOLS=ARMCT5.01
export ARMROOT=$COMPILE_TOOLS_ROOT/ARM_Compiler_5
export ARM_COMPILER_PATH=$ARMROOT/bin64
export ARMHOME=$ARMROOT
export ARMLIB=$ARMROOT/lib
export ARMINCLUDE=$ARMROOT/include
export ARMBIN=$ARMROOT/bin64
export ARMINC=$ARMINCLUDE
export ARMLMD_LICENSE_FILE=8224@192.168.0.1
export SCONS_MAX_NUM_JOBS=1
export MAKE_PATH=/usr/bin/make
export PATH=$MAKE_PATH:$ARM_COMPILER_PATH
安裝compile環境:
1.
sudo
apt-get install git gnupg flex bison gperf build-essential zip curl libc6-dev
libncurses5-dev:i386 x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386
libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 tofrodos
python-markdown libxml2-utils xsltproc zlib1g-de:i386
2.
sudo
ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
3.
curl https://storage.googleapis.com/git-repo-downloads/repo
> ~/bin/repo
4.
chmod
a+x ~/bin/repo
HLOS 部份 (Android+Linux)
HLOS BuildType
|
Use / Description
|
user
|
limited access; suited for production
|
userdebug
|
like “user” but with root access and debuggability; preferred for
debugging
|
eng
|
development configuration with additional debugging tools
|
前往https://www.codeaurora.org/xwiki/bin/QAEP/release找一份Qualcomm 8x09的code下載,
指令為 (假設要download LA.BR.1.2.3-02010):
repo init -u git://codeaurora.org/platform/manifest.git -b release -m LA.BR.1.2.3-02010-8x09.0.xml --repo-url=git://codeaurora.org/tools/repo.git
詳情請參考: https://www.codeaurora.org/xwiki/bin/QAEP/WebHome
compile:
cd 該目錄
source build/envsetup.sh
lunch msm8909-userdebug
make -j8 (假定PC有8核CPU, 可cat /proc/cpuinfo取得核心數)
Non-HLOS (chipcode)
假定ARM_Compiler與HEXAGON_TOOLS都安裝在 HOME目錄中, 即:$(HOME)/ARM_Compiler_5
$(HOME)/Qualcomm/HEXAGON_Tools/5.0.x
注意: ARM Compile需要另安裝一個 license server (此假定在安裝在 主機: 192.168.0.1)
setup.sh設定檔1(modem 專用)內容:
export COMPILE_TOOLS_ROOT=$HOME
export HEXAGON_ROOT=$COMPILE_TOOLS_ROOT/Qualcomm/HEXAGON_Tools
export HEXAGON_RTOS_RELEASE=6.4.04
export HEXAGON_Q6VERSION=v5
export HEXAGON_IMAGE_ENTRY=0x08000000
export ARMTOOLS=ARMCT5.01
export ARMROOT=$COMPILE_TOOLS_ROOT/ARM_Compiler_5
export ARM_COMPILER_PATH=$ARMROOT/bin64
export ARMHOME=$ARMROOT
export ARMLIB=$ARMROOT/lib
export ARMINCLUDE=$ARMROOT/include
export ARMBIN=$ARMROOT/bin64
export ARMINC=$ARMINCLUDE
export ARMLMD_LICENSE_FILE=8224@192.168.0.1
export SCONS_MAX_NUM_JOBS=1
export PYTHON_PATH=/usr/bin/python
export PYTHONPATH=/usr/bin/python
export MAKE_PATH=/usr/bin/make
export PATH=$MAKE_PATH:$ARM_COMPILER_PATH:$HEXAGON_ROOT/$HEXAGON_RTOS_RELEASE/qc/bin:$HEXAGON_ROOT/$HEXAGON_RTOS_RELEASE/gnu/bin:$PATH:PYTHONPATH
setup.sh設定檔2 內容:
export COMPILE_TOOLS_ROOT=$HOME
export ARMTOOLS=ARMCT5.01
export ARMROOT=$COMPILE_TOOLS_ROOT/ARM_Compiler_5
export ARM_COMPILER_PATH=$ARMROOT/bin64
export ARMHOME=$ARMROOT
export ARMLIB=$ARMROOT/lib
export ARMINCLUDE=$ARMROOT/include
export ARMBIN=$ARMROOT/bin64
export ARMINC=$ARMINCLUDE
export ARMLMD_LICENSE_FILE=8224@192.168.0.1
export SCONS_MAX_NUM_JOBS=1
export MAKE_PATH=/usr/bin/make
export PATH=$MAKE_PATH:$ARM_COMPILER_PATH
APSS HLOS
(boot.img,
cace.img, dt.img, persist.img, ramdisk.img, recovery.img, system.img, userdata.img,
emmc_appsboot.mbn)
result:
out/target/product/msm8909/
|
ubuntu 12.04+
OpenJDK7
|
souce
build/envsetup.sh
lunch msm8909-userdebug
Compile:
make -j8 Clean: make clobber |
MPSS
result:
modem_proc/build/ms/bin/
|
Hexagon tool set
6.4.05
Python 2.7.6+
Perl 5.14.2
SCons v2.0.0+
用設定檔1 |
[NON-HLOS]/modem_proc/build/ms/
Compile:
./build.sh
8909.gen.prod -k
./build.sh
8909.gps.prod -k
Clean:
./build.sh
8909.gen.prod -c
./build.sh
8909.gps.prod -c
|
BOOT loaders
result:
boot_images/build/ms/bin/8909/emmc/
|
ARM compiler
tools
5.01 update
3(build 94)
Python 2.6.6+
Perl 5.8.x+
SCons v2.0.0+
用設定檔2 |
[NON-HLOS]/boot_images/build/ms
Compile:
./build.sh
TARGET_FAMILY=8909 --prod
Clean:
./build.sh -c
TARGET_FAMILY=8909 --prod
|
RPM
result:
rpm_proc/build/ms/bin/8909/
|
ARM compiler
tools
5.01 update
3(build 94)
Python 2.6.6+
Perl 5.6.1+
SCons v2.0.0+
|
[NON-HLOS]/rpm_proc/build/
Compile:
./build_8909.sh
Clean:
./build_8909.sh
-c
|
CNSS
result:
wcnss_proc/build/ms/bin/SCAQMAZ/
|
binary only
|
|
TZ
result:
trustzone_images/build/ms/bin/MAZAANAA
|
ARM compiler
tools
5.01 update
3(build 94)
Python 2.6.6+
Perl 5.10.1+
SCons v2.0.0+
用設定檔2 |
[NON-HLOS]/trustzone_images/build/ms/
Compile:
./build.sh
CHIPSET=msm8909 tz sampleapp tzbsp_no_xpu playready widevine securitytest keymaster commonlib
Clean:
./build.sh
CHIPSET=msm8909 tz sampleapp tzbsp_no_xpu playready widwvine securitytest keymaster commonlib -c
|
2015年2月2日 星期一
MSM8909 device tree
MSM8909-MTP 會用到的 devicetree:
msm8909-mtp.dts:
+ msm8909-mtp.dtsi
| + msm8909.dtsi
| | + skeleton64.dtsi
| | + dt-bindings/clock/msm-clocks-8909.h
| | + msm8909-ion.dtsi
| | + msm8909-smp2p.dtsi
| | + msm8909-ipcrouter.dtsi
| | + msm-gdsc-8916.dtsi
| | + msm8909-iommu.dtsi
| | | + msm-iommu-v2.dtsi
| | + msm8909-iommu-domains.dtsi
| | + msm8909-gpu.dtsi
| | + msm8909-coresight.dtsi
| | + msm8909-bus.dtsi
| | | + dt-bindings/msm/msm-bus-ids.h
| | | + dt-bindings/msm/msm-bus-rule-ops.h
| | + msm8909-mdss.dtsi
| | | + dsi-panel-sim-video.dtsi
| | + msm8909-mdss-pll.dtsi
| + msm8909-pinctrl.dtsi
| + msm8909-camera-sensor-mtp.dtsi
| + batterydata-palladium.dtsi
| + dsi-panel-hx8379c-truly-fwvga-video.dtsi
+ msm8909-pm8909.dtsi
| + msm-pm8909-rpm-regulator.dtsi
| + msm-pm8909.dtsi
| + msm8909-regulator.dtsi
| + msm8909-pm8909-pm.dtsi
+ msm8909-pm8909-mtp.dtsi
MSM8909-CDP 會用到的 devicetree:
msm8909-cdp.dts:
+ msm8909-cdp.dtsi
| + msm8909.dtsi
| | + skeleton64.dtsi
| | + dt-bindings/clock/msm-clocks-8909.h
| | + msm8909-ion.dtsi
| | + msm8909-smp2p.dtsi
| | + msm8909-ipcrouter.dtsi
| | + msm-gdsc-8916.dtsi
| | + msm8909-iommu.dtsi
| | | + msm-iommu-v2.dtsi
| | + msm8909-iommu-domains.dtsi
| | + msm8909-gpu.dtsi
| | + msm8909-coresight.dtsi
| | + msm8909-bus.dtsi
| | | + dt-bindings/msm/msm-bus-ids.h
| | | + dt-bindings/msm/msm-bus-rule-ops.h
| | + msm8909-mdss.dtsi
| | | + dsi-panel-sim-video.dtsi
| | + msm8909-mdss-pll.dtsi
| + msm8909-pinctrl.dtsi
| + msm8909-camera-sensor-cdp.dtsi
| + dsi-panel-hx8394d-720p-video.dtsi
| + dsi-panel-sharp-qhd-video.dtsi
| + dsi-panel-truly-wvga-cmd.dtsi
| + dsi-panel-hx8394d-qhd-video.dtsi
+ msm8909-pm8909.dtsi
| + msm-pm8909-rpm-regulator.dtsi
| + msm-pm8909.dtsi
| + msm8909-regulator.dtsi
| + msm8909-pm8909-pm.dtsi
+ msm8909-pm8909-cdp.dtsi
msm8909-mtp.dts:
+ msm8909-mtp.dtsi
| + msm8909.dtsi
| | + skeleton64.dtsi
| | + dt-bindings/clock/msm-clocks-8909.h
| | + msm8909-ion.dtsi
| | + msm8909-smp2p.dtsi
| | + msm8909-ipcrouter.dtsi
| | + msm-gdsc-8916.dtsi
| | + msm8909-iommu.dtsi
| | | + msm-iommu-v2.dtsi
| | + msm8909-iommu-domains.dtsi
| | + msm8909-gpu.dtsi
| | + msm8909-coresight.dtsi
| | + msm8909-bus.dtsi
| | | + dt-bindings/msm/msm-bus-ids.h
| | | + dt-bindings/msm/msm-bus-rule-ops.h
| | + msm8909-mdss.dtsi
| | | + dsi-panel-sim-video.dtsi
| | + msm8909-mdss-pll.dtsi
| + msm8909-pinctrl.dtsi
| + msm8909-camera-sensor-mtp.dtsi
| + batterydata-palladium.dtsi
| + dsi-panel-hx8379c-truly-fwvga-video.dtsi
+ msm8909-pm8909.dtsi
| + msm-pm8909-rpm-regulator.dtsi
| + msm-pm8909.dtsi
| + msm8909-regulator.dtsi
| + msm8909-pm8909-pm.dtsi
+ msm8909-pm8909-mtp.dtsi
MSM8909-CDP 會用到的 devicetree:
msm8909-cdp.dts:
+ msm8909-cdp.dtsi
| + msm8909.dtsi
| | + skeleton64.dtsi
| | + dt-bindings/clock/msm-clocks-8909.h
| | + msm8909-ion.dtsi
| | + msm8909-smp2p.dtsi
| | + msm8909-ipcrouter.dtsi
| | + msm-gdsc-8916.dtsi
| | + msm8909-iommu.dtsi
| | | + msm-iommu-v2.dtsi
| | + msm8909-iommu-domains.dtsi
| | + msm8909-gpu.dtsi
| | + msm8909-coresight.dtsi
| | + msm8909-bus.dtsi
| | | + dt-bindings/msm/msm-bus-ids.h
| | | + dt-bindings/msm/msm-bus-rule-ops.h
| | + msm8909-mdss.dtsi
| | | + dsi-panel-sim-video.dtsi
| | + msm8909-mdss-pll.dtsi
| + msm8909-pinctrl.dtsi
| + msm8909-camera-sensor-cdp.dtsi
| + dsi-panel-hx8394d-720p-video.dtsi
| + dsi-panel-sharp-qhd-video.dtsi
| + dsi-panel-truly-wvga-cmd.dtsi
| + dsi-panel-hx8394d-qhd-video.dtsi
+ msm8909-pm8909.dtsi
| + msm-pm8909-rpm-regulator.dtsi
| + msm-pm8909.dtsi
| + msm8909-regulator.dtsi
| + msm8909-pm8909-pm.dtsi
+ msm8909-pm8909-cdp.dtsi
訂閱:
文章 (Atom)