Mudanças entre as edições de "Criando Kernel RT Ubuntu 12.04"

De LCAD
Ir para: navegação, pesquisa
m (Tiago Alves de Oliveira moveu página Criando Kernel RT linux para Criando Kernel RT Ubuntu 12.04)
(Sem diferença)

Edição das 15h17min de 28 de junho de 2013

Atualize todos os pacotes do ubuntu:

# apt-get update
# apt-get dist-upgrade

Baixe o kernel:

$ wget http://www.kernel.org/pub/linux/kernel/v3.x/linux-3.4.50.tar.bz2

Baixe o patch:

$ wget http://www.kernel.org/pub/linux/kernel/projects/rt/3.4/patch-3.4.50-rt65.patch.bz2

Logo após baixe instale os pacotes, logando como root:

$ apt-get install gcc libncurses5-dev linux-headers-3.5.0-34

Após instalar os pacotes, digite:

# cd /usr/src/
# cp /< diretório onde voce baixou seu kernel>/linux-3.4.50.tar.bz2 .
# cp /< diretório onde voce baixou seu patch>/patch-3.4.50-rt65.patch.bz2 .

Descompacte o kernel:

# tar -jxvf linux-3.4.50.tar.bz2

Mude para o diretório do kernel:

# cd linux-3.4.50

Faca o patch do kernel:

# bzcat ../patch-3.4.50-rt65.patch.bz2 | patch -p1

Obtenha a configuração atual no novo kernel:

# make oldconfig

O kernel vai fazer algumas perguntas, fique atento quanto ele perguntar sobre o kernel, que tem que ser a opção real time e sem modo debug.

Logo após isso, execute o comando:

# make menunconfig

Caso tenha algo a mudar no kernel, mude nesses menus.

Ao finalizar, salve as configurações e continue como descrito abaixo:

# make bzImage && make modules && make modules_install

Vai demorar, por isso espere.

Após finalizar sem erro, agora é copiar o kernel para /boot:

# cp arch/x86_64/boot/bzImage /boot/vmlinuz-3.4.50.65-rt
# cp System.map /boot/System.map-3.4.50.65-rt
# cp .config /boot/config-3.4.50.65-rt

Gere a imagem:

# cd /boot
# mkinitrd initramfs-3.4.50.65-rt.img 3.4.50-rt65

Atualize o grub:

# grub2-mkconfig -o /boot/grub2/grub.cfg
ou
# update-grub

Reinicie o computador para verificar se tudo está certo.