Hi,
After doing more reading document and code. I think now I have a better
understanding of adding /dev/rtc. As suggested by Samuel, because RTC
operations belong to p-group[1],we can write a pioctl.defs for p-group
io operations. Then this defs file can generate *_pioctl_S.h (a user
header module); we will include this file in pioctl-ops.c which wil
contain the core implementations of /dec/rtc ioctl operation
(pioctl.defs is for the communication between ioctl and server). After
that, we just need to implement pioctl-ops.c for accessing rtc device.
However, I still have a question:
- Which server should have the implementation pioctl-ops.c, pfinet or
lwip? The directory of pfinet has the register definitions for rtc
device[1], but the document mentions that lwip can be a replacement for
pfinet. Maybe we can move mc146818rtc.h to lwip, or create a new server
(because pfinet and lwip are for TCP/IP), or there is a server which
should handle accessing rtc.
[1]:https://git.savannah.gnu.org/cgit/hurd/hurd.git/tree/pfinet/linux-src/include/linux/mc146818rtc.h
[2]:https://darnassus.sceen.net/~hurd-web/hurd/translator/pfinet/
<https://darnassus.sceen.net/~hurd-web/hurd/translator/pfinet/>
--
Zhaoming Luo <zhaoming1...@qq.com>