'How to write modified U-BOOT in to android firmware

I have a TV box on which my remote did not work. I was able to solve the problem with all the buttons, except to add the power button. i.e. the console could turn off, but I can't turn it on with the new remote.

After a little digging, I found information that the power button can only be added via u-boot.

I found the source code here

I was able to compile it, but I don't know how to add it to the console firmware.

Here I have a few questions in this regard.

  1. How to add u-boot to a ready-made firmware image?
  2. How do I prepare AOSP for the prefix I use? As I understand it, my manufacturer does not upload the source code for it, but 1000% of it is based on the Amlogic processor. I will be glad of any information, books or videos on which I can advance on this issue.


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source