"make isoimage" with grub set in .config (everything else default) was not working on Ubuntu 16.04 for me (it had previously worked on centos7 for me). The problem was in installing grub and making the iso in /arch/x86_64/boot/Makefile. I think the difference is that Ubuntu uses grub2 while centos uses grub1 or at least older versions of grub commands.
I tried to do this portably, but I don't have another OS readily available right now to test it. Maybe someone can try it out on their standard build environment?
Specifically:
Change grub version test to "grub-install --version" (-v is "version" on grub1 and "verbose" on grub2, --version should work on both)
I add a new section for version=2 (I'm not sure what version "0" and the "else" we're assuming). I use grub-mkrescue to build image.iso for grub2 as instructed here.
Grub2 seems to quote things differently (or maybe it's something else). Either way, my application in kitten was seeing some extra quotes in argv so I removed them from gimage2_cmdline. I'm not sure if this is the right thing to do (quoting rules seem to vary a lot).
Testing:
Tested on Ubntu 16.04 with default .config (except for change to grub from syslinux)
Tested using a hello_world that prints argv and envp
Not tested with grub1 or other distros. Not sure about how portable the solution is. Especially the argument quoting issue.
"make isoimage" with grub set in .config (everything else default) was not working on Ubuntu 16.04 for me (it had previously worked on centos7 for me). The problem was in installing grub and making the iso in /arch/x86_64/boot/Makefile. I think the difference is that Ubuntu uses grub2 while centos uses grub1 or at least older versions of grub commands.
I tried to do this portably, but I don't have another OS readily available right now to test it. Maybe someone can try it out on their standard build environment?
Specifically:
Testing: