|
Lines 324-332
compile_unionfs_modules() {
|
Link Here
|
|---|
|
gen_die "Could not find unionfs source tarball: ${UNIONFS_SRCTAR}!" | gen_die "Could not find unionfs source tarball: ${UNIONFS_SRCTAR}!" |
cd "${TEMP}" | cd "${TEMP}" |
rm -rf ${UNIONFS_DIR} > /dev/null | rm -rf ${UNIONFS_DIR} > /dev/null |
rm -rf unionfs > /dev/null |
rm -rf unionfs* > /dev/null |
mkdir -p unionfs |
mkdir unionfs |
/bin/tar -zxpf ${UNIONFS_SRCTAR} || |
/bin/tar xzpf ${UNIONFS_SRCTAR} || |
gen_die 'Could not extract unionfs source tarball!' | gen_die 'Could not extract unionfs source tarball!' |
[ -d "${UNIONFS_DIR}" ] || | [ -d "${UNIONFS_DIR}" ] || |
gen_die 'Unionfs directory ${UNIONFS_DIR} is invalid!' | gen_die 'Unionfs directory ${UNIONFS_DIR} is invalid!' |
|
Lines 335-340
compile_unionfs_modules() {
|
Link Here
|
|---|
|
echo "LINUXSRC=${KERNEL_DIR}" >> fistdev.mk | echo "LINUXSRC=${KERNEL_DIR}" >> fistdev.mk |
echo 'TOPINC=-I$(LINUXSRC)/include' >> fistdev.mk | echo 'TOPINC=-I$(LINUXSRC)/include' >> fistdev.mk |
echo "MODDIR= /lib/modules/${KV}" >> fistdev.mk | echo "MODDIR= /lib/modules/${KV}" >> fistdev.mk |
|
echo "KVERS=${KV}" >> fistdev.mk |
echo "KERNELVERSION=${KV}" >> fistdev.mk | echo "KERNELVERSION=${KV}" >> fistdev.mk |
# Fix for hardened/selinux systems to have extened attributes | # Fix for hardened/selinux systems to have extened attributes |
# per r2d2's request. Also add -DUNIONFS_UNSUPPORTED for 2.6.16 | # per r2d2's request. Also add -DUNIONFS_UNSUPPORTED for 2.6.16 |
|
Lines 347-357
compile_unionfs_modules() {
|
Link Here
|
|---|
|
| |
if [ "${PAT}" -ge '6' ] | if [ "${PAT}" -ge '6' ] |
then | then |
cd "${TEMP}" |
# ARCH is used by unionfs - and conflicts with genkernel |
cd "${UNIONFS_DIR}" |
ARCH_PUSH=${ARCH} |
|
unset ARCH |
# Compile unionfs module within the unionfs | # Compile unionfs module within the unionfs |
# environment not within the kernelsrc dir | # environment not within the kernelsrc dir |
make unionfs.ko || gen_die 'failed to compile unionfs' | make unionfs.ko || gen_die 'failed to compile unionfs' |
|
ARCH=${ARCH_PUSH} |
else | else |
gen_die 'unionfs is only supported on 2.6 targets' | gen_die 'unionfs is only supported on 2.6 targets' |
fi | fi |
|
Lines 383-389
compile_unionfs_utils() {
|
Link Here
|
|---|
|
gen_die "Could not find unionfs source tarball: ${UNIONFS_SRCTAR}!" | gen_die "Could not find unionfs source tarball: ${UNIONFS_SRCTAR}!" |
cd "${TEMP}" | cd "${TEMP}" |
rm -rf ${UNIONFS_DIR} > /dev/null | rm -rf ${UNIONFS_DIR} > /dev/null |
rm -rf unionfs > /dev/null |
rm -rf unionfs* > /dev/null |
mkdir -p unionfs/sbin | mkdir -p unionfs/sbin |
/bin/tar -zxpf ${UNIONFS_SRCTAR} || | /bin/tar -zxpf ${UNIONFS_SRCTAR} || |
gen_die 'Could not extract unionfs source tarball!' | gen_die 'Could not extract unionfs source tarball!' |
|
Lines 391-406
compile_unionfs_utils() {
|
Link Here
|
|---|
|
gen_die 'Unionfs directory ${UNIONFS_DIR} is invalid!' | gen_die 'Unionfs directory ${UNIONFS_DIR} is invalid!' |
cd "${UNIONFS_DIR}" | cd "${UNIONFS_DIR}" |
print_info 1 'unionfs tools: >> Compiling...' | print_info 1 'unionfs tools: >> Compiling...' |
|
sed -i utils/Makefile -e 's|${CC} -o|${CC} -static -o|g' |
sed -i Makefile -e 's|${CC} -o|${CC} -static -o|g' | sed -i Makefile -e 's|${CC} -o|${CC} -static -o|g' |
compile_generic utils utils | compile_generic utils utils |
|
|
|
if [ ! -e "uniondbg" ]; then |
|
cd utils |
|
fi |
print_info 1 'unionfs: >> Copying to cache...' | print_info 1 'unionfs: >> Copying to cache...' |
strip uniondbg unionctl | strip uniondbg unionctl |
cp uniondbg ${TEMP}/unionfs/sbin/ || | cp uniondbg ${TEMP}/unionfs/sbin/ || |
gen_die 'Could not copy the uniondbg binary to the tmp directory' | gen_die 'Could not copy the uniondbg binary to the tmp directory' |
cp unionctl ${TEMP}/unionfs/sbin/ || | cp unionctl ${TEMP}/unionfs/sbin/ || |
gen_die 'Could not copy the unionctl binary to the tmp directory' | gen_die 'Could not copy the unionctl binary to the tmp directory' |
cd ${TEMP}/unionfs |
cd ${TEMP}/unionfs |
/bin/tar -cjf "${UNIONFS_BINCACHE}" . || | /bin/tar -cjf "${UNIONFS_BINCACHE}" . || |
gen_die 'Could not create unionfs tools binary cache' | gen_die 'Could not create unionfs tools binary cache' |
| |