Devel-EFW2.1.1

Aus Neobikers Wiki
Zur Navigation springen Zur Suche springen

Install the EFW devel packages:

mkdir -p /efw-dev/usr/src
cd /efw-dev/usr/src
wget http://downloads.sourceforge.net/efw/EFW-COMMUNITY-2.1.1-devel-RPMS.tar.bz2
tar xvjf EFW-COMMUNITY-2.1.1-devel-RPMS.tar.bz2

EFW devel setup

cd /efw-dev

# create minimal skeleton
# -----------------------
# use the tarfile (inkl. passwd/group ids)...
#
# wget http://www.neobiker.de/ftp/pub/efw-xen/efw2devel-skel.tar.bz2
# tar xvjf efw2devel-skel.tar.bz2
#
# ... or create it manually like this:
mkdir -p usr/src/endian var/lib/rpm dev etc proc sys
cp -a /dev/null /dev/zero /dev/urandom /dev/random dev
for f in etc/passwd etc/group etc/shadow; do grep root /$f > $f; done
grep " / " /etc/fstab > etc/fstab
cd usr/src/endian
mkdir BUILD RPMS SRPMS SPECS SOURCES

# install efw211 packages
cd /efw-dev/usr/src/EFW-COMMUNITY-2.1.1-devel-RPMS
rpm --initdb --root /efw-dev
rpm --root /efw-dev -Uvh *.rpm --nodeps --force

# chroot into efw211-devel
mount -t proc none /efw-dev/proc
chroot /efw-dev

# leave efw211-devel
exit

Get sources and compile kernel:

cd /efw-dev/usr/src
wget http://downloads.sourceforge.net/efw/EFW-COMMUNITY-2.1.1-devel-SRPMS.tar.bz2
tar xvjf EFW-COMMUNITY-2.1.1-devel-SRPMS.tar.bz2

# for compiling the kernel, the kernel-utils are missing
# we need also the readline packages, they're only in the EFW2 packages
# so we need to download these first
wget http://mesh.dl.sourceforge.net/sourceforge/efw/EFW-COMMUNITY-2-devel-RPMS.tar.gz
tar xvzf EFW-COMMUNITY-2-devel-RPMS.tar.gz

# chroot into efw211-devel
chroot /efw-dev

# install readline packages and kernel-utils sources
cd /usr/src/
rpm -Uvh EFW-COMMUNITY-2-devel-RPMS/readline-*
rpm -Uvh EFW-COMMUNITY-2.1.1-devel-SRPMS/base/kernel-utils*

# compile and install kernel-utils
rpmbuild -ba endian/SPECS/kernel-utils.spec --tgarget i686
rpm -Uvh endian/RPMS/i686/kernel-utils*

# install kernel sources
rpm -Uvh EFW-COMMUNITY-2.1.1-devel-SRPMS/base/kernel-2.6.9-55.EL.endian19.src.rpm

# compile kernel - select which one(s) you want
vi endian/SPECS/kernel26.spec
#-------------------------
# What parts do we want to build?  We must build at least one kernel.
# These are the kernels that are built IF the architecture allows it.
%define buildup 1
%define buildsmp 1
%define buildsource 0
%define buildprepom 1
%define buildhugemem 0
%define buildlargesmp 0
%define builddoc 0
%define buildxen 1
%define kabi 1
#-------------------------

# ln -s /usr/src/linux-2.6.9/scripts/kconfig/libkconfig.so /usr/lib
rpmbuild -ba endian/SPECS/kernel26.spec --target i686