Makefile cleaup
[thunix.git] / gen-test.sh
blobcdffc263131402406a69755b255b7d71f6d82e98
1 #!/bin/bash
3 TFS_DIR=${HOME}/project/fstk/fs/tfs
5 # make a 1.44M disk
6 dd if=/dev/zero of=root.img bs=1024 count=1440 2>/tmp/dd-out
8 dd if=/dev/zero of=tfs.img bs=1024 count=1024 2>/tmp/dd-out
10 # cp the kernel
11 dd if=thunix.img of=root.img conv=notrunc 2>/tmp/dd-out
14 qemu-img create tfs.img 1M
15 $TFS_DIR/mktfs tfs.img 0
17 # init the fs
18 ${TFS_DIR}/tfsh tfs.img << EOF
19 mkdir bin
20 cd bin
21 touch ls
22 touch cd
23 touch cat
24 touch mkdir
25 touch rmdir
26 touch rm
27 touch touch
28 touch echo
29 touch hexdump
30 touch date
31 touch help
32 touch hello
33 touch halt
34 touch reboot
35 cd ..
36 cp_in gen-test.sh
37 cp_in README
38 quit
39 EOF
41 dd if=tfs.img of=root.img bs=1024 seek=416 conv=notrunc 2>/tmp/dd-out
42 mv root.img thunix.img