diff --git a/drive.qcow2 b/drive.qcow2 new file mode 100644 index 0000000..c42dedc Binary files /dev/null and b/drive.qcow2 differ diff --git a/iso.json b/iso.json new file mode 100644 index 0000000..cc0e6f4 --- /dev/null +++ b/iso.json @@ -0,0 +1,9 @@ +{ + "iso9660": true, + "disksize": 16, + "initrd": { "type": "tar", "directory": "build/boot" }, + "config": "bootparam.cfg", + "partitions": [ + { "type": "boot", "size": 16 } + ] +} diff --git a/src/kernel.c b/src/kernel.c index be2386e..62a8c2d 100644 --- a/src/kernel.c +++ b/src/kernel.c @@ -66,6 +66,7 @@ void _start() { } void virtio_cb(struct blk_req req, void *userdata) { + (void)userdata; char *type = NULL; switch (req.type) { case BLK_REQ_READ: type = "READ"; break; @@ -77,7 +78,7 @@ void virtio_cb(struct blk_req req, void *userdata) { } else { uint8_t *p = pa_to_pointer(req.data); printlinef("%s done: %u sectors starting at %u", type, req.num_sectors, req.sector); - for (int i = 0; i < req.num_sectors; i++) { + for (uint64_t i = 0; i < req.num_sectors; i++) { printlinef("sector %u: %X8 %X8 %X8 %X8 ...", req.sector + i, p[512*i], p[512*i + 1], p[512*i + 2], p[512*i + 3] );