#!/bin/ksh set -e mem=`free -m | grep ^Mem | awk '{print $2}'` (( mem < 4096 )) && print at least 4GB of RAM is recommended && exit 1 j=$((`grep ^processor /proc/cpuinfo | tail -1 | awk '{print $3}'` + 2)) cd /usr/src/ version=5.2.14 print extracting linux-$version... \\c rm -rf dom0/ linux-$version/ tar xf linux-$version.tar mv linux-$version/ dom0/ cd dom0/ && print done print applying reiser4 patch... \\c #zcat ../reiser4-for-4.20.1.patch.gz | patch -p1 >/dev/null && print done #zcat ../reiser4-for-5.0.0.patch.gz | patch -p1 >/dev/null && print done zcat ../reiser4-for-5.2.0.patch.gz | patch -p1 >/dev/null && print done mv -i Makefile Makefile.dist sed 's/^EXTRAVERSION =/EXTRAVERSION = .slackxenreiser4/' Makefile.dist > Makefile print slackware .config... \\c wget -q -O - http://mirror.yandex.ru/slackware/slackware64-current/kernels/huge.s/config > .config make -j$j olddefconfig >/dev/null && print done print BASE AND FILE-SYSTEMS: cat >> .config <<-EOF9 CONFIG_BTRFS_FS=y CONFIG_GFS2_FS=y CONFIG_JFS_FS=y CONFIG_REISERFS_FS=y CONFIG_REISER4_FS=y CONFIG_XFS_FS=y CONFIG_BRIDGE=y CONFIG_VLAN_8021Q=y CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y CONFIG_NFS_V4_1=y CONFIG_NFS_V4_2=y CONFIG_NFS_V4_1_MIGRATION=y CONFIG_NFSD=y CONFIG_NFSD_V3=y CONFIG_NFSD_V4=y CONFIG_CIFS=y EOF9 make -j$j olddefconfig >/dev/null && print done grep REISER4_FS .config print DOCKER: [[ ! -f ../check-config.sh ]] && wget -q -O ../check-config.sh https://raw.githubusercontent.com/docker/docker/master/contrib/check-config.sh chmod +x ../check-config.sh ../check-config.sh .config | grep missing | sed -r 's/^[[:space:]]*- .*(CONFIG_[^:]+).*: .*missing.*/\1=y/' | grep ^CONFIG > .config.docker.tmp sed 's/[^[:alnum:]_]//g' .config.docker.tmp | sed -r 's/my$/=y/' >> .config make -j$j olddefconfig && print done grep VXLAN .config grep OVERLAY_FS .config print UFS cat >> .config <<-EOF9 CONFIG_UFS_FS=y CONFIG_UFS_FS_WRITE=y EOF9 make -j$j olddefconfig >/dev/null && echo done print xenconfig... \\c make -j$j xenconfig >/dev/null && print done grep CONFIG_XEN_PVH= .config print spinlocks cat >> .config <<-EOF9 CONFIG_PARAVIRT_SPINLOCKS=y EOF9 make -j$j olddefconfig && print done grep CONFIG_PARAVIRT_SPINLOCKS .config print tail -F /usr/src/make.dom0.$version.log \\c time nice make -j$j > ../make.dom0.$version.log && print \\ndone tail -1 /usr/src/make.dom0.$version.log fullversion=`file arch/x86/boot/bzImage | awk '{print $9}'` echo VERSION IS $fullversion [[ -d /lib/modules/$fullversion/ ]] && rm -rf /lib/modules/$fullversion/ && echo cleaned-up print modules_install... \\c make -j$j modules_install >/dev/null && echo done du -sh /lib/modules/$fullversion/ print /data/kernels/lib.modules.$fullversion.tar.gz... \\c tar czf /data/kernels/lib.modules.$fullversion.tar.gz -C /lib/modules $fullversion/ && print done print delivering kernel mv -f /vmlinuz.config /vmlinuz.config.old mv -f /vmlinuz.map /vmlinuz.map.old mv -f /vmlinuz /vmlinuz.old cp -f .config /vmlinuz.config cp -f System.map /vmlinuz.map cp arch/x86/boot/bzImage /vmlinuz file /vmlinuz* print ALL DONE