明远智睿技术论坛

标题: MY-I.MX6_MB V2.4底板RTC [打印本页]

作者: Andy    时间: 2016-10-25 19:15
标题: MY-I.MX6_MB V2.4底板RTC
底板:MY-I.MX6_MB V2.4  核心板MYZR_IMX6 CB_V2.1   系统:android 4.4.2
软硬件全都是myzr提供的  请问 现在RTC时钟无效,掉电后无法保持时间,这个是哪里的问题

作者: sales    时间: 2016-10-26 15:18
安装电池了?
作者: 软件01    时间: 2016-10-26 16:29
你好,默认的镜像在android4.2.2有编译,在android4.4.2没编译isl-1208.c的驱动,还有你可以按我下面的方法修改驱动就可以了
首先把make menuconfig 加上配置isl1208
在rct-isl1208.c的文件修改:
struct rtc_time rtc_tm;
    struct rtc_time set_tm;
    int err = 0;
    unsigned long rtc_secs, default_secs=946684800;//2000-1-1

probe函数里的return 0之前 再加
err = isl1208_i2c_read_time(client, &rtc_tm);
    if (err)
        return err;
    err = rtc_tm_to_time(&rtc_tm, &rtc_secs);
    if (err)
        return err;
    //printk("rtc_secs=%d\n",rtc_secs);
    if(rtc_secs <= default_secs)
    {
        rtc_time_to_tm(default_secs, &set_tm);
        isl1208_rtc_set_time(&client->dev, &set_tm);
    }

作者: Andy    时间: 2016-10-27 15:34
在kernel_imx文件夹下运行make menuconfig吗?
运行之后提示错误
myzr@u12045:~/myandroid4_2_2/kernel_imx$ make menuconfig
  HOSTLD  scripts/kconfig/mconf
