Difference between revisions of "How to properly backup downstream kernels"

From postmarketOS
Jump to: navigation, search
(Created page with "Since we can't use the mainline kernel for all devices, we need access to the downstream kernel source code. From time to time, such repositories disappear from the web, so it...")
 
(add instructions for when there is no upstream git repo, only a source archive)
 
Line 3: Line 3:
 
== Backup ==
 
== Backup ==
 
Create a backup of the desired kernel to a public source code hosting service, such as gitlab.com or github.com. If the original git repository was on the same platform, this is oftentimes as easy as clicking the "fork" button on the original repository.
 
Create a backup of the desired kernel to a public source code hosting service, such as gitlab.com or github.com. If the original git repository was on the same platform, this is oftentimes as easy as clicking the "fork" button on the original repository.
 +
 +
If there is no git repository available (e.g. if the kernel sources can only be downloaded as zip archive from htcdev.com), then kindly ask in [[Matrix_and_IRC|#postmarketOS]] if somebody can download the sources and mirror them to [[pmsourcedump]] for you. If you don't get an answer in the chat, you can also ask in a [https://gitlab.com/postmarketOS/pmaports/issues new issue].
  
 
== Adjust linux package ==
 
== Adjust linux package ==

Latest revision as of 14:26, 4 June 2019

Since we can't use the mainline kernel for all devices, we need access to the downstream kernel source code. From time to time, such repositories disappear from the web, so it is a good idea to back them up. We want to be able to easily confirm that the backed up kernel has the same source code as the original one, so please follow these steps.

Backup

Create a backup of the desired kernel to a public source code hosting service, such as gitlab.com or github.com. If the original git repository was on the same platform, this is oftentimes as easy as clicking the "fork" button on the original repository.

If there is no git repository available (e.g. if the kernel sources can only be downloaded as zip archive from htcdev.com), then kindly ask in #postmarketOS if somebody can download the sources and mirror them to pmsourcedump for you. If you don't get an answer in the chat, you can also ask in a new issue.

Adjust linux package

  • Make it point to your backup instead of the original URL
  • Change # Source to # Source: backup of https://insert-original-url-here
  • Make sure that you do not change the commit hash! (Under the assumption, that there is no hash collusion, this guarantees that your backup has the same source as the original one.)

Additional patches

If you need to add additional patches on top of the kernel (e.g. to fix the build), create patch files and place them inside the aport directory. This way we can transparently see what has been changed.

See also