Difference between pages "Subarches" and "Install/pt-br/Kernel"

From Funtoo
(Difference between pages)
Jump to navigation Jump to search
 
 
Line 1: Line 1:
= Funtoo Linux Subarches =
=== Configurando e instalando o kernel Linux ===


This page provides an overview of Funtoo Linux subarches.
Agora é hora de construir e instalar um kernel Linux, o qual é o coração de qualquer sistema Funtoo Linux. O kernel é carregado pelo boot loader, e interfaces diretamente com o hardware do seu sistema, e permite programas regulares (userspace) serem executador.


== AMD Processors ==
Um kernel deve ser configurado propriamente para o hardware do seu sistema, desse modo ele suporta seus hard drives, file systems, placas de rede, e assim por diante. Usuários de Linux mais experientes pode escolher instalar o kernel sources e configurar e instalar seu próprio kernel. Se você não sabe como fazer isso, nós fornecemos ebuilds que construirão automaticamente um kernel "universal", módulos e initramfs para a inicialização do seu sistema que suporte todo o hardware. Esse é um jeito extremamente simples de construção de um kernel que colocará seu sistema para inicializar.


=== amd64-piledriver ===
Qual é o nosso objetivo? Para construir um kernel que reconhecerá todo o hardware em seu sistema necessário para inicialização, você será cumprimentado por um prompt de login amigável depois que a instalação estiver completa. Esses instruções lhe guiarão através do processo de instalação de um kernel no modo "fácil" -- sem exigir configuração do usuário, ao utilizar um kernel "universal".


The '''amd64-piledriver''' subarch supports the [[Wikipedia:Piledriver (microarchitecture)|AMD Piledriver microarchitecture]] produced by AMD from mid-2012 through 2015, which is the successor to the [[Wikipedia:Bulldozer (microarchitecture)|AMD bulldozer microarchitecture]].
==== Package Sets ====
Piledriver CPUs and APUs are available that use the [[Wikipedia:FM2 Socket|FM2 socket]]. Piledriver CPUs use the [[Wikipedia:Socket_AM3+|AM3+ socket]].


Desktop piledriver CPU and APUs include '''Vishera''' (FX-8350, FX-8370),  '''[[Wikipedia:List_of_AMD_accelerated_processing_unit_microprocessors#Virgo:_.22Trinity.22_.282012.2C_32_nm.29|Trinity A-series APUs]]''' (A6-5400K, A10-5800K) and '''[[Wikipedia:http://en.wikipedia.org/wiki/List_of_AMD_accelerated_processing_unit_microprocessors#.22Richland.22_.282013.2C_32_nm.29_2|Richland A-series APUs]]'''.  
Antes que estalemos um kernel, vamos cobrir um recurso do Portage chamado package sets. Portage, o sistema gerenciador/ports de pacotes para o Funtoo Linux, manterá rastro de pacotes do sistema assim como pacotes que você tem instalado ao invocar <code>emerge</code> diretamente. Esses pacotes que são parte do sistema base são considerados parte do conjunto de pacote do "sistema", enquanto pacotes que você tem instalado ao digitá-los na linha de comando (tal qual "gnome" em <code>emerge gnome</code>) serão adicionados ao conjunto de pacote "world". Isso proporciona um jeito fácil de atualizar o sistema inteiro.


