summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2017-04-28 22:30:14 +0200
committerKarel Kočí <cynerd@email.cz>2017-04-29 11:09:39 +0200
commitff32725fff6b3bd40a87f0b21152764084f9d33a (patch)
tree8d118a03310cbc96dd98ddea1f2108f826ff1e6a
parent13f491a430735286fecb767ca0abe5d1ab42c046 (diff)
downloadgentoo-personal-overlay-ff32725fff6b3bd40a87f0b21152764084f9d33a.tar.gz
gentoo-personal-overlay-ff32725fff6b3bd40a87f0b21152764084f9d33a.tar.bz2
gentoo-personal-overlay-ff32725fff6b3bd40a87f0b21152764084f9d33a.zip
Add package for linux
-rw-r--r--profiles/base/amd64/package.use1
-rw-r--r--profiles/base/amd64/packages1
-rw-r--r--profiles/cynerd-laptop/package.use2
-rw-r--r--profiles/desktop/package.use2
-rw-r--r--profiles/qemu/package.use1
-rw-r--r--profiles/use.desc7
-rw-r--r--sys-boot/linux/Manifest1
-rwxr-xr-xsys-boot/linux/files/config_miss.sh57
-rwxr-xr-xsys-boot/linux/files/config_prepare.sh52
-rw-r--r--sys-boot/linux/files/configs/base36
-rw-r--r--sys-boot/linux/files/configs/bbb0
-rw-r--r--sys-boot/linux/files/configs/bluetooth11
-rw-r--r--sys-boot/linux/files/configs/bumblebee0
-rw-r--r--sys-boot/linux/files/configs/desktop43
-rw-r--r--sys-boot/linux/files/configs/gentoo16
-rw-r--r--sys-boot/linux/files/configs/ikconfig3
-rw-r--r--sys-boot/linux/files/configs/kvm15
-rw-r--r--sys-boot/linux/files/configs/network58
-rw-r--r--sys-boot/linux/files/configs/power18
-rw-r--r--sys-boot/linux/files/configs/sd_storage20
-rw-r--r--sys-boot/linux/files/configs/x86_6495
-rw-r--r--sys-boot/linux/linux-4.10.13.ebuild71
22 files changed, 510 insertions, 0 deletions
diff --git a/profiles/base/amd64/package.use b/profiles/base/amd64/package.use
new file mode 100644
index 0000000..355dedf
--- /dev/null
+++ b/profiles/base/amd64/package.use
@@ -0,0 +1 @@
+sys-boot/linux ikconfig network
diff --git a/profiles/base/amd64/packages b/profiles/base/amd64/packages
index ec7f01b..f1b8976 100644
--- a/profiles/base/amd64/packages
+++ b/profiles/base/amd64/packages
@@ -8,3 +8,4 @@ sys-apps/smartmontools
sys-boot/efibootmgr
sys-boot/syslinux
sys-boot/myinitramfs
+sys-boot/linux
diff --git a/profiles/cynerd-laptop/package.use b/profiles/cynerd-laptop/package.use
index b644259..fb56e6a 100644
--- a/profiles/cynerd-laptop/package.use
+++ b/profiles/cynerd-laptop/package.use
@@ -1,3 +1,5 @@
+sys-boot/linux bluetooth power sd_storage
+
# Required by chromium
dev-libs/libxml2 icu
diff --git a/profiles/desktop/package.use b/profiles/desktop/package.use
index c06a182..55b263e 100644
--- a/profiles/desktop/package.use
+++ b/profiles/desktop/package.use
@@ -1,3 +1,5 @@
+sys-boot/linux desktop
+
# XCB keyboard extension for libxcb
x11-libs/libxcb xkb
diff --git a/profiles/qemu/package.use b/profiles/qemu/package.use
index ed48adc..a1e53f5 100644
--- a/profiles/qemu/package.use
+++ b/profiles/qemu/package.use
@@ -1 +1,2 @@
+sys-boot/linux kvm
app-emulation/qemu usb vhost-net virgl vte xattr fdt aio spice
diff --git a/profiles/use.desc b/profiles/use.desc
new file mode 100644
index 0000000..34fc73b
--- /dev/null
+++ b/profiles/use.desc
@@ -0,0 +1,7 @@
+bluetooth - Bluetooth support
+desktop - Audio and video support
+ikconfig - Built in config
+kvm - Virtualization
+network - Network support
+power - Power management
+sd_storage - SD storage
diff --git a/sys-boot/linux/Manifest b/sys-boot/linux/Manifest
new file mode 100644
index 0000000..1b50777
--- /dev/null
+++ b/sys-boot/linux/Manifest
@@ -0,0 +1 @@
+DIST linux-4.10.13.tar.gz 145392303 SHA256 ecfa6422a7f0f8370f23e24cccba225b25e2d41c40a2245116ca341878d20ce1 SHA512 081854a8121f03d07f8989e87f072a3a9c9a4b626afe4c9d8c4369aac83ae7958c6640e0b1681b1b6e3a21de09d4a813b7dd9672192b9100fb6b9fb6094efdca WHIRLPOOL 6c9ffefc7ad6c28806a5e804acaad3ee1a3e5485fc99a81a103d9732e647f1f034b70e16da2eb33f8fdf210e8f35e6ebb319d6b738252ed45c93ee201e634d44
diff --git a/sys-boot/linux/files/config_miss.sh b/sys-boot/linux/files/config_miss.sh
new file mode 100755
index 0000000..c6aec49
--- /dev/null
+++ b/sys-boot/linux/files/config_miss.sh
@@ -0,0 +1,57 @@
+#!/bin/sh
+set -e
+
+CNF="$(dirname $0)/configs"
+
+CONFS="base gentoo"
+
+while [ $# -gt 0 ]; do
+ case "$1" in
+ --help|-h)
+ echo "Usage: $0 [OPTION]... CONFIG..."
+ echo "Combine configurations and esure that we have corrent ones."
+ echo
+ echo "Options:"
+ echo " --repeat, -r NUMBER"
+ echo " Number of repeats before we bail out on configuration."
+ exit
+ ;;
+ --repeat|-r)
+ shift
+ REPEAT="$1"
+ ;;
+ -*)
+ echo "Warning: ignoring uknown option: $1" >&2
+ ;;
+ *)
+ if [ -f "$CNF/$1" ]; then
+ CONFS="$CONFS $1"
+ else
+ echo "Warning: ignoring requested missing configuration: $1" >&2
+ fi
+ ;;
+ esac
+ shift
+done
+
+if [ "$ARCH" = "x86_64" ] || [ "$(uname -m)" = "x84_64" ]; then
+ CONFS="$CONFS x86_64"
+fi
+
+for C in $CONFS; do
+ while read L; do
+ echo "$L" | grep -qE "^[[:space:]]*$" && continue # ignore empty lines
+ echo "$L" | grep -qE "#.*" && continue # Ignore comments
+ OPTION="$(echo "$L" | grep -oE '^CONFIG_.*=')"
+ VALUE="$(echo "$L" | grep -oE '=.*$')"
+ if [ "$VALUE" = "=n" ]; then
+ if grep -qE "^$OPTION=y" .config; then
+ echo -e "\e[1;31mY:\e[0m$L"
+ fi
+ else
+ if ! grep -qE "^$L$" .config; then
+ echo -e "\e[1;31mN:\e[0m$L"
+ fi
+ fi
+ done < "$CNF/$C"
+done
diff --git a/sys-boot/linux/files/config_prepare.sh b/sys-boot/linux/files/config_prepare.sh
new file mode 100755
index 0000000..729e53c
--- /dev/null
+++ b/sys-boot/linux/files/config_prepare.sh
@@ -0,0 +1,52 @@
+#!/bin/sh
+set -e
+
+CNF="$(dirname $0)/configs"
+
+CONFS="base gentoo"
+
+while [ $# -gt 0 ]; do
+ case "$1" in
+ --help|-h)
+ echo "Usage: $0 [OPTION]... CONFIG..."
+ echo "Combine configurations and esure that we have corrent ones."
+ exit
+ ;;
+ --repeat|-r)
+ shift
+ REPEAT="$1"
+ ;;
+ -*)
+ echo "Warning: ignoring uknown option: $1" >&2
+ ;;
+ *)
+ if [ -f "$CNF/$1" ]; then
+ CONFS="$CONFS $1"
+ else
+ echo "Warning: ignoring requested missing configuration: $1" >&2
+ fi
+ ;;
+ esac
+ shift
+done
+
+if [ -z "$ARCH" ]; then
+ CONFS="$CONFS $(uname -m)"
+elif [ "$ARCH" = "x86_64" ]; then
+ CONFS="$CONFS x86_64"
+fi
+
+for C in $CONFS; do
+ while read L; do
+ echo "$L" | grep -qE "^[[:space:]]*$" && continue # ignore empty lines
+ echo "$L" | grep -qE "#.*" && continue # Ignore comments
+ # Remove lines with changed settings
+ OPTION="$(echo "$L" | grep -oE '^CONFIG_.*=')"
+ sed -i "#^$OPTION#d" .config
+ # Put config
+ echo "$L" >> .config
+ done < "$CNF/$C"
+done
+# Append small version
+#sed -i "#^CONFIG_LOCALVERSION=#g" .config
+#echo "CONFIG_LOCALVERSION=\".$VERSION\"" >> .config
diff --git a/sys-boot/linux/files/configs/base b/sys-boot/linux/files/configs/base
new file mode 100644
index 0000000..092fb87
--- /dev/null
+++ b/sys-boot/linux/files/configs/base
@@ -0,0 +1,36 @@
+# No logo
+CONFIG_LOGO=n
+
+# Enable expert options
+CONFIG_EXPERT=y
+
+# Increase kernel buffer size to content more info
+CONFIG_LOG_BUF_SHIFT=19
+
+# Enable incompatible v3 process information file format
+CONFIG_BSD_PROCESS_ACCT_V3=y
+
+# Enable stack protector
+CONFIG_CC_STACKPROTECTOR_REGULAR=y
+
+# File systems
+CONFIG_BTRFS_FS=y
+CONFIG_F2FS_FS=y
+
+# Compression
+CONFIG_CRYPTO_LZO=y
+
+# FUSE
+CONFIG_FUSE_FS=m
+# Overlay fs
+CONFIG_OVERLAY_FS=m
+# NTFS
+CONFIG_NTFS_FS=m
+CONFIG_NTFS_RW=y
+# User-space driven configuration fs
+CONFIG_CONFIGFS_FS=y
+# FS language support
+CONFIG_NLS_CODEPAGE_852=m
+CONFIG_NLS_CODEPAGE_850=m
+CONFIG_NLS_CODEPAGE_1250=m
+CONFIG_NLS_ISO8859_2=m
diff --git a/sys-boot/linux/files/configs/bbb b/sys-boot/linux/files/configs/bbb
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/sys-boot/linux/files/configs/bbb
diff --git a/sys-boot/linux/files/configs/bluetooth b/sys-boot/linux/files/configs/bluetooth
new file mode 100644
index 0000000..f4f4c1c
--- /dev/null
+++ b/sys-boot/linux/files/configs/bluetooth
@@ -0,0 +1,11 @@
+# Enable bluetooth
+CONFIG_BT=m
+CONFIG_BT_RFCOMM=m
+CONFIG_BT_HIDP=m
+CONFIG_BT_LEDS=y
+
+# Drivers
+CONFIG_BT_HCIBTUSB=m
+CONFIG_BT_HCIUART=m
+# Broadcom
+CONFIG_BT_HCIUART_BCM=y
diff --git a/sys-boot/linux/files/configs/bumblebee b/sys-boot/linux/files/configs/bumblebee
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/sys-boot/linux/files/configs/bumblebee
diff --git a/sys-boot/linux/files/configs/desktop b/sys-boot/linux/files/configs/desktop
new file mode 100644
index 0000000..fb749e7
--- /dev/null
+++ b/sys-boot/linux/files/configs/desktop
@@ -0,0 +1,43 @@
+# Preemptive planning
+CONFIG_PREEMPT=y
+CONFIG_PREEMPT_COLUNTARY=n
+CONFIG_PREEMPT_NONE=n
+
+# Input
+CONFIG_INPUT_EVDEV=y
+CONFIG_MOUSE_SYNAPTICS_I2C=m
+CONFIG_MOUSE_SYNAPTICS_USB=m
+CONFIG_INPUT_JOYDEV=m
+CONFIG_INPUT_UINPUT=m
+
+# HID battery reporting
+CONFIG_HID_BATTERY_STRENGTH=y
+
+# Graphic (just intel for now)
+CONFIG_DRM_I915=y
+
+# Multimedia (camera and such)
+CONFIG_MEDIA_SUPPORT=m
+CONFIG_MEDIA_CAMERA_SUPPORT=y
+CONFIG_MEDIA_CAMERA_SUPPORT=y
+CONFIG_MEDIA_PCI_SUPPORT=y
+CONFIG_MEDIA_USB_SUPPORT=y
+CONFIG_USB_VIDEO_CLASS=m
+CONFIG_MEDIA_CEC_SUPPORT=y
+CONFIG_MEDIA_CONTROLLER=y
+
+# VFIO non-privileged user space drivers
+CONFIG_VFIO=m
+CONFIG_VFIO_PCI=m
+CONFIG_VFIO_PCI_VGA=y
+CONFIG_VFIO_MDEV=m
+CONFIG_VFIO_MDEV_DEVICE=m
+
+# LCD control
+CONFIG_LCD_CLASS_DEVICE=m
+CONFIG_LCD_PLATFORM=m
+
+# Faster bootup using async. SCSI probe
+CONFIG_SCSI_SCAN_ASYNC=y
+# AHCI SATA platform support
+CONFIG_SATA_AHCI_PLATFORM=y
diff --git a/sys-boot/linux/files/configs/gentoo b/sys-boot/linux/files/configs/gentoo
new file mode 100644
index 0000000..cd5ba5e
--- /dev/null
+++ b/sys-boot/linux/files/configs/gentoo
@@ -0,0 +1,16 @@
+# Udev
+CONFIG_DEVTMPFS=y
+CONFIG_TMPFS=y
+CONFIG_UNIX=y
+CONFIG_MMU=y
+CONFIG_SHMEM=y
+
+# Portage
+CONFIG_CGROUPS=y
+CONFIG_NAMESPACES=y
+CONFIG_IPC_NS=y
+CONFIG_NET_NS=y
+CONFIG_SYSVIPC=y
+
+# OpenRC
+CONFIG_BINFMT_SCRIPT=y
diff --git a/sys-boot/linux/files/configs/ikconfig b/sys-boot/linux/files/configs/ikconfig
new file mode 100644
index 0000000..fdd0bd9
--- /dev/null
+++ b/sys-boot/linux/files/configs/ikconfig
@@ -0,0 +1,3 @@
+# Build configuration into the kernel
+CONFIG_IKCONFIG=m
+CONFIG_IKCONFIG_PROC=y
diff --git a/sys-boot/linux/files/configs/kvm b/sys-boot/linux/files/configs/kvm
new file mode 100644
index 0000000..4158e3b
--- /dev/null
+++ b/sys-boot/linux/files/configs/kvm
@@ -0,0 +1,15 @@
+# Kernel based virtual machine
+CONFIG_KVM=y
+CONFIG_KVM_INTEL=m
+CONFIG_KVM_AMD=m
+
+# Accelerator for virtio net
+CONFIG_VHOST_NET=m
+CONFIG_VHOST_VSOCK=m
+
+# VIRT drivers
+CONFIG_VIRT_DRIVERS=y
+CONFIG_VIRTIO_PCI=m
+CONFIG_VIRTIO_BALLOON=m
+CONFIG_VIRTIO_INPUT=m
+CONFIG_VIRTIO_MMIO=m
diff --git a/sys-boot/linux/files/configs/network b/sys-boot/linux/files/configs/network
new file mode 100644
index 0000000..1f82bb5
--- /dev/null
+++ b/sys-boot/linux/files/configs/network
@@ -0,0 +1,58 @@
+# Monitoring like ss
+CONFIG_INET_DIAG=m
+CONFIG_INET_UDP_DIAG=m
+CONFIG_INET_RAW_DIAG=m
+
+# Router
+CONFIG_IP_MULTICAST=y
+CONFIG_IP_ADVANCED_ROUTER=y
+CONFIG_IP_MULTIPLE_TABLES=y
+CONFIG_NETFILTER_XT_TARGET_NETMAP=m
+CONFIG_NETFILTER_XT_TARGET_REDIRECT=m
+
+# Netfilter
+CONFIG_NETFILTER_ADVANCED=y
+CONFIG_IP_NF_TARGET_REDIRECT=m
+CONFIG_IP_SET=m
+CONFIG_NETFILTER_NETLINK_QUEUE=m
+CONFIG_NETFILTER_NETLINK_ACCT=m
+CONFIG_NF_CONNTRACK_TFTP=m
+CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
+
+# IPsec
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
+# Netlink
+CONFIG_NETLINK_DIAG=m
+# Virtual sockets
+CONFIG_VSOCKETS=m
+# Virtual server network support
+CONFIG_IP_VS=m
+# Ethernet bridge filtering/NAT/routing
+CONFIG_BRIDGE_NF_EBTABLES=m
+
+# Bridge
+CONFIG_BRIDGE=y
+
+# ARP filter
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
+
+# TUN/TAP
+CONFIG_TUN=y
+# Virtual ethernet
+CONFIG_VETH=m
+
+# PPP
+CONFIG_PPP=m
+CONFIG_PPP_FILTER=y
+CONFIG_PPP_ASYNC=m
+CONFIG_PPP_SYNC_TTY=m
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPPOE=m
+
+
+# QoS
+CONFIG_NET_SCH_INGRESS=m
+CONFIG_NET_SCHED=y
diff --git a/sys-boot/linux/files/configs/power b/sys-boot/linux/files/configs/power
new file mode 100644
index 0000000..90be110
--- /dev/null
+++ b/sys-boot/linux/files/configs/power
@@ -0,0 +1,18 @@
+# ACPI
+CONFIG_ACPI=y
+
+# Set CPU freq. governor to ondemand
+CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
+# Enable powersave governor
+CONFIG_CPU_FREQ_GOV_POWERSAVE=y
+
+# Control wakeup sources from user space
+CONFIG_PM_WAKELOCKS=y
+
+# Intel idle
+CONFIG_INTEL_IDLE=y
+# FS detected PCI slots
+CONFIG_ACPI_PCI_SLOT=y
+
+# ACPI 4.0
+CONFIG_SENSORS_ACPI_POWER=m
diff --git a/sys-boot/linux/files/configs/sd_storage b/sys-boot/linux/files/configs/sd_storage
new file mode 100644
index 0000000..fb4ddfa
--- /dev/null
+++ b/sys-boot/linux/files/configs/sd_storage
@@ -0,0 +1,20 @@
+# SD card storage
+CONFIG_MMC=m
+CONFIG_MEMSTICK=m
+
+# Realtek driver
+CONFIG_MFD_RTSX_PCI=m
+CONFIG_MFD_RTSX_USB=m
+
+CONFIG_MMC_REALTEK_PCI=m
+CONFIG_MMC_REALTEK_USB=m
+CONFIG_MEMSTICK_REALTEK_PCI=m
+CONFIG_MEMSTICK_REALTEK_USB=m
+
+# MTD
+CONFIG_MTD=m
+
+# Open-Channel SSD
+CONFIG_NVM=y
+CONFIG_NVM_GENNVM=m
+CONFIG_NVM_RRPC=m
diff --git a/sys-boot/linux/files/configs/x86_64 b/sys-boot/linux/files/configs/x86_64
new file mode 100644
index 0000000..c4eb53a
--- /dev/null
+++ b/sys-boot/linux/files/configs/x86_64
@@ -0,0 +1,95 @@
+# Just to be sure that we are on x86
+CONFIG_X86=y
+
+# 64bit i am not using 32bit
+CONFIG_X86_64=y
+# Multiprocessing
+CONFIG_SMP=y
+
+# Cryptsetup
+CONFIG_BLK_DEV_DM=y
+CONFIG_DM_CRYPT=y
+CONFIG_CRYPTO_XTS=y
+CONFIG_CRYPTO_SHA256_SSSE3=y
+CONFIG_CRYPTO_SHA512_SSSE3=y
+CONFIG_CRYPTO_AES_X86_64=y
+CONFIG_CRYPTO_USER_API_SKCIPHER=y
+
+# I think that I have efi almost everywhere now
+CONFIG_EFI=y
+CONFIG_EFI_VARS=y
+CONFIG_EFIVAR_FS=m
+
+# Intel HD sound
+CONFIG_SND_HDA_CODEC_HDMI=m
+
+# rfkill
+CONFIG_RFKILL=y
+
+# Wirelles driver
+CONFIG_IWLWIFI=y
+CONFIG_IWLDVM=m
+CONFIG_IWLMVM=m
+CONFIG_IWLWIFI_PCIE_RTPM=y
+# Wifi encryptions
+CONFIG_CRYPTO_AES_X86_64=y
+CONFIG_CRYPTO_AES_NI_INTEL=m
+
+# Probook HD-audio
+CONFIG_SND_HDA_CODEC_CONEXANT=m
+# HP modules
+CONFIG_HP_ACCEL=m
+CONFIG_HP_WIRELESS=m
+CONFIG_HP_WMI=m
+
+# Asus extras
+CONFIG_ASUS_LAPTOP=m
+CONFIG_ASUS_WIRELESS=m
+CONFIG_ASUS_WMI=m
+CONFIG_ASUS_NB_WMI=m
+
+# Additional buttons for some laptops
+CONFIG_INTEL_HID_EVENT=m
+CONFIG_INTEL_VBTN=m
+# Intel inteligent power sharing
+CONFIG_INTEL_IPS=m
+CONFIG_INTEL_PMC_CORE=y
+CONFIG_INTEL_RST=m
+CONFIG_INTEL_SMARTCONNECT=m
+# Qemu host pass panic
+CONFIG_PVPANIC=m
+# PCM control
+CONFIG_INTEL_PMC_IPC=m
+CONFIG_INTEL_PUNIT_IPC=m
+CONFIG_INTEL_TELEMETRY=m
+# Windows management instrumentation
+CONFIG_ACPI_WMI=m
+
+# USB
+CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_XHCI_PLATFORM=y
+CONFIG_USB_EHCI_HCD_PLATFORM=y
+CONFIG_USB_EHCI_ROOT_HUB_TT=y
+# CDC ACM
+CONFIG_USB_ACM=m
+# Wireless
+CONFIG_USB_WDM=m
+# Test and measurement class support
+CONFIG_USB_TMC=m
+# Card reader
+CONFIG_USB_STORAGE_REALTEK=m
+CONFIG_USB_UAS=m
+CONFIG_USB_STORAGE_ENE_UB6250=m
+CONFIG_USB_STORAGE_CYPRESS_ATACB=m
+# USB over IP
+CONFIG_USBIP_CORE=m
+CONFIG_USBIP_VHCI_HCD=m
+CONFIG_USBIP_HOST=m
+# USB serial
+CONFIG_USB_SERIAL=m
+
+# HW random number generator
+CONFIG_HW_RANDOM_INTEL=y
+CONFIG_HW_RANDOM_TIMERIOMEM=y
+CONFIG_HW_RANDOM_AMD=y
+CONFIG_HW_RANDOM_VIA=y
diff --git a/sys-boot/linux/linux-4.10.13.ebuild b/sys-boot/linux/linux-4.10.13.ebuild
new file mode 100644
index 0000000..b37508c
--- /dev/null
+++ b/sys-boot/linux/linux-4.10.13.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Linux kernel"
+HOMEPAGE="http://kernel.org/"
+SRC_URI="https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/snapshot/linux-stable-${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/linux-stable-${PV}"
+
+LICENSE="GPLv2"
+SLOT="${PV}"
+KEYWORDS="amd64 ~x86"
+IUSE="bluetooth
+desktop
+ikconfig
+kvm
+network
+power
+sd_storage"
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+src_configure() {
+ [ "$ARCH" = "amd64" ] && ARCH="x86"
+
+ emake mrproper
+ # TODO support cross compile
+ # Generate default configuration
+ emake defconfig
+
+ # Apply configuration
+ (
+ ARGS=""
+ for U in $IUSE; do
+ ARGS="$ARGS $(usev $U)"
+ done
+ cd "${S}"
+ "${FILESDIR}"/config_prepare.sh $ARGS
+ )
+
+ # Process changes
+ emake olddefconfig
+
+ # Check changes
+ EOUT="$("${FILESDIR}"/config_miss.sh $ARGS)"
+ if [ $? -ne 0 ]; then
+ eerror "Configuration failed:
+$EOUT"
+ fail
+ fi
+}
+
+src_install() {
+ emake modules_install INSTALL_MOD_PATH="${D}"
+
+ dodir /boot
+ insinto /boot
+ newins "${S}/arch/$ARCH/boot/bzImage" "bzlinux-${PV}"
+}
+
+src_postinst() {
+ # TODO add this to syslinux.cnf
+ true
+}
+
+src_prerm() {
+ # TODO remove this from syslinux.cnf
+ true
+}