mkfile 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. s=/sys/lib/dist/pc
  2. x=`{bind -b /sys/lib/dist/bin/$cputype /bin}
  3. default:V: ndisk
  4. ls -l ndisk
  5. SUB=`{ls sub inst}
  6. boot.raw:Q: proto $SUB
  7. rm -rf boot
  8. mkdir boot
  9. bind /dev/null /sys/log/timesync
  10. # make files writable for now.
  11. cat proto | sed 's!d000!d775!;s!000!664!;s!555!775!;s!444!664!' >proto.cp
  12. disk/mkfs -a proto.cp | disk/mkext -d boot
  13. @{
  14. cd boot/386
  15. strip init
  16. cd bin
  17. strip * */* >[2]/dev/null || status=''
  18. }
  19. cat proto | sed 's!/.*!!' >proto.cp
  20. disk/mkfs -a -s boot proto.cp | tee >{wc -c >[1=2]} |
  21. touchfs 1000000000 >boot.raw
  22. boot.bz2:Q: boot.raw
  23. ls -l boot.raw
  24. bflz -n 32 < boot.raw >boot.bflz
  25. ls -l boot.bflz
  26. bzip2 -9 < boot.bflz >$target
  27. ls -l $target
  28. root.bz2:Q: boot.bz2
  29. {
  30. echo bzfilesystem
  31. cat boot.bz2
  32. dd -if /dev/zero -bs 1024 -count 1 >[2]/dev/null
  33. } >$target
  34. ls -l $target
  35. /sys/src/9/pc/9pcflop.gz: root.bz2
  36. @{
  37. cd /sys/src/9/pc
  38. mk 'CONF=pcflop' 9pcflop.gz
  39. }
  40. /sys/src/9/pc/9pccd.gz:
  41. @{
  42. cd /sys/src/9/pc
  43. mk 'CONF=pccd' 9pccd.gz
  44. }
  45. 9load: /386/9loadlite
  46. cp $prereq $target
  47. cp /386/9loadlitedebug 9loaddebug
  48. ndisk: 9load /sys/src/9/pc/9pcflop.gz plan9.ini /lib/vgadb
  49. dd -if /dev/zero -of ndisk -bs 1024 -count 1440 >[2]/dev/null
  50. disk/format -f -b /386/pbs -d ndisk \
  51. 9load /sys/src/9/pc/9pcflop.gz plan9.ini /lib/vgadb
  52. ls -l ndisk
  53. # cannot list both 9pcflop.gz and 9pccd.gz because they cannot be built
  54. # in parallel. stupid mk
  55. cddisk:D: 9load /sys/src/9/pc/9pcflop.gz plan9.ini.cd /lib/vgadb
  56. mk /sys/src/9/pc/9pccd.gz
  57. rfork n
  58. bind plan9.ini.cd plan9.ini
  59. dd -if /dev/zero -of cddisk -bs 1024 -count 2880 >[2]/dev/null
  60. disk/format -t 3½QD -f -b /386/pbs -d cddisk \
  61. 9load /sys/src/9/pc/9pcflop.gz /sys/src/9/pc/9pccd.gz plan9.ini /lib/vgadb
  62. ls -l cddisk
  63. clean:V:
  64. rm -rf boot boot.bz2 boot.bflz boot.raw root.bz2 9pcflop ndisk 9load cddisk proto.cp 9loaddebug
  65. install:V: ndisk 9loaddebug
  66. cp 9loaddebug ../web.protect2
  67. cp ndisk ../web.protect2/disk
  68. #mk clean
  69. test:V: ndisk 9loaddebug
  70. cp 9loaddebug ../web.protect2/n9loaddebug
  71. cp ndisk ../web.protect2/ndisk
  72. cd0:D: cddisk
  73. rm -f cd0
  74. disk/mk9660 -9cj -v 'Plan 9 4th Edition' -s . -p cd0.proto -b cddisk cd0