From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on sa.local.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ya.ru; s=mail; t=1570985098; bh=eEJ9tFgevo4CIaaw4BX+Hz43m99vM0gbzOrQSuR/Gq0=; h=Subject:From:To:Date:Message-ID; b=AzO0BO130K1Hop0rA5SyZraGQ+QF6tK2kZ4J254cWrYSqE2enjn93sSnENWsVLvzL 7MhpbpFDn01u+lB2eJFu/7I0ir38aG+jVABzWniniVZbdFnswCL7q4w1fJtNnaC0IX J8yOa/kznzfZK9vSZCDTee/zxVn2VZG2WOdUjYYg= Authentication-Results: mxback6o.mail.yandex.net; dkim=pass header.i=@ya.ru To: devel-distro@lists.altlinux.org From: =?UTF-8?B?0JDQvdGC0L7QvSDQnNC40LTRjtC60L7Qsg==?= Message-ID: Date: Sun, 13 Oct 2019 23:44:56 +0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------32E72CFB8E5A5D3B4E7E091D" Content-Language: ru Subject: [devel-distro] =?utf-8?b?0J3QtdGB0LrQvtC70YzQutC+INGP0LTQtdGAINCy?= =?utf-8?q?_stage1_=D0=B8_stage2?= X-BeenThere: devel-distro@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: Distributions development List-Id: Distributions development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Oct 2019 16:45:01 -0000 Archived-At: List-Archive: This is a multi-part message in MIME format. --------------32E72CFB8E5A5D3B4E7E091D Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Всем привет Сделал первый шажочек в сторону того, чтобы начать собирать iso с несколькими ядрами. 0001-stage1-stage2-allow-multiple-kernels.patch для mkimage-profiles, разрешает несколько ядер в stage1 и stage2 Другие два патча для mkimage. На данный момент это позволило собрать образ с несколькими ядрами для isolinux. Но меню syslinux требует доработки, нужна опция выбора ядра. -- С уважением, Антон Мидюков --------------32E72CFB8E5A5D3B4E7E091D Content-Type: text/x-patch; name="0001-mki-build-propagator-allow-multiple-kernels.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-mki-build-propagator-allow-multiple-kernels.patch" >>From 09846301adef606f42ef37d531667c38c3843f17 Mon Sep 17 00:00:00 2001 From: Anton Midyukov Date: Sun, 13 Oct 2019 23:35:03 +0700 Subject: [PATCH 1/2] mki-build-propagator: allow multiple kernels --- tools/mki-build-propagator | 47 +++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/tools/mki-build-propagator b/tools/mki-build-propagator index 365d359..691f231 100755 --- a/tools/mki-build-propagator +++ b/tools/mki-build-propagator @@ -30,34 +30,35 @@ make_exec "$chroot/.host/packimage.sh" </dev/null 2>&1; then - mkmodpack -p '/.in/${mar_modules##*/}' -o /tmp/modules -k "\$kver" -else - mkmar -r / -p '/.in/${mar_modules##*/}' -o /tmp/modules -k "\$kver" -fi - +kimage="\$(find /boot -type f -name 'vmlinuz-*')" printf '%s\n' "${PROPAGATOR_VERSION:-}" > /tmp/.VERSION -rm -f /boot/full.cz +rm -f /boot/full*.cz + +for kver in \$kimage; do + kver="\${kver#/boot/vmlinuz-}" + if type mkmodpack >/dev/null 2>&1; then + mkmodpack -p '/.in/${mar_modules##*/}' -o /tmp/modules-"\$kver" -k "\$kver" + else + mkmar -r / -p '/.in/${mar_modules##*/}' -o /tmp/modules-"\$kver" -k "\$kver" + fi + [ ! -f /tmp/modules-"\$kver" ] || + cat "\$libdir/propagator/initfs" /tmp/modules-"\$kver" > /boot/full-"\$kver".cz + + sed \ + -e "s,@LIBDIR@,\$libdir," \ + -e "s,@TMPDIR@,/tmp,g" \ + < '/.in/${initfs##*/}' | + gencpio - | + gzip -c >> /boot/full-"\$kver".cz + +done -[ ! -f /tmp/modules ] || - cat "\$libdir/propagator/initfs" /tmp/modules > /boot/full.cz +rm -rf -- /tmp/.VERSION -sed \ - -e "s,@LIBDIR@,\$libdir," \ - -e "s,@TMPDIR@,/tmp,g" \ - < '/.in/${initfs##*/}' | - gencpio - | - gzip -c >> /boot/full.cz +[ -L /boot/vmlinuz ] || + ln -s vmlinuz-"\$kver" vmlinuz -rm -rf -- /tmp/.VERSION EOF rc=0 -- 2.21.0 --------------32E72CFB8E5A5D3B4E7E091D Content-Type: text/x-patch; name="0002-mki-copy-isolinux-allow-multiple-kernels.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0002-mki-copy-isolinux-allow-multiple-kernels.patch" >>From 2b76b1f683f05b7205b30175ac98cd16ba5b5e7e Mon Sep 17 00:00:00 2001 From: Anton Midyukov Date: Sun, 13 Oct 2019 23:35:37 +0700 Subject: [PATCH 2/2] mki-copy-isolinux: allow multiple kernels --- tools/mki-copy-isolinux | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/tools/mki-copy-isolinux b/tools/mki-copy-isolinux index e9ae6fd..a6dae36 100755 --- a/tools/mki-copy-isolinux +++ b/tools/mki-copy-isolinux @@ -32,10 +32,12 @@ run_chrooted "$chroot" <>From 6ffe72bb7eb8c4bc34255bfdd8b7db29158e2f75 Mon Sep 17 00:00:00 2001 From: Anton Midyukov Date: Sun, 13 Oct 2019 23:30:25 +0700 Subject: [PATCH] stage1, stage2: allow multiple kernels --- sub.in/stage1/Makefile | 2 +- sub.in/stage2/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sub.in/stage1/Makefile b/sub.in/stage1/Makefile index 112c95336..d06fd43e8 100644 --- a/sub.in/stage1/Makefile +++ b/sub.in/stage1/Makefile @@ -22,7 +22,7 @@ include $(MKIMAGE_PREFIX)/targets.mk # only a single kernel might be needed (STAGE1_KFLAVOUR sets explicitly); # kernel image copied from instrumental chroot into .work/syslinux/alt0/ -STAGE1_KFLAVOUR ?= $(lastword $(KFLAVOURS)) +STAGE1_KFLAVOUR ?= $(KFLAVOURS) # propagator needed iff stage1 kernel installed (not for e.g. syslinux.iso) ifneq "$(STAGE1_KFLAVOUR)" "" diff --git a/sub.in/stage2/Makefile b/sub.in/stage2/Makefile index f124dfc66..e07d434b5 100644 --- a/sub.in/stage2/Makefile +++ b/sub.in/stage2/Makefile @@ -29,7 +29,7 @@ IMAGE_PACKAGES += $(SYSTEM_PACKAGES) $(STAGE2_PACKAGES) # here we also try and come up with the stage1 kernel/modules, if any; # no kernel flavour specified will result in no modules for stage1 vmlinuz -STAGE1_KFLAVOUR ?= $(lastword $(KFLAVOURS)) +STAGE1_KFLAVOUR ?= $(KFLAVOURS) ifeq (,$(STAGE1_KFLAVOUR)) $(error STAGE1_KFLAVOUR is utterly empty; cannot guess either) -- 2.21.0 --------------32E72CFB8E5A5D3B4E7E091D--