1. First Download QU repack from this Link( download both files)
 
2. Then Backup Your Current Rom Using Custom recovery and Copy Boot.img to desktop of Computer
 
3. Then Make folder named "Stock" and move boot.img to stock folder.
 
4. Now make another folder name "port" and put boot.img of custom rom.
 
5. Now make another folder named "Qurepack" in desktop and put qu repack(2 files from link)
 
6. Now copy boot.img from stock folder to qurepack folder 
 
7. open qurepack.exe and click unpack
 
8. then copy kernel from qu repack folder and paste it to desktop
 
9. now click on repack and click on new boot file
 
10. Now delete that boot.img
 
11. Now copy boot.img from port folder to qu repack folder
 
12. Again click unpack 
 
13. Now copy and replace kernel from desktop to qu repack folder
 
14. Now click repack and then new boot file and you are good to go 

(if U have Confusion u can also watch this)



via。http://sandipsky.blogspot.com/2017/10/how-to-portedit-bootimg-and-kernel.html