My *nix world

Minimalist Gentoo

I am already using a PC for more than 17 years so I am not enjoying any more of having "hundred" of useless applications/libraries/dependencies installed on my PC, a lot of fancy options which either I never use or I am willing "to pay for" (because I can live without them anyway). This is happening when you install a pret-a-porter distro, such as Ubuntu, Windows, etc.

Basically I was looking for a minimalist, lightweight Linux installation. This led me to Gentoo so I gave it a try.

Minimalist Gentoo

Because I had already a functional Ubuntu distro installed on my laptop I didn't want to wipe that. Instead I have cloned the HDD disk image to another external disk (size of the other disk does not matter as long it is bigger):

dd if=/dev/sda of=/dev/sdb

So basically my external USB WD /dev/sdb disk became a clone of my laptop internal /dev/sda disk. I had to check if it really worked so I got into laptop BIOS, I changed the boot options (boot from external USB hdd as first boot option) then I booted from USB external cloned disk without problems. So that was the point I decided that I can go further without fear, because I had a functional backup copy of the old distro (just in case).

First step was to get a install-amd64-minimal-.iso installation CD image from http://gentoo/releases/amd64/current-iso/. Next I burned the .iso image to a CD and I booted from CD.

Next step was to repartition my laptop hdd. The Gentoo handbook was helpful so I've got a /dev/sda1 , /dev/sda2 and /dev/sda3 partitions where I had created a ext2, swap and ext4 respectively file-systems. After that I had to download and install a stage3 and also a portage-latest tarballs.

It is also (very) important to know right from the beginning what options would you like your system to provide, because you can create a fine-tuning configuration file which will be used be any app/library/dependency you may need to install. Basically all the sources will be configured (before they are compiled) based on the uses flags specified in /etc/make.conf

My make.conf looks like the following:

# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.

# compiler optimization
CFLAGS="-O2 -pipe -march=native -mtune=native -fomit-frame-pointer -fno-var-tracking"
CXXFLAGS="${CFLAGS}"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"

# parallel build & gcc cache
MAKEOPTS="-j2"
CCACHE_DIR="/var/tmp/ccache"
CCACHE_SIZE="1G"
FEATURES="parallel-fetch userfetch ccache candy compress-build-logs"

# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.
CHOST="x86_64-pc-linux-gnu"
ACCEPT_KEYWORDS="amd64"
LINGUAS="en"

# use the following gentoo repository servers:
GENTOO_MIRRORS="http://mirror.mdfnet.se/gentoo http://ftp.df.lth.se/pub/gentoo"
SYNC="rsync://rsync.se.gentoo.org/gentoo-portage"
#SYNC="SYNC="rsync://rsync5.se.gentoo.org/gentoo-portage"
#SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"

# by default we acknowledge the have the following devices
INPUT_DEVICES="keyboard mouse evdev synaptics"
VIDEO_CARDS="radeon vesa fbdev"
ALSA_CARDS="ens1370"
WEB_CAM="v4l v4l2"
APACHE2_MODULES="*-"
CAMERAS="*-"
CALLIGRA_FEATURES="*-"
GPSD_PROTOCOLS="*-"
LCD_DEVICES="*-"

#KVM settings
USE_KVM="qemu_softmmu_targets_x86_64 qemu_user_targets_x86_64 parted qemu virt-network device-mapper sasl spice"

# do not unmask automatically anything but accept any 3rd party license agreement
EMERGE_DEFAULT_OPTS="--autounmask=n"
ACCEPT_LICENSE="*"

# These are the USE flags that were used in addition to what is provided by the
# profile used for building.
# See: http://www.gentoo.org/dyn/use-index.xml
USE_OPTIMIZATION="optimization strong-optimization mmx pch sharedmem smp sse sse2 lto graphite optimized-qmake"
USE_SYS_KERNEL="savedconfig"
USE_SYS_LIBS="glibc-omitfp python"

USE_LAPTOP="acpi" # bluetooth"
USE_X="truetype X new-login xorg"
USE_IMAGE="jpeg gif tiff png svg pdf"
USE_MEDIA="sound alsa mad vidix asf win32codecs dvd mp4 aac x264 xvid nsplugin mp3 real gstreamer"
USE_GENERAL="udev ncurses bash-completion libnotify ftp samba java bzip2 symlink sqlite threadsafe spell xml lm_sensors"
USE_SYSTEM="hal fam dbus aoss nptl threads"
USE_DONT="-arts -qt4 -ipv6 -opengl"
USE_KDE="-kde -qt3"
#USE_GNOME="gtk cairo gnome gnome-keyring archive sendto aisleriot"
USE_GNOME="-gnome -gnome-keyring"
USE_LXDE="-lxde cairo"
USE_XFACE="session startup-notification"

USE_APP_ADMIN="edit sudo custom-optimization"
USE_APP_EMULATION="consolekit"
USE_WWW_PLUGINS="64bit"
#USE_X11_DRIVERS="-xspice"
USE_X11_TERMS="mousewheel"
USE_X11_DUALMONITOR="-xinerama"
USE_X_COMPOSITE="xcomposite"
USE="${USE_DONT} ${USE_SYSTEM} ${USE_GENERAL} ${USE_IMAGE} ${USE_X} ${USE_KDE} ${USE_MEDIA} ${USE_OPTIMIZATION} ${USE_APP_ADMIN} ${USE_APP_EMULATION} ${USE_GNOME}"
USE="${USE} ${USE_SYS_KERNEL} ${USE_SYS_LIBS} ${USE_WWW_PLUGINS} ${USE_X11_DRIVERS} ${USE_X11_TERMS} ${USE_LXDE} ${USE_XFACE} ${USE_X11_DUALMONITOR} ${USE_X_COMPOSITE} ${USE_KVM} ${WEB_CAM} ${USE_LAPTOP}"

# Telling Portage about layman-fetched repositories
source /var/lib/layman/make.conf

# Portage file path
DISTDIR="/var/portage/distfiles"

Because Gentoo basically compiles everything from source it provides a way to specify the compiler flags which will be used. I my case I have:

CFLAGS="-O2 -pipe -march=native -mtune=native -fomit-frame-pointer -fno-var-tracking"

Also, if you want to improve the final compile time you can take advantage of the multi-CPU arhitecture you might have so just tell portage to use as many threads you want (eg: CPU number +1). I my case I had specified:

MAKEOPTS="-j2"

You should know from the beginning the desktop manager you might want to use so you can disable all others (eg: gnome, kde, etc) just before they will be included/compiled within all libraries/pluggins.

In order to organize your USE flags based on the scope (eg: flags designed for X11 libraries, KVM, XFCE, etc) you can define two or more custom USE variable (eg: USE_X) where you define just those flags related to a particular scope, then you can construct the final USE variable based on a concatenation of all custom USE variable (eg: USE="${USE_DONT} ${USE_SYSTEM} ${USE_GENERAL}").
If you take a look at the /etc/make.conf file above you will understand what you can do and how it can help. If not then maybe you should stick for the moment with the defaults options already included on the file.

When you install Gentoo you install just the foundation of your system : a filesystem with a Linux kernel and in the top of these a clever package management designed by the Gentoo. So, after installing Gentoo as handbook says I had to install the X server and in the top of it a desktop environment.

Linux kernel

Because Gentoo will compile the Linux kernel directly from source code, you can configure what options your kernel will include, so you are able to tune little bit every option available. This is a very useful thing because your kernel will become little bit slimmer and faster. This is how my kernel .config file looks like:

