makerom is a new tool in the GRUB Utilities project. It can be used to create bootrom image using grub legacy, grub2 and grldr.mbr.
grub legacy/grub4dos: makerom rom_xxx.img stage2 grub.bin grub2: makerom rom_xxx.img core.img grub2.bin grldr.mbr: makerom -s 0 rom_xxx.img grldr.mbr grldr.bin rom_xxx.img stands for one of the following files: rom_isa.img: Header for ISA bootrom rom_pci.img: Header for PCI bootrom rom_zisa.img: Header for ISA bootrom, support lzma decompression rom_zpci.img: Header for PCI bootrom, support lzma decompression To enable lzma, you should use option -z, and choose one of the headers that supports lzma: makerom -z rom_zisa.img stage2 grub.bin As bootrom has 64K size limit, for image larger than 64K, you must use compression. For example, the uncompressed stage2 for grub 0.97 is 98K, after compression, image reduced to about 50K. Also note that compression is performed by external lzma program, you need to install the lzma package before using the compression function. To test the bootrom in qemu: qemu -option-rom grub.bin ... Other options supported by makerom: -m message The message to display. -t timeout Timeout in seconds, default value is 2. -k key Hot key, default value SPACE. -d edx The value of %edx registry, default value 0. -s skip Number of bytes to skip at the beginning of input file, default value 512, which is correct for stage2 and core.img. For grldr.mbr, you should set this value to 0. -z Use lzma to compress input file. -p parm Extra options for lzma, it can be used to adjust compression ratio. The program to invoke is lzma in windows, and lzma_alone in Linux. The default command line is: lzma_alone e -si -so -v Show verbose information. You can download source code and windows binaries at: http://download.gna.org/grubutil/ -- Bean _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel