doc, grub, stage1, stage2: Add support multiple kernels for grub only
At the moment, the ability to select the kernel with which to boot is implemented only for grub (grub-pc, grub-efi, ieee1275boot). note that renamed STAGE1_KFLAVOUR to STAGE1_KFLAVOURS, as multiple kernels can now be added.
This commit is contained in:
parent
f7043b4a3a
commit
d9dca6cb1a
@ -32,9 +32,8 @@ NB: пути приводятся от верхнего уровня; проек
|
|||||||
* features.in/kernel/stage1/scripts.d/80-make-initrd
|
* features.in/kernel/stage1/scripts.d/80-make-initrd
|
||||||
* features.in/stage2/stage1/scripts.d/03-test-kernel
|
* features.in/stage2/stage1/scripts.d/03-test-kernel
|
||||||
* sub.in/stage1/Makefile
|
* sub.in/stage1/Makefile
|
||||||
** ожидают, что в stage1 попадёт строго одно ядро сообразно
|
** если используется загрузчик отличный от grub, то в stage1 попадёт
|
||||||
явному указанию в STAGE1_KFLAVOUR (либо последнее указанное
|
последнее ядро, указанное в STAGE1_KFLAVOURS или KFLAVOURS
|
||||||
в KFLAVOURS)
|
|
||||||
** если добавить какой-либо kernel-image в STAGE1_PACKAGES*,
|
** если добавить какой-либо kernel-image в STAGE1_PACKAGES*,
|
||||||
результат может быть неожиданным
|
результат может быть неожиданным
|
||||||
** обратите внимание: bin/tar2fs умеет несколько ядер
|
** обратите внимание: bin/tar2fs умеет несколько ядер
|
||||||
|
@ -18,7 +18,8 @@
|
|||||||
** SYSTEM_PACKAGES, STAGE2_PACKAGES
|
** SYSTEM_PACKAGES, STAGE2_PACKAGES
|
||||||
** STAGE1_KMODULES, STAGE1_KMODULES_REGEXP,
|
** STAGE1_KMODULES, STAGE1_KMODULES_REGEXP,
|
||||||
STAGE2_KMODULES, STAGE2_KMODULES_REGEXP
|
STAGE2_KMODULES, STAGE2_KMODULES_REGEXP
|
||||||
*** STAGE1_KFLAVOUR или последний из KFLAVOURS
|
*** STAGE1_KFLAVOURS или KFLAVOURS для grub, для других загрузчиков
|
||||||
|
последний из STAGE1_KFLAVOURS или KFLAVOURS
|
||||||
|
|
||||||
* install2: компактная "живая" система, содержащая только инсталятор
|
* install2: компактная "живая" система, содержащая только инсталятор
|
||||||
** см. stage2
|
** см. stage2
|
||||||
@ -47,4 +48,5 @@
|
|||||||
** STAGE1_PACKAGES, SYSTEM_PACKAGES
|
** STAGE1_PACKAGES, SYSTEM_PACKAGES
|
||||||
** STAGE1_PACKAGES_REGEXP
|
** STAGE1_PACKAGES_REGEXP
|
||||||
** STAGE1_KMODULES_REGEXP
|
** STAGE1_KMODULES_REGEXP
|
||||||
*** STAGE1_KFLAVOUR или последний из KFLAVOURS
|
*** STAGE1_KFLAVOURS или KFLAVOURS для grub, для других загрузчиков
|
||||||
|
последний из STAGE1_KFLAVOURS или KFLAVOURS
|
||||||
|
@ -3,7 +3,7 @@ default='linux'
|
|||||||
|
|
||||||
menuentry $"Install "'@distro@' --hotkey 'i' --id 'linux' {
|
menuentry $"Install "'@distro@' --hotkey 'i' --id 'linux' {
|
||||||
echo $"Loading Linux vmlinuz$KFLAVOUR ..."
|
echo $"Loading Linux vmlinuz$KFLAVOUR ..."
|
||||||
linux$linux_suffix @boot_path@/vmlinuz$KFLAVOUR changedisk fastboot automatic=method:cdrom ramdisk_size=@altinst_size@ vga=@bootvga@ @bootargs@ $EFI_BOOTARGS lang=$lang
|
linux$linux_suffix /boot/vmlinuz$KFLAVOUR changedisk fastboot automatic=method:cdrom ramdisk_size=@altinst_size@ vga=@bootvga@ @bootargs@ $EFI_BOOTARGS lang=$lang
|
||||||
echo $"Loading initial ramdisk ..."
|
echo $"Loading initial ramdisk ..."
|
||||||
initrd$linux_suffix @boot_path@/full$KFLAVOUR.cz
|
initrd$linux_suffix /boot/full$KFLAVOUR.cz
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
menuentry $"VNC install "'@distro@'$" (edit to set server IP address)" --id 'vncconnect' {
|
menuentry $"VNC install "'@distro@'$" (edit to set server IP address)" --id 'vncconnect' {
|
||||||
linux$linux_suffix @boot_path@/vmlinuz$KFLAVOUR changedisk fastboot automatic=method:cdrom ramdisk_size=@altinst_size@ showopts @bootargs@ $EFI_BOOTARGS headless no_alt_virt_keyboard vncconnect=IP lang=$lang
|
linux$linux_suffix /boot/vmlinuz$KFLAVOUR changedisk fastboot automatic=method:cdrom ramdisk_size=@altinst_size@ showopts @bootargs@ $EFI_BOOTARGS headless no_alt_virt_keyboard vncconnect=IP lang=$lang
|
||||||
initrd$linux_suffix @boot_path@/full$KFLAVOUR.cz
|
initrd$linux_suffix /boot/full$KFLAVOUR.cz
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
menuentry $"VNC install "'@distro@'$" (edit to set password and connect here)" --id 'vncpasswd' {
|
menuentry $"VNC install "'@distro@'$" (edit to set password and connect here)" --id 'vncpasswd' {
|
||||||
linux$linux_suffix @boot_path@/vmlinuz$KFLAVOUR changedisk fastboot automatic=method:cdrom ramdisk_size=@altinst_size@ showopts @bootargs@ $EFI_BOOTARGS headless no_alt_virt_keyboard vncpassword=VNCPWD lang=$lang
|
linux$linux_suffix /boot/vmlinuz$KFLAVOUR changedisk fastboot automatic=method:cdrom ramdisk_size=@altinst_size@ showopts @bootargs@ $EFI_BOOTARGS headless no_alt_virt_keyboard vncpassword=VNCPWD lang=$lang
|
||||||
initrd$linux_suffix @boot_path@/full$KFLAVOUR.cz
|
initrd$linux_suffix /boot/full$KFLAVOUR.cz
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
menuentry $"LiveCD (no hard disk needed)" --id 'live' {
|
menuentry $"LiveCD (no hard disk needed)" --id 'live' {
|
||||||
echo $"Loading Linux vmlinuz$KFLAVOUR ..."
|
echo $"Loading Linux vmlinuz$KFLAVOUR ..."
|
||||||
linux$linux_suffix @boot_path@/vmlinuz$KFLAVOUR changedisk fastboot live automatic=method:cdrom ramdisk_size=@live_size@ stagename=live showopts lowmem vga=@bootvga@ @bootargs@ $EFI_BOOTARGS lang=$lang
|
linux$linux_suffix /boot/vmlinuz$KFLAVOUR changedisk fastboot live automatic=method:cdrom ramdisk_size=@live_size@ stagename=live showopts lowmem vga=@bootvga@ @bootargs@ $EFI_BOOTARGS lang=$lang
|
||||||
echo $"Loading initial ramdisk ..."
|
echo $"Loading initial ramdisk ..."
|
||||||
initrd$linux_suffix @boot_path@/full$KFLAVOUR.cz
|
initrd$linux_suffix /boot/full$KFLAVOUR.cz
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
menuentry $"LiveCD with sessions support" --id 'session' {
|
menuentry $"LiveCD with sessions support" --id 'session' {
|
||||||
echo $"Loading Linux vmlinuz$KFLAVOUR ..."
|
echo $"Loading Linux vmlinuz$KFLAVOUR ..."
|
||||||
linux$linux_suffix @boot_path@/vmlinuz$KFLAVOUR changedisk fastboot live automatic=method:cdrom ramdisk_size=@live_size@ stagename=live showopts live_rw vga=@bootvga@ @bootargs@ $EFI_BOOTARGS lang=$lang
|
linux$linux_suffix /boot/vmlinuz$KFLAVOUR changedisk fastboot live automatic=method:cdrom ramdisk_size=@live_size@ stagename=live showopts live_rw vga=@bootvga@ @bootargs@ $EFI_BOOTARGS lang=$lang
|
||||||
echo $"Loading initial ramdisk ..."
|
echo $"Loading initial ramdisk ..."
|
||||||
initrd$linux_suffix @boot_path@/full$KFLAVOUR.cz
|
initrd$linux_suffix /boot/full$KFLAVOUR.cz
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
menuentry $"Rescue LiveCD" --id 'rescue' {
|
menuentry $"Rescue LiveCD" --id 'rescue' {
|
||||||
echo $"Loading Linux vmlinuz$KFLAVOUR ..."
|
echo $"Loading Linux vmlinuz$KFLAVOUR ..."
|
||||||
linux$linux_suffix @boot_path@/vmlinuz$KFLAVOUR changedisk fastboot live automatic=method:cdrom ramdisk_size=@rescue_size@ stagename=rescue splash=0 showopts @rescue_bootargs@ $EFI_BOOTARGS
|
linux$linux_suffix /boot/vmlinuz$KFLAVOUR changedisk fastboot live automatic=method:cdrom ramdisk_size=@rescue_size@ stagename=rescue splash=0 showopts @rescue_bootargs@ $EFI_BOOTARGS
|
||||||
echo $"Loading initial ramdisk ..."
|
echo $"Loading initial ramdisk ..."
|
||||||
initrd$linux_suffix @boot_path@/full$KFLAVOUR.cz
|
initrd$linux_suffix /boot/full$KFLAVOUR.cz
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
menuentry $"Rescue with sessions support" --id 'rescue_session' {
|
menuentry $"Rescue with sessions support" --id 'rescue_session' {
|
||||||
echo $"Loading Linux vmlinuz$KFLAVOUR ..."
|
echo $"Loading Linux vmlinuz$KFLAVOUR ..."
|
||||||
linux$linux_suffix @boot_path@/vmlinuz$KFLAVOUR changedisk fastboot live automatic=method:cdrom,label:ALT* ramdisk_size=@rescue_size@ stagename=rescue splash=0 showopts @rescue_bootargs@ $EFI_BOOTARGS live_rw
|
linux$linux_suffix /boot/vmlinuz$KFLAVOUR changedisk fastboot live automatic=method:cdrom,label:ALT* ramdisk_size=@rescue_size@ stagename=rescue splash=0 showopts @rescue_bootargs@ $EFI_BOOTARGS live_rw
|
||||||
echo $"Loading initial ramdisk ..."
|
echo $"Loading initial ramdisk ..."
|
||||||
initrd$linux_suffix @boot_path@/full$KFLAVOUR.cz
|
initrd$linux_suffix /boot/full$KFLAVOUR.cz
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
menuentry $"Forensic mode (leave disks alone)" --id 'rescue_forensic' {
|
menuentry $"Forensic mode (leave disks alone)" --id 'rescue_forensic' {
|
||||||
echo $"Loading Linux vmlinuz$KFLAVOUR ..."
|
echo $"Loading Linux vmlinuz$KFLAVOUR ..."
|
||||||
linux$linux_suffix @boot_path@/vmlinuz changedisk fastboot live automatic=method:cdrom ramdisk_size=@rescue_size@ splash=0 showopts stagename=rescue @rescue_bootargs@ $EFI_BOOTARGS max_loop=16 forensic hash=@rescue_hash@
|
linux$linux_suffix /boot/vmlinuz changedisk fastboot live automatic=method:cdrom ramdisk_size=@rescue_size@ splash=0 showopts stagename=rescue @rescue_bootargs@ $EFI_BOOTARGS max_loop=16 forensic hash=@rescue_hash@
|
||||||
echo $"Loading initial ramdisk ..."
|
echo $"Loading initial ramdisk ..."
|
||||||
initrd$linux_suffix @boot_path@/full.cz
|
initrd$linux_suffix /boot/full.cz
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
menuentry $"Rescue with remote SSH access (DHCP)" --id 'rescue_remote' {
|
menuentry $"Rescue with remote SSH access (DHCP)" --id 'rescue_remote' {
|
||||||
linux$linux_suffix @boot_path@/vmlinuz$KFLAVOUR changedisk fastboot live automatic=method:cdrom ramdisk_size=@rescue_size@ splash=0 showopts stagename=rescue @rescue_bootargs@ $EFI_BOOTARGS max_loop=16 ip=dhcp port=22 rootpw=AUTO hash=@rescue_hash@
|
linux$linux_suffix /boot/vmlinuz$KFLAVOUR changedisk fastboot live automatic=method:cdrom ramdisk_size=@rescue_size@ splash=0 showopts stagename=rescue @rescue_bootargs@ $EFI_BOOTARGS max_loop=16 ip=dhcp port=22 rootpw=AUTO hash=@rescue_hash@
|
||||||
echo $"Loading initial ramdisk ..."
|
echo $"Loading initial ramdisk ..."
|
||||||
initrd$linux_suffix @boot_path@/full$KFLAVOUR.cz
|
initrd$linux_suffix /boot/full$KFLAVOUR.cz
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
menuentry $"Check this media for defects" --id 'mediachk' {
|
menuentry $"Check this media for defects" --id 'mediachk' {
|
||||||
linux$linux_suffix @boot_path@/vmlinuz changedisk live quiet lowmem automatic=method:cdrom mediacheck=1 stagename=mediacheck showopts @bootargs@ $EFI_BOOTARGS
|
linux$linux_suffix /boot/vmlinuz changedisk live quiet lowmem automatic=method:cdrom mediacheck=1 stagename=mediacheck showopts @bootargs@ $EFI_BOOTARGS
|
||||||
initrd$linux_suffix @boot_path@/full.cz
|
initrd$linux_suffix /boot/full.cz
|
||||||
}
|
}
|
||||||
|
@ -99,9 +99,6 @@ bootargs: clean
|
|||||||
sed -i "s, lang=.lang,,g" $(DSTCFGS); \
|
sed -i "s, lang=.lang,,g" $(DSTCFGS); \
|
||||||
fi; \
|
fi; \
|
||||||
sed -i "/lang=@LOCALE@/d" $(DSTCFGS)
|
sed -i "/lang=@LOCALE@/d" $(DSTCFGS)
|
||||||
@if [ $$(echo $(KFLAVOURS) | wc -w) -gt 1 ]; then \
|
|
||||||
sed -i "s,@KFLAVOUR@,$(KFLAVOURS),g" $(DSTCFGS); \
|
|
||||||
fi
|
|
||||||
GRUBTHEME=$(GRUBTHEME); \
|
GRUBTHEME=$(GRUBTHEME); \
|
||||||
[ -n "$$GRUBTHEME" ] || GRUBTHEME=$$(cut -d "-" -f2 <<< $(BRANDING)); \
|
[ -n "$$GRUBTHEME" ] || GRUBTHEME=$$(cut -d "-" -f2 <<< $(BRANDING)); \
|
||||||
sed -i "s,@grubtheme@,$$GRUBTHEME,g" $(DSTCFGS)
|
sed -i "s,@grubtheme@,$$GRUBTHEME,g" $(DSTCFGS)
|
||||||
|
@ -49,20 +49,25 @@ fi
|
|||||||
|
|
||||||
default_change "$CFG"
|
default_change "$CFG"
|
||||||
|
|
||||||
case "$GLOBAL_BOOTLOADER" in
|
|
||||||
ieee1275boot|grubpcboot)
|
|
||||||
BOOT_PATH=/boot;;
|
|
||||||
*)
|
|
||||||
BOOT_PATH=/EFI/BOOT;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
sed -i "s,@boot_path@,$BOOT_PATH,g" "$CFG"
|
|
||||||
|
|
||||||
# snippets are not going into the actual image
|
# snippets are not going into the actual image
|
||||||
if [ "$DEBUG" != 2 ]; then
|
if [ "$DEBUG" != 2 ]; then
|
||||||
rm -r .in/
|
rm -r .in/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# change kernels version for multiple kernels only
|
||||||
|
if [ $(echo "$GLOBAL_KFLAVOURS" | wc -w) -gt 1 ]; then
|
||||||
|
kver=
|
||||||
|
echo $GLOBAL_KFLAVOURS
|
||||||
|
for KFLAVOUR in $GLOBAL_KFLAVOURS; do
|
||||||
|
kver+=" $(rpm -qa 'kernel-image*' \
|
||||||
|
--qf '%{version}-%{name}-%{release}\n' \
|
||||||
|
| grep "$KFLAVOUR" \
|
||||||
|
| sed 's/kernel-image-//')"
|
||||||
|
done
|
||||||
|
|
||||||
|
sed -i "s,@KFLAVOUR@,$kver,g" $CFG
|
||||||
|
fi
|
||||||
|
|
||||||
# copy grub theme
|
# copy grub theme
|
||||||
mkdir -p themes
|
mkdir -p themes
|
||||||
GRUBTHEME="$(grep -m1 '/theme.txt;' "$CFG" |rev | cut -f2 -d '/' |rev)"
|
GRUBTHEME="$(grep -m1 '/theme.txt;' "$CFG" |rev | cut -f2 -d '/' |rev)"
|
||||||
|
@ -11,23 +11,20 @@ case "`arch`" in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ -L /boot/$kname ]; then
|
kimage="$(find /boot -type f -name "$kname-*")"
|
||||||
kimage="$(readlink -mv /boot/$kname)"
|
|
||||||
else
|
|
||||||
kimage="$(find /boot -type f -name "$kname-*" -print -quit)"
|
|
||||||
fi
|
|
||||||
kver="${kimage#/boot/$kname-}"
|
|
||||||
|
|
||||||
mkmodpack -p /.in/modules -o /tmp/modules -k "$kver"
|
rm -f /boot/full*.cz
|
||||||
|
|
||||||
rm -f /boot/full.cz
|
for kver in $kimage; do
|
||||||
|
kver="${kver#/boot/$kname-}"
|
||||||
|
mkmodpack -p /.in/modules -o /tmp/modules-"$kver" -k "$kver"
|
||||||
|
cat "$libdir/propagator/initfs" /tmp/modules-"$kver" > /boot/full-"$kver".cz
|
||||||
|
|
||||||
[ ! -f /tmp/modules ] ||
|
sed \
|
||||||
cat "$libdir/propagator/initfs" /tmp/modules > /boot/full.cz
|
-e "s,@LIBDIR@,$libdir," \
|
||||||
|
-e "s,@TMPDIR@,/tmp,g" \
|
||||||
|
< "$WORKDIR/initfs" |
|
||||||
|
gencpio - |
|
||||||
|
gzip -c >> /boot/full-"$kver".cz
|
||||||
|
|
||||||
sed \
|
done
|
||||||
-e "s,@LIBDIR@,$libdir," \
|
|
||||||
-e "s,@TMPDIR@,/tmp,g" \
|
|
||||||
< "$WORKDIR/initfs" |
|
|
||||||
gencpio - |
|
|
||||||
gzip -c >> /boot/full.cz
|
|
||||||
|
@ -14,15 +14,16 @@ esac
|
|||||||
|
|
||||||
if [ -L "/boot/$kname" ]; then
|
if [ -L "/boot/$kname" ]; then
|
||||||
kimage="$(readlink -ev /boot/$kname)"
|
kimage="$(readlink -ev /boot/$kname)"
|
||||||
else
|
kverdef="${kimage#/boot/$kname-}"
|
||||||
kimage="$(find /boot -type f -name "$kname-*" -print -quit)"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$kimage" ]; then
|
kimage="$(find /boot -type f -name "$kname-*")"
|
||||||
cp -af "$kimage" boot/$kname
|
propagator="$(find /boot -type f -name 'full-*.cz')"
|
||||||
[ ! -f /boot/full.cz ] ||
|
|
||||||
cp -af /boot/full.cz boot/full.cz
|
cp $verbose -af $kimage boot/
|
||||||
fi
|
mv boot/$kname-$kverdef boot/$kname
|
||||||
|
cp $verbose -af $propagator boot/
|
||||||
|
mv boot/full-$kverdef.cz boot/full.cz
|
||||||
|
|
||||||
# config is generated in mkimage
|
# config is generated in mkimage
|
||||||
case "$GLOBAL_EFI_BOOTLOADER" in
|
case "$GLOBAL_EFI_BOOTLOADER" in
|
||||||
|
@ -19,16 +19,25 @@ COPY_TREE = ./files
|
|||||||
include $(MKIMAGE_PREFIX)/targets.mk
|
include $(MKIMAGE_PREFIX)/targets.mk
|
||||||
|
|
||||||
# here we try and come up with the installer kernel/modules, if any;
|
# here we try and come up with the installer kernel/modules, if any;
|
||||||
# only a single kernel might be needed (STAGE1_KFLAVOUR sets explicitly);
|
# only for grub allowed multiple kernels, for other a single kernel
|
||||||
# kernel image copied from instrumental chroot into .work/syslinux/alt0/
|
# might be needed (STAGE1_KFLAVOURS sets explicitly);
|
||||||
|
# kernel image copied from instrumental chroot into .work/boot/
|
||||||
STAGE1_KFLAVOUR ?= $(lastword $(KFLAVOURS))
|
ifeq (grubpcboot,$(BOOTLOADER))
|
||||||
|
STAGE1_KFLAVOURS ?= $(KFLAVOURS)
|
||||||
|
endif
|
||||||
|
ifeq (grub-efi,$(EFI_BOOTLOADER))
|
||||||
|
STAGE1_KFLAVOURS ?= $(KFLAVOURS)
|
||||||
|
endif
|
||||||
|
ifeq (ieee1275boot,$(BOOTLOADER))
|
||||||
|
STAGE1_KFLAVOURS ?= $(KFLAVOURS)
|
||||||
|
endif
|
||||||
|
STAGE1_KFLAVOURS ?= $(lastword $(KFLAVOURS))
|
||||||
|
|
||||||
# propagator needed iff stage1 kernel installed (not for e.g. syslinux.iso)
|
# propagator needed iff stage1 kernel installed (not for e.g. syslinux.iso)
|
||||||
ifneq "$(STAGE1_KFLAVOUR)" ""
|
ifneq "$(STAGE1_KFLAVOURS)" ""
|
||||||
GLOBAL_STAGE1_KFLAVOUR := $(STAGE1_KFLAVOUR)
|
GLOBAL_STAGE1_KFLAVOURS := $(STAGE1_KFLAVOURS)
|
||||||
CHROOT_PACKAGES_REGEXP := $(call kpackages, \
|
CHROOT_PACKAGES_REGEXP := $(call kpackages, \
|
||||||
$(STAGE1_KFLAVOUR),$(STAGE1_KMODULES),$(STAGE1_KMODULES_REGEXP))
|
$(STAGE1_KFLAVOURS),$(STAGE1_KMODULES),$(STAGE1_KMODULES_REGEXP))
|
||||||
ifneq "$(findstring stage2,$(SUBPROFILES))" "" ### assumes stage2 ~ propagator
|
ifneq "$(findstring stage2,$(SUBPROFILES))" "" ### assumes stage2 ~ propagator
|
||||||
LIST_MODULES = .work/chroot/.in/modules
|
LIST_MODULES = .work/chroot/.in/modules
|
||||||
PREPARE_MODULES = prepare-modules
|
PREPARE_MODULES = prepare-modules
|
||||||
@ -45,7 +54,7 @@ GLOBAL_SQUASHFS := $(SQUASHFS)
|
|||||||
|
|
||||||
prepare-modules:
|
prepare-modules:
|
||||||
@echo $(foreach V,$(STAGE1_MODLISTS),$(wildcard modules.d/??-$(V))) \
|
@echo $(foreach V,$(STAGE1_MODLISTS),$(wildcard modules.d/??-$(V))) \
|
||||||
| xargs -r -- cat >> $(PROPAGATOR_MAR_MODULES)
|
| xargs -r -- cat >> $(LIST_MODULES)
|
||||||
|
|
||||||
# scripts prepare bootloader configuration, too
|
# scripts prepare bootloader configuration, too
|
||||||
# NB: we pass tested squashfs options for sub.in/stage2/Makefile to include
|
# NB: we pass tested squashfs options for sub.in/stage2/Makefile to include
|
||||||
|
@ -8,11 +8,12 @@
|
|||||||
следует крайне бережно относиться к объёму этой стадии.
|
следует крайне бережно относиться к объёму этой стадии.
|
||||||
|
|
||||||
Обратите внимание: если не указать явно требуемый вариант
|
Обратите внимание: если не указать явно требуемый вариант
|
||||||
ядра посредством STAGE1_KFLAVOUR, будет взят последний
|
ядер посредством STAGE1_KFLAVOURS, то будет взят из KFLAVOURS;
|
||||||
из перечисленных в KFLAVOURS; если не указать явно регэкс,
|
если используется загрузчик отличный от grub, то будет взят
|
||||||
описывающий требуемые в инсталяторе kernel-modules-*,
|
последний указанный в STAGE1_KFLAVOURS или KFLAVOURS;
|
||||||
посредством STAGE1_KMODULES_REGEXP -- будут доступны модули
|
если не указать явно регэкс, описывающий требуемые в инсталяторе
|
||||||
из kernel-image (упаковываются в syslinux/alt0/full.cz).
|
kernel-modules-*, посредством STAGE1_KMODULES_REGEXP -- будут
|
||||||
|
доступны модули из kernel-image (упаковываются в boot/full*.cz).
|
||||||
|
|
||||||
Сам список модулей, попадающих в full.cz, определяется
|
Сам список модулей, попадающих в full.cz, определяется
|
||||||
в файле modules (наиболее базовые!) и дополняется указанным
|
в файле modules (наиболее базовые!) и дополняется указанным
|
||||||
|
@ -25,18 +25,29 @@ include stage2cfg.mk
|
|||||||
# requisite stuff
|
# requisite stuff
|
||||||
IMAGE_PACKAGES += $(SYSTEM_PACKAGES) $(STAGE2_PACKAGES)
|
IMAGE_PACKAGES += $(SYSTEM_PACKAGES) $(STAGE2_PACKAGES)
|
||||||
|
|
||||||
# here we also try and come up with the stage1 kernel/modules, if any;
|
# here we try and come up with the installer kernel/modules, if any;
|
||||||
# no kernel flavour specified will result in no modules for stage1 vmlinuz
|
# only for grub allowed multiple kernels, for other a single kernel
|
||||||
STAGE1_KFLAVOUR ?= $(lastword $(KFLAVOURS))
|
# might be needed (STAGE1_KFLAVOURS sets explicitly);
|
||||||
|
# kernel image copied from instrumental chroot into .work/boot/
|
||||||
|
ifeq (grubpcboot,$(BOOTLOADER))
|
||||||
|
STAGE1_KFLAVOURS ?= $(KFLAVOURS)
|
||||||
|
endif
|
||||||
|
ifeq (grub-efi,$(EFI_BOOTLOADER))
|
||||||
|
STAGE1_KFLAVOURS ?= $(KFLAVOURS)
|
||||||
|
endif
|
||||||
|
ifeq (ieee1275boot,$(BOOTLOADER))
|
||||||
|
STAGE1_KFLAVOURS ?= $(KFLAVOURS)
|
||||||
|
endif
|
||||||
|
STAGE1_KFLAVOURS ?= $(lastword $(KFLAVOURS))
|
||||||
|
|
||||||
ifeq (,$(STAGE1_KFLAVOUR))
|
ifeq (,$(STAGE1_KFLAVOURS))
|
||||||
$(error STAGE1_KFLAVOUR is utterly empty; cannot guess either)
|
$(error STAGE1_KFLAVOURS is utterly empty; cannot guess either)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# need kernel modules only (which require corresponding kernel-image);
|
# need kernel modules only (which require corresponding kernel-image);
|
||||||
# these go into work chroot; NB: no vmlinuz there (unless live-install)
|
# these go into work chroot; NB: no vmlinuz there (unless live-install)
|
||||||
IMAGE_PACKAGES_REGEXP += $(call kpackages, \
|
IMAGE_PACKAGES_REGEXP += $(call kpackages, \
|
||||||
$(STAGE1_KFLAVOUR), \
|
$(STAGE1_KFLAVOURS), \
|
||||||
$(STAGE1_KMODULES) $(STAGE1_KMODULES_REGEXP) \
|
$(STAGE1_KMODULES) $(STAGE1_KMODULES_REGEXP) \
|
||||||
$(STAGE2_KMODULES) $(STAGE2_KMODULES_REGEXP))
|
$(STAGE2_KMODULES) $(STAGE2_KMODULES_REGEXP))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user