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
Ximper Linux
mkimage-profiles
Commits
c8b578dd
You need to sign in or sign up before continuing.
Commit
c8b578dd
authored
Sep 14, 2010
by
Michael Shigorin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
features' day
- get rid of $dest - work on features.in/syslinux - README++
parent
4cb23d7c
Show whitespace changes
Inline
Side-by-side
Showing
34 changed files
with
171 additions
and
80 deletions
+171
-80
Makefile
Makefile
+1
-1
README
README
+15
-5
clean.mk
clean.mk
+1
-0
distro.mk
distro.mk
+13
-9
config.mk
features.in/00example/config.mk
+0
-0
generate.mk
features.in/00example/generate.mk
+0
-0
generate.sh
features.in/00example/generate.sh
+0
-0
Makefile
features.in/Makefile
+16
-9
config.mk
features.in/hdt/config.mk
+8
-0
config.mk
features.in/memtest/config.mk
+4
-3
02-memtest
features.in/memtest/stage1/scripts.d/02-memtest
+7
-0
00gfxboot.cfg
features.in/syslinux/cfg.in/00gfxboot.cfg
+4
-0
00menu.cfg
features.in/syslinux/cfg.in/00menu.cfg
+3
-0
00prompt.cfg
features.in/syslinux/cfg.in/00prompt.cfg
+2
-0
01timeout.cfg
features.in/syslinux/cfg.in/01timeout.cfg
+1
-0
10localboot.cfg
features.in/syslinux/cfg.in/10localboot.cfg
+3
-0
20install2.cfg
features.in/syslinux/cfg.in/20install2.cfg
+8
-0
80rescue.cfg
features.in/syslinux/cfg.in/80rescue.cfg
+4
-0
90hdt.cfg
features.in/syslinux/cfg.in/90hdt.cfg
+5
-0
90memtest.cfg
features.in/syslinux/cfg.in/90memtest.cfg
+3
-0
config.mk
features.in/syslinux/config.mk
+9
-0
generate.mk
features.in/syslinux/generate.mk
+38
-0
Makefile
image.in/Makefile
+8
-8
.gitignore
image.in/files/.gitignore
+0
-0
isolinux.cfg
image.in/files/syslinux/isolinux.cfg
+0
-28
iso.mk
iso.mk
+3
-1
Makefile
pkg.in/lists/Makefile
+5
-5
profile.mk
profile.mk
+2
-2
Makefile
sub.in/Makefile
+2
-2
Makefile
sub.in/main/Makefile
+1
-1
Makefile
sub.in/stage1/Makefile
+4
-3
.gitignore
sub.in/stage1/files/.gitignore
+0
-0
01-initfs
sub.in/stage1/scripts.d/01-initfs
+1
-1
02-txtboot
sub.in/stage1/scripts.d/02-txtboot
+0
-2
No files found.
Makefile
View file @
c8b578dd
...
...
@@ -28,4 +28,4 @@ all:
@
echo
'** available distribution targets:'
@
echo
$(DISTROS)
|
fmt
-sw65
| column
-t
$(DISTROS)
:
%.iso: | profile/init distro/% profile/populate iso
$(DISTROS)
:
%.iso: | profile/init distro/%
boot/isolinux
profile/populate iso
README
View file @
c8b578dd
...
...
@@ -16,12 +16,22 @@ make distclean server-light.iso
Объекты:
- дистрибутивы: distro.mk, могут основываться один на другом;
желательно избегать множественного наследования, используя
вместо него блоки use-*
- блоки функциональности use-*: не являются самостоятельными
(не путать с дистрибутивами), но законченными
- субпрофили:
вместо него блоки use/*
- субпрофили (список собирается в $(SUBPROFILES)):
+ stage1: propagator (ожидается после syslinux)
+ install2: инсталятор
+ main: пакетная база к инсталяции (обязательная и дополнительная)
+ ...
- блоки функциональности use/*: не являются самостоятельными
(не путать с дистрибутивами), но законченными; могут жить
в distro.mk (или сделать use.mk?), либо же в индивидуальных
features.in/*/config.mk, если необходимо дополнить не только
.config.mk, а и дерево формируемого профиля
- фичи: законченные кусочки функциональности, могут зависеть
друг от друга; сливаются с соответствующими субпрофилями
при сборке BUILDROOT, могут нести с собой копируемые в один
или несколько субпрофилей каталоги/файлы и могут выполнять
необходимые действия во время сборки после копирования
(generate.sh, generate.mk). NB: добавляем в $(FEATURES)
- списки пакетов: большая человеческая просьба по возможности
избегать дублирования
избегать дублирования
и подумать над pkg/lists/tagged...
clean.mk
View file @
c8b578dd
clean:
@echo '** cleaning up...'
@find -name '*~' -delete >&/dev/null
@[ -d build/ ] && \
$(MAKE) -C build/ $@ GLOBAL_BUILDDIR=$(shell readlink build) \
||:
...
...
distro.mk
View file @
c8b578dd
...
...
@@ -25,28 +25,32 @@ distro/init:
@echo "** starting distro configuration build process"
@:> $(CONFIG)
distro/base: distro/init sub/stage1
$(call set,KFLAVOUR,std-def)
###
distro/base: distro/init sub/stage1
use/syslinux/localboot
$(call set,KFLAVOUR,std-def)
$(call set,IMAGE_INIT_LIST,+branding-$$(BRANDING)-release)
$(call set,BRANDING,altlinux-desktop) ###
$(call set,KERNEL_PACKAGES,kernel-image-$$(KFLAVOUR))
distro/syslinux: distro/base
# bootloader test target
distro/syslinux: distro/base use/syslinux/ui/menu use/syslinux/localboot use/hdt use/memtest boot/isolinux
# NB: our */* are phony targets really, just for namespace
distro/installer: distro/base sub/install2
distro/installer: distro/base sub/install2 use/syslinux/install2
@#$(call put,BRANDING=altlinux-sisyphus) ###
$(call set,BASE_LISTS,base kernel)
$(call set,INSTALL2_PACKAGES,installer-distro-server-light-stage2) ###
distro/server-base: distro/installer sub/main use/
memtest86
distro/server-base: distro/installer sub/main use/
syslinux/ui/menu use/memtest
$(call add,BASE_LISTS,server-base kernel-server)
distro/server-light: distro/server-base use/
bootsplash
distro/server-light: distro/server-base use/
hdt
$(call set,KFLAVOUR,ovz-smp) # override default
$(call set,BRANDING,sisyphus-server-light)
$(call add,DISK_LISTS,kernel-wifi)
$(call add,BASE_LISTS,$(call tags,base server))
use/bootsplash:
$(call add,COMMON_TAGS,bootsplash)
# FIXME: this belongs to bootsplash feature
#use/bootsplash:
# $(call add,COMMON_TAGS,bootsplash)
boot/%:
$(call set,BOOTLOADER,$*)
features.in/00example/config.mk
0 → 100644
View file @
c8b578dd
features.in/00example/generate.mk
0 → 100644
View file @
c8b578dd
features.in/00example/generate.sh
0 → 100644
View file @
c8b578dd
features.in/Makefile
View file @
c8b578dd
include
$(BUILDDIR)/.config.mk
# make rsync backups
SHELL
+=
-x
# first rsync what's static, and make backups --
# these might signal of file clashes (or plain dirt);
# then handle two more ways of implementing a feature
all
:
@
for
dir
in
$(FEATURES)
;
do
\
@
echo
"** starting feature configuration"
@
[
-z
$(FEATURES)
]
||
\
for
dir
in
$
(
sort
$(FEATURES)
)
;
do
\
for
sub
in
$(SUBPROFILES)
;
do
\
dest
=
$$
{
sub%stage1
}
;
\
[
-d
$$
dir
/
$$
sub/
]
&&
\
rsync
-ab
$$
dir
/
$$
sub/
$(BUILDDIR)
/
$$
dest/
&&
\
cd
$(BUILDDIR)
/
$$
dest
/
&&
\
rsync
-ab
$$
dir
/
$$
sub/
$(BUILDDIR)
/
$$
sub/
&&
{
\
cd
$(BUILDDIR)
/
$$
sub
/
&&
\
git add
.
&&
\
git commit
-qam
"
$@
/
$$
dir/
$$
sub"
&&
\
cd
->&/dev/null
;
\
git commit
-qam
"
$@
/
$$
dir/
$$
sub"
||
:
;
\
cd
-
>
&/dev/null
;
\
}
;
\
done
;
\
[
-x
$$
dir
/generate.sh
]
&&
{
cd
$$
dir
&&
./generate.sh
;
cd
-
;
}
;
\
[
-s
$$
dir
/generate.mk
]
&&
$(MAKE)
-C
$$
dir
-f
generate.mk
;
\
done
@
# these might signal of file clashes
(
or plain dirt
)
@
find
$(BUILDDIR)
-name
'*~'
@
find
$(BUILDDIR)
-name
'*~'
||
:
features.in/hdt/config.mk
0 → 100644
View file @
c8b578dd
# no "Memory" in hdt's menu, weird
use/hdt: use/memtest
$(call add,SYSLINUX_ITEMS,hdt)
@# ITEMS iterator will happily omit a missing file, so...
$(call add,SYSLINUX_FILES,/usr/lib/syslinux/hdt.c32)
@# TODO: modules.pcimap (optional); maybe gzip
$(call add,SYSLINUX_FILES,/usr/share/pci.ids)
features.in/memtest/config.mk
View file @
c8b578dd
use/memtest86:
$(call put,COMMON_PACKAGES+=memtest86+)
@# configure syslinux/isolinux as well
use/memtest:
$(call add,FEATURES,memtest)
$(call add,COMMON_PACKAGES,memtest86+)
$(call add,SYSLINUX_ITEMS,memtest)
features.in/memtest/stage1/scripts.d/02-memtest
0 → 100755
View file @
c8b578dd
#!/bin/sh -x
mkdir
-p
"
$WORKDIR
"
/syslinux
MEMTEST
=
"
$(
find /boot/
-name
'memtest*'
-print
-quit
)
"
# hdt recommends adding .bin
[
-z
"
$MEMTEST
"
]
||
cp
-f
"
$MEMTEST
"
"
$WORKDIR
"
/syslinux/memtest.bin
features.in/syslinux/cfg.in/00gfxboot.cfg
0 → 100644
View file @
c8b578dd
ui gfxboot.com
menu title mkimage-profiles 2.0 ###
prompt 0
gfxboot bootlogo
features.in/syslinux/cfg.in/00menu.cfg
0 → 100644
View file @
c8b578dd
ui menu.c32
menu title mkimage-profiles 2.0 ###
prompt 0
features.in/syslinux/cfg.in/00prompt.cfg
0 → 100644
View file @
c8b578dd
say mkimage-profiles 2.0 ###
prompt 1
features.in/syslinux/cfg.in/01timeout.cfg
0 → 100644
View file @
c8b578dd
timeout 200
features.in/syslinux/cfg.in/10localboot.cfg
0 → 100644
View file @
c8b578dd
label harddisk
menu label ^Continue as usual
localboot 0x80
features.in/syslinux/cfg.in/20install2.cfg
0 → 100644
View file @
c8b578dd
label linux
menu label ^Normal install
kernel alt0/vmlinuz
append initrd=alt0/full.cz changedisk vga=0x314 quiet=1 showopts automatic=method:cdrom
label noapic
menu label ^FailSafe(TM) install
kernel alt0/vmlinuz
append initrd=alt0/full.cz changedisk vga=0x314 showopts nolapic noapic acpi=off
features.in/syslinux/cfg.in/80rescue.cfg
0 → 100644
View file @
c8b578dd
label rescue
menu label ^Rescue
kernel alt0/vmlinuz
append initrd=alt0/full.cz live fastboot stagename=rescue
features.in/syslinux/cfg.in/90hdt.cfg
0 → 100644
View file @
c8b578dd
label hdt
menu label ^Hardware info
com32 hdt.c32
append pciids=pci.ids
# NB: data can be gzipped (without .gz suffix)
features.in/syslinux/cfg.in/90memtest.cfg
0 → 100644
View file @
c8b578dd
label memtest
menu label ^Memory Test
linux memtest.bin
features.in/syslinux/config.mk
0 → 100644
View file @
c8b578dd
# UI _does_ automatically enable the feature...
use/syslinux/ui/%:
$(call set,SYSLINUX_UI,$*)
$(call add,FEATURES,syslinux)
$(call add,SYSLINUX_ITEMS,$*)
# ...and menu items don't
use/syslinux/%:
$(call add,SYSLINUX_ITEMS,$*)
features.in/syslinux/generate.mk
0 → 100644
View file @
c8b578dd
include $(BUILDDIR)/.config.mk
ifndef BOOTLOADER
$(warning syslinux feature enabled but BOOTLOADER undefined)
endif
ifndef SYSLINUX
SYSLINUX = textprompt
endif
### FIXME: too much insight (ab)used
DSTDIR := $(BUILDDIR)/stage1/files/syslinux
CONFIG := $(DSTDIR)/$(BOOTLOADER).cfg
PARTS := $(SYSLINUX_UI) $(SYSLINUX_ITEMS) $(SUBPROFILES) timeout
MODDIR := /usr/lib/syslinux
# compile bootloader config from chosen parts
# NB: list position determined by file numbering (*.cfg)
config: debug copy
@cat $(sort $(foreach P,$(PARTS),$(wildcard cfg.in/??$(P).cfg))) /dev/null > $(CONFIG)
prep:
@mkdir -p $(DSTDIR)
# copy over the needed syslinux modules (item.c32 or item.com)
# and SYSLINUX_FILES (list of absolute paths)
copy: prep
@$(foreach F, \
$(SYSLINUX_FILES) $(wildcard $(addprefix $(MODDIR)/,$(addsuffix .c??,$(SYSLINUX_ITEMS)))), \
$(shell cp -pLt $(DSTDIR) -- $(F)))
# for p in $PARTS; do ls ??$p.cfg; done | sort
debug:
@echo "** BOOTLOADER: $(BOOTLOADER)"
@echo "** SYSLINUX_UI: $(SYSLINUX_UI)"
@echo "** SYSLINUX_ITEMS: $(SYSLINUX_ITEMS)"
@echo "** PARTS: $(sort $(foreach P,$(PARTS),$(wildcard cfg.in/??$(P).cfg)))"
@echo "** MODULES: $(wildcard $(addprefix $(MODDIR)/,$(addsuffix .c??,$(SYSLINUX_ITEMS))))"
image.in/Makefile
View file @
c8b578dd
...
...
@@ -14,24 +14,24 @@ BOOT_TYPE = isolinux
include
$(MKIMAGE_PREFIX)/targets.mk
all
:
prep copy-
tree copy-subdirs
run-scripts pack-image
all
:
prep copy-
subdirs copy-tree
run-scripts pack-image
# FIXME: scripts.d/?
prep
:
disk-info metadata
@
echo
"TOPDIR=
$(TOPDIR)
"
disk-info
:
mkdir
-p
files/.disk
echo
"FIXME"
>
files/.disk/info
### +
$(ARCH)
(
cd
$(TOPDIR)
;
git show-ref
--head
--dereference
-s
--
HEAD 2>/dev/null
)
>
files/.disk/commit
[
-s
files/.disk/commit
]
||
rm
files/.disk/commit
@
mkdir
-p
files/.disk
@
echo
"FIXME"
>
files/.disk/info
### +
$(ARCH)
@
(
cd
$(TOPDIR)
;
git show-ref
--head
--dereference
-s
--
HEAD 2>/dev/null
)
>
files/.disk/commit
@
[
-s
files/.disk/commit
]
||
rm
files/.disk/commit
# see also alterator-pkg (backend3/pkg-install)
# FIXME: groups unmerged, and only .base hardwired in
metadata
:
mkdir
-p
files/Metadata
rm
-f
files/Metadata/pkg-groups.tar
tar
-cvf
files/Metadata/pkg-groups.tar
\
@
mkdir
-p
files/Metadata
@
rm
-f
files/Metadata/pkg-groups.tar
@
tar
-cvf
files/Metadata/pkg-groups.tar
\
-C
$(PKGDIR)
\
$(
shell
echo
$
(
call list,.base
)
|
sed
's,
$(PKGDIR)
/*,,g'
)
image.in/files/.gitignore
0 → 100644
View file @
c8b578dd
image.in/files/syslinux/isolinux.cfg
deleted
100644 → 0
View file @
4cb23d7c
ui menu.c32
menu title mkimage-profiles 2.0
prompt 0
timeout 200
# f1 help.txt
# f2 version.txt
# ...
default linux
label harddisk
menu label Continue as usual
localboot 0x80
# menu default
label linux
menu label Normal install
kernel alt0/vmlinuz
append initrd=alt0/full.cz changedisk vga=0x314 quiet=1 showopts automatic=method:cdrom
label noapic
menu label FailSafe(TM) install
kernel alt0/vmlinuz
append initrd=alt0/full.cz changedisk vga=0x314 showopts nolapic noapic acpi=off
label rescue
menu label Rescue
kernel alt0/vmlinuz
append initrd=alt0/full.cz live fastboot stagename=rescue
label memtest
menu label Memory Test
kernel memtest
iso.mk
View file @
c8b578dd
# adding boot/isolinux to prereqs is too late here,
# since profile/populate has already finished by now
iso:
@echo "** starting image build process"
(cd $(BUILDDIR)/; autoconf; ./configure --with-aptconf=$(HOME)/apt/apt.conf) ###
@
(cd $(BUILDDIR)/; autoconf; ./configure --with-aptconf=$(HOME)/apt/apt.conf) ###
$(MAKE) -C $(BUILDDIR)/ GLOBAL_BUILDDIR=$(BUILDDIR)
pkg.in/lists/Makefile
View file @
c8b578dd
...
...
@@ -4,13 +4,13 @@
include
$(BUILDDIR)/.config.mk
# env | sort -u | grep _LISTS | xargs cp
all
:
prep
test
all
:
prep
debug
@
$
(
foreach V,
\
$
(
filter %_LISTS,
$
(
sort
$
(
.VARIABLES
)))
,
\
$
(
if
$
(
filter environment% file,
$
(
origin
$V
))
,
\
$(
shell
cp
--parents
-a
v
t
$(BUILDDIR)
/pkg/lists/
\
--
$
(
value
$V)
>>
$(BUILDDIR)
/log 2>&1
)
))
@
cp
-a
v
.base
$(BUILDDIR)
/pkg/lists/
$(
shell
cp
--parents
-at
$(BUILDDIR)
/pkg/lists/
\
--
$
(
value
$V))
))
@
cp
-a
.base
$(BUILDDIR)
/pkg/lists/
# moving this into 'all' spoils execution order (clobbers results)
prep
:
...
...
@@ -19,7 +19,7 @@ prep:
# dump *_LISTS variables' values
# TODO: consider GLOBAL_VERBOSE? (currently not coming with .config.mk)
# (for cp -v then, too)
test
:
debug
:
@
$
(
foreach V,
\
$
(
filter %_LISTS,
$
(
sort
$
(
.VARIABLES
)))
,
\
$
(
if
$
(
filter environment% file,
$
(
origin
$V
))
,
\
...
...
profile.mk
View file @
c8b578dd
...
...
@@ -3,14 +3,14 @@ profile/init:
@rsync -qaH --delete image.in/ "$(BUILDDIR)"/
@touch "$(BUILDDIR)"/.config.mk
@mkdir "$(BUILDDIR)"/.mki
cd $(BUILDDIR); git init ###
cd $(BUILDDIR); git init
-q; git add .; git commit -qam 'init'
###
@rm -f build
@[ -w . ] \
&& ln -sf "$(BUILDDIR)" build \
|| echo "** profile directory readonly: skipping symlinks, env only"
profile/populate: profile/init
for dir in sub.in features.in pkg.in; do \
@
for dir in sub.in features.in pkg.in; do \
$(MAKE) -C $$dir; \
done
sub.in/Makefile
View file @
c8b578dd
...
...
@@ -6,8 +6,8 @@ all:
cd
$(BUILDDIR)
/
$$
dir
/
&&
\
git add
.
&&
\
git commit
-qam
"
$@
/
$$
dir"
;
\
cd
->&/dev/null
;
\
done
cd
-
>
&/dev/null
;
\
done
||
:
clean
:
@
for
dir
in
$(SUBPROFILES)
;
do
\
...
...
sub.in/main/Makefile
View file @
c8b578dd
#
##
installation package base (requisite + optional)
# installation package base (requisite + optional)
default
:
all
...
...
sub.in/stage1/Makefile
View file @
c8b578dd
...
...
@@ -3,15 +3,16 @@ include ../functions.mk
include
$(MKIMAGE_PREFIX)/config.mk
include
$(GLOBAL_BUILDDIR)/.config.mk
CHROOT_PACKAGES
=
syslinux
$(KERNEL_PACKAGES)
CHROOT_PACKAGES
=
syslinux
$(KERNEL_PACKAGES)
$(COMMON_PACKAGES)
###
MKI_PACK_RESULTS
=
data
###
PROPAGATOR_VERSION
=
mkimage-profiles 2.0
PROPAGATOR_MAR_MODULES
=
./modules
PROPAGATOR_INITFS
=
./initfs
COPY_TREE
=
./files
include
$(MKIMAGE_PREFIX)/targets.mk
all
:
build-propagator copy-isolinux run-scripts pack-image
all
:
build-propagator copy-
tree copy-
isolinux run-scripts pack-image
sub.in/stage1/files/.gitignore
0 → 100644
View file @
c8b578dd
sub.in/stage1/scripts.d/01-initfs
View file @
c8b578dd
#!/bin/sh
echo
"file /.VERSION @TMPDIR@/.VERSION 0644 0 0"
>
"
$WORKDIR
"
/initfs
#
##
FIXME: broken test, we already do branding
# FIXME: broken test, we already do branding
[
-z
"
$(
BRANDING
)
"
]
||
\
echo
"file /bootsplash /bootsplash/bootsplash 0644 0 0"
>>
"
$WORKDIR
"
/initfs
sub.in/stage1/scripts.d/02-txtboot
deleted
100755 → 0
View file @
4cb23d7c
#!/bin/sh
install
-pDm644
/usr/lib/syslinux/menu.c32
"
$WORKDIR
"
/syslinux/menu.c32
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