Modtool

From Go-OS

Jump to: navigation, search

modtool is a tool used to add modules to an existing kernel image, and list modules present in this image.

Module listing

Call modtool kernelfile

$ ./build/modtool out/kernel.bin 
Reading modules list from file out/kernel.bin
[0:0xc0079060] kernel (Go-OS Kernel) at 0xc0000000=>0xc007a000 (bss: 0xd0000000=>0xd004b564)
 * fetch_pci_devices(0xc00051d0)
 * pci_register_driver(0xc00051b0)
 * kmalloc(0xc0003180)
 * memcpy(0xc0002e20)
 * irq_set_routine(0xc0007800)
 * events_kernel_push(0xc0007380)
 * kprintf(0xc0003ca0)
[1:0xc007b018] bochs_std_vga (Bochs Standard VGA display driver) at 0xc007a000=>0xc007b050 (bss: (nil)=>(nil))
[2:0xc007d018] vmware_gfx ([VMware SVGA II] PCI Display Adapter) at 0xc007c000=>0xc007d050 (bss: (nil)=>(nil))
[3:0xc007eff8] ps2kbd (PS/2 keyboard driver for x86) at 0xc007e000=>0xc007f030 (bss: (nil)=>(nil))

Adding a module

Call modtool kernelfile modulefile

$ ./build/modtool out/kernel.bin out/kmod/misc/helloworld.5o 
Loading module out/kmod/misc/helloworld.5o
Loading kernel out/kernel.bin
Adding module helloworld (Sample hello-world module) to kernel.
Retrieved from "http://5os.net/wiki/Modtool"
Personal tools