Simple script to build a root filesystem, plus tiny patch to ucp.
authorWill Sowerbutts <will@sowerbutts.com>
Wed, 21 Jan 2015 19:47:39 +0000 (19:47 +0000)
committerWill Sowerbutts <will@sowerbutts.com>
Wed, 21 Jan 2015 19:51:19 +0000 (19:51 +0000)
Standalone/filesystem-src/build-filesystem [new file with mode: 0755]
Standalone/filesystem-src/etc-files/issue [new file with mode: 0644]
Standalone/filesystem-src/etc-files/motd [new file with mode: 0644]
Standalone/filesystem-src/etc-files/mtab [new file with mode: 0644]
Standalone/filesystem-src/etc-files/passwd [new file with mode: 0644]
Standalone/filesystem-src/ucp-script.txt [new file with mode: 0644]
Standalone/ucp.c

diff --git a/Standalone/filesystem-src/build-filesystem b/Standalone/filesystem-src/build-filesystem
new file mode 100755 (executable)
index 0000000..ef72b81
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ]; then
+        echo "Syntax: $0 filename isize bsize"
+        echo ""
+        echo "For a 1.44MB floppy disk, use isize=64, bsize=2880"
+        echo "For a 32MB (or larger) hard disk, use isize=256, bsize=65535"
+        exit 1
+fi
+
+../mkfs $1 $2 $3
+../ucp $1 < ucp-script.txt
+../fsck $1
diff --git a/Standalone/filesystem-src/etc-files/issue b/Standalone/filesystem-src/etc-files/issue
new file mode 100644 (file)
index 0000000..2f5f777
--- /dev/null
@@ -0,0 +1,3 @@
+-= FUZIX =-
+
+Log in as "root"
diff --git a/Standalone/filesystem-src/etc-files/motd b/Standalone/filesystem-src/etc-files/motd
new file mode 100644 (file)
index 0000000..fc0abd7
--- /dev/null
@@ -0,0 +1,2 @@
+
+Welcome to FUZIX.
diff --git a/Standalone/filesystem-src/etc-files/mtab b/Standalone/filesystem-src/etc-files/mtab
new file mode 100644 (file)
index 0000000..fb6a963
--- /dev/null
@@ -0,0 +1 @@
+rootfs / rootfs rw 0 0
diff --git a/Standalone/filesystem-src/etc-files/passwd b/Standalone/filesystem-src/etc-files/passwd
new file mode 100644 (file)
index 0000000..305196c
--- /dev/null
@@ -0,0 +1 @@
+root::0:0::/root:/bin/ssh
diff --git a/Standalone/filesystem-src/ucp-script.txt b/Standalone/filesystem-src/ucp-script.txt
new file mode 100644 (file)
index 0000000..9231d2a
--- /dev/null
@@ -0,0 +1,246 @@
+cd /
+mkdir bin
+mkdir dev
+mkdir etc
+
+cd /dev
+mknod tty1  20660 513
+mknod tty2  20660 514
+mknod tty3  20660 515
+mknod tty4  20660 516
+mknod hda   60660 0
+mknod hda1  60660 1
+mknod hda2  60660 2
+mknod hda3  60660 3
+mknod hda4  60660 4
+mknod hda5  60660 5
+mknod hda6  60660 6
+mknod hda7  60660 7
+mknod hda8  60660 8
+mknod hda9  60660 9
+mknod hda10 60660 10
+mknod hda11 60660 11
+mknod hda12 60660 12
+mknod hda13 60660 13
+mknod hda14 60660 14
+mknod hda15 60660 15
+mknod hdb   60660 16
+mknod hdb1  60660 17
+mknod hdb2  60660 18
+mknod hdb3  60660 19
+mknod hdb4  60660 20
+mknod hdb5  60660 21
+mknod hdb6  60660 22
+mknod hdb7  60660 23
+mknod hdb8  60660 24
+mknod hdb9  60660 25
+mknod hdb10 60660 26
+mknod hdb11 60660 27
+mknod hdb12 60660 28
+mknod hdb13 60660 29
+mknod hdb14 60660 30
+mknod hdb15 60660 31
+mknod hdc   60660 32
+mknod hdc1  60660 33
+mknod hdc2  60660 34
+mknod hdc3  60660 35
+mknod hdc4  60660 36
+mknod hdc5  60660 37
+mknod hdc6  60660 38
+mknod hdc7  60660 39
+mknod hdc8  60660 40
+mknod hdc9  60660 41
+mknod hdc10 60660 42
+mknod hdc11 60660 43
+mknod hdc12 60660 44
+mknod hdc13 60660 45
+mknod hdc14 60660 46
+mknod hdc15 60660 47
+mknod hdd   60660 48
+mknod hdd1  60660 49
+mknod hdd2  60660 50
+mknod hdd3  60660 51
+mknod hdd4  60660 52
+mknod hdd5  60660 53
+mknod hdd6  60660 54
+mknod hdd7  60660 55
+mknod hdd8  60660 56
+mknod hdd9  60660 57
+mknod hdd10 60660 58
+mknod hdd11 60660 59
+mknod hdd12 60660 60
+mknod hdd13 60660 61
+mknod hdd14 60660 62
+mknod hdd15 60660 63
+mknod fd0   60660 256
+mknod fd1   60660 257
+mknod fd2   60660 258
+mknod fd3   60660 259
+mknod null  20666 1024
+mknod mem   20660 1025
+mknod zero  20444 1026
+mknod proc  20660 1027
+
+cd /etc
+bget etc-files/issue
+bget etc-files/motd
+bget etc-files/mtab
+bget etc-files/passwd
+chmod 0644 issue
+chmod 0644 motd
+chmod 0644 mtab
+chmod 0644 passwd
+
+cd /
+bget ../../Applications/util/init
+chmod 0755 init
+
+cd /bin
+bget ../../Applications/util/banner
+bget ../../Applications/util/basename
+bget ../../Applications/util/bd
+bget ../../Applications/util/cal
+bget ../../Applications/util/cat
+bget ../../Applications/util/chgrp
+bget ../../Applications/util/chmod
+bget ../../Applications/util/chown
+bget ../../Applications/util/cksum
+bget ../../Applications/util/cmp
+bget ../../Applications/util/cp
+bget ../../Applications/util/cut
+bget ../../Applications/util/date
+bget ../../Applications/util/dd
+bget ../../Applications/util/decomp16
+bget ../../Applications/util/df
+bget ../../Applications/util/dirname
+bget ../../Applications/util/dosread
+bget ../../Applications/util/du
+bget ../../Applications/util/echo
+bget ../../Applications/util/ed
+bget ../../Applications/util/false
+bget ../../Applications/util/fdisk
+bget ../../Applications/util/fgrep
+bget ../../Applications/util/fsck
+bget ../../Applications/util/grep
+bget ../../Applications/util/head
+bget ../../Applications/util/id
+bget ../../Applications/util/kill
+bget ../../Applications/util/ll
+bget ../../Applications/util/ln
+bget ../../Applications/util/logname
+bget ../../Applications/util/ls
+bget ../../Applications/util/man
+bget ../../Applications/util/mkdir
+bget ../../Applications/util/mkfs
+bget ../../Applications/util/mkfifo
+bget ../../Applications/util/mknod
+bget ../../Applications/util/more
+bget ../../Applications/util/mount
+bget ../../Applications/util/mv
+bget ../../Applications/util/od
+bget ../../Applications/util/pagesize
+bget ../../Applications/util/passwd
+bget ../../Applications/util/patchcpm
+bget ../../Applications/util/printenv
+bget ../../Applications/util/prtroot
+bget ../../Applications/util/ps
+bget ../../Applications/util/pwd
+bget ../../Applications/util/rm
+bget ../../Applications/util/rmdir
+bget ../../Applications/util/sleep
+bget ../../Applications/util/ssh
+bget ../../Applications/util/sort
+bget ../../Applications/util/stty
+bget ../../Applications/util/sum
+bget ../../Applications/util/su
+bget ../../Applications/util/sync
+bget ../../Applications/util/tee
+bget ../../Applications/util/tail
+bget ../../Applications/util/touch
+bget ../../Applications/util/tr
+bget ../../Applications/util/true
+bget ../../Applications/util/umount
+bget ../../Applications/util/uniq
+bget ../../Applications/util/uud
+bget ../../Applications/util/uue
+bget ../../Applications/util/wc
+bget ../../Applications/util/which
+bget ../../Applications/util/who
+bget ../../Applications/util/whoami
+bget ../../Applications/util/write
+bget ../../Applications/util/xargs
+bget ../../Applications/util/yes
+chmod 0755 banner
+chmod 0755 basename
+chmod 0755 bd
+chmod 0755 cal
+chmod 0755 cat
+chmod 0755 chgrp
+chmod 0755 chmod
+chmod 0755 chown
+chmod 0755 cksum
+chmod 0755 cmp
+chmod 0755 cp
+chmod 0755 cut
+chmod 0755 date
+chmod 0755 dd
+chmod 0755 decomp16
+chmod 0755 df
+chmod 0755 dirname
+chmod 0755 dosread
+chmod 0755 du
+chmod 0755 echo
+chmod 0755 ed
+chmod 0755 false
+chmod 0755 fdisk
+chmod 0755 fgrep
+chmod 0755 fsck
+chmod 0755 grep
+chmod 0755 head
+chmod 0755 id
+chmod 0755 kill
+chmod 0755 ll
+chmod 0755 ln
+chmod 0755 logname
+chmod 0755 ls
+chmod 0755 man
+chmod 0755 mkdir
+chmod 0755 mkfs
+chmod 0755 mkfifo
+chmod 0755 mknod
+chmod 0755 more
+chmod 0755 mount
+chmod 0755 mv
+chmod 0755 od
+chmod 0755 pagesize
+chmod 0755 passwd
+chmod 0755 patchcpm
+chmod 0755 printenv
+chmod 0755 prtroot
+chmod 0755 ps
+chmod 0755 pwd
+chmod 0755 rm
+chmod 0755 rmdir
+chmod 0755 sleep
+chmod 0755 ssh
+chmod 0755 sort
+chmod 0755 stty
+chmod 0755 sum
+chmod 0755 su
+chmod 0755 sync
+chmod 0755 tee
+chmod 0755 tail
+chmod 0755 touch
+chmod 0755 tr
+chmod 0755 true
+chmod 0755 umount
+chmod 0755 uniq
+chmod 0755 uud
+chmod 0755 uue
+chmod 0755 wc
+chmod 0755 which
+chmod 0755 who
+chmod 0755 whoami
+chmod 0755 write
+chmod 0755 xargs
+chmod 0755 yes
index f8fe658..ea66fae 100644 (file)
@@ -48,7 +48,7 @@ int main(argc, argval)
     char *argval[];
 {
     int  rdev;
-    char cmd[30], arg1[30], arg2[30], arg3[30];
+    char cmd[30], arg1[1024], arg2[30], arg3[30];
     int  count;
     int  interactive;
     int  pending_line = 0;