Criando Kernel RT Ubuntu 12.04: mudanças entre as edições
Criou página com '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.11.tar.bz2 Baixe...' |
Sem resumo de edição |
||
| Linha 5: | Linha 5: | ||
Baixe o kernel: | Baixe o kernel: | ||
$ wget http://www.kernel.org/pub/linux/kernel/v3.x/linux-3.4. | $ wget http://www.kernel.org/pub/linux/kernel/v3.x/linux-3.4.50.tar.bz2 | ||
Baixe o patch: | Baixe o patch: | ||
$ wget http://www.kernel.org/pub/linux/kernel/projects/rt/3.4/patch-3.4. | $ 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: | 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 . | |||
# cd /usr/src/ | # cp /< diretório onde voce baixou seu patch>/patch-3.4.50-rt65.patch.bz2 . | ||
# cp /< diretório onde voce baixou seu kernel>/linux-3.4. | |||
# cp /< diretório onde voce baixou seu patch>/patch-3.4. | |||
Descompacte o kernel: | Descompacte o kernel: | ||
# tar -jxvf linux-3.4. | # tar -jxvf linux-3.4.50.tar.bz2 | ||
Mude para o diretório do kernel: | Mude para o diretório do kernel: | ||
# cd linux-3.4. | # cd linux-3.4.50 | ||
Faca o patch do kernel: | Faca o patch do kernel: | ||
# bzcat ../patch-3.4. | # bzcat ../patch-3.4.50-rt65.patch.bz2 | patch -p1 | ||
Obtenha a configuração atual no novo kernel: | Obtenha a configuração atual no novo kernel: | ||
# make oldconfig | # 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. | 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. | ||
| Linha 41: | Linha 40: | ||
Logo após isso, execute o comando: | Logo após isso, execute o comando: | ||
# make menunconfig | # make menunconfig | ||
Caso tenha algo a mudar no kernel, mude nesses menus. | Caso tenha algo a mudar no kernel, mude nesses menus. | ||
| Linha 47: | Linha 46: | ||
Ao finalizar, salve as configurações e continue como descrito abaixo: | Ao finalizar, salve as configurações e continue como descrito abaixo: | ||
# make bzImage && make modules && make modules_install | # make bzImage && make modules && make modules_install | ||
Vai demorar, por isso espere. | Vai demorar, por isso espere. | ||
| Linha 53: | Linha 52: | ||
Após finalizar sem erro, agora é copiar o kernel para /boot: | Após finalizar sem erro, agora é copiar o kernel para /boot: | ||
# cp arch/x86_64/boot/bzImage /boot/vmlinuz-3.4. | # cp arch/x86_64/boot/bzImage /boot/vmlinuz-3.4.50.65-rt | ||
# cp System.map /boot/System.map-3.4. | # cp System.map /boot/System.map-3.4.50.65-rt | ||
# cp .config /boot/config-3.4. | # cp .config /boot/config-3.4.50.65-rt | ||
Gere a imagem: | Gere a imagem: | ||
# cd /boot | # cd /boot | ||
# mkinitrd initramfs-3.4. | # mkinitrd initramfs-3.4.50.65-rt.img 3.4.50-rt65 | ||
Atualize o grub: | Atualize o grub: | ||
# grub2-mkconfig -o /boot/grub2/grub.cfg | # grub2-mkconfig -o /boot/grub2/grub.cfg | ||
ou | |||
# update-grub | |||
Reinicie o computador para verificar se tudo está certo. | Reinicie o computador para verificar se tudo está certo. | ||
Edição das 18h17min 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.