BOOTER HELP: BOOTER: find /boot/eos file in the EXT2 FS of sdimage, then load its data blocks to 0x100000 Reacll from CS360: find a file means to find its inode. Review the algorithm in CS360: 1. Get inodes start block# from GD in block#2: GD *gp; INODE *ip; DIR *dp; char buf[1024], buf1[1024], buf2[1024]; getblk(2, buf) gp = (GD *)buf; int iblk = gp->bg_inode_table; // print as %d to see its value 2. get the block iblk containing root inode into buf[] let INODE *ip -> #2 INODE in buf[] 3. search for "boot" in data block of / INODE Once you find "boot", you have its ino in [inode, rec_len, naem_len, boot ] which is DIR *dp -> inode 4. use Mailman's algorithm to get INODE of boot: blk = inodes_start_block + (ino-1)/8; offset = (ino-1) % 8 get blk into a buf[], let IP -> INODE of /boot at offset 5. Search for "eos" in data block of /boot's INODE to get its ino 6. load eos's INDOE block into a buf[] and let INODE *ip -> INODE of /boot/eos 7. ip->i_block[0]-[11] are direct blocks 8. ip->i_block[12] are indirect blocks; load them into u32 ubuf[256]; indirect blocks will be ubuf[0], ubuf[1],..., until ubuf[i]=0 // Load /boot/eos image blocks to 1MB loop: u32 address = 0x100000; getblk(blk#, address); address += 1024 9. When all blocks are loaded, call go() in assembly code, which jumps to 0x100000 to start up the OS kernel ========================================================================= 10. User Interface I/O: uart.c is a driver for UART (serial teminal) of the VM. It has a char ugetc(), which returns an input char, uputc(char c), which prints a char to the UART screen. Per CS360: you can implement a ugets(char s[]) to input a string uprints(char *s) to print a string For convenience, you should implement a uprintf(char *fmt, ...) for formatted print of %c: char %s: string %d: (4-byte) integer %x: unsiged int in HEX (for memory addresses)