* Re: [devel] Сборка модуля ядра
2014-11-16 12:45 [devel] Сборка модуля ядра bars sc
@ 2014-11-17 10:57 ` Gleb Fotengauer-Malinovskiy
2014-11-17 17:35 ` bars sc
0 siblings, 1 reply; 3+ messages in thread
From: Gleb Fotengauer-Malinovskiy @ 2014-11-17 10:57 UTC (permalink / raw)
To: ALT Linux Team development discussions
[-- Attachment #1: Type: text/plain, Size: 3769 bytes --]
On Sun, Nov 16, 2014 at 03:45:57PM +0300, bars sc wrote:
> Здравствуйте. Не могу разобраться со сборкой модуля ядра в git.alt. Wiki
> прочитал, но все равно не получается.
> 1)Нужно ли для сборки модуля ядра (fglrx) клонировать к себе на винт
> git-репы ядра? При клонировании
>
> $ git clone git://git.altlinux.org/people/boyarsh/packages/kernel-image.git
> kernel
> Cloning into 'kernel'...
> remote: fatal: Out of memory? mmap failed: Cannot allocate memory
У вас не хватило памяти. Лучше, наверное, скачивать репозиторий из /gears:
/gears/k/kernel-image-std-def.git или какой вам нужен.
Вообще, репозитории где выключен repack могут быть довольно тяжёлыми.
> remote: aborting due to possible repository corruption on the remote side.
> fatal: early EOF
> fatal: index-pack failed
>
> Или это можно как-то обойти?
На сколько я помню, для сборки по новой схеме, ядро уже не нужно. Вся
необходимая информация о ядре собирается уже при сборке через
kernel-headers-modules.
> 2)При сборке модуля
>
> $ buildmodules --hsh-options='--apt-config ./apt.conf' --tag --commit -k un-def fglrx
> * Kernel: 3.17.2-un-def-alt1
> * Package 1 of 1: kernel-modules-fglrx-un-def: FAILED
> Finished: 0 ok, 1 failed, 0 skipped
Вы пытаетесь использовать инструкцию с wiki, про которую на wiki написано,
что она устарела.
> вот что в логе:
>
> fatal: Needed a single revision
> gear: Invalid commit "template/fglrx/sisyphus"
> buildmodules: 'gear --describe -t template/fglrx/sisyphus' failed
>
> чего не хватает?
> Нельзя ли привести пример сборки модуля ядра от и до с краткими пояснениями?
Самый простой способ локально собрать один модуль для одного ядра:
http://www.altlinux.org/%D0%A1%D0%B1%D0%BE%D1%80%D0%BA%D0%B0_%D0%BC%D0%BE%D0%B4%D1%83%D0%BB%D0%B5%D0%B9_%D1%8F%D0%B4%D1%80%D0%B0#build_new
$ cd modules
$ git config --add gear.specsubst.kflavour std-def
$ git checkout template/fglrx/sisyphus
$ gear --commit --hasher hsh
Минус этого подхода в том, что kflavour довольно неудобно менять. И,
следовательно, собирать для нескольких ядер неудобно.
Более удобный подход -- предварительно создать теги и собирать из них.
http://www.altlinux.org/%D0%A1%D0%B1%D0%BE%D1%80%D0%BA%D0%B0_%D0%BC%D0%BE%D0%B4%D1%83%D0%BB%D0%B5%D0%B9_%D1%8F%D0%B4%D1%80%D0%B0#tags_new
km-create-tag создаёт теги вида
'$distribution/kernel-modules-$modulename-$flavour-$version-$release',
т.е. после их создания, можно собирать модули с помощью gear, например:
$ km-create-tag -k std-def fglrx
$ cat out/taglist
sisyphus/kernel-modules-fglrx-std-def-14.301.1001-alt3
$ gear -t sisyphus/kernel-modules-fglrx-std-def-14.301.1001-alt3 --hasher hsh
В итоге второго варианта у вас есть подписанные теги, готовые к отправке в
сборочницу. Список этих тегов есть в out/taglist.
--
glebfm
[-- Attachment #2: Type: application/pgp-signature, Size: 181 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread