Commit 3c2ef1c0 authored by Michael Shigorin's avatar Michael Shigorin

rework isoboot support beyond x86

Every .iso was assumed to be bootable since the very beginning[*], and isoboot images were deemed to be x86 isolinux ones; this didn't change with basic ppc/armh support as I never ran into hardware that would _boot_ those ISOs, not only run the code, and it was only e2k isodata project that finally forced this refactoring. It's still not perfect: pack and syslinux features still end up somewhat interwoven, and too much places care for architecture the image is being built for (instead of archdep features tossing their appropriate bits and pieces in). Should help: - any-arch regarding isodata images; - {x86,aarch64}/efi by decoupling isoboot and isolinux; - ppc{,64} as introducing yaboot support will be easier now; - mipsel{,64} too, hopefully. * I knew of school addon images baked with mkimage-profiles-desktop but postponed and then neglected the whole problem for years...
parent db319bb4
...@@ -3,7 +3,7 @@ ifneq (,$(DEBUG)) ...@@ -3,7 +3,7 @@ ifneq (,$(DEBUG))
ifeq (distro,$(IMAGE_CLASS)) ifeq (distro,$(IMAGE_CLASS))
distro/syslinux-auto: distro/.init use/hdt use/syslinux/timeout/1; @: distro/syslinux-auto: distro/.boot use/hdt use/syslinux/timeout/1; @:
distro/syslinux-noescape: distro/syslinux-auto use/syslinux/noescape.cfg; @: distro/syslinux-noescape: distro/syslinux-auto use/syslinux/noescape.cfg; @:
distro/live-systemd: distro/.base use/live/base +systemd; @: distro/live-systemd: distro/.base use/live/base +systemd; @:
......
...@@ -11,12 +11,16 @@ BOOT_BIBL := $(META_BIBLIO) ...@@ -11,12 +11,16 @@ BOOT_BIBL := $(META_BIBLIO)
BOOT_ABST := $(META_ABSTRACT) BOOT_ABST := $(META_ABSTRACT)
DATE_F := $(shell date +%F) DATE_F := $(shell date +%F)
### we might want a e2k data iso too ifeq (isodata,$(IMAGE_PACKTYPE))
BOOT_TYPE :=
else
ifeq (,$(filter-out e2k%,$(ARCH))) ifeq (,$(filter-out e2k%,$(ARCH)))
BOOT_TYPE := e2kboot BOOT_TYPE := e2kboot
else endif
ifeq (,$(filter-out i586 x86_64,$(ARCH)))
BOOT_TYPE := isolinux BOOT_TYPE := isolinux
endif endif
endif
all: | $(GLOBAL_DEBUG) prep copy-subdirs copy-tree run-scripts pack-image \ all: | $(GLOBAL_DEBUG) prep copy-subdirs copy-tree run-scripts pack-image \
postprocess $(GLOBAL_CLEAN_WORKDIR) postprocess $(GLOBAL_CLEAN_WORKDIR)
......
...@@ -6,14 +6,9 @@ DISTRO_EXTS := .iso ...@@ -6,14 +6,9 @@ DISTRO_EXTS := .iso
use/pack: use/pack:
@$(call add_feature) @$(call add_feature)
# conventional ISO9660 image hybridization # fallback type is isodata, might get set elsewhere to produce bootable iso
# for direct bootable usbflash imaging use/pack/iso: use/pack
use/pack/iso: use/pack boot/isolinux $(ISOHYBRID:%=use/isohybrid) @$(call try,IMAGE_PACKTYPE,isodata)
ifeq (distro,$(IMAGE_CLASS))
@$(call set,IMAGE_PACKTYPE,boot)
else
@$(call set,IMAGE_PACKTYPE,isodata)
endif
# virtual environments # virtual environments
VE_ARCHIVES := tar cpio ubifs VE_ARCHIVES := tar cpio ubifs
......
# default is plain text prompt # default is plain text prompt
use/syslinux: sub/stage1 # NB: might be usbflash-ready hybrid iso
use/syslinux: sub/stage1 $(ISOHYBRID:%=use/isohybrid)
@$(call add_feature) @$(call add_feature)
@$(call add,STAGE1_PACKAGES,syslinux) @$(call add,STAGE1_PACKAGES,syslinux)
@$(call try,META_SYSTEM_ID,SYSLINUX) @$(call try,META_SYSTEM_ID,SYSLINUX)
@$(call try,BOOTVGA,normal) @$(call try,BOOTVGA,normal)
@$(call set,RELNAME,ALT ($(IMAGE_NAME))) @$(call set,RELNAME,ALT ($(IMAGE_NAME)))
@$(call set,IMAGE_PACKTYPE,boot)
# UI is overwritten # UI is overwritten
use/syslinux/ui/%: use/syslinux use/syslinux/ui/%: use/syslinux
......
...@@ -3,13 +3,17 @@ $(error this makefile is designed to be included in toplevel one) ...@@ -3,13 +3,17 @@ $(error this makefile is designed to be included in toplevel one)
endif endif
ifeq (distro,$(IMAGE_CLASS)) ifeq (distro,$(IMAGE_CLASS))
# install x86 media bootloader
ifeq (,$(filter-out i586 x86_64,$(ARCH))) ifeq (,$(filter-out i586 x86_64,$(ARCH)))
# install media bootloader boot/iso: use/syslinux
boot/isolinux: use/syslinux
@$(call set,BOOTLOADER,isolinux) @$(call set,BOOTLOADER,isolinux)
endif endif
# firmware is the bootloader
ifeq (,$(filter-out e2k%,$(ARCH))) ifeq (,$(filter-out e2k%,$(ARCH)))
boot/isolinux: boot/iso:
@$(call set,BOOTLOADER,e2k-boot) @$(call set,BOOTLOADER,e2k-boot)
endif endif
endif endif
...@@ -12,12 +12,14 @@ distro/.init: profile/bare ...@@ -12,12 +12,14 @@ distro/.init: profile/bare
@$(call try,META_APP_ID,$(IMAGE_NAME)) @$(call try,META_APP_ID,$(IMAGE_NAME))
@$(call set,META_PUBLISHER,ALT Linux Team) @$(call set,META_PUBLISHER,ALT Linux Team)
distro/.boot: distro/.init boot/iso
@$(call set,META_VOL_ID,ALT $(IMAGE_NAME)/$(ARCH))
@$(call set,META_VOL_SET,ALT)
# NB: the last flavour in KFLAVOURS gets to be the default one; # NB: the last flavour in KFLAVOURS gets to be the default one;
# the kernel packages regexp evaluation has to take place at build stage # the kernel packages regexp evaluation has to take place at build stage
distro/.base: distro/.init use/kernel distro/.base: distro/.boot use/kernel
@$(call set,META_SYSTEM_ID,LINUX) @$(call set,META_SYSTEM_ID,LINUX)
@$(call set,META_VOL_ID,ALT $(IMAGE_NAME)/$(ARCH))
@$(call set,META_VOL_SET,ALT)
# this one should not be fundamental as it appears (think armh) # this one should not be fundamental as it appears (think armh)
distro/.installer: distro/.base use/bootloader/grub +installer; @: distro/.installer: distro/.base use/bootloader/grub +installer; @:
......
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