boot.rc 578 B

123456789101112131415161718192021222324252627282930
  1. #!/boot/rc -m /boot/rcmain
  2. /boot/echo -n boot...
  3. path=(/bin /boot)
  4. bind '#p' /proc
  5. bind '#d' /fd
  6. bind -a '#P' /dev
  7. bind -a '#t' /dev
  8. bind -a '#S' /dev
  9. bind -a '#I' /net
  10. echo -n rpi >/dev/hostowner
  11. echo -n fdisk...
  12. fdisk -p /dev/sdM0/data >/dev/sdM0/ctl
  13. dossrv -f/dev/sdM0/dos boot
  14. rootdir=/root/plan9
  15. rootspec=''
  16. mount -c /srv/boot /root
  17. bind -ac $rootdir /
  18. bind -ac $rootdir/mnt /mnt
  19. bind /$cputype/bin /bin
  20. bind -a /rc/bin /bin
  21. if (! ~ $#init 0)
  22. exec `{echo $init}
  23. if (~ $service cpu)
  24. exec /$cputype/init -c
  25. if not
  26. exec /$cputype/init -t
  27. exec /boot/rc -m/boot/rcmain -i