forked from altcloud/mkimage-profiles
Compare commits
12 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
0a3aaf15c2 | ||
|
1ee997e832 | ||
|
18f1a6360a | ||
|
809ae4d9e8 | ||
|
24edc620d8 | ||
|
d31a2555bd | ||
|
03ba4631f6 | ||
|
49eb551fef | ||
|
3c26cc869d | ||
|
698c5e314a | ||
|
7683532ea2 | ||
|
cf21fd4298 |
@@ -1,5 +1,5 @@
|
||||
Name: mkimage-profiles
|
||||
Version: 0.7.2
|
||||
Version: 0.7.4
|
||||
Release: alt1
|
||||
|
||||
Summary: ALT Linux based distribution metaprofile
|
||||
@@ -61,6 +61,12 @@ cp -a * %buildroot%mpdir
|
||||
%doc README QUICKSTART
|
||||
|
||||
%changelog
|
||||
* Mon Jul 16 2012 Michael Shigorin <mike@altlinux.org> 0.7.4-alt1
|
||||
- ppc builds
|
||||
|
||||
* Mon Jul 09 2012 Michael Shigorin <mike@altlinux.org> 0.7.3-alt1
|
||||
- arm builds
|
||||
|
||||
* Mon Jul 02 2012 Michael Shigorin <mike@altlinux.org> 0.7.2-alt1
|
||||
- simply fixes
|
||||
|
||||
|
@@ -1,6 +0,0 @@
|
||||
object 5c4cedb8730b5ad4ff4c5102a5de30d275ac23ed
|
||||
type commit
|
||||
tag v0.7.1
|
||||
tagger Michael Shigorin <mike@altlinux.org> 1340645389 +0300
|
||||
|
||||
mulberry!
|
6
.gear/tags/ad042fed42eebceae830142ad84d7742bdce509d
Normal file
6
.gear/tags/ad042fed42eebceae830142ad84d7742bdce509d
Normal file
@@ -0,0 +1,6 @@
|
||||
object 49eb551fefafb42ea72fbe460f7dff0f326165b5
|
||||
type commit
|
||||
tag v0.7.3
|
||||
tagger Michael Shigorin <mike@altlinux.org> 1341866845 +0300
|
||||
|
||||
arm builds
|
@@ -1 +1 @@
|
||||
481bb0d094cd33495db82c7b3341fd500fa8f467 v0.7.1
|
||||
ad042fed42eebceae830142ad84d7742bdce509d v0.7.3
|
||||
|
5
Makefile
5
Makefile
@@ -10,7 +10,7 @@ ifndef ARCHES
|
||||
ifdef ARCH
|
||||
ARCHES := $(ARCH)
|
||||
else
|
||||
ARCHES := $(shell arch | sed 's/i686/i586/')
|
||||
ARCHES := $(shell arch | sed 's/i686/i586/; s/armv.*/arm/; s/ppc.*/ppc/')
|
||||
endif
|
||||
endif
|
||||
export ARCHES
|
||||
@@ -36,6 +36,9 @@ export NUM_TARGETS := $(words $(MAKECMDGOALS))
|
||||
# for pipefail
|
||||
SHELL = /bin/bash
|
||||
|
||||
# don't even consider remaking a configuration file
|
||||
.PHONY: $(HOME)/.mkimage/profiles.mk
|
||||
|
||||
# real targets need real work
|
||||
%:
|
||||
@n=1; \
|
||||
|
@@ -43,7 +43,7 @@ choose_tmpdir() {
|
||||
for i in "$@"; do
|
||||
[ -d "$i" -a -w "$i" ] || continue
|
||||
echo -n "$i "
|
||||
df -Tl "$i" | tail -1
|
||||
df -PT "$i" | tail -1
|
||||
done \
|
||||
| sort -unk6 \
|
||||
| while read dir dev fstype size used free percent mnt; do
|
||||
|
@@ -20,7 +20,8 @@ distro/live-isomd5sum: distro/.base use/live/base use/isomd5sum
|
||||
@$(call add,LIVE_PACKAGES,livecd-isomd5sum)
|
||||
|
||||
distro/live-builder: pkgs := livecd-tmpfs livecd-online-repo mkimage-profiles
|
||||
distro/live-builder: distro/.live-base use/dev/mkimage use/dev/repo
|
||||
distro/live-builder: distro/.live-base use/dev/mkimage use/dev/repo \
|
||||
use/syslinux/timeout/30
|
||||
@$(call set,KFLAVOURS,$(BIGRAM))
|
||||
@$(call add,LIVE_LISTS,$(call tags,base && (server || builder)))
|
||||
@$(call add,LIVE_PACKAGES,zsh sudo)
|
||||
|
@@ -10,7 +10,7 @@
|
||||
|
||||
- ARCH
|
||||
+ задаёт целевую архитектуру образов
|
||||
+ значение: пусто (по умолчанию авто), i586 или x86_64
|
||||
+ значение: пусто (по умолчанию авто), i586, x86_64, arm, ppc
|
||||
+ см. ../lib/build.mk
|
||||
|
||||
- ARCHES
|
||||
|
26
doc/qemu.txt
Normal file
26
doc/qemu.txt
Normal file
@@ -0,0 +1,26 @@
|
||||
Для сборки с применением трансляции посредством QEMU
|
||||
выполните от имени root следующие команды:
|
||||
|
||||
apt-get install qemu-user-binfmt_misc
|
||||
modprobe binfmt_misc
|
||||
echo 32768 > /proc/sys/vm/mmap_min_addr
|
||||
|
||||
и сконфигурируйте его применение для требуемых платформ:
|
||||
|
||||
echo ":arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/.host/qemu-arm:" > /proc/sys/fs/binfmt_misc/register
|
||||
echo ':ppc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x14:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/.host/qemu-ppc:' > /proc/sys/fs/binfmt_misc/register
|
||||
|
||||
Если файл /proc/sys/fs/binfmt_misc/register не существует,
|
||||
потребуется установить и загрузить иное ядро (например, std-def).
|
||||
|
||||
Также нужен sources.list с указанием соответствующего репозитория
|
||||
и ссылающийся на него apt.conf (см. apt.conf.sample); например:
|
||||
|
||||
--- sources.list.sisyphus.arm
|
||||
rpm http://ftp.altlinux.org/pub/distributions/ALTLinux/Sisyphus arm classic
|
||||
---
|
||||
|
||||
--- sources.list.4.1.ppc
|
||||
rpm http://ftp.altlinux.org/pub/people/wart/repos/lioka/powerpc ppc classic
|
||||
rpm http://ftp.altlinux.org/pub/people/wart/repos/lioka/powerpc noarch classic
|
||||
---
|
@@ -22,7 +22,7 @@ MKI_SORTFILE := /tmp/isosort
|
||||
all: $(GLOBAL_DEBUG) prep copy-subdirs copy-tree run-scripts pack-image \
|
||||
postprocess $(GLOBAL_CLEAN_WORKDIR)
|
||||
|
||||
prep: $(GLOBAL_DEBUG) dot-disk $(WHATEVER) imagedir
|
||||
prep: $(GLOBAL_DEBUG) dot-disk $(WHATEVER)
|
||||
|
||||
dot-disk:
|
||||
@mkdir -p files/.disk
|
||||
|
@@ -15,5 +15,3 @@ IMAGE_PACKAGES = $(call list,$(BASE_LISTS)) \
|
||||
|
||||
all: $(GLOBAL_DEBUG) build-image copy-tree run-image-scripts pack-image \
|
||||
postprocess $(GLOBAL_CLEAN_WORKDIR)
|
||||
|
||||
prep: imagedir
|
||||
|
@@ -50,5 +50,3 @@ pack-image: MKI_PACK_RESULTS := tar:$(VM_TARBALL)
|
||||
|
||||
all: $(GLOBAL_DEBUG) build-image copy-tree run-image-scripts pack-image \
|
||||
convert-image postprocess $(GLOBAL_CLEAN_WORKDIR)
|
||||
|
||||
prep: imagedir
|
||||
|
@@ -3,7 +3,7 @@ use/dev:
|
||||
@$(call add,THE_PACKAGES,git-core hasher gear)
|
||||
|
||||
use/dev/mkimage: use/dev
|
||||
@$(call add,THE_PACKAGES,mkimage shadow-change)
|
||||
@$(call add,THE_PACKAGES,mkimage shadow-change su)
|
||||
|
||||
use/dev/repo: use/dev use/repo/main
|
||||
@$(call add,THE_PACKAGES,apt-repo)
|
||||
|
@@ -13,10 +13,10 @@ HOME="/home/$USER"
|
||||
install -dm750 -o "$USER" -g "$USER" "$HOME"
|
||||
|
||||
# we honestly don't know much more
|
||||
if type -t git >&/dev/null; then
|
||||
if type -t git && type -t su; then
|
||||
su - -c "git config --global user.email $USER@localhost" "$USER"
|
||||
su - -c "git config --global user.name 'live builder'" "$USER"
|
||||
fi
|
||||
fi >&/dev/null
|
||||
|
||||
# developer should feel comfortable, eh? ;-)
|
||||
ZSHELL="/bin/zsh"
|
||||
|
@@ -48,6 +48,7 @@ COPY_TREE = ./files
|
||||
# outdir shouldn't be wiped clean before use
|
||||
CLEANUP_OUTDIR ?=
|
||||
|
||||
GLOBAL_TARGET := $(ARCH)
|
||||
GLOBAL_HSH_APT_CONFIG := $(wildcard $(APTCONF))
|
||||
|
||||
# the lib/build-*.mk comes from features.in/build-*/lib
|
||||
@@ -67,6 +68,8 @@ save-profile:
|
||||
|
||||
.PHONY: imagedir postprocess debug
|
||||
|
||||
prep: imagedir
|
||||
|
||||
imagedir:
|
||||
@mkdir -p "$(IMAGE_OUTDIR)"
|
||||
|
||||
@@ -88,4 +91,6 @@ debug:
|
||||
@echo "TOPDIR=$(TOPDIR)"
|
||||
@echo "IMAGEDIR=$(IMAGEDIR)"
|
||||
@echo "ARCH=$(ARCH)"
|
||||
@echo "GLOBAL_TARGET=$(GLOBAL_TARGET)"
|
||||
@echo "GLOBAL_HSH_APT_CONFIG=$(GLOBAL_HSH_APT_CONFIG)"
|
||||
@echo "GLOBAL_HSH_USE_QEMU=$(GLOBAL_HSH_USE_QEMU)"
|
||||
|
@@ -2,7 +2,7 @@
|
||||
PKGDIR := $(GLOBAL_BUILDDIR)/pkg
|
||||
|
||||
# duplicated from metaprofile makefiles for the sake of "local" builds
|
||||
ARCH ?= $(shell arch | sed 's/i686/i586/')
|
||||
ARCH ?= $(shell arch | sed 's/i686/i586/; s/armv.*/arm/; s/ppc.*/ppc/')
|
||||
DATE ?= $(shell date +%Y%m%d)
|
||||
|
||||
# prefix pkglist name with its directory to form a path (relative/absolute)
|
||||
|
11
lib/build.mk
11
lib/build.mk
@@ -3,7 +3,7 @@ ANSI_OK ?= 1;32
|
||||
ANSI_FAIL ?= 1;31
|
||||
|
||||
MAX_ERRORS = 3
|
||||
GOTCHA := ^(((\*\* )?(E:|[Ee]rror|[Ww]arning).*)|(.* (conflicts|Depends:) .*)|(.* (Stop|failed)\.))$$
|
||||
GOTCHA := ^(((\*\* )?(E:|[Ee]rror|[Ww]arning).*)|(.* (conflicts|Depends:) .*)|(.* (Stop|failed|not found)\.))$$
|
||||
|
||||
ifndef MKIMAGE_PROFILES
|
||||
$(error this makefile is designed to be included in toplevel one)
|
||||
@@ -20,8 +20,15 @@ LOWSPACE = 1024
|
||||
# it's also nice to know how long and much it takes
|
||||
START += time -f "%E %PCPU %Mk"
|
||||
|
||||
# /usr/bin/{i586,x86_64} are setarch(8) symlinks
|
||||
# /usr/bin/{i586,x86_64} are setarch(8) symlinks but arm is not;
|
||||
# also check whether non-x86 build is running native
|
||||
ifeq (,$(wildcard $(subst :,/$(ARCH) ,$(PATH):)))
|
||||
ifeq (,$(findstring $(ARCH),$(shell uname -m)))
|
||||
export GLOBAL_HSH_USE_QEMU=$(ARCH)
|
||||
endif
|
||||
else
|
||||
START += $(ARCH)
|
||||
endif
|
||||
|
||||
# to be passed into distcfg.mk; suggestions are welcome
|
||||
IMAGEDIR ?= $(shell \
|
||||
|
@@ -6,5 +6,5 @@ endif
|
||||
ifeq (i586,$(ARCH))
|
||||
BIGRAM := std-pae
|
||||
else
|
||||
BUGRAM := std-def
|
||||
BIGRAM := std-def
|
||||
endif
|
||||
|
@@ -52,13 +52,25 @@ profile/init: distclean
|
||||
fi $(LOG); \
|
||||
fi; \
|
||||
{ \
|
||||
eval `apt-config shell $${APTCONF:+-c=$(wildcard $(APTCONF))} \
|
||||
APTCONF="$(wildcard $(APTCONF))"; \
|
||||
echo "** using $${APTCONF:-system apt configuration}:"; \
|
||||
eval `apt-config shell $${APTCONF:+-c=$$APTCONF} \
|
||||
SOURCELIST Dir::Etc::sourcelist/f \
|
||||
SOURCEPARTS Dir::Etc::sourceparts/d`; \
|
||||
find "$$SOURCEPARTS" -name '*.list' \
|
||||
| xargs egrep -Rhv '^#|^[[:blank:]]*$$' "$$SOURCELIST" && \
|
||||
| xargs egrep -Rhv '^#|^[[:blank:]]*$$' "$$SOURCELIST" \
|
||||
| tee $(BUILDDIR)/sources.list; \
|
||||
echo; \
|
||||
} $(LOG); \
|
||||
if ! grep -q "[ ]$(ARCH)[ ]" $(BUILDDIR)/sources.list; then \
|
||||
echo -n "requested arch '$$ARCH' unavailable" >&2; \
|
||||
if [ -z "$(APTCONF)" ]; then \
|
||||
echo " (no APTCONF)"; \
|
||||
else \
|
||||
echo; \
|
||||
fi >&2; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
if type -t git >&/dev/null; then \
|
||||
if cd $(BUILDDIR); then \
|
||||
git init -q && \
|
||||
|
Reference in New Issue
Block a user