- iinit();
- rootdir = iget(rootdev, (ino_t)ROOTINO);
- rootdir->i_flag &= ~ILOCK;
- u.u_cdir = iget(rootdev, (ino_t)ROOTINO);
- u.u_cdir->i_flag &= ~ILOCK;
+#ifdef GPROF
+ kmstartup();
+#endif
+
+ fs = mountfs(rootdev, 0, (struct inode *)0);
+ if (fs == 0)
+ panic("iinit");
+ bcopy("/", fs->fs_fsmnt, 2);
+
+/* initialize wall clock */
+ clockinit(fs->fs_time);
+ boottime = time;
+
+/* kick off timeout driven events by calling first time */
+ roundrobin();
+ schedcpu();
+ schedpaging();
+
+/* set up the root file system */
+ rootdir = iget(rootdev, fs, (ino_t)ROOTINO);
+ iunlock(rootdir);
+ u.u_cdir = iget(rootdev, fs, (ino_t)ROOTINO);
+ iunlock(u.u_cdir);