diff options
author | Thomas Deutschmann <whissi@gentoo.org> | 2019-07-14 10:21:19 +0200 |
---|---|---|
committer | Thomas Deutschmann <whissi@gentoo.org> | 2019-07-14 13:58:14 +0200 |
commit | 735c05ed47e9120cda02a8274df687c151d1d424 (patch) | |
tree | f5faf2a035043fa5aa29c6a670588fcef36d64e5 /gen_compile.sh | |
parent | Rework --e2fsprogs support (diff) | |
download | genkernel-735c05ed47e9120cda02a8274df687c151d1d424.tar.gz genkernel-735c05ed47e9120cda02a8274df687c151d1d424.tar.bz2 genkernel-735c05ed47e9120cda02a8274df687c151d1d424.zip |
Rework --iscsi support
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'gen_compile.sh')
-rwxr-xr-x | gen_compile.sh | 102 |
1 files changed, 0 insertions, 102 deletions
diff --git a/gen_compile.sh b/gen_compile.sh index 22c2b762..6a31a6c0 100755 --- a/gen_compile.sh +++ b/gen_compile.sh @@ -745,108 +745,6 @@ compile_device_mapper() { compile_lvm } -compile_iscsi() { - compile_iscsi_isns - - if [[ -f "${ISCSI_BINCACHE}" && "${ISCSI_BINCACHE}" -nt "${ISCSI_ISNS_BINCACHE}" ]] - then - print_info 1 "$(getIndent 2)iscsistart: Using cache ..." - else - [ ! -f "${ISCSI_SRCTAR}" ] && - gen_die "Could not find open-scsi source tarball: ${ISCSI_SRCTAR}. Please place it there, or place another version, changing /etc/genkernel.conf as necessary!" - cd "${TEMP}" - rm -rf "${ISCSI_DIR}" - tar -xpf "${ISCSI_SRCTAR}" - [ ! -d "${ISCSI_DIR}" ] && - gen_die "open-scsi directory ${ISCSI_DIR} is invalid" - - rm -rf "${TEMP}/iscsi-isns" > /dev/null - mkdir -p "${TEMP}/iscsi-isns" - /bin/tar -xpf "${ISCSI_ISNS_BINCACHE}" -C "${TEMP}/iscsi-isns" || - gen_die "Could not extract open-isns binary cache!" - - cd "${TEMP}/${ISCSI_DIR}" - apply_patches iscsi ${ISCSI_VER} - - print_info 1 "$(getIndent 2)open-scsi: >> Compiling ..." - CFLAGS="-I${TEMP}/iscsi-isns/usr/include" \ - LDFLAGS="-L${TEMP}/iscsi-isns/usr/lib -lrt -lpthread" \ - compile_generic "user" utils - - # if kernel modules exist, copy them to initramfs, otherwise it will be compiled into the kernel - mkdir -p "${TEMP}/initramfs-iscsi-temp/lib/modules/${KV}/kernel/drivers/scsi/" - KEXT=$(modules_kext) - for modname in iscsi_tcp libiscsi scsi_transport_iscsi - do - module=${KERNEL_OUTPUTDIR}/drivers/scsi/${modname}${KEXT} - if [ -e "${module}" ] - then - print_info 2 "$(getIndent 4) - Copying ${modname}${KEXT} ..." - cp $module "${TEMP}/initramfs-iscsi-temp/lib/modules/${KV}/kernel/drivers/scsi/" - fi - done - - cd "${TEMP}/initramfs-iscsi-temp/" - print_info 1 "$(getIndent 2)iscsistart: >> Copying to bincache ..." - [ -f "${TEMP}/${ISCSI_DIR}/usr/iscsistart" ] || - gen_die 'iscsistart executable does not exist!' - ${UTILS_CROSS_COMPILE}strip "${TEMP}/${ISCSI_DIR}/usr/iscsistart" || - gen_die 'Could not strip iscsistart binary!' - bzip2 "${TEMP}/${ISCSI_DIR}/usr/iscsistart" || - gen_die 'bzip2 compression of iscsistart failed!' - mv "${TEMP}/${ISCSI_DIR}/usr/iscsistart.bz2" "${ISCSI_BINCACHE}" || - gen_die 'Could not copy the iscsistart binary to the package directory, does the directory exist?' - - cd "${TEMP}" - isTrue "${CMD_DEBUGCLEANUP}" && rm -rf "${ISCSI_DIR}" "iscsi-isns" > /dev/null - return 0 - fi -} - -compile_iscsi_isns() { - if [ -f "${ISCSI_ISNS_BINCACHE}" ] - then - print_info 1 "$(getIndent 2)open-isns: >> Using cache ..." - else - [ -f "${ISCSI_ISNS_SRCTAR}" ] || - gen_die "Could not find open-isns source tarball: ${ISCSI_ISNS_SRCTAR}! Please place it there, or place another version, changing /etc/genkernel.conf as necessary!" - cd "${TEMP}" - rm -rf ${ISCSI_ISNS_DIR} > /dev/null - /bin/tar -xpf ${ISCSI_ISNS_SRCTAR} || - gen_die 'Could not extract open-isns source tarball!' - [ -d "${ISCSI_ISNS_DIR}" ] || - gen_die "open-isns directory ${ISCSI_ISNS_DIR} is invalid!" - - cd "${ISCSI_ISNS_DIR}" || gen_die "cannot chdir into '${ISCSI_ISNS_DIR}'" - apply_patches iscsi-isns ${ISCSI_ISNS_VER} - - print_info 1 "$(getIndent 2)open-isns: >> Configuring ..." - ./configure \ - --prefix=/usr \ - --enable-static \ - --without-slp \ - >> ${LOGFILE} 2>&1 || \ - gen_die "failed to configure open-isns" - - print_info 1 "$(getIndent 2)open-isns: >> Compiling ..." - compile_generic '' utils || gen_die "failed to build open-isns" - - print_info 1 "$(getIndent 2)open-isns: >> Installing to DESTDIR ..." - compile_generic "DESTDIR=${TEMP}/iscsi-isns install" utils || gen_die "failed to install open-isns" - compile_generic "DESTDIR=${TEMP}/iscsi-isns install_hdrs" utils || gen_die "failed to install open-isns" - compile_generic "DESTDIR=${TEMP}/iscsi-isns install_lib" utils || gen_die "failed to install open-isns" - - print_info 1 "$(getIndent 2)open-isns: >> Copying to bincache ..." - cd "${TEMP}/iscsi-isns" || gen_die "cannot chdir into '${TEMP}/iscsi-isns'" - /bin/tar -cjf "${ISCSI_ISNS_BINCACHE}" . || - gen_die 'Could not create open-isns binary cache' - - cd "${TEMP}" - isTrue "${CMD_DEBUGCLEANUP}" && rm -rf "${ISCSI_ISNS_DIR}" > /dev/null - return 0 - fi -} - determine_busybox_config_file() { print_info 2 "$(get_indent 3)busybox: >> Checking for suitable busybox configuration ..." |