# download 4.16 kernel wget --continue https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.16.tar.xz # download 4.16 -> 4.16.12 stable kernel patch wget --continue https://cdn.kernel.org/pub/linux/kernel/v4.x/patch-4.16.12.xz # download 4.16.12 -> 4.16.12-rt5 realtime kernel patch wget --continue https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patch-4.16.12-rt5.patch.xz # unpack 4.16 kernel tar xJf linux-4.16.tar.xz # apply 4.16.12 stable kernel patch xzcat patch-4.16.12.xz | patch -p 1 -d linux-4.16 # apply 4.16.12-rt5 realtime kernel patch xzcat patch-4.16.12-rt5.patch.xz | patch -p 1 -d linux-4.16 # # kernel options to be aware of # # (must be set to activate all realtime features) # CONFIG_PREEMPT_RT_FULL # # (disable prio99 watchdog debug tasks, unless really needed/wanted) # CONFIG_LOCKUP_DETECTOR # CONFIG_DETECT_HUNG_TASK # # (reduced power, but greater latencies, disable it) # (use CONFIG_HZ_100 and CONFIG_HZ_PERIODIC instead) # CONFIG_NO_HZ # # (additional NOPs inserted to each function, ok to enable so you have ftrace) # CONFIG_FTRACE # # (reduced power, but greater latencies, disable appropriately) # CONFIG_CPU_IDLE # # (may cause very large overheads and latencies, disable appropriately) # CONFIG_DEBUG_* # # (make sure these are enabled, but only use "performance") # CONFIG_CPU_FREQ_GOV_* # CONFIG_CPU_FREQ_DEFAULT_* # # (causes unnecessary processing, for systems that do not need it, # disable if not needed) # CONFIG_HIGHMEM #