summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2018-03-21 00:02:15 +0100
committerKarel Kočí <cynerd@email.cz>2018-03-21 00:02:15 +0100
commit1d1db2f0e92c53673e3f803a416e2f91ddee4933 (patch)
treebc9b5f1d24d5ad70e74de9c329a9bd27bca53c13
parent2de5dcbdbd6e06790d733302993a06af224ff77f (diff)
downloadgentoo-personal-overlay-1d1db2f0e92c53673e3f803a416e2f91ddee4933.tar.gz
gentoo-personal-overlay-1d1db2f0e92c53673e3f803a416e2f91ddee4933.tar.bz2
gentoo-personal-overlay-1d1db2f0e92c53673e3f803a416e2f91ddee4933.zip
Add support for amd to linux
-rw-r--r--sys-kernel/linux/files/amd.config92
-rwxr-xr-xsys-kernel/linux/files/config_prepare.sh4
-rw-r--r--sys-kernel/linux/linux-4.14.27-r1.ebuild4
3 files changed, 97 insertions, 3 deletions
diff --git a/sys-kernel/linux/files/amd.config b/sys-kernel/linux/files/amd.config
new file mode 100644
index 0000000..e715ff1
--- /dev/null
+++ b/sys-kernel/linux/files/amd.config
@@ -0,0 +1,92 @@
+# No logo
+CONFIG_LOGO=n
+CONFIG_LOCALVERSION=""
+
+# Disable nouveau, radeon and intel
+CONFIG_DRM_NOUVEAU=n
+CONFIG_DRM_RADEON=n
+CONFIG_DRM_I915=n
+CONFIG_DRM_GMA500=n
+
+# Enable incompatible v3 process information file format
+CONFIG_BSD_PROCESS_ACCT_V3=y
+
+# Built in keyboard support
+CONFIG_KEYBOARD_ATKBD=y
+
+# SATA support compile in
+CONFIG_ATA=y
+CONFIG_SATA_AHCI=y
+CONFIG_BLK_DEV_SD=y
+# Compile BTRFS to kernel (used for root)
+CONFIG_BTRFS_FS=y
+# Compile FAT to kernel (used for efi partition)
+CONFIG_VFAT_FS=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
+
+# Built in USB
+CONFIG_USB=y
+CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_STORAGE=y
+# Built in HID (keyboard and so on)
+CONFIG_HID_GENERIC=y
+CONFIG_USB_HID=y
+CONFIG_I2C_HID=y
+CONFIG_HID_ASUS=y
+
+# Compile to kernel also other filesytems so we can use it if we need it
+CONFIG_EXT4_FS=y
+CONFIG_OVERLAY_FS=y
+CONFIG_SQUASHFS=y
+
+# Scrollback buffer size
+CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=1024
+
+# AMD GPU
+CONFIG_AGP=y
+CONFIG_DRM=y
+CONFIG_DRM_AMDGPU=y
+
+# VFIO (gpu passtrough)
+CONFIG_VFIO=y
+CONFIG_VFIO_PCI=y
+
+# X input
+CONFIG_INPUT_EVDEV=y
+
+# Consolekit
+CONFIG_AUDIT=y
+
+# Build configuration into the kernel but as module
+CONFIG_IKCONFIG=m
+CONFIG_IKCONFIG_PROC=y
+
+# Chromium requires user namespace sandbox?
+CONFIG_USER_NS=y
+
+## Gentoo specific just to be sure
+# 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
+
+# Options enabled just to make previous options enabled
+CONFIG_LEDS_CLASS=y
diff --git a/sys-kernel/linux/files/config_prepare.sh b/sys-kernel/linux/files/config_prepare.sh
index f4ae6d4..c2b5854 100755
--- a/sys-kernel/linux/files/config_prepare.sh
+++ b/sys-kernel/linux/files/config_prepare.sh
@@ -6,7 +6,9 @@ B="$(dirname $0)"
BASE=arch.config
OVERLAY=overlay.config
-if [ "$1" = "virt" ]; then
+if [ "$1" = "amd" ]; then
+ OVERLAY=amd.config
+elif [ "$1" = "virt" ]; then
BASE=
OVERLAY=virt.config
fi
diff --git a/sys-kernel/linux/linux-4.14.27-r1.ebuild b/sys-kernel/linux/linux-4.14.27-r1.ebuild
index 7e6dd73..e387641 100644
--- a/sys-kernel/linux/linux-4.14.27-r1.ebuild
+++ b/sys-kernel/linux/linux-4.14.27-r1.ebuild
@@ -14,7 +14,7 @@ S="${WORKDIR}/linux-stable-${VER}"
LICENSE="GPLv2"
SLOT="${PV}"
KEYWORDS="amd64 ~x86"
-IUSE="virt +initramfs"
+IUSE="virt +initramfs amd"
DEPEND="
sys-devel/bc
@@ -25,7 +25,7 @@ src_configure() {
# Fix ARCH variable
[ "$ARCH" = "amd64" ] && ARCH="x86"
- "${FILESDIR}"/config_prepare.sh $(usev virt) || die "Configuration application failed"
+ "${FILESDIR}"/config_prepare.sh $(usev virt) $(usev amd) || die "Configuration application failed"
}
src_install() {