Skip to content
Extraits de code Groupes Projets
Vérifiée Valider 2b000815 rédigé par Kubat's avatar Kubat
Parcourir les fichiers

Get and prepare things

parent
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
#!/usr/bin/env bash
source lib.sh
echo "Gettings ZFS"
if test -d zfs
then
(cd zfs && git pull) || die
else
git clone https://github.com/openzfs/zfs.git zfs || die
fi
echo "Getting Lustre"
if test -d lustre
then
(cd lustre && git pull) || die
else
git clone git://git.whamcloud.com/fs/lustre-release.git lustre || die
fi
echo "Getting Linux"
LINUX_SRC=$(last "/usr/src/linux-source-*.tar.xz")
LINUX_PATH="$(pwd)/$(basename $LINUX_SRC .tar.xz)"
if test -d $LINUX_PATH
then
echo "Linux is already extracted into $LINUX_PATH"
else
echo "Extracting Linux sources into $LINUX_PATH"
tar xf $LINUX_SRC
fi
alias die="echo 'I was stabbed' ; exit 1"
function last() {
realpath $(ls -1d $@ | sort --reverse | head -n1)
}
#!/usr/bin/env bash
source lib.sh
echo "Prepare kernel"
LINUX_PATH="$(last linux-source-*)"
cd $LINUX_PATH
yes '' | make oldconfig
make prepare scripts
cd ..
echo "Prepare zfs"
cd zfs
sh autogen.sh || die
./configure \
--with-linux=$LINUX_PATH --with-linux-obj=$LINUX_PATH \
--prefix=/ --libdir=/lib --includedir=/usr/include --datarootdir=/usr/share \
--enable-linux-builtin=yes || die
./copy-builtin $LINUX_PATH
ZFS_PATH=$(pwd)
cd ..
echo "Prepare Lustre"
cd lustre
sh autogen.sh || die
# SPL is now included inside the zfs sources
# Don't use ldiskfs, only zfs ost
./configure \
--with-linux=$LINUX_PATH --with-linux-obj=$LINUX_PATH \
--with-zfs=$ZFS_PATH --with-zfs-obj=$ZFS_PATH \
--prefix=/ --libdir=/lib --includedir=/usr/include --datarootdir=/usr/share \
--without-ldiskfs || die
cd ..
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter