Browse Source

Update on file system, FScurrently not working correct

master
Jørn Guldberg 4 years ago
parent
commit
82db39baba
4 changed files with 26 additions and 17 deletions
  1. +4
    -4
      bootloader.nasm
  2. +1
    -1
      filesystems/lsfs/lsfs.nasm
  3. +2
    -2
      filesystems/lsfs/test_lsfs.nasm
  4. +19
    -10
      vbr.nasm

+ 4
- 4
bootloader.nasm View File

@ -2,7 +2,7 @@ ORG 0x7C00
BITS 16
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Bootloader for SingOS
; version 0.1.0.9-exp
; version 0.1.0.10-exp
;
; Please edit the version number if any changes is made, the last number
; represent the build number.
@ -150,7 +150,7 @@ print:
ret
data:
message db 'Bootloader for SingOS! v0.1.0.9-exp',13,10,0
message db 'Bootloader for SingOS! v0.1.0.10-exp',13,10,0
enter_debug_mode db 'Press d to enter bootloader debug mode',13,10,0
enter_system_check db 'Performing system check:',13,10,0
sys_check_ok db 'System check ok', 13, 10, 0
@ -163,9 +163,9 @@ data:
times 446-($-$$) db 0 ; First partion entry
db 0x80 ; active partition
db 0, 0x00, 0x17 ; First sector CHS
db 0x00 ; Disk type (Other)
db 0x18 ; Disk type (Other) (Why 18, answer ':' ^ ')' )
db 0xff, 0xff, 0xff ; Ending CHS values
db 0x17, 0, 0, 0x00 ; Staring LBA
db 0x18, 0, 0, 0x00 ; Staring LBA
db 0, 0xff, 0xff, 0xff ; Size
db 0x00

+ 1
- 1
filesystems/lsfs/lsfs.nasm View File

@ -1,6 +1,6 @@
BITS 16
%define LSFS_FIX_FILE_SIZE 0x10
%define LSFS_magic_start_sector 24 ; This is the sector right after the SingOS kernel stops and is a magic number that has to be changed when the kernel grows.
%define LSFS_magic_start_sector 23 ; This is the sector right after the SingOS kernel stops and is a magic number that has to be changed when the kernel grows.
%define FSCI_sector 88
lsfs_check_extended_support:

+ 2
- 2
filesystems/lsfs/test_lsfs.nasm View File

@ -1,7 +1,7 @@
BITS 16
%define LSFS_magic_start_sector 24
%define LSFS_magic_start_sector 23
;This is for the FSCI, where this is stored on the disk.
lsfs_format_disk_buffer db 'LSFS v0.1.1-exp', 13, 10, '(LessSimpelFileSystem)', 13, 10, 'Developed to SingOS', 13, 10, 'by Jorn Guldberg', 13, 10, 0 ; 66 chars + 8 bytes
lsfs_format_disk_buffer db 'LSFS v0.1.3-exp', 13, 10, '(LessSimpelFileSystem)', 13, 10, 'Developed to SingOS', 13, 10, 'by Jorn Guldberg', 13, 10, 0 ; 66 chars + 8 bytes
times 506-($-$$) db 0
dw LSFS_magic_start_sector, 3, 2306 ; Start index, number of files, next free index
; 4 is right now the next number of file

+ 19
- 10
vbr.nasm View File

@ -208,23 +208,32 @@ DAPACK:
; Entry one:
;.filename:
db 'File_System_Control_information', 0
times 224 db 0
db 'LSFS v0.1.2-exp', 13, 10, '(LessSimpelFileSystem)', 13, 10, 'Developed to SingOS', 13, 10, 'by Jorn Guldberg', 13, 10, 0 ; 66 chars + 8 bytes
times 163 db 0 ; 256 bytes file system informaiton
dw 23, 0x00, 0x00, 0x00 ; offset on disk asb LBA address
dw 2306, 0x00, 0x00, 0x00 ; Next free LBA partition index free
dw 0x00, 0x00, 0x00, 0x00 ; next_sector_reuse_pointer
dw 0x00, 0x00, 0x00, 0x00 ; last_sector_index_on_partition
dw 0x00, 0x00, 0x00, 0x00 ; sectors_size_on_disk
times 208 db 0
;db 'File_System_Control_information', 0
;times 224 db 0
;.file_id:
dw 0x0, 0x0, 0x0, 0x00 ; 64-bits
;dw 0x0, 0x0, 0x0, 0x00 ; 64-bits
;.file_size
dw 512, 0x0, 0x0, 0x0 ; 64-bits Should be the actual number of bytes.
;dw 512, 0x0, 0x0, 0x0 ; 64-bits Should be the actual number of bytes.
;.ext_file_data 64-bits (Extended data about the file, timestamps etc.)
dw 0x0, 0x0, 0x0, 0x0
;dw 0x0, 0x0, 0x0, 0x0
;control_bits 64-bits
dw 0x0, 0x0, 0x0, 0x0
;dw 0x0, 0x0, 0x0, 0x0
;.file_data_pointers
dw 88, 0x0, 0x0, 0x0
times 216 db 0
;dw 88, 0x0, 0x0, 0x0
;times 216 db 0
; Entry Two:
db 'LessSimpelFileSystem', 0
times 235 db 0
db 'LessSimpelFileSystem.module', 0
times 228 db 0
;.file_id:
dw 0x01, 0x0, 0x0, 0x0
;.file_size

Loading…
Cancel
Save