Skip to content

Commit

Permalink
add build scripts for btrfs_tools and kernel 4.1.15
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Jan 13, 2016
1 parent 6b372ec commit 83b4170
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 0 deletions.
Binary file removed btrfs-tools_4.3.1-1_amd64.deb
Binary file not shown.
27 changes: 27 additions & 0 deletions build_btrfs_tools.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

#install prerequisites
yes "" | apt-get install build-essential debhelper dh-make quilt fakeroot lintian git
yes "" | apt-get install asciidoc xmlto --no-install-recommends
yes "" | apt-get install uuid-dev libattr1-dev zlib1g-dev libacl1-dev e2fslibs-dev libblkid-dev liblzo2-dev automake pkg-config

#create directory and download
mkdir btrfs-tools
cd ./btrfs-tools
dget -u http://http.debian.net/debian/pool/main/b/btrfs-tools/btrfs-tools_4.3-1.dsc

#build
cd ./btrfs-tools-4.3
dpkg-buildpackage -us -uc
cd ..

#packages ready, install them with dpkg -i

echo "
Finished...install package manually using: dpkg -i btrfs-tools_4.3-1_amd64.deb
"

#EOF

50 changes: 50 additions & 0 deletions build_linux_4.1.15.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/bin/bash

echo "Please choose a custom kernel revision and name, like 1.0.fooMyName. Must start with a number, only '.' and '+' special chars allowed: "
read custom_rev
echo "Will use $custom_rev, resulting in something like linux-4.1.15-amd64-$custom_rev"

echo "
***************************************
Prerequs
***************************************
"
#install prerequisites
yes "" | apt-get install git fakeroot build-essential ncurses-dev xz-utils
yes "" | apt-get --no-install-recommends install kernel-package

#create directory and download
mkdir kernelbuild
cd ./kernelbuild
echo "
***************************************
Downloading and Decompressing Source
***************************************
"
[ -f ./linux-4.1.15.tar.xz ] && echo "Kernel Archive already downloaded, skipping download..." || wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.1.15.tar.xz

[ -d ./linux-4.1.15 ] && rm -r ./linux-4.1.15
echo "Extracting source now, this may take a while..."
tar xf linux-4.1.15.tar.xz

#change dir and build
cd ./linux-4.1.15
wget https://github.com/Stoney49th/openmediavault-linux-kernel/raw/master/.config-4.1.15
mv ./.config-4.1.15 ./.config

read -rsp $'\n\nFinished with all download and decompress steps. Press any key to start a clean build ...\n'

make-kpkg clean

echo "
Enter number of parallel threads to use (single digit, like 3(dualcore), 4, 5(quadcore), most likely number of logical cores + 1 works best):"
read n_threads
fakeroot make-kpkg -j$n_threads --initrd --append-to-version=-amd64 --revision=$custom_rev kernel_image kernel_headers

cd ..

echo "
Finsihed building...please install the header and image packages manually using: dpkg -i linux-headers-4.1.15-amd64_$custom_rev.deb linux-image-4.1.15-amd64_$custom_rev.deb
Select the new default kernel from omv-extras kernel interface and reboot..."

0 comments on commit 83b4170

Please sign in to comment.