You are not logged in.
git clone https://github.com/archlinux/linux.git
git checkout 13d97fdaade94ad1e9f4853004390d4787106dd6 # Kernel 5.18.16
git revert 07186778cf645cc79e6913a28dadf445cd3e2439 # revert framebuffer issue
make
make modules
sudo make modules_install
make bzImage
yay -S nvidia-dkms
make modules
sudo make modules_install
make bzImage
sudo cp -v arch/x86/boot/bzImage /boot/vmlinuz-linux
sudo mkinitcpio -P
breaks modules on boot and doesn't work 5.18.16 kernel doesn't work either
So somebody can say how I can compile a working 5.18.16 kernel?
Offline
No one?
Offline
So somebody can say how I can compile a working 5.18.16 kernel?
Offline
Morta wrote:So somebody can say how I can compile a working 5.18.16 kernel?
I know how compile a working kernel but I can’t revert the framebuffer without breaking the whole 5.18.16 kernel
Offline
I know how compile a working kernel but I can’t revert the framebuffer without breaking the whole 5.18.16 kernel
Put your reverting patch into PKGBUILD directory and update PKGBUILD `source` and `sha256sums` with patch filename and its SHA256 sum (or set it to 'SKIP').
Offline
==> Starting prepare()...
patching file drivers/video/fbdev/core/fbmem.c
Reversed (or previously applied) patch detected! Skipping patch.
2 out of 2 hunks ignored -- saving rejects to file drivers/video/fbdev/core/fbmem.c.rej
==> ERROR: A failure occurred in prepare().
Aborting...
What means that?
Last edited by Morta (2022-08-05 20:26:15)
Offline
I didn't found a good sample
1. Export linux PKGBUILD repository as described in wiki article:
$ asp update linux
$ asp export linux
2. Download package sources:
$ cd linux
$ makepkg -o
3. Go to sources and create reverse patch for specific commit:
$ cd src/archlinux
$ git show -p -R 07186778cf645cc79e6913a28dadf445cd3e243 > ../../nofb.patch
4. Go back to PKGBUILD and edit it: add 'nofb.patch' to source list and 'SKIP' to sha256sums.
source=(
"$_srcname::git+https://github.com/archlinux/linux?signed#tag=$_srctag"
config # the main kernel config file
nofb.patch
)
...
sha256sums=('SKIP'
'77fdfe47d8ab448787ac9cc4b73ad6d44ded735a4a001005e39301f6ddb553b4'
'SKIP')
5. To speed up build you can also remove `htmldocs` from build function and and `"$pkgbase-docs"` from `pkgname`:
build() {
cd $_srcname
make all
}
...
pkgname=("$pkgbase" "$pkgbase-headers")
6. Then build packages:
$ makepkg
7. And install them:
$ sudo pacman -U linux-5.18.16.arch1-1-x86_64.pkg.tar.zst linux-headers-5.18.16.arch1-1-x86_64.pkg.tar.zst
Also it is possible to build packages without creating dedicated patch file. Instead of steps 3, 4 just go to sources and revert commit:
$ cd src/archlinux
$ git revert --no-edit 07186778cf645cc79e6913a28dadf445cd3e243
And in step 6 build packages with existing sources:
$ makepkg -e
It is little bit faster but you'll need to revert commit every time as sources re-downloaded. And probably you'll need to configure git.
Offline
No one?
https://bugzilla.kernel.org/show_bug.cgi?id=216303#c14
@dimich the commit can be reverted as part of the PKGBUILD
git diff
diff --git a/trunk/PKGBUILD b/trunk/PKGBUILD
index 6b0de72..126024b 100644
--- a/trunk/PKGBUILD
+++ b/trunk/PKGBUILD
@@ -40,6 +40,8 @@ prepare() {
echo "-$pkgrel" > localversion.10-pkgrel
echo "${pkgbase#linux}" > localversion.20-pkgname
+ git revert -n 07186778cf645cc79e6913a28dadf445cd3e2439
+
local src
for src in "${source[@]}"; do
src="${src%%::*}"
Offline
@dimich the commit can be reverted as part of the PKGBUILD
Indeed. I didn't think of it this way. Thank you.
Last edited by dimich (2022-08-05 21:36:32)
Offline
Morta wrote:No one?
https://bugzilla.kernel.org/show_bug.cgi?id=216303#c14
@dimich the commit can be reverted as part of the PKGBUILD
git diff diff --git a/trunk/PKGBUILD b/trunk/PKGBUILD index 6b0de72..126024b 100644 --- a/trunk/PKGBUILD +++ b/trunk/PKGBUILD @@ -40,6 +40,8 @@ prepare() { echo "-$pkgrel" > localversion.10-pkgrel echo "${pkgbase#linux}" > localversion.20-pkgname + git revert -n 07186778cf645cc79e6913a28dadf445cd3e2439 + local src for src in "${source[@]}"; do src="${src%%::*}"
@loqs where I have to add it in the PKGBUILD?
Offline
In the 'prepare' function above line #43 - linux 5.19.arch1-1 ...
Offline
Morta wrote:I didn't found a good sample
1. Export linux PKGBUILD repository as described in wiki article:
$ asp update linux $ asp export linux
2. Download package sources:
$ cd linux $ makepkg -o
3. Go to sources and create reverse patch for specific commit:
$ cd src/archlinux $ git show -p -R 07186778cf645cc79e6913a28dadf445cd3e243 > ../../nofb.patch
4. Go back to PKGBUILD and edit it: add 'nofb.patch' to source list and 'SKIP' to sha256sums.
source=( "$_srcname::git+https://github.com/archlinux/linux?signed#tag=$_srctag" config # the main kernel config file nofb.patch ) ... sha256sums=('SKIP' '77fdfe47d8ab448787ac9cc4b73ad6d44ded735a4a001005e39301f6ddb553b4' 'SKIP')
5. To speed up build you can also remove `htmldocs` from build function and and `"$pkgbase-docs"` from `pkgname`:
build() { cd $_srcname make all } ... pkgname=("$pkgbase" "$pkgbase-headers")
6. Then build packages:
$ makepkg
7. And install them:
$ sudo pacman -U linux-5.18.16.arch1-1-x86_64.pkg.tar.zst linux-headers-5.18.16.arch1-1-x86_64.pkg.tar.zst
Also it is possible to build packages without creating dedicated patch file. Instead of steps 3, 4 just go to sources and revert commit:
$ cd src/archlinux $ git revert --no-edit 07186778cf645cc79e6913a28dadf445cd3e243
And in step 6 build packages with existing sources:
$ makepkg -e
It is little bit faster but you'll need to revert commit every time as sources re-downloaded. And probably you'll need to configure git.
Thanks dmichi. Stay strong against invasion!
Offline
In the 'prepare' function above line #43 - linux 5.19.arch1-1 ...
Thx
Offline
prepare() {
git diff
diff --git a/trunk/PKGBUILD b/trunk/PKGBUILD
echo "-$pkgrel" > localversion.10-pkgrel
echo "${pkgbase#linux}" > localversion.20-pkgname
git revert -n 07186778cf645cc79e6913a28dadf445cd3e2439
local src
for src in "${source[@]}"; do
src="${src%%::*}"
cd $_srcname
# fix NFSv4 mounting issue regression - FS#73838 / FS#73860
# https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/patch/?id=6f2836341d8a39e1e000572b10959347d7e61fd9
patch -Rp1 -i ../0006_fix_NFSv4_mount_regression.diff
echo "Setting version..."
scripts/setlocalversion --save-scmversion
echo "-$pkgrel" > localversion.10-pkgrel
echo "${pkgbase#linux}" > localversion.20-pkgname
local src
for src in "${source[@]}"; do
src="${src%%::*}"
src="${src##*/}"
[[ $src = *.patch ]] || continue
echo "Applying patch $src..."
patch -Np1 < "../$src"
done
echo "Setting config..."
cp ../config .config
make olddefconfig
# diff -u ../config .config || :
#return 1
make -s kernelrelease > version
echo "Prepared $pkgbase version $(<version)"
}
What is wrong? Gives me a
syntax error near unexpected token `}'
at the last line
Offline
syntax error near unexpected token `}'
for src in "${source[@]}"; do
has no `done` operator.
Also i guess it should
cd $_srcname
before git revert and other operations with sources.
Stay strong against invasion!
Thank you!
Offline
Morta wrote:syntax error near unexpected token `}'
for src in "${source[@]}"; do
has no `done` operator.
Also i guess it should
cd $_srcname
before git revert and other operations with sources.
Morta wrote:Stay strong against invasion!
Thank you!
You the man! THX!
Offline