Context
I have a fair amount of experience with Linux but I don’t know much at all about init and the boot process. I’ve been tinkering with the idea of booting Linux, natively on my phone, I’ve used deboostrap to install Debian Jessie (arm64) on my SD Card, mounted it on my phone and used busybox to chroot into the installation, and run stage 2. All of this was successful so I would assume I now have a bootable debian file system.
The next step is to modify the boot partition and create a custom initramfs which will boot my fs using the existing android kernel.
My Questions
What do I need to change in the initramfs? Is it just the init.rc file?
What else might I need to do other than mount my file system and call switch_root?
Are there any methods of getting ANY debugging information out of the bootloader so I can try and diagnose any problems that may arise.
Any theories/ideas would be greatly appreciated.
Phone: Huawei P9 (EVA-l09) Unlocked bootloader Running TWRP 3.1.1-1