Lines 719-763
env_setup_xmakeopts() {
Link Here
|
719 |
export xmakeopts |
719 |
export xmakeopts |
720 |
} |
720 |
} |
721 |
|
721 |
|
722 |
# @FUNCTION: unpack_2_4 |
|
|
723 |
# @USAGE: |
724 |
# @DESCRIPTION: |
725 |
# unpack and generate .config for 2.4 kernels |
726 |
|
727 |
unpack_2_4() { |
728 |
# this file is required for other things to build properly, |
729 |
# so we autogenerate it |
730 |
make -s mrproper ${xmakeopts} || die "make mrproper failed" |
731 |
make -s symlinks ${xmakeopts} || die "make symlinks failed" |
732 |
make -s include/linux/version.h ${xmakeopts} || die "make include/linux/version.h failed" |
733 |
elog ">>> version.h compiled successfully." |
734 |
} |
735 |
|
736 |
# @FUNCTION: unpack_2_6 |
737 |
# @USAGE: |
738 |
# @DESCRIPTION: |
739 |
# unpack and generate .config for 2.6 kernels |
740 |
|
741 |
unpack_2_6() { |
742 |
# this file is required for other things to build properly, so we |
743 |
# autogenerate it ... generate a .config to keep version.h build from |
744 |
# spitting out an annoying warning |
745 |
make -s mrproper ${xmakeopts} 2>/dev/null \ |
746 |
|| die "make mrproper failed" |
747 |
|
748 |
# quick fix for bug #132152 which triggers when it cannot include linux |
749 |
# headers (ie, we have not installed it yet) |
750 |
if ! make -s defconfig ${xmakeopts} &>/dev/null; then |
751 |
touch .config |
752 |
eerror "make defconfig failed." |
753 |
eerror "assuming you dont have any headers installed yet and continuing" |
754 |
fi |
755 |
|
756 |
make -s include/linux/version.h ${xmakeopts} 2>/dev/null \ |
757 |
|| die "make include/linux/version.h failed" |
758 |
rm -f .config >/dev/null |
759 |
} |
760 |
|
761 |
# @FUNCTION: universal_unpack |
722 |
# @FUNCTION: universal_unpack |
762 |
# @USAGE: |
723 |
# @USAGE: |
763 |
# @DESCRIPTION: |
724 |
# @DESCRIPTION: |
Lines 1295-1313
unipatch() {
Link Here
|
1295 |
KPATCH_DIR="${KPATCH_DIR} ${i}" |
1256 |
KPATCH_DIR="${KPATCH_DIR} ${i}" |
1296 |
done |
1257 |
done |
1297 |
|
1258 |
|
1298 |
# do not apply fbcondecor patch to sparc/sparc64 as it breaks boot |
|
|
1299 |
# bug #272676 |
1300 |
if [[ $(tc-arch) = sparc || $(tc-arch) = sparc64 ]]; then |
1301 |
if [[ ${KV_MAJOR} -ge 3 ]] || ver_test ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH} -gt 2.6.28; then |
1302 |
if [[ ! -z ${K_WANT_GENPATCHES} ]]; then |
1303 |
UNIPATCH_DROP="${UNIPATCH_DROP} *_fbcondecor*.patch" |
1304 |
ewarn "fbcondecor currently prevents sparc/sparc64 from booting" |
1305 |
ewarn "for kernel versions >= 2.6.29. Removing fbcondecor patch." |
1306 |
ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=272676 for details" |
1307 |
fi |
1308 |
fi |
1309 |
fi |
1310 |
|
1311 |
#so now lets get rid of the patchno's we want to exclude |
1259 |
#so now lets get rid of the patchno's we want to exclude |
1312 |
UNIPATCH_DROP="${UNIPATCH_EXCLUDE} ${UNIPATCH_DROP}" |
1260 |
UNIPATCH_DROP="${UNIPATCH_EXCLUDE} ${UNIPATCH_DROP}" |
1313 |
for i in ${UNIPATCH_DROP}; do |
1261 |
for i in ${UNIPATCH_DROP}; do |
Lines 1522-1536
kernel-2_src_unpack() {
Link Here
|
1522 |
env_setup_xmakeopts |
1470 |
env_setup_xmakeopts |
1523 |
cd "${S}" || die |
1471 |
cd "${S}" || die |
1524 |
|
1472 |
|
1525 |
# We dont need a version.h for anything other than headers |
|
|
1526 |
# at least, I should hope we dont. If this causes problems |
1527 |
# take out the if/fi block and inform me please. |
1528 |
# unpack_2_6 should now be 2.6.17 safe anyways |
1529 |
if [[ ${ETYPE} == headers ]]; then |
1530 |
kernel_is 2 4 && unpack_2_4 |
1531 |
kernel_is 2 6 && unpack_2_6 |
1532 |
fi |
1533 |
|
1534 |
if [[ ${K_DEBLOB_AVAILABLE} == 1 ]] && use deblob; then |
1473 |
if [[ ${K_DEBLOB_AVAILABLE} == 1 ]] && use deblob; then |
1535 |
cp "${DISTDIR}/${DEBLOB_A}" "${T}" || die "cp ${DEBLOB_A} failed" |
1474 |
cp "${DISTDIR}/${DEBLOB_A}" "${T}" || die "cp ${DEBLOB_A} failed" |
1536 |
cp "${DISTDIR}/${DEBLOB_CHECK_A}" "${T}/deblob-check" || die "cp ${DEBLOB_CHECK_A} failed" |
1475 |
cp "${DISTDIR}/${DEBLOB_CHECK_A}" "${T}/deblob-check" || die "cp ${DEBLOB_CHECK_A} failed" |
Lines 1623-1637
kernel-2_pkg_postinst() {
Link Here
|
1623 |
# if necessary |
1562 |
# if necessary |
1624 |
|
1563 |
|
1625 |
kernel-2_pkg_setup() { |
1564 |
kernel-2_pkg_setup() { |
1626 |
if kernel_is 2 4; then |
|
|
1627 |
if [[ $(gcc-major-version) -ge 4 ]]; then |
1628 |
ewarn "Be warned !! >=sys-devel/gcc-4.0.0 isn't supported with linux-2.4!" |
1629 |
ewarn "Either switch to another gcc-version (via gcc-config) or use a" |
1630 |
ewarn "newer kernel that supports >=sys-devel/gcc-4." |
1631 |
ewarn "Also, be aware that bug reports about gcc-4 not working" |
1632 |
ewarn "with linux-2.4 based ebuilds will be closed as INVALID!" |
1633 |
fi |
1634 |
fi |
1635 |
|
1565 |
|
1636 |
ABI="${KERNEL_ABI}" |
1566 |
ABI="${KERNEL_ABI}" |
1637 |
if [[ ${ETYPE} != sources && ${ETYPE} != headers ]]; then |
1567 |
if [[ ${ETYPE} != sources && ${ETYPE} != headers ]]; then |
1638 |
- |
|
|