#
# Automatically generated file; DO NOT EDIT.
# Linux/x86_64 3.2.2 Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_OUTPUT_FORMAT="elf64-x86-64"
CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig"
CONFIG_GENERIC_CMOS_UPDATE=y
CONFIG_CLOCKSOURCE_WATCHDOG=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_ARCH_CLOCKSOURCE_DATA=y
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_HAVE_LATENCYTOP_SUPPORT=y
CONFIG_MMU=y
CONFIG_ZONE_DMA=y
CONFIG_NEED_DMA_MAP_STATE=y
CONFIG_NEED_SG_DMA_LENGTH=y
CONFIG_GENERIC_ISA_DMA=y
CONFIG_GENERIC_IOMAP=y
CONFIG_GENERIC_BUG=y
CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_GENERIC_GPIO=y
CONFIG_ARCH_MAY_HAVE_PC_FDC=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_GENERIC_TIME_VSYSCALL=y
CONFIG_ARCH_HAS_CPU_RELAX=y
CONFIG_ARCH_HAS_DEFAULT_IDLE=y
CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y
CONFIG_HAVE_SETUP_PER_CPU_AREA=y
CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y
CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
CONFIG_ARCH_SUSPEND_POSSIBLE=y
CONFIG_ZONE_DMA32=y
CONFIG_ARCH_POPULATES_NODE_MAP=y
CONFIG_AUDIT_ARCH=y
CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y
CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
CONFIG_X86_64_SMP=y
CONFIG_X86_HT=y
CONFIG_ARCH_HWEIGHT_CFLAGS="-fcall-saved-rdi -fcall-saved-rsi -fcall-saved-rdx -fcall-saved-rcx -fcall-saved-r8 -fcall-saved-r9 -fcall-saved-r10 -fcall-saved-r11"
CONFIG_ARCH_CPU_PROBE_RELEASE=y
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
CONFIG_HAVE_IRQ_WORK=y
CONFIG_IRQ_WORK=y

#
# General setup
#
CONFIG_EXPERIMENTAL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_CROSS_COMPILE=""
CONFIG_LOCALVERSION=""
CONFIG_LOCALVERSION_AUTO=y
CONFIG_HAVE_KERNEL_GZIP=y
CONFIG_HAVE_KERNEL_BZIP2=y
CONFIG_HAVE_KERNEL_LZMA=y
CONFIG_HAVE_KERNEL_XZ=y
CONFIG_HAVE_KERNEL_LZO=y
CONFIG_KERNEL_XZ=y
CONFIG_DEFAULT_HOSTNAME="(none)"
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
CONFIG_POSIX_MQUEUE=y
CONFIG_POSIX_MQUEUE_SYSCTL=y
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_BSD_PROCESS_ACCT_V3=y
CONFIG_TASKSTATS=y
CONFIG_TASK_DELAY_ACCT=y
CONFIG_TASK_XACCT=y
CONFIG_TASK_IO_ACCOUNTING=y
CONFIG_AUDIT=y
CONFIG_AUDITSYSCALL=y
CONFIG_AUDIT_WATCH=y
CONFIG_AUDIT_TREE=y
CONFIG_HAVE_GENERIC_HARDIRQS=y

#
# IRQ subsystem
#
CONFIG_GENERIC_HARDIRQS=y
CONFIG_HAVE_SPARSE_IRQ=y
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_GENERIC_IRQ_SHOW=y
CONFIG_GENERIC_PENDING_IRQ=y
CONFIG_IRQ_FORCED_THREADING=y
CONFIG_SPARSE_IRQ=y

#
# RCU Subsystem
#
CONFIG_TREE_RCU=y
CONFIG_RCU_FANOUT=64
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=15
CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y
CONFIG_CGROUPS=y
CONFIG_CGROUP_DEVICE=y
CONFIG_CPUSETS=y
CONFIG_PROC_PID_CPUSET=y
CONFIG_CGROUP_CPUACCT=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
CONFIG_RD_XZ=y
CONFIG_SYSCTL=y
CONFIG_ANON_INODES=y
CONFIG_EXPERT=y
CONFIG_UID16=y
CONFIG_SYSCTL_SYSCALL=y
CONFIG_KALLSYMS=y
CONFIG_HOTPLUG=y
CONFIG_PRINTK=y
CONFIG_BUG=y
CONFIG_ELF_CORE=y
CONFIG_PCSPKR_PLATFORM=y
CONFIG_HAVE_PCSPKR_PLATFORM=y
CONFIG_BASE_FULL=y
CONFIG_FUTEX=y
CONFIG_EPOLL=y
CONFIG_SIGNALFD=y
CONFIG_TIMERFD=y
CONFIG_EVENTFD=y
CONFIG_SHMEM=y
CONFIG_AIO=y
CONFIG_HAVE_PERF_EVENTS=y

#
# Kernel Performance Events And Counters
#
CONFIG_PERF_EVENTS=y
CONFIG_VM_EVENT_COUNTERS=y
CONFIG_PCI_QUIRKS=y
CONFIG_COMPAT_BRK=y
CONFIG_SLAB=y
CONFIG_HAVE_OPROFILE=y
CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
CONFIG_USER_RETURN_NOTIFIER=y
CONFIG_HAVE_IOREMAP_PROT=y
CONFIG_HAVE_KPROBES=y
CONFIG_HAVE_KRETPROBES=y
CONFIG_HAVE_OPTPROBES=y
CONFIG_HAVE_ARCH_TRACEHOOK=y
CONFIG_HAVE_DMA_ATTRS=y
CONFIG_USE_GENERIC_SMP_HELPERS=y
CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
CONFIG_HAVE_DMA_API_DEBUG=y
CONFIG_HAVE_HW_BREAKPOINT=y
CONFIG_HAVE_MIXED_BREAKPOINTS_REGS=y
CONFIG_HAVE_USER_RETURN_NOTIFIER=y
CONFIG_HAVE_PERF_EVENTS_NMI=y
CONFIG_HAVE_ARCH_JUMP_LABEL=y
CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y

#
# GCOV-based kernel profiling
#
CONFIG_SLABINFO=y
CONFIG_RT_MUTEXES=y
CONFIG_BASE_SMALL=0
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
CONFIG_MODULE_FORCE_UNLOAD=y
CONFIG_MODVERSIONS=y
CONFIG_STOP_MACHINE=y
CONFIG_BLOCK=y
CONFIG_BLK_DEV_BSG=y
CONFIG_BLOCK_COMPAT=y

#
# IO Schedulers
#
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
CONFIG_DEFAULT_CFQ=y
CONFIG_DEFAULT_IOSCHED="cfq"
CONFIG_PREEMPT_NOTIFIERS=y
CONFIG_INLINE_SPIN_UNLOCK=y
CONFIG_INLINE_SPIN_UNLOCK_IRQ=y
CONFIG_INLINE_READ_UNLOCK=y
CONFIG_INLINE_READ_UNLOCK_IRQ=y
CONFIG_INLINE_WRITE_UNLOCK=y
CONFIG_INLINE_WRITE_UNLOCK_IRQ=y
CONFIG_MUTEX_SPIN_ON_OWNER=y
CONFIG_FREEZER=y

