{"id":44,"date":"2011-09-27T20:12:16","date_gmt":"2011-09-27T20:12:16","guid":{"rendered":"http:\/\/info.ffteixeira.net\/2011\/09\/27\/compilar-kernel-2-6-35-no-linux-mint\/"},"modified":"2011-09-27T20:12:16","modified_gmt":"2011-09-27T20:12:16","slug":"compilar-kernel-2-6-35-no-linux-mint","status":"publish","type":"post","link":"https:\/\/blog.ffteixeira.net\/?p=44","title":{"rendered":"Compilar  kernel 2.6.35 no Linux Mint"},"content":{"rendered":"<p>1)Obter o \u00faltimo kernel atrav\u00e9s deste www.kernel.org<\/p>\n<p>2)Aceder direct\u00f3ria \/usr\/src, como utilizador root:<\/p>\n<p style=\"padding-left: 30px\"><strong><em># sudo mv <\/em><em>\/linux-2.6.35.tar.bz2 \/usr\/src\/<\/em><\/strong><\/p>\n<p style=\"padding-left: 30px\"><strong><em># cd \/usr\/src\/<\/em><\/strong><\/p>\n<p style=\"padding-left: 30px\"><strong><em># sudo su\u00a0<\/em><\/strong><\/p>\n<p>3)Descompactar e criar o link simb\u00f3lico &#8216;linux&#8217;<\/p>\n<p style=\"padding-left: 30px\"><strong><em># tar -jxvf linux-2.6.35.tar.bz2<\/em><\/strong><\/p>\n<p style=\"padding-left: 30px\"><strong><em># ln -sf linux-2.6.35 linux<\/em><\/strong><\/p>\n<p style=\"padding-left: 30px\"><strong><em># cd linux\u00a0<\/em><\/strong><\/p>\n<p>* Como esse kernel \u00e9 espec\u00edfico para minha m\u00e1quina, usarei o make seguido da op\u00e7\u00e3o &#8216;localmodconfig&#8217;:<\/p>\n<p style=\"padding-left: 30px\"><strong><em># make localmodconfig\u00a0<\/em><\/strong><\/p>\n<p><span style=\"text-decoration: underline\"><em>* teclar no ENTER em todas as op\u00e7\u00f5es.<\/em><\/span><\/p>\n<p>4)In\u00edciar a compila\u00e7\u00e3o:<\/p>\n<p>* Comando para multi-core:<\/p>\n<p style=\"padding-left: 30px\"><strong><em># INSTALL_MOD_STRIP=1 CONCURRENCY_LEVEL=3 fakeroot make-kpkg &#8211;initrd &#8211;append-to-version=-custom &#8211;revision=+1.0 kernel_image kernel_headers\u00a0<\/em><\/strong><\/p>\n<p>* Comando para single-core:<\/p>\n<p><strong><em># fakeroot make-kpkg &#8211;initrd &#8211;append-to-version=<span style=\"font-style: normal\"><em>-custom<\/em><\/span>\u00a0&#8211;revision=+1.0 kernel_image kernel_headers\u00a0<\/em><\/strong><\/p>\n<p style=\"padding-left: 30px\">\n<p>* em &#8216;&#8211;append-to-version=<em>-custom<\/em>&#8216;, substituam &#8216;<em>-custom<\/em>&#8216; pelo que quiserem, da mesma forma para a op\u00e7\u00e3o &#8211;revision=+1.0, se desejarem retirem essas op\u00e7\u00f5es, nesse caso ficaria assim:<\/p>\n<p style=\"padding-left: 30px\"><strong><em># fakeroot make-kpkg &#8211;initrd kernel_image kernel_headers\u00a0<\/em><\/strong><\/p>\n<p>5)Ap\u00f3s a conclus\u00e3o e cria\u00e7\u00e3o dos .debs, sa\u00edr da pasta de trabalho e efectuar a instala\u00e7\u00e3o<\/p>\n<p style=\"padding-left: 30px\"><strong><em># cd ..<\/em><\/strong><\/p>\n<p style=\"padding-left: 30px\"><strong><em># ls<\/em><\/strong><\/p>\n<p style=\"padding-left: 30px\"><strong><em># dpkg -i linux-headers-2.6.35<span style=\"font-style: normal\"><em>-custom<\/em><\/span>_+1.0_i386.deb\u00a0<\/em><\/strong><\/p>\n<p style=\"padding-left: 30px\"><strong><em># dpkg -i linux-image-2.6.35<span style=\"font-style: normal\"><em>-custom<\/em><\/span>_+1.0_i386.deb<\/em><\/strong><\/p>\n<p style=\"padding-left: 30px\"><strong><em># apt-get -f install\u00a0<\/em><\/strong><\/p>\n<p>6)Agora temos que criar o initrd, o respons\u00e1vel por carregar nossos m\u00f3dulos na inicializa\u00e7\u00e3o do sistema. Aqui tem uma curiosidade, no debian ainda usamos o utilitario mkinitrd, no ubuntu esse utilitario n\u00e3o \u00e9 mais utilizado por estar defasado, o utilitario usado agora \u00e9 o mkinitramfs<\/p>\n<p style=\"padding-left: 30px\"><strong><em>#mkinitramfs -o \/boot\/initrd.img-2.6.25.6<span style=\"font-style: normal\"><em>-custom<\/em><\/span>\u00a02.6.25.6-<\/em><em>custom<\/em><\/strong><\/p>\n<p><em>*2.6.25.6-custom reference ao directorio criado em \/lib\/modules\/<\/em><\/p>\n<p><em>Powered by:<\/em><\/p>\n<p><em>*\u00a0<a href=\"http:\/\/www.vivaolinux.com.br\/dica\/Compilando-o-kernel-2.6.35-no-Linux-Mint-Debian-Edition\">http:\/\/www.vivaolinux.com.br\/dica\/Compilando-o-kernel-2.6.35-no-Linux-Mint-Debian-Edition<\/a><\/em><\/p>\n<p><em>*\u00a0<a href=\"http:\/\/www.lichti.eti.br\/compilando-o-kernel-no-ubuntu-parte-1\/\">http:\/\/www.lichti.eti.br\/compilando-o-kernel-no-ubuntu-parte-1\/<\/a><\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1)Obter o \u00faltimo kernel atrav\u00e9s deste www.kernel.org 2)Aceder direct\u00f3ria \/usr\/src, como utilizador root: # sudo mv \/linux-2.6.35.tar.bz2 \/usr\/src\/ # cd \/usr\/src\/ # sudo su\u00a0 3)Descompactar e criar o link simb\u00f3lico &#8216;linux&#8217; # tar -jxvf linux-2.6.35.tar.bz2 # ln -sf linux-2.6.35 linux &hellip; <a href=\"https:\/\/blog.ffteixeira.net\/?p=44\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-44","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=\/wp\/v2\/posts\/44","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=44"}],"version-history":[{"count":0,"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=\/wp\/v2\/posts\/44\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=44"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=44"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=44"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}