Server piledriver CPUs include '''Delhi''' (Opteron 3300-series), '''Seoul''' (Opteron 4300-series)  and '''Abu Dhabi''' (Opteron 6300-series). [[Wikipedia:Opteron#Opteron_.2832_nm_SOI.29_-_Piledriver_Microarchitecture|More information here]].
No entanto, as vezes é bom ser capaz de atualizar o kernel todo por sim só, ou deixar uma atualização do kernel fora da sua regular atualização completa do sistema. Para fazer isso, criaremo uma nova configuração de pacote chamada "kernel".


Piledriver adds several new instructions over bulldozer, so AMD bulldozer systems cannot run amd64-piledriver-optimized stages. However, this subarch is  instruction-compatible with its successor, the, so amd64-piledriver stages can run on amd64-steamroller systems, and vice versa.
==== Configuração de Pacote do Kernel ====


=== amd64-steamroller ===
Para criar a configuração de pacote do kernel, realize os seguintes passos:


The '''amd64-steamroller''' subarch supports the  [[Wikipedia:Steamroller (microarchitecture)|AMD steamroller microarchitecture]], produced from early 2014. It is the successor to the [[Wikipedia:Piledriver (microarchitecture)|AMD Piledriver microarchitecture]].
<console>
Steamroller APUs are available that use the [[Wikipedia:FM2+ Socket|FM2+ socket]] and  [[Wikipedia:Socket_FP3|FP3 socket]] (mobile.)
(chroot) # ##i##mkdir /etc/portage/sets
(chroot) # ##i##echo sys-kernel/debian-sources > /etc/portage/sets/kernel
</console>


Desktop steamroller APUs include the [[Wikipedia:AMD_Accelerated_Processing_Unit#Steamroller_architecture_.282014.29:_Kaveri|Kaveri A-Series APUs]], such as the quad-core AMD A10-7850K APU. Steamroller APUs are also available in mobile versions. Server steamroller APUs include the '''Berlin APUs''', which are not yet released.
Agora, vamos querer definir uma variável USE para dizer ao <code>debian-sources</code> que construa um kernel "universal" e o initramfs para nós, para levar Funtoo Linux a funcionamento na inicialização. Para fazer isso, vamos configurar a variável <code>binary</code> USE para <code>debian-sources</code>, como a seguir:


Amd64-steamroller subarches are instruction-compatible with amd64-piledriver, but add new instructions over amd64-bulldozer.
<console>
(chroot) # ##i##echo "sys-kernel/debian-sources binary" >> /etc/portage/package.use
</console>


=== amd64-jaguar ===
Se as varáveis USE forem novas para você, você estará se familiarizando com elas um pouco mais enquanto utiliza o Funtoo Linux. At their essence, ela são "switches" que você pode definir para configurar opções que podem ser construídas em vários pacotes. Elas são utilizadas para assim personalizar seu Funtoo Linux system para que conheça as suas exatas necessidades. We added support for a <code>binary</code> USE flag to the <code>debian-sources</code> ebuilds, as well as a few other of our kernel ebuilds, to make it easier for new users to get Funtoo Linux up and running.
 
Now, when we just want to update our system's packages, we'll type <code>emerge -auDN @world</code>, and it will update our world set, leaving out the kernel. Likewise, when we just want to update our kernel, we'll type <code>emerge -au @kernel</code>, and it will update our kernel, leaving out the world set.
 
==== Building the Kernel ====
 
{{Fancynote|1=
See [[Funtoo Linux Kernels]] for a full list of kernels supported in Funtoo Linux. We recommend <code>debian-sources</code> for new users.}}
 
{{fancyimportant|1=
<code>debian-sources</code> with <code>binary</code> USE flag requires at least 14GB free in <code>/var/tmp</code> and takes around 1 hour to build on a Intel Core i7 Processor.}}
 
Let's emerge our kernel:
 
<console>
(chroot) # ##i##emerge -1 @kernel
</console>
 
{{Important|Right now, the <code>-1</code> option is required to not add our <code>@kernel</code> set to <code>world-sets</code>. This allows you to emerge it independently from @world. If you forget to use this option, edit <code>/var/lib/portage/world-sets</code> and remove the <code>@kernel</code> line. This will prevent kernel updates from being included in @world updates.}}
 
Note that while use of the <code>binary</code> USE flag makes installing a working kernel extremely simple, it is one part of Funtoo Linux that takes a ''very'' long time to build from source, because it is building a kernel that supports ''all'' hardware that Linux supports! So, get the build started, and then let your machine compile. Slower machines can take up to several hours to build the kernel, and you'll want to make sure that you've set <code>MAKEOPTS</code> in <code>/etc/portage/make.conf</code> to the number of processing cores/threads (plus one) in your system before starting to build it as quickly as possible -- see the [[#/etc/portage/make.conf|/etc/portage/make.conf section]] if you forgot to do this.
 
{{fancynote|NVIDIA card users: the <code>binary</code> USE flag installs the Nouveau drivers which cannot be loaded at the same time as the proprietary drivers, and cannot be unloaded at runtime because of KMS. You need to blacklist it under <code>/etc/modprobe.d/</code>.}}
 
{{fancynote|For an overview of other kernel options for Funtoo Linux, see [[Funtoo Linux Kernels]]. There may be modules that the Debian kernel doesn't include, a situation where [http://www.funtoo.org/wiki/Funtoo_Linux_Kernels#Using_Debian-Sources_with_Genkernel genkernel] would be useful. Also be sure to see [[:Category:Hardware Compatibility|hardware compatibility]] information.}}
 
Once <code>emerge</code> completes, you'll have a brand new kernel and initramfs installed to <code>/boot</code>, plus kernel headers installed in <code>/usr/src/linux</code>, and you'll be ready to configure the boot loader to load these to boot your Funtoo Linux system.

Revision as of 18:39, February 25, 2015

Configurando e instalando o kernel Linux

Agora é hora de construir e instalar um kernel Linux, o qual é o coração de qualquer sistema Funtoo Linux. O kernel é carregado pelo boot loader, e interfaces diretamente com o hardware do seu sistema, e permite programas regulares (userspace) serem executador.

Um kernel deve ser configurado propriamente para o hardware do seu sistema, desse modo ele suporta seus hard drives, file systems, placas de rede, e assim por diante. Usuários de Linux mais experientes pode escolher instalar o kernel sources e configurar e instalar seu próprio kernel. Se você não sabe como fazer isso, nós fornecemos ebuilds que construirão automaticamente um kernel "universal", módulos e initramfs para a inicialização do seu sistema que suporte todo o hardware. Esse é um jeito extremamente simples de construção de um kernel que colocará seu sistema para inicializar.

Qual é o nosso objetivo? Para construir um kernel que reconhecerá todo o hardware em seu sistema necessário para inicialização, você será cumprimentado por um prompt de login amigável depois que a instalação estiver completa. Esses instruções lhe guiarão através do processo de instalação de um kernel no modo "fácil" -- sem exigir configuração do usuário, ao utilizar um kernel "universal".

Package Sets

Antes que estalemos um kernel, vamos cobrir um recurso do Portage chamado package sets. Portage, o sistema gerenciador/ports de pacotes para o Funtoo Linux, manterá rastro de pacotes do sistema assim como pacotes que você tem instalado ao invocar emerge diretamente. Esses pacotes que são parte do sistema base são considerados parte do conjunto de pacote do "sistema", enquanto pacotes que você tem instalado ao digitá-los na linha de comando (tal qual "gnome" em emerge gnome) serão adicionados ao conjunto de pacote "world". Isso proporciona um jeito fácil de atualizar o sistema inteiro.

No entanto, as vezes é bom ser capaz de atualizar o kernel todo por sim só, ou deixar uma atualização do kernel fora da sua regular atualização completa do sistema. Para fazer isso, criaremo uma nova configuração de pacote chamada "kernel".

Configuração de Pacote do Kernel

Para criar a configuração de pacote do kernel, realize os seguintes passos:

(chroot) # mkdir /etc/portage/sets
(chroot) # echo sys-kernel/debian-sources > /etc/portage/sets/kernel

Agora, vamos querer definir uma variável USE para dizer ao debian-sources que construa um kernel "universal" e o initramfs para nós, para levar Funtoo Linux a funcionamento na inicialização. Para fazer isso, vamos configurar a variável binary USE para debian-sources, como a seguir:

(chroot) # echo "sys-kernel/debian-sources binary" >> /etc/portage/package.use

Se as varáveis USE forem novas para você, você estará se familiarizando com elas um pouco mais enquanto utiliza o Funtoo Linux. At their essence, ela são "switches" que você pode definir para configurar opções que podem ser construídas em vários pacotes. Elas são utilizadas para assim personalizar seu Funtoo Linux system para que conheça as suas exatas necessidades. We added support for a binary USE flag to the debian-sources ebuilds, as well as a few other of our kernel ebuilds, to make it easier for new users to get Funtoo Linux up and running.

Now, when we just want to update our system's packages, we'll type emerge -auDN @world, and it will update our world set, leaving out the kernel. Likewise, when we just want to update our kernel, we'll type emerge -au @kernel, and it will update our kernel, leaving out the world set.

Building the Kernel

   Note

See Funtoo Linux Kernels for a full list of kernels supported in Funtoo Linux. We recommend debian-sources for new users.

   Important

debian-sources with binary USE flag requires at least 14GB free in /var/tmp and takes around 1 hour to build on a Intel Core i7 Processor.

Let's emerge our kernel:

(chroot) # emerge -1 @kernel
   Important

Right now, the -1 option is required to not add our @kernel set to world-sets. This allows you to emerge it independently from @world. If you forget to use this option, edit /var/lib/portage/world-sets and remove the @kernel line. This will prevent kernel updates from being included in @world updates.

Note that while use of the binary USE flag makes installing a working kernel extremely simple, it is one part of Funtoo Linux that takes a very long time to build from source, because it is building a kernel that supports all hardware that Linux supports! So, get the build started, and then let your machine compile. Slower machines can take up to several hours to build the kernel, and you'll want to make sure that you've set MAKEOPTS in /etc/portage/make.conf to the number of processing cores/threads (plus one) in your system before starting to build it as quickly as possible -- see the /etc/portage/make.conf section if you forgot to do this.

   Note

NVIDIA card users: the binary USE flag installs the Nouveau drivers which cannot be loaded at the same time as the proprietary drivers, and cannot be unloaded at runtime because of KMS. You need to blacklist it under /etc/modprobe.d/.

   Note

For an overview of other kernel options for Funtoo Linux, see Funtoo Linux Kernels. There may be modules that the Debian kernel doesn't include, a situation where genkernel would be useful. Also be sure to see hardware compatibility information.

Once emerge completes, you'll have a brand new kernel and initramfs installed to /boot, plus kernel headers installed in /usr/src/linux, and you'll be ready to configure the boot loader to load these to boot your Funtoo Linux system.