#
# Processor type and features
#
CONFIG_TICK_ONESHOT=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
CONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST=y
CONFIG_SMP=y
CONFIG_X86_MPPARSE=y
CONFIG_X86_EXTENDED_PLATFORM=y
CONFIG_X86_SUPPORTS_MEMORY_FAILURE=y
CONFIG_SCHED_OMIT_FRAME_POINTER=y
CONFIG_NO_BOOTMEM=y
CONFIG_MCORE2=y
CONFIG_X86_INTERNODE_CACHE_SHIFT=6
CONFIG_X86_CMPXCHG=y
CONFIG_CMPXCHG_LOCAL=y
CONFIG_CMPXCHG_DOUBLE=y
CONFIG_X86_L1_CACHE_SHIFT=6
CONFIG_X86_XADD=y
CONFIG_X86_WP_WORKS_OK=y
CONFIG_X86_INTEL_USERCOPY=y
CONFIG_X86_USE_PPRO_CHECKSUM=y
CONFIG_X86_P6_NOP=y
CONFIG_X86_TSC=y
CONFIG_X86_CMPXCHG64=y
CONFIG_X86_CMOV=y
CONFIG_X86_MINIMUM_CPU_FAMILY=64
CONFIG_X86_DEBUGCTLMSR=y
CONFIG_PROCESSOR_SELECT=y
CONFIG_CPU_SUP_INTEL=y
CONFIG_HPET_TIMER=y
CONFIG_HPET_EMULATE_RTC=y
CONFIG_DMI=y
CONFIG_SWIOTLB=y
CONFIG_IOMMU_HELPER=y
CONFIG_NR_CPUS=2
CONFIG_SCHED_MC=y
CONFIG_PREEMPT_VOLUNTARY=y
CONFIG_X86_LOCAL_APIC=y
CONFIG_X86_IO_APIC=y
CONFIG_X86_MCE=y
CONFIG_X86_MCE_INTEL=y
CONFIG_X86_MCE_THRESHOLD=y
CONFIG_X86_THERMAL_VECTOR=y
CONFIG_ARCH_PHYS_ADDR_T_64BIT=y
CONFIG_ARCH_DMA_ADDR_T_64BIT=y
CONFIG_DIRECT_GBPAGES=y
CONFIG_ARCH_SPARSEMEM_ENABLE=y
CONFIG_ARCH_SPARSEMEM_DEFAULT=y
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
CONFIG_ARCH_PROC_KCORE_TEXT=y
CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
CONFIG_SELECT_MEMORY_MODEL=y
CONFIG_SPARSEMEM_MANUAL=y
CONFIG_SPARSEMEM=y
CONFIG_HAVE_MEMORY_PRESENT=y
CONFIG_SPARSEMEM_EXTREME=y
CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
CONFIG_SPARSEMEM_ALLOC_MEM_MAP_TOGETHER=y
CONFIG_SPARSEMEM_VMEMMAP=y
CONFIG_HAVE_MEMBLOCK=y
CONFIG_PAGEFLAGS_EXTENDED=y
CONFIG_SPLIT_PTLOCK_CPUS=4
CONFIG_PHYS_ADDR_T_64BIT=y
CONFIG_ZONE_DMA_FLAG=1
CONFIG_BOUNCE=y
CONFIG_VIRT_TO_BUS=y
CONFIG_MMU_NOTIFIER=y
CONFIG_KSM=y
CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
CONFIG_ARCH_SUPPORTS_MEMORY_FAILURE=y
CONFIG_X86_RESERVE_LOW=64
CONFIG_MTRR=y
CONFIG_MTRR_SANITIZER=y
CONFIG_MTRR_SANITIZER_ENABLE_DEFAULT=0
CONFIG_MTRR_SANITIZER_SPARE_REG_NR_DEFAULT=1
CONFIG_X86_PAT=y
CONFIG_ARCH_USES_PG_UNCACHED=y
CONFIG_ARCH_RANDOM=y
CONFIG_SECCOMP=y
CONFIG_HZ_1000=y
CONFIG_HZ=1000
CONFIG_SCHED_HRTICK=y
CONFIG_KEXEC=y
CONFIG_CRASH_DUMP=y
CONFIG_PHYSICAL_START=0x200000
CONFIG_RELOCATABLE=y
CONFIG_PHYSICAL_ALIGN=0x1000000
CONFIG_HOTPLUG_CPU=y
CONFIG_COMPAT_VDSO=y
CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y

#
# Power management and ACPI options
#
CONFIG_ARCH_HIBERNATION_HEADER=y
CONFIG_SUSPEND=y
CONFIG_SUSPEND_FREEZER=y
CONFIG_HIBERNATE_CALLBACKS=y
CONFIG_HIBERNATION=y
CONFIG_PM_STD_PARTITION=""
CONFIG_PM_SLEEP=y
CONFIG_PM_SLEEP_SMP=y
CONFIG_PM_RUNTIME=y
CONFIG_PM=y
CONFIG_ACPI=y
CONFIG_ACPI_SLEEP=y
CONFIG_ACPI_PROC_EVENT=y
CONFIG_ACPI_AC=y
CONFIG_ACPI_BATTERY=y
CONFIG_ACPI_BUTTON=y
CONFIG_ACPI_FAN=y
CONFIG_ACPI_PROCESSOR=y
CONFIG_ACPI_HOTPLUG_CPU=y
CONFIG_ACPI_PROCESSOR_AGGREGATOR=y
CONFIG_ACPI_THERMAL=y
CONFIG_ACPI_BLACKLIST_YEAR=0
CONFIG_X86_PM_TIMER=y
CONFIG_ACPI_CONTAINER=y
CONFIG_ACPI_SBS=y
CONFIG_ACPI_HED=y

#
# CPU Frequency scaling
#
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_TABLE=y
CONFIG_CPU_FREQ_STAT=y
CONFIG_CPU_FREQ_STAT_DETAILS=y
CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE=y
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y

#
# x86 CPU frequency scaling drivers
#
CONFIG_X86_ACPI_CPUFREQ=y

#
# shared options
#
CONFIG_CPU_IDLE=y
CONFIG_CPU_IDLE_GOV_LADDER=y
CONFIG_CPU_IDLE_GOV_MENU=y
CONFIG_INTEL_IDLE=y

#
# Memory power savings
#
CONFIG_I7300_IDLE_IOAT_CHANNEL=y
CONFIG_I7300_IDLE=y

#
# Bus options (PCI etc.)
#
CONFIG_PCI=y
CONFIG_PCI_DIRECT=y
CONFIG_PCI_MMCONFIG=y
CONFIG_PCI_DOMAINS=y
CONFIG_PCIEPORTBUS=y
CONFIG_PCIEAER=y
CONFIG_PCIEASPM=y
CONFIG_PCIE_PME=y
CONFIG_ARCH_SUPPORTS_MSI=y
CONFIG_PCI_MSI=y
CONFIG_HT_IRQ=y
CONFIG_PCI_IOAPIC=y
CONFIG_PCI_LABEL=y
CONFIG_ISA_DMA_API=y

#
# Executable file formats / Emulations
#
CONFIG_BINFMT_ELF=y
CONFIG_COMPAT_BINFMT_ELF=y
CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y
CONFIG_BINFMT_MISC=y
CONFIG_IA32_EMULATION=y
CONFIG_COMPAT=y
CONFIG_COMPAT_FOR_U64_ALIGNMENT=y
CONFIG_SYSVIPC_COMPAT=y
CONFIG_HAVE_TEXT_POKE_SMP=y
CONFIG_NET=y
CONFIG_COMPAT_NETLINK_MESSAGES=y

#
# Networking options
#
CONFIG_PACKET=y
CONFIG_UNIX=y
CONFIG_XFRM=y
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
CONFIG_IP_ADVANCED_ROUTER=y
CONFIG_IP_MULTIPLE_TABLES=y
CONFIG_IP_ROUTE_MULTIPATH=y
CONFIG_IP_PNP=y
CONFIG_IP_PNP_DHCP=y
CONFIG_SYN_COOKIES=y
CONFIG_INET_XFRM_MODE_TRANSPORT=y
CONFIG_INET_XFRM_MODE_TUNNEL=y
CONFIG_INET_XFRM_MODE_BEET=y
CONFIG_INET_LRO=y
CONFIG_INET_DIAG=y
CONFIG_INET_TCP_DIAG=y
CONFIG_TCP_CONG_CUBIC=y
CONFIG_DEFAULT_TCP_CONG="cubic"
CONFIG_NETWORK_SECMARK=y
CONFIG_NETFILTER=y
CONFIG_NETFILTER_DEBUG=y
CONFIG_NETFILTER_ADVANCED=y
CONFIG_BRIDGE_NETFILTER=y

#
# Core Netfilter Configuration
#
CONFIG_NETFILTER_NETLINK=y
CONFIG_NETFILTER_NETLINK_QUEUE=y
CONFIG_NETFILTER_NETLINK_LOG=y
CONFIG_NF_CONNTRACK=y
CONFIG_NF_CONNTRACK_MARK=y
CONFIG_NF_CONNTRACK_EVENTS=y
CONFIG_NF_CT_NETLINK=y
CONFIG_NETFILTER_XTABLES=y

#
# Xtables combined modules
#
CONFIG_NETFILTER_XT_MARK=y
CONFIG_NETFILTER_XT_CONNMARK=y

#
# Xtables targets
#

#
# Xtables matches
#
CONFIG_NETFILTER_XT_MATCH_CONNBYTES=y
CONFIG_NETFILTER_XT_MATCH_CONNMARK=y
CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y
CONFIG_NETFILTER_XT_MATCH_HELPER=y
CONFIG_NETFILTER_XT_MATCH_STATE=y

