If I command
grub-mkimage -d . -o core.img pc fat ntfs

The result is

Target format not specified (use the -O option). 
Try `grub-mkimage --help' for more information

How can I create a kernel?

Thanks.