Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 350852 Details for
Bug 472906
linux-2.eclass: (initial) portage kernel building support
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
stable-sources-3.9.5.ebuild
stable-sources-3.9.5.ebuild (text/plain), 4.19 KB, created by
Bertrand Jacquin
on 2013-06-12 20:11:01 UTC
(
hide
)
Description:
stable-sources-3.9.5.ebuild
Filename:
MIME Type:
Creator:
Bertrand Jacquin
Created:
2013-06-12 20:11:01 UTC
Size:
4.19 KB
patch
obsolete
># Copyright 1999-2013 Gentoo Foundation ># Distributed under the terms of the GNU General Public License v2 ># $Header: $ > >EAPI=5 >ETYPE="sources" > >inherit savedconfig kernel-2 >detect_version > >SLOT="${PV%.*}" > >DESCRIPTION="Kernel stable sources and build" >HOMEPAGE="http://www.kernel.org" >SRC_URI="${KERNEL_URI} ${GENPATCHES_URI} ${ARCH_URI}" > >KEYWORDS="~amd64 ~x86" > >SRCDIR="${WORKDIR}/linux-${KV_FULL}" >BUILDDIR="${WORKDIR}/build" > >KV_EXTRA="${EXTRAVERSION}" >S="${SRCDIR}" > >IUSE="build source zlib lzma" >REQUIRED_USE=" > ?? ( zlib lzma ) > zlib? ( build ) > lzma? ( build ) > symlink? ( source ) > " > >DEPEND=" > || ( > sys-apps/kmod[zlib?,lzma?] > sys-apps/module-init-tools > )" > >configval () >{ > local _v="CONFIG_$1" > > # Export only the needed config value > # when not already define > declare -p ${_v} > /dev/null 2>&1 \ > || . <(sed -n "/^${_v}=/ p" ${BUILDDIR}/.config) > > case "${!_v}" in > "") declare "$_v=n" ; export $_v ; return 1 ;; > *) export $_v ; return 0 ;; > esac >} > >do_prepare_build () >{ > mkdir "${BUILDDIR}" > > restore_config "${BUILDDIR}/.config" > if [ ! -e "${BUILDDIR}/.config" ] ; then > ewarn "Generate .config using 'defconfig'" > emake defconfig "${myopt[@]}" > fi > > mkdir "${WORKDIR}/boot" > > if configval CMDLINE_BOOL && configval CMDLINE ; then > einfo "Creating kernel.arg" > einfo " CONFIG_CMDLINE='${CONFIG_CMDLINE}'" > echo "${CONFIG_CMDLINE}" > "${WORKDIR}/boot/kernel.arg" > fi > > configval MODULES || ewarn "CONFIG_MODULES is not set" >} > >src_prepare () >{ > bopt=( > -C "${BUILDDIR}" > -f "${SRCDIR}/Makefile" > KBUILD_SRC="${SRCDIR}" > KCONFIG_CONFIG="${BUILDDIR}/.config" > > KBUILD_BUILD_USER="${KBUILD_BUILD_USER:-$PORTAGE_USERNAME}" > ) > > copt=( > CC=$(tc-getCC) HOSTCC=${CBUILD}-gcc CROSS_COMPILE=${CHOST}- > ARCH=$(tc-arch-kernel) SUBARCH=$(tc-arch-kernel) > ) > > vopt=( > EXTRAVERSION="${KV_EXTRA}" > LOCALVERSION= CONFIG_LOCALVERSION= > ) > > myopt=( "${bopt[@]}" "${copt[@]}" "${vopt[@]}" ) > > use build && do_prepare_build >} > >do_compile_build () >{ > einfo "Checking configuration file" > emake oldconfig "${myopt[@]}" < /dev/null > > if diff -Nu0 ${BUILDDIR}/.config.old ${BUILDDIR}/.config \ > | egrep -q '^(\-|\+)CONFIG_' ; then > eerror "You configuration is not up to date" > diff -Nu ${BUILDDIR}/.config.old ${BUILDDIR}/.config > die "Bad configuration" > fi > > einfo "Building kernel" > emake bzImage "${myopt[@]}" > > if configval MODULES ; then > einfo "Building modules" > emake modules "${myopt[@]}" > fi >} > >src_compile () >{ > use build && do_compile_build >} > >do_install_sources () >{ > kernel-2_src_install >} > >do_install_build () >{ > einfo "Installing kernel" > emake install "${myopt[@]}" \ > INSTALL_PATH="${WORKDIR}/boot" > > insinto /boot/${KV_FULL} > > newins "${WORKDIR}/boot/config-${KV_FULL}" kernel.cfg > newins "${WORKDIR}/boot/vmlinuz-${KV_FULL}" kernel.img > newins "${WORKDIR}/boot/System.map-${KV_FULL}" System.map > > if configval CMDLINE_BOOL && configval CMDLINE ; then > doins "${WORKDIR}/boot/kernel.arg" > fi > > if configval MODULES ; then > einfo "Installing modules" > emake modules_install "${myopt[@]}" \ > INSTALL_MOD_PATH="${WORKDIR}" \ > INSTALL_MOD_STRIP="${PORTAGE_STRIP_FLAGS}" > > # kmod only support zlib and lzma > # See libkmod/libkmod-util.c / struct kmod_ext kmod_exts > if use zlib || use lzma ; then > use zlib && { cmp="gzip -9c" ; ext="gz" ; } > use lzma && { cmp="xz -9c" ; ext="xz" ; } > > einfo "Compressing modules" > find "${WORKDIR}/lib/modules" \ > -type f -name "*.ko" \ > | while read ; do > $cmp < $REPLY > ${REPLY}.${ext} > rm $REPLY > done > fi > > einfo "Generating modules.dep" > depmod -ae -F "${BUILDDIR}/System.map" -b "${WORKDIR}" "${KV_FULL}" \ > || die "depmod failed" > > rm "${WORKDIR}/lib/modules/${KV_FULL}/build" > rm "${WORKDIR}/lib/modules/${KV_FULL}/source" > > insinto /lib > doins -r "${WORKDIR}/lib/modules" > > # No need to make firmware_install, make modules_install does > if [ -e "${WORKDIR}/lib/firmware" ] ; then > einfo "Installing firmwares" > > insinto /lib > doins -r "${WORKDIR}/lib/firmware" > fi > fi >} > >src_install () >{ > use build && do_install_build > use source && do_install_sources > use savedconfig && save_config "${BUILDDIR}/.config" >} > >pkg_postinst () >{ > kernel-2_pkg_postinst > > einfo "You may need to:" > einfo " make menuconfig ${copt[@]}" >}
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 Raw
Actions:
View
Attachments on
bug 472906
: 350852