Upgraded utils...
Hi,
Since I'm working on 2.4.0-testx I upgraded modutils, e2fsprogs and util-linux as suggested... (looking at the changes list).
Now I have the following behaviour:
on boot
"cannot access hardware clock by any known method"
on damaged boot partition --- 2.4.0-test4 crashes one in three times on reboot :-(
generally heart-stopping behaviour from fsck saying that is cannot find things and then dropping me into manual fsck...
Is there something else I need to upgrade? or remove?
Iain.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Quoted 4 lines · Iain Sandoe
Hi,
Since I'm working on 2.4.0-testx I upgraded modutils, e2fsprogs and util-linux as suggested... (looking at the changes list).
You compiled util-linux yourself?
Quoted 5 lines
Now I have the following behaviour:
on boot
"cannot access hardware clock by any known method"
Could be /sbin/hwclock is now a binary that was compiled with util-linux. This doesn't mean it works, though. Better put the old fake hwclock shell script there ("/sbin/clock -s"). Or is one now supposed to create /dev/rtc and use it as on any other architecture?
Quoted 2 lines
on damaged boot partition --- 2.4.0-test4 crashes one in three times on reboot :-(
Mine doesn't boot at all, so you are more advanced there :-)
Quoted 4 lines
generally heart-stopping behaviour from fsck saying that is cannot find things and then dropping me into manual fsck...
Is there something else I need to upgrade? or remove?
--
Martin
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Quoted 4 lines · Martin Costabel
Could be
/sbin/hwclockis now a binary that was compiled with util-linux. This doesn't mean it works, though. Better put the old fake hwclock shell script there ("/sbin/clock-s"). Or is one now supposed to create/dev/rtcand use it as on any other architecture?
Yes! That's why I did CONFIG_PPC_RTC, it's such simple code, but it helps a lot to bring us in line with the other architectures.
Franz.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Quoted 9 lines · Franz Sirl
Quoted 4 lines · Martin Costabel
Could be
/sbin/hwclockis now a binary that was compiled with util-linux. This doesn't mean it works, though. Better put the old fake hwclock shell script there ("/sbin/clock-s"). Or is one now supposed to create/dev/rtcand use it as on any other architecture?Yes! That's why I did
CONFIG_PPC_RTC, it's such simple code, but it helps a lot to bring us in line with the other architectures.
Yes, sorry I forgot, I have actually already used this, back in the good old days when I could still boot 2.4.0-testX. But does this actually work with the hwclock program from standard RedHat util-linux?
--
Martin
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Quoted 9 lines · Franz Sirl
Quoted 4 lines · Martin Costabel
Could be
/sbin/hwclockis now a binary that was compiled with util-linux. This doesn't mean it works, though. Better put the old fake hwclock shell script there ("/sbin/clock-s"). Or is one now supposed to create/dev/rtcand use it as on any other architecture?Yes! That's why I did
CONFIG_PPC_RTC, it's such simple code, but it helps a lot to bring us in line with the other architectures.
For the record: Yes, it works. (On a Pmac 6400, with a 2.2.17pre11 kernel from bitkeeper; 2.4.0-test4 still doesn't want to boot, so I can't test it).
I was too timid and had compiled PPC_RTC only as a module. Apparently the kernel does not load this module automatically, but when I put a line
/sbin/modprobe rtc
just before the hwclock stuff in /etc/rc.sysinit, it works (yes /etc/rc.sysinit; this is initscripts-5.27 which has /etc/rc.d as symlink to /etc, so that all the rc* stuff now clutters /etc. Big progress...)
/sbin/hwclock comes from util-linux-2.10k, compiled without problems from the RedHat SRPM.
Thanks
--
Martin
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
RTC on 2.4.0-test4 (Was Re: Upgraded utils...)
Quoted 2 lines · Martin Costabel
Franz Sirl wrote:
[]
Quoted 6 lines
Quoted 2 lines
Yes! That's why I did
CONFIG_PPC_RTC, it's such simple code, but it helps a lot to bring us in line with the other architectures.For the record: Yes, it works. (On a Pmac 6400, with a 2.2.17pre11 kernel from bitkeeper; 2.4.0-test4 still doesn't want to boot, so I can't test it).
On bitkeeper kernel 2.4.0-test4, I could get it to work, with the following modifications (a patch is attached below):
- The file drivers/macintosh/rtc.c was absent. I copied the one from the _2_2 kernel tree and changed it in analogy to the sbus/rtc.c file.
- In drivers/macintosh/Makefile, rtc.o should be in O_OBJS instead of L_OBJS.
- If compiled as module, rtc reports unresolved symbols, because the EXPORT_SYMBOLS in arch/ppc/kernel/ppc_ksyms.c are between #ifdef CONFIG_PPC_RTC - #endif
instead of #ifdef CONFIG_PPC_RTC_MODULE, as in the _2_2 tree.
--
Martin
arch/ppc/kernel/ppc_ksyms.c renamed from arch/ppc/kernel/ppc_ksyms.c.ori +1 -1
@@ -254,7 +254,7 @@EXPORT_SYMBOL (pmac_xpram_read);EXPORT_SYMBOL (pmac_xpram_write);#endif /* CONFIG_NVRAM */ -#ifdef CONFIG_PPC_RTC +#ifdef CONFIG_PPC_RTC_MODULE EXPORT_SYMBOL (mktime);EXPORT_SYMBOL (to_tm);#endif
drivers/macintosh/Makefile renamed from drivers/macintosh/Makefile.ori +1 -1
@@ -41,7 +41,7 @@ endif ifeq ($(CONFIG_PPC_RTC),y) - L_OBJS += rtc.o + O_OBJS += rtc.o else ifeq ($(CONFIG_PPC_RTC),m) M_OBJS += rtc.o
drivers/macintosh/rtc.c +10 -15
@@ -21,6 +21,7 @@#include <linux/fcntl.h> #include <linux/poll.h> #include <linux/init.h> +#include <linux/smp_lock.h> #include <linux/mc146818rtc.h> #include <asm/system.h> #include <asm/uaccess.h>
@@ -53,7 +54,7 @@ nowtime =mktime (t->tm_year+1900 , t->tm_mon+1 , t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec); -printk (KERN_INFO "rtc.c:set_rtc_time: set rtc time to %d seconds.\n" , nowtime); +printk (KERN_INFO "rtc.c:set_rtc_time: set rtc time to %ld seconds.\n" , nowtime); (ppc_md.set_rtc_time)(nowtime); }
@@ -109,29 +110,23 @@ rtc_busy =1 ; -MOD_INC_USE_COUNT ; -return 0 ; }static int rtc_release (struct inode *inode,struct file *file) { -MOD_DEC_USE_COUNT ; +lock_kernel (); rtc_busy =0 ; +unlock_kernel ();return 0 ; }static struct file_operations rtc_fops = { - rtc_lseek, -NULL ,/* rtc_read */ -NULL ,/* rtc_write */ -NULL ,/* rtc_readdir */ -NULL ,/* rtc_poll */ - rtc_ioctl, -NULL ,/* rtc_mmap */ - rtc_open, -NULL ,/* flush */ - rtc_release + owner:THIS_MODULE , + llseek: rtc_lseek, + ioctl: rtc_ioctl, + open: rtc_open, + release: rtc_release, };static struct miscdevice rtc_dev = {RTC_MINOR ,"rtc" , &rtc_fops };
@@ -141,7 +136,7 @@#ifdef MODULE int init_module(void)#else -__initfunc(int rtc_init(void)) +int __init rtc_init(void)#endif {int error;