Hi,
i was able to create a seemingly correct patch file, by following this small tutorial:
https://medium.com/coinmonks/make-linux-kernel-better-beginners-guide-to-writing-your-first-linux-patch-1125e4891e0d.
What i did, was cloning the git mainline kernel repo and i updated the file
arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi
to my needs, which was just the change of line 17:
stdout-path = "serial4:1500000n8";
afterwards i created the patch file by committing my change to my local repo and this command:
git format-patch master..name-of-my-branch
This gave my this file:
From af079115d70a778d457d0067375dde81928fb4db Mon Sep 17 00:00:00 2001
From: = <...>
Date: Tue, 30 Aug 2022 12:34:14 +0000
Subject: [PATCH] changed serial console port from 2 to 4 to omit issues with
gpio sensors
---
arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi
index 401e1ae9d944..b4c7ea9a93a1 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi
@@ -17,7 +17,7 @@ aliases {
};
chosen {
- stdout-path = "serial2:1500000n8";
+ stdout-path = "serial4:1500000n8";
};
clkin_gmac: external-gmac-clock {
--
2.34.1
I have placed this file in the following folder
userpatches/u-boot/u-boot-rockchip64/rk3399-change-serial-console-port.patch
In addition to that i modified my config-default.conf and added the following build options:
# additions to compile for the rock-pi4
CREATE_PATCHES="yes"
BOARD="rockpi-4b"
BRANCH="current"
RELEASE="bullseye"
PROGRESS_LOG_TO_FILE="yes"
OFFLINE_WORK="no"
USE_MAINLINE_GOOGLE_MIRROR="yes" # i had issues to pull from the original repo
USE_GITHUB_UBOOT_MIRROR="yes" # same as above
After running the compile.sh script i get the following message:
[ o.k. ] Started patching process for [ u-boot rockchip64-rockpi-4b-current ]
[ o.k. ] Looking for user patches in [ userpatches/u-boot/u-boot-rockchip64 ]
[ o.k. ] * [l][c] add-board-clockworkpi-a06.patch
...
[ o.k. ] * [l][c] rk3399-always-init-rkclk.patch
[ warn ] * [u][c] rk3399-change-serial-console-port.patch [ failed ] # <- why is this failed?
[ o.k. ] * [l][c] rk3399-disable-hdmi-roc-pc.patch
[ o.k. ] * [l][c] rk3399-disable-hdmi.patch
[ o.k. ] * [l][c] rk3399-enable-stable-mac.patch
[ o.k. ] * [l][c] rk3399-populate-child-node-of-syscon.patch
When i check the patching.log file i see a message, that says the "no file to patch". I don't get why this is shown, how can i fix my patch?
Processing file /home/michael/ws/build/userpatches/u-boot/u-boot-rockchip64/rk3399-change-serial-console-port.patch
The text leading up to this was:
--------------------------
|From af079115d70a778d457d0067375dde81928fb4db Mon Sep 17 00:00:00 2001
|From: = <...>
|Date: Tue, 30 Aug 2022 12:34:14 +0000
|Subject: [PATCH] changed serial console port from 2 to 4 to omit issues with
| gpio sensors
|
|---
| arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi | 2 +-
| 1 file changed, 1 insertion(+), 1 deletion(-)
|
|diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi
|index 401e1ae9d944..b4c7ea9a93a1 100644
|--- a/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi
|+++ b/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi
--------------------------
No file to patch. Skipping patch.
1 out of 1 hunk ignored
Anyone has an idea, what could be wrong?