#!/bin/bash #Framework, welches ein komplettes Linux System aus den Sourcen erstellt #dieses Framework wird im CVS Repository #:pserver:cvs.tramp-bbs.de:/opt/cvs zur Verfügung gestellt # #Lage dieser Datei im Archiv: $HeadURL$ # #(c) 2003 Harald Kueller, Germany #This program is free software; you can redistribute it and/or #modify ist under the terms of the GNU General Public License #as published by the Free Software Foundation; either version #2 of the License, or (at your option) any later version. # #This program is distributed in the hope that it will be useful, #but WITHOUT ANY WARRANTY; without even the implied warranty of #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. #See the GNU General Public License for more details. # #You should have received a copy of the GNU General Public License #along with this program; if not write to the Free Software Foundation, #Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # #Beschreibung: #Definition der Systemumgebung fuer ViitorMake # #Aufrufparameter: #keine - wird von genpkg und diversen weiteren scripten #gesourced # #Letzte Änderung von: $Author$ #Datum der letzten Änderung: $Date$ #Version der Datei: $Revision$ # #Viitor Version VERSION=V963 #Angabe des CPU Types, fuer welchen Viitor Optimiert werden soll. #Folgende CPU Typen werden unterstuetzt: P (Pentium), # PII (PentiumPro, PII) # PIII # PM (Pentium III Mobile) # PIV # K6 (AMD K6, AMD K6/2) # K7(Athlon) # XP (Athlon XP) # K8 (Opteron 32 Bit) # K8_64 (Opteron, AMD64, 64Bit) # EMT64 (nocona, core2duo, pIV 64Bit) CPU=K8_64 #Pfad in welchem genuegend Platz ist um das Basis System (einmal statisch, #und dann dynamisch) zu generieren. LFS=/Viitor #Mountpoint fuer das Volume/Laufwerk/NFS-Share in welchem die Viitor Sourcen #liegen SRCMNTPOINT=/ftp #Device Pfad zum Volume/Laufwerk/NFS-Share auf welchem die Viitor Source Files #zu finden sind. SOURCEDEV=zeus:/export/ftp #Pfad zum eigentlichen Sourcetree, wenn $SOURCEDEV an $SRCMNTPOINT gemountet #ist #LFSSOURCE=$SRCMNTPOINT/pub/ViitorLinux/$VERSION/SOURCES LFSSOURCE=$SRCMNTPOINT/pub/ViitorLinux/$VERSION/SOURCES SOURCE=$LFSSOURCE #Pfad in welchem die Kompilierung statfinden soll #fuer das Statische System $MAKEDIR, und fuer das Dynamische System #$LFS/$MAKEDIR MAKEDIR=/usr/src #Zielpfad fuer die Installation der einzelnen Packete. Der Installationsroot #wird in diesen Pfad verbogen, so dass von dort die Viitor Packete erstellt #werden koennen. TMPROOT=/usr/tmpinstsys #Pfaddefinition, in welchem die Viitor Packete abgelegt werden. #DISTTARGET=/ftp/pub/ViitorLinux/$VERSION/$CPU/BINARY DISTTARGET=/ftp/pub/ViitorLinux/$VERSION/$CPU/BINARY #CVSROOT Definition. Ein Generieren der Distribution ohne CVS Zugriff #ist unmoeglich!!! CVSROOT=:pserver:kueller@odin.dmz.lan:/export/Data/cvs #SVNURL Definition. SVN Ersetzt CVS. Ein Generieren der Distribution #ohne Zugriff auf ein SVN/CVS Repository ist unmoeglich SVNURL="svn://svn.compuextreme.de/Viitor/$VERSION" #GITURL Definition. GIT ersetzt SVN GITURL="https://gitea.compuextreme.de/ViitorAddon" #Ab hier bitte nichts mehr verwenden. Hier sind Variablen zur Internen #Verwendung mit "makeViitor" und "genpkg" PATTERN="[_\-\.n0123456789][\.aev0123456789]" HOSTSYS=$(echo ${MACHTYPE} | sed -e 's/-[^-]*/-cross/') BUILDSYS=$(echo ${MACHTYPE} | sed -e 's/-[^-]*/-cross/') case "$CPU" in P) TARGET=i586-Viitor$VERSION-linux-gnu TARGET32=$TARGET STCFLAGS="-mtune=pentium" BUILDOPTIONS="-mtune=pentium" ;; K6) TARGET=i586-Viitor$VERSION-linux-gnu TARGET32=$TARGET STCFLAGS="-mtune=k6 -m3dnow" BUILDOPTIONS="-mtune=k6 -m3dnow" ;; PII) TARGET=i686-Viitor$VERSION-linux-gnu TARGET32=$TARGET STCFLAGS="-mtune=pentiumpro -mmmx -msse -mieee-fp -mfpmath=sse" BUILDOPTIONS="-mtune=pentiumpro -mmmx -msse -mieee-fp -mfpmath=sse" ;; PIII) TARGET=i686-Viitor$VERSION-linux-gnu TARGET32=$TARGET STCFLAGS="-mtune=pentium3 -mmmx -msse -msse2 -mieee-fp -mfpmath=sse" BUILDOPTIONS="-mtune=pentium3 -mmmx -msse -msse2 -mieee-fp -mfpmath=sse" ;; PM) TARGET=i686-Viitor$VERSION-linux-gnu TARGET32=$TARGET STCFLAGS="-mtune=pentium-m -mmmx -msse -msse2 -mieee-fp -mfpmath=sse" BUILDOPTIONS="-mtune=pentium-m -mmmx -msse -msse2 -mieee-fp -mfpmath=sse" ;; PIV) TARGET=i686-Viitor$VERSION-linux-gnu TARGET32=$TARGET STCFLAGS="-mtune=pentium4 -mmmx -msse -msse2 -mieee-fp -mfpmath=sse" BUILDOPTIONS="-mtune=pentium4 -mmmx -msse -msse2 -mieee-fp -mfpmath=sse" ;; C2D) TARGET=i686-Viitor$VERSION-linux-gnu TARGET32=$TARGET STCFLAGS="-mtune=nocona -mmmx -msse -msse2 -mieee-fp -mfpmath=sse" BUILDOPTIONS="-mtune=nocona -mmmx -msse -msse2 -mieee-fp -mfpmath=sse" ;; EMT64) TARGET=x86_64-Viitor$VERSION-linux-gnu TARGET32=i686-Viitor$VERSION-linux-gnu STCFLAGS="-mtune=nocona -mmmx -msse -msse2 -mieee-fp -mfpmath=sse" BUILDOPTIONS="-mtune=nocona -mmmx -msse -msse2 -mieee-fp -mfpmath=sse -m64" BUILDOPTIONS32="-mtune=nocona -mmmx -msse -msse2 -mieee-fp -mfpmath=sse -m32" ;; K7) TARGET=athlon-Viitor$VERSION-linux-gnu TARGET32=$TARGET STCFLAGS="-mtune=athlon -mmmx -msse -m3dnow -mieee-fp -mfpmath=sse" BUILDOPTIONS="-mtune=athlon -mmmx -msse -m3dnow -mieee-fp -mfpmath=sse" ;; XP) TARGET=athlon-Viitor$VERSION-linux-gnu TARGET32=$TARGET STCFLAGS="-mtune=athlon-xp -mmmx -msse -m3dnow -mieee-fp -mfpmath=sse" BUILDOPTIONS="-mtune=athlon-xp -mmmx -msse -m3dnow -mieee-fp -mfpmath=sse" ;; K8) TARGET=athlon-Viitor$VERSION-linux-gnu TARGET32=$TARGET STCFLAGS="-mtune=k8 -mmmx -msse -msse2 -m3dnow -mieee-fp -mfpmath=sse" BUILDOPTIONS="-mtune=k8 -mmmx -msse -msse2 -m3dnow -mieee-fp -mfpmath=sse" ;; K8_64) TARGET=x86_64-unknown-linux-gnu TARGET32=i686-unknown-linux-gnu STCFLAGS="-mtune=k8 -mmmx -msse -msse2 -m3dnow -mieee-fp -mfpmath=sse" BUILDOPTIONS="-mtune=k8 -mmmx -msse -msse2 -m3dnow -mieee-fp -mfpmath=sse -m64" BUILDOPTIONS32="-mtune=k8 -mmmx -msse -msse2 -m3dnow -mieee-fp -mfpmath=sse -m32" ;; sparc64) TARGET=sparc64-Viitor$VERSION-linux-gnu TARGET32=sparc-Viitor$VERSION-linux-gnu STCFLAGS="-O3 -mcpu=ultrasparc -mtune=ultrasparc -m64" BUILDOPTIONS="-O3 -mcpu=ultrasparc -mtune=ultrasparc -m64" BUILDOPTIONS32="-O3 -mcpu=ultrasparc -mtune=ultrasparc -m32" ;; *) TARGET=unknown-Viitor$VERSION-linux-gnu STCFLAGS="-O3" BUILDOPTIONS="-O3" esac STCXXFLAGS=$STCFLAGS #CVSASK=yes export LFS LFSSOURCE SOURCE MAKEDIR TMPROOT DISTTARGET BUILDOPTIONS BUILDOPTIONS32 CXXFLAGS CVSROOT TARGET TARGET32 ulimit -s 32768 ulimit -n 4096 ulimit -l 64