patch -p1 <../aufs-allow-sfs.patch
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Naur aufs4-4.11.7-20170711ORIG/fs/aufs/loop.c aufs4-4.11.7-20170711/fs/aufs/loop.c
|--- aufs4-4.11.7-20170711ORIG/fs/aufs/loop.c 2017-07-11 23:03:30.000000000 +0800
|+++ aufs4-4.11.7-20170711/fs/aufs/loop.c 2017-07-11 23:30:21.106122435 +0800
--------------------------
File to patch:
How to patch the kernel?aufs-allow-sfs.patch (Solved)
Moderator: Forum moderators
How to patch the kernel?aufs-allow-sfs.patch (Solved)
Reason: Moved "solved" from beginning of title to end
-
- Posts: 2503
- Joined: Wed Dec 30, 2020 6:14 pm
- Has thanked: 53 times
- Been thanked: 1263 times
Re: How to patch the kernel?
This can happen if the kernel you're trying to patch is not 5.10.0, or if you applied the patch already.
Re: How to patch the kernel?
dimkr wrote: Mon Nov 29, 2021 6:15 amThis can happen if the kernel you're trying to patch is not 5.10.0, or if you applied the patch already.
No, the kernel I downloaded is
https://cdn.kernel.org/pub/linux/kernel ... .81.tar.xz
The patch download address is:
http://distro.ibiblio.org/easyos/source ... x/5.10.81/
Or where can I download the patched kernel?
-
- Posts: 2503
- Joined: Wed Dec 30, 2020 6:14 pm
- Has thanked: 53 times
- Been thanked: 1263 times
Re: How to patch the kernel?
patch-5.10.81 is supposed to be applied to 5.10.0. It contains the delta between 5.10.0 and 5.10.81.
Either download the 5.10.81 sources and skip the patch, or get 5.10.0 and apply the patch (and apply it only once).
Re: How to patch the kernel?
dimkr wrote: Mon Nov 29, 2021 6:25 ampatch-5.10.81 is supposed to be applied to 5.10.0. It contains the delta between 5.10.0 and 5.10.81.
Either download the 5.10.81 sources and skip the patch, or get 5.10.0 and apply the patch (and apply it only once).
Thanks for answering! However, the compilation failed, and the error message:
LD [M] drivers/gpu/drm/nouveau/nouveau.o
AR drivers/gpu/built-in.a
make: *** [Makefile drivers] Error 2
I have used two versions of pup and both have the same problem. Vanilla Dpup also does not work, and it cannot compile.
Re: How to patch the kernel?
Is there a tutorial on compiling the kernel?
- bigpup
- Moderator
- Posts: 7461
- Joined: Tue Jul 14, 2020 11:19 pm
- Location: Earth, South Eastern U.S.
- Has thanked: 1006 times
- Been thanked: 1672 times
Re: How to patch the kernel?
Not sure why you want to do anything with the kernel.
What specific Puppy version do you want to use?
Exactly how do you want to install it?
Do you want to install Puppy in a virtual machine?
Virtualbox is running in what specific operating system?
How are you setting up the Virtualbox virtual machine to mimic what computer setup?
The kernel that is used in any of the Puppy versions should work as it is.
To provide info on fixing any issue in Puppy Linux.
We must have info on what specific Puppy version you using?????
The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected
- rockedge
- Site Admin
- Posts: 6965
- Joined: Mon Dec 02, 2019 1:38 am
- Location: Connecticut,U.S.A.
- Has thanked: 3104 times
- Been thanked: 2900 times
- Contact:
Re: How to patch the kernel?
what type of kernel patch is being applied? For example I have built several real time "huge" kernels for Puppy Linux, which I used the woof-CE /kernel-kit to do the work. In my case real time Linux kernel patches MUST match the kernel version exactly. The patch comes in a monolithic form or with each patch step in an individual patch file. The monolithic form uses the command and syntax: patch -p1 <../patch-5.10.81
Also a Puppy Linux kernel must have the AUFS patches applied as well.
Using the kernel-kit directly (recommended) I start with woof-CE which I will clone to /mnt/sdb1/woof-CE
I then enter the directory /mnt/sdb1/woof-CE and run ./merge2out
using 64 bit focal as the choices, which creates the woof-CE output directories in /mnt/sdb1/woof-out_x86_64_x86_64_ubuntu_focal64
from here, enter /kernel-kit which will be similar to this:
Make a backup of /kernel-kit/patches like /kernel-kit/patches-bak
open /kernel-kit/build.conf. Below is an example of what I might use to build a real time kernel.
Code: Select all
#--
# Configuration options
# =====================
#
# **NOTE**: check the original file every once in a while
# settings might be added or removed...
#
# see http://www.kernel.org/ for the latest kernel info..
#--
################################################################
## add a Kernel .config file in one of the configs_* directories
## It must follow this syntax:
## version info
## DOTconfig-3.14.73-i686-4g
################################################################
## speed up the process by specifing a DOTconfig file:
#DOTconfig_file=DOTconfig
#DOTconfig_file=configs_x86/DOTconfig-3.16.85-i686-4g
# latest in series, LatestK
# this gets the latest kernel in relation to the DOTconfig_file
# specified above and depends on that value. It must be a longterm
# kernel
#LatestK=1
## use this version string with the current ./DOTconfig
## (in case it doesn't have usable version info inside)
kernel_ver=5.4.161
## i386 specific stuff: force pae/nopae - i486/i686
## note: the script will run 'make oldconfig' to ensure
## the new settings take effect..
#x86_disable_pae=yes
#x86_enable_pae=yes
## this is the kernel suffix hack, you can leave it empty ie: uname -r
## if you don't leave empty the leading "dash" is required
## DO NOT change it between minor versions (i.e 3.14.1 and 3.14.2); otherwise,
## third-party drivers will break and users won't be able to upgrade: kernel-kit
## patches the kernel to ensure drivers built for the major version (say, 3.14)
## continue to work with any future minor version (3.14.1, 3.14.2, etc') and
## don't have to be rebuilt, but the suffix must not change for this to work
## (this is particularly good if you wish to stick with a longterm kernel branch
## without any maintenance and without frustrating users that need extra drivers)
## example:
#custom_suffix=-4G
custom_suffix=
## this is the name of the pet package suffix, and source sfs
## name it whatever you like, usually put in a signifier for your distro
## eg: "s" is for slacko
## if you leave empty the script will determine a proper package suffix
package_name_suffix=
##-----------------------------------------------------------------------
## remove kernel sublevel, or not : set yes or no
remove_sublevel=no
## aufs version (git branch) - see README -> AUFS GIT BRANCHES
## the script automatically detects the aufs version, but when it does not
## you must specify it here:
aufsv=5.4.3
## JOBS ###
## if you have a multicore processor you can set this var
## don't set if you have a single core! >> cooked machine
## DO NOT set it to 0 (zero) >> cooked machine
JOBS=-j4
### squashfs compression ###
## unset this for the default of your mksquashfs binary
#COMP="-comp gzip"
COMP="-comp xz"
#COMP="-comp xz -b 512K"
## strip kernel modules?
## warning: this might cause issues
STRIP_KMODULES=no
## Firmware tarballs repository
#FW_URL=http://ftp.nluug.nl/ftp/pub/os/Linux/distr/puppylinux/firmware
## Firmware tarball or SFS (fdrv)
## specify pkg url to automate the process
#FW_PKG_URL="http://ftp.nluug.nl/ftp/pub/os/Linux/distr/puppylinux/firmware/firmware-140621-big.tar.bz2"
## Kernel download mirrors
kernel_mirrors='https://www.kernel.org/pub/linux/kernel
ftp://ftp.ntu.edu.tw/linux/kernel
ftp://ftp.heanet.ie/pub/kernel.org/pub/linux/kernel
ftp://ftp.yandex.ru/pub/linux/kernel/
https://mirror.aarnet.edu.au/pub/ftp.kernel.org/linux/kernel
ftp://ftp.jaist.ac.jp/pub/Linux/kernel.org/linux/kernel
ftp://www.mirrorservice.org/pub/linux/kernel
ftp://ftp.be.debian.org/pub/linux/kernel'
## This kit now gets firmware from kernel.org
## The default is to produce a firmware package that is based on the running
## kernel package and sent to main build or you can send it to the fdrv
## or you can opt to have no firmware
## fware=b >> builtin (zdrv)
## fware=f >> fdrv
## fware=n >> no firmware - no download of large firmware repo
## RECOMMENDATION: choose f!
fware=f
## Extra firmware for wireless devices including B43, B43legacy and Intel Pro Wireless
## Set to 'yes' to download and extract these firmware blobs to fdrv
## depends on fware=f or fware=b
EXTRA_FW=yes
## -- AUTO --
## Enforce automation of the process. Also triggered by: ./build.sh auto
## Every error is fatal, so you must specify all the needed stuff in build.conf first..
#AUTO=yes
## if no third party drivers will be built, the generation of a kernel sources
## SFS can be skipped
#CREATE_SOURCES_SFS=no
## in some special cases, like some ARM platforms, one might wish to build the
## kernel without aufs
# warning: Puppy might not boot, or be partially broken without aufs
#AUFS=no
The AUFS must be the closest version prior to the kernel version being used.
The patches I retrieve from : https://mirrors.edge.kernel.org/pub/lin ... ojects/rt/
and in this example ->
Notice there are 2 different patch files.
patch-5.4.161-rt66.patch.xz is monolithic
patches-5.4.161-rt66.tar.xz is each patch a separate file. This is what will work in the kernel-kit.
extract and place the files in /kernel-kit/patches
now it's time to run ./build.sh
Patches will be applied automatically and if all goes well the kernel-kit build will go into the kernel configuration stage. Complete the config to enable disable what ever the patches provide and what other features to enable/disable. Let the compile and build of the kernel finish and done.
Good Luck!
-
- Posts: 2503
- Joined: Wed Dec 30, 2020 6:14 pm
- Has thanked: 53 times
- Been thanked: 1263 times
Re: How to patch the kernel?
From November 26th, kernel-kit couldn't build 5.10.x kernels (because 5.10.82 broke aufs). The fix is https://github.com/puppylinux-woof-CE/w ... 7883492d65, merged 23 hours ago.
Try this:
git clone https://github.com/puppylinux-woof-CE/woof-CE
cd woof-CE/kernel-kit
cp -f 5.10.x-x86_64-build.conf build.conf
./build.sh
If the build passes, you can go ahead and customize the kernel configuration, or build something else.
- JASpup
- Posts: 1653
- Joined: Sun Oct 04, 2020 10:52 am
- Location: U.S.A.
- Has thanked: 70 times
- Been thanked: 89 times
Re: How to patch the kernel?
Puppy Linux is an operating system for personal computers with an endearing animal theme and lightweight ethic.
If everyone has to understanding compiling kernels to use it, there are no beginners and a technical background trumps my first sentence.
Linux accounted for 1.85% of the desktop PC market share in 2020. Statistics from July 2020 indicate that the desktop market share has seen a slight decrease in market share. In contrast, the desktop uses of the Linux operating system for January and February was around 2%.
On the Whiz-Neophyte Bridge
Linux Über Alles
Disclaimer: You may not be reading my words as posted.
- rockedge
- Site Admin
- Posts: 6965
- Joined: Mon Dec 02, 2019 1:38 am
- Location: Connecticut,U.S.A.
- Has thanked: 3104 times
- Been thanked: 2900 times
- Contact:
Re: How to patch the kernel?
no one has to compile a kernel....unless they want too.
........have to start somewhere I guess.
Re: How to patch the kernel?
rockedge wrote: Tue Nov 30, 2021 12:14 amno one has to compile a kernel....unless they want too.
........have to start somewhere I guess.
The current other new kernels are not working properly, the mouse is drifting, and Barry's 5.10.81 is used normally, but the virtualbox cannot be compiled with its kernel source code, because it requires glibc 2.33, my glibc 2.28 and 2.31.
http://distro.ibiblio.org/easyos/amd64/ ... p1_src.sfs
The 5.10.81 kernel is very suitable for my computer, so I need to install a virtual machine. How can I modify kernel_5.10.81-p1_src.sfs to be able to install virtualbox under glibc 2.28?
Glibc 2.33 is prompted when installing
Re: How to patch the kernel?aufs-allow-sfs.patch
The other patch is finished, but this patch does not work:
aufs-allow-sfs.patch
patch -p1 <../aufs-allow-sfs.patch
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Naur aufs4-4.11.7-20170711ORIG/fs/aufs/loop.c aufs4-4.11.7-20170711/fs/aufs/loop.c
|--- aufs4-4.11.7-20170711ORIG/fs/aufs/loop.c 2017-07-11 23:03:30.000000000 +0800
|+++ aufs4-4.11.7-20170711/fs/aufs/loop.c 2017-07-11 23:30:21.106122435 +0800
--------------------------
File to patch:
- Phoenix
- Posts: 341
- Joined: Fri Feb 12, 2021 2:03 am
- Location: Canada
- Has thanked: 4 times
- Been thanked: 48 times
Re: How to patch the kernel?
According to this here https://askubuntu.com/a/1335849
You can modify the kernel source code that virtualbox uses to no longer be reliant on glibc 2.33 by using an older kernel version source code.
I would suggest using the steps already given for patching 5.x.x for puppy, and then using the steps provided in the above link to remove the dependency. After that, feel free to try and test the kernel (not on your savefile) to see whether virtualbox can compile and runs fine, as well as being issue-free.
IRC: firepup | Time to hack Puppy!
Re: How to patch the kernel?aufs-allow-sfs.patch
linuxunix wrote: Tue Nov 30, 2021 6:30 amThe other patch is finished, but this patch does not work:
aufs-allow-sfs.patch
patch -p1 <../aufs-allow-sfs.patch
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Naur aufs4-4.11.7-20170711ORIG/fs/aufs/loop.c aufs4-4.11.7-20170711/fs/aufs/loop.c
|--- aufs4-4.11.7-20170711ORIG/fs/aufs/loop.c 2017-07-11 23:03:30.000000000 +0800
|+++ aufs4-4.11.7-20170711/fs/aufs/loop.c 2017-07-11 23:30:21.106122435 +0800
--------------------------
File to patch:
That patch is to be applied after having applied the aufs patches.
I have previously sent you the link:
http://distro.ibiblio.org/easyos/source ... x/5.10.77/
expand build-kernel.tar.gz, inside is a script 1kernel.sh, which applies the patches and then compiles the kernel.
# tar -xf build-kernel.tar.gz
# cd build-kernel
# pwd
...so you can see the path for the suggested symlink, see below. lets call it PWD
If you only want to patch the kernel, just extract that part out of the script. Well, just insert an "exit" in the script after the patches have been applied.
Folder build-kernel needs to be updated with the .81 files here:
http://distro.ibiblio.org/easyos/source ... x/5.10.81/
# gunzip DOTconfig-5.10.81.gz
# cp DOTconfig-5.10.81 DOTconfig
file patch-5.10.81.bz2 needs to be placed in folder patches. Delete the older patch*.bz2
I recommend expand the tarball in a ext4 partition with plenty of space, not in /usr/src, so as not to fill up your save file.
Then create a symlink
# ln -snf $PWD /usr/src
# cd /usr/src
check that you have DOTconfig, patches/patch-5.10.81.bz2 and linux-5.10.tar.bz2 files, then
run this with your "exit" inserted:
# ./kernel.sh
Or, leave the kernel.sh as-is, and it will go ahead and compile the kernel.
Readme here:
http://distro.ibiblio.org/easyos/source ... readme.htm
Re: How to patch the kernel?aufs-allow-sfs.patch
BarryK wrote: Tue Nov 30, 2021 10:54 amlinuxunix wrote: Tue Nov 30, 2021 6:30 amThe other patch is finished, but this patch does not work:
aufs-allow-sfs.patch
patch -p1 <../aufs-allow-sfs.patch
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Naur aufs4-4.11.7-20170711ORIG/fs/aufs/loop.c aufs4-4.11.7-20170711/fs/aufs/loop.c
|--- aufs4-4.11.7-20170711ORIG/fs/aufs/loop.c 2017-07-11 23:03:30.000000000 +0800
|+++ aufs4-4.11.7-20170711/fs/aufs/loop.c 2017-07-11 23:30:21.106122435 +0800
--------------------------
File to patch:That patch is to be applied after having applied the aufs patches.
I have previously sent you the link:
http://distro.ibiblio.org/easyos/source ... x/5.10.77/
expand build-kernel.tar.gz, inside is a script 1kernel.sh, which applies the patches and then compiles the kernel.
# tar -xf build-kernel.tar.gz
# cd build-kernel
# pwd
...so you can see the path for the suggested symlink, see below. lets call it PWDIf you only want to patch the kernel, just extract that part out of the script. Well, just insert an "exit" in the script after the patches have been applied.
Folder build-kernel needs to be updated with the .81 files here:
http://distro.ibiblio.org/easyos/source ... x/5.10.81/
# gunzip DOTconfig-5.10.81.gz
# cp DOTconfig-5.10.81 DOTconfigfile patch-5.10.81.bz2 needs to be placed in folder patches. Delete the older patch*.bz2
I recommend expand the tarball in a ext4 partition with plenty of space, not in /usr/src, so as not to fill up your save file.
Then create a symlink
# ln -snf $PWD /usr/src
# cd /usr/src
check that you have DOTconfig, patches/patch-5.10.81.bz2 and linux-5.10.tar.bz2 files, then
run this with your "exit" inserted:
# ./kernel.shOr, leave the kernel.sh as-is, and it will go ahead and compile the kernel.
Readme here:
http://distro.ibiblio.org/easyos/source ... readme.htm
Please type in the kernel version [5.4.1]: 5.10.81
This script is hardcoded to compile kernel 5.10.x
To change that, edit variable KERNELVERSION in script.
(the 'x' is the kernel minor version, chosen below)
1:
Would you prefer the kernel to install to lib/modules/5.10.81?
This is the default, press ENTER only for this option.
2:
Or, do you want the kernel to have version number 5.10, that is,
install to /lib/modules/5.10, even though it has a minor version
number 81? This may allow earlier 3rd-party kernel drivers to
work after a kernel upgrade, without having to recompile the drivers.
Type '2' then ENTER for this option.
3:
Or, would you like the kernel to have a unique version identifier, example
'-uni', where the modules would be in /lib/modules/2.6.32-uni, (to keep same
name for .44, .45 etc minor versions) or /lib/modules/2.6.32.81-uni?
Type the string, ex1 '-uni', ex2 '.81-uni' then ENTER...
Note, you will be asked to verify whatever you type here...
***OCT 2011: CURRENTLY BROKEN, CHOOSE [1] ONLY***
Press ENTER only for the first option [1]:
you want. This is only desired if your kernel name '5.10.81'
does not identify which subversion of the kernel is being built.
ENTER only to insert '-81' in pkg name (else any other char):
Asked a lot of questions, and finally failed to compile
LD [M] drivers/gpu/drm/nouveau/nouveau.o
AR drivers/gpu/built-in.a
make: *** [Makefile drivers] Error 2
Re: How to patch the kernel?aufs-allow-sfs.patch
I don't know why it failed to compile. It compiles ok for me.
"Asked a lot questions" sounds ominous.
It seems very much like the patches are not getting applied properly.
After asking you to enter "5.10.81" and then enter again, the script should only ask to press enter to configure the kernel, then you exit from that and it asks to press enter to compile.
If all of the instructions are followed correctly, it will work. I must have compiled the kernel using those same scripts, hundreds of times.
Re: How to patch the kernel?aufs-allow-sfs.patch
BarryK wrote: Tue Nov 30, 2021 1:50 pmI don't know why it failed to compile. It compiles ok for me.
"Asked a lot questions" sounds ominous.
It seems very much like the patches are not getting applied properly.
After asking you to enter "5.10.81" and then enter again, the script should only ask to press enter to configure the kernel, then you exit from that and it asks to press enter to compile.
If all of the instructions are followed correctly, it will work. I must have compiled the kernel using those same scripts, hundreds of times.
DOTconfig-5.10.81, compilation errors are all, the error message is as above.
Then I renamed DOTconfig-5.10.78 to DOTconfig-5.10.81, and the compilation was successful. But I am an amd gpu, will there be a problem?
Re: How to patch the kernel?aufs-allow-sfs.patch
linuxunix wrote: Wed Dec 01, 2021 3:51 amThen I renamed DOTconfig-5.10.78 to DOTconfig-5.10.81, and the compilation was successful. But I am an amd gpu, will there be a problem?
Wrong. The instructions asked you to rename whatever config file you want to use, in this case DOTconfig-5.10.81, to DOTconfig.
Have you got the correct patch file in patches folder? It should be patch-5.10.81.bz2
The old one, patch-5.10.77.bz2, must be removed.
Then run 1kernel.sh
I don't want to have to keep repeating the instructions. You get the correct patch file and the config file from here:
http://distro.ibiblio.org/easyos/source ... x/5.10.81/
...that patch file has to be placed in the 'patches' folder, and DOTconfig-5.10.81.gz has to be uncompressed and copied or renamed to DOTconfig -- nothing else, it has to be named just 'DOTconfig'.
# gunzip DOTconfig-5.10.81.gz
# cp -f DOTconfig-5.10.81 DOTconfig
# mv -f patch-5.10.81.bz2 patches/
# rm -f patches/patch-5.10.77.bz2
The 1kernel.sh script read file DOTconfig and writes it to .config in the kernel source folder.
Re: How to patch the kernel?aufs-allow-sfs.patch (Solved)
@linuxunix
If you want the patched kernel source, here is 5.10.83, with the patches that 1kernel.sh applies:
http://distro.ibiblio.org/easyos/source/kernel/5.10.x/
It has the latest aufs patch, for 5.10.82+ kernels.
I will leave it online for about a week.
Re: How to patch the kernel?aufs-allow-sfs.patch (Solved)
BarryK wrote: Fri Dec 03, 2021 3:46 pm@linuxunix
If you want the patched kernel source, here is 5.10.83, with the patches that 1kernel.sh applies:http://distro.ibiblio.org/easyos/source/kernel/5.10.x/
It has the latest aufs patch, for 5.10.82+ kernels.
I will leave it online for about a week.
thank you very much!
Re: How to patch the kernel?aufs-allow-sfs.patch (Solved)
linuxunix wrote: Sat Dec 04, 2021 3:14 pmBarryK wrote: Fri Dec 03, 2021 3:46 pm@linuxunix
If you want the patched kernel source, here is 5.10.83, with the patches that 1kernel.sh applies:http://distro.ibiblio.org/easyos/source/kernel/5.10.x/
It has the latest aufs patch, for 5.10.82+ kernels.
I will leave it online for about a week.
thank you very much!
Oops, sorry, I uploaded it, but it got deleted.
I use rsync to sync my local files with online, and when I ran the rsync script, it deleted the patched kernel source tarball.
OK, uploading it again. Using gftp which is very slow, it says 47 minutes to upload. Anyway, after uploaded, 'linux-5.10.83-src-patched.tar.gz' will be here:
https://distro.ibiblio.org/easyos/sourc ... x/5.10.83/
Though, the next time I run the rsync script, it will get deleted again.
EDIT:
Why is gftp so slow? It is uploading at only 47KB/sec. Will update this post when upload has completed.
EDIT:
Upload completed.