[root@(none) ~]# xbmc
Home directory /root not ours.
ALSA lib confmisc.c:768:(parse_card) cannot find card '0'
ALSA lib conf.c:4154:(_snd_config_evaluate) fHIAO_MIXER_Open try allocate bytes 32768 sample rate 8000
unction snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4154:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
ALSA lib conf.c:4154:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4633:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2211:(snd_pcm_open_noupdate) Unknown PCM default
/usr/bin/xbmc: line 135: 1642 Illegal instruction "$LIBDIR/xbmc/xbmc.bin" $SAVED_ARGS
Crash report available at /root/xbmc_crashlog-19700101_105006.log
alsa代码里报错,说明已经解决了依赖问题,开始跑了
开始的时候光注意一串alsa报错了,然后看了网上的建议,又修改.xinitrc配置的,有修改设备驱动设备号的(options xxx index=0,针对说cannot find card '0' )。试了一下,都不管用。
注意到最后两行,可以查看log:xbmc_crashlog-19700101_105006.log
############## XBMC CRASH LOG ###############
################ SYSTEM INFO ################
Date: Thu Jan 1 10:25:02 CST 1970
XBMC Options:
Arch: armv7l
Kernel: Linux 2.6.35.7_hi3716m #1 Fri Nov 25 08:59:50 CST 2011
Release:
LSB Version: :core-3.1-arm:core-3.1-noarch:core-3.2-arm:core-3.2-noarch:core-4.0-arm:core-4.0-noarch:desktop-
3.1-arm:desktop-3.1-noarch:desktop-3.2-arm:desktop-3.2-noarch:desktop-4.0-arm:desktop-4.0-noarch
Distributor ID: MeeGo
Description: MeeGo release 1.2.0 (MeeGo)
Release: 1.2.0
Codename: MeeGo
############## END SYSTEM INFO ##############
############### STACK TRACE #################
############# END STACK TRACE ###############
################# LOG FILE ##################
10:25:02 T:1104227536 M: 57884672 NOTICE: -----------------------------------------------------------------------
10:25:02 T:1104227536 M: 57856000 NOTICE: Starting XBMC, Platform: Linux (MeeGo release 1.2.0 (MeeGo), 2.6.35.7_hi3716m
armv7l). Built on Nov 21 2011 (Git:Unknown)
10:25:02 T:1104227536 M: 57856000 NOTICE: special://xbmc/ is mapped to: /usr/share/xbmc
10:25:02 T:1104227536 M: 57856000 NOTICE: special://xbmcbin/ is mapped to: /usr/lib/xbmc
10:25:02 T:1104227536 M: 57856000 NOTICE: special://masterprofile/ is mapped to: /root/.xbmc/userdata
10:25:02 T:1104227536 M: 57856000 NOTICE: special://home/ is mapped to: /root/.xbmc
10:25:02 T:1104227536 M: 57856000 NOTICE: special://temp/ is mapped to: /root/.xbmc/temp
10:25:02 T:1104227536 M: 57856000 NOTICE: The executable running is: ############## XBMC CRASH LOG ###############
################ SYSTEM INFO ################
Date: Thu Jan 1 10:25:02 CST 1970
XBMC Options:
Arch: armv7l
Kernel: Linux 2.6.35.7_hi3716m #1 Fri Nov 25 08:59:50 CST 2011
Release:
LSB Version: :core-3.1-arm:core-3.1-noarch:core-3.2-arm:core-3.2-noarch:core-4.0-arm:core-4.0-noarch:desktop-
3.1-arm:desktop-3.1-noarch:desktop-3.2-arm:desktop-3.2-noarch:desktop-4.0-arm:desktop-4.0-noarch
Distributor ID: MeeGo
Description: MeeGo release 1.2.0 (MeeGo)
Release: 1.2.0
Codename: MeeGo
############## END SYSTEM INFO ##############
############### STACK TRACE #################
############# END STACK TRACE ###############
################# LOG FILE ##################
10:25:02 T:1104227536 M: 57884672 NOTICE: -----------------------------------------------------------------------
10:25:02 T:1104227536 M: 57856000 NOTICE: Starting XBMC, Platform: Linux (MeeGo release 1.2.0 (MeeGo), 2.6.35.7_hi3716m
armv7l). Built on Nov 21 2011 (Git:Unknown)
10:25:02 T:1104227536 M: 57856000 NOTICE: special://xbmc/ is mapped to: /usr/share/xbmc
10:25:02 T:1104227536 M: 57856000 NOTICE: special://xbmcbin/ is mapped to: /usr/lib/xbmc
10:25:02 T:1104227536 M: 57856000 NOTICE: special://masterprofile/ is mapped to: /root/.xbmc/userdata
10:25:02 T:1104227536 M: 57856000 NOTICE: special://home/ is mapped to: /root/.xbmc
10:25:02 T:1104227536 M: 57856000 NOTICE: special://temp/ is mapped to: /root/.xbmc/temp
10:25:02 T:1104227536 M: 57856000 NOTICE: The executable running is: /usr/lib/xbmc/xbmc.bin
10:25:02 T:1104227536 M: 57856000 NOTICE: Log File is located: /root/.xbmc/temp/xbmc.log
10:25:02 T:1104227536 M: 57856000 NOTICE: -----------------------------------------------------------------------
10:25:02 T:1104227536 M: 57856000 ERROR: CXRandR::Query - unable to open xrandr xml
10:25:02 T:1104227536 M: 57856000 NOTICE: Setup SDL
############### END LOG FILE ################
############ END XBMC CRASH LOG #############
10:25:02 T:1104227536 M: 57856000 NOTICE: Log File is located: /root/.xbmc/temp/xbmc.log
10:25:02 T:1104227536 M: 57856000 NOTICE: -----------------------------------------------------------------------
10:25:02 T:1104227536 M: 57856000 ERROR: CXRandR::Query - unable to open xrandr xml
10:25:02 T:1104227536 M: 57856000 NOTICE: Setup SDL
############### END LOG FILE ################
############ END XBMC CRASH LOG #############
看log file正文 ,可以知道/usr/bin/xbmc并非可执行程序,/usr/lib/xbmc/xbmc.bin才是,那么/usr/bin/xbmc应该是个引导启动的脚本
打开/usr/bin/xbmc,可以看到,正是这个脚本创建了上面的log文件。
echo " XBMC Options: $*" >> $FILE
echo -n " Arch: " >> $FILE
uname -m >> $FILE
echo -n " Kernel: " >> $FILE
uname -rvs >> $FILE
echo -n " Release: " >> $FILE
if which lsb_release > /dev/null; then
echo >> $FILE
lsb_release -a 2> /dev/null | sed -e 's/^/ /' >> $FILE
else
echo "lsb_release not available" >> $FILE
fi
echo "############## END SYSTEM INFO ##############" >> $FILE
echo >> $FILE
echo "############### STACK TRACE #################" >> $FILE
single_stacktrace "$PWD" 1
# Find in plugins directories
if [ $XBMC_HOME ]; then
BASEDIR=$XBMC_HOME
else
BASEDIR="$LIBDIR/xbmc/"
fi
single_stacktrace "$BASEDIR" 5
# find in user xbmc dir
single_stacktrace $HOME/.xbmc/ 5
echo "############# END STACK TRACE ###############" >> $FILE
echo >> $FILE
echo "################# LOG FILE ##################" >> $FILE
echo >> $FILE
if [ -f ~/.xbmc/temp/xbmc.log ]
then
cat ~/.xbmc/temp/xbmc.log >> $FILE
echo >> $FILE
else
echo "Logfile not found in the usual place." >> $FILE
echo "Please attach it seperately." >> $FILE
echo "Use pastebin.com or similar for forums or IRC." >> $FILE
fi
echo >> $FILE
echo "############### END LOG FILE ################" >> $FILE
echo >> $FILE
echo "############ END XBMC CRASH LOG #############" >> $FILE
echo "Crash report available at $FILE"
}
python /usr/share/xbmc/FEH.py $SAVED_ARGS
RET=$?
if [ $RET -ne 0 ]; then
exit $RET
fi
if which gdb >/dev/null 2>&1; then
# Output warning in case ulimit is unsupported by shell
eval ulimit -c unlimited
if [ ! $? = "0" ]; then
echo "xbmc: ulimit is unsupported by this shell" 1>&2
fi
fi
LOOP=1
while [ $(( $LOOP )) = "1" ]
do
LOOP=0
# BUG, will be removed when dharma is released and LATM has been released which should be soon!
export LD_PRELOAD="/usr/lib/libfaad.so.2 /usr/lib/libbz2.so"
"$LIBDIR/xbmc/xbmc.bin" $SAVED_ARGS
RET=$?
if [ $(( $RET == 65 )) = "1" ]
then # User requested to restart app
LOOP=1
elif [ $(( ($RET >= 131 && $RET <= 136) || $RET == 139 )) = "1" ]
then # Crashed with core dump
print_crash_report
fi
done
unset LD_PRELOAD
exit $RET
查看log,发现 Arch: armv7l 与我们期待的 Arch: armv7hl不符,找到xbmc脚本中对应指令,
echo -n " Arch: " >> $FILE
uname -m >> $FILE
uname 是向标准输出写入正在使用的操作系统名,加上-m参数则显示硬件运行系统的机器 ID 号。可见,在盒子上利用chroot调试meego,还是不能完全模拟底层环境。但判断这里应该不是导致无法启动的主要原因。
分析无法启动的原因:1、音频初始化过程中alsa找不到对应的设备,无声音;2、视频初始化过程中找不到xrandr xml,无图像;3、找不到xrandr xml直接报错,退出了程序执行过程;4、因为最后一行打印是Setup SDL 也可能是无法启动SDL导致退出;5、xbmc脚本里的一行命令报错/usr/bin/xbmc: line 135: 1642 Illegal instruction "$LIBDIR/xbmc/xbmc.bin" $SAVED_ARGS导致退出。
再看脚本xbmc,发现log file 正文部分并非在脚本里写的,而是通过cat ~/.xbmc/temp/xbmc.log >> $FILE将xbmc.log输出到正文处,真正写xbmc.log的是xbmc源码中Application.cpp,而报错的正是bool CXRandR::Query(bool force)函数