Home
Pages 2
-
- Branch and Tag Management for Kernel Releases
- Some useful commands
- List our branches:
- Show our commits:
- Build a kernel
- Install and select it as a test kernel for the next reboot:
- Change the config
- Create a new build tag for a bee file
- Cherry-pick config changes from another mpi branch
- Fix "warning: inexact rename detection was skipped due to too many files."
Clone this wiki locally
Branch and Tag Management for Kernel Releases
For each upstream release from Linus and the stable series, we maintain corresponding branches that include our local modifications. For instance, the v5.10.100
release has a matching branch named linux-5.10.100-mpi
in our repository. These branches are auto-generated when a new upstream release is announced.
To compile a kernel using bee, we create a tag in this repository, such as mariux-5.10.110-433
for the linux-5.10.110-433.bee
build.
Kernel configurations are stored in the config-mpi
file within these branches, using the make savedefconfig format. Configurations evolve with kernel updates and may differ between releases. While automatic updates are mostly reliable, they are not infallible.
We may also intentionally alter configurations or apply custom patches. These changes might need to be applied across all relevant branches.
The Mariux64 default kernel configuration and code represent the definitive guide for our desired setup. Our modifications should be applied to the default kernel series and all subsequent series still maintained by upstream.
So, for example, at the time of this writing our default kernel is 5.15.131
. According to kernel.org, the maintained series are
mainline | 6.7 | 2024-01-07 |
stable | 6.6.12 | 2024-01-15 |
longterm | 6.1.73 | 2024-01-15 |
longterm | 5.15.147 | 2024-01-15 |
For any code or configuration changes, we should target the linux-5.15.147-mpi
, linux-6.1.73-mpi
, linux-6.6.12-mpi
, and linux-6.7-mpi
branches when appropriate.
Some useful commands
List our branches:
git branch -a | grep -- -mpi
Show our commits:
git log --oneline --no-merges --no-decorate vVERSION..mariux64/linux-VERSION-mpi
Build a kernel
git checkout linux-VERSION-mpi
cp config-mpi .config
make olddefconfig
make -j $(nrpoc)
Install and select it as a test kernel for the next reboot:
Once:
cat >>install.sh <<EOF
#! /bin/bash
make modules_install
cp ./arch/x86/boot/bzImage /boot/bzImage.test
mxgrub bzImage.test
EOF
chmod +x install.sh
Then:
sudo ./install.sh
Change the config
loop:
make menuconfig # make your changes
make savedefconfig
diff config-mpi defconfig # review your changes
when done:
cp defconfig config-mpi
git commit -v config-mpi
Create a new build tag for a bee file
git checkout linux-VERSION-mpi
git tag mariux-VERSION-BUILDNUMBER
git push mariux64 mariux-VERSION-BUILDNUMBER
Cherry-pick config changes from another mpi branch
git checkout linux-VERSION-mpi
For each commit:
git cherry-pick XXXXXXX # if this fails, see below
cp config-mpi .config && make olddefconfig && make savedefconfig && diff config-mpi defconfig
cp defconfig config-mpi && git commit --amend config-mpi # only if there were differences
If cherry-pick fails:
git restore -s HEAD config-mpi && cp config-mpi .config && make olddefconfig
make menuconfig # do it manually
make savedefconfig && cp defconfig config-mpi && git add config-mpi && git cherry-pick --continue
When done:
git push mariux64
Fix "warning: inexact rename detection was skipped due to too many files."
git config merge.renamelimit 10000