-
Notifications
You must be signed in to change notification settings - Fork 126
Disk Acccsss #136
Comments
Disk access via virtio is already included in the latest master (but not the latest build yet), do you specifically need it via PCI? If the answer to that is yes, it seems to me like you're trying to use runtime.js on bare metal, which runtime is a long way from. (btw, it'd help if you could provide info as to why you need it, per the issue guidelines) |
if you look at the website, you can find other ways to access the hard drives. I've tried to use virtio but its difficult to access the contents |
Hard disks are not needed to run on bare metal, an in-memory initram could be used instead. |
Primary runtime.js target platform is KVM, implementing bare metal drivers would be extremely time consuming for a very little benefit IMO. |
Will my ext2 driver work for reading the superblock. const runtime = require("runtimejs");
var dev = runtime.block.buses.virtio;
var format = dev.formatInfo;
function Val(buffer,start,end) {
var val = "";
for(var i = start;i < (end+1);i++) {
val += buffer[i].toString();
}
return val;
}
function Superblock() {
var buff = new Uint8Array(format.sectorSize);
var sector = 1024 / format.sectorSize;
dev.read(sector,buffer);
this.TOTAL_INODES = parseInt(Val(buff,0,3));
this.TOTAL_BLOCKS = parseInt(Val(buff,4,7));
this.BLOCKS_FOR_SU = parseInt(Val(buff,8,11));
}
module.exports = Superblock; |
I don't about whether it'll read, but you have an error for the |
@SpaceboyRoss01, if you are willing to create a Ext2 filesystem in Javascript, I recommend you to take a look to the |
Hey, I found a tutorial in c on how to access ide devices. It uses the pci controller to access the drives. Can someone please port over the code? Tutorial: http://wiki.osdev.org/PCI_IDE_Controller
The text was updated successfully, but these errors were encountered: