74 Commits

Author SHA1 Message Date
Eric Karnes
e578dccef1
Several improvements: quick fix (#918) 2024-04-09 03:30:46 +02:00
Blackteahamburger
2e887a2d8e
Several improvements (#907)
* Make _llvm_ias="1" the default in customization.cfg

* Remove all git related files after copying source files

* Update PREEMPT_RT's supported kernel subversion and patch revision for 6.8

* Make _libunwind_replace a variable in customization.cfg

* Revise the description of native_intel

* Add ECHO CPU scheduler in customization.cfg
2024-04-08 07:12:35 +02:00
Adel Kara Slimane
880610fe45
install.sh: DEB: RPM: bring back bindeb-pkg and binrpm-pkg targets (#915)
we reverted back to deb-pkg and rpm-pkg in the past to support
winesync: it requires a header in /usr/include/linux and that header
is in the src packages, but we can simply just copy that single
required header instead.

Closes: #905
2024-04-03 18:03:12 +02:00
Adel Kara Slimane
843725ec7c
Extra build pipelines for Fedora and Ubuntu (#864)
* ci: factorise kernel building code for Arch

* customization: non-arch: add config option to disable installing the kernel altogether

useful for ci

* customization: add toggle to disable use of 'script' command

needed for ci, otherwise yes "" | ./install.sh install just
freezes

* ci: add Ubuntu pipeline

* ci: add Fedora pipeline

* install.sh: git add changes in the work folder

Both RPM and DEB scripts rely on apparently, not only RPM

* ci: use github to retrieve sources

Probably faster since the runner are hosted by them ?

* ci: arch: update mirror list

Sometimes the ci fails because of "operation too slow"

* ci: follow CachyOS naming scheme for bore scheduler

'bore-eevdf' is just 'bore' now, which makes sense for those who know

* ci: make kernelconfig part of the release

Enables advanced users to check if the kernel they're downloading
has the correct config options. And we can use it to check if
everything is okay

* ci: make a release as long as one kernel builds

I think it's better than cancelling the whole thing.
Because sometimes we don't have time to fix
what's wrong with a distro for a while

* ci: build diet kernel

All good! back to diet kernel

* ci: arch: remove extra frag file

Let's check after a full build if it was really needed.

* config: copy over diet config from 6.6 to 6.7

* ci: #YOLO: build all combinations of distro and scheduler
2024-01-15 19:17:18 +01:00
Adel Kara Slimane
ae773456f6
install.sh: fix handling of env var config overrides (#845)
overriding config values through environment variables wasn't working
because the script call was resetting them before
they were saved

also, the external config file was getting sourced twice
2023-11-14 09:40:22 +01:00
Virtuoz-Ier
df360952b9
6.6: Fix For Fedora and OpenSuse (#840)
* Update 0013-fedora-rpm.patch

The patch  was using the syntax of the mkspec file instead of that of the kernel.spec, leading to the build failing.

* 6.6: Fix for Fedora and OpenSuse

* 6.6: Fix for OpenSuse

* Update 0013-fedora-rpm.patch to fix kernel-install issue on Fedora

Patch grabbed from https://lore.kernel.org/linux-kbuild/20231103-rpmpost-v1-1-9c18afab47f4@meta.com/

* Undo removing of kernel-uname-r

---------

Co-authored-by: Nanotwerp <Nanotwerp@gmail.com>
2023-11-14 09:32:10 +01:00
Tk-Glitch
4408978fba Suse: First unlock packages before install, then lock afterwards.
It seems there is some weird behavior with relocking existing locks
2023-09-13 19:51:55 +02:00
Tk-Glitch
4160cdc52b Suse: Add kernel-syms to the message about unlocking distro's kernel packages 2023-09-09 16:11:42 +02:00
Tk-Glitch
fb5ad72c94 Suse: Fix another instance of the typo from 44e228cc0f7776607cd804fc427ab1e5bb6d94eb 2023-09-09 15:56:01 +02:00
Tk-Glitch
65dc6bda2f Suse: Pass --oldpackage to zypper install. This allows using older kernel versions without having to handle installation by hand, while apparently not preventing installing a newer version. 2023-09-09 15:36:59 +02:00
Tk-Glitch
44e228cc0f Suse: fix stupid typo 2023-09-09 15:28:58 +02:00
Tk-Glitch
231ecec0df Suse: Install kernel-ksyms 2023-09-09 14:27:45 +02:00
Tk-Glitch
de9e9855c2 Suse: Add a prompt to lock system kernel packages, preventing custom kernel overwrite on updates 2023-09-09 14:27:01 +02:00
Tk-Glitch
5135834002 Suse: Also run dracut automatically post-install 2023-09-09 02:24:24 +02:00
Tk-Glitch
ff082aebba 6.5.y: Suse TW fixups
- Import Suse depmod/kmod patches - https://github.com/SUSE/kernel-source/tree/master/patches.rpmify
 - Tweak mkspec to respect Suse /usr usage
 - Run grub2-mkconfig post-install
 - Get rid of the undesired test tweak in 0013-fedora-rpm.patch added with e0c74e5e1559d3b008ed4a790b9f4b7846a71844

We may have some additional work to do as my limited testing with Arch's defconfig + _kernel_on_diet="true" didn't boot. It might actually work with the full defconfig or using Suse's using _configfile="running-kernel". I'll run more tests as needed on my main machine as it was a PITA working on this with a dualcore broadwell laptop 🐸
2023-09-09 02:08:32 +02:00
Adel Kara Slimane
1ac2ea0fd2
Various fixes (#788)
* install.sh: RPM: add install deps

* install.sh: Fedora: remove fedora 32 code path

too old by now

* DEB: add dependencies

* install.sh: do not install libc-dev package

I don't remember why I had to keep it, but I just tried installing only
the image and headers and nvidia-dkms installed just fine

Closes: #772 #732

* prepare: disable CONFIG_LOCALVERSION_AUTO

Closes: #729

* install.sh: gentoo: do not do initramfs and booloader config

it's done directly by the kernel-install script called by make install,
which gets changed in gentoo to do what needs to be done

* patches: fix RPM patches for 6.4 and 6.5
2023-08-15 12:39:28 +02:00
whitehara
a586812578
Fix install.sh for fedora (#752) 2023-06-07 17:41:55 +02:00
Adel Kara Slimane
cce2db1c9f
Various fixes for the RPM target (#684)
* prepare: always patch RPM mkspec

Like this we can notice earlier if it doesn't apply any longer
Otherwise I only test RPM when issues get openned

* RPM: fix RPM mkspecp atch, thanks @W3sG for the heads up!

- Only part of the patch was applying
- Fixed also the fact that packages conflict because of
  unneeded build-id files in /usr/lib/.build-id
- Removed all the hardening flags Fedora uses by default
  "we do not do that here"

Fixes: #669 #609

* install.sh: uninstall-help: fix Fedora query for installed TKG packages

* install.sh: RPM: fix typo in variable

Used the non absolute path for the work folder x)
2023-01-07 20:51:15 +01:00
Adel Kara Slimane
a38ef1643c
Improve customization of source and work folders (#672)
* customization.cfg: add new entries for kernel paths

Two choices:
- Where to put git bare repository,
  - Will be implemented as a bare repository, the folder will have only
    compressed blobs and will be around ~400MB. Should be good to have
    even in HDDs
  - This is meant to be in a permanent storage like HDD or SSD.
    But some uses could have it on a tmpfs if the storage is very slow
    when compared to a full git (shallow) clone
- Where to have the work/build folder
  - This will be implemented through a git worktree,
    where the bare repo will be decompressed. This is best on a tmpfs folder
    but needs >=32GB for a full kernel build. Otherwise should be okay with
    modprobed-db

* customization.cfg: remove obsolete entries

the tmpfs related entries can be set with the previously added entries,
i.e. _kernel_work_folder and _kernel_source_folder

* prepare: check if obsoleted vars get set, warn if so and exit

Like this users will get notified about the change and act accordingly

* prepare: remove unused kernel subver patching code

this used to bump from kernel x.y to x.y.z

* prepare: add func to define kernel abs paths

We will use these absolute paths to refer to kernel folders (work and source)

* prepare: rewrite git fetching code

- Rename to "_setup_kernel_work_folder"
- Now we simply fetch directly the "commit hash" / "git tag"
  from the user chosen remote, no branches
- The source folder (the one that is preferably on disk) is only a bare repo
  with a small size (~400MB)
- The work folder is then (re)created / updated (as need) as a git worktree

* prepare: tkg_patcher: embed patch name into the message

Otherwise it doesn't work on the install.sh approach,
which reimplements a simple msg2 function that doesn't support %s
replacement

* PKGBUILD: use new path variable for work folder

* install.sh: use new path variable for work folder

* CI: setup source and build folder in /tmp

* prepare: update diffconfig with new kernel work folder var
2023-01-04 15:27:41 +01:00
Adel Kara Slimane
75ea27821f
PKGBUILD: sourcing order fix (#653)
* PKGBUILD: source prepare after the config files

The git mirror wasn't configured with the user choice otherwise
Fixes: #647

* install.sh: honor external config file
2022-11-23 15:13:07 +01:00
Tk-Glitch
de0a0d301e install.sh: Disable timed building for now. Bash 5.2 is broken https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1018727 2022-10-11 15:36:30 +02:00
Adel Kara Slimane
1d063ca326
RPM build: Fix several issues (#610)
* RPM: fix the script that generates kernel.spec

- Avoids conflicts with official kernels
- Fixes the reported issues with "unversionned obsoletes"
- Works now with akmod-nvidia

Fixes: #609 #513 #375 #339 #375 #173 #271

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>

* install.sh: RPM: do not install kernel-headers package

We do not need it to build out-of-tree kernel modules. And that's
all we want actually.

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>
2022-10-02 18:33:33 +02:00
Adel Kara Slimane
59afa4083c
use git for kernel sources & improved CI workflow (#591)
* prepare: auto-fetch latest versions + harmonize kernel version var

- Latest version is fetched from git: this prepares the road to
  moving to git cloning and fetching
- Introduce the $_kver variable that follows a three digit
  convention (e.g. '600', '519', '504') to enable comparing
  simply between kernel versions

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>

* All distros: use git to fetch/update kernel sources

- Force git cloning `linux-tkg` so the patches and config
  files are automatically checksummed
- Arch: remove all the sha256sums and source files and automatically
  populate them on script run.
- Move git cloning/fetching script to 'prepare' script file

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>

* accept customization.cfg vars as env vars

This makes CLI way easier by enabling e.g.
_version="5.19" makepkg or
_version="5.19" ./install.sh install

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>

* prepare: better handle git remotes

now there's a dictionary that gives the list of remotes

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>

* prepare: add default git remote if not set or not recognized

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>

* customization.cfg: allow specific kernel versions

e.g. "6.0-rc4" or "5.10.51"

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>

* ci: improved workflow

1. Check periodically for newer kernels with git
2. If a newer kernel exists, with respect to l
   latest Github release:
   1. Build for cfs, pds, bmq for Arch
   2. Make release

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>
2022-09-22 16:17:05 +02:00
Tk-Glitch
60bc9b2f9f Style correction for 4a9f4d3145c1ff63b09072663829c166bb524571 2022-09-21 19:28:50 +02:00
Amar Al-Zubaidi
4a9f4d3145
Support doas and su for root authentication (#593) 2022-09-21 19:26:23 +02:00
Adel Kara Slimane
f88c247a88
Bug reports: create "logs" folder and populate it at each run (#500)
* Bug reports: create "logs" folder and populate it at each run

This makes it easier for people to open issues
as we will ask them to attach every file in the "logs" folder.

File have the .txt extension so they can easily be
drag & dropped into gihub issues

For Arch people: to obtain the shell-output.log, we will ask them to do it
by hand:

makepkg [args] | tee shell-output.log

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>

* prepare: cleanup "logs" folder at each run

So some files, that usually get appended to, don't
grow to infinity.

This behavior needs to be changed if we decide to
keep more logs than the latest one.

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>
2022-04-29 18:29:36 +02:00
Adel Kara Slimane
5a6f3d921b
cpu uarch patches: move download code to prepare (#462)
And update to new naming scheme

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>
2022-03-15 21:40:38 +01:00
zecktos
d7541e00b4
uninstall-help for Debian (#444)
use the Ubuntu uninstall-help also when "_distro" is set to Debian like in the installation part
2022-03-09 15:37:23 +01:00
Adel Kara Slimane
5f36c6353e
Fix cpu-opt patch in "install.sh" and make "prepare" verbose about it (#439)
Closes: #438

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>
2022-02-17 19:50:41 +01:00
Adel Kara Slimane
ded2c0c733
install.sh: quote every variable used in if statements (#434)
Closes: #352

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>
2022-02-13 02:13:41 +01:00
X9VoiD
07503204b4
Add support for RT patches (#380)
* Add support for RT patches

* Disallow other CPU schedulers on PREEMPT_RT
2021-12-12 15:18:48 +01:00
gghhkm
10f242d421
Added schedtool to dependencies (#382)
Related to https://github.com/Frogging-Family/linux-tkg/pull/312
(I got impatient)

Signed-off-by: gghhkm <killk4809@protonmail.com>
2021-12-08 17:28:57 +01:00
Alejandro Bringas Martinez
ec364b7872
Add schedtool dep on Debian (#337) 2021-10-22 01:21:45 +02:00
Adel Kara Slimane
05f874d877
Use Arch config by default + state when config_hardened is used (#305)
* prepare: fix config_hardened + make arch config default for all distros

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>

* prepare: pring message about using hardnened config file

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>

* README: update about the change with the default config file

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>

* install.sh: additional dependencies

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>
2021-09-21 12:20:35 +02:00
Valeri
c686050832
Unify Ubuntu and Debian dependency installation (#311) 2021-09-20 17:53:49 +02:00
Adel Kara Slimane
00948fcff0
install.sh: improve Generic code path + Gentoo + tmpfs install (#304)
Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>
2021-09-18 16:00:05 +02:00
Tk-Glitch
6d45aa2563 install.sh: Fix missing separator
Fixes https://github.com/Frogging-Family/linux-tkg/issues/309
2021-09-16 00:00:49 +02:00
Tk-Glitch
8f4116a1c9 linux515-tkg: Add support for graysky's 5.15 patchset
https://github.com/graysky2/kernel_compiler_patch/blob/master/more-uarches-for-kernel-5.15%2B.patch

Addition to https://github.com/Frogging-Family/linux-tkg/pull/307
2021-09-15 14:24:15 +02:00
Tk-Glitch
3394aa861b Follow-up to bb1f2ae2981ce91903314272ab91694b1684c968 2021-09-15 14:16:02 +02:00
Tk-Glitch
46f2642294 Initial support for 5.14 RC 2021-07-14 18:21:07 +02:00
Tk-Glitch
de3193f4a4 5.4.125, 5.10.43, 5.12.10
Add a check for $opt_ver before prompting about cpu optimizations. The patch is currently broken on 5.4.y, so disable it.
2021-06-10 16:20:47 +02:00
Adel Kara Slimane
36af28fd6c
Change to new name for Graysky march repository (#260)
Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>
2021-06-07 14:51:13 +02:00
Adel Kara Slimane
ca8eab19ee
install.sh: Generic + Clang: prompt to replace libunwind with llvm-libunwind (#258) 2021-06-07 14:50:36 +02:00
Adel Kara Slimane
dea8847167
Various refactorings + Enable Clang LTO (#248)
* Enable Clang LTO

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>

* prepare: improve kernel prompting and selection code

- Subversion are to be directly edited in the _kver_subver_map
variable at the top of the file
- _supported_kernels is theoretically not needed, but it's needed
for the prompting to happen with the correct order, since the
keys in _kver_subver_map are hash-ordered, which is not the
natural ordering

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>

* prepare: update comment

* prepare: improve compiler selection and LTO enablement code path

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>

* install.sh: use _prompt_from_array for distro selection

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>

* prepare: move optiprofile prompt to _prompt_from_array

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>

* prepare: improve cpu sched fallback code

* install.sh: move set -e at the top

* prepare: use arrays for HZ configs

* prepare: enable default selection in _prompt_from_array

* prepare: use _prompt_from_array for _rr_interval

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>

* prepare: update _rr_interval prompting

* prepare: update and use config script for tickless

* prepare: use scripts/config accross the entire script

* prepare: change last lines to scripts/config

* prepare: small fixes

* customization.cfg: revert back to old values for _tickless

* prepare: revert back to old numbering for _rr_interval

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>

* prepare: msg2 used _rr_interval

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>

* prepare: be smarter/dumber with _rr_interval

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>

* prepare: remove last manual interventions to .config

* prepare: fix condition

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>

* prepare: improve cpu march handling and implement prompt

Making `make` prompt wasn't working on my Gentoo for a
reason I don't understand anymore. The configs are unset
by the script. So it always goes for generic by default.
Maybe they need to be entirely deleted from the .config
file.

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>

* prepare: fix name for MuQSS.c

* prepare: use _sched for scheduler source code files

* install.sh: use sudo to clean root owned files in linux-src-git

* prepare: remove useless code

* prepare: fix issue with MuQSS

* Add CacULE scheduler

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>

* 5.13 rc4

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>

* prepare: Remove voluntary_preempt, OFenable and disable_acpi_cpufreq options

* prepare: Prevent config prompt w/ modprobed-db

Rebase of @CodingKoopa PR

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>

* prepare: Empty LOCALVERSION config option for Arch at the correct spot

@CodingKoopa spotted the issue and reported it, thanks!

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>

* prepare: use _enable _undefine and _disable wrappers

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>

* Restore the state tracker for makepkg usage

* Fix tickless array selection order for nohz idle/hz periodic

* Also handle the disabling part of the generic march selector

* Replace _undefine() calls with _disable()

* Preserve the case of config options passed to scripts/config

* Echo the CONFIG_EXPERT options without blank lines

And with a header/footer
Makes searching for config setting bugs easier

* prepare: uppercase config options with "tr"

Co-authored-by: Etienne JUVIGNY <ti3nou@gmail.com>
2021-06-01 20:14:47 +02:00
Tk-Glitch
6d2b07d0b2 install.sh: Add 5.13 opt_ver
Fixes https://github.com/Frogging-Family/linux-tkg/issues/249
2021-05-30 19:50:57 +02:00
Tk-Glitch
d9384b9e7f install.sh: Fix /etc/modules-load.d/winesync.conf generation 2021-05-19 20:52:38 +02:00
Adel Kara Slimane
f0ccecfdb2
Fix winesync for non-arch distros (#243)
* install.sh: install headers in /usr/include for winesync to work

This implies reverting a previous change in deb and rpm distros
and adding make headers_install in the Generic approach

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>

* install.sh: install winesync.rules file

This file will not be removed and will be left dangling
Not so bad I think, since only winesync uses it. We can
remove it in the future if things change

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>

* prepare: remove winesync.rules file during cleanup

So we can check if the user actually asked for winesync
in the current run by checking if the file exists.

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>

* install.sh: add winesync to /etc/modules-load.d for auto-loading

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>
2021-05-18 12:46:28 +02:00
Adel Kara Slimane
89cd81e726
install.sh: Add convenience script for generic install (#227)
* install.sh: simplify ccache code

* install.sh: add generic distro install

* README: update with Generic distro install

* install.sh: update help messages
2021-04-30 18:32:30 +02:00
Adel Kara Slimane
86defefe99
Fix DKMS for RPM distros (#233)
* install.sh: RPM distros: Install the correct headers RPM for DKMS to work

Closes: #230
Closes: #229

* install.sh: remove trailing whitespaces

They came from reverting a commit that actually removed them x)

* install.sh: Add note in uninstall-help for Suse about kernel-headers
2021-04-22 12:42:42 +02:00
Adel Kara Slimane
e7d97fc497
install.sh: improve git fetching and stop producing source code packages (#222)
* install.sh: improve git source code fetching

* install.sh: add install dependency for Fedora 33+

* install.sh, customization.cfg: cosmetic improvements

* install.sh: DEB, RMP: do not create devel packages.

They are not needed for DKMS
and that was the only point to why they were there to begin with
2021-04-16 21:09:21 +02:00