一:编译xboot
在android目录下执行如下脚本进行编译:
./mk -x
二:烧写xboot
使用xboot烧写脚本烧写。
三:xboot如何在串口终端输出打印信息
xboot的终端输出可以选择LCD或者串口,如果是LCD,则直接显示在LCD上,如果是串
口,则可通过PC机的串口监测工具显示出来。
在xboot_main函数的do_system_cfg函数中,以下语句用于设置终端输出位置:
if(! console_stdio_load(“/etc/console.xml”))
{
if(! console_stdio_load(“/romdisk/etc/console.xml”))
LOG_E(“can not setting the standard console”);
}
在console_stdio_load函数中,调用xml_get函数从console.xml文件中获得stdin,
stdout以及stderr的输出位置。因此,我们直接设置xboot/src/romdisk/etc/console.xml
中的内容即可。
默认的设置如下:
<?xml version=”1.0″ encoding=”UTF-8″?>
<console>
<stdin name=”input”/>
<stdout name=”fb”/>
<stderr name=”fb”/>
</console>
这时,串口调试信息为关闭状态,输出信息直接输出到LCD上。<