From: Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
To: ALT Linux Team development discussions <devel@lists.altlinux.org>
Subject: Re: [devel] Сборка модуля ядра
Date: Mon, 17 Nov 2014 13:57:44 +0300
Message-ID: <20141117105729.GA7288@glebfm.cloud.tilaa.com> (raw)
In-Reply-To: <54689C85.7040205@mail.ru>
[-- 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 --]
next prev parent reply other threads:[~2014-11-17 10:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-16 12:45 bars sc
2014-11-17 10:57 ` Gleb Fotengauer-Malinovskiy [this message]
2014-11-17 17:35 ` bars sc
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141117105729.GA7288@glebfm.cloud.tilaa.com \
--to=glebfm@altlinux.org \
--cc=devel@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Team development discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
public-inbox-index devel
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git