#
# IP: Netfilter Configuration
#
CONFIG_NF_DEFRAG_IPV4=y
CONFIG_NF_CONNTRACK_IPV4=y
CONFIG_NF_CONNTRACK_PROC_COMPAT=y
CONFIG_IP_NF_IPTABLES=y
CONFIG_IP_NF_FILTER=y
CONFIG_IP_NF_TARGET_REJECT=y
CONFIG_IP_NF_TARGET_LOG=y
CONFIG_NF_NAT=y
CONFIG_NF_NAT_NEEDED=y
CONFIG_IP_NF_TARGET_MASQUERADE=y
CONFIG_IP_NF_RAW=y
CONFIG_STP=m
CONFIG_BRIDGE=m
CONFIG_BRIDGE_IGMP_SNOOPING=y
CONFIG_VLAN_8021Q=y
CONFIG_LLC=m
CONFIG_NET_SCHED=y

#
# Queueing/Scheduling
#

#
# Classification
#
CONFIG_NET_CLS=y
CONFIG_NET_EMATCH=y
CONFIG_NET_EMATCH_STACK=32
CONFIG_NET_CLS_ACT=y
CONFIG_NET_SCH_FIFO=y
CONFIG_RPS=y
CONFIG_RFS_ACCEL=y
CONFIG_XPS=y
CONFIG_HAVE_BPF_JIT=y

#
# Network testing
#
CONFIG_FIB_RULES=y
CONFIG_WIRELESS=y
CONFIG_WEXT_CORE=y
CONFIG_WEXT_PROC=y
CONFIG_CFG80211=y
CONFIG_NL80211_TESTMODE=y
CONFIG_CFG80211_DEFAULT_PS=y
CONFIG_CFG80211_WEXT=y
CONFIG_WIRELESS_EXT_SYSFS=y
CONFIG_LIB80211=y
CONFIG_MAC80211=y
CONFIG_MAC80211_HAS_RC=y
CONFIG_MAC80211_RC_PID=y
CONFIG_MAC80211_RC_MINSTREL=y
CONFIG_MAC80211_RC_MINSTREL_HT=y
CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y
CONFIG_MAC80211_RC_DEFAULT="minstrel_ht"
CONFIG_MAC80211_LEDS=y

#
# Device Drivers
#

#
# Generic Driver Options
#
CONFIG_UEVENT_HELPER_PATH="/sbin/udevadm"
CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_FW_LOADER=y
CONFIG_FIRMWARE_IN_KERNEL=y
CONFIG_EXTRA_FIRMWARE="radeon/R520_cp.bin"
CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware"
CONFIG_CONNECTOR=y
CONFIG_PROC_EVENTS=y
CONFIG_PNP=y
CONFIG_PNP_DEBUG_MESSAGES=y

#
# Protocols
#
CONFIG_PNPACPI=y
CONFIG_BLK_DEV=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_LOOP_MIN_COUNT=8
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=8192
CONFIG_HAVE_IDE=y

#
# SCSI device support
#
CONFIG_SCSI_MOD=y
CONFIG_SCSI=y
CONFIG_SCSI_DMA=y
CONFIG_SCSI_PROC_FS=y

#
# SCSI support type (disk, tape, CD-ROM)
#
CONFIG_BLK_DEV_SD=y
CONFIG_SCSI_MULTI_LUN=y
CONFIG_SCSI_SCAN_ASYNC=y
CONFIG_SCSI_WAIT_SCAN=m

#
# SCSI Transports
#
CONFIG_ATA=y
CONFIG_ATA_VERBOSE_ERROR=y
CONFIG_ATA_ACPI=y
CONFIG_SATA_PMP=y

#
# Controllers with non-SFF native interface
#
CONFIG_SATA_AHCI=y
CONFIG_SATA_AHCI_PLATFORM=y
CONFIG_ATA_SFF=y

#
# SFF controllers with custom DMA interface
#
CONFIG_ATA_BMDMA=y

#
# SATA SFF controllers with BMDMA
#
CONFIG_ATA_PIIX=y

#
# PATA SFF controllers with BMDMA
#

#
# PIO-only SFF controllers
#

#
# Generic fallback / legacy drivers
#

#
# IEEE 1394 (FireWire) support
#
CONFIG_NETDEVICES=y
CONFIG_NET_CORE=y
CONFIG_MII=y
CONFIG_TUN=m

#
# CAIF transport drivers
#
CONFIG_ETHERNET=y
CONFIG_NET_VENDOR_3COM=y
CONFIG_NET_VENDOR_ADAPTEC=y
CONFIG_NET_VENDOR_ALTEON=y
CONFIG_NET_VENDOR_AMD=y
CONFIG_NET_VENDOR_ATHEROS=y
CONFIG_NET_VENDOR_BROADCOM=y
CONFIG_NET_VENDOR_BROCADE=y
CONFIG_NET_VENDOR_CHELSIO=y
CONFIG_NET_VENDOR_CISCO=y
CONFIG_NET_VENDOR_DEC=y
CONFIG_NET_VENDOR_DLINK=y
CONFIG_NET_VENDOR_EMULEX=y
CONFIG_NET_VENDOR_EXAR=y
CONFIG_NET_VENDOR_HP=y
CONFIG_NET_VENDOR_INTEL=y
CONFIG_E1000E=y
CONFIG_NET_VENDOR_I825XX=y
CONFIG_NET_VENDOR_MARVELL=y
CONFIG_NET_VENDOR_MELLANOX=y
CONFIG_NET_VENDOR_MICREL=y
CONFIG_NET_VENDOR_MYRI=y
CONFIG_NET_VENDOR_NATSEMI=y
CONFIG_NET_VENDOR_8390=y
CONFIG_NET_VENDOR_NVIDIA=y
CONFIG_NET_VENDOR_OKI=y
CONFIG_NET_VENDOR_QLOGIC=y
CONFIG_NET_VENDOR_REALTEK=y
CONFIG_NET_VENDOR_RDC=y
CONFIG_NET_VENDOR_SEEQ=y
CONFIG_NET_VENDOR_SILAN=y
CONFIG_NET_VENDOR_SIS=y
CONFIG_NET_VENDOR_SMSC=y
CONFIG_NET_VENDOR_STMICRO=y
CONFIG_NET_VENDOR_SUN=y
CONFIG_NET_VENDOR_TEHUTI=y
CONFIG_NET_VENDOR_TI=y
CONFIG_NET_VENDOR_VIA=y

#
# USB Network Adapters
#
CONFIG_WLAN=y
CONFIG_IWLWIFI_LEGACY=y

#
# Debugging Options
#
CONFIG_IWL3945=y

#
# Enable WiMAX (Networking options) to see the WiMAX drivers
#

#
# Input device support
#
CONFIG_INPUT=y

#
# Userland interfaces
#
CONFIG_INPUT_EVDEV=y

#
# Input Device Drivers
#
CONFIG_INPUT_KEYBOARD=y
CONFIG_KEYBOARD_ATKBD=y
CONFIG_INPUT_MOUSE=y
CONFIG_MOUSE_PS2=y
CONFIG_MOUSE_PS2_ALPS=y
CONFIG_MOUSE_PS2_LOGIPS2PP=y
CONFIG_MOUSE_PS2_SYNAPTICS=y

#
# Hardware I/O ports
#
CONFIG_SERIO=y
CONFIG_SERIO_I8042=y
CONFIG_SERIO_SERPORT=y
CONFIG_SERIO_LIBPS2=y

#
# Character devices
#
CONFIG_VT=y
CONFIG_CONSOLE_TRANSLATIONS=y
CONFIG_VT_CONSOLE=y
CONFIG_VT_CONSOLE_SLEEP=y
CONFIG_HW_CONSOLE=y
CONFIG_VT_HW_CONSOLE_BINDING=y
CONFIG_UNIX98_PTYS=y
CONFIG_LEGACY_PTYS=y
CONFIG_LEGACY_PTY_COUNT=256
CONFIG_DEVKMEM=y

