How to create my own bootloader for arduino?

Are there any tutorials for creating custom bootloader?

First of all, it is in the datasheet for specific MCU.

https://www.avrfreaks.net/forum/faq-c-writing-bootloader-faq