grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] New command checktime


From: Bean
Subject: Re: [PATCH] New command checktime
Date: Thu, 7 Aug 2008 16:05:04 +0800

On Thu, Aug 7, 2008 at 3:57 AM, Robert Millan <address@hidden> wrote:
> On Wed, Aug 06, 2008 at 11:09:44PM +0800, Bean wrote:
>> On Wed, Aug 6, 2008 at 7:35 PM, Robert Millan <address@hidden> wrote:
>> > Can we make this portable by accessing 0x70 / 0x71 I/O ports instead?
>>
>> Hi,
>>
>> Good point. The new patch uses cmos to get datetime setting, it should
>> be generic among i386 platforms.
>
> Yep, this works on Coreboot as well (with the obvious i386-coreboot.rmk
> adjustment).  Nice work!
>
>> +      grub_printf ("%d-%02d-%02d %02d:%02d:%02d %d\n",
>> +                   year, month, day, hour, min, sec, dow);
>
> Btw, the dow part looks weird when printed.  Without looking at the code,
> it's difficult to tell what that final number means.

Hi,

This patch replaces the day of week number with string. Also, it
extends to efi and other i386 platform as well.

2008-08-07  Bean  <address@hidden>

        * conf/i386-pc.rmk (pkglib_MODULES): Add chktime.mod.
        (chktime_mod_SOURCES): New macro.
        (chktime_mod_CFLAGS): Likewise.
        (chktime_mod_LDFLAGS): Likewise.

        * conf/i386-coreboot.rmk (pkglib_MODULES): Add chktime.mod.
        (chktime_mod_SOURCES): New macro.
        (chktime_mod_CFLAGS): Likewise.
        (chktime_mod_LDFLAGS): Likewise.

        * conf/i386-ieee1275.rmk (pkglib_MODULES): Add chktime.mod.
        (chktime_mod_SOURCES): New macro.
        (chktime_mod_CFLAGS): Likewise.
        (chktime_mod_LDFLAGS): Likewise.

        * conf/i386-efi.rmk (pkglib_MODULES): Add chktime.mod.
        (chktime_mod_SOURCES): New macro.
        (chktime_mod_CFLAGS): Likewise.
        (chktime_mod_LDFLAGS): Likewise.

        * conf/x86_64-efi.rmk (pkglib_MODULES): Add chktime.mod.
        (chktime_mod_SOURCES): New macro.
        (chktime_mod_CFLAGS): Likewise.
        (chktime_mod_LDFLAGS): Likewise.

        * commands/checktime.c: New file.

        * include/grub/datetime.h: Likewise.

        * include/grub/i386/cmos.h: Likewise.

        * kern/i386/datetime.c: Likewise.

        * kern/efi/datetime.c: Likewise.

-- 
Bean

Attachment: checktime_3.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]