I have recompiled the kernel a few times and have found out that it
is actually impossible to NOT get the hwclock to work.
The reason is that either privileged i/o has to be disabled or enhanced
real time clock has to be enabled. However at least when you use
"make menuconfig" - as soon as you enable privileged i/o you cannot
select enhanced real time clock any more and the kernel automatically
compiles in RTC support!
I think it is anyway a good idea to enable RTC (linux used to send those
annoying messages about missing char-major-10-135 messages to syslog
on some distros). The docu says that RTC is recommended for SMP enabled
kernels and certain applications (such as periodic data sampling) need it.
The current setclock script will call hwclock in such a way that the
empty /etc/sysconfig/clock file will trigger the default hwclock behaviour
(which is localtime). So the description in the book is wrong (see man hwclock)
and should be changed accordingly.
Also if HLFS runs on its own, it doesn't matter the least whether we choose
localtime or utc since this info is just used in the startup scripts.
However when we use HLFS on PCs together with other operating systems such as
Windows (which needs localtime) we must choose the same setting as those OSes.
Therefore I think localtime should be the default in the book (although
utc feels more "professional").
Sebastian Faulborn
EMail: info _at_ aliensoft _dot_ org
Homepage: http://www.secure-slinux.org
According to: http://www.grsecurity.net/confighelp.php
it looks like hwclock works if rtc is enabled in the kernel, if disable i/o is
enabled. I think either grsecurity changed, or our bootscripts changed, since
I last tried the setclock script. Can you confirm the LFS setclock script
works, with all but the 'disable i/o' and 'kmem' options enabled?
robert
On March 22, 2006 01:13 pm, Sebastian Faulborn wrote:
Hello everybody!
In "HLFS/Chapter07/Configuring the setclock Script" it says that the
setclock script does not work with grsec enabled kernels.
However when I issue "hwclock --hctosys --utc" or "hwclock --hctosys
--localtime" my output of "date" shifts correctly by 1 hour and
grsec correctly logs the change in time to syslog (I am +1hr GMT). I
have all grsec/pax options enabled except for those which make X-Windows
fail.
Similarly writing to the hardware clock also works.
Is it possible that grsec now supports setting the clock correctly?
Sebastian Faulborn
EMail: info _at_ aliensoft _dot_ org
Homepage: www.secure-slinux.org <http://www.secure-slinux.org>
--
http://linuxfromscratch.org/mailman/listinfo/hlfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page