From: "Anton D. Kachalov" <mouse@altlinux.org>
To: devel-kernel@altlinux.ru
Subject: [d-kernel] Макросы поддерживаемых архитектур для сборки kernel-image
Date: Thu, 14 Jul 2005 18:16:38 +0400
Message-ID: <20050714141638.GA19991@basalt.office.altlinux.org> (raw)
Вот изготовил пару макросов.
<кусь>
%_kernel_config_offset 1
%_kernel_arches %nil
%set_kernel_arches() %global _kernel_arches %* \
%( \
echo "ExclusiveArch: %*" \
n=%_kernel_config_offset \
for arch in %_kernel_arches; do \
echo "Source$n: config-%kernel_base_version-%flavour.$arch" \
n=$(($n+1)) \
done \
)
%get_kernel_config() %{expand:%%SOURCE%( \
n=%_kernel_config_offset \
for arch in %_kernel_arches; do \
if [ "$arch" = "%1" ]; then \
echo $n \
exit \
fi \
n=$((n+1)) \
done \
echo "__No_such_architecture__%{1}" \
)}
</кусь>
Пользоваться так. В самом начале спека вместо Source1: config-... и
ExclusiveArch: ... вставляем макрос: %set_kernel_arches i586 или
%set_kernel_arches i586 i686 athlon x86_64
При этом конфиги для каждой архитектуры должны именоваться как
config-%kernel_base_version-%flavour.архитектура
Введение более жёсткий правил на --target сделает более корректную
сборку ядер под определённый процессор. Т.е. если у нас нет config.i686,
то собрать ядрышко с --target=i686 не получится, что само по себе верно,
т.к. конфиг ядра создан для i586, а не i686.
Далее, в месте, где копируется конфиг на место дефолтного в сборочном
дереве, нужно написать что-то вроде такого:
%__cp -vf %{get_kernel_config %base_arch} .config
Замечания, предложения? Данные макросы, в первую очередь, созданы
необходимостью сборки из одного src.rpm ядер как и под i586, так и под
x86_64.
--
mouse
next reply other threads:[~2005-07-14 14:16 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-14 14:16 Anton D. Kachalov [this message]
2005-07-14 14:24 ` Anton D. Kachalov
2005-07-17 18:07 ` [d-kernel] " Konstantin A. Lepikhov
2005-07-18 13:09 ` Anton D. Kachalov
2005-07-18 15:56 ` Konstantin A. Lepikhov
2005-07-18 16:08 ` Anton D. Kachalov
2005-07-18 16:09 ` Sergey Vlasov
2005-07-18 16:29 ` Anton D. Kachalov
2005-07-18 16:37 ` Konstantin A. Lepikhov
2005-07-18 16:38 ` Konstantin A. Lepikhov
2005-07-18 16:40 ` Anton D. Kachalov
2005-07-18 17:38 ` Konstantin A. Lepikhov
2005-07-18 18:59 ` Anton D. Kachalov
2005-07-18 19:51 ` Konstantin A. Lepikhov
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=20050714141638.GA19991@basalt.office.altlinux.org \
--to=mouse@altlinux.org \
--cc=devel-kernel@altlinux.ru \
/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 kernel packages development
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel-kernel/0 devel-kernel/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-kernel devel-kernel/ http://lore.altlinux.org/devel-kernel \
devel-kernel@altlinux.org devel-kernel@altlinux.ru devel-kernel@altlinux.com
public-inbox-index devel-kernel
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel-kernel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git