Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Applying the patch #11

Open
Darth-Ness opened this issue Aug 16, 2021 · 13 comments
Open

Applying the patch #11

Darth-Ness opened this issue Aug 16, 2021 · 13 comments

Comments

@Darth-Ness
Copy link

So, this laptop (not exactly sure how old it is, but it was running XP and system BIOS said it was 2004) I have the 32-bit version installed on it. The kernel version is 4.19 so using the "patch" command I tried to run the patch file. The command line after several minuets still would not print anything. Should I have used some flags?

@kakra
Copy link

kakra commented Aug 16, 2021

patch doesn't take a filename for the patch as parameter but the name of the file to patch. patch expects patches on stdin.

So you'd need to run patch <le9patch.patch to patch the files. Without any file name, it will patch all the files mentioned in the patch. You probably need to exclude the first path component if the patch was exported via git (it will prepend a/ and b/ to each file path). You can look at the patch file with an editor to find out. patch -p1 <le9patch.patch would remove the first path component.

@hakavlad
Copy link
Owner

hakavlad commented Aug 16, 2021

Example: enter the kernel directory and run patch command (the patch itself is outside the kernel directory):

linux-5.14-rc6$ patch -p1 < ../le9eb-5.14-rc1.patch
checking file Documentation/admin-guide/sysctl/vm.rst
checking file include/linux/mm.h
checking file kernel/sysctl.c
checking file mm/Kconfig
checking file mm/vmscan.c

@Darth-Ness
Copy link
Author

Okay, thanks for the help. This is my first time using this command so I didn't expect it to work way. I close this issue if that works.

@Darth-Ness
Copy link
Author

So after running the above commands, it outputted what looked like the contents of the patch, then asked me to choose a patch file.

@hakavlad
Copy link
Owner

Could you please show the output and what command you run?

@Darth-Ness
Copy link
Author

"patch -p1 < /home/user/Desktop/le9-patch/le9eb_patches/le9eb-4.19.patch" was the command. The output is actually the "le9eb patch" part of the readme.

@kakra
Copy link

kakra commented Aug 17, 2021

Please run pwd && ls at the same directory you tried to use the patch command.

@Darth-Ness
Copy link
Author

It outputted this "/boot
config-4.19.0-17-686-pae grub initrd.img-4.19.0-17-686-pae System.map-4.19.0-17-686-pae vmlinuz-4.19.0-17-686-pae
"

@hakavlad
Copy link
Owner

@Darth-Ness you are not in the kernel directory.
Output should be like

$ pwd && ls
/home/user/KERNEL/_linux419/linux
arch   certs    CREDITS  Documentation  firmware  include  ipc     Kconfig  LICENSES     Makefile  net     samples  security  tools  virt
block  COPYING  crypto   drivers        fs        init     Kbuild  kernel   lib               MAINTAINERS  mm        README  scripts  sound     usr

@kakra
Copy link

kakra commented Aug 17, 2021

@Darth-Ness I think this will becoming more complicated than you thought. What you need to do is actually compile your kernel from source. If you never did that before, there's a lot to learn first. It may be easier to just get a binary kernel image built for your distribution from someone else who also included the patch. I think there are some people who provide such kernels and already adopted this patchset. @hakavlad may know better which do.

It would help if you tell us which distribution you're using.

@Darth-Ness
Copy link
Author

It is using the Debian 32-bit version

@Darth-Ness
Copy link
Author

Darth-Ness commented Aug 19, 2021

Okay, after looking around for a kernel, I have found none. Any ideas?

Wait never mind I think I found one.

@hakavlad
Copy link
Owner

hakavlad commented Aug 19, 2021

I `ll answer later. I just recently built a kernel for Debian 11 i686.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants