Commit 8989fc27 authored by Michael Shigorin's avatar Michael Shigorin

added plymouth feature

An initial draft of it was done half a year ago but several tricky thingies had kept the code from showing up as it was rather brittle and incomplete. This implementation involves quite a few changes all over the place but finally works good enough for live and installer images. Please pay attention to the versions of these packages: - installer-feature-setup-plymouth (0.3.2-alt1+) - branding-altlinux-sisyphus (20110706-alt2+ if used) - plymouth (0.8.3-alt20.git20110406+) See also: - http://www.altlinux.org/Branding - http://www.altlinux.org/Plymouth
parent 804daaa1
......@@ -21,6 +21,7 @@
THE_PACKAGES, THE_LISTS, THE_GROUPS, THE_PACKAGES_REGEXP
- для строго направленного действия служат:
+ STAGE1_PACKAGES, STAGE1_PACKAGES_REGEXP (первая стадия загрузки)
+ STAGE2_PACKAGES (инсталятор и спасательная/"живая" система)
+ INSTALL2_PACKAGES (инсталятор)
+ BASE_PACKAGES, BASE_LISTS, BASE_PACKAGES_REGEXP (базовая система)
+ MAIN_PACKAGES, MAIN_LISTS, MAIN_PACKAGES_REGEXP (дополнительные пакеты)
......
......@@ -15,5 +15,6 @@ distro/tde: distro/.desktop-mini +tde; @:
distro/ltsp-tde: distro/tde +ltsp; @:
distro/ltsp-icewm: distro/icewm +ltsp; @:
distro/desktop-systemd: distro/icewm use/systemd; @:
distro/desktop-plymouth: distro/icewm +plymouth; @:
endif
......@@ -34,6 +34,7 @@ distro/.livecd-install: distro/.live-base use/live/install; @:
distro/live-icewm: distro/.live-desktop use/live/autologin +icewm; @:
distro/live-razorqt: distro/.live-desktop use/live/autologin +razorqt; @:
distro/live-tde: distro/.live-desktop use/live/ru +tde; @:
distro/live-plymouth: distro/.live-base use/plymouth/stage2; @:
distro/live-rescue: distro/live-icewm
@$(call add,LIVE_LISTS,$(call tags,rescue && (fs || live || x11)))
......
Эта фича врезается в makefile субпрофилей и обеспечивает
добавление задающих внешний вид и сообщения дистрибутива
пакетов; см. тж. http://www.altlinux.org/Branding
Назначение и возможные значения (если требуются):
- STAGE1_BRANDING
+ относится к загрузке со сгенерированного образа (например, ISO)
+ bootloader bootsplash (при старте)
- STAGE2_BRANDING
+ общая часть для всех вариантов stage2
+ bootsplash (при выключении)
- INSTALL2_BRANDING
+ специфические пакеты брендирования инсталятора
+ notes slideshow
- THE_BRANDING
+ общий список для использования в установленной системе и LiveCD
+ alterator bootsplash graphics indexhtml notes slideshow
# NB: release part of branding goes to install2 feature
use/branding:
@$(call add_feature)
@### see install2
@#$(call add,BASE_PACKAGES,branding-$$(BRANDING)-release)
# NB: not every distro might have all the branding of its own
use/branding/full: use/branding use/syslinux/ui/gfxboot
@$(call add,THE_BRANDING,alterator bootsplash graphics)
@$(call add,THE_BRANDING,indexhtml notes slideshow)
use/branding/complete: use/branding/full
use/branding/complete: use/branding/full use/plymouth/full
@$(call add,INSTALL2_BRANDING,notes slideshow)
IMAGE_PACKAGES_REGEXP += $(call branding,$(STAGE2_BRANDING))
......@@ -10,8 +10,8 @@ use/install2/net: use/install2
@$(call add,INSTALL2_PACKAGES,curl)
# modern free xorg drivers for mainstream hardware requires KMS support
use/install2/kms:
@$(call set,STAGE1_KMODULES_REGEXP,drm.*)
use/install2/kms: use/stage2/kms
@$(call add,BASE_KMODULES_REGEXP,drm.*)
# see also use/vm/kvm/guest; qxl included in xorg pkglist
use/install2/kvm:
......
# step 4: build the distribution image
# take care for kernel bits
DOT_BASE += $(call kpackages,$(THE_KMODULES) $(BASE_KMODULES),$(KFLAVOURS))
DOT_BASE += $(call kpackages, \
$(THE_KMODULES) $(BASE_KMODULES) $(BASE_KMODULES_REGEXP), \
$(KFLAVOURS))
......@@ -6,6 +6,9 @@ METADIR := files/Metadata
# preparation targets of ../../build-distro/lib/build-distro.mk
WHATEVER += metadata
# handle these too
DOT_BASE += $(BASE_PACKAGES_REGEXP)
# args: name, suffix, command
define dump-THEM
if [ -n "$($(1)_$(2))" ]; then echo -e "\n## $(1)_$(2)"; $(3) $($(1)_$(2)); fi;
......
Эта фича предназначена для добавления поддержки plymouth
-- современной реализации bootsplash. Плотно взаимодействует
с фичей branding по объективным причинам, но оформлена отдельно
для возможности собирать образы с частичным брендированием либо
"без излишеств".
+plymouth: use/plymouth/full; @:
# and a few silent aliases
use/plymouth/live: use/plymouth/stage2
use/plymouth/install2: use/plymouth/stage2
use/plymouth:
@$(call add_feature)
# NB: *_REGEXP due to branding() using regexp and the
# dependency resolution having to occur within a
# single transaction (due to plymouth-system-theme)
# looks like there's no sense to pull in progressbars
# while leaving the very basic text bootloader screen
use/plymouth/stage2: use/plymouth use/branding \
use/syslinux/ui/gfxboot use/stage2/kms
@$(call add,STAGE1_PACKAGES_REGEXP,make-initrd-plymouth)
@$(call add,STAGE1_BRANDING,bootsplash)
@$(call add,STAGE2_BRANDING,bootsplash)
use/plymouth/base: use/plymouth use/install2/kms
@$(call add,INSTALL2_BOOTARGS,quiet splash)
@$(call add,INSTALL2_PACKAGES,installer-feature-setup-plymouth)
@$(call add,BASE_PACKAGES_REGEXP,make-initrd-plymouth cpio)
@$(call add,THE_BRANDING,bootsplash)
use/plymouth/full: use/plymouth/stage2 use/plymouth/base; @:
#!/bin/sh
CONFIG=/etc/plymouth/plymouthd.conf
if [ -f "$CONFIG" ]; then
grep -q '^Theme=' "$CONFIG" || sed -i 's/#\([T\[]\)/\1/' "$CONFIG"
echo 'FEATURES += plymouth' >> /etc/initrd.mk
fi
#!/bin/sh
cp -a /usr/share/plymouth/default-install-duration /var/lib/plymouth/boot-duration
......@@ -3,6 +3,9 @@ use/stage2: sub/stage1
@$(call add_feature)
@$(call add,STAGE1_PACKAGES,file make-initrd make-initrd-propagator)
use/stage2/kms:
@$(call add,STAGE1_KMODULES_REGEXP,drm.*)
# NB: sub/stage2 isn't used standalone but rather
# as a base for various livecd modifications
# (currently install2, live, rescue)
......@@ -2,10 +2,3 @@
# FIXME: move somewhere else
#echo 'FEATURES += nfs' >> /etc/initrd.mk
# FIXME: move to plymouth feature
#if [ -f /etc/plymouth/plymouthd.conf ];then
# sed -i 's/#\([T\[]\)/\1/' /etc/plymouth/plymouthd.conf
# echo 'FEATURES += plymouth' >> /etc/initrd.mk
#fi
label live
menu label ^LiveCD (no hard disk needed)
kernel alt0/vmlinuz
append initrd=alt0/full.cz fastboot live lowmem showopts automatic=method:cdrom ramdisk_size=@live_size@ stagename=live
append initrd=alt0/full.cz fastboot live lowmem showopts automatic=method:cdrom ramdisk_size=@live_size@ stagename=live splash quiet=1 vga=0x314
label linux
menu label ^Install ALT Linux
kernel alt0/vmlinuz
append initrd=alt0/full.cz changedisk fastboot showopts automatic=method:cdrom quiet=1 ramdisk_size=@altinst_size@ vga=0x314
append initrd=alt0/full.cz changedisk fastboot showopts automatic=method:cdrom ramdisk_size=@altinst_size@ vga=0x314 @bootargs@
label noapic
menu label ^Failsafe install
kernel alt0/vmlinuz
append initrd=alt0/full.cz changedisk lowmem noapic nolapic showopts ramdisk_size=@altinst_size@
append initrd=alt0/full.cz changedisk lowmem noapic nolapic showopts ramdisk_size=@altinst_size@ xdriver=vesa @bootargs@
......@@ -48,7 +48,7 @@ cfg = $(wildcard cfg.in/??$(1).cfg)
#
# arguments get evaluated before recipe body execution thus prep
all: debug timeout
all: debug timeout bootargs
@### proper text branding should be implemented
@sed -i 's,@mkimage-profiles@,$(IMAGE_NAME),' $(DSTDIR)/*.cfg
@echo $(SYSLINUX_MODULES) > $(DSTDIR)/modules.list
......@@ -63,6 +63,13 @@ timeout: copy
fi; \
sed -i "s,@timeout@,$$TIMEOUT," $(DSTDIR)/*.cfg
# pass over additional parameters, if any
bootargs: copy
@if [ -n "$(INSTALL2_BOOTARGS)" ]; then \
sed -i "s,@bootargs@,$(INSTALL2_BOOTARGS)," $(DSTDIR)/*.cfg; \
fi; \
sed -i "s,@bootargs@,," $(DSTDIR)/*.cfg
copy: prep
@cp -pLt $(DSTDIR) -- $(sort \
$(foreach C,$(SYSLINUX_CFG),$(call cfg,$(C))) \
......
......@@ -23,7 +23,8 @@ SPACE := $(NULL) # the officially documented way of getting a space
list2re = $(subst $(SPACE),|,$(strip $(1)))
# args: KMODULES, KFLAVOURS
kpackages = ^kernel-(image|modules-($(call list2re,$(1))))-($(call list2re,$(2)))$$
kpackages = $(and $(1),$(2), \
^kernel-(image|modules-($(call list2re,$(1))))-($(call list2re,$(2)))$$)
# arg: branding subpackages
branding = ^branding-$(BRANDING)-($(call list2re,$(1)))$$
branding = $(and $(1),^branding-$(BRANDING)-($(call list2re,$(1)))$$)
......@@ -18,6 +18,7 @@ IMAGE_PACKAGES_REGEXP = $(THE_PACKAGES_REGEXP) \
$(call kpackages, \
$(THE_KMODULES) \
$(BASE_KMODULES) \
$(BASE_KMODULES_REGEXP) \
$(MAIN_KMODULES), \
$(KFLAVOURS))
......
......@@ -20,7 +20,7 @@ include $(MKIMAGE_PREFIX)/config.mk
include stage2cfg.mk
# requisite stuff
IMAGE_PACKAGES += $(SYSTEM_PACKAGES)
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
......@@ -33,7 +33,8 @@ endif
# need kernel modules only (which require corresponding kernel-image);
# these go into work chroot; NB: no vmlinuz there (unless live-install)
IMAGE_PACKAGES_REGEXP += $(call kpackages, \
$(STAGE1_KMODULES) $(STAGE2_KMODULES), \
$(STAGE1_KMODULES) $(STAGE1_KMODULES_REGEXP) \
$(STAGE2_KMODULES) $(STAGE2_KMODULES_REGEXP), \
$(STAGE1_KFLAVOUR))
-include lib/*.mk
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment