Lines 494-501
fi
Link Here
|
494 |
#============================================================== |
494 |
#============================================================== |
495 |
kernel_header_destdir() { |
495 |
kernel_header_destdir() { |
496 |
[[ ${CTARGET} == ${CHOST} ]] \ |
496 |
[[ ${CTARGET} == ${CHOST} ]] \ |
497 |
&& echo /usr/include \ |
497 |
&& echo "${EPREFIX}"/usr/include \ |
498 |
|| echo /usr/${CTARGET}/usr/include |
498 |
|| echo "${EPREFIX}"/usr/${CTARGET}/usr/include |
499 |
} |
499 |
} |
500 |
|
500 |
|
501 |
cross_pre_c_headers() { |
501 |
cross_pre_c_headers() { |
Lines 622-628
compile_headers() {
Link Here
|
622 |
|
622 |
|
623 |
# autoconf.h isnt generated unless it already exists. plus, we have |
623 |
# autoconf.h isnt generated unless it already exists. plus, we have |
624 |
# no guarantee that any headers are installed on the system... |
624 |
# no guarantee that any headers are installed on the system... |
625 |
[[ -f ${ROOT}/usr/include/linux/autoconf.h ]] \ |
625 |
[[ -f ${EROOT}/usr/include/linux/autoconf.h ]] \ |
626 |
|| touch include/linux/autoconf.h |
626 |
|| touch include/linux/autoconf.h |
627 |
|
627 |
|
628 |
# if K_DEFCONFIG isn't set, force to "defconfig" |
628 |
# if K_DEFCONFIG isn't set, force to "defconfig" |
Lines 689-694
install_headers() {
Link Here
|
689 |
emake headers_install INSTALL_HDR_PATH="${D}"/${ddir}/.. ${xmakeopts} || die |
689 |
emake headers_install INSTALL_HDR_PATH="${D}"/${ddir}/.. ${xmakeopts} || die |
690 |
|
690 |
|
691 |
# let other packages install some of these headers |
691 |
# let other packages install some of these headers |
|
|
692 |
rm -rf "${D}"/${ddir}/sound #alsa-headers |
692 |
rm -rf "${D}"/${ddir}/scsi #glibc/uclibc/etc... |
693 |
rm -rf "${D}"/${ddir}/scsi #glibc/uclibc/etc... |
693 |
return 0 |
694 |
return 0 |
694 |
fi |
695 |
fi |
Lines 696-710
install_headers() {
Link Here
|
696 |
# Do not use "linux/*" as that can cause problems with very long |
697 |
# Do not use "linux/*" as that can cause problems with very long |
697 |
# $S values where the cmdline to cp is too long |
698 |
# $S values where the cmdline to cp is too long |
698 |
pushd "${S}" >/dev/null |
699 |
pushd "${S}" >/dev/null |
699 |
dodir ${ddir}/linux |
700 |
dodir ${ddir#${EPREFIX}}/linux |
700 |
cp -pPR "${S}"/include/linux "${D}"/${ddir}/ || die |
701 |
cp -pPR "${S}"/include/linux "${D}"/${ddir}/ || die |
701 |
rm -rf "${D}"/${ddir}/linux/modules |
702 |
rm -rf "${D}"/${ddir}/linux/modules |
702 |
|
703 |
|
703 |
dodir ${ddir}/asm |
704 |
dodir ${ddir#${EPREFIX}}/asm |
704 |
cp -pPR "${S}"/include/asm/* "${D}"/${ddir}/asm |
705 |
cp -pPR "${S}"/include/asm/* "${ED}"/${ddir}/asm |
705 |
|
706 |
|
706 |
if kernel_is 2 6 ; then |
707 |
if kernel_is 2 6 ; then |
707 |
dodir ${ddir}/asm-generic |
708 |
dodir ${ddir#${EPREFIX}}/asm-generic |
708 |
cp -pPR "${S}"/include/asm-generic/* "${D}"/${ddir}/asm-generic |
709 |
cp -pPR "${S}"/include/asm-generic/* "${D}"/${ddir}/asm-generic |
709 |
fi |
710 |
fi |
710 |
|
711 |
|
Lines 739-742
install_sources() {
Link Here
|
739 |
> "${S}"/patches.txt |
740 |
> "${S}"/patches.txt |
740 |
fi |
741 |
fi |
741 |
|
742 |
|
742 |
mv ${WORKDIR}/linux* "${D}"/usr/src |
743 |
mv ${WORKDIR}/linux* "${ED}"/usr/src |
Lines 771-791
postinst_sources() {
Link Here
|
771 |
|
770 |
|
772 |
# if we are to forcably symlink, delete it if it already exists first. |
771 |
# if we are to forcably symlink, delete it if it already exists first. |
773 |
if [[ ${K_SYMLINK} > 0 ]]; then |
772 |
if [[ ${K_SYMLINK} > 0 ]]; then |
774 |
[[ -h ${ROOT}usr/src/linux ]] && rm ${ROOT}usr/src/linux |
773 |
[[ -h ${EROOT}usr/src/linux ]] && rm ${EROOT}usr/src/linux |
775 |
MAKELINK=1 |
774 |
MAKELINK=1 |
776 |
fi |
775 |
fi |
777 |
|
776 |
|
778 |
# if the link doesnt exist, lets create it |
777 |
# if the link doesnt exist, lets create it |
779 |
[[ ! -h ${ROOT}usr/src/linux ]] && MAKELINK=1 |
778 |
[[ ! -h ${EROOT}usr/src/linux ]] && MAKELINK=1 |
780 |
|
779 |
|
781 |
if [[ ${MAKELINK} == 1 ]]; then |
780 |
if [[ ${MAKELINK} == 1 ]]; then |
782 |
cd "${ROOT}"usr/src |
781 |
cd "${EROOT}"usr/src |
783 |
ln -sf linux-${KV_FULL} linux |
782 |
ln -sf linux-${KV_FULL} linux |
784 |
cd ${OLDPWD} |
783 |
cd ${OLDPWD} |
785 |
fi |
784 |
fi |
786 |
|
785 |
|
787 |
# Don't forget to make directory for sysfs |
786 |
# Don't forget to make directory for sysfs |
788 |
[[ ! -d ${ROOT}sys ]] && kernel_is 2 6 && mkdir ${ROOT}sys |
787 |
[[ ! -d ${EROOT}sys ]] && kernel_is 2 6 && mkdir ${EROOT}sys |
789 |
|
788 |
|
790 |
echo |
789 |
echo |
791 |
elog "If you are upgrading from a previous kernel, you may be interested" |
790 |
elog "If you are upgrading from a previous kernel, you may be interested" |
Lines 1041-1047
unipatch() {
Link Here
|
1041 |
for x in ${KPATCH_DIR}; do |
1040 |
for x in ${KPATCH_DIR}; do |
1042 |
for i in ${UNIPATCH_DOCS}; do |
1041 |
for i in ${UNIPATCH_DOCS}; do |
1043 |
if [[ -f "${x}/${i}" ]] ; then |
1042 |
if [[ -f "${x}/${i}" ]] ; then |
1044 |
tmp="${tmp} ${i}" |
1043 |
tmp="${tmp} \"${T}/${i}\"" |
1045 |
cp -f "${x}/${i}" "${T}"/ |
1044 |
cp -f "${x}/${i}" "${T}"/ |
1046 |
fi |
1045 |
fi |
1047 |
done |
1046 |
done |
Lines 1238-1248
kernel-2_pkg_postrm() {
Link Here
|
1238 |
[[ ${ETYPE} == headers ]] && return 0 |
1237 |
[[ ${ETYPE} == headers ]] && return 0 |
1239 |
|
1238 |
|
1240 |
# If there isn't anything left behind, then don't complain. |
1239 |
# If there isn't anything left behind, then don't complain. |
1241 |
[[ -e ${ROOT}usr/src/linux-${KV_FULL} ]] || return 0 |
1240 |
[[ -e ${EROOT}usr/src/linux-${KV_FULL} ]] || return 0 |
1242 |
echo |
1241 |
echo |
1243 |
ewarn "Note: Even though you have successfully unmerged " |
1242 |
ewarn "Note: Even though you have successfully unmerged " |
1244 |
ewarn "your kernel package, directories in kernel source location: " |
1243 |
ewarn "your kernel package, directories in kernel source location: " |
1245 |
ewarn "${ROOT}usr/src/linux-${KV_FULL}" |
1244 |
ewarn "${EROOT}usr/src/linux-${KV_FULL}" |
1246 |
ewarn "with modified files will remain behind. By design, package managers" |
1245 |
ewarn "with modified files will remain behind. By design, package managers" |
1247 |
ewarn "will not remove these modified files and the directories they reside in." |
1246 |
ewarn "will not remove these modified files and the directories they reside in." |
1248 |
echo |
1247 |
echo |