diff options
| author | ivan-boikov <ik.boikov.public@protonmail.com> | 2022-11-27 23:01:44 +0100 |
|---|---|---|
| committer | ivan-boikov <ik.boikov.public@protonmail.com> | 2022-11-27 23:01:44 +0100 |
| commit | 6e5e5afa551ec512fc8c9f00b4df32cf032426ff (patch) | |
| tree | d95d6b18a394d25f2c60b60fd34de7784c54077a /scripts/.local/bin | |
| parent | 44431977d67f83b20add1537505c43bfb1787e86 (diff) | |
1
Diffstat (limited to 'scripts/.local/bin')
| -rwxr-xr-x | scripts/.local/bin/makekernel | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/scripts/.local/bin/makekernel b/scripts/.local/bin/makekernel index 33ffb30..e897288 100755 --- a/scripts/.local/bin/makekernel +++ b/scripts/.local/bin/makekernel @@ -3,17 +3,16 @@ KEYDIR="/etc/efikeys/" KERNEL_NAME="vmlinuz-latest-gentoo" +THREADS="$(grep -c ^processor /proc/cpuinfo)" if [[ $(hostname) = "pc" ]]; then ROOT_DEVICE="/dev/nvme0n1p3" MICROCODE="amd" KERNEL_DIR="/boot/efi/gentoo" - THREADS=12 else ROOT_DEVICE="/dev/sda3" MICROCODE="intel" KERNEL_DIR="/boot/efi/EFI/gentoo" - THREADS=4 fi ROOT="/dev/mapper/root" @@ -36,12 +35,12 @@ if [ "$answer" != "${answer#[Nn]}" ] ;then exit 1 fi -echo "Starting compilation. Asking for root permissions." +echo "Starting compilation" #exit 1 cd /usr/src/linux -# inject $BOOT_PARAMS into kernel +# inject $BOOT_PARAMS into kernel config sed -i "s|^\(CONFIG_CMDLINE=\).*|\1\"$BOOT_PARAMS\"|" .config genkernel --no-clean --no-mrproper --no-save-config \ @@ -56,7 +55,7 @@ genkernel --no-clean --no-mrproper --no-save-config \ all #--virtio \ -echo "Signing image" +echo "Signing kernel image" sbsign --key "$KEYDIR/db.key" --cert "$KEYDIR/db.crt" -o "$KERNEL_DIR/$KERNEL_NAME.efi" "/boot/$KERNEL_NAME" cd - |
