summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorMikhail Kobuk <m.kobuk@ispras.ru>2024-04-06 16:00:01 +0300
committerMikhail Kobuk <m.kobuk@ispras.ru>2024-04-06 16:00:01 +0300
commit232c1cb726c809599ce69dbeda7f7f716f106801 (patch)
tree56d7b3f0222f24086bc968dd7d8ee0a4e59b4b7d /build.sh
downloadlinux-232c1cb726c809599ce69dbeda7f7f716f106801.tar.gz
Pre-EUPM build draft
TODO: convert to fakeroot TODO: separate most modules TODO: revise config TODO: adjust logging TODO: rework patch listing TODO: update patch selection
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh34
1 files changed, 34 insertions, 0 deletions
diff --git a/build.sh b/build.sh
new file mode 100755
index 0000000..cce1d75
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,34 @@
+#! /bin/bash
+
+cd $1
+
+if [ ! -f ".config" ]; then
+ cp -v ../config_base .config | sed 's/^/--> /g'
+fi
+
+make olddefconfig | sed 's/^/--> /g'
+
+
+flags=""
+
+if [ "$2" != "" ]; then
+ flags="$flags \"KERNELRELEASE=$2\""
+ echo $flags POTATO
+ echo "appending 'KERNELRELEASE=$2'" | sed 's/^/--> /g'
+fi
+
+make KERNELRELEASE="$2" -j16 | sed 's/^/--> /g'
+
+if [ "$?" != "0" ]; then
+ echo "MAKE FAIL []"
+ exit 1
+fi
+
+sudo make KERNELRELEASE="$2" -j16 modules_install | sed 's/^/--> /g'
+
+if [ "$?" != "0" ]; then
+ echo "MAKE FAIL [modules_install]"
+ exit 1
+fi
+
+touch ../build.ok