kbd: use a better get_key method
[thunix.git] / gen-test.sh
blob962291d39998ea1553fec8a57764465cd188cb79
1 #!/bin/bash
3 [ -z $TFS_DIR ] && 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 cp_in user-test
39 quit
40 EOF
42 dd if=tfs.img of=root.img bs=1024 seek=416 conv=notrunc 2>/tmp/dd-out
43 mv root.img thunix.img