Qemu places the initrd image right after the kernel, as a multiboot module. The problem is that get_last_boot_addr is not accounting for the initrd module. Well it is, but then some newer code from April 29th can move the last address back down to right after the kernel, just below the initrd module. Then, kernel stack and data structures will overwrite the initrd image.
If I move that code above the multiboot module adjustments, the kernel boots ok:
Booting with the initrd.img ram drive from media_setup does not work. The screen output after the startup messages is:
Fiwix version: current git code a542c566979bc03ac93d1b3e5eece29b75a8653b
How to reproduce:
Qemu places the initrd image right after the kernel, as a multiboot module. The problem is that get_last_boot_addr is not accounting for the initrd module. Well it is, but then some newer code from April 29th can move the last address back down to right after the kernel, just below the initrd module. Then, kernel stack and data structures will overwrite the initrd image.
If I move that code above the multiboot module adjustments, the kernel boots ok: