-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild_zfs.sh
executable file
·53 lines (44 loc) · 1.04 KB
/
build_zfs.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
#
# ZFS builder for boot2docker
set -xe
cd /rootfs
rm -rf *
git clone https://github.com/zfsonlinux/spl.git /zfs/spl
cd /zfs/spl
git checkout spl-0.6.5.4
git clone https://github.com/zfsonlinux/zfs.git /zfs/zfs
cd /zfs/zfs
git checkout zfs-0.6.5.4
# Configure and compile SPL kernel module
cd /zfs/spl
./autogen.sh
./configure \
--prefix=/ \
--libdir=/lib \
--includedir=/usr/include \
--datarootdir=/usr/share \
--with-linux=/linux-kernel \
--with-linux-obj=/linux-kernel \
--with-config=kernel
make -j8
make install DESTDIR=/rootfs
# Configure and compile ZFS kernel module
cd /zfs/zfs
./autogen.sh
./configure \
--prefix=/ \
--libdir=/lib \
--includedir=/usr/include \
--datarootdir=/usr/share \
--with-linux=/linux-kernel \
--with-linux-obj=/linux-kernel \
--with-spl=/zfs/spl \
--with-spl-obj=/zfs/spl \
--with-config=kernel
make -j8
echo "Got after make $?"
make install DESTDIR=/rootfs
echo "Got after make install $?"
cd /rootfs/
tar cfv /rootfs/zfs-${UNAME_R}.tar.gz lib