#
# Serial drivers
#
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_FIX_EARLYCON_MEM=y
CONFIG_SERIAL_8250_PCI=y
CONFIG_SERIAL_8250_PNP=y
CONFIG_SERIAL_8250_NR_UARTS=4
CONFIG_SERIAL_8250_RUNTIME_UARTS=4
CONFIG_SERIAL_8250_EXTENDED=y
CONFIG_SERIAL_8250_MANY_PORTS=y
CONFIG_SERIAL_8250_SHARE_IRQ=y
CONFIG_SERIAL_8250_RSA=y

#
# Non-8250 serial port support
#
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
CONFIG_HW_RANDOM=y
CONFIG_HW_RANDOM_TIMERIOMEM=y
CONFIG_HW_RANDOM_INTEL=y
CONFIG_HW_RANDOM_AMD=y
CONFIG_HW_RANDOM_VIA=y
CONFIG_DEVPORT=y
CONFIG_I2C=y
CONFIG_I2C_BOARDINFO=y
CONFIG_I2C_COMPAT=y
CONFIG_I2C_CHARDEV=y
CONFIG_I2C_HELPER_AUTO=y
CONFIG_I2C_ALGOBIT=y

#
# I2C Hardware Bus support
#

#
# PC SMBus host controller drivers
#
CONFIG_I2C_I801=m

#
# ACPI drivers
#

#
# I2C system bus drivers (mostly embedded / system-on-chip)
#

#
# External I2C/SMBus adapter drivers
#

#
# Other I2C/SMBus bus drivers
#

#
# PPS support
#

#
# PPS generators support
#

#
# PTP clock support
#

#
# Enable Device Drivers -> PPS to see the PTP clock options.
#
CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
CONFIG_GPIOLIB=y

#
# Memory mapped GPIO drivers:
#
CONFIG_GPIO_SCH=y

#
# I2C GPIO expanders:
#

#
# PCI GPIO expanders:
#

#
# SPI GPIO expanders:
#

#
# AC97 GPIO expanders:
#

#
# MODULbus GPIO expanders:
#
CONFIG_POWER_SUPPLY=y
CONFIG_HWMON=y

#
# Native drivers
#
CONFIG_SENSORS_CORETEMP=y

#
# ACPI drivers
#
CONFIG_THERMAL=y
CONFIG_THERMAL_HWMON=y
CONFIG_SSB_POSSIBLE=y

#
# Sonics Silicon Backplane
#
CONFIG_BCMA_POSSIBLE=y

#
# Broadcom specific AMBA
#

#
# Multifunction device drivers
#
CONFIG_MFD_CORE=y
CONFIG_LPC_SCH=y
CONFIG_REGULATOR=y
CONFIG_MEDIA_SUPPORT=y

#
# Multimedia core support
#
CONFIG_VIDEO_DEV=m
CONFIG_VIDEO_V4L2_COMMON=m
CONFIG_VIDEO_MEDIA=m

#
# Multimedia drivers
#
CONFIG_MEDIA_TUNER=m
CONFIG_MEDIA_TUNER_CUSTOMISE=y

#
# Customize TV tuners
#
CONFIG_MEDIA_TUNER_XC4000=m
CONFIG_VIDEO_V4L2=m
CONFIG_VIDEO_CAPTURE_DRIVERS=y

#
# Encoders, decoders, sensors and other helper chips
#

#
# Audio decoders, processors and mixers
#

#
# RDS decoders
#

#
# Video decoders
#

#
# Video and audio decoders
#

#
# MPEG video encoders
#

#
# Video encoders
#

#
# Camera sensor devices
#

#
# Flash devices
#

#
# Video improvement chips
#

#
# Miscelaneous helper chips
#
CONFIG_V4L_USB_DRIVERS=y
CONFIG_USB_VIDEO_CLASS=m
CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
CONFIG_USB_GSPCA=m

#
# Graphics support
#
CONFIG_AGP=y
CONFIG_AGP_INTEL=y
CONFIG_VGA_ARB=y
CONFIG_VGA_ARB_MAX_GPUS=16
CONFIG_DRM=y
CONFIG_DRM_KMS_HELPER=y
CONFIG_DRM_TTM=y
CONFIG_DRM_RADEON=y
CONFIG_DRM_RADEON_KMS=y
CONFIG_FB=y
CONFIG_FB_DDC=m
CONFIG_FB_CFB_FILLRECT=y
CONFIG_FB_CFB_COPYAREA=y
CONFIG_FB_CFB_IMAGEBLIT=y
CONFIG_FB_BACKLIGHT=y
CONFIG_FB_MODE_HELPERS=y

#
# Frame buffer hardware drivers
#
CONFIG_FB_RADEON=m
CONFIG_FB_RADEON_I2C=y
CONFIG_FB_RADEON_BACKLIGHT=y
CONFIG_BACKLIGHT_LCD_SUPPORT=y
CONFIG_LCD_CLASS_DEVICE=y
CONFIG_LCD_PLATFORM=y
CONFIG_BACKLIGHT_CLASS_DEVICE=y
CONFIG_BACKLIGHT_GENERIC=y

#
# Display device support
#
CONFIG_DISPLAY_SUPPORT=y

#
# Display hardware drivers
#

#
# Console display driver support
#
CONFIG_VGA_CONSOLE=y
CONFIG_DUMMY_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
CONFIG_SOUND=y
CONFIG_SOUND_OSS_CORE=y
CONFIG_SOUND_OSS_CORE_PRECLAIM=y
CONFIG_SND=y
CONFIG_SND_TIMER=y
CONFIG_SND_PCM=y
CONFIG_SND_SEQUENCER=y
CONFIG_SND_OSSEMUL=y
CONFIG_SND_MIXER_OSS=y
CONFIG_SND_PCM_OSS=y
CONFIG_SND_PCM_OSS_PLUGINS=y
CONFIG_SND_SEQUENCER_OSS=y
CONFIG_SND_DYNAMIC_MINORS=y
CONFIG_SND_SUPPORT_OLD_API=y
CONFIG_SND_VERBOSE_PROCFS=y
CONFIG_SND_VMASTER=y
CONFIG_SND_DMA_SGBUF=y
CONFIG_SND_DRIVERS=y
CONFIG_SND_PCI=y
CONFIG_SND_HDA_INTEL=y
CONFIG_SND_HDA_PREALLOC_SIZE=64
CONFIG_SND_HDA_CODEC_REALTEK=y
CONFIG_SND_HDA_ENABLE_REALTEK_QUIRKS=y
CONFIG_SND_HDA_CODEC_ANALOG=y
CONFIG_SND_HDA_CODEC_SIGMATEL=y
CONFIG_SND_HDA_CODEC_VIA=y
CONFIG_SND_HDA_CODEC_HDMI=y
CONFIG_SND_HDA_CODEC_CIRRUS=y
CONFIG_SND_HDA_CODEC_CONEXANT=y
CONFIG_SND_HDA_CODEC_CA0110=y
CONFIG_SND_HDA_CODEC_CA0132=y
CONFIG_SND_HDA_CODEC_CMEDIA=y
CONFIG_SND_HDA_CODEC_SI3054=y
CONFIG_SND_HDA_GENERIC=y
CONFIG_SND_HDA_POWER_SAVE=y
CONFIG_SND_HDA_POWER_SAVE_DEFAULT=60
CONFIG_HID_SUPPORT=y
CONFIG_HID=y
CONFIG_HIDRAW=y

#
# USB Input Devices
#
CONFIG_USB_HID=y

#
# Special HID drivers
#
CONFIG_USB_SUPPORT=y
CONFIG_USB_COMMON=y
CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB_ARCH_HAS_OHCI=y
CONFIG_USB_ARCH_HAS_EHCI=y
CONFIG_USB_ARCH_HAS_XHCI=y
CONFIG_USB=y

#
# Miscellaneous USB options
#
CONFIG_USB_DEVICE_CLASS=y
CONFIG_USB_SUSPEND=y

#
# USB Host Controller Drivers
#
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_ROOT_HUB_TT=y
CONFIG_USB_EHCI_TT_NEWSCHED=y
CONFIG_USB_UHCI_HCD=y

#
# USB Device Class drivers
#

