cancel
Showing results for 
Search instead for 
Did you mean: 

How To apply patches when installing the kernel? (Developer Package)

SigmaPrime
Senior

Hello Everyone

I am using the README.HOW_TO.txt file to install the kernel. IN section 3 it is stated that I must apply some patches:

1-Section 3 patch application

if there is some patch, please apply it on source code
    $> for p in `ls -1 *.patch`; sudo do patch -p1 < $p; done
 
mehdi@LAPTOP-CP6QP7G9:~/DevPack/stm32mp1-openstlinux-5-4-dunfell-mp1-20-11-12/sources/arm-ostl-linux-gnueabi/linux-stm32mp-5.4.56-r0$ for p in *.patch; do sudo patch --strip=1 < $p; done
can't find file to patch at input line 16
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|From 4556074b66971918536ed27d52f5f4f6337f0646 Mon Sep 17 00:00:00 2001
|From: Lionel VITTE <lionel.vitte@st.com>
|Date: Mon, 5 Oct 2020 13:19:40 +0200
|Subject: [PATCH 01/22] ARM-stm32mp1-r2-rc8-MACHINE
|
|---
| arch/arm/kernel/time.c         | 2 ++
| arch/arm/mach-stm32/Kconfig    | 1 +
| arch/arm/mach-stm32/board-dt.c | 2 ++
| 3 files changed, 5 insertions(+)
|
|diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c
|index b996b2cf07038..dddc7ebf4db44 100644
|--- a/arch/arm/kernel/time.c
|+++ b/arch/arm/kernel/time.c
--------------------------
File to patch: 0018-ARM-stm32mp1-r2-SOUND.patch
patching file 0018-ARM-stm32mp1-r2-SOUND.patch
Hunk #1 FAILED at 9.
Hunk #2 FAILED at 107.
2 out of 2 hunks FAILED -- saving rejects to file 0018-ARM-stm32mp1-r2-SOUND.patch.rej
can't find file to patch at input line 35
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/arch/arm/mach-stm32/Kconfig b/arch/arm/mach-stm32/Kconfig
|index 57699bd8f1075..8f9fd1da9ea05 100644
|--- a/arch/arm/mach-stm32/Kconfig
|+++ b/arch/arm/mach-stm32/Kconfig
--------------------------

How do I do that ? Can you give me an example?

I am working in the following directory which contains patches that I will link in a picture.

Directory :

~/DevPack/stm32mp1-openstlinux-5-4-dunfell-mp1-20-11-12/sources/arm-ostl-linux-gnueabi/linux-stm32mp-5.4.56-r0

0693W000006EdLjQAK.png----------------------------------------------------------------------------------------------------------------------------------

2- section 4: have a better management of the kernel

Now coming to section 4 of the .txt file. It is written that I have to:

test -d .git || git init . && git add . && git commit -m "new kernel" && git gc

But I get the following error even with sudo:

/home/mehdi/DevPack/stm32mp1-openstlinux-5-4-dunfell-mp1-20-11-12/sources/arm-ostl-linux-gnueabi/linux-stm32mp-5.4.56-r0/.git: Permission denied

Best regards 😀

10 REPLIES 10

Solved