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
2cc81b7e
You need to sign in or sign up before continuing.
Commit
2cc81b7e
authored
Sep 08, 2010
by
Michael Shigorin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
r/o profile build
Building m-p-d stuff in-tree was plagued by accidental generated file commits, and it wasn't nice at all anyways.
parent
d920c990
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
37 additions
and
24 deletions
+37
-24
Makefile
Makefile
+18
-0
clean.mk
clean.mk
+1
-8
configure
configure
+9
-9
distro.mk
distro.mk
+3
-3
configure.ac
image.in/configure.ac
+2
-2
iso.mk
iso.mk
+2
-2
Makefile
pkg/Makefile
+2
-0
No files found.
Makefile
View file @
2cc81b7e
...
@@ -7,6 +7,12 @@ include clean.mk
...
@@ -7,6 +7,12 @@ include clean.mk
include
distro.mk
include
distro.mk
include
iso.mk
include
iso.mk
# this could have come come from environment;
# if not, can be symlinked if r/w, or made anew
ifndef
BUILDDIR
BUILDDIR
:=
$(
shell
realpath
build
||
bin/mktmpdir mkimage-profiles.build
)
endif
# we can't use implicit rules for top-level targets, only for prereqs
# we can't use implicit rules for top-level targets, only for prereqs
CONFIGS
=
$(
shell
sed
-n
's,^distro/\([^:]\+\):.*$$,\1,p'
distro.mk
)
CONFIGS
=
$(
shell
sed
-n
's,^distro/\([^:]\+\):.*$$,\1,p'
distro.mk
)
DISTROS
=
$
(
addsuffix .iso,
$(CONFIGS)
)
DISTROS
=
$
(
addsuffix .iso,
$(CONFIGS)
)
...
@@ -15,4 +21,16 @@ all:
...
@@ -15,4 +21,16 @@ all:
@
echo
'** available distribution targets:'
@
echo
'** available distribution targets:'
@
echo
$(DISTROS)
|
fmt
-sw65
| column
-t
@
echo
$(DISTROS)
|
fmt
-sw65
| column
-t
prep
:
@
echo
"** BUILDDIR:
$(BUILDDIR)
"
# ls -ld $(BUILDDIR)
@rsync
-qaH
--delete
image.in/
"$(BUILDDIR)"
/image/
@rm
-f
"$(BUILDDIR)"
/.config.mk
@touch
"$(BUILDDIR)"
/.config.mk
@mkdir
"$(BUILDDIR)"
/.mki
@rm
-f
build
@[
-w
.
]
\
&&
ln
-sf
"$(BUILDDIR)"
build
\
|| echo "** profile directory readonly
:
skipping symlinks
,
env only"
$(DISTROS)
:
%.iso: | prep distro/% iso
$(DISTROS)
:
%.iso: | prep distro/% iso
clean.mk
View file @
2cc81b7e
...
@@ -8,12 +8,5 @@ distclean: clean
...
@@ -8,12 +8,5 @@ distclean: clean
@[ -d build/ ] && \
@[ -d build/ ] && \
make -C build/image $@ GLOBAL_BUILDDIR=$(shell readlink build) && \
make -C build/image $@ GLOBAL_BUILDDIR=$(shell readlink build) && \
rm -r $(shell readlink build) && \
rm -r $(shell readlink build) && \
rm
.config.mk
build \
rm build \
||:
||:
# it can be symlinked if r/w (see configure);
# if not, then should come from environment
BUILDDIR ?= $(shell realpath build)
prep:
@echo BUILDDIR: $(BUILDDIR)
configure
View file @
2cc81b7e
...
@@ -12,18 +12,18 @@ PARAMS="$@"
...
@@ -12,18 +12,18 @@ PARAMS="$@"
# copy profiles there to configure a copy, not master tree
# copy profiles there to configure a copy, not master tree
# keeping profile itself completely readonly would be nice
# keeping profile itself completely readonly would be nice
export
BUILDDIR
=
"
$(
bin/mktmpdir mkimage-profiles.build
)
"
#
export BUILDDIR="$(bin/mktmpdir mkimage-profiles.build)"
#ls -ld $BUILDDIR
#ls -ld $BUILDDIR
#find image.in -type f -print0 | xargs -r0 cp -at "$BUILDDIR"/ --
#find image.in -type f -print0 | xargs -r0 cp -at "$BUILDDIR"/ --
rsync
-qaH
--delete
image.in/
"
$BUILDDIR
"
/image/
#
rsync -qaH --delete image.in/ "$BUILDDIR"/image/
#rm -f "$BUILDDIR"/.config.mk
#rm -f "$BUILDDIR"/.config.mk
touch
"
$BUILDDIR
"
/.config.mk
#
touch "$BUILDDIR"/.config.mk
mkdir
"
$BUILDDIR
"
/.mki
#
mkdir "$BUILDDIR"/.mki
rm
-f
build
#
rm -f build
[
-w
.
]
\
#
[ -w . ] \
&&
ln
-sf
"
$BUILDDIR
"
build
\
#
&& ln -sf "$BUILDDIR" build \
||
echo
"profile directory readonly: skipping symlinks, env only"
#
|| echo "profile directory readonly: skipping symlinks, env only"
# remember all those --with-*? we'll pass them downstream, honestly
# remember all those --with-*? we'll pass them downstream, honestly
echo
"
$PARAMS
"
>
"
$BUILDDIR
"
/.with
#
echo "$PARAMS" > "$BUILDDIR"/.with
distro.mk
View file @
2cc81b7e
### build up distribution's configuration
### build up distribution's configuration
CONFIG = $(BUILDDIR)/.config.mk
CONFIG = $(BUILDDIR)/.config.mk
#
ACHTUNG
: don"t use ANY quotes ('/") for put() arguments!
#
NB
: don"t use ANY quotes ('/") for put() arguments!
#
shell will get confused by ' or args get spammed with "
# shell will get confused by ' or args get spammed with "
put = $(and $(1),$(put_body))
put = $(and $(1),$(put_body))
define put_body
define put_body
@printf '%s\n' '$(1)#=- $@' >> "$(CONFIG)";
@printf '%s\n' '$(1)#=- $@' >> "$(CONFIG)";
...
@@ -18,7 +18,7 @@ init:
...
@@ -18,7 +18,7 @@ init:
:> $(CONFIG)
:> $(CONFIG)
$(call put,KFLAVOUR=std-def) ###
$(call put,KFLAVOUR=std-def) ###
$(call put,IMAGE_INIT_LIST=+branding-$$(BRANDING)-release)
$(call put,IMAGE_INIT_LIST=+branding-$$(BRANDING)-release)
#$(call put,STAGE1_PACKAGES=kernel-image-$$(KFLAVOUR))
@
#$(call put,STAGE1_PACKAGES=kernel-image-$$(KFLAVOUR))
$(call put,KERNEL_PACKAGES=kernel-image-$$(KFLAVOUR))
$(call put,KERNEL_PACKAGES=kernel-image-$$(KFLAVOUR))
# NB: our */* are phony targets really, just for namespace
# NB: our */* are phony targets really, just for namespace
...
...
image.in/configure.ac
View file @
2cc81b7e
...
@@ -7,7 +7,7 @@ AC_ARG_WITH(aptconf,
...
@@ -7,7 +7,7 @@ AC_ARG_WITH(aptconf,
AC_MSG_CHECKING([apt.conf file])
AC_MSG_CHECKING([apt.conf file])
if test -r "$with_aptconf" ; then
if test -r "$with_aptconf" ; then
APTCONF="$with_aptconf"
APTCONF="$with_aptconf"
AC_MSG_RESULT([
**
$with_aptconf exists])
AC_MSG_RESULT([$with_aptconf exists])
else
else
echo "WARNING: $with_aptconf missing, ignoring"
echo "WARNING: $with_aptconf missing, ignoring"
fi
fi
...
@@ -23,7 +23,7 @@ AC_ARG_WITH(mkimage,
...
@@ -23,7 +23,7 @@ AC_ARG_WITH(mkimage,
AC_MSG_CHECKING([mkimage])
AC_MSG_CHECKING([mkimage])
if test -d "$with_mkimage/tools"; then
if test -d "$with_mkimage/tools"; then
MKIMAGE_PREFIX="$with_mkimage"
MKIMAGE_PREFIX="$with_mkimage"
AC_MSG_RESULT([
**
$with_mkimage/tools exists])
AC_MSG_RESULT([$with_mkimage/tools exists])
fi
fi
],
],
[
[
...
...
iso.mk
View file @
2cc81b7e
...
@@ -5,6 +5,6 @@ pkgs:
...
@@ -5,6 +5,6 @@ pkgs:
iso: pkgs
iso: pkgs
@echo "** starting image build process"
@echo "** starting image build process"
@### setup GLOBAL_BOOT_TYPE, etc
@### setup GLOBAL_BOOT_TYPE, etc
(cd $(BUILDDIR)/image; autoconf; ./configure --with-aptconf=
/etc/apt/apt.conf.SS_64
) ###
(cd $(BUILDDIR)/image; autoconf; ./configure --with-aptconf=
$(HOME)/apt/apt.conf
) ###
echo
$(MAKE) -C $(BUILDDIR)/image GLOBAL_BUILDDIR=$(BUILDDIR)
$(MAKE) -C $(BUILDDIR)/image GLOBAL_BUILDDIR=$(BUILDDIR)
@# check iso size
@# check iso size
pkg/Makefile
View file @
2cc81b7e
...
@@ -11,12 +11,14 @@ pkgs: prep test
...
@@ -11,12 +11,14 @@ pkgs: prep test
$
(
if
$
(
filter environment% file,
$
(
origin
$V
))
,
\
$
(
if
$
(
filter environment% file,
$
(
origin
$V
))
,
\
$(
shell
cp
-a
$
(
addprefix lists/,
$
(
value
$V))
\
$(
shell
cp
-a
$
(
addprefix lists/,
$
(
value
$V))
\
$(BUILDDIR)
/pkg/lists/
)
))
$(BUILDDIR)
/pkg/lists/
)
))
@
cp
-a
lists/.base
$(BUILDDIR)
/pkg/lists/
# moving this into pkgs spoils execution order (clobbers results)
# moving this into pkgs spoils execution order (clobbers results)
prep
:
prep
:
mkdir
-p
$(BUILDDIR)
/pkg/
{
lists,groups
}
mkdir
-p
$(BUILDDIR)
/pkg/
{
lists,groups
}
# dump *_LISTS variables' values
# dump *_LISTS variables' values
# TODO: consider GLOBAL_VERBOSE? (currently not coming with .config.mk)
test
:
test
:
@
$
(
foreach V,
\
@
$
(
foreach V,
\
$
(
filter %_LISTS,
$
(
sort
$
(
.VARIABLES
)))
,
\
$
(
filter %_LISTS,
$
(
sort
$
(
.VARIABLES
)))
,
\
...
...
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