#
# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
#

#
# also be needed; see USB_STORAGE Help for more info
#
CONFIG_USB_STORAGE=m

#
# USB Imaging devices
#

#
# USB port drivers
#

#
# USB Miscellaneous drivers
#

#
# OTG and related infrastructure
#
CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=y

#
# LED drivers
#
CONFIG_LEDS_TRIGGERS=y

#
# LED Triggers
#

#
# iptables trigger is under Netfilter config (LED target)
#
CONFIG_RTC_LIB=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_HCTOSYS=y
CONFIG_RTC_HCTOSYS_DEVICE="rtc0"

#
# RTC interfaces
#
CONFIG_RTC_INTF_SYSFS=y
CONFIG_RTC_INTF_PROC=y
CONFIG_RTC_INTF_DEV=y

#
# I2C RTC drivers
#

#
# SPI RTC drivers
#

#
# Platform RTC drivers
#
CONFIG_RTC_DRV_CMOS=y

#
# on-CPU RTC drivers
#
CONFIG_DMADEVICES=y

#
# DMA Devices
#
CONFIG_AUXDISPLAY=y
CONFIG_UIO=m
CONFIG_UIO_PCI_GENERIC=m

#
# Virtio drivers
#
CONFIG_X86_PLATFORM_DEVICES=y

#
# Hardware Spinlock drivers
#
CONFIG_CLKEVT_I8253=y
CONFIG_I8253_LOCK=y
CONFIG_CLKBLD_I8253=y
CONFIG_IOMMU_SUPPORT=y

#
# Firmware Drivers
#
CONFIG_FIRMWARE_MEMMAP=y
CONFIG_DMIID=y

#
# File systems
#
CONFIG_EXT2_FS=y
CONFIG_EXT2_FS_XATTR=y
CONFIG_EXT2_FS_POSIX_ACL=y
CONFIG_EXT2_FS_SECURITY=y
CONFIG_EXT3_FS=y
CONFIG_EXT3_DEFAULTS_TO_ORDERED=y
CONFIG_EXT3_FS_XATTR=y
CONFIG_EXT3_FS_POSIX_ACL=y
CONFIG_EXT3_FS_SECURITY=y
CONFIG_EXT4_FS=y
CONFIG_EXT4_FS_XATTR=y
CONFIG_EXT4_FS_POSIX_ACL=y
CONFIG_EXT4_FS_SECURITY=y
CONFIG_JBD=y
CONFIG_JBD2=y
CONFIG_FS_MBCACHE=y
CONFIG_FS_POSIX_ACL=y
CONFIG_FILE_LOCKING=y
CONFIG_FSNOTIFY=y
CONFIG_DNOTIFY=y
CONFIG_INOTIFY_USER=y
CONFIG_QUOTA=y
CONFIG_PRINT_QUOTA_WARNING=y
CONFIG_QUOTACTL=y
CONFIG_QUOTACTL_COMPAT=y
CONFIG_AUTOFS4_FS=m
CONFIG_FUSE_FS=m
CONFIG_GENERIC_ACL=y

#
# Caches
#

#
# CD-ROM/DVD Filesystems
#
CONFIG_ISO9660_FS=y
CONFIG_JOLIET=y
CONFIG_ZISOFS=y
CONFIG_UDF_FS=y
CONFIG_UDF_NLS=y

#
# DOS/FAT/NT Filesystems
#
CONFIG_FAT_FS=y
CONFIG_MSDOS_FS=m
CONFIG_VFAT_FS=y
CONFIG_FAT_DEFAULT_CODEPAGE=437
CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
CONFIG_NTFS_FS=m
CONFIG_NTFS_RW=y

#
# Pseudo filesystems
#
CONFIG_PROC_FS=y
CONFIG_PROC_KCORE=y
CONFIG_PROC_VMCORE=y
CONFIG_PROC_SYSCTL=y
CONFIG_PROC_PAGE_MONITOR=y
CONFIG_SYSFS=y
CONFIG_TMPFS=y
CONFIG_TMPFS_POSIX_ACL=y
CONFIG_TMPFS_XATTR=y
CONFIG_CONFIGFS_FS=y
CONFIG_MISC_FILESYSTEMS=y
CONFIG_SQUASHFS=m
CONFIG_SQUASHFS_ZLIB=y
CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
CONFIG_NETWORK_FILESYSTEMS=y
CONFIG_CIFS=y

#
# Partition Types
#
CONFIG_PARTITION_ADVANCED=y
CONFIG_MSDOS_PARTITION=y
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="iso8859-1"
CONFIG_NLS_CODEPAGE_437=y
CONFIG_NLS_ISO8859_1=y
CONFIG_NLS_UTF8=y

#
# Kernel hacking
#
CONFIG_TRACE_IRQFLAGS_SUPPORT=y
CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4
CONFIG_ENABLE_WARN_DEPRECATED=y
CONFIG_ENABLE_MUST_CHECK=y
CONFIG_FRAME_WARN=2048
CONFIG_MAGIC_SYSRQ=y
CONFIG_STRIP_ASM_SYMS=y
CONFIG_UNUSED_SYMBOLS=y
CONFIG_DEBUG_KERNEL=y
CONFIG_SCHED_DEBUG=y
CONFIG_DEBUG_BUGVERBOSE=y
CONFIG_ARCH_WANT_FRAME_POINTERS=y
CONFIG_RCU_CPU_STALL_TIMEOUT=60
CONFIG_USER_STACKTRACE_SUPPORT=y
CONFIG_HAVE_FUNCTION_TRACER=y
CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST=y
CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
CONFIG_HAVE_DYNAMIC_FTRACE=y
CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
CONFIG_HAVE_C_RECORDMCOUNT=y
CONFIG_TRACING_SUPPORT=y
CONFIG_HAVE_ARCH_KGDB=y
CONFIG_HAVE_ARCH_KMEMCHECK=y
CONFIG_X86_VERBOSE_BOOTUP=y
CONFIG_DEBUG_RODATA=y
CONFIG_DEBUG_RODATA_TEST=y
CONFIG_HAVE_MMIOTRACE_SUPPORT=y
CONFIG_IO_DELAY_TYPE_0X80=0
CONFIG_IO_DELAY_TYPE_0XED=1
CONFIG_IO_DELAY_TYPE_UDELAY=2
CONFIG_IO_DELAY_TYPE_NONE=3
CONFIG_IO_DELAY_0X80=y
CONFIG_DEFAULT_IO_DELAY_TYPE=0

#
# Security options
#
CONFIG_DEFAULT_SECURITY_DAC=y
CONFIG_DEFAULT_SECURITY=""
CONFIG_CRYPTO=y

#
# Crypto core or helper
#
CONFIG_CRYPTO_ALGAPI=y
CONFIG_CRYPTO_ALGAPI2=y
CONFIG_CRYPTO_AEAD2=y
CONFIG_CRYPTO_BLKCIPHER=y
CONFIG_CRYPTO_BLKCIPHER2=y
CONFIG_CRYPTO_HASH=y
CONFIG_CRYPTO_HASH2=y
CONFIG_CRYPTO_RNG=y
CONFIG_CRYPTO_RNG2=y
CONFIG_CRYPTO_PCOMP=y
CONFIG_CRYPTO_PCOMP2=y
CONFIG_CRYPTO_MANAGER=y
CONFIG_CRYPTO_MANAGER2=y
CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y
CONFIG_CRYPTO_NULL=y
CONFIG_CRYPTO_WORKQUEUE=y
CONFIG_CRYPTO_CRYPTD=y

#
# Authenticated Encryption with Associated Data
#

#
# Block modes
#
CONFIG_CRYPTO_CBC=y
CONFIG_CRYPTO_ECB=y
CONFIG_CRYPTO_PCBC=y

#
# Hash modes
#
CONFIG_CRYPTO_HMAC=y

#
# Digest
#
CONFIG_CRYPTO_MD4=y
CONFIG_CRYPTO_MD5=y
CONFIG_CRYPTO_MICHAEL_MIC=y
CONFIG_CRYPTO_SHA1=y
CONFIG_CRYPTO_SHA256=y

