您的位置:程序门 -> linux/unix社区 -> 内核及驱动程序研究区



在 at91rm9200上移植linux2.6.12,请教几个内核配置问题


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


在 at91rm9200上移植linux2.6.12,请教几个内核配置问题[无满意答案结贴,结贴人:k_ewell]
发表于:2007-10-22 12:04:06 楼主
我准备在at91rm9200上移植2.6内核,其实我是2.6.12和17都试了,   最后在串口的打印都是
          ##   booting   image   at   10080000   ...
      image   name:
      image   type:       arm   linux   kernel   image   (gzip   compressed)
      data   size:         1123317   bytes   =     1.1   mb
      load   address:   20008000
      entry   point:     20008000
      verifying   checksum   ...   ok
      uncompressing   kernel   image   ...   ok

starting   kernel   ...

然后就什么都没有打印了.........

我想应该是串口设置的问题,patch后arch/arm/mach-at91rm9200/board-dk.c源码是:
/*
*   serial   port   configuration.
*         0   ..   3   =   usart0   ..   usart3
*         4             =   dbgu
*/
static   struct   at91_uart_config   __initdata   dk_uart_config   =   {
                .console_tty         =   0,                                                         /*   ttys0   */
                .nr_tty                   =   2,
                .tty_map                 =   {   4,   1,   -1,   -1,   -1   }                     /*   ttys0,   ...,   ttys4   */
};

参考网络上文章中说最终修改如下:
====================================================
static   struct   at91_uart_config   __initdata   dk_uart_config   =   {           .console_tty         =   0,       /*   ttys0   */
        .nr_tty     =   5,
        .tty_map         =   {   4,   1,   0,   2,   3   }       /*   ttys0,   ...,   ttys4   */               };

否则,新内核没有ttys4设备,而我们的serialconsole正是基于ttys4的,所以ramdisk解压后由于找不着ttys4而死掉。
=============================================================
我当然用的串口1,就是ttys0吧,联接的是debug端口,按注释应该是port   4,那按照我的理解:你修改的地方主要是:nr_tty这个差数,从2改到了5,什么意思呢
这个参数是什么
我自己把终端和端口可能搞胡涂了,ttys0应该是串口的端口1,   4   =   dbgu   应该是对应.tty_map=   {   4,   1,   -1,   -1,-1   }   中的第一个,这样理解应该没问题吧,可我的终端打印都是到starting   kernel   ...就永远的完了


刚转行搞linux,希望高手指点
另外:
1:   编译内核时会出现
                                                                                                drivers/video/console/vgacon.c:289:error:   for   each   function   it   appears   in.)
的错误,我想这个属于video模块,就把内核中的   devices   drivers---> graphics   support中的所由模块去掉了才解决这个错误,反正图型界面不影响串口的文字打印吧


2:   /drivers/serial/s3c2410.c   已更改#define   serial_s3c2410_name   "ttys"   ,问题依然  


快速检索

最新资讯
热门点击