Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 69021 Details for
Bug 106292
Patch/Kludge to allow genkernel build static kernels
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch/Kludge to allow static kernel building
genkernel-static-kernel-kludge.patch (text/plain), 8.77 KB, created by
Joshua Kinard
on 2005-09-22 11:21:13 UTC
(
hide
)
Description:
Patch/Kludge to allow static kernel building
Filename:
MIME Type:
Creator:
Joshua Kinard
Created:
2005-09-22 11:21:13 UTC
Size:
8.77 KB
patch
obsolete
>diff -Nurp genkernel.orig/gen_compile.sh genkernel/gen_compile.sh --- genkernel.orig/gen_compile.sh 2005-09-20 12:50:27 -0400 +++ genkernel/gen_compile.sh 2005-09-25 15:52:19 -0400 @@ -201,21 +201,23 @@ compile_dep() { } compile_modules() { - print_info 1 " >> Compiling ${KV} modules..." - cd ${KERNEL_DIR} - compile_generic modules kernel - export UNAME_MACHINE="${ARCH}" - # On 2.4 kernels, if MAKEOPTS > -j1 it can cause failures - if [ "${VER}" -eq '2' -a "${KERN_24}" -eq '1' ] - then - MAKEOPTS_SAVE="${MAKEOPTS}" - MAKEOPTS="${MAKEOPTS_SAVE/-j?/-j1}" - fi - [ "${INSTALL_MOD_PATH}" != '' ] && export INSTALL_MOD_PATH - compile_generic "modules_install" kernel - [ "${VER}" -eq '2' -a "${KERN_24}" -eq '1' ] && MAKEOPTS="${MAKEOPTS_SAVE}" - export MAKEOPTS - unset UNAME_MACHINE + if [ "${KERNEL_STATIC}" -eq '0' ]; then + print_info 1 " >> Compiling ${KV} modules..." + cd ${KERNEL_DIR} + compile_generic modules kernel + export UNAME_MACHINE="${ARCH}" + # On 2.4 kernels, if MAKEOPTS > -j1 it can cause failures + if [ "${VER}" -eq '2' -a "${KERN_24}" -eq '1' ] + then + MAKEOPTS_SAVE="${MAKEOPTS}" + MAKEOPTS="${MAKEOPTS_SAVE/-j?/-j1}" + fi + [ "${INSTALL_MOD_PATH}" != '' ] && export INSTALL_MOD_PATH + compile_generic "modules_install" kernel + [ "${VER}" -eq '2' -a "${KERN_24}" -eq '1' ] && MAKEOPTS="${MAKEOPTS_SAVE}" + export MAKEOPTS + unset UNAME_MACHINE + fi } compile_kernel() { @@ -458,110 +460,116 @@ compile_dmraid() { } compile_modutils() { - # I've disabled dietlibc support for the time being since the - # version we use misses a few needed system calls. + if [ "${KERNEL_STATIC}" -eq '0' ]; then - local ARGS - if [ ! -f "${MODUTILS_BINCACHE}" ] - then - [ ! -f "${MODUTILS_SRCTAR}" ] && - gen_die "Could not find modutils source tarball: ${MODUTILS_SRCTAR}!" - cd "${TEMP}" - rm -rf "${MODUTILS_DIR}" - /bin/tar -jxpf "${MODUTILS_SRCTAR}" - [ ! -d "${MODUTILS_DIR}" ] && - gen_die "Modutils directory ${MODUTILS_DIR} invalid!" - cd "${MODUTILS_DIR}" - print_info 1 "modutils: >> Configuring..." + # I've disabled dietlibc support for the time being since the + # version we use misses a few needed system calls. -# if [ "${USE_DIETLIBC}" -eq '1' ] -# then -# extract_dietlibc_bincache -# OLD_CC="${UTILS_CC}" -# UTILS_CC="${TEMP}/diet/bin/diet ${UTILS_CC}" -# fi - - export_utils_args - export ARCH=${ARCH} - ./configure --disable-combined --enable-insmod-static >> ${DEBUGFILE} 2>&1 || - gen_die 'Configuring modutils failed!' - unset_utils_args - - print_info 1 'modutils: >> Compiling...' - compile_generic all utils - -# if [ "${USE_DIETLIBC}" -eq '1' ] -# then -# clean_dietlibc_bincache -# UTILS_CC="${OLD_CC}" -# fi - - print_info 1 'modutils: >> Copying to cache...' - [ -f "${TEMP}/${MODUTILS_DIR}/insmod/insmod.static" ] || - gen_die 'insmod.static does not exist after the compilation of modutils!' - strip "${TEMP}/${MODUTILS_DIR}/insmod/insmod.static" || - gen_die 'Could not strip insmod.static!' - bzip2 "${TEMP}/${MODUTILS_DIR}/insmod/insmod.static" || - gen_die 'Compression of insmod.static failed!' - mv "${TEMP}/${MODUTILS_DIR}/insmod/insmod.static.bz2" "${MODUTILS_BINCACHE}" || - gen_die 'Could not move the compressed insmod binary to the package cache!' + local ARGS + if [ ! -f "${MODUTILS_BINCACHE}" ] + then + [ ! -f "${MODUTILS_SRCTAR}" ] && + gen_die "Could not find modutils source tarball: ${MODUTILS_SRCTAR}!" + cd "${TEMP}" + rm -rf "${MODUTILS_DIR}" + /bin/tar -jxpf "${MODUTILS_SRCTAR}" + [ ! -d "${MODUTILS_DIR}" ] && + gen_die "Modutils directory ${MODUTILS_DIR} invalid!" + cd "${MODUTILS_DIR}" + print_info 1 "modutils: >> Configuring..." + +# if [ "${USE_DIETLIBC}" -eq '1' ] +# then +# extract_dietlibc_bincache +# OLD_CC="${UTILS_CC}" +# UTILS_CC="${TEMP}/diet/bin/diet ${UTILS_CC}" +# fi + + export_utils_args + export ARCH=${ARCH} + ./configure --disable-combined --enable-insmod-static >> ${DEBUGFILE} 2>&1 || + gen_die 'Configuring modutils failed!' + unset_utils_args + + print_info 1 'modutils: >> Compiling...' + compile_generic all utils + +# if [ "${USE_DIETLIBC}" -eq '1' ] +# then +# clean_dietlibc_bincache +# UTILS_CC="${OLD_CC}" +# fi + + print_info 1 'modutils: >> Copying to cache...' + [ -f "${TEMP}/${MODUTILS_DIR}/insmod/insmod.static" ] || + gen_die 'insmod.static does not exist after the compilation of modutils!' + strip "${TEMP}/${MODUTILS_DIR}/insmod/insmod.static" || + gen_die 'Could not strip insmod.static!' + bzip2 "${TEMP}/${MODUTILS_DIR}/insmod/insmod.static" || + gen_die 'Compression of insmod.static failed!' + mv "${TEMP}/${MODUTILS_DIR}/insmod/insmod.static.bz2" "${MODUTILS_BINCACHE}" || + gen_die 'Could not move the compressed insmod binary to the package cache!' - cd "${TEMP}" - rm -rf "${MODULE_INIT_TOOLS_DIR}" > /dev/null + cd "${TEMP}" + rm -rf "${MODULE_INIT_TOOLS_DIR}" > /dev/null + fi fi } compile_module_init_tools() { - # I've disabled dietlibc support for the time being since the - # version we use misses a few needed system calls. - - local ARGS - if [ ! -f "${MODULE_INIT_TOOLS_BINCACHE}" ] - then - [ ! -f "${MODULE_INIT_TOOLS_SRCTAR}" ] && - gen_die "Could not find module-init-tools source tarball: ${MODULE_INIT_TOOLS_SRCTAR}" - cd "${TEMP}" - rm -rf "${MODULE_INIT_TOOLS_DIR}" - /bin/tar -jxpf "${MODULE_INIT_TOOLS_SRCTAR}" - [ ! -d "${MODULE_INIT_TOOLS_DIR}" ] && - gen_die "Module-init-tools directory ${MODULE_INIT_TOOLS_DIR} is invalid" - cd "${MODULE_INIT_TOOLS_DIR}" - print_info 1 'module-init-tools: >> Configuring' - -# if [ "${USE_DIETLIBC}" -eq '1' ] -# then -# extract_dietlibc_bincache -# OLD_CC="${UTILS_CC}" -# UTILS_CC="${TEMP}/diet/bin/diet ${UTILS_CC}" -# fi + if [ "${KERNEL_STATIC}" -eq '0' ]; then - export_utils_args - ./configure >> ${DEBUGFILE} 2>&1 || - gen_die 'Configure of module-init-tools failed!' - unset_utils_args - print_info 1 ' >> Compiling...' - compile_generic "all" utils + # I've disabled dietlibc support for the time being since the + # version we use misses a few needed system calls. -# if [ "${USE_DIETLIBC}" -eq '1' ] -# then -# clean_dietlibc_bincache -# UTILS_CC="${OLD_CC}" -# fi - - print_info 1 ' >> Copying to cache...' - [ -f "${TEMP}/${MODULE_INIT_TOOLS_DIR}/insmod.static" ] || - gen_die 'insmod.static does not exist after the compilation of module-init-tools!' - strip "${TEMP}/${MODULE_INIT_TOOLS_DIR}/insmod.static" || - gen_die 'Could not strip insmod.static!' - bzip2 "${TEMP}/${MODULE_INIT_TOOLS_DIR}/insmod.static" || - gen_die 'Compression of insmod.static failed!' - [ -f "${TEMP}/${MODULE_INIT_TOOLS_DIR}/insmod.static.bz2" ] || - gen_die 'Could not find compressed insmod.static.bz2 binary!' - mv "${TEMP}/${MODULE_INIT_TOOLS_DIR}/insmod.static.bz2" "${MODULE_INIT_TOOLS_BINCACHE}" || - gen_die 'Could not move the compressed insmod binary to the package cache!' + local ARGS + if [ ! -f "${MODULE_INIT_TOOLS_BINCACHE}" ] + then + [ ! -f "${MODULE_INIT_TOOLS_SRCTAR}" ] && + gen_die "Could not find module-init-tools source tarball: ${MODULE_INIT_TOOLS_SRCTAR}" + cd "${TEMP}" + rm -rf "${MODULE_INIT_TOOLS_DIR}" + /bin/tar -jxpf "${MODULE_INIT_TOOLS_SRCTAR}" + [ ! -d "${MODULE_INIT_TOOLS_DIR}" ] && + gen_die "Module-init-tools directory ${MODULE_INIT_TOOLS_DIR} is invalid" + cd "${MODULE_INIT_TOOLS_DIR}" + print_info 1 'module-init-tools: >> Configuring' + +# if [ "${USE_DIETLIBC}" -eq '1' ] +# then +# extract_dietlibc_bincache +# OLD_CC="${UTILS_CC}" +# UTILS_CC="${TEMP}/diet/bin/diet ${UTILS_CC}" +# fi + + export_utils_args + ./configure >> ${DEBUGFILE} 2>&1 || + gen_die 'Configure of module-init-tools failed!' + unset_utils_args + print_info 1 ' >> Compiling...' + compile_generic "all" utils + +# if [ "${USE_DIETLIBC}" -eq '1' ] +# then +# clean_dietlibc_bincache +# UTILS_CC="${OLD_CC}" +# fi + + print_info 1 ' >> Copying to cache...' + [ -f "${TEMP}/${MODULE_INIT_TOOLS_DIR}/insmod.static" ] || + gen_die 'insmod.static does not exist after the compilation of module-init-tools!' + strip "${TEMP}/${MODULE_INIT_TOOLS_DIR}/insmod.static" || + gen_die 'Could not strip insmod.static!' + bzip2 "${TEMP}/${MODULE_INIT_TOOLS_DIR}/insmod.static" || + gen_die 'Compression of insmod.static failed!' + [ -f "${TEMP}/${MODULE_INIT_TOOLS_DIR}/insmod.static.bz2" ] || + gen_die 'Could not find compressed insmod.static.bz2 binary!' + mv "${TEMP}/${MODULE_INIT_TOOLS_DIR}/insmod.static.bz2" "${MODULE_INIT_TOOLS_BINCACHE}" || + gen_die 'Could not move the compressed insmod binary to the package cache!' - cd "${TEMP}" - rm -rf "${MODULE_INIT_TOOLS_DIR}" > /dev/null + cd "${TEMP}" + rm -rf "${MODULE_INIT_TOOLS_DIR}" > /dev/null + fi fi }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 106292
:
68687
|
69021