diff --git a/src/tools/Makefile b/src/tools/Makefile index 485e73d..7e3d0c8 100644 --- a/src/tools/Makefile +++ b/src/tools/Makefile @@ -48,8 +48,8 @@ (cp ../bin/cp/cp ./) #(cp ../bin/format/format ./) (./format 50 2000 /dev/fd0 ubix.elf 0 format 3754 fdisk 3754 ROM8X14.DPF 3754 init 3754 login 3754 shell 3754 userdb 3754 ls 3754 motd 3754 cp 3754) - (./format 1000 2000 /dev/fd0 shell 3754 clock 3754) - #(./format 50 2000 /dev/md1 ubix.elf 0 muffin 3754 shell 3754 motd 3754 libc.so 3754) + (./format 1064 2000 /dev/fd0 shell 3754 clock 3754) + #(./format 160 2000 /dev/md1 ubix.elf 0 muffin 3754 shell 3754 motd 3754 libc.so 3754) (rm -fr ubix.elf) (rm -fr login) (rm -fr init) @@ -59,4 +59,4 @@ (rm -fr libc.so) (rm -fr cp) (rm -fr fdisk) - (rm -fr format) + #(rm -fr format) diff --git a/src/tools/format.c b/src/tools/format.c index 584f63c..bc86cb4 100644 --- a/src/tools/format.c +++ b/src/tools/format.c @@ -70,21 +70,21 @@ sprintf(dirEntry[1].fileName,".."); BAT[0].nextBlock = 0x1; BAT[0].attributes = 1; - BAT[0].realSector = (batSize/512); + BAT[0].realSector = (batSize/512) + 64; BAT[1].nextBlock = 0x2; BAT[1].attributes = 1; - BAT[1].realSector = (batSize/512) + 1 * 8; + BAT[1].realSector = ((batSize/512) + 1 * 8) + 64; BAT[2].nextBlock = 0x3; BAT[2].attributes = 1; - BAT[2].realSector = (batSize/512) + 2 * 8; + BAT[2].realSector = ((batSize/512) + 2 * 8) + 64; BAT[3].nextBlock = -1; BAT[3].attributes = 1; - BAT[3].realSector = (batSize/512) + 3 * 8; + BAT[3].realSector = ((batSize/512) + 3 * 8) + 64; for (i=4;i<(size/4096);i++) { BAT[i].nextBlock = -1; BAT[i].attributes = 0x0; - BAT[i].realSector = ((batSize/512) + (i*8)); + BAT[i].realSector = ((batSize/512) + (i*8)) + 64; BAT[i].reserved = 0x0; } file = 0x2; @@ -132,10 +132,10 @@ dirEntry[1].size = 0x4000; sprintf(dirEntry[1].fileName,"fakeDir"); rewind(driveFd); - fseek(driveFd,(long)((startSector * 512) + batSize),0); + fseek(driveFd,(long)(((64 + startSector) * 512) + batSize),0); fwrite(dirEntry,0x4000,1,driveFd); rewind(driveFd); - fseek(driveFd,(startSector * 512),0); + fseek(driveFd,((startSector + 64) * 512),0); if (fwrite(BAT,batSize,1,driveFd) >= 1) { /* * printf("size [%i]\n",partInfo->size);