The simplest technique to use is:
- make a directory
- put your kernels there
- write a kernel which:
- lists a kernels in the directory
- allows to select one
- copies the selected kernel over itself
- restarts the pi
config.txt and cmdline.txt may be treated this way too.
I did this kind of kernel using Ultibo.
The problem is: the kernel you run has to restore the multiboot kernel again.
I solved this using a shell script/desktop icon in Raspbian, so the script restore my "microdos" as I called it
Also, bare metal programs I write use a couple of lines to restore the multiboot kernel
I also use this method to develop using Ultibo. The Ultibo GUI is installed in Raspbian. So I start Raspbian and IDE, write what I need, then use a shell script to boot to my program. Then the program restores the Raspbian kernel and after the reboot I can continue dveloping: I even made the IDE to autostart so after the reboot I have it open.
IDE->write->compile->reboot with a scrpt to my experimental kernel->find a bug-> reboot->raspbian->IDE-> repeat
The lines which restores the raspbian kernels have to be at the very start of the debugged program to have the Raspbian ready when the program hangs up
due to a bug in it.