How to enable earlyprintk for Linux kernel

Please refer to earlyprintk dedicated article.