Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 68687 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), 5.33 KB, created by
Joshua Kinard
on 2005-09-17 10:41:57 UTC
(
hide
)
Description:
Patch/Kludge to allow static kernel building
Filename:
MIME Type:
Creator:
Joshua Kinard
Created:
2005-09-17 10:41:57 UTC
Size:
5.33 KB
patch
obsolete
>diff -Nurp genkernel.orig/gen_compile.sh genkernel/gen_compile.sh >--- genkernel.orig/gen_compile.sh 2005-09-20 16:50:27 +0000 >+++ genkernel/gen_compile.sh 2005-09-19 03:41:42 +0000 >@@ -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() { >@@ -512,56 +514,59 @@ compile_modutils() { > } > > compile_module_init_tools() { >- # 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 "${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' >+ # 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 >- ./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!' >+ 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