I want to test out a first stage bootloader I wrote in order to bootload an unfinished kernel, so I can debug it and see if it works or not. Is it possible to make Qemu emulate a NAND storage device, from which it would copy the bootloader and execute it? And if so, how would I go about doing it?
So basically, Qemu would need to initialize the virtual CPU and the virtual NAND, load a chunk of it into the RAM, and then make the CPU jump to it. After the loader is in memory, it will then be able to load the filesystem, find the kernel, decompress, decrypt, decode, relocate and execute it.