build: allow building as regular user
removing and recreating this folder is not necessary, and prevents us from building with fakeroot instead of as root
This commit is contained in:
parent
5b628387dd
commit
414354736d
16
Makefile
16
Makefile
@ -273,7 +273,7 @@ aacraid.ko: .compile_mark ${AACRAIDSRC}
|
|||||||
cd ${AACRAIDDIR};tar xzf ../${AACRAIDSRC}
|
cd ${AACRAIDDIR};tar xzf ../${AACRAIDSRC}
|
||||||
cd ${AACRAIDDIR};rpm2cpio aacraid-${AACRAIDVER}.src.rpm|cpio -i
|
cd ${AACRAIDDIR};rpm2cpio aacraid-${AACRAIDVER}.src.rpm|cpio -i
|
||||||
cd ${AACRAIDDIR};tar xf aacraid_source.tgz
|
cd ${AACRAIDDIR};tar xf aacraid_source.tgz
|
||||||
[ ! -e /lib/modules/${KVNAME}/build ] || rm /lib/modules/${KVNAME}/build
|
# [ ! -e /lib/modules/${KVNAME}/build ] || rm /lib/modules/${KVNAME}/build
|
||||||
make -C ${TOP}/${KERNEL_SRC} M=${TOP}/${AACRAIDDIR} KSRC=${TOP}/${KERNEL_SRC} modules
|
make -C ${TOP}/${KERNEL_SRC} M=${TOP}/${AACRAIDDIR} KSRC=${TOP}/${KERNEL_SRC} modules
|
||||||
cp ${AACRAIDDIR}/aacraid.ko .
|
cp ${AACRAIDDIR}/aacraid.ko .
|
||||||
|
|
||||||
@ -281,14 +281,14 @@ hpsa.ko hpsa: .compile_mark ${HPSASRC}
|
|||||||
rm -rf ${HPSADIR}
|
rm -rf ${HPSADIR}
|
||||||
tar xf ${HPSASRC}
|
tar xf ${HPSASRC}
|
||||||
# sed -i ${HPSADIR}/drivers/scsi/hpsa_kernel_compat.h -e 's/^\/\* #define RHEL7.*/#define RHEL7/'
|
# sed -i ${HPSADIR}/drivers/scsi/hpsa_kernel_compat.h -e 's/^\/\* #define RHEL7.*/#define RHEL7/'
|
||||||
[ ! -e /lib/modules/${KVNAME}/build ] || rm /lib/modules/${KVNAME}/build
|
# [ ! -e /lib/modules/${KVNAME}/build ] || rm /lib/modules/${KVNAME}/build
|
||||||
make -C ${TOP}/${KERNEL_SRC} M=${TOP}/${HPSADIR}/drivers/scsi KSRC=${TOP}/${KERNEL_SRC} modules
|
make -C ${TOP}/${KERNEL_SRC} M=${TOP}/${HPSADIR}/drivers/scsi KSRC=${TOP}/${KERNEL_SRC} modules
|
||||||
cp ${HPSADIR}/drivers/scsi/hpsa.ko hpsa.ko
|
cp ${HPSADIR}/drivers/scsi/hpsa.ko hpsa.ko
|
||||||
|
|
||||||
e1000e.ko e1000e: .compile_mark ${E1000ESRC}
|
e1000e.ko e1000e: .compile_mark ${E1000ESRC}
|
||||||
rm -rf ${E1000EDIR}
|
rm -rf ${E1000EDIR}
|
||||||
tar xf ${E1000ESRC}
|
tar xf ${E1000ESRC}
|
||||||
[ ! -e /lib/modules/${KVNAME}/build ] || rm /lib/modules/${KVNAME}/build
|
# [ ! -e /lib/modules/${KVNAME}/build ] || rm /lib/modules/${KVNAME}/build
|
||||||
cd ${E1000EDIR}; patch -p1 < ../intel-module-gcc6-compat.patch
|
cd ${E1000EDIR}; patch -p1 < ../intel-module-gcc6-compat.patch
|
||||||
cd ${E1000EDIR}; patch -p1 < ../e1000e_4.10_compat.patch
|
cd ${E1000EDIR}; patch -p1 < ../e1000e_4.10_compat.patch
|
||||||
cd ${E1000EDIR}/src; make BUILD_KERNEL=${KVNAME} KSRC=${TOP}/${KERNEL_SRC}
|
cd ${E1000EDIR}/src; make BUILD_KERNEL=${KVNAME} KSRC=${TOP}/${KERNEL_SRC}
|
||||||
@ -297,7 +297,7 @@ e1000e.ko e1000e: .compile_mark ${E1000ESRC}
|
|||||||
igb.ko igb: .compile_mark ${IGBSRC}
|
igb.ko igb: .compile_mark ${IGBSRC}
|
||||||
rm -rf ${IGBDIR}
|
rm -rf ${IGBDIR}
|
||||||
tar xf ${IGBSRC}
|
tar xf ${IGBSRC}
|
||||||
[ ! -e /lib/modules/${KVNAME}/build ] || rm /lib/modules/${KVNAME}/build
|
# [ ! -e /lib/modules/${KVNAME}/build ] || rm /lib/modules/${KVNAME}/build
|
||||||
cd ${IGBDIR}; patch -p1 < ../intel-module-gcc6-compat.patch
|
cd ${IGBDIR}; patch -p1 < ../intel-module-gcc6-compat.patch
|
||||||
cd ${IGBDIR}; patch -p1 < ../igb_4.9_compat.patch
|
cd ${IGBDIR}; patch -p1 < ../igb_4.9_compat.patch
|
||||||
cd ${IGBDIR}; patch -p1 < ../igb_4.10_compat.patch
|
cd ${IGBDIR}; patch -p1 < ../igb_4.10_compat.patch
|
||||||
@ -307,7 +307,7 @@ igb.ko igb: .compile_mark ${IGBSRC}
|
|||||||
ixgbe.ko ixgbe: .compile_mark ${IXGBESRC}
|
ixgbe.ko ixgbe: .compile_mark ${IXGBESRC}
|
||||||
rm -rf ${IXGBEDIR}
|
rm -rf ${IXGBEDIR}
|
||||||
tar xf ${IXGBESRC}
|
tar xf ${IXGBESRC}
|
||||||
[ ! -e /lib/modules/${KVNAME}/build ] || rm /lib/modules/${KVNAME}/build
|
# [ ! -e /lib/modules/${KVNAME}/build ] || rm /lib/modules/${KVNAME}/build
|
||||||
cd ${IXGBEDIR}; patch -p1 < ../ixgbe_4.10_compat.patch
|
cd ${IXGBEDIR}; patch -p1 < ../ixgbe_4.10_compat.patch
|
||||||
cd ${IXGBEDIR}/src; make CFLAGS_EXTRA="-DIXGBE_NO_LRO" BUILD_KERNEL=${KVNAME} KSRC=${TOP}/${KERNEL_SRC}
|
cd ${IXGBEDIR}/src; make CFLAGS_EXTRA="-DIXGBE_NO_LRO" BUILD_KERNEL=${KVNAME} KSRC=${TOP}/${KERNEL_SRC}
|
||||||
cp ${IXGBEDIR}/src/ixgbe.ko ixgbe.ko
|
cp ${IXGBEDIR}/src/ixgbe.ko ixgbe.ko
|
||||||
@ -315,14 +315,14 @@ ixgbe.ko ixgbe: .compile_mark ${IXGBESRC}
|
|||||||
i40e.ko i40e: .compile_mark ${I40ESRC}
|
i40e.ko i40e: .compile_mark ${I40ESRC}
|
||||||
rm -rf ${I40EDIR}
|
rm -rf ${I40EDIR}
|
||||||
tar xf ${I40ESRC}
|
tar xf ${I40ESRC}
|
||||||
[ ! -e /lib/modules/${KVNAME}/build ] || rm /lib/modules/${KVNAME}/build
|
# [ ! -e /lib/modules/${KVNAME}/build ] || rm /lib/modules/${KVNAME}/build
|
||||||
cd ${I40EDIR}/src; make BUILD_KERNEL=${KVNAME} KSRC=${TOP}/${KERNEL_SRC}
|
cd ${I40EDIR}/src; make BUILD_KERNEL=${KVNAME} KSRC=${TOP}/${KERNEL_SRC}
|
||||||
cp ${I40EDIR}/src/i40e.ko i40e.ko
|
cp ${I40EDIR}/src/i40e.ko i40e.ko
|
||||||
|
|
||||||
bnx2.ko cnic.ko bnx2x.ko: ${BNX2SRC}
|
bnx2.ko cnic.ko bnx2x.ko: ${BNX2SRC}
|
||||||
rm -rf ${BNX2DIR}
|
rm -rf ${BNX2DIR}
|
||||||
tar xf ${BNX2SRC}
|
tar xf ${BNX2SRC}
|
||||||
[ ! -e /lib/modules/${KVNAME}/build ] || rm /lib/modules/${KVNAME}/build
|
# [ ! -e /lib/modules/${KVNAME}/build ] || rm /lib/modules/${KVNAME}/build
|
||||||
cd ${BNX2DIR}; make -C bnx2/src KVER=${KVNAME} KSRC=${TOP}/${KERNEL_SRC}
|
cd ${BNX2DIR}; make -C bnx2/src KVER=${KVNAME} KSRC=${TOP}/${KERNEL_SRC}
|
||||||
cd ${BNX2DIR}; make -C bnx2x/src KVER=${KVNAME} KSRC=${TOP}/${KERNEL_SRC}
|
cd ${BNX2DIR}; make -C bnx2x/src KVER=${KVNAME} KSRC=${TOP}/${KERNEL_SRC}
|
||||||
cp `find ${BNX2DIR} -name bnx2.ko -o -name cnic.ko -o -name bnx2x.ko` .
|
cp `find ${BNX2DIR} -name bnx2.ko -o -name cnic.ko -o -name bnx2x.ko` .
|
||||||
@ -330,7 +330,7 @@ bnx2.ko cnic.ko bnx2x.ko: ${BNX2SRC}
|
|||||||
arcmsr.ko: .compile_mark ${ARECASRC}
|
arcmsr.ko: .compile_mark ${ARECASRC}
|
||||||
rm -rf ${ARECADIR}
|
rm -rf ${ARECADIR}
|
||||||
mkdir ${ARECADIR}; cd ${ARECADIR}; unzip ../${ARECASRC}
|
mkdir ${ARECADIR}; cd ${ARECADIR}; unzip ../${ARECASRC}
|
||||||
[ ! -e /lib/modules/${KVNAME}/build ] || rm /lib/modules/${KVNAME}/build
|
# [ ! -e /lib/modules/${KVNAME}/build ] || rm /lib/modules/${KVNAME}/build
|
||||||
cd ${ARECADIR}; make -C ${TOP}/${KERNEL_SRC} SUBDIRS=${TOP}/${ARECADIR} KSRC=${TOP}/${KERNEL_SRC} modules
|
cd ${ARECADIR}; make -C ${TOP}/${KERNEL_SRC} SUBDIRS=${TOP}/${ARECADIR} KSRC=${TOP}/${KERNEL_SRC} modules
|
||||||
cp ${ARECADIR}/arcmsr.ko arcmsr.ko
|
cp ${ARECADIR}/arcmsr.ko arcmsr.ko
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user