scripts/kconfig/mconf.o: In function `show_help':
mconf.c.text+0x744): undefined reference to `stdscr'
scripts/kconfig/mconf.o: In function `main':
mconf.c.text.startup+0x66): undefined reference to `initscr'
mconf.c.text.startup+0x6d): undefined reference to `stdscr'
scripts/kconfig/lxdialog/checklist.o: In function `print_arrows':
checklist.c.text+0x41): undefined reference to `wmove'
checklist.c.text+0x61): undefined reference to `acs_map'
checklist.c.text+0x69): undefined reference to `waddch'
checklist.c.text+0x7b): undefined reference to `waddnstr'
checklist.c.text+0x8c): undefined reference to `wmove'
checklist.c.text+0xb3): undefined reference to `acs_map'
checklist.c.text+0xbb): undefined reference to `waddch'
checklist.c:(.text+0x10b): undefined reference to `acs_map'
checklist.c:(.text+0x113): undefined reference to `waddch'
checklist.c:(.text+0x11a): undefined reference to `acs_map'
checklist.c:(.text+0x122): undefined reference to `waddch'
checklist.c:(.text+0x129): undefined reference to `acs_map'
checklist.c:(.text+0x131): undefined reference to `waddch'
checklist.c:(.text+0x138): undefined reference to `acs_map'
checklist.c:(.text+0x183): undefined reference to `acs_map'
checklist.c:(.text+0x18b): undefined reference to `waddch'
checklist.c:(.text+0x192): undefined reference to `acs_map'
checklist.c:(.text+0x19a): undefined reference to `waddch'
checklist.c:(.text+0x1a1): undefined reference to `acs_map'
checklist.c:(.text+0x1a9): undefined reference to `waddch'
checklist.c:(.text+0x1b0): undefined reference to `acs_map'
checklist.c:(.text+0x1b8): undefined reference to `waddch'
scripts/kconfig/lxdialog/checklist.o: In function `print_item':
checklist.c:(.text+0x240): undefined reference to `wmove'
checklist.c:(.text+0x265): undefined reference to `waddch'
checklist.c:(.text+0x27f): undefined reference to `wmove'
checklist.c:(.text+0x2d8): undefined reference to `wmove'
checklist.c:(.text+0x2ea): undefined reference to `waddch'
checklist.c:(.text+0x316): undefined reference to `waddnstr'
checklist.c:(.text+0x32f): undefined reference to `wmove'
checklist.c:(.text+0x337): undefined reference to `wrefresh'
checklist.c:(.text+0x370): undefined reference to `wprintw'
scripts/kconfig/lxdialog/checklist.o: In function `print_buttons':
checklist.c:(.text+0x419): undefined reference to `wmove'
scripts/kconfig/lxdialog/checklist.o: In function `dialog_checklist':
checklist.c:(.text+0x517): undefined reference to `stdscr'
checklist.c:(.text+0x569): undefined reference to `COLS'
checklist.c:(.text+0x57d): undefined reference to `stdscr'
checklist.c:(.text+0x58d): undefined reference to `LINES'
checklist.c:(.text+0x5bf): undefined reference to `newwin'
checklist.c:(.text+0x5cf): undefined reference to `keypad'
checklist.c:(.text+0x614): undefined reference to `wmove'
checklist.c:(.text+0x620): undefined reference to `acs_map'
checklist.c:(.text+0x628): undefined reference to `waddch'
checklist.c:(.text+0x653): undefined reference to `acs_map'
checklist.c:(.text+0x65e): undefined reference to `waddch'
checklist.c:(.text+0x690): undefined reference to `acs_map'
checklist.c:(.text+0x695): undefined reference to `waddch'
checklist.c:(.text+0x6f3): undefined reference to `subwin'
checklist.c:(.text+0x705): undefined reference to `keypad'
checklist.c:(.text+0x891): undefined reference to `wnoutrefresh'
checklist.c:(.text+0x89b): undefined reference to `wnoutrefresh'
checklist.c:(.text+0x8a0): undefined reference to `doupdate'
checklist.c:(.text+0x8b9): undefined reference to `wgetch'
checklist.c:(.text+0x9e9): undefined reference to `doupdate'
checklist.c:(.text+0xa01): undefined reference to `delwin'
checklist.c:(.text+0xa09): undefined reference to `delwin'
checklist.c:(.text+0xa69): undefined reference to `scrollok'
checklist.c:(.text+0xa78): undefined reference to `wscrl'
checklist.c:(.text+0xa84): undefined reference to `scrollok'
checklist.c:(.text+0xad8): undefined reference to `wnoutrefresh'
checklist.c:(.text+0xae2): undefined reference to `wrefresh'
checklist.c:(.text+0xb5d): undefined reference to `wnoutrefresh'
checklist.c:(.text+0xb67): undefined reference to `wrefresh'
checklist.c:(.text+0xbf2): undefined reference to `delwin'
checklist.c:(.text+0xbfa): undefined reference to `delwin'
checklist.c:(.text+0xc59): undefined reference to `scrollok'
checklist.c:(.text+0xc68): undefined reference to `wscrl'
checklist.c:(.text+0xc74): undefined reference to `scrollok'
checklist.c:(.text+0xccf): undefined reference to `wnoutrefresh'
checklist.c:(.text+0xcd9): undefined reference to `wrefresh'
checklist.c:(.text+0xcfa): undefined reference to `doupdate'
checklist.c:(.text+0xd30): undefined reference to `delwin'
checklist.c:(.text+0xd38): undefined reference to `delwin'
checklist.c:(.text+0xdd9): undefined reference to `wrefresh'
checklist.c:(.text+0xdde): undefined reference to `doupdate'
checklist.c:(.text+0xdf4): undefined reference to `doupdate'
checklist.c:(.text+0xe0c): undefined reference to `doupdate'
checklist.c:(.text+0xe18): undefined reference to `acs_map'
checklist.c:(.text+0xe1f): undefined reference to `waddch'
scripts/kconfig/lxdialog/checklist.o: In function `print_arrows':
checklist.c:(.text+0xef): undefined reference to `waddnstr'
checklist.c:(.text+0x162): undefined reference to `waddch'
scripts/kconfig/lxdialog/checklist.o: In function `print_buttons':
checklist.c:(.text+0x439): undefined reference to `wrefresh'
scripts/kconfig/lxdialog/util.o: In function `init_one_color':
util.c:(.text+0x46f): undefined reference to `init_pair'
scripts/kconfig/lxdialog/util.o: In function `attr_clear':
util.c:(.text+0x4d1): undefined reference to `wmove'
util.c:(.text+0x4ed): undefined reference to `waddch'

