Add MBR partition driver
- Scan sector 0 of all hdd devices for MBR signature (0xAA55) - Parse 4 partition entries, register non-empty ones as sub-devices - Sub-devices named hddNmbrY (e.g., hdd1mbr1) via devicefs - LBA translation: sub-device reads/writes offset by partition start LBA - Partition type constants for FAT12/16/32, Linux, NTFS, etc. - IDE improvements: floating bus detection (0xFF), channel presence check - Tested: detects FAT32 LBA partition (type=0x0C) on test disk - Check off devicefs, IDE, MBR in README
This commit is contained in:
@@ -58,9 +58,9 @@ Once a task is completed, it should be checked off.
|
||||
- [x] Implement environment variables. Apps should be able to modify this, and it should be copied to new forks of an app.
|
||||
- [x] Create a basic shell program `sh`. This shell must be able to start the hello-world app. It must include `cd` as a built-in to change the current working directory.
|
||||
- [x] Create an `ls` app. It should list the contents of the current working directory, via the environment variable.
|
||||
- [ ] Create a devicefs vfs driver. The devicefs subsystem should allow drivers to create new block devices devices.
|
||||
- [ ] Create an IDE driver. It should enumerate all IDE devices, and expose them to the vfs driver as `hddN` or `cdN`, where N is a number that starts at 1 and increases for each new device. The `N` value should be calucated by the devicefs subsystem, not the IDE driver.
|
||||
- [ ] Create an MBR driver. It should be able to automatically detect when new hard drives are detected, and automatically scan them for MBR partitions. Each MBR partition found should be listed as `hddNmbrY`, where Y is a number determined by the devicefs subsystem.
|
||||
- [x] Create a devicefs vfs driver. The devicefs subsystem should allow drivers to create new block devices devices.
|
||||
- [x] Create an IDE driver. It should enumerate all IDE devices, and expose them to the vfs driver as `hddN` or `cdN`, where N is a number that starts at 1 and increases for each new device. The `N` value should be calucated by the devicefs subsystem, not the IDE driver.
|
||||
- [x] Create an MBR driver. It should be able to automatically detect when new hard drives are detected, and automatically scan them for MBR partitions. Each MBR partition found should be listed as `hddNmbrY`, where Y is a number determined by the devicefs subsystem.
|
||||
- [ ] Create a `sysfs` vfs driver. It should allow drivers to expose text/config files to the VFS. Each driver can request a namespace in the sysfs. E.g.: the IDE driver could request `ide`. During this registration, the drive must provide a struct containing function callbacks. The callbacks must contain the function `list`, `read`, and `write`. These are executed when the user lists a directory, reads a file, or writes a file. It is expected that the contents of these files are extremely small and can simply be stored on the stack. It should be very easy for a driver to expose new information.
|
||||
- [ ] Create a FAT32 driver. It should allow reading and writing to and from a block device.
|
||||
- [ ] Create the `mount` app. It should allow on to mount a block device using the fat32 driver. Internally, it should use sysfs (which should be mounted automatically by the kernel to `/sys`) to setup a new mount.
|
||||
|
||||
Reference in New Issue
Block a user