diff --git a/Makefile b/Makefile index cd8b6d1..366bd67 100755 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ # $Id$ # The System Makefile (C) 2002 The UbixOS Project -all: libc bin kernel +all: libc bin kernel tools libc: src (cd src/lib/libc;make) @@ -12,10 +12,13 @@ kernel: src (cd src/sys;make) +tools: src + (cd src/tools;make) + install: (cd src/sys;make install) clean: (cd src/sys;make clean) (cd src/lib/libc;make clean) - (cd src/bin;make clean) \ No newline at end of file + (cd src/bin;make clean) diff --git a/src/sys/boot/Makefile b/src/sys/boot/Makefile index 5ccef0c..07a288b 100755 --- a/src/sys/boot/Makefile +++ b/src/sys/boot/Makefile @@ -14,12 +14,10 @@ gcc format.c -o format install: writeimg - (./format $(FDDEVICE) 101 2 help.txt readme.txt) ($(NASM) bootsec.asm -o bootsec) (cat ../compile/ubix.elf >>bootsec) (cat buf >>bootsec) (./writeimg $(FDDEVICE)) - (rm bootsec) formatdsk: format (./format 60 2 bin help.txt readme.txt) diff --git a/src/sys/include/ubixfs/ubixfs.h b/src/sys/include/ubixfs/ubixfs.h index 4c6b4b1..9b9e94b 100755 --- a/src/sys/include/ubixfs/ubixfs.h +++ b/src/sys/include/ubixfs/ubixfs.h @@ -44,4 +44,4 @@ int readFile(char *file); int getFileByte(int fd,int offset); -#endif \ No newline at end of file +#endif diff --git a/src/tools/format.c b/src/tools/format.c index 799dd63..2058cdf 100755 --- a/src/tools/format.c +++ b/src/tools/format.c @@ -10,12 +10,12 @@ **************************************************************************************/ #include -#include "ubixfs/ubixfs.h" +#include +#include "ubixfs.h" int main(int argc,char **argv) { FILE *fd,*fd2; int i=0,x=0,blocks=0,sb=9; - char temp[24]; struct fileTableEntry ft[128]; fd = fopen("/dev/fd1","wb"); for (i=1;i<128;i++) { diff --git a/src/tools/ubixfs.h b/src/tools/ubixfs.h new file mode 100755 index 0000000..5ca806b --- /dev/null +++ b/src/tools/ubixfs.h @@ -0,0 +1,41 @@ +/************************************************************************************** + Copyright (c) 2002 The UbixOS Project + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are prohibited. + + $Id$ + +**************************************************************************************/ + +#ifndef _UBIXFS_H +#define _UBIXFS_H + +#include + +struct fileTableEntry { + uChar fileName[22]; + uShort start; + uShort length; + uShort size; + uShort attributes; + uShort reserved; + }; + +struct bootSect { + uChar jmp[4]; + uChar id[6]; + uShort version; + uShort tmp; + uShort fsStart; + uShort tmp2; + uLong krnl_start; + uInt BytesPerSector; + uInt SectersPerTrack; + uInt TotalHeads; + uLong TotalSectors; + uChar code[479]; + }; + +#endif