{"id":1300,"date":"2020-08-07T16:40:44","date_gmt":"2020-08-07T07:40:44","guid":{"rendered":"https:\/\/manatails.net\/blog\/?p=1300"},"modified":"2022-04-03T13:48:53","modified_gmt":"2022-04-03T04:48:53","slug":"compiling-new-linux-kernel","status":"publish","type":"post","link":"https:\/\/manatails.net\/blog\/2020\/08\/compiling-new-linux-kernel\/","title":{"rendered":"Compiling new Linux Kernel"},"content":{"rendered":"<p>Those are the commands I used to create custom kernel packages for Debian\/Ubuntu based systems.<\/p>\n<p>1. Install required packages<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">sudo apt-get install build-essential libncurses-dev bison flex libssl-dev libelf-dev<\/pre>\n<p>2. Extract source code and import config from current kernel<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">cd linux-5.x.x\r\ncp -v \/boot\/config-$(uname -r) .config\r\n\r\nmake olddefconfig<\/pre>\n<p>3. Edit\u00a0 .config file and set the following variables<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">CONFIG_SYSTEM_TRUSTED_KEYS = \"\"\r\nCONFIG_DEBUG_INFO=n<\/pre>\n<p>Building without black SYSTEM_TRUSTED_KEYS will fail the build.<br \/>\nBuilding with debug info will take much more time and space<\/p>\n<p>Compile code and generate deb package, add LOCALVERSION if you want to add a kernel suffix<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">make clean\r\nmake -j8 deb-pkg LOCALVERSION=-custom<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Those are the commands I used to create custom kernel packages for Debian\/Ubuntu based systems. 1. Install required packages sudo apt-get install build-essential libncurses-dev bison flex libssl-dev libelf-dev 2. Extract source code and import config from current kernel cd linux-5.x.x cp -v \/boot\/config-$(uname -r) .config make olddefconfig 3. Edit\u00a0 .config file and set the following &hellip; <a href=\"https:\/\/manatails.net\/blog\/2020\/08\/compiling-new-linux-kernel\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Compiling new Linux Kernel<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[131,14],"class_list":["post-1300","post","type-post","status-publish","format-standard","hentry","category-computer","tag-kernel","tag-linux"],"_links":{"self":[{"href":"https:\/\/manatails.net\/blog\/wp-json\/wp\/v2\/posts\/1300","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/manatails.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/manatails.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/manatails.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/manatails.net\/blog\/wp-json\/wp\/v2\/comments?post=1300"}],"version-history":[{"count":5,"href":"https:\/\/manatails.net\/blog\/wp-json\/wp\/v2\/posts\/1300\/revisions"}],"predecessor-version":[{"id":1340,"href":"https:\/\/manatails.net\/blog\/wp-json\/wp\/v2\/posts\/1300\/revisions\/1340"}],"wp:attachment":[{"href":"https:\/\/manatails.net\/blog\/wp-json\/wp\/v2\/media?parent=1300"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/manatails.net\/blog\/wp-json\/wp\/v2\/categories?post=1300"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/manatails.net\/blog\/wp-json\/wp\/v2\/tags?post=1300"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}