#
# Ciphers
#
CONFIG_CRYPTO_AES=y
CONFIG_CRYPTO_AES_X86_64=y
CONFIG_CRYPTO_AES_NI_INTEL=y
CONFIG_CRYPTO_ARC4=y
CONFIG_CRYPTO_BLOWFISH=y
CONFIG_CRYPTO_BLOWFISH_COMMON=y
CONFIG_CRYPTO_DES=y
CONFIG_CRYPTO_SALSA20_X86_64=y
CONFIG_CRYPTO_TWOFISH_COMMON=y
CONFIG_CRYPTO_TWOFISH_X86_64=y

#
# Compression
#
CONFIG_CRYPTO_DEFLATE=y
CONFIG_CRYPTO_ZLIB=y
CONFIG_CRYPTO_LZO=y

#
# Random Number Generation
#
CONFIG_CRYPTO_ANSI_CPRNG=y
CONFIG_CRYPTO_USER_API=y
CONFIG_CRYPTO_USER_API_HASH=y
CONFIG_CRYPTO_USER_API_SKCIPHER=y
CONFIG_CRYPTO_HW=y
CONFIG_HAVE_KVM=y
CONFIG_HAVE_KVM_IRQCHIP=y
CONFIG_HAVE_KVM_EVENTFD=y
CONFIG_KVM_APIC_ARCHITECTURE=y
CONFIG_KVM_MMIO=y
CONFIG_KVM_ASYNC_PF=y
CONFIG_VIRTUALIZATION=y
CONFIG_KVM=m
CONFIG_KVM_INTEL=m
CONFIG_VHOST_NET=m

#
# Library routines
#
CONFIG_BITREVERSE=y
CONFIG_GENERIC_FIND_FIRST_BIT=y
CONFIG_CRC16=y
CONFIG_CRC_ITU_T=y
CONFIG_CRC32=y
CONFIG_ZLIB_INFLATE=y
CONFIG_ZLIB_DEFLATE=y
CONFIG_LZO_COMPRESS=y
CONFIG_LZO_DECOMPRESS=y
CONFIG_XZ_DEC=y
CONFIG_XZ_DEC_X86=y
CONFIG_XZ_DEC_POWERPC=y
CONFIG_XZ_DEC_IA64=y
CONFIG_XZ_DEC_ARM=y
CONFIG_XZ_DEC_ARMTHUMB=y
CONFIG_XZ_DEC_SPARC=y
CONFIG_XZ_DEC_BCJ=y
CONFIG_DECOMPRESS_XZ=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT=y
CONFIG_HAS_DMA=y
CONFIG_CHECK_SIGNATURE=y
CONFIG_CPU_RMAP=y
CONFIG_NLATTR=y
CONFIG_AVERAGE=y

I have started .config from the Linux kernel default options and latter I have tuned little bit based on my hardware devices, file-systems I was going to use, etc. Based on the above configuration and my hardware, my boot process takes about 20 seconds. This includes the loading of kernel, init, X server and xfce session.

This was achieved by using only those services that I really need (uninstall/disabled the others), parallel starting as many services as possible, and also by moving many of those from default to boot (just those that fit the scope). My rc-update is looking like that:

acpid | default
alsasound | default
bootmisc | boot
consolekit | default
dbus | default
devfs | sysinit
dmesg | sysinit
fsck | boot
gentoo32 | default
hostname | boot
hwclock | boot
iptables | boot
keymaps | boot
killprocs | shutdown
local | default
localmount | boot
modules | boot
mount-ro | shutdown
mtab | boot
net.lo | boot
net.wlan0 | default
netmount | default
ntpd | default
procfs | boot
root | boot
savecache | shutdown
swap | boot
sysctl | boot
syslog-ng | boot
termencoding | boot
udev | sysinit
udev-postmount | default
urandom | boot
vixie-cron | default

Note : gentoo32 is a daemon I have created for mounting/umounting at boot-time all the devices/folders I need for a gentoo 32-bit chroot environment. The others are Linux standard daemons so you might already know them.

Also I am using a autologin feature as described here because I do not need to use a login manager (this will speed up little bit the boot and X loading process). In fact you can use a Slim or lightDM or any other DM for that but if you prefer to login automatically then that might work for you too.

I want to know how much takes the booting process and if is something I can do to improve that. I have captured the whole boot process into a chart by using bootchart. It takes just 20 seconds. In real life I think the system boot speed will be at least 1 second faster, because it does not require to load a special init program such bootchart that I have used for capturing this chart:

minimalist gentoo

Update: after installing a SSD disk (instead for my 5200rpm HDD) the boot take about 12 seconds instead of 20.

One of the coolest thing after installing Gentoo, X server, Xfce, Slim (or other GDM) is that after you login to your X session the desktop does not provide almost any program: no file manager, no browser, no email client, no archive manager, no picture viewer, no graphical editor (except the console application called nano). So you have nothing yet installed but a wonderful package manager (portage) which is capable of providing you all the Linux open source applications which shares the source somewhere (maybe I have exaggerated little bit but you know what I mean).

Let's populate Gentoo with applications

I don't know about you but I need all sort of applications, like:

  • text and graphic editors
  • VM emulators
  • office tools
  • databases (front-end/back-end)
  • IDE
  • browser/email client
  • networking tools

So I have installed the following applications/libraries/tools that you can find in the portage:app-admin/logrotate

  1. app-admin/syslog-ng
  2. app-admin/testdisk
  3. app-arch/pxz
  4. app-arch/xarchiver
  5. app-benchmarks/bootchart
  6. app-cdr/xfburn
  7. app-editors/leafpad
  8. app-editors/nano
  9. app-emulation/libvirt
  10. app-emulation/qemu-kvm
  11. app-emulation/virt-manager
  12. app-misc/mc
  13. app-office/libreoffice
  14. app-portage/gentoolkit
  15. app-portage/layman
  16. app-portage/mirrorselect
  17. app-text/epdfview
  18. app-text/gocr
  19. app-text/pdf2html
  20. app-text/pdfedit
  21. dev-db/mysql-workbench
  22. dev-db/pgadmin3
  23. dev-java/javacc
  24. dev-java/sun-jre-bin
  25. dev-libs/boost
  26. dev-libs/hyphen
  27. dev-python/pyinotify
  28. dev-util/ccache
  29. dev-util/codeblocks
  30. dev-vcs/mercurial
  31. dev-vcs/subversion
  32. gnome-extra/gnome-utils
  33. gnome-extra/zenity
  34. mail-client/thunderbird
  35. media-fonts/corefonts
  36. media-fonts/freefonts
  37. media-fonts/liberation-fonts
  38. media-fonts/terminus-font
  39. media-gfx/gimp
  40. media-gfx/ristretto
  41. media-sound/despotify
  42. media-sound/lastfmplayer
  43. media-sound/spotify
  44. media-video/mplayer2
  45. net-analyzer/iftop
  46. net-analyzer/nmap
  47. net-analyzer/traceroute
  48. net-firewall/iptables
  49. net-fs/curlftpfs
  50. net-ftp/ftp
  51. net-im/pidgin
  52. net-mail/fetchmail
  53. net-misc/bridge-utils
  54. net-misc/dhcpcd
  55. net-misc/openntpd
  56. net-misc/spice-gtk
  57. net-misc/telnet-bsd
  58. net-misc/vinagre
  59. net-p2p/qbittorrent
  60. net-print/foomatic-db-ppds
  61. net-print/foomatic-filters-ppds
  62. net-wireless/iwl3945-ucode
  63. net-wireless/wireless-tools
  64. net-wireless/wpa_supplicant
  65. sci-calculators/galculator
  66. sys-apps/dmidecode
  67. sys-apps/flashrom
  68. sys-apps/hdparm
  69. sys-apps/hwinfo
  70. sys-apps/less
  71. sys-apps/lm_sensors
  72. sys-apps/mlocate
  73. sys-apps/portage
  74. sys-apps/usbutils
  75. sys-apps/usermode-utilities
  76. sys-block/gpart
  77. sys-block/gparted
  78. sys-block/ms-sys
  79. sys-boot/grub-static
  80. sys-boot/unetbootin
  81. sys-devel/gcc
  82. sys-devel/prelink
  83. sys-fs/aufs3
  84. sys-fs/dosfstools
  85. sys-fs/ntfs3g
  86. sys-fs/ntfsprogs
  87. sys-fs/squashfs-tools
  88. sys-kernel/genkernel
  89. sys-kernel/gentoo-sources
  90. sys-power/acpid
  91. sys-power/powertop
  92. sys-process/atop
  93. sys-process/iotop
  94. sys-process/nmon
  95. sys-process/time
  96. sys-process/vixie-cron
  97. www-client/firefox
  98. www-client/links
  99. www-client/lynx
  100. x11-apps/setxkbmap
  101. x11-apps/xrandr
  102. x11-base/xorg-drivers
  103. x11-base/xorg-server
  104. x11-libs/qt-meta
  105. x11-libs/qt-qt3support
  106. x11-libs/vte
  107. x11-misc/gtkdialog
  108. x11-misc/slim
  109. x11-terms/terminal
  110. xfce-base/thunar
  111. xfce-base/xfce4-meta
  112. xfce-extra/thunar-archive-plugin
  113. xfce-extra/thunar-volman
  114. xfce-extra/tumbler
  115. xfce-extra/xfce4-cpugraph-plugin
  116. xfce-extra/xfce4-mixer
  117. xfce-extra/xfce4-screenshooter
  118. xfce-extra/xfce4-sensors-plugin

