Reproduce a previous release
In this example, we will recreate linux-rockchip
5.10.110-5 package.
-
Find the original GitHub release for the desired package
For our example, it is located at https://github.com/radxa-pkg/linux-rockchip/releases/tag/5.10.110-5. -
From the release pages, you will see multiple packages.
We will focus on the top 2 packages:
File Name | Size |
---|---|
linux-headers-5.10.110-5-rockchip_5.10.110-5-1932709cf_arm64.deb | 7.4 MB |
linux-headers-radxa-nx5-io_5.10.110-5-3a557f6_all.deb | 1.1 KB |
-
As our packages are built with
bsp
andradxa/kernel
, there are 2 git commits that we need to find out to accurately reproduce those packages:
Since the real package (the one with larger file size) is closely related toradxa/kernel
,1932709cf
is the commit for it.
Since the meta package (the one with smaller file size) is closely related tobsp
,3a557f6
is the commit for it. -
We now have the following essential commit information:
radxa/kernel
:1932709cf
bsp
:3a557f6
-
However,
fork.conf
only takes full commit hash. So click theradxa/kernel
link above, and clickBrowse files
button on GitHub page, that will get you the full commit hash in the URL bar:radxa/kernel
:1932709cf7d98d0d92952bba38d990d938fabc58
-
We can also check the content of
overlay.sh
to find the commit used forradxa/overlays
:
radxa/overlays
:4940ae33e4def0fb9133faf68adf0c3421b61f06
-
We can now recreate the package:
git clone --recurse-submodules https://github.com/radxa-repo/bsp.git
cd bsp
# switch to bsp commit found above
git switch --detach 3a557f6
# replace BSP_BRANCH with radxa/kernel commit found above
sed -i "s/BSP_BRANCH.*/BSP_COMMIT='1932709cf7d98d0d92952bba38d990d938fabc58'/" linux/rockchip/fork.conf
./bsp linux rockchip
# the prepared kernel tree will be available under .src/linux