Troubleshooting:boot:initfshooks

Here are various hooks that might help with initramfs debugging. They are raw pastes and need to be adjusted before using them. Boot a known working ROM to extract the right  paths etc.

Dump sysfs to SD card
You will probably need to adjust the path to the sd card, check the device name from a working OS on the phone - if the kernel is roughly the same, then the device path to the SD card should be the same as well. For Android devices, you could use TWRP for example.