You can find many plugins designed for Xfce. For example you might need a panel plugin which might help you to switch the keyboard layout between ENG and your native language. Or you might need a panel plugin which inform you about the memory ussage, weather forecast, volume control, etc. There exists many others but these can be handy and in my case I need them at least one time every day.

Because I would prefer to keep my system as lightweight as possible rather then loading and running these plugins round the clock, I was thinking to a way of achieving (almost) the same results but with fewer resources. I had already the libnotify installed so I have a program called notify-send which basically is capable to pop-up a balloon message with a title, a body and an icon on the left. I also have some Xfce icons pre-installed into the /usr/share/icons. So I had wrote few lightweight bash scripts that provided almost the same information to me:

  • [k] switch_kbs : switch keyboard layout (9)
  • [k] showfreem : display the physical available memory (1)
  • [k] weather : check the meteo station for your location and display the today (24h) forecast (66)
  • [k] volumctrl : change the volume control (raise, lower, toggle mute/unmute) (22)
  • [s] monitor_wifi : monitors your wifi connection and popup status information (26)
  • [s] xrandr : enable/disable your second monitor (dual monitor) (1)
  • [s] battery_status : check your laptop battery status and display a popup balloon with the status info (36)
  • [s] fetchmail : check for your email periodically (eg: every 5 minutes) (1)
  • [k] printer : start CUPS only when you need it (15)
  • [k] dualmon : switch from single to multi monitor and vice-versa (32)
  • [s] monitor_usb-storage : monitors when usb-storage is attached/removed

Note : [k] means that they can be called by keyboard shortcuts, [s] means they are loaded at session start-up and runs the same way a daemons does. The number at the end of line within parentheses represents the total number of code lines the bash script contains (fewer means a very lightweight script).

If you will ask why should I reinvent the wheel, the explanation is quite simple : I don't! In fact I am using the programs already installed on my Gentoo but instead of having 8 plugins which needs to stay into the memory all day long (and to run, of course) I have 8 bash scripts which collect (almost) the same info (from the Linux /proc or /dev) as these plugins does, BUT the most of them are running and loaded into the memory ONLY when I need them, when I call them.

For exemple, I have defined a keyboard shortcut (yes, Xfce rocks!) that will call switch_kbs bash script every time when I press Shift+CapsLook. So my keyboard layout is changed and I get a popup notification about that:

minimalist gentoo

Click for detailed article...

Also to find out the total physical RAM available to your system I have created a keyboard shortcut (Ctrl+Alt+F) which will call my showfreem bash script which will popup a simple balloon like the bellow:

minimalist gentoo

If you would like to checkout from time to time how will looks the weather today you can have a bash script like mine which will collect the info from the weather meteo station and will pop-up a balloon like the following:

minimalist gentoo

Click for detailed article...

Well, I don't have a permanent volume control plugin loaded into my desktop so I had wrote a bash script which basically can increase/decrease/toggle my system volume and will pop-up a balloon info like the following:

minimalist gentoo

Click for detailed article...

Well, sometimes you need to monitor some processes so you will need a daemon alike script to do that and which should be capable to notify you about the new status. This can be achieve also using a bash script and libnotify. I have done this to monitor my wireless connection (to notify me any time when the connection goes down/up). A sample notification can look like this one:

minimalist gentoo

Click for detailed article...

The "daemon" is in fact a bash script which will check for every 5 seconds the wireless new status, if it is different than the old status than it will popup a balloon like the one above. Also it will notify when connection becomes alive, when script starts or ends. It is something easy to cook at home, something like a "do it yourself" kit.

Also, when you are working with a laptop you need to be notified when your AC is unplugged or when your battery goes under 50%, etc. I have the same requirement so I had wrote a little "daemon" which loads at session start-up and checks every 5 seconds the battery status. When it changes (eg: AC unplugged, AC plugged in, battery charge is less than 50%, etc) it will pop-up a balloon with info like the following:

minimalist gentoo

Click for detailed article...

I found out also very useful to have a little daemon which will check few of my email accounts every 5 minutes and if I received a new email to get a pop-up notification with details about sender email address. I achieved this very simple by writing a simple bash script which will call the fetchmail console program every 5 minutes and check all the accounts I had defined into the .fetchmailrc file which exists in my home folder. So when a new email arrive I've got a notification like the one bellow:

minimalist gentoo

Click for detailed article...

So, what is telling me this notification? It says that I have received an email from eugen@cubique.ro to my eugenmihailescux account at the gmail.com server. This account is also defined in my .fetchmailrc file, so you can have how many POP3/IMAP accounts you want defined into your .fetchmailrc, for any of them you will get a notification when new email arrives.

I don't use the printer all the time so why should I start CUPS every time even if I am only using it once per week? Well, I had wrote a bash script that starts/stops CUPS from a keyboard shortcut and inform me about this:

minimalist gentoo

Click for detailed article...

When working with multi-monitors is nice to be able to switch some of them on/off quickly. I had wrote a bash script that allows me to switch from my laptop monitor to both laptop+external monitor and back to only one. You might have only one or even more external monitors. When you switch on/off the others monitors a balloon notification like the one below will appear:

minimalist gentoo

Click for detailed article...

A feature that I miss from other distro is the ability to get notified when a USB storage is attached/remove. Well, I am sure that Xfce/Gnome/etc have such applet/plugin but I would prefer (for reasons I already mentioned few times) to keep things simple. So I have my own bash script which runs at X session start-up and when new USB storage device is attached/removed I get a balloon notification:

Minimalist Gentoo

Click for detailed article...

Conclusion :

  • a Linux distro that can boot in about 20 seconds (take a short look at the .config, a very capable kernel)
  • a Linux distro that will take maximum 150MB RAM (including kernel, X server, Xfce session); the rest remains available for other apps
  • nice 8 desktop lightweight features that replace the equivalent Xfce plugins in just 170 lines of bash code

I had played with Ubuntu Desktop for a while and also with all Windows versions from Win3x to Win7. At the end of the day I can only say this : Gentoo rocks! (because it's faster, it's simpler, it's far customizable than any other distro).

Now, if you think that this article was interesting don't forget to rate it. It shows me that you care and thus I will continue write about these things.

The following two tabs change content below.
Minimalist Gentoo

Eugen Mihailescu

Founder/programmer/one-man-show at Cubique Software
Always looking to learn more about *nix world, about the fundamental concepts of math, physics, electronics. I am also passionate about programming, database and systems administration. 16+ yrs experience in software development, designing enterprise systems, IT support and troubleshooting.
Minimalist Gentoo

Latest posts by Eugen Mihailescu (see all)

Tagged on: ,

Leave a Reply

Your email address will not be published. Required fields are marked *