Context
- See hibernate-pocket, hibernate-pocket-2, hibernate-pocket-3, hibernate-pocket-4, hibernate-pocket-5, hibernate-pocket-6
Building upstream-ish kernel
- Roughly following the "bisecting upstream linux" section of
reform-debian-packages/README.md
$ git clone https://gitlab.collabora.com/hardware-enablement/rockchip-3588/linux.git collabora
$ cd collabora && git git switch -c rockchip-devel origin/rockchip-devel
The next step is to apply the the non-collabora patches from
reform-debian-packages/linux/patches6.15/rk3588-mnt-reform2
Unfortunately these are missing the proper metadata to work with git-am
Sidequest: Fix patches
1000-v3-pci_dw_rockchip_add_system_pm_support.patch doesn't apply, even with added metadata. Start again upstream.
Thanks to
joshc
for the suggestion of theb4
tool.b4 am 1744940759-23823-1-git-send-email-shawn.lin@rock-chips.com
This creates a
.mbx
file ready for git am (roughly equivalent to fetching the/raw
version from lore, with some extra checks).Brute force finding a base for the patch:
git rev-list --no-merges --since 2025-01-01 refs/heads/rockchip-devel | \
while read ref
do
echo trying $ref
git checkout $ref
git apply --check v3_20250418_shawn_lin_pci_dw_rockchip_add_system_pm_support.mbx && echo SUCCESS && break
done
- 122 steps later this yields 9dff55ebaef7 (bisect would be better if we knew a "good" commit).
$ git branch -D tmp ; git switch -c tmp 9dff55ebaef7
$ git am v3_20250418_shawn_lin_pci_dw_rockchip_add_system_pm_support.mbx
$ git rebase -i rockchip-devel
This fails with 3 conflicts. The first is easy, as the one non-comment
line just moves around. The other two involve a new function
rockchip_pcie_unmask_dll_indicator
used to reduce code duplication, and in all
3 cases I just took the version of the code from Shawn's patch.
EDIT This rebase turns out to miss (at least) changes in the names
of the PCI*
constants. By amusing(?) coincidence, as I was
discovering that, the patch was being rebased by someone more
competent at collabora, and is now in the rockchip-devel
branch.