Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mkimage-profiles
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Anton Palgunov
mkimage-profiles
Commits
c1b349cf
Commit
c1b349cf
authored
Sep 09, 2021
by
Anton Midyukov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
initrd-bootchain: allow overriding variables in bootchain config
parent
63df7d7f
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
55 additions
and
23 deletions
+55
-23
README
features.in/initrd-bootchain/README
+7
-0
config.mk
features.in/initrd-bootchain/config.mk
+14
-0
generate.mk
features.in/initrd-bootchain/generate.mk
+19
-7
bootchain
features.in/initrd-bootchain/stage1/files/bootchain
+15
-16
No files found.
features.in/initrd-bootchain/README
View file @
c1b349cf
...
@@ -5,3 +5,10 @@ bootchain. Это альтернатива фичи initrd-propagator. Испо
...
@@ -5,3 +5,10 @@ bootchain. Это альтернатива фичи initrd-propagator. Испо
Документацию по использованию bootchain следует смотреть в пакетах
Документацию по использованию bootchain следует смотреть в пакетах
make-initrd-bootchain-*:
make-initrd-bootchain-*:
/usr/share/make-initrd/features/bootchain-*/README.md
/usr/share/make-initrd/features/bootchain-*/README.md
Конфиг находится в stage1/files/bootchain. Почти все переменные можно
переопределить. Переменные в m-p по сравнению с конфигом bootchain
имеют приставку 'BOOTCHAIN_'. Дефолты заданы в config.mk
Переопределить можно так:
$(call set,BOOTCHAIN_OEM_WELCOME_TEXT,Welcome to my OS!)
features.in/initrd-bootchain/config.mk
View file @
c1b349cf
...
@@ -5,3 +5,17 @@ use/initrd-bootchain: use/uuid-iso
...
@@ -5,3 +5,17 @@ use/initrd-bootchain: use/uuid-iso
@$(call set,STAGE1_INITRD_TYPEARGS,$(shell echo "root=bootchain bootchain=fg,altboot automatic"))
@$(call set,STAGE1_INITRD_TYPEARGS,$(shell echo "root=bootchain bootchain=fg,altboot automatic"))
@$(call set,STAGE1_INITRD_BOOTMETHOD,$(shell echo "method:cdrom,uuid:$(UUID_ISO)"))
@$(call set,STAGE1_INITRD_BOOTMETHOD,$(shell echo "method:cdrom,uuid:$(UUID_ISO)"))
@$(call set,STAGE1_INITRD_STAGE2_OPTION,stagename)
@$(call set,STAGE1_INITRD_STAGE2_OPTION,stagename)
@$(call try,BOOTCHAIN_BC_FGVT_ACTIVATE,7)
@$(call try,BOOTCHAIN_WAITDEV_TIMEOUT,)
@$(call try,BOOTCHAIN_OEM_WELCOME_TEXT,Welcome to ALT!)
@$(call try,BOOTCHAIN_OEM_CDROOT,/image)
@$(call try,BOOTCHAIN_OEM_DEFAULT_STAGE2,altinst)
@$(call try,BOOTCHAIN_OEM_LIVE_STORAGE,alt-live-storage)
@$(call try,BOOTCHAIN_OEM_BAD_STORAGE,alt-slow-storage)
@$(call try,BOOTCHAIN_OEM_SETUP_STORAGE,alt-drivers-update)
@$(call try,BOOTCHAIN_OEM_IMAGES_BASE,/tmp/images)
@$(call try,BOOTCHAIN_OEM_OVERLAYS_DIR,/tmp/overlays)
@$(call try,BOOTCHAIN_OEM_URL_NETINST,/pub/netinst/current)
@$(call try,BOOTCHAIN_OEM_SRV_NETINST,)
@$(call try,BOOTCHAIN_OEM_NFS_NETINST,/srv/public/netinst)
@$(call try,BOOTCHAIN_OEM_CIFS_NETINST,/netinst)
features.in/initrd-bootchain/generate.mk
View file @
c1b349cf
# set up
livecd browser redirection page
# set up
initrd-bootchain config
ifdef BUILDDIR
ifdef BUILDDIR
...
@@ -7,16 +7,28 @@ include $(BUILDDIR)/distcfg.mk
...
@@ -7,16 +7,28 @@ include $(BUILDDIR)/distcfg.mk
BOOTCHAIN_CFG := $(BUILDDIR)/stage1/files/bootchain
BOOTCHAIN_CFG := $(BUILDDIR)/stage1/files/bootchain
all: debug
all: debug
@if [ -n "$(META_VOL_ID)" ]; then \
@[ -s "$(BOOTCHAIN_CFG)" ] || exit 1; \
if [ -n "$(META_VOL_ID)" ]; then \
DISTRO="$(META_VOL_ID)"; \
DISTRO="$(META_VOL_ID)"; \
else \
else \
DISTRO="$(RELNAME)"; \
DISTRO="$(RELNAME)"; \
fi; \
fi; \
if [ -s "$(BOOTCHAIN_CFG)" ]; then \
sed -i -e "s,@distro@,$$DISTRO," \
sed -i \
-e "s,@bc_fgvt_activate@,$(BOOTCHAIN_BC_FGVT_ACTIVATE)," \
-e "s,@distro@,$$DISTRO," \
-e "s,@waitdev_timeout@,$(BOOTCHAIN_WAITDEV_TIMEOUT)," \
$(BOOTCHAIN_CFG); \
-e "s,@oem_welcome_text@,$(BOOTCHAIN_OEM_WELCOME_TEXT)," \
fi
-e "s,@oem_cdroot@,$(BOOTCHAIN_OEM_CDROOT)," \
-e "s,@oem_default_stage2@,$(BOOTCHAIN_OEM_DEFAULT_STAGE2)," \
-e "s,@oem_live_storage@,$(BOOTCHAIN_OEM_LIVE_STORAGE)," \
-e "s,@oem_bad_storage@,$(BOOTCHAIN_OEM_BAD_STORAGE)," \
-e "s,@oem_setup_storage@,$(BOOTCHAIN_OEM_SETUP_STORAGE)," \
-e "s,@oem_images_base@,$(BOOTCHAIN_OEM_IMAGES_BASE)," \
-e "s,@oem_overlays_dir@,$(BOOTCHAIN_OEM_OVERLAYS_DIR)," \
-e "s,@oem_url_netinst@,$(BOOTCHAIN_OEM_URL_NETINST)," \
-e "s,@oem_srv_netinst@,$(BOOTCHAIN_OEM_SRV_NETINST)," \
-e "s,@oem_nfs_netinst@,$(BOOTCHAIN_OEM_NFS_NETINST)," \
-e "s,@oem_cifs_netinst@,$(BOOTCHAIN_OEM_CIFS_NETINST)," \
$(BOOTCHAIN_CFG)
debug:
debug:
@if [ -n "$(DEBUG)" ]; then \
@if [ -n "$(DEBUG)" ]; then \
...
...
features.in/initrd-bootchain/stage1/files/bootchain
View file @
c1b349cf
# /etc/sysconfig/bootchain
example
# /etc/sysconfig/bootchain
#############################
#############################
# Bootchain defaults #
# Bootchain defaults #
...
@@ -11,15 +11,14 @@
...
@@ -11,15 +11,14 @@
# BC_LOG_VT=3
# BC_LOG_VT=3
# Delay in seconds before auto-activate interactive VT, empty value for switch immediately
# Delay in seconds before auto-activate interactive VT, empty value for switch immediately
# BC_FGVT_ACTIVATE=7
BC_FGVT_ACTIVATE=@bc_fgvt_activate@
# Full path to the bootchain log or character special device name
# Full path to the bootchain log or character special device name
# BC_LOGFILE=/var/log/bootchained.log
# BC_LOGFILE=/var/log/bootchained.log
# Common timeout in seconds for all waitdev steps:
# Common timeout in seconds for all waitdev steps:
# this make possible using fallback after last waitdev step
# this make possible using fallback after last waitdev step
#
WAITDEV_TIMEOUT=@waitdev_timeout@
# WAITDEV_TIMEOUT=
#############################
#############################
...
@@ -38,42 +37,42 @@
...
@@ -38,42 +37,42 @@
#############################
#############################
# altboot back title
# altboot back title
OEM_WELCOME_TEXT="
Welcome to ALT!
"
OEM_WELCOME_TEXT="
@oem_welcome_text@
"
# Distribution name, for example
# Distribution name, for example
OEM_DISTRIBUTION="@distro@"
OEM_DISTRIBUTION="@distro@"
# ISO-image mount point (required for ALT)
# ISO-image mount point (required for ALT)
OEM_CDROOT=
/image
OEM_CDROOT=
@oem_cdroot@
# Default stage2 filename for boot from ISO-9660
# Default stage2 filename for boot from ISO-9660
OEM_DEFAULT_STAGE2=
altinst
OEM_DEFAULT_STAGE2=
@oem_default_stage2@
# Persistent storage device LABEL for Live-RW sessions
# Persistent storage device LABEL for Live-RW sessions
OEM_LIVE_STORAGE=
alt-live-storage
OEM_LIVE_STORAGE=
@oem_live_storage@
# Live storage device LABEL for mark non-usable devices
# Live storage device LABEL for mark non-usable devices
OEM_BAD_STORAGE=
alt-slow-storage
OEM_BAD_STORAGE=
@oem_bad_storage@
# Local storage device LABEL with the OEM drivers update
# Local storage device LABEL with the OEM drivers update
OEM_SETUP_STORAGE=
alt-drivers-update
OEM_SETUP_STORAGE=
@oem_setup_storage@
# Mount point inside stage2 for read additional images
# Mount point inside stage2 for read additional images
# OEM_IMAGES_BASE=/tmp/images
OEM_IMAGES_BASE=@oem_images_base@
# Directory inside stage2 for mount images as LiveCD slices
# Directory inside stage2 for mount images as LiveCD slices
# OEM_OVERLAYS_DIR=/tmp/overlays
OEM_OVERLAYS_DIR=@oem_overlays_dir@
# HTTP and FTP default base directory for netinstall
# HTTP and FTP default base directory for netinstall
# (if empty "/pub/netinst/current" path will be used)
# (if empty "/pub/netinst/current" path will be used)
# OEM_URL_NETINST=/pub/distributions/ALTLinux/p10/images
OEM_URL_NETINST=@oem_url_netinst@
# HTTP and FTP default server name or IP-address for netinstall
# HTTP and FTP default server name or IP-address for netinstall
# (if empty near gateway will be used)
# (if empty near gateway will be used)
# OEM_SRV_NETINST=ftp.altlinux.org
OEM_SRV_NETINST=@oem_srv_netinst@
# NFS path with overlays-live sub-directory, containing slice images
# NFS path with overlays-live sub-directory, containing slice images
# OEM_NFS_NETINST=/srv/public/netinst
OEM_NFS_NETINST=@oem_nfs_netinst@
# SAMBA share with overlays-live sub-directory, containing slice images
# SAMBA share with overlays-live sub-directory, containing slice images
# OEM_CIFS_NETINST=/netinst
OEM_CIFS_NETINST=@oem_cifs_netinst@
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment