From b16ab0355629fb7cadb7f8479f82cb10a21bede8 Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Sun, 27 Mar 2022 02:13:51 +0300 Subject: [PATCH] Initial commit. 'preparekern' script from home server, README.md, LICENSE. --- LICENSE | 2 +- README.md | 15 ++++++++++++++- bin/preparekern-server | 14 ++++++++++++++ 3 files changed, 29 insertions(+), 2 deletions(-) create mode 100755 bin/preparekern-server diff --git a/LICENSE b/LICENSE index 2071b23..ef19991 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) +Copyright (c) 2022 Alexey Skobkin Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/README.md b/README.md index 6e07c0d..b92fd47 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,16 @@ # local-bin -Set of scripts for somewhat frequent use. \ No newline at end of file +Set of scripts to drop to `/usr/local/bin` or `~/.local/bin`. + +## Installation + +```shell +# Copy +sudo cp src/* /usr/local/bin/ + +# Restrict changing by the user owning a repo +chown root:root /usr/local/bin/* + +# (optional, if needed) Making sure scripts are executable +chmod +x /usr/local/bin/* +``` diff --git a/bin/preparekern-server b/bin/preparekern-server new file mode 100755 index 0000000..7e866df --- /dev/null +++ b/bin/preparekern-server @@ -0,0 +1,14 @@ +#!/usr/bin/env sh +mount /esp +cd /usr/src/linux +rm .version +[[ ! -f .config ]] && zcat /proc/config.gz > .config +make oldconfig && +#make nconfig && +make -j20 bzImage modules && +make modules_install && +( +cd /esp/EFI/gentoo +mv -f bootx64.efi bootx64.old.efi &>/dev/null; +cp /usr/src/linux/arch/x86/boot/bzImage bootx64.efi +)