Browse Source

kbuild.sh: cleanup

master
jcmdln 2 years ago
parent
commit
8a1b8c40dd
3 changed files with 4618 additions and 25 deletions
  1. 14
    0
      etc/profile.d/kbuild.sh
  2. 0
    25
      etc/profile.d/kernel.sh
  3. 4604
    0
      usr/src/linux/4.15.config

+ 14
- 0
etc/profile.d/kbuild.sh View File

@@ -0,0 +1,14 @@
# /etc/profile.d/kbuild.sh

kbuild() {
KMake="make -s -j$(grep -c ^processor /proc/cpuinfo)"
cd /usr/src/linux

make menuconfig &&
$KMake && $KMake modules &&
$KMake install && $KMake modules install &&
grub-mkconfig -o /boot/grub/grub.cfg &&
emerge -av --quiet-build @module-rebuild

unset KMake
}

+ 0
- 25
etc/profile.d/kernel.sh View File

@@ -1,25 +0,0 @@
# /etc/profile.d/kernel.sh

KMake="make -j$(grep -c ^processor /proc/cpuinfo)"

kernel-rebuild() {
printf "\n\n#####\n### Building Kernel\n#####\n\n"
$KMake &&

printf "\n\n#####\n### Building Kernel Modules\n#####\n\n"
$KMake modules &&

printf "\n\n#####\n### Installing Kernel\n#####\n\n"
$KMake install &&

printf "\n\n#####\n### Installing Kernel Modules\n#####\n\n"
$KMake modules install &&

printf "\n\n#####\n### Generating Grub Config\n#####\n\n"
grub-mkconfig -o /boot/grub/grub.cfg &&

printf "\n\n#####\n### Rebuilding Emerged Kernel Modules\n#####\n\n"
emerge -aq @module-rebuild
}

unset KMake

+ 4604
- 0
usr/src/linux/4.15.config
File diff suppressed because it is too large
View File


Loading…
Cancel
Save