Sufixo da versão do kernel do Linux + CONFIG_LOCALVERSION

5

Na inicialização do sistema, vejo atualmente o Linux 4.0.0-rc6yy e 4.0.0-rc6yy.old no menu do gerenciador de inicialização. Eu não tenho certeza de onde eles vieram. Eu suspeito que "yy" é arbitrário, mas alguém pode explicar o sufixo ".old"?

Alguém também pode explicar o que CONFIG_LOCALVERSION e CONFIG_LOCALVERSION_AUTO é de .config? Eu os procurei, mas ainda não estou claro sobre o uso deles. Muito obrigado.

    
por Zephyr 03.04.2015 / 02:02

1 resposta

5

Ao instalar o seu kernel, o script responsável copia kernel image e initramfs para o diretório /boot . Se uma imagem do kernel anterior com o mesmo nome já existir, ela será renomeada anexando .old ao seu nome.

CONFIG_LOCALVERSION :

Append an extra string to the end of your kernel version. This will show up when you type uname, for example. The string you set here will be appended after the contents of any files with a filename matching localversion* in your object and source tree, in that order. Your total string can be a maximum of 64 characters.

Isso significa que, se você quiser, pode fornecer um número de versão especial ou um nome ao seu kernel personalizado. Se você digitar "-MyNewKernel", seu kernel deve estar: Linux 4.0.0-MyNewKernel .

CONFIG_LOCALVERSION_AUTO :

This will try to automatically determine if the current tree is a release tree by looking for git tags that belong to the current top of tree revision.
A string of the format -gxxxxxxxx will be added to the localversion appended after any matching localversion1 files, and after the value set in CONFIG_LOCALVERSION.

1 (The actual string used here is the first eight characters produced by running the command:

$ git rev-parse --verify HEAD

which is done within the script "scripts/setlocalversion".)

Isso significa que, se estiver ativada, a tag exclusiva SCM (gerenciamento de controle de origem) relatada por setlocalversion (ou .scmversion) será anexada à versão do kernel, se ela existir. Por exemplo, se uma árvore git for encontrada, o número de revisão será anexado se existir. O resultado poderia aparecer: Linux 4.0.0-MyNewKernel-ga2cfc42 . Para obter mais informações, você pode fazer check-in em sua árvore de fontes scipts / setlocalversion.

    
por 03.04.2015 / 14:43