On Wed, Dec 6, 2023 at 3:46 PM Svante Signell <svante.sign...@gmail.com> wrote:
> ---------- Forwarded message ----------
> From: Svante Signell <svante.sign...@gmail.com>
> To: debian-init-divers...@chiark.greenend.org.uk
> Cc:
> Bcc:
> Date: Wed, 06 Dec 2023 14:20:09 +0100
> Subject: Re: Bug#1057634: /sbin/hwclock: unrecognized option '--rtc=/dev/rtc0'
> On Wed, 2023-12-06 at 12:07 +0000, Mark Hindley wrote:
> > Chris,
> >
> > Thanks for your input.
> >
> > On Wed, Dec 06, 2023 at 11:56:56AM +0100, Chris Hofstaedtler wrote:
> > > * Mark Hindley <m...@hindley.org.uk> [231206 11:42]:
> > > > Is hwclock actually useful on Hurd? I (naively) expected it to be linux
> > > > only. But src:util-linux still ships it[1]. Or is the HCTOSYS_DEVICE 
> > > > used
> > > > in the
> > > > initscripts just wrong on Hurd?
> > >
> > > I have zero knowledge about hurd, but it looks like[1] hwclock is built
> > > with CMOS support on hurd.  So maybe it could work?
> > >
> > > It certainly is built without the RTC support, so --rtc=... doesn't
> > > work.
> >
> > A superficial attempt on exodar.debian.net isn't particularly encouraging:
> >
> > leepen@exodar:~$ /sbin/hwclock --test
> > hwclock from util-linux 2.39.2
> > System Time: 1701863851.810595
> > No usable clock interface found.
> > hwclock: Cannot access the Hardware Clock via any known method.
> >
> > I suggest we wait for a response from the Hurd experts. But maybe
> > util-linux-extra should be arch:linux-any?
> >
>
> On a qemu Hurd image:
>
> /sbin/hwclock --help | grep rtc
>     --directisa                 use the ISA bus instead of /dev/rtc0 access
>
> /sbin/hwclock --directisa --show
> 2023-12-06 14:17:54.949951+01:00

That works on my Hurd-i386 host, and it shows the correct time.

Init scripts therefore need to use "--rtc=/dev/rtc0" on Linux hosts
and "--directisa" on Hurd hosts.

Martin-Éric

Reply via email to