updates
This commit is contained in:
parent
298e559125
commit
f4868f6b29
@ -3,6 +3,6 @@ AUX sun-jre-bin-1.6.env 936 RMD160 830d1fee15dc2ba8dab9b4c78d2b072ba5e29f0f SHA1
|
||||
DIST ejre-1_6_0_27-fcs-b07-linux-arm-sflt-eabi-headless-18_jul_2011.tar.gz 27858955 RMD160 a47a72111b531ef750bfd8f9ddec24ad408cdcda SHA1 90eeda6bc1cb11fbc4460e5644de7d35a2de3681 SHA256 55e063836f3ea5e98f020fbc44898c89b74f2770f29b286f27fbac30e0ad4a4d
|
||||
DIST ejre-1_6_0_27-fcs-b07-linux-arm-vfp-eabi-headful-18_jul_2011.tar.gz 34316063 RMD160 6f2adbbd0f206f920f1beb1ced6e7ff462841dfa SHA1 3a85b0df7f0c8967a5801615f90293b76ce0fa7f SHA256 d65f89fd537b4c912348b3f651ca6fb6c7726115b6882440e10b95f52ed681f5
|
||||
DIST ejre-1_6_0_27-fcs-b07-linux-arm-vfp-eabi-headless-18_jul_2011.tar.gz 27726930 RMD160 398d69394cf0caba9f78b749c806aa6545f21535 SHA1 bf66081cca44e008cf1d9d576fcc39c88d9232cf SHA256 d8b02bd16c95435d9c460cea060bc10b6eda00a2e8864d6412074903dd73243c
|
||||
EBUILD sun-jre-bin-1.6.0.27.ebuild 3582 RMD160 47d74d226a5c920687174d6407983881bf7736cb SHA1 aae85c8eda16e4a59bbb025ae4e55b75fc6e258a SHA256 ff233dcff2af900508980e53c938cc373e01fb018a3c2793c2be802bcfe04113
|
||||
EBUILD sun-jre-bin-1.6.0.27.ebuild 3602 RMD160 dcdcd6096ce6cb055e1c06883010f303fb853bc9 SHA1 b64ad565716630999000fdb5964e055a6880ef71 SHA256 4c518f2254d9081408a8c8a6964caabfd37e22e070d419ca0f9af8d331ef2181
|
||||
MISC ChangeLog 1371 RMD160 e823834b2b7b9c812bf1a29bdc8376f425e5c16c SHA1 07734e5a67e5d5a2c2ad603ff825f2877a861e6e SHA256 8969e2dc9c913ce5951ce0e439016db83e8d4d06c482128f64285d5e2f95d4f1
|
||||
MISC metadata.xml 349 RMD160 ae6db154651b0c2b160e1e6956fb722cb52f2e8b SHA1 219312b9ae33153d205b514009927531ee14b93a SHA256 fe0ef52d77b220fb36e9c39d2148bf03ec11223d80320cdc066c0fa723a1ae7d
|
||||
|
@ -18,6 +18,8 @@ DESCRIPTION="Sun's Java SE Embedded Runtime Environment"
|
||||
HOMEPAGE="http://www.oracle.com/technetwork/java/embedded/overview/index.html"
|
||||
URL_BASE="http://download.java.net/dlj/binaries"
|
||||
|
||||
einfo ${CHOST/-*/}
|
||||
|
||||
if [[ ${CHOST/-*/} -eq "armv5tel" ]]; then
|
||||
SRC_URI="arm? ( ${URL_BASE}/${ARMV5_AT} )"
|
||||
elif [[ ${CHOST/-*/} -eq "armv6j" ]]; then
|
||||
@ -27,7 +29,7 @@ elif [[ ${CHOST/-*/} -eq "armv7a" ]]; then
|
||||
fi
|
||||
|
||||
# trick CHOST="arm" ebuild sun-jre-bin-1.6.0.27.ebuild for digesting all the source packages
|
||||
if [[ ${CHOST} -eq "arm" ]]; then
|
||||
if [[ ${CHOST} -eq "all" ]]; then
|
||||
SRC_URI="arm? ( ${URL_BASE}/${ARMV5_AT} ${URL_BASE}/${ARMV6_AT} ${URL_BASE}/${ARMV7_AT} )"
|
||||
fi
|
||||
|
||||
|
@ -4,13 +4,13 @@
|
||||
|
||||
# @ECLASS-VARIABLE: K_NASPATCHES_VER
|
||||
# @DESCRIPTION:
|
||||
# The version of the genlink patches tarball(s) to apply.
|
||||
# The version of the sablink patches tarball(s) to apply.
|
||||
# A value of "5" would apply 2.6.12-5 to my-sources-2.6.12.ebuild
|
||||
|
||||
# @ECLASS-VARIABLE: K_NASKERNEL_NAME
|
||||
# @DESCRIPTION:
|
||||
# The kernel name used by the ebuild, it should be the ending ${PN} part
|
||||
# for example, of linux-genlink it is "${PN/${PN/-*}-}" (genlink)
|
||||
# for example, of linux-sablink it is "${PN/${PN/-*}-}" (sablink)
|
||||
K_NASKERNEL_NAME="${K_NASKERNEL_NAME:-${PN/${PN/-*}-}}"
|
||||
|
||||
# @ECLASS-VARIABLE: K_NASKERNEL_URI_CONFIG
|
||||
@ -23,14 +23,14 @@ K_NASKERNEL_URI_CONFIG="${K_NASKERNEL_URI_CONFIG:-no}"
|
||||
# @ECLASS-VARIABLE: K_NASKERNEL_SELF_TARBALL_NAME
|
||||
# @DESCRIPTION:
|
||||
# If the main kernel sources tarball is generated in-house and available
|
||||
# on the "genlink" mirror, set this variable to the extension name (see example
|
||||
# on the "sablink" mirror, set this variable to the extension name (see example
|
||||
# below). This will disable ALL the extra/local patches (since they have to
|
||||
# be applied inside the tarball). Moreover, K_NASKERNEL_URI_CONFIG,
|
||||
# K_NASPATCHES_VER, K_NASKERNEL_NAME, K_KERNEL_PATCH_VER will be ignored.
|
||||
# Example:
|
||||
# K_NASKERNEL_SELF_TARBALL_NAME="genlink"
|
||||
# K_NASKERNEL_SELF_TARBALL_NAME="sablink"
|
||||
# This would generate:
|
||||
# SRC_URI="mirror://genlink/sys-kernel/linux-${PV}+genlink.tar.bz2"
|
||||
# SRC_URI="mirror://sablink/sys-kernel/linux-${PV}+sablink.tar.bz2"
|
||||
K_NASKERNEL_SELF_TARBALL_NAME="${K_NASKERNEL_SELF_TARBALL_NAME:-}"
|
||||
|
||||
# @ECLASS-VARIABLE: K_NASKERNEL_FORCE_SUBLEVEL
|
||||
@ -68,12 +68,12 @@ K_KERNEL_PATCH_VER="${K_KERNEL_PATCH_VER:-}"
|
||||
# pointing to space separated list of patch paths.
|
||||
K_KERNEL_PATCH_HOTFIXES="${K_KERNEL_PATCH_HOTFIXES:-}"
|
||||
|
||||
# @ECLASS-VARIABLE: K_KERNEL_DISABLE_PR_EXTRAVERSION
|
||||
# @ECLASS-VARIABLE: K_KERNEL_DINASLE_PR_EXTRAVERSION
|
||||
# @DESCRIPTION:
|
||||
# Set this to "1" if you want to tell kernel-2 eclass to
|
||||
# not use ${PR} in kernel EXTRAVERSION (K_NOUSEPR). Otherwise, set
|
||||
# this to "0" to not set K_NOUSEPR at all.
|
||||
K_KERNEL_DISABLE_PR_EXTRAVERSION="${K_KERNEL_DISABLE_PR_EXTRAVERSION:-1}"
|
||||
K_KERNEL_DINASLE_PR_EXTRAVERSION="${K_KERNEL_DINASLE_PR_EXTRAVERSION:-1}"
|
||||
|
||||
# @ECLASS-VARIABLE: K_KERNEL_SLOT_USEPVR
|
||||
# @DESCRIPTION:
|
||||
@ -128,7 +128,7 @@ inherit eutils kernel-2 mount-boot linux-info
|
||||
detect_version
|
||||
detect_arch
|
||||
|
||||
DESCRIPTION="Genlink Linux kernel functions and phases"
|
||||
DESCRIPTION="Sabayon Linux kernel functions and phases"
|
||||
|
||||
|
||||
K_LONGTERM_URL_STR=""
|
||||
@ -138,13 +138,13 @@ fi
|
||||
|
||||
## kernel-2 eclass settings
|
||||
if [ -n "${K_NASKERNEL_SELF_TARBALL_NAME}" ]; then
|
||||
SRC_URI="mirror://genlink/${CATEGORY}/linux-${PVR}+${K_NASKERNEL_SELF_TARBALL_NAME}.tar.bz2"
|
||||
SRC_URI="mirror://sablink/${CATEGORY}/linux-${PVR}+${K_NASKERNEL_SELF_TARBALL_NAME}.tar.bz2"
|
||||
elif [ -n "${K_NASPATCHES_VER}" ]; then
|
||||
UNIPATCH_STRICTORDER="yes"
|
||||
K_NASPATCHES_PKG="nas-patches-${PV}-${K_NASPATCHES_VER}.tar.bz2"
|
||||
UNIPATCH_LIST="${DISTFILES}/${K_NASPATCHES_PKG}"
|
||||
SRC_URI="${KERNEL_URI}
|
||||
http://ftp.disconnected-by-peer.at/genlink/${CATEGORY}/linux-nas-patches/${K_NASPATCHES_PKG}"
|
||||
mirror://sablink/${CATEGORY}/linux-nas-patches/${K_NASPATCHES_PKG}"
|
||||
else
|
||||
SRC_URI="${KERNEL_URI}"
|
||||
fi
|
||||
@ -153,8 +153,7 @@ if [ -z "${K_NASKERNEL_SELF_TARBALL_NAME}" ]; then
|
||||
if [ -n "${K_KERNEL_PATCH_VER}" ]; then
|
||||
K_PATCH_NAME="patch-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}.${K_KERNEL_PATCH_VER}.bz2"
|
||||
SRC_URI="${SRC_URI}
|
||||
mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}${K_LONGTERM_URL_STR}/${K_PATCH_NAME}
|
||||
ftp://ftp.servus.at/linux-kernel/${K_PATCH_NAME}"
|
||||
mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}${K_LONGTERM_URL_STR}/${K_PATCH_NAME}"
|
||||
UNIPATCH_LIST="${DISTDIR}/${K_PATCH_NAME}
|
||||
${UNIPATCH_LIST}"
|
||||
fi
|
||||
@ -167,9 +166,8 @@ _get_real_kv_full() {
|
||||
if [[ "${KV_MAJOR}${KV_MINOR}" -eq 26 ]]; then
|
||||
echo "${ORIGINAL_KV_FULL}"
|
||||
elif [[ "${OKV/.*}" = "3" ]]; then
|
||||
# Linux 3.x support, KV_FULL is set to: 3.0-genlink
|
||||
# Linux 3.x support, KV_FULL is set to: 3.0-sablink
|
||||
# need to add another final .0 to the version part
|
||||
# echo "${ORIGINAL_KV_FULL/-/.0-}"
|
||||
echo "${ORIGINAL_KV_FULL}"
|
||||
else
|
||||
echo "${ORIGINAL_KV_FULL}"
|
||||
@ -177,11 +175,11 @@ _get_real_kv_full() {
|
||||
}
|
||||
|
||||
# replace "linux" with K_NASKERNEL_NAME, usually replaces
|
||||
# "linux" with "genlink" or "server" or "openvz"
|
||||
# "linux" with "sablink" or "server" or "openvz"
|
||||
KV_FULL="${KV_FULL/${PN/-*}/${K_NASKERNEL_NAME}}"
|
||||
EXTRAVERSION="${EXTRAVERSION/${PN/-*}/${K_NASKERNEL_NAME}}"
|
||||
# drop -rX if exists
|
||||
if [[ -n "${PR//r0}" ]] && [[ "${K_KERNEL_DISABLE_PR_EXTRAVERSION}" = "1" ]] \
|
||||
if [[ -n "${PR//r0}" ]] && [[ "${K_KERNEL_DINASLE_PR_EXTRAVERSION}" = "1" ]] \
|
||||
&& [[ -z "${K_NOSETEXTRAVERSION}" ]]; then
|
||||
EXTRAVERSION="${EXTRAVERSION%-r*}"
|
||||
KV_FULL="${KV_FULL%-r*}"
|
||||
@ -192,7 +190,7 @@ ORIGINAL_KV_FULL="${KV_FULL}"
|
||||
KV_FULL="$(_get_real_kv_full)"
|
||||
|
||||
# Starting from linux-3.0, we still have to install
|
||||
# sources stuff into /usr/src/linux-3.0.0-genlink (example)
|
||||
# sources stuff into /usr/src/linux-3.0.0-sablink (example)
|
||||
# where the last part must always match uname -r
|
||||
# otherwise kernel-switcher (and RELEASE_LEVEL file)
|
||||
# will complain badly
|
||||
@ -224,10 +222,9 @@ if _is_kernel_binary; then
|
||||
fi
|
||||
|
||||
if [ -n "${K_NASKERNEL_SELF_TARBALL_NAME}" ]; then
|
||||
HOMEPAGE="http://git.disconnected-by-peer.at"
|
||||
HOMEPAGE="http://gitweb.sablink.org/?p=linux/kernel/sablink.git;a=summary"
|
||||
else
|
||||
HOMEPAGE="http://linamh.disconnected-by-peer.at/wiki/Genlink"
|
||||
|
||||
HOMEPAGE="http://www.sablink.org"
|
||||
fi
|
||||
|
||||
|
||||
@ -235,25 +232,24 @@ fi
|
||||
if [ -z "${K_NASKERNEL_SELF_TARBALL_NAME}" ]; then
|
||||
if [ "${K_NASKERNEL_URI_CONFIG}" = "yes" ]; then
|
||||
K_NASKERNEL_CONFIG_FILE="${K_NASKERNEL_CONFIG_FILE:-${K_NASKERNEL_NAME}-${PVR}-__ARCH__.config}"
|
||||
K_NASKERNEL_FW_CONFIG_FILE="${K_NASKERNEL_FW_CONFIG_FILE:-${K_NASKERNEL_NAME}-fw_env-__ARCH__.config}"
|
||||
SRC_URI="${SRC_URI}
|
||||
http://ftp.disconnected-by-peer.at/genlink/${CATEGORY}/linux-nas-patches/config/${K_NASKERNEL_CONFIG_FILE/__ARCH__/arm}"
|
||||
#arm? ( http://ftp.disconnected-by-peer.at/genlink/${CATEGORY}/linux-nas-patches/config/${K_NASKERNEL_CONFIG_FILE/__ARCH__/arm} )"
|
||||
#use arm && K_NASKERNEL_CONFIG_FILE=${K_NASKERNEL_CONFIG_FILE/__ARCH__/arm}
|
||||
K_NASKERNEL_CONFIG_FILE=${K_NASKERNEL_CONFIG_FILE/__ARCH__/arm}
|
||||
arm? ( mirror://sablink/${CATEGORY}/linux-nas-patches/config/${K_NASKERNEL_CONFIG_FILE/__ARCH__/arm}
|
||||
mirror://sablink/${CATEGORY}/linux-nas-patches/config/${K_NASKERNEL_FW_CONFIG_FILE/__ARCH__/arm} )"
|
||||
use arm && K_NASKERNEL_CONFIG_FILE=${K_NASKERNEL_CONFIG_FILE/__ARCH__/arm}
|
||||
use arm && K_NASKERNEL_FW_CONFIG_FILE=${K_NASKERNEL_FW_CONFIG_FILE/__ARCH__/arm}
|
||||
else
|
||||
#use arm && K_NASKERNEL_CONFIG_FILE="${K_NASKERNEL_CONFIG_FILE:-${K_NASKERNEL_NAME}-${PVR}-arm.config}"
|
||||
K_NASKERNEL_CONFIG_FILE="${K_NASKERNEL_CONFIG_FILE:-${K_NASKERNEL_NAME}-${PVR}-arm.config}"
|
||||
use arm && K_NASKERNEL_CONFIG_FILE="${K_NASKERNEL_CONFIG_FILE:-${K_NASKERNEL_NAME}-${PVR}-arm.config}"
|
||||
use arm && K_NASKERNEL_FW_CONFIG_FILE="${K_NASKERNEL_FW_CONFIG_FILE:-${K_NASKERNEL_NAME}-fw_env-arm.config}"
|
||||
fi
|
||||
|
||||
else
|
||||
K_NASKERNEL_CONFIG_FILE="${K_NASKERNEL_CONFIG_FILE:-${K_NASKERNEL_NAME}-${PVR}-__ARCH__.config}"
|
||||
K_NASKERNEL_ALT_CONFIG_FILE="${K_NASKERNEL_ALT_CONFIG_FILE:-${K_NASKERNEL_NAME}-${PV}-__ARCH__.config}"
|
||||
if use amd64; then
|
||||
K_NASKERNEL_CONFIG_FILE=${K_NASKERNEL_CONFIG_FILE/__ARCH__/amd64}
|
||||
K_NASKERNEL_ALT_CONFIG_FILE=${K_NASKERNEL_ALT_CONFIG_FILE/__ARCH__/amd64}
|
||||
elif use x86; then
|
||||
K_NASKERNEL_CONFIG_FILE=${K_NASKERNEL_CONFIG_FILE/__ARCH__/x86}
|
||||
K_NASKERNEL_ALT_CONFIG_FILE=${K_NASKERNEL_ALT_CONFIG_FILE/__ARCH__/x86}
|
||||
K_NASKERNEL_FW_CONFIG_FILE="${K_NASKERNEL_FW_CONFIG_FILE:-${K_NASKERNEL_NAME}-fw_env-__ARCH__.config}"
|
||||
if use arm; then
|
||||
K_NASKERNEL_CONFIG_FILE=${K_NASKERNEL_CONFIG_FILE/__ARCH__/arm}
|
||||
K_NASKERNEL_ALT_CONFIG_FILE=${K_NASKERNEL_ALT_CONFIG_FILE/__ARCH__/arm}
|
||||
K_NASKERNEL_FW_CONFIG_FILE=${K_NASKERNEL_FW_CONFIG_FILE/__ARCH__/arm}
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -270,10 +266,7 @@ else
|
||||
dracut? ( sys-kernel/dracut )
|
||||
sys-block/devio
|
||||
dev-embedded/u-boot-tools"
|
||||
# rdepend app-admin/nas-eselct
|
||||
# FIXME: when grub-legacy will be removed, remove sys-boot/grub-handler
|
||||
RDEPEND="
|
||||
sys-apps/sed
|
||||
RDEPEND="sys-apps/sed
|
||||
sys-kernel/linux-firmware"
|
||||
if [ -n "${K_REQUIRED_LINUX_FIRMWARE_VER}" ]; then
|
||||
RDEPEND+=" >=sys-kernel/linux-firmware-${K_REQUIRED_LINUX_FIRMWARE_VER}"
|
||||
@ -330,8 +323,6 @@ nas-kernel_src_unpack() {
|
||||
# some sources could have multiple append-based EXTRAVERSIONs
|
||||
sed -i "s/^EXTRAVERSION :=.*//" "${S}/Makefile" || die
|
||||
fi
|
||||
# no need for the ckversion
|
||||
sed -i "s:\$(CKVERSION)::" "${S}/Makefile" || die
|
||||
OKV="${okv}"
|
||||
}
|
||||
|
||||
@ -359,7 +350,7 @@ _firmwares_src_compile() {
|
||||
|
||||
_kernel_copy_config() {
|
||||
if [ -n "${K_NASKERNEL_SELF_TARBALL_NAME}" ]; then
|
||||
local base_path="${S}/genlink/config"
|
||||
local base_path="${S}/sablink/config"
|
||||
if [ -f "${base_path}/${K_NASKERNEL_ALT_CONFIG_FILE}" ]; then
|
||||
# new path, without revision
|
||||
cp "${base_path}/${K_NASKERNEL_ALT_CONFIG_FILE}" "${1}" || die "cannot copy kernel config"
|
||||
@ -379,13 +370,14 @@ _kernel_copy_config() {
|
||||
_kernel_src_compile() {
|
||||
# disable sandbox
|
||||
export SANDBOX_ON=0
|
||||
export LDFLAGS=""
|
||||
|
||||
# creating workdirs
|
||||
# some kernels fail with make 3.82 if firmware dir is not created
|
||||
mkdir "${WORKDIR}"/lib/lib/firmware -p
|
||||
mkdir "${WORKDIR}"/cache
|
||||
mkdir "${S}"/temp
|
||||
|
||||
# needed anyway, even if grub use flag is not used here
|
||||
mkdir -p "${WORKDIR}"/boot
|
||||
|
||||
einfo "Starting to compile kernel..."
|
||||
@ -395,8 +387,7 @@ _kernel_src_compile() {
|
||||
rm -rf "${WORKDIR}"/lib
|
||||
rm -rf "${WORKDIR}"/cache
|
||||
rm -rf "${S}"/temp
|
||||
OLDARCH="${ARCH}"
|
||||
unset ARCH
|
||||
|
||||
cd "${S}" || die
|
||||
GKARGS="--no-save-config --disklabel"
|
||||
use dracut && GKARGS="${GKARGS} --dracut"
|
||||
@ -411,6 +402,23 @@ _kernel_src_compile() {
|
||||
done
|
||||
[ -z "${mkopts}" ] && mkopts="-j3"
|
||||
|
||||
OLDARCH="${ARCH}"
|
||||
env_setup_xmakeopts
|
||||
[ -n "${xmakeopts}" ] && eval "${xmakeopts}"
|
||||
if [ -n "${CROSS_COMPILE}" ] && [ "${CBUILD:-${CHOST}}" != "${CTARGET}" ]; then
|
||||
einfo "Enabling cross-compile for ${CROSS_COMPILE}, arch: ${KARCH}"
|
||||
GKARGS="${GKARGS} --arch-override=${KARCH}"
|
||||
GKARGS="${GKARGS} --kernel-cross-compile=${CROSS_COMPILE}"
|
||||
GKARGS="${GKARGS} --utils-cross-compile=${CROSS_COMPILE}"
|
||||
# ARCH= must be forced to KARCH
|
||||
ARCH="${KARCH}"
|
||||
else
|
||||
einfo "Cross-compile is disabled"
|
||||
unset CROSS_COMPILE
|
||||
unset ARCH
|
||||
fi
|
||||
|
||||
unset LDFLAGS
|
||||
DEFAULT_KERNEL_SOURCE="${S}" CMD_KERNEL_DIR="${S}" genkernel ${GKARGS} ${K_GENKERNEL_ARGS} \
|
||||
--kerneldir="${S}" \
|
||||
--kernel-config="${WORKDIR}"/config \
|
||||
@ -419,10 +427,10 @@ _kernel_src_compile() {
|
||||
--tempdir="${S}"/temp \
|
||||
--logfile="${WORKDIR}"/genkernel.log \
|
||||
--bootdir="${WORKDIR}"/boot \
|
||||
--mountboot \
|
||||
--lvm \
|
||||
--luks \
|
||||
--iscsi \
|
||||
--mountboot \
|
||||
--mdadm \
|
||||
--module-prefix="${WORKDIR}"/lib \
|
||||
all || die "genkernel failed"
|
||||
@ -431,49 +439,58 @@ _kernel_src_compile() {
|
||||
# Buffalo anounced a new box named Pro Live (video transcode streaming)
|
||||
# so the old ls_pro_live has to be split to ls_pro ls_live
|
||||
# for now let it stay but a move schould be done to ls_pro
|
||||
if [ "${K_NASKERNEL_NAME}" = "buffalo_ls_pro_live" ]; then
|
||||
devio > foo 'wl 0xe3a01c06,4' 'wl 0xe3811031,4' # Linkstation Pro/Live (2.6.26)
|
||||
K_NASKERNEL_TYPE="buffalo"
|
||||
fi
|
||||
if [ "${K_NASKERNEL_NAME}" = "buffalo_ls_pro" ]; then
|
||||
devio > foo 'wl 0xe3a01c06,4' 'wl 0xe3811031,4' # Linkstation Pro/Live (2.6.26)
|
||||
K_NASKERNEL_TYPE="buffalo"
|
||||
K_NASKERNEL_DEVICE="Buffalo Linkstation Pro/Live"
|
||||
fi
|
||||
if [ "${K_NASKERNEL_NAME}" = "buffalo_ls_live" ]; then
|
||||
devio > foo 'wl 0xe3a01c06,4' 'wl 0xe3811031,4' # Linkstation Pro/Live (2.6.26)
|
||||
K_NASKERNEL_TYPE="buffalo"
|
||||
K_NASKERNEL_DEVICE="Buffalo Linkstation Pro/Live"
|
||||
fi
|
||||
if [ "${K_NASKERNEL_NAME}" = "buffalo_ls_pro_duo" ]; then
|
||||
devio > foo 'wl 0xe3a01c07,4' 'wl 0xe3811027,4' # Linkstation Pro Duo (2.6.30)
|
||||
K_NASKERNEL_TYPE="buffalo"
|
||||
# correction requred on the check there are ... - Revison 1 and ... - Revison 2
|
||||
#the compare will fail
|
||||
K_NASKERNEL_DEVICE="Buffalo Linkstation Pro Duo"
|
||||
fi
|
||||
if [ "${K_NASKERNEL_NAME}" = "buffalo_ls_xhl" ]; then
|
||||
devio > foo 'wl 0xe3a01c0a,4' 'wl 0xe3811067,4' # Linkstation XHL/CHLv2 (2.6.30)
|
||||
K_NASKERNEL_TYPE="buffalo"
|
||||
K_NASKERNEL_DEVICE="Buffalo LS-XHL Series"
|
||||
fi
|
||||
if [ "${K_NASKERNEL_NAME}" = "buffalo_ls_chl2" ]; then
|
||||
devio > foo 'wl 0xe3a01c0a,4' 'wl 0xe3811067,4' # Linkstation XHL/CHLv2 (2.6.30)
|
||||
K_NASKERNEL_TYPE="buffalo"
|
||||
K_NASKERNEL_DEVICE="Buffalo LS-XHL Series"
|
||||
fi
|
||||
if [ "${K_NASKERNEL_NAME}" = "buffalo_ls_chl" ]; then
|
||||
devio > foo 'wl 0xe3a01c0B,4' 'wl 0xe3811061,4' # Linkstation Live V3 (2.6.34)
|
||||
K_NASKERNEL_TYPE="buffalo"
|
||||
K_NASKERNEL_DEVICE="Buffalo Linkstation LiveV3 (LS-CHL)"
|
||||
fi
|
||||
if [ "${K_NASKERNEL_NAME}" = "buffalo_ls_wxl" ]; then
|
||||
devio > foo 'wl 0xe3a01c0b,4' 'wl 0xe38110c4,4' # Linkstation WXL (2.6.35)
|
||||
K_NASKERNEL_TYPE="buffalo"
|
||||
# Broken hardware name needs to be correct in u-boot firmware
|
||||
K_NASKERNEL_DEVICE="Buffalo Linkstation Pro/Live"
|
||||
fi
|
||||
if [ "${K_NASKERNEL_NAME}" = "buffalo_ls_hgl" ]; then
|
||||
devio > foo 'wl 0xe3a01c07,4' 'wl 0xe38110d5,4' # Linkstation HGL (2.6.31)
|
||||
K_NASKERNEL_TYPE="buffalo"
|
||||
K_NASKERNEL_DEVICE="Buffalo Linkstation LS-HGL"
|
||||
fi
|
||||
if [ "${K_NASKERNEL_NAME}" = "buffalo_ls_mini" ]; then
|
||||
devio > foo 'wl 0xe3a01c07,4' 'wl 0xe3811042,4' # Linkstation mini (2.6.29)
|
||||
K_NASKERNEL_TYPE="buffalo"
|
||||
K_NASKERNEL_DEVICE="Buffalo Linkstation Mini"
|
||||
fi
|
||||
if [ "${K_NASKERNEL_NAME}" = "buffalo_ls_vl" ]; then
|
||||
devio > foo 'wl 0xe3a01c0d,4' 'wl 0xe381100a,4' # Linkstation vl (2.6.35)
|
||||
K_NASKERNEL_TYPE="buffalo"
|
||||
K_NASKERNEL_DEVICE="Buffalo LS-VL Series"
|
||||
fi
|
||||
|
||||
# Buffalo Boxes have a special naming and start address
|
||||
@ -488,6 +505,7 @@ _kernel_src_compile() {
|
||||
# cleanup
|
||||
rm foo zImage.new
|
||||
rm "${WORKDIR}"/boot/kernel-genkernel-${ARCH}-${KV_FULL} "${WORKDIR}"/boot/initramfs-genkernel-${ARCH}-${KV_FULL}
|
||||
|
||||
}
|
||||
|
||||
nas-kernel_src_install() {
|
||||
@ -597,6 +615,22 @@ _kernel_src_install() {
|
||||
doins "RELEASE_LEVEL"
|
||||
einfo "Installing ${base_dir}/RELEASE_LEVEL file: ${KV_FULL}"
|
||||
fi
|
||||
|
||||
|
||||
# copy firmware config file to propper location
|
||||
insinto "/etc"
|
||||
if [ -n "${K_NASKERNEL_SELF_TARBALL_NAME}" ]; then
|
||||
local base_path="${S}/sablink/config"
|
||||
if [ -f "${base_path}/${K_NASKERNEL_FW_CONFIG_FILE}" ]; then
|
||||
# PVR path (old)
|
||||
newins "${base_path}/${K_NASKERNEL_FW_CONFIG_FILE}" "fw_env.config.${K_NASKERNEL_NAME}" || die "cannot copy firmware config"
|
||||
fi
|
||||
else
|
||||
if [ "${K_NASKERNEL_URI_CONFIG}" = "no" ]; then
|
||||
newins "${DISTDIR}/${K_NASKERNEL_FW_CONFIG_FILE}" "fw_env.config.${K_NASKERNEL_NAME}" || die "cannot copy firmware config"
|
||||
fi
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
nas-kernel_pkg_preinst() {
|
||||
@ -618,7 +652,7 @@ _get_release_level() {
|
||||
elif [[ "${KV_MAJOR}${KV_MINOR}" -eq 26 ]]; then
|
||||
echo "${KV_FULL}"
|
||||
elif [[ "${OKV/.*}" = "3" ]] && [[ "${KV_PATCH}" = "0" ]]; then
|
||||
# Linux 3.x support, KV_FULL is set to: 3.0-genlink
|
||||
# Linux 3.x support, KV_FULL is set to: 3.0-sablink
|
||||
# need to add another final .0 to the version part
|
||||
echo "${KV_FULL/-/.0-}"
|
||||
else
|
||||
@ -640,14 +674,20 @@ nas-kernel_pkg_postinst() {
|
||||
_update_depmod "${depmod_r}"
|
||||
|
||||
elog "Please report kernel bugs at:"
|
||||
elog "http://bugs.genlink.org"
|
||||
elog "http://bugs.sablink.org"
|
||||
|
||||
elog "The source code of this kernel is located at"
|
||||
elog "=${K_KERNEL_SOURCES_PKG}."
|
||||
elog "Genlink Linux recommends that portage users install"
|
||||
elog "Sabayon Linux recommends that portage users install"
|
||||
elog "${K_KERNEL_SOURCES_PKG} if you want"
|
||||
elog "to build any packages that install kernel modules"
|
||||
elog "(such as sim_buffalo, etc...)."
|
||||
elog "(such as ati-drivers, nvidia-drivers, virtualbox, etc...)."
|
||||
|
||||
# copy the firmware config for the actual hardware to the right place
|
||||
device=$(grep "Hardware[[:space:]]*:" /proc/cpuinfo 2>/dev/null | head -n1 | sed "s/^[^:]*: //")
|
||||
if [ "${K_NASKERNEL_DEVICE}" = "$device" ]; then
|
||||
cp ${ROOT}/etc/fw_env.config.${K_NASKERNEL_NAME} ${ROOT}/etc/fw_env.config
|
||||
fi
|
||||
else
|
||||
kernel-2_pkg_postinst
|
||||
fi
|
||||
|
@ -1,18 +1,16 @@
|
||||
# Copyright 2004-2010 Sabayon Project
|
||||
# Copyright 2010 Genlink Project
|
||||
# Copyright 2010 Geos_One's Projekts
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $
|
||||
|
||||
# @ECLASS-VARIABLE: K_NASPATCHES_VER
|
||||
# @DESCRIPTION:
|
||||
# The version of the nas patches tarball(s) to apply.
|
||||
# The version of the genlink patches tarball(s) to apply.
|
||||
# A value of "5" would apply 2.6.12-5 to my-sources-2.6.12.ebuild
|
||||
|
||||
# @ECLASS-VARIABLE: K_NASKERNEL_NAME
|
||||
# @DESCRIPTION:
|
||||
# The kernel name used by the ebuild, it should be the ending ${PN} part
|
||||
# for example, of linux-nas it is "${PN/${PN/-*}-}" (nas)
|
||||
# for example, of linux-genlink it is "${PN/${PN/-*}-}" (genlink)
|
||||
K_NASKERNEL_NAME="${K_NASKERNEL_NAME:-${PN/${PN/-*}-}}"
|
||||
|
||||
# @ECLASS-VARIABLE: K_NASKERNEL_URI_CONFIG
|
||||
@ -22,11 +20,46 @@ K_NASKERNEL_NAME="${K_NASKERNEL_NAME:-${PN/${PN/-*}-}}"
|
||||
# leave this option set to "no", otherwise set this to "yes"
|
||||
K_NASKERNEL_URI_CONFIG="${K_NASKERNEL_URI_CONFIG:-no}"
|
||||
|
||||
# @ECLASS-VARIABLE: K_NASKERNEL_SELF_TARBALL_NAME
|
||||
# @DESCRIPTION:
|
||||
# If the main kernel sources tarball is generated in-house and available
|
||||
# on the "genlink" mirror, set this variable to the extension name (see example
|
||||
# below). This will disable ALL the extra/local patches (since they have to
|
||||
# be applied inside the tarball). Moreover, K_NASKERNEL_URI_CONFIG,
|
||||
# K_NASPATCHES_VER, K_NASKERNEL_NAME, K_KERNEL_PATCH_VER will be ignored.
|
||||
# Example:
|
||||
# K_NASKERNEL_SELF_TARBALL_NAME="genlink"
|
||||
# This would generate:
|
||||
# SRC_URI="mirror://genlink/sys-kernel/linux-${PV}+genlink.tar.bz2"
|
||||
K_NASKERNEL_SELF_TARBALL_NAME="${K_NASKERNEL_SELF_TARBALL_NAME:-}"
|
||||
|
||||
# @ECLASS-VARIABLE: K_NASKERNEL_FORCE_SUBLEVEL
|
||||
# @DESCRIPTION:
|
||||
# Force the rewrite of SUBLEVEL in kernel sources Makefile
|
||||
K_NASKERNEL_FORCE_SUBLEVEL="${K_NASKERNEL_FORCE_SUBLEVEL:-}"
|
||||
|
||||
# @ECLASS-VARIABLE: K_NASKERNEL_RESET_EXTRAVERSION
|
||||
# @DESCRIPTION:
|
||||
# Force the rewrite of EXTRAVERSION in kernel sources Makefile (setting it to "")
|
||||
K_NASKERNEL_RESET_EXTRAVERSION="${K_NASKERNEL_RESET_EXTRAVERSION:-}"
|
||||
|
||||
# @ECLASS-VARIABLE: K_NASKERNEL_LONGTERM
|
||||
# @DESCRIPTION:
|
||||
# Consider Kernel stable patchset as longterm (changing URL)
|
||||
K_NASKERNEL_LONGTERM="${K_NASKERNEL_LONGTERM:-}"
|
||||
|
||||
# @ECLASS-VARIABLE: K_KERNEL_SOURCES_PKG
|
||||
# @DESCRIPTION:
|
||||
# The kernel sources package used to build this kernel binary
|
||||
K_KERNEL_SOURCES_PKG="${K_KERNEL_SOURCES_PKG:-${CATEGORY}/${PN/*-}-sources-${PVR}}"
|
||||
|
||||
# @ECLASS-VARIABLE: K_KERNEL_PATCH_VER
|
||||
# @DESCRIPTION:
|
||||
# If set to "3" for example, it applies the upstream kernel
|
||||
# patch corresponding to patch-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}.3.bz2
|
||||
# @TODO: deprecate and remove once 2.6.x kernels are retired
|
||||
K_KERNEL_PATCH_VER="${K_KERNEL_PATCH_VER:-}"
|
||||
|
||||
# @ECLASS-VARIABLE: K_KERNEL_PATCH_HOTFIXES
|
||||
# @DESCRIPTION:
|
||||
# If there is the need to quickly apply patches to the kernel
|
||||
@ -60,6 +93,11 @@ K_FIRMWARE_PACKAGE="${K_FIRMWARE_PACKAGE:-}"
|
||||
# if your ebuild is one of them, set this to "1"
|
||||
K_ONLY_SOURCES="${K_ONLY_SOURCES:-}"
|
||||
|
||||
# @ECLASS-VARIABLE: K_REQUIRED_LINUX_FIRMWARE_VER
|
||||
# @DESCRIPTION:
|
||||
# Minimum required version of sys-kernel/linux-formware package, if any
|
||||
K_REQUIRED_LINUX_FIRMWARE_VER="${K_REQUIRED_LINUX_FIRMWARE_VER:-}"
|
||||
|
||||
# @ECLASS-VARIABLE: K_WORKAROUND_SOURCES_COLLISION
|
||||
# @DESCRIPTION:
|
||||
# For kernel binary packages, Workaround file collisions with kernel
|
||||
@ -67,31 +105,41 @@ K_ONLY_SOURCES="${K_ONLY_SOURCES:-}"
|
||||
# by linux-openvz and linux-vserver
|
||||
K_WORKAROUND_SOURCES_COLLISION="${K_WORKAROUND_SOURCES_COLLISION:-}"
|
||||
|
||||
# @ECLASS-VARIABLE: K_WORKAROUND_DIFFERENT_EXTRAVERSION
|
||||
# @ECLASS-VARIABLE: K_WORKAROUND_USE_REAL_EXTRAVERSION
|
||||
# @DESCRIPTION:
|
||||
# Some kernel sources are shipped with their own EXTRAVERSION and
|
||||
# we're kindly asked to not touch it, if this is your case, set
|
||||
# this variable in order to make linux-mod_pkg_postinst happy
|
||||
# (update_depmod) by feeding it with valid KV_FULL, that will be
|
||||
# calculated using EXTRAVERSION in Makefile.
|
||||
K_WORKAROUND_DIFFERENT_EXTRAVERSION="${K_WORKAROUND_DIFFERENT_EXTRAVERSION:-}"
|
||||
# this variable and depmod will work correctly.
|
||||
K_WORKAROUND_USE_REAL_EXTRAVERSION="${K_WORKAROUND_USE_REAL_EXTRAVERSION:-}"
|
||||
|
||||
# @ECLASS-VARIABLE: K_GENKERNEL_ARGS
|
||||
# @DESCRIPTION:
|
||||
# Provide extra genkernel arguments using K_GENKERNEL_ARGS
|
||||
K_GENKERNEL_ARGS="${K_GENKERNEL_ARGS-}"
|
||||
|
||||
KERN_INITRAMFS_SEARCH_NAME="${KERN_INITRAMFS_SEARCH_NAME:-initramfs-genkernel*${K_NASKERNEL_NAME}}"
|
||||
|
||||
# Disable deblobbing feature
|
||||
K_DEBLOB_AVAILABLE=0
|
||||
KV_PATCH=0
|
||||
|
||||
inherit eutils kernel-2 mount-boot linux-mod
|
||||
inherit eutils kernel-2 mount-boot linux-info
|
||||
|
||||
# from kernel-2 eclass
|
||||
detect_version
|
||||
detect_arch
|
||||
|
||||
DESCRIPTION="NAS Linux kernel functions and phases"
|
||||
DESCRIPTION="Genlink Linux kernel functions and phases"
|
||||
|
||||
|
||||
K_LONGTERM_URL_STR=""
|
||||
if [ -n "${K_NASKERNEL_LONGTERM}" ]; then
|
||||
K_LONGTERM_URL_STR="/longterm/v${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
|
||||
fi
|
||||
|
||||
## kernel-2 eclass settings
|
||||
if [ -n "${K_NASPATCHES_VER}" ]; then
|
||||
if [ -n "${K_NASKERNEL_SELF_TARBALL_NAME}" ]; then
|
||||
SRC_URI="mirror://genlink/${CATEGORY}/linux-${PVR}+${K_NASKERNEL_SELF_TARBALL_NAME}.tar.bz2"
|
||||
elif [ -n "${K_NASPATCHES_VER}" ]; then
|
||||
UNIPATCH_STRICTORDER="yes"
|
||||
K_NASPATCHES_PKG="nas-patches-${PV}-${K_NASPATCHES_VER}.tar.bz2"
|
||||
UNIPATCH_LIST="${DISTFILES}/${K_NASPATCHES_PKG}"
|
||||
@ -101,18 +149,53 @@ else
|
||||
SRC_URI="${KERNEL_URI}"
|
||||
fi
|
||||
|
||||
if [ -z "${K_NASKERNEL_SELF_TARBALL_NAME}" ]; then
|
||||
if [ -n "${K_KERNEL_PATCH_VER}" ]; then
|
||||
K_PATCH_NAME="patch-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}.${K_KERNEL_PATCH_VER}.bz2"
|
||||
SRC_URI="${SRC_URI}
|
||||
mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}${K_LONGTERM_URL_STR}/${K_PATCH_NAME}
|
||||
ftp://ftp.servus.at/linux-kernel/${K_PATCH_NAME}"
|
||||
UNIPATCH_LIST="${DISTDIR}/${K_PATCH_NAME}
|
||||
${UNIPATCH_LIST}"
|
||||
fi
|
||||
fi
|
||||
if [ -n "${K_KERNEL_PATCH_HOTFIXES}" ]; then
|
||||
UNIPATCH_LIST="${K_KERNEL_PATCH_HOTFIXES} ${UNIPATCH_LIST}"
|
||||
fi
|
||||
|
||||
_get_real_kv_full() {
|
||||
if [[ "${KV_MAJOR}${KV_MINOR}" -eq 26 ]]; then
|
||||
echo "${ORIGINAL_KV_FULL}"
|
||||
elif [[ "${OKV/.*}" = "3" ]]; then
|
||||
# Linux 3.x support, KV_FULL is set to: 3.0-genlink
|
||||
# need to add another final .0 to the version part
|
||||
# echo "${ORIGINAL_KV_FULL/-/.0-}"
|
||||
echo "${ORIGINAL_KV_FULL}"
|
||||
else
|
||||
echo "${ORIGINAL_KV_FULL}"
|
||||
fi
|
||||
}
|
||||
|
||||
# replace "linux" with K_NASKERNEL_NAME, usually replaces
|
||||
# "linux" with "nas" or "server" or "openvz"
|
||||
# "linux" with "genlink" or "server" or "openvz"
|
||||
KV_FULL="${KV_FULL/${PN/-*}/${K_NASKERNEL_NAME}}"
|
||||
EXTRAVERSION="${EXTRAVERSION/${PN/-*}/${K_NASKERNEL_NAME}}"
|
||||
# drop -rX if exists
|
||||
[[ -n "${PR//r0}" ]] && [[ "${K_KERNEL_DISABLE_PR_EXTRAVERSION}" = "1" ]] && \
|
||||
EXTRAVERSION="${EXTRAVERSION/-r*}" && KV_FULL="${KV_FULL/-r*}" && \
|
||||
KV="${KV/-r*}"
|
||||
if [[ -n "${PR//r0}" ]] && [[ "${K_KERNEL_DISABLE_PR_EXTRAVERSION}" = "1" ]] \
|
||||
&& [[ -z "${K_NOSETEXTRAVERSION}" ]]; then
|
||||
EXTRAVERSION="${EXTRAVERSION%-r*}"
|
||||
KV_FULL="${KV_FULL%-r*}"
|
||||
KV="${KV%-r*}"
|
||||
fi
|
||||
# rewrite it
|
||||
ORIGINAL_KV_FULL="${KV_FULL}"
|
||||
KV_FULL="$(_get_real_kv_full)"
|
||||
|
||||
# Starting from linux-3.0, we still have to install
|
||||
# sources stuff into /usr/src/linux-3.0.0-genlink (example)
|
||||
# where the last part must always match uname -r
|
||||
# otherwise kernel-switcher (and RELEASE_LEVEL file)
|
||||
# will complain badly
|
||||
KV_OUT_DIR="/usr/src/linux-${KV_FULL}"
|
||||
S="${WORKDIR}/linux-${KV_FULL}"
|
||||
|
||||
@ -125,22 +208,53 @@ else
|
||||
SLOT="${PV}"
|
||||
fi
|
||||
|
||||
_is_kernel_binary() {
|
||||
if [ -z "${K_ONLY_SOURCES}" ] && [ -z "${K_FIRMWARE_PACKAGE}" ]; then
|
||||
# yes it is
|
||||
return 0
|
||||
else
|
||||
# no it isn't
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# provide extra virtual pkg
|
||||
if [ -z "${K_FIRMWARE_PACKAGE}" ]; then
|
||||
if _is_kernel_binary; then
|
||||
PROVIDE="${PROVIDE} virtual/linux-binary"
|
||||
fi
|
||||
|
||||
HOMEPAGE="http://linamh.disconnected-by-peer.at/wiki/Genlink"
|
||||
if [ "${K_NASKERNEL_URI_CONFIG}" = "yes" ]; then
|
||||
K_NASKERNEL_CONFIG_FILE="${K_NASKERNEL_CONFIG_FILE:-${K_NASKERNEL_NAME}-${PVR}-__ARCH__.config}"
|
||||
SRC_URI="${SRC_URI}
|
||||
http://ftp.disconnected-by-peer.at/genlink/${CATEGORY}/linux-nas-patches/config/${K_NASKERNEL_CONFIG_FILE/__ARCH__/arm}"
|
||||
#arm? ( http://ftp.disconnected-by-peer.at/genlink/${CATEGORY}/linux-nas-patches/config/${K_NASKERNEL_CONFIG_FILE/__ARCH__/arm} )"
|
||||
#use arm && K_NASKERNEL_CONFIG_FILE=${K_NASKERNEL_CONFIG_FILE/__ARCH__/arm}
|
||||
K_NASKERNEL_CONFIG_FILE=${K_NASKERNEL_CONFIG_FILE/__ARCH__/arm}
|
||||
if [ -n "${K_NASKERNEL_SELF_TARBALL_NAME}" ]; then
|
||||
HOMEPAGE="http://git.disconnected-by-peer.at"
|
||||
else
|
||||
#use arm && K_NASKERNEL_CONFIG_FILE="${K_NASKERNEL_CONFIG_FILE:-${K_NASKERNEL_NAME}-${PVR}-arm.config}"
|
||||
K_NASKERNEL_CONFIG_FILE="${K_NASKERNEL_CONFIG_FILE:-${K_NASKERNEL_NAME}-${PVR}-arm.config}"
|
||||
HOMEPAGE="http://linamh.disconnected-by-peer.at/wiki/Genlink"
|
||||
|
||||
fi
|
||||
|
||||
|
||||
# Setup kernel configuration file name
|
||||
if [ -z "${K_NASKERNEL_SELF_TARBALL_NAME}" ]; then
|
||||
if [ "${K_NASKERNEL_URI_CONFIG}" = "yes" ]; then
|
||||
K_NASKERNEL_CONFIG_FILE="${K_NASKERNEL_CONFIG_FILE:-${K_NASKERNEL_NAME}-${PVR}-__ARCH__.config}"
|
||||
SRC_URI="${SRC_URI}
|
||||
arm? ( http://ftp.disconnected-by-peer.at/genlink/${CATEGORY}/linux-nas-patches/config/${K_NASKERNEL_CONFIG_FILE/__ARCH__/arm} )"
|
||||
#http://ftp.disconnected-by-peer.at/genlink/${CATEGORY}/linux-nas-patches/config/${K_NASKERNEL_CONFIG_FILE/__ARCH__/arm}"
|
||||
use arm && K_NASKERNEL_CONFIG_FILE=${K_NASKERNEL_CONFIG_FILE/__ARCH__/arm}
|
||||
#K_NASKERNEL_CONFIG_FILE=${K_NASKERNEL_CONFIG_FILE/__ARCH__/arm}
|
||||
else
|
||||
use arm && K_NASKERNEL_CONFIG_FILE="${K_NASKERNEL_CONFIG_FILE:-${K_NASKERNEL_NAME}-${PVR}-arm.config}"
|
||||
#K_NASKERNEL_CONFIG_FILE="${K_NASKERNEL_CONFIG_FILE:-${K_NASKERNEL_NAME}-${PVR}-arm.config}"
|
||||
fi
|
||||
|
||||
else
|
||||
K_NASKERNEL_CONFIG_FILE="${K_NASKERNEL_CONFIG_FILE:-${K_NASKERNEL_NAME}-${PVR}-__ARCH__.config}"
|
||||
K_NASKERNEL_ALT_CONFIG_FILE="${K_NASKERNEL_ALT_CONFIG_FILE:-${K_NASKERNEL_NAME}-${PV}-__ARCH__.config}"
|
||||
if use amd64; then
|
||||
K_NASKERNEL_CONFIG_FILE=${K_NASKERNEL_CONFIG_FILE/__ARCH__/amd64}
|
||||
K_NASKERNEL_ALT_CONFIG_FILE=${K_NASKERNEL_ALT_CONFIG_FILE/__ARCH__/amd64}
|
||||
elif use x86; then
|
||||
K_NASKERNEL_CONFIG_FILE=${K_NASKERNEL_CONFIG_FILE/__ARCH__/x86}
|
||||
K_NASKERNEL_ALT_CONFIG_FILE=${K_NASKERNEL_ALT_CONFIG_FILE/__ARCH__/x86}
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "${K_ONLY_SOURCES}" ] || [ -n "${K_FIRMWARE_PACKAGE}" ]; then
|
||||
@ -148,26 +262,79 @@ if [ -n "${K_ONLY_SOURCES}" ] || [ -n "${K_FIRMWARE_PACKAGE}" ]; then
|
||||
DEPEND="sys-apps/sed"
|
||||
RDEPEND="${RDEPEND}"
|
||||
else
|
||||
IUSE="dmraid"
|
||||
DEPEND="sys-apps/sed
|
||||
app-arch/xz-utils
|
||||
sys-kernel/genkernel
|
||||
IUSE="dmraid dracut"
|
||||
DEPEND="app-arch/xz-utils
|
||||
sys-apps/sed
|
||||
sys-devel/make
|
||||
>=sys-kernel/genkernel-3.4.16-r1
|
||||
dracut? ( sys-kernel/dracut )
|
||||
sys-block/devio
|
||||
dev-embedded/u-boot-tools"
|
||||
# rdepend app-admin/nas-eselct
|
||||
RDEPEND="sys-apps/sed
|
||||
>=sys-kernel/linux-firmwares-${PV}"
|
||||
# rdepend app-admin/nas-eselct
|
||||
# FIXME: when grub-legacy will be removed, remove sys-boot/grub-handler
|
||||
RDEPEND="
|
||||
sys-apps/sed
|
||||
sys-kernel/linux-firmware"
|
||||
if [ -n "${K_REQUIRED_LINUX_FIRMWARE_VER}" ]; then
|
||||
RDEPEND+=" >=sys-kernel/linux-firmware-${K_REQUIRED_LINUX_FIRMWARE_VER}"
|
||||
fi
|
||||
fi
|
||||
|
||||
nas-kernel_pkg_setup() {
|
||||
# do not run linux-mod-pkg_setup
|
||||
if [ -n "${K_FIRMWARE_PACKAGE}" ]; then
|
||||
einfo "Preparing to build kernel firmwares"
|
||||
# internal function
|
||||
#
|
||||
# FUNCTION: _update_depmod
|
||||
# @USAGE: _update_depmod <-r depmod>
|
||||
# DESCRIPTION:
|
||||
# It updates the modules.dep file for the current kernel.
|
||||
# This is more or less the same of linux-mod update_depmod, with the
|
||||
# exception of accepting parameter which is passed to depmod -r switch
|
||||
_update_depmod() {
|
||||
|
||||
# if we haven't determined the version yet, we need too.
|
||||
get_version;
|
||||
|
||||
ebegin "Updating module dependencies for ${KV_FULL}"
|
||||
if [ -r "${KV_OUT_DIR}"/System.map ]; then
|
||||
depmod -ae -F "${KV_OUT_DIR}"/System.map -b "${ROOT}" -r "${1}"
|
||||
eend $?
|
||||
else
|
||||
einfo "Preparing to build the kernel and its modules"
|
||||
ewarn
|
||||
ewarn "${KV_OUT_DIR}/System.map not found."
|
||||
ewarn "You must manually update the kernel module dependencies using depmod."
|
||||
eend 1
|
||||
ewarn
|
||||
fi
|
||||
}
|
||||
|
||||
nas-kernel_pkg_setup() {
|
||||
if [ -n "${K_FIRMWARE_PACKAGE}" ]; then
|
||||
einfo "Preparing kernel firmwares"
|
||||
else
|
||||
einfo "Preparing kernel and its modules"
|
||||
fi
|
||||
}
|
||||
|
||||
nas-kernel_src_unpack() {
|
||||
local okv="${OKV}"
|
||||
if [ -n "${K_NASKERNEL_SELF_TARBALL_NAME}" ]; then
|
||||
OKV="${PVR}+${K_NASKERNEL_SELF_TARBALL_NAME}"
|
||||
fi
|
||||
kernel-2_src_unpack
|
||||
if [ -n "${K_NASKERNEL_FORCE_SUBLEVEL}" ]; then
|
||||
# patch out Makefile with proper sublevel
|
||||
sed -i "s:^SUBLEVEL = .*:SUBLEVEL = ${K_NASKERNEL_FORCE_SUBLEVEL}:" \
|
||||
"${S}/Makefile" || die
|
||||
fi
|
||||
if [ -n "${K_NASKERNEL_RESET_EXTRAVERSION}" ]; then
|
||||
sed -i "s:^EXTRAVERSION =.*:EXTRAVERSION = :" "${S}/Makefile" || die
|
||||
# some sources could have multiple append-based EXTRAVERSIONs
|
||||
sed -i "s/^EXTRAVERSION :=.*//" "${S}/Makefile" || die
|
||||
fi
|
||||
# no need for the ckversion
|
||||
sed -i "s:\$(CKVERSION)::" "${S}/Makefile" || die
|
||||
OKV="${okv}"
|
||||
}
|
||||
|
||||
nas-kernel_src_compile() {
|
||||
if [ -n "${K_FIRMWARE_PACKAGE}" ]; then
|
||||
_firmwares_src_compile
|
||||
@ -191,10 +358,21 @@ _firmwares_src_compile() {
|
||||
}
|
||||
|
||||
_kernel_copy_config() {
|
||||
if [ "${K_NASKERNEL_URI_CONFIG}" = "no" ]; then
|
||||
cp "${FILESDIR}/${PF/-r0/}-${ARCH}.config" "${1}" || die "cannot copy kernel config"
|
||||
if [ -n "${K_NASKERNEL_SELF_TARBALL_NAME}" ]; then
|
||||
local base_path="${S}/genlink/config"
|
||||
if [ -f "${base_path}/${K_NASKERNEL_ALT_CONFIG_FILE}" ]; then
|
||||
# new path, without revision
|
||||
cp "${base_path}/${K_NASKERNEL_ALT_CONFIG_FILE}" "${1}" || die "cannot copy kernel config"
|
||||
else
|
||||
# PVR path (old)
|
||||
cp "${base_path}/${K_NASKERNEL_CONFIG_FILE}" "${1}" || die "cannot copy kernel config"
|
||||
fi
|
||||
else
|
||||
cp "${DISTDIR}/${K_NASKERNEL_CONFIG_FILE}" "${1}" || die "cannot copy kernel config"
|
||||
if [ "${K_NASKERNEL_URI_CONFIG}" = "no" ]; then
|
||||
cp "${FILESDIR}/${PF/-r0/}-${ARCH}.config" "${1}" || die "cannot copy kernel config"
|
||||
else
|
||||
cp "${DISTDIR}/${K_NASKERNEL_CONFIG_FILE}" "${1}" || die "cannot copy kernel config"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
@ -203,13 +381,9 @@ _kernel_src_compile() {
|
||||
export SANDBOX_ON=0
|
||||
export LDFLAGS=""
|
||||
|
||||
# do some cleanup
|
||||
rm -rf "${WORKDIR}"/lib
|
||||
rm -rf "${WORKDIR}"/cache
|
||||
rm -rf "${S}"/temp
|
||||
|
||||
# creating workdirs
|
||||
mkdir -p "${WORKDIR}"/lib/lib/firmware
|
||||
# some kernels fail with make 3.82 if firmware dir is not created
|
||||
mkdir "${WORKDIR}"/lib/lib/firmware -p
|
||||
mkdir "${WORKDIR}"/cache
|
||||
mkdir "${S}"/temp
|
||||
mkdir -p "${WORKDIR}"/boot
|
||||
@ -217,10 +391,15 @@ _kernel_src_compile() {
|
||||
einfo "Starting to compile kernel..."
|
||||
_kernel_copy_config "${WORKDIR}"/config
|
||||
|
||||
# do some cleanup
|
||||
rm -rf "${WORKDIR}"/lib
|
||||
rm -rf "${WORKDIR}"/cache
|
||||
rm -rf "${S}"/temp
|
||||
OLDARCH="${ARCH}"
|
||||
unset ARCH
|
||||
cd "${S}"
|
||||
GKARGS="--disklabel"
|
||||
cd "${S}" || die
|
||||
GKARGS="--no-save-config --disklabel"
|
||||
use dracut && GKARGS="${GKARGS} --dracut"
|
||||
use dmraid && GKARGS="${GKARGS} --dmraid"
|
||||
export DEFAULT_KERNEL_SOURCE="${S}"
|
||||
export CMD_KERNEL_DIR="${S}"
|
||||
@ -230,114 +409,93 @@ _kernel_src_compile() {
|
||||
break
|
||||
fi
|
||||
done
|
||||
[ -z "${mkopts}" ] && mkopts="-j2"
|
||||
[ -z "${mkopts}" ] && mkopts="-j3"
|
||||
|
||||
DEFAULT_KERNEL_SOURCE="${S}" CMD_KERNEL_DIR="${S}" genkernel ${GKARGS} \
|
||||
DEFAULT_KERNEL_SOURCE="${S}" CMD_KERNEL_DIR="${S}" genkernel ${GKARGS} ${K_GENKERNEL_ARGS} \
|
||||
--kerneldir="${S}" \
|
||||
--arch-override="${OLDARCH}" \
|
||||
--kernel-config="${WORKDIR}"/config \
|
||||
--cachedir="${WORKDIR}"/cache \
|
||||
--makeopts="${mkopts}" \
|
||||
--tempdir="${S}"/temp \
|
||||
--logfile="${WORKDIR}"/genkernel.log \
|
||||
--bootdir="${WORKDIR}"/boot \
|
||||
--lvm \
|
||||
--luks \
|
||||
--iscsi \
|
||||
--mountboot \
|
||||
--mdadm \
|
||||
--module-prefix="${WORKDIR}"/lib \
|
||||
all || die "genkernel failed"
|
||||
# --strip=all \
|
||||
# --lvm \
|
||||
# --luks \
|
||||
# --iscsi \
|
||||
ARCH=${OLDARCH}
|
||||
|
||||
# Buffalo anounced a new box named Pro Live (video transcode streaming)
|
||||
# so the old ls_pro_live has to be split to ls_pro ls_live
|
||||
# for now let it stay but a move schould be done to ls_pro
|
||||
if [ "${K_NASKERNEL_NAME}" = "buffalo_ls_pro_live" ]; then
|
||||
devio > foo 'wl 0xe3a01c06,4' 'wl 0xe3811031,4' # Linkstation Pro/Live (2.6.26)
|
||||
cat foo "${WORKDIR}"/boot/kernel-genkernel-${ARCH}-${KV_FULL} > zImage.new
|
||||
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n uImage-${KV_FULL} \
|
||||
-d zImage.new "${WORKDIR}"/boot/uImage-genkernel-${ARCH}-${KV_FULL}.buffalo
|
||||
rm foo zImage.new
|
||||
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initrd-${KV_FULL} \
|
||||
-d "${WORKDIR}"/boot/initramfs-genkernel-${ARCH}-${KV_FULL} "${WORKDIR}"/boot/initrd-genkernel-${ARCH}-${KV_FULL}.buffalo
|
||||
rm "${WORKDIR}"/boot/kernel-genkernel-${ARCH}-${KV_FULL} "${WORKDIR}"/boot/initramfs-genkernel-${ARCH}-${KV_FULL}
|
||||
fi
|
||||
K_NASKERNEL_TYPE="buffalo"
|
||||
fi
|
||||
if [ "${K_NASKERNEL_NAME}" = "buffalo_ls_pro" ]; then
|
||||
devio > foo 'wl 0xe3a01c06,4' 'wl 0xe3811031,4' # Linkstation Pro/Live (2.6.26)
|
||||
K_NASKERNEL_TYPE="buffalo"
|
||||
fi
|
||||
if [ "${K_NASKERNEL_NAME}" = "buffalo_ls_live" ]; then
|
||||
devio > foo 'wl 0xe3a01c06,4' 'wl 0xe3811031,4' # Linkstation Pro/Live (2.6.26)
|
||||
K_NASKERNEL_TYPE="buffalo"
|
||||
fi
|
||||
if [ "${K_NASKERNEL_NAME}" = "buffalo_ls_pro_duo" ]; then
|
||||
devio > foo 'wl 0xe3a01c07,4' 'wl 0xe3811027,4' # Linkstation Pro Duo (2.6.30)
|
||||
cat foo "${WORKDIR}"/boot/kernel-genkernel-${ARCH}-${KV_FULL} > zImage.new
|
||||
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n uImage-${KV_FULL} \
|
||||
-d zImage.new "${WORKDIR}"/boot/uImage-genkernel-${ARCH}-${KV_FULL}.buffalo
|
||||
rm foo zImage.new
|
||||
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initrd-${KV_FULL} \
|
||||
-d "${WORKDIR}"/boot/initramfs-genkernel-${ARCH}-${KV_FULL} "${WORKDIR}"/boot/initrd-genkernel-${ARCH}-${KV_FULL}.buffalo
|
||||
rm "${WORKDIR}"/boot/kernel-genkernel-${ARCH}-${KV_FULL} "${WORKDIR}"/boot/initramfs-genkernel-${ARCH}-${KV_FULL}
|
||||
K_NASKERNEL_TYPE="buffalo"
|
||||
fi
|
||||
if [ "${K_NASKERNEL_NAME}" = "buffalo_ls_xhl" ]; then
|
||||
devio > foo 'wl 0xe3a01c0a,4' 'wl 0xe3811067,4' # Linkstation XHL/CHLv2 (2.6.30)
|
||||
cat foo "${WORKDIR}"/boot/kernel-genkernel-${ARCH}-${KV_FULL} > zImage.new
|
||||
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n uImage-${KV_FULL} \
|
||||
-d zImage.new "${WORKDIR}"/boot/uImage-genkernel-${ARCH}-${KV_FULL}.buffalo
|
||||
rm foo zImage.new
|
||||
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initrd-${KV_FULL} \
|
||||
-d "${WORKDIR}"/boot/initramfs-genkernel-${ARCH}-${KV_FULL} "${WORKDIR}"/boot/initrd-genkernel-${ARCH}-${KV_FULL}.buffalo
|
||||
rm "${WORKDIR}"/boot/kernel-genkernel-${ARCH}-${KV_FULL} "${WORKDIR}"/boot/initramfs-genkernel-${ARCH}-${KV_FULL}
|
||||
fi
|
||||
K_NASKERNEL_TYPE="buffalo"
|
||||
fi
|
||||
if [ "${K_NASKERNEL_NAME}" = "buffalo_ls_chl2" ]; then
|
||||
devio > foo 'wl 0xe3a01c0a,4' 'wl 0xe3811067,4' # Linkstation XHL/CHLv2 (2.6.30)
|
||||
K_NASKERNEL_TYPE="buffalo"
|
||||
fi
|
||||
if [ "${K_NASKERNEL_NAME}" = "buffalo_ls_chl" ]; then
|
||||
devio > foo 'wl 0xe3a01c0B,4' 'wl 0xe3811061,4' # Linkstation Live V3 (2.6.34)
|
||||
cat foo "${WORKDIR}"/boot/kernel-genkernel-${ARCH}-${KV_FULL} > zImage.new
|
||||
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n uImage-${KV_FULL} \
|
||||
-d zImage.new "${WORKDIR}"/boot/uImage-genkernel-${ARCH}-${KV_FULL}.buffalo
|
||||
rm foo zImage.new
|
||||
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initrd-${KV_FULL} \
|
||||
-d "${WORKDIR}"/boot/initramfs-genkernel-${ARCH}-${KV_FULL} "${WORKDIR}"/boot/initrd-genkernel-${ARCH}-${KV_FULL}.buffalo
|
||||
rm "${WORKDIR}"/boot/kernel-genkernel-${ARCH}-${KV_FULL} "${WORKDIR}"/boot/initramfs-genkernel-${ARCH}-${KV_FULL}
|
||||
fi
|
||||
K_NASKERNEL_TYPE="buffalo"
|
||||
fi
|
||||
if [ "${K_NASKERNEL_NAME}" = "buffalo_ls_wxl" ]; then
|
||||
devio > foo 'wl 0xe3a01c0b,4' 'wl 0xe38110c4,4' # Linkstation WXL (2.6.30)
|
||||
cat foo "${WORKDIR}"/boot/kernel-genkernel-${ARCH}-${KV_FULL} > zImage.new
|
||||
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n uImage-${KV_FULL} \
|
||||
-d zImage.new "${WORKDIR}"/boot/uImage-genkernel-${ARCH}-${KV_FULL}.buffalo
|
||||
rm foo zImage.new
|
||||
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initrd-${KV_FULL} \
|
||||
-d "${WORKDIR}"/boot/initramfs-genkernel-${ARCH}-${KV_FULL} "${WORKDIR}"/boot/initrd-genkernel-${ARCH}-${KV_FULL}.buffalo
|
||||
rm "${WORKDIR}"/boot/kernel-genkernel-${ARCH}-${KV_FULL} "${WORKDIR}"/boot/initramfs-genkernel-${ARCH}-${KV_FULL}
|
||||
fi
|
||||
devio > foo 'wl 0xe3a01c0b,4' 'wl 0xe38110c4,4' # Linkstation WXL (2.6.35)
|
||||
K_NASKERNEL_TYPE="buffalo"
|
||||
fi
|
||||
if [ "${K_NASKERNEL_NAME}" = "buffalo_ls_hgl" ]; then
|
||||
devio > foo 'wl 0xe3a01c07,4' 'wl 0xe38110d5,4' # Linkstation HGL (2.6.30)
|
||||
cat foo "${WORKDIR}"/boot/kernel-genkernel-${ARCH}-${KV_FULL} > zImage.new
|
||||
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n uImage-${KV_FULL} \
|
||||
-d zImage.new "${WORKDIR}"/boot/uImage-genkernel-${ARCH}-${KV_FULL}.buffalo
|
||||
rm foo zImage.new
|
||||
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initrd-${KV_FULL} \
|
||||
-d "${WORKDIR}"/boot/initramfs-genkernel-${ARCH}-${KV_FULL} "${WORKDIR}"/boot/initrd-genkernel-${ARCH}-${KV_FULL}.buffalo
|
||||
rm "${WORKDIR}"/boot/kernel-genkernel-${ARCH}-${KV_FULL} "${WORKDIR}"/boot/initramfs-genkernel-${ARCH}-${KV_FULL}
|
||||
fi
|
||||
devio > foo 'wl 0xe3a01c07,4' 'wl 0xe38110d5,4' # Linkstation HGL (2.6.31)
|
||||
K_NASKERNEL_TYPE="buffalo"
|
||||
fi
|
||||
if [ "${K_NASKERNEL_NAME}" = "buffalo_ls_mini" ]; then
|
||||
devio > foo 'wl 0xe3a01c07,4' 'wl 0xe3811042,4' # Linkstation mini (2.6.30)
|
||||
cat foo "${WORKDIR}"/boot/kernel-genkernel-${ARCH}-${KV_FULL} > zImage.new
|
||||
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n uImage-${KV_FULL} \
|
||||
-d zImage.new "${WORKDIR}"/boot/uImage-genkernel-${ARCH}-${KV_FULL}.buffalo
|
||||
rm foo zImage.new
|
||||
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initrd-${KV_FULL} \
|
||||
-d "${WORKDIR}"/boot/initramfs-genkernel-${ARCH}-${KV_FULL} "${WORKDIR}"/boot/initrd-genkernel-${ARCH}-${KV_FULL}.buffalo
|
||||
rm "${WORKDIR}"/boot/kernel-genkernel-${ARCH}-${KV_FULL} "${WORKDIR}"/boot/initramfs-genkernel-${ARCH}-${KV_FULL}
|
||||
fi
|
||||
devio > foo 'wl 0xe3a01c07,4' 'wl 0xe3811042,4' # Linkstation mini (2.6.29)
|
||||
K_NASKERNEL_TYPE="buffalo"
|
||||
fi
|
||||
if [ "${K_NASKERNEL_NAME}" = "buffalo_ls_vl" ]; then
|
||||
devio > foo 'wl 0xe3a01c0d,4' 'wl 0xe381100a,4' # Linkstation vl (2.6.30)
|
||||
devio > foo 'wl 0xe3a01c0d,4' 'wl 0xe381100a,4' # Linkstation vl (2.6.35)
|
||||
K_NASKERNEL_TYPE="buffalo"
|
||||
fi
|
||||
|
||||
# Buffalo Boxes have a special naming and start address
|
||||
if [ "${K_NASKERNEL_TYPE}" = "buffalo" ]; then
|
||||
cat foo "${WORKDIR}"/boot/kernel-genkernel-${ARCH}-${KV_FULL} > zImage.new
|
||||
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n uImage-${KV_FULL} \
|
||||
-d zImage.new "${WORKDIR}"/boot/uImage-genkernel-${ARCH}-${KV_FULL}.buffalo
|
||||
rm foo zImage.new
|
||||
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initrd-${KV_FULL} \
|
||||
-d "${WORKDIR}"/boot/initramfs-genkernel-${ARCH}-${KV_FULL} "${WORKDIR}"/boot/initrd-genkernel-${ARCH}-${KV_FULL}.buffalo
|
||||
rm "${WORKDIR}"/boot/kernel-genkernel-${ARCH}-${KV_FULL} "${WORKDIR}"/boot/initramfs-genkernel-${ARCH}-${KV_FULL}
|
||||
fi
|
||||
-d zImage.new "${WORKDIR}"/boot/uImage-genkernel-${ARCH}-${KV_FULL}.buffalo
|
||||
mkimage -A arm -O linux -T ramdisk -C none -a 0x00000000 -e 0x00000000 -n initrd-${KV_FULL} \
|
||||
-d "${WORKDIR}"/boot/initramfs-genkernel-${ARCH}-${KV_FULL} "${WORKDIR}"/boot/initrd-genkernel-${ARCH}-${KV_FULL}.buffalo
|
||||
fi
|
||||
|
||||
# cleanup
|
||||
rm foo zImage.new
|
||||
rm "${WORKDIR}"/boot/kernel-genkernel-${ARCH}-${KV_FULL} "${WORKDIR}"/boot/initramfs-genkernel-${ARCH}-${KV_FULL}
|
||||
}
|
||||
|
||||
nas-kernel_src_install() {
|
||||
if [ -n "${K_FIRMWARE_PACKAGE}" ]; then
|
||||
_firmwares_src_install
|
||||
elif [ -n "${K_ONLY_SOURCES}" ]; then
|
||||
if [ -n "${K_FIRMWARE_PACKAGE}" ]; then
|
||||
_firmwares_src_install
|
||||
elif [ -n "${K_ONLY_SOURCES}" ]; then
|
||||
_kernel_sources_src_install
|
||||
else
|
||||
else
|
||||
_kernel_src_install
|
||||
fi
|
||||
}
|
||||
@ -345,11 +503,12 @@ nas-kernel_src_install() {
|
||||
_firmwares_src_install() {
|
||||
dodir /lib/firmware
|
||||
keepdir /lib/firmware
|
||||
( cd "${S}" && emake INSTALL_FW_PATH="${D}/lib/firmware" firmware_install ) || die "cannot install firmwares"
|
||||
cd "${S}" || die
|
||||
emake INSTALL_FW_PATH="${D}/lib/firmware" firmware_install || die "cannot install firmwares"
|
||||
}
|
||||
|
||||
_kernel_sources_src_install() {
|
||||
local version_h_name="usr/src/linux-${KV_FULL}/include/linux"
|
||||
local version_h_name="${KV_OUT_DIR/\//}/include/linux"
|
||||
local version_h="${ROOT}${version_h_name}"
|
||||
if [ -f "${version_h}" ]; then
|
||||
einfo "Discarding previously installed version.h to avoid collisions"
|
||||
@ -357,10 +516,10 @@ _kernel_sources_src_install() {
|
||||
rm -f "${version_h}"
|
||||
fi
|
||||
|
||||
_kernel_copy_config ".config"
|
||||
kernel-2_src_install
|
||||
cd "${D}/usr/src/linux-${KV_FULL}"
|
||||
cd "${D}${KV_OUT_DIR}" || die
|
||||
local oldarch="${ARCH}"
|
||||
cp "${DISTDIR}/${K_NASKERNEL_CONFIG_FILE}" .config || die "cannot copy kernel config"
|
||||
unset ARCH
|
||||
if ! use sources_standalone; then
|
||||
make modules_prepare || die "failed to run modules_prepare"
|
||||
@ -375,11 +534,7 @@ _kernel_src_install() {
|
||||
dodir "${KV_OUT_DIR}"
|
||||
insinto "${KV_OUT_DIR}"
|
||||
|
||||
if [ "${K_NASKERNEL_URI_CONFIG}" = "no" ]; then
|
||||
cp "${FILESDIR}/${PF/-r0/}-${OLDARCH}.config" .config || die "cannot copy kernel config"
|
||||
else
|
||||
cp "${DISTDIR}/${K_NASKERNEL_CONFIG_FILE}" .config || die "cannot copy kernel config"
|
||||
fi
|
||||
_kernel_copy_config ".config"
|
||||
doins ".config" || die "cannot copy kernel config"
|
||||
doins Makefile || die "cannot copy Makefile"
|
||||
doins Module.symvers || die "cannot copy Module.symvers"
|
||||
@ -387,12 +542,12 @@ _kernel_src_install() {
|
||||
|
||||
# NOTE: this is a workaround caused by linux-info.eclass not
|
||||
# being ported to EAPI=2 yet
|
||||
local version_h_name="usr/src/linux-${KV_FULL}/include/linux"
|
||||
local version_h="${ROOT}${version_h_name}/version.h"
|
||||
local version_h_name="${KV_OUT_DIR/\//}/include/linux"
|
||||
local version_h="${ROOT}${version_h_name}/version.h"
|
||||
if [ -f "${version_h}" ]; then
|
||||
einfo "Discarding previously installed version.h to avoid collisions"
|
||||
addwrite "${version_h}"
|
||||
rm -f "${version_h}"
|
||||
einfo "Discarding previously installed version.h to avoid collisions"
|
||||
addwrite "${version_h}"
|
||||
rm -f "${version_h}"
|
||||
fi
|
||||
|
||||
# Include include/linux/version.h to make Portage happy
|
||||
@ -414,7 +569,7 @@ _kernel_src_install() {
|
||||
# create sane symlinks
|
||||
ln -sf "../../..${KV_OUT_DIR}" source || die "cannot create source symlink"
|
||||
ln -sf "../../..${KV_OUT_DIR}" build || die "cannot create build symlink"
|
||||
cd "${S}"
|
||||
cd "${S}" || die
|
||||
|
||||
# drop ${D}/lib/firmware, virtual/linux-firmwares provides it
|
||||
rm -rf "${D}/lib/firmware"
|
||||
@ -423,7 +578,7 @@ _kernel_src_install() {
|
||||
# Fixing up Makefile collision if already installed by
|
||||
# openvz-sources
|
||||
einfo "Workarounding source package collisions"
|
||||
make_file="usr/src/linux-${KV_FULL}/Makefile"
|
||||
make_file="${KV_OUT_DIR/\//}/Makefile"
|
||||
einfo "Makefile: ${make_file}"
|
||||
if [ -f "${ROOT}/${make_file}" ]; then
|
||||
elog "Removing ${D}/${make_file}"
|
||||
@ -431,25 +586,48 @@ _kernel_src_install() {
|
||||
fi
|
||||
fi
|
||||
|
||||
# Install kernel configuration information
|
||||
# useful for Entropy kernel-switcher
|
||||
if _is_kernel_binary; then
|
||||
# release level is enough for now
|
||||
base_dir="/etc/kernels/${P}"
|
||||
dodir "${base_dir}"
|
||||
insinto "${base_dir}"
|
||||
echo "${KV_FULL}" > "RELEASE_LEVEL"
|
||||
doins "RELEASE_LEVEL"
|
||||
einfo "Installing ${base_dir}/RELEASE_LEVEL file: ${KV_FULL}"
|
||||
fi
|
||||
}
|
||||
|
||||
nas-kernel_pkg_preinst() {
|
||||
if _is_kernel_binary; then
|
||||
mount-boot_pkg_preinst
|
||||
fi
|
||||
}
|
||||
|
||||
_get_real_extraversion() {
|
||||
make_file="${ROOT}${KV_OUT_DIR}/Makefile"
|
||||
local extraver=$(grep -r "^EXTRAVERSION" "${make_file}" | cut -d "=" -f 2)
|
||||
local extraver=$(grep -r "^EXTRAVERSION =" "${make_file}" | cut -d "=" -f 2 | head -n 1)
|
||||
local trimmed=${extraver%% }
|
||||
echo ${trimmed## }
|
||||
}
|
||||
|
||||
nas-kernel_pkg_preinst() {
|
||||
if [ -z "${K_ONLY_SOURCES}" ] && [ -z "${K_FIRMWARE_PACKAGE}" ]; then
|
||||
mount-boot_pkg_preinst
|
||||
linux-mod_pkg_preinst
|
||||
UPDATE_MODULEDB=false
|
||||
_get_release_level() {
|
||||
if [[ -n "${K_WORKAROUND_USE_REAL_EXTRAVERSION}" ]]; then
|
||||
echo "${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}$(_get_real_extraversion)"
|
||||
elif [[ "${KV_MAJOR}${KV_MINOR}" -eq 26 ]]; then
|
||||
echo "${KV_FULL}"
|
||||
elif [[ "${OKV/.*}" = "3" ]] && [[ "${KV_PATCH}" = "0" ]]; then
|
||||
# Linux 3.x support, KV_FULL is set to: 3.0-genlink
|
||||
# need to add another final .0 to the version part
|
||||
echo "${KV_FULL/-/.0-}"
|
||||
else
|
||||
echo "${KV_FULL}"
|
||||
fi
|
||||
}
|
||||
|
||||
nas-kernel_pkg_postinst() {
|
||||
if [ -z "${K_ONLY_SOURCES}" ] && [ -z "${K_FIRMWARE_PACKAGE}" ]; then
|
||||
if _is_kernel_binary; then
|
||||
fstab_file="${ROOT}etc/fstab"
|
||||
einfo "Removing extents option for ext4 drives from ${fstab_file}"
|
||||
# Remove "extents" from /etc/fstab
|
||||
@ -458,19 +636,11 @@ nas-kernel_pkg_postinst() {
|
||||
fi
|
||||
|
||||
kernel-2_pkg_postinst
|
||||
if [ -n "${K_WORKAROUND_DIFFERENT_EXTRAVERSION}" ]; then
|
||||
UPDATE_DEPMOD="false"
|
||||
local depmod_r="${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}$(_get_real_extraversion)"
|
||||
einfo "Updating (overridden) modules dependencies using ${depmod_r}"
|
||||
[[ -r "${KV_OUT_DIR}"/System.map ]] && \
|
||||
depmod -ae -F "${KV_OUT_DIR}"/System.map -b "${ROOT}" \
|
||||
-r "${depmod_r}"
|
||||
fi
|
||||
linux-mod_pkg_postinst
|
||||
local depmod_r=$(_get_release_level)
|
||||
_update_depmod "${depmod_r}"
|
||||
|
||||
elog "Please report kernel bugs at:"
|
||||
elog "http://linamh.disconnected-by-peer.at/report"
|
||||
elog "using the Ticket Component \"Genlink\""
|
||||
elog "http://bugs.genlink.org"
|
||||
|
||||
elog "The source code of this kernel is located at"
|
||||
elog "=${K_KERNEL_SOURCES_PKG}."
|
||||
@ -484,17 +654,17 @@ nas-kernel_pkg_postinst() {
|
||||
}
|
||||
|
||||
nas-kernel_pkg_prerm() {
|
||||
if [ -z "${K_ONLY_SOURCES}" ] && [ -z "${K_FIRMWARE_PACKAGE}" ]; then
|
||||
if _is_kernel_binary; then
|
||||
mount-boot_pkg_prerm
|
||||
fi
|
||||
}
|
||||
|
||||
nas-kernel_pkg_postrm() {
|
||||
if [ -z "${K_ONLY_SOURCES}" ] && [ -z "${K_FIRMWARE_PACKAGE}" ]; then
|
||||
linux-mod_pkg_postrm
|
||||
if _is_kernel_binary; then
|
||||
mount-boot_pkg_postrm
|
||||
fi
|
||||
}
|
||||
|
||||
# export all the available functions here
|
||||
EXPORT_FUNCTIONS pkg_setup src_compile src_install pkg_preinst pkg_postinst pkg_prerm pkg_postrm
|
||||
EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_install pkg_preinst pkg_postinst pkg_prerm pkg_postrm
|
||||
|
||||
|
1
profiles/thirdpartymirrors
Normal file
1
profiles/thirdpartymirrors
Normal file
@ -0,0 +1 @@
|
||||
sablink http://ftp.disconnected-by-peer.at/genlink/
|
@ -1 +1,3 @@
|
||||
move sys-apps/micro_evtd sys-apps/micro-evtd
|
||||
move sys-kernel/buffalo_ls_pro_live-sources sys-kernel/buffalo_ls_pro-sources
|
||||
move sys-kernel/linux-buffalo_ls_pro_live sys-kernel/linux-buffalo_ls_pro
|
||||
|
Loading…
Reference in New Issue
Block a user