作者: Andy    时间: 2016-10-27 15:36
最后的部分是
scripts/kconfig/lxdialog/menubox.o: In function `print_buttons':
menubox.c.text+0x491): undefined reference to `wmove'
scripts/kconfig/lxdialog/menubox.o: In function `dialog_menu':
menubox.c.text+0x502): undefined reference to `stdscr'
menubox.c.text+0x576): undefined reference to `COLS'
menubox.c.text+0x58a): undefined reference to `stdscr'
menubox.c.text+0x597): undefined reference to `LINES'
menubox.c.text+0x5d0): undefined reference to `newwin'
menubox.c.text+0x5e0): undefined reference to `keypad'
menubox.c.text+0x626): undefined reference to `wmove'
menubox.c.text+0x632): undefined reference to `acs_map'
menubox.c.text+0x63a): undefined reference to `waddch'
menubox.c:(.text+0x653): undefined reference to `acs_map'
menubox.c:(.text+0x65f): undefined reference to `waddch'
menubox.c:(.text+0x686): undefined reference to `wbkgdset'
menubox.c:(.text+0x68d): undefined reference to `acs_map'
menubox.c:(.text+0x695): undefined reference to `waddch'
menubox.c:(.text+0x6f4): undefined reference to `subwin'
menubox.c:(.text+0x704): undefined reference to `keypad'
menubox.c:(.text+0x868): undefined reference to `wnoutrefresh'
menubox.c:(.text+0x8ba): undefined reference to `wmove'
menubox.c:(.text+0x8c2): undefined reference to `wrefresh'
menubox.c:(.text+0x8e4): undefined reference to `wgetch'
menubox.c:(.text+0xa11): undefined reference to `wrefresh'
menubox.c:(.text+0xa27): undefined reference to `delwin'
menubox.c:(.text+0xa2f): undefined reference to `delwin'
menubox.c:(.text+0xa7e): undefined reference to `delwin'
menubox.c:(.text+0xa86): undefined reference to `delwin'
menubox.c:(.text+0xbbc): undefined reference to `wnoutrefresh'
menubox.c:(.text+0xbc4): undefined reference to `wrefresh'
menubox.c:(.text+0xe4c): undefined reference to `scrollok'
menubox.c:(.text+0x1002): undefined reference to `delwin'
menubox.c:(.text+0x100a): undefined reference to `delwin'
menubox.c:(.text+0x10a4): undefined reference to `wbkgdset'
menubox.c:(.text+0x10ab): undefined reference to `acs_map'
menubox.c:(.text+0x10b2): undefined reference to `waddch'
scripts/kconfig/lxdialog/menubox.o: In function `do_scroll':
menubox.c:(.text+0x55): undefined reference to `wrefresh'
scripts/kconfig/lxdialog/menubox.o: In function `print_arrows':
menubox.c:(.text+0x1a4): undefined reference to `wrefresh'
scripts/kconfig/lxdialog/menubox.o: In function `do_print_item':
menubox.c:(.text+0x3a9): undefined reference to `wrefresh'
scripts/kconfig/lxdialog/menubox.o: In function `print_buttons':
menubox.c:(.text+0x4b1): undefined reference to `wrefresh'
collect2: ld 返回 1
make[1]: *** [scripts/kconfig/mconf] 错误 1
make: *** [menuconfig] 错误 2
myzr@u12045:~/myandroid4_2_2/kernel_imx$ ^C
myzr@u12045:~/myandroid4_2_2/kernel_imx$

作者: Andy    时间: 2016-11-9 14:08
软件01 发表于 2016-10-26 16:29
你好,默认的镜像在android4.2.2有编译,在android4.4.2没编译isl-1208.c的驱动,还有你可以按我下面的方法 ...

已经按照你说的加进去了  可是还是不好使呢
作者: 软件01    时间: 2016-11-25 09:34
Andy 发表于 2016-11-9 14:08
已经按照你说的加进去了  可是还是不好使呢

你好,首先看看有没生成isl-1208.o的文件,如果没有的话,有可以配置ISL1208没配置,
我记得有个文件是设置默认内核配置TARGET_KERNEL_DEFCONF := imx6_android_defconfig
你在deviece目录搜索文件,用如下命令:
grep TARGET_KERNEL_DEFCONF device -r
最后把这个“TARGET_KERNEL_DEFCONF := imx6_android_defconfig”注释掉




欢迎光临 明远智睿技术论坛 (http://bbs.myzr.com.cn/) Powered by Discuz! X3.2