Commit 1ee997e8 authored by Michael Shigorin's avatar Michael Shigorin

initial PowerPC support

As it happens, adding another architecture required almost no changes; native 32-bit ppc build took only ARCH and a repo, qemu-ppc one still has problems (/.host/entry hangs while unpacking setup for fakedata). Proof of concept on a QS22: $ make ve/bare.tar.gz ** ARCH: ppc /bin/sh: rpmvercmp: command not found 21:41:01 cleaning up 21:41:03 initializing BUILDDIR: build/ 21:41:03 preparing distro config 21:41:05 starting image build (coffee time) 21:42:48 done (1:42) ** image: $TMP/out/bare-20120716-ppc.tar.gz [21M]
parent 18f1a636
......@@ -10,7 +10,7 @@ ifndef ARCHES
ifdef ARCH
ARCHES := $(ARCH)
else
ARCHES := $(shell arch | sed 's/i686/i586/; s/armv.*/arm/')
ARCHES := $(shell arch | sed 's/i686/i586/; s/armv.*/arm/; s/ppc.*/ppc/')
endif
endif
export ARCHES
......
......@@ -10,7 +10,7 @@
- ARCH
+ задаёт целевую архитектуру образов
+ значение: пусто (по умолчанию авто), i586, x86_64 или arm
+ значение: пусто (по умолчанию авто), i586, x86_64, arm, ppc
+ см. ../lib/build.mk
- ARCHES
......
......@@ -3,16 +3,24 @@
apt-get install qemu-user-binfmt_misc
modprobe binfmt_misc
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 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 с указанием arm-репозитория
и ссылающийся на него apt.conf (см. apt.conf.sample);
например:
Также нужен 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
---
......@@ -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/; s/armv.*/arm/')
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)
......
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