|
Lines 201-221
compile_dep() {
Link Here
|
| 201 |
} |
201 |
} |
| 202 |
|
202 |
|
| 203 |
compile_modules() { |
203 |
compile_modules() { |
| 204 |
print_info 1 " >> Compiling ${KV} modules..." |
204 |
if [ "${KERNEL_STATIC}" -eq '0' ]; then |
| 205 |
cd ${KERNEL_DIR} |
205 |
print_info 1 " >> Compiling ${KV} modules..." |
| 206 |
compile_generic modules kernel |
206 |
cd ${KERNEL_DIR} |
| 207 |
export UNAME_MACHINE="${ARCH}" |
207 |
compile_generic modules kernel |
| 208 |
# On 2.4 kernels, if MAKEOPTS > -j1 it can cause failures |
208 |
export UNAME_MACHINE="${ARCH}" |
| 209 |
if [ "${VER}" -eq '2' -a "${KERN_24}" -eq '1' ] |
209 |
# On 2.4 kernels, if MAKEOPTS > -j1 it can cause failures |
| 210 |
then |
210 |
if [ "${VER}" -eq '2' -a "${KERN_24}" -eq '1' ] |
| 211 |
MAKEOPTS_SAVE="${MAKEOPTS}" |
211 |
then |
| 212 |
MAKEOPTS="${MAKEOPTS_SAVE/-j?/-j1}" |
212 |
MAKEOPTS_SAVE="${MAKEOPTS}" |
| 213 |
fi |
213 |
MAKEOPTS="${MAKEOPTS_SAVE/-j?/-j1}" |
| 214 |
[ "${INSTALL_MOD_PATH}" != '' ] && export INSTALL_MOD_PATH |
214 |
fi |
| 215 |
compile_generic "modules_install" kernel |
215 |
[ "${INSTALL_MOD_PATH}" != '' ] && export INSTALL_MOD_PATH |
| 216 |
[ "${VER}" -eq '2' -a "${KERN_24}" -eq '1' ] && MAKEOPTS="${MAKEOPTS_SAVE}" |
216 |
compile_generic "modules_install" kernel |
| 217 |
export MAKEOPTS |
217 |
[ "${VER}" -eq '2' -a "${KERN_24}" -eq '1' ] && MAKEOPTS="${MAKEOPTS_SAVE}" |
| 218 |
unset UNAME_MACHINE |
218 |
export MAKEOPTS |
|
|
219 |
unset UNAME_MACHINE |
| 220 |
fi |
| 219 |
} |
221 |
} |
| 220 |
|
222 |
|
| 221 |
compile_kernel() { |
223 |
compile_kernel() { |
|
Lines 512-567
compile_modutils() {
Link Here
|
| 512 |
} |
514 |
} |
| 513 |
|
515 |
|
| 514 |
compile_module_init_tools() { |
516 |
compile_module_init_tools() { |
| 515 |
# I've disabled dietlibc support for the time being since the |
517 |
if [ "${KERNEL_STATIC}" -eq '0' ]; then |
| 516 |
# version we use misses a few needed system calls. |
|
|
| 517 |
|
518 |
|
| 518 |
local ARGS |
519 |
# I've disabled dietlibc support for the time being since the |
| 519 |
if [ ! -f "${MODULE_INIT_TOOLS_BINCACHE}" ] |
520 |
# version we use misses a few needed system calls. |
| 520 |
then |
|
|
| 521 |
[ ! -f "${MODULE_INIT_TOOLS_SRCTAR}" ] && |
| 522 |
gen_die "Could not find module-init-tools source tarball: ${MODULE_INIT_TOOLS_SRCTAR}" |
| 523 |
cd "${TEMP}" |
| 524 |
rm -rf "${MODULE_INIT_TOOLS_DIR}" |
| 525 |
/bin/tar -jxpf "${MODULE_INIT_TOOLS_SRCTAR}" |
| 526 |
[ ! -d "${MODULE_INIT_TOOLS_DIR}" ] && |
| 527 |
gen_die "Module-init-tools directory ${MODULE_INIT_TOOLS_DIR} is invalid" |
| 528 |
cd "${MODULE_INIT_TOOLS_DIR}" |
| 529 |
print_info 1 'module-init-tools: >> Configuring' |
| 530 |
|
521 |
|
| 531 |
# if [ "${USE_DIETLIBC}" -eq '1' ] |
522 |
local ARGS |
| 532 |
# then |
523 |
if [ ! -f "${MODULE_INIT_TOOLS_BINCACHE}" ] |
| 533 |
# extract_dietlibc_bincache |
524 |
then |
| 534 |
# OLD_CC="${UTILS_CC}" |
525 |
[ ! -f "${MODULE_INIT_TOOLS_SRCTAR}" ] && |
| 535 |
# UTILS_CC="${TEMP}/diet/bin/diet ${UTILS_CC}" |
526 |
gen_die "Could not find module-init-tools source tarball: ${MODULE_INIT_TOOLS_SRCTAR}" |
| 536 |
# fi |
527 |
cd "${TEMP}" |
| 537 |
|
528 |
rm -rf "${MODULE_INIT_TOOLS_DIR}" |
| 538 |
export_utils_args |
529 |
/bin/tar -jxpf "${MODULE_INIT_TOOLS_SRCTAR}" |
| 539 |
./configure >> ${DEBUGFILE} 2>&1 || |
530 |
[ ! -d "${MODULE_INIT_TOOLS_DIR}" ] && |
| 540 |
gen_die 'Configure of module-init-tools failed!' |
531 |
gen_die "Module-init-tools directory ${MODULE_INIT_TOOLS_DIR} is invalid" |
| 541 |
unset_utils_args |
532 |
cd "${MODULE_INIT_TOOLS_DIR}" |
| 542 |
print_info 1 ' >> Compiling...' |
533 |
print_info 1 'module-init-tools: >> Configuring' |
| 543 |
compile_generic "all" utils |
534 |
|
| 544 |
|
535 |
# if [ "${USE_DIETLIBC}" -eq '1' ] |
| 545 |
# if [ "${USE_DIETLIBC}" -eq '1' ] |
536 |
# then |
| 546 |
# then |
537 |
# extract_dietlibc_bincache |
| 547 |
# clean_dietlibc_bincache |
538 |
# OLD_CC="${UTILS_CC}" |
| 548 |
# UTILS_CC="${OLD_CC}" |
539 |
# UTILS_CC="${TEMP}/diet/bin/diet ${UTILS_CC}" |
| 549 |
# fi |
540 |
# fi |
| 550 |
|
541 |
|
| 551 |
print_info 1 ' >> Copying to cache...' |
542 |
export_utils_args |
| 552 |
[ -f "${TEMP}/${MODULE_INIT_TOOLS_DIR}/insmod.static" ] || |
543 |
./configure >> ${DEBUGFILE} 2>&1 || |
| 553 |
gen_die 'insmod.static does not exist after the compilation of module-init-tools!' |
544 |
gen_die 'Configure of module-init-tools failed!' |
| 554 |
strip "${TEMP}/${MODULE_INIT_TOOLS_DIR}/insmod.static" || |
545 |
unset_utils_args |
| 555 |
gen_die 'Could not strip insmod.static!' |
546 |
print_info 1 ' >> Compiling...' |
| 556 |
bzip2 "${TEMP}/${MODULE_INIT_TOOLS_DIR}/insmod.static" || |
547 |
compile_generic "all" utils |
| 557 |
gen_die 'Compression of insmod.static failed!' |
548 |
|
| 558 |
[ -f "${TEMP}/${MODULE_INIT_TOOLS_DIR}/insmod.static.bz2" ] || |
549 |
# if [ "${USE_DIETLIBC}" -eq '1' ] |
| 559 |
gen_die 'Could not find compressed insmod.static.bz2 binary!' |
550 |
# then |
| 560 |
mv "${TEMP}/${MODULE_INIT_TOOLS_DIR}/insmod.static.bz2" "${MODULE_INIT_TOOLS_BINCACHE}" || |
551 |
# clean_dietlibc_bincache |
| 561 |
gen_die 'Could not move the compressed insmod binary to the package cache!' |
552 |
# UTILS_CC="${OLD_CC}" |
|
|
553 |
# fi |
| 554 |
|
| 555 |
print_info 1 ' >> Copying to cache...' |
| 556 |
[ -f "${TEMP}/${MODULE_INIT_TOOLS_DIR}/insmod.static" ] || |
| 557 |
gen_die 'insmod.static does not exist after the compilation of module-init-tools!' |
| 558 |
strip "${TEMP}/${MODULE_INIT_TOOLS_DIR}/insmod.static" || |
| 559 |
gen_die 'Could not strip insmod.static!' |
| 560 |
bzip2 "${TEMP}/${MODULE_INIT_TOOLS_DIR}/insmod.static" || |
| 561 |
gen_die 'Compression of insmod.static failed!' |
| 562 |
[ -f "${TEMP}/${MODULE_INIT_TOOLS_DIR}/insmod.static.bz2" ] || |
| 563 |
gen_die 'Could not find compressed insmod.static.bz2 binary!' |
| 564 |
mv "${TEMP}/${MODULE_INIT_TOOLS_DIR}/insmod.static.bz2" "${MODULE_INIT_TOOLS_BINCACHE}" || |
| 565 |
gen_die 'Could not move the compressed insmod binary to the package cache!' |
| 562 |
|
566 |
|
| 563 |
cd "${TEMP}" |
567 |
cd "${TEMP}" |
| 564 |
rm -rf "${MODULE_INIT_TOOLS_DIR}" > /dev/null |
568 |
rm -rf "${MODULE_INIT_TOOLS_DIR}" > /dev/null |
|
|
569 |
fi |
| 565 |
fi |
570 |
fi |
| 566 |
} |
571 |
} |
| 567 |
|
572 |
|