Jump to content

armbian-build, dts patch, can't find file to patch at input line 9...


Go to solution Solved by IBV,

Recommended Posts

Posted (edited)

Hello, previously, after creating a patch file, (v24.11) I used to save it in the userpatches directory as zzzz_xxxx_whatever.patch to ensure it was processed at the bottom of the current patch list. But now, it seems that this no longer works, and therefore, I cannot apply the patch.zzzz_panel_mipi_dsi.patch

 

thank you.

 

here is the log file: https://paste.armbian.com/horamafuru

 

Edit: tested with(trunk.239) latest armbian build( https://github.com/armbian/build/tree/v25.5.0-trunk.239 with zzz-patch-test.patch

 

here is the log file: https://paste.armbian.eu/joyalusado

 

 

 

zzzz_panel_mipi_dsi.patch

Edited by Murat Demirtas
  • Solution
Posted

Hi,

 

your patch fails because the file rk3399-orangepi-4-lts.dts does not exist in the mainline kernel(s) you tried to build.

Maybe previously you appplied it against the vendor kernel?

Posted (edited)

Hello, thank you for reply. I'm using build system v24.11 and latest, kernel version v6.6 and v6.12. Created fresh installation and trying to create patches with command ./compile.sh kernel-patch BOARD=orangepi4-lts BRANCH=current KERNEL_GIT=shallow ARTIFACT_IGNORE_CACHE=yes and that file exist in /home/oem/Desktop/ananki/build/cache/sources/linux-kernel-worktree/6.12__rockchip64__arm64/arch/arm64/boot/dts/rockchip 

 

You are right, because the series of patch files in build system creates this file. I patched non existent file but created with a older patches :).

 

 

Screenshot 2025-03-18 at 11.32.06.png

Edited by Murat Demirtas
Posted
22 minutes ago, Murat Demirtas said:

You are right, because the series of patch files in build system creates this file. I patched non existent file but created with a older patches

Indeed you are trying to patch a file that is created by an armbian patch. I suppose you can overwrite the armbian patch that creates the rk3399-orangepi-4-lts.dts with a patch that creates the dts with your modifications. 

Posted

For the dts, I would take the

patch/kernel/archive/rockchip64-6.12/dt/rk3399-orangepi-4-lts.dts

, modify it according to your needs and put it in the user patches directory (using the recommended way to replace a patch).

Posted
3 часа назад, Murat Demirtas сказал:

Should i edit the python scripts that creates that patches? or is there another way with build system?

To do this, you will need to open two sessions in the terminal.

The test here is my configuration file

1 session

~/armbian$ ./compile.sh test kernel-patch
......
# build system printed:
[] Starting [ interactive patching process for kernel ]
[🌱] Creating commit to start from clean source
[🌱] Patches will be created [ with the following maintainer information ]
[🌱] MAINTAINER (Real name):  [ The-going ]
[🌱] MAINTAINERMAIL (Email):  [ 48602507+The-going@users.noreply.github.com ]
[🌿] If those are not correct, set them in your environment, command line, or config file and restart the process
[🚸] Make your changes in this directory: [ /home/leo/armbian/cache/sources/linux-kernel-worktree/6.13__sunxi64__arm64 ]
[🚸] Press <ENTER> after you are done [ editing files in /home/leo/armbian/cache/sources/linux-kernel-worktree/6.13__sunxi64__arm64 ]
Press ENTER to show a preview of your patch, or type 'stop' to stop patching...

The build system will apply all the patches and make a commit that will include all the changes.
Leave this session alone.
In the second session, you make your changes and record the results.

2 session
leo@armbuild:~/armbian$ cd /home/leo/armbian/cache/sources/linux-kernel-worktree/6.13__sunxi64__arm64
### open root session
leo@armbuild:~/armbian/cache/sources/linux-kernel-worktree/6.13__sunxi64__arm64$ sudo su

root@armbuild:/home/leo/armbian/cache/sources/linux-kernel-worktree/6.13__sunxi64__arm64# ls arch/arm64/boot/dts/rockchip/rk3399-*

linux-kernel-worktree/6.13__sunxi64__arm64# nano arch/arm64/boot/dts/rockchip/rk3399-orangepi.dts

linux-kernel-worktree/6.13__sunxi64__arm64# git add --all

linux-kernel-worktree/6.13__sunxi64__arm64# git commit -m "Add a comment"
###close root session:
linux-kernel-worktree/6.13__sunxi64__arm64# exit

linux-kernel-worktree/6.13__sunxi64__arm64$ git format-patch -1 -o /home/leo/armbian/userpatches/
/home/leo/armbian/userpatches/0001-Add-a-comment.patch

linux-kernel-worktree/6.13__sunxi64__arm64$ cat /home/leo/armbian/userpatches/0001-Add-a-comment.patch
From 4dad6a3fa967235ea7eef35f81733bdafd806b53 Mon Sep 17 00:00:00 2001
From: The-going <48602507+The-going@users.noreply.github.com>
Date: Tue, 18 Mar 2025 12:54:11 +0000
Subject: [PATCH] Add a comment

---
 arch/arm64/boot/dts/rockchip/rk3399-orangepi.dts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-orangepi.dts b/arch/arm64/boot/dts/rockchip/rk3399-orangepi.dts
index 2ddd4da15..29eec7e65 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-orangepi.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-orangepi.dts
@@ -78,6 +78,7 @@ keys: gpio-keys {
                compatible = "gpio-keys";
                autorepeat;
 
+               /* key-power */
                key-power {
                        debounce-interval = <100>;
                        gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
-- 
2.34.1

What should I do with the first session?
Decide for yourself!!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines