Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

FL-390: update to latest debian-sources, attempt to debug on Asus 990FX

motherboard
  • Loading branch information...
commit 5621d6e70e02e9947200aa8334bc4ce3a4548a1c 1 parent 324695b
Oleg angryvincent authored
5 profiles/package.mask/funtoo-staging
View
@@ -1,6 +1,11 @@
# Keep the most recent masks in a reverse chrono order
# newest on top
+# Oleg Vinichenko (27 Feb 2013)
+# add latest debian-sources, attempt to debug on Asus 990 motherboard,
+# FL-390
+>=sys-kernel/debian-sources-3.2.39
+
# Daniel Molik ( 6 Feb 2013 )
# FL-382, bison-2.7 for testing
=sys-devel/bison-2.7
2  sys-kernel/debian-sources/Manifest
View
@@ -4,3 +4,5 @@ DIST linux_3.2.29-1.debian.tar.xz 955952 SHA256 b421f738632fd0b85c6686313daea7e8
DIST linux_3.2.29.orig.tar.xz 65725120 SHA256 e9fdd2a7f774188974f5e74a68a112e563763e0c83db7a8411d5d3bb4bee1213
DIST linux_3.2.35-2.debian.tar.xz 2483540 SHA256 8ae153d652cb0a870128d202fe6cd93d89f2c70996217355ca5681b62cce37fb SHA512 b2e6e0fcbac4e2b4a0cfc958535c13f22a20387b557995e7e036b79f6d29061fbe79eddfc5de1e3abe200b4c765637b19773ab8e5c61f3842c449a3dc3a49f85 WHIRLPOOL 8b30cadfcdaad17fc73d9fb567c3f68abac0f9b4ae778ed500bd601edda654c3ba6dd498f6b7df77ab4ae55f5c2b8475134b39cef7ee818872dd19b915f6dd0d
DIST linux_3.2.35.orig.tar.xz 65831540 SHA256 ea4c76c3820f9d7a07c7beb9f631a07d04613908c5f670afa200d677fd5f8538 SHA512 f2f931dc1169af7b19d4b9e88935297ee72b173b4fc946a8932f8599bb43164c23f7de4da2468319fa5991de7347b93c1b4a5a727c5d0b98db68e535cc1cedbe WHIRLPOOL 9c4e901c93e89bdbc4da45391a830f90839164cd3a565a7e836d121a5fe879b1611e7993a7061037caa5639c00fd0de98963934615cefb897895171668aa0641
+DIST linux_3.2.39-1.debian.tar.xz 3188844 SHA256 5332b4729956b341230cbbaff06fda0c51347e68a054c791e35a10898143ff13 SHA512 6c4aaba734da7193b33e5c2e49d4a771296f870e40570cbad79e253c6f85f551d29cb556f05851e18f8e474af23165de4bc921ef56037872597283d703e467e3 WHIRLPOOL 330d65b6bccf0de85bc9bc38c98a94bb5c41d9266cbc5abc48c23d9eb5e077dac25a480fc51c1e41187a7e5382d9194a167bcb8a7accc5f232d7ba5b1b16daf7
+DIST linux_3.2.39.orig.tar.xz 65857136 SHA256 663eb090fc2d7d5a3d0dc613a662baf44c5e0057a9e99b404299ee25546e7a91 SHA512 fae785b28689f1fac6741806136939a1d00a23fda07e7106259db14755a89bb35979c5f9792d48a969db547b9a0058bf824a9d1012059fbe57b128d5d2179fcf WHIRLPOOL 22fa44fc16b537d2140e7ef7bdff60b9d828129d8c3370b1260b576e1b40eb8052d41867a0bc229e8116a7fdb09c54bdcdbf49d07300cad9f793d4ede3377a33
163 sys-kernel/debian-sources/debian-sources-3.2.39.ebuild
View
@@ -0,0 +1,163 @@
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=3
+
+inherit eutils mount-boot
+
+SLOT=$PVR
+CKV=3.2.39
+KV_FULL=${PN}-${PVR}
+EXTRAVERSION=-1
+KERNEL_ARCHIVE="linux_${PV}.orig.tar.xz"
+PATCH_ARCHIVE="linux_${PV}${EXTRAVERSION}.debian.tar.xz"
+RESTRICT="binchecks strip mirror"
+# based on : http://packages.ubuntu.com/maverick/linux-image-2.6.35-22-server
+LICENSE="GPL-2"
+KEYWORDS="~*"
+IUSE="binary rt"
+DEPEND="binary? ( >=sys-kernel/genkernel-3.4.40-r2 )"
+RDEPEND="binary? ( || ( >=sys-fs/udev-160 >=virtual/udev-171 ) )"
+DESCRIPTION="Debian Sources (and optional binary kernel)"
+HOMEPAGE="http://www.debian.org"
+MAINPATCH="linux-2.6_${PV}${EXTRAVERSION}.diff.gz"
+SRC_URI="http://www.funtoo.org/distfiles/${KERNEL_ARCHIVE}
+ http://www.funtoo.org/distfiles/${PATCH_ARCHIVE}"
+S="$WORKDIR/linux-${CKV}"
+
+apply() {
+ p=$1; shift
+ case "${p##*.}" in
+ gz)
+ ca="gzip -dc"
+ ;;
+ bz2)
+ ca="bzip2 -dc"
+ ;;
+ xz)
+ ca="xz -dc"
+ ;;
+ *)
+ ca="cat"
+ ;;
+ esac
+ [ ! -e $p ] && die "patch $p not found"
+ echo "Applying patch $p"; $ca $p | patch $* || die "patch $p failed"
+}
+
+get_patch_list() {
+ [[ -z "${1}" ]] && die "No patch series file specified"
+ local patch_series="${1}"
+ while read line ; do
+ if [[ "${line:0:1}" != "#" ]] ; then
+ echo "${line}"
+ fi
+ done < "${patch_series}"
+}
+
+pkg_setup() {
+ export REAL_ARCH="$ARCH"
+ unset ARCH; unset LDFLAGS #will interfere with Makefile if set
+}
+
+src_prepare() {
+
+ cd ${S}
+ for debpatch in $( get_patch_list "${WORKDIR}/debian/patches/series" ); do
+ epatch -p1 "${WORKDIR}/debian/patches/${debpatch}"
+ done
+
+ if use rt ; then
+ for rtpatch in $( get_patch_list "${WORKDIR}/debian/patches/series-rt" ) ; do
+ epatch -p1 "${WORKDIR}/debian/patches/${rtpatch}"
+ done
+ fi
+
+ # end of debian-specific stuff...
+
+ sed -i -e "s:^\(EXTRAVERSION =\).*:\1 ${EXTRAVERSION}:" Makefile || die
+ sed -i -e 's:#export\tINSTALL_PATH:export\tINSTALL_PATH:' Makefile || die
+ rm -f .config >/dev/null
+ cp -a "${WORKDIR}"/debian "${T}"
+ make -s mrproper || die "make mrproper failed"
+ make -s include/linux/version.h || die "make include/linux/version.h failed"
+ cd ${S}
+ cp -aR "${WORKDIR}"/debian "${S}"/debian
+ local opts
+ use rt && opts="rt" || opts="standard"
+ local myarch="amd64"
+ [ "$REAL_ARCH" = "x86" ] && myarch="i386" && opts="$opts 686-pae"
+ cp ${FILESDIR}/config-extract . || die
+ chmod +x config-extract || die
+ ./config-extract ${myarch} ${opts} || die
+ cp .config ${T}/config || die
+ make -s mrproper || die "make mrproper failed"
+ make -s include/linux/version.h || die "make include/linux/version.h failed"
+}
+
+src_compile() {
+ ! use binary && return
+ install -d ${WORKDIR}/out/{lib,boot}
+ install -d ${T}/{cache,twork}
+ install -d $WORKDIR/build $WORKDIR/out/lib/firmware
+ genkernel \
+ --no-save-config \
+ --kernel-config="$T/config" \
+ --kernname="${PN}" \
+ --build-src="$S" \
+ --build-dst=${WORKDIR}/build \
+ --makeopts="${MAKEOPTS}" \
+ --firmware-dst=${WORKDIR}/out/lib/firmware \
+ --cachedir="${T}/cache" \
+ --tempdir="${T}/twork" \
+ --logfile="${WORKDIR}/genkernel.log" \
+ --bootdir="${WORKDIR}/out/boot" \
+ --lvm \
+ --luks \
+ --mdadm \
+ --iscsi \
+ --module-prefix="${WORKDIR}/out" \
+ all || die "genkernel failed"
+}
+
+src_install() {
+ # copy sources into place:
+ dodir /usr/src
+ cp -a ${S} ${D}/usr/src/linux-${P} || die
+ cd ${D}/usr/src/linux-${P}
+ # prepare for real-world use and 3rd-party module building:
+ make mrproper || die
+ cp ${T}/config .config || die
+ cp -a ${T}/debian debian || die
+ yes "" | make oldconfig || die
+ # if we didn't use genkernel, we're done. The kernel source tree is left in
+ # an unconfigured state - you can't compile 3rd-party modules against it yet.
+ use binary || return
+ make prepare || die
+ make scripts || die
+ # OK, now the source tree is configured to allow 3rd-party modules to be
+ # built against it, since we want that to work since we have a binary kernel
+ # built.
+ cp -a ${WORKDIR}/out/* ${D}/ || die "couldn't copy output files into place"
+ # module symlink fixup:
+ rm -f ${D}/lib/modules/*/source || die
+ rm -f ${D}/lib/modules/*/build || die
+ cd ${D}/lib/modules
+ # module strip:
+ find -iname *.ko -exec strip --strip-debug {} \;
+ # back to the symlink fixup:
+ local moddir="$(ls -d [23]*)"
+ ln -s /usr/src/linux-${P} ${D}/lib/modules/${moddir}/source || die
+ ln -s /usr/src/linux-${P} ${D}/lib/modules/${moddir}/build || die
+
+ # Fixes FL-14
+ cp "${WORKDIR}/build/System.map" "${D}/usr/src/linux-${P}/" || die
+ cp "${WORKDIR}/build/Module.symvers" "${D}/usr/src/linux-${P}/" || die
+
+}
+
+pkg_postinst() {
+ if [ ! -e ${ROOT}usr/src/linux ]
+ then
+ ln -s linux-${P} ${ROOT}usr/src/linux
+ fi
+}
Please sign in to comment.
Something went wrong with that request. Please try again.