forked from zhovner/OneFileLinux
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprep_kernel.sh
More file actions
executable file
·23 lines (21 loc) · 855 Bytes
/
Copy pathprep_kernel.sh
File metadata and controls
executable file
·23 lines (21 loc) · 855 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
DPKG_BUILD=´which dpkg-buildpackage´
# if [ -f $DPKG_BUILD ]; then
ln -s $PWD/debian/debian/ $PWD/linux/debian
# fi
ROOT_ARCH=´uname -m´
cd linux; git fetch; git reset --hard remotes/origin/linux-rolling-stable
#git gc --aggressive --prune=all
# Apply Debian patches.
# if [ -f $DPKG_BUILD ]; then
cd debian; patch -p1 < ../../patches/0000_dont_clean_kernel_build_on_error.patch; cd ..
make -f debian/rules source;
# fi
# Grab the running configuration of loaded modules as the base.
make localmodconfig
../kernel-hardening-checker/bin/kernel-hardening-checker -g ${ROOT_ARCH^^} > .config-harden-stub
./scripts/kconfig/merge_config.sh .config .config-harden-stub
../kernel-hardening-checker/bin/kernel-hardening-checker -c .config
if [ -f $DPKG_BUILD ]; then
# dpkg-buildpackage -us -ui -uc --no-sign --build=binary --no-post-clean
fi