]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - make.sh
Add possibility to disable packages for some arches.
[ipfire-2.x.git] / make.sh
diff --git a/make.sh b/make.sh
index b9a5078afac29627e54b9eaa80ceacfd0f3c4671..c121249c670731a1189cb4c89325c3e354e55611 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -17,7 +17,7 @@
 # along with IPFire; if not, write to the Free Software                    #
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA #
 #                                                                          #
-# Copyright (C) 2007 IPFire-Team <info@ipfire.org>.                        #
+# Copyright (C) 2007-2011 IPFire-Team <info@ipfire.org>.                   #
 #                                                                          #
 ############################################################################
 #
@@ -25,8 +25,8 @@
 NAME="IPFire"                                                  # Software name
 SNAME="ipfire"                                                 # Short name
 VERSION="2.9"                                                  # Version number
-CORE="46"                                                      # Core Level (Filename)
-PAKFIRE_CORE="45"                                              # Core Level (PAKFIRE)
+CORE="52"                                                      # Core Level (Filename)
+PAKFIRE_CORE="51"                                              # Core Level (PAKFIRE)
 GIT_BRANCH=`git status | head -n1 | cut -d" " -f4`             # Git Branch
 SLOGAN="www.ipfire.org"                                                # Software slogan
 CONFIG_ROOT=/var/ipfire                                                # Configuration rootdir
@@ -189,7 +189,11 @@ prepareenv() {
     set +h
     LC_ALL=POSIX
     if [ -z $MAKETUNING ]; then
-       MAKETUNING="-j6"
+        if [ "${MACHINE:0:3}" = "arm" ]; then
+            MAKETUNING="-j2"
+        else
+            MAKETUNING="-j6"
+        fi
     fi
     export LFS LC_ALL CFLAGS CXXFLAGS MAKETUNING
     unset CC CXX CPP LD_LIBRARY_PATH LD_PRELOAD
@@ -243,14 +247,19 @@ buildtoolchain() {
 
     LOGFILE="$BASEDIR/log/_build.toolchain.log"
     export LOGFILE
-    ORG_PATH=$PATH
     NATIVEGCC=`gcc --version | grep GCC | awk {'print $3'}`
     export NATIVEGCC GCCmajor=${NATIVEGCC:0:1} GCCminor=${NATIVEGCC:2:1} GCCrelease=${NATIVEGCC:4:1}
+    ORG_PATH=$PATH
+    export PATH=$BASEDIR/build/usr/local/bin:$BASEDIR/build/tools/bin:$PATH
     lfsmake1 ccache    PASS=1
+    lfsmake1 make      PASS=1
     lfsmake1 binutils  PASS=1
     lfsmake1 gcc               PASS=1
-    export PATH=$BASEDIR/build/usr/local/bin:$BASEDIR/build/tools/bin:$PATH
-    lfsmake1 linux-libc-header
+    if [ "${MACHINE_TYPE}" = "arm" ]; then
+        lfsmake1 linux TOOLS=1 HEADERS=1
+    else
+        lfsmake1 linux-libc-header
+    fi
     lfsmake1 glibc
     lfsmake1 cleanup-toolchain PASS=1
     lfsmake1 tcl
@@ -270,7 +279,7 @@ buildtoolchain() {
     lfsmake1 grep
     lfsmake1 gzip
     lfsmake1 m4
-    lfsmake1 make
+    lfsmake1 make      PASS=2
     lfsmake1 patch
     lfsmake1 perl
     lfsmake1 sed
@@ -285,7 +294,11 @@ buildbase() {
     LOGFILE="$BASEDIR/log/_build.base.log"
     export LOGFILE
     lfsmake2 stage2
-    lfsmake2 linux-libc-header
+    if [ "${MACHINE_TYPE}" = "arm" ]; then
+        lfsmake2 linux HEADERS=1
+    else
+        lfsmake2 linux-libc-header
+    fi
     lfsmake2 man-pages
     lfsmake2 glibc
     lfsmake2 cleanup-toolchain PASS=3
@@ -357,42 +370,53 @@ buildipfire() {
   ipfiremake which
   ipfiremake xz
   ipfiremake linux-firmware
-  ipfiremake linux                     XEN=1
-  ipfiremake kqemu                     XEN=1
-  ipfiremake v4l-dvb                   XEN=1
-  ipfiremake madwifi                   XEN=1
-  ipfiremake mISDN                     XEN=1
-  ipfiremake dahdi                     XEN=1 KMOD=1
-  ipfiremake cryptodev                 XEN=1
-  ipfiremake compat-wireless           XEN=1
-  ipfiremake r8169                     XEN=1
-  ipfiremake r8168                     XEN=1
-  ipfiremake r8101                     XEN=1
-  ipfiremake e1000                     XEN=1
-  ipfiremake e1000e                    XEN=1
-  ipfiremake igb                       XEN=1
-  ipfiremake linux                     PAE=1
-  ipfiremake kqemu                     PAE=1
-  ipfiremake kvm-kmod                  PAE=1
-  ipfiremake v4l-dvb                   PAE=1
-  ipfiremake madwifi                   PAE=1
-  ipfiremake alsa                      PAE=1 KMOD=1
-  ipfiremake mISDN                     PAE=1
-  ipfiremake dahdi                     PAE=1 KMOD=1
-  ipfiremake cryptodev                 PAE=1
-  ipfiremake compat-wireless           PAE=1
-#  ipfiremake r8169                    PAE=1
-#  ipfiremake r8168                    PAE=1
-#  ipfiremake r8101                    PAE=1
-  ipfiremake e1000                     PAE=1
-  ipfiremake e1000e                    PAE=1
-  ipfiremake igb                       PAE=1
+  ipfiremake zd1211-firmware
+
+  # The xen and PAE kernels are only available for x86
+  if [ "${MACHINE_TYPE}" != "arm" ]; then
+    ipfiremake linux                   XEN=1
+    ipfiremake kqemu                   XEN=1
+    ipfiremake v4l-dvb                 XEN=1
+    ipfiremake madwifi                 XEN=1
+    ipfiremake mISDN                   XEN=1
+    ipfiremake dahdi                   XEN=1 KMOD=1
+    ipfiremake cryptodev                       XEN=1
+    ipfiremake compat-wireless         XEN=1
+    ipfiremake r8169                   XEN=1
+    ipfiremake r8168                   XEN=1
+    ipfiremake r8101                   XEN=1
+    ipfiremake e1000                   XEN=1
+    ipfiremake e1000e                  XEN=1
+    ipfiremake igb                     XEN=1
+    ipfiremake linux                   PAE=1
+    ipfiremake kqemu                   PAE=1
+    ipfiremake kvm-kmod                        PAE=1
+    ipfiremake v4l-dvb                 PAE=1
+    ipfiremake madwifi                 PAE=1
+    ipfiremake alsa                    PAE=1 KMOD=1
+    ipfiremake mISDN                   PAE=1
+    ipfiremake dahdi                   PAE=1 KMOD=1
+    ipfiremake cryptodev                       PAE=1
+    ipfiremake compat-wireless         PAE=1
+#    ipfiremake r8169                  PAE=1
+#    ipfiremake r8168                  PAE=1
+#    ipfiremake r8101                  PAE=1
+    ipfiremake e1000                   PAE=1
+    ipfiremake e1000e                  PAE=1
+    ipfiremake igb                     PAE=1
+  fi
+
+  # Default kernel build
   ipfiremake linux
+  ipfiremake v4l-dvb
   ipfiremake kqemu
   ipfiremake kvm-kmod
-  ipfiremake v4l-dvb
   ipfiremake madwifi
-  ipfiremake alsa                      KMOD=1
+  if [ "${MACHINE_TYPE}" = "arm" ]; then
+    #todo enable alsa driver in kernel config
+    ipfiremake alsa                    KMOD=1
+  fi
+  #undefined declaration in echo canceler try to fix later
   ipfiremake mISDN
   ipfiremake dahdi                     KMOD=1
   ipfiremake cryptodev
@@ -406,9 +430,6 @@ buildipfire() {
   ipfiremake pkg-config
   ipfiremake linux-atm
   ipfiremake cpio
-
-  installmake strip
-
   ipfiremake dracut
   ipfiremake expat
   ipfiremake gdbm
@@ -416,6 +437,8 @@ buildipfire() {
   ipfiremake pam
   ipfiremake openssl
   ipfiremake curl
+  ipfiremake tcl
+  ipfiremake sqlite
   ipfiremake python
   ipfiremake fireinfo
   ipfiremake libnet
@@ -448,7 +471,7 @@ buildipfire() {
   ipfiremake arping
   ipfiremake beep
   ipfiremake bind
-  ipfiremake cdrtools
+  ipfiremake dvdrtools
   ipfiremake dnsmasq
   ipfiremake dosfstools
   ipfiremake reiserfsprogs
@@ -611,6 +634,7 @@ buildipfire() {
   ipfiremake phpSANE
   ipfiremake tunctl
   ipfiremake nagios
+  ipfiremake nagios_nrpe
   ipfiremake ebtables
   ipfiremake fontconfig
   ipfiremake freefont
@@ -649,7 +673,6 @@ buildipfire() {
   ipfiremake splix
   ipfiremake streamripper
   ipfiremake sshfs
-  ipfiremake sqlite
   ipfiremake taglib
   ipfiremake mediatomb
   ipfiremake sslh
@@ -680,12 +703,23 @@ buildipfire() {
   ipfiremake pound
   ipfiremake minicom
   ipfiremake ddrescue
-  ipfiremake tcl
   ipfiremake imspector
   ipfiremake miniupnpd
   ipfiremake client175
   ipfiremake powertop
   ipfiremake parted
+  ipfiremake swig
+  ipfiremake python-m2crypto
+  ipfiremake wireless-regdb
+  ipfiremake crda
+  ipfiremake libsatsolver
+  ipfiremake python-satsolver
+  ipfiremake python-distutils-extra
+  ipfiremake python-lzma
+  ipfiremake python-progressbar
+  ipfiremake python-xattr
+  ipfiremake intltool
+  ipfiremake pakfire3-deps
   echo Build on $HOSTNAME > $BASEDIR/build/var/ipfire/firebuild
   cat /proc/version >> $BASEDIR/build/var/ipfire/firebuild
   echo >> $BASEDIR/build/var/ipfire/firebuild
@@ -741,11 +775,13 @@ buildpackages() {
   $0 git log
 
   # Create images for install
-       ipfiremake cdrom ED=$IPFVER
+  ipfiremake cdrom ED=$IPFVER
 
   # Check if there is a loop device for building in virtual environments
-  if [ $BUILD_IMAGES == 1 ] &&  ([ -e /dev/loop/0 ] || [ -e /dev/loop0 ]); then
-       ipfiremake usb-stick ED=$IPFVER
+  if [ $BUILD_IMAGES == 1 ] && ([ -e /dev/loop/0 ] || [ -e /dev/loop0 ]); then
+       if [ "${MACHINE_TYPE}" != "arm" ]; then
+               ipfiremake usb-stick ED=$IPFVER
+       fi
        ipfiremake flash-images ED=$IPFVER
   fi
 
@@ -899,8 +935,10 @@ downloadsrc)
                cd $BASEDIR/lfs
                for i in *; do
                        if [ -f "$i" -a "$i" != "Config" ]; then
-                               echo -ne "Loading $i"
-                               make -s -f $i LFS_BASEDIR=$BASEDIR MESSAGE="$i\t ($c/$MAX_RETRIES)" download >> $LOGFILE 2>&1
+                               lfsmakecommoncheck ${i} || continue
+
+                               make -s -f $i LFS_BASEDIR=$BASEDIR MACHINE=$MACHINE \
+                                       MESSAGE="$i\t ($c/$MAX_RETRIES)" download >> $LOGFILE 2>&1
                                if [ $? -ne 0 ]; then
                                        beautify message FAIL
                                        FINISHED=0
@@ -916,7 +954,8 @@ downloadsrc)
        ERROR=0
        for i in *; do
                if [ -f "$i" -a "$i" != "Config" ]; then
-                       make -s -f $i LFS_BASEDIR=$BASEDIR MESSAGE="$i\t " md5 >> $LOGFILE 2>&1
+                       make -s -f $i LFS_BASEDIR=$BASEDIR MACHINE=$MACHINE \
+                               MESSAGE="$i\t " md5 >> $LOGFILE 2>&1
                        if [ $? -ne 0 ]; then
                                echo -ne "MD5 difference in lfs/$i"
                                beautify message FAIL
@@ -942,7 +981,7 @@ toolchain)
        test -d $BASEDIR/cache/toolchains || mkdir -p $BASEDIR/cache/toolchains
        cd $BASEDIR && tar -zc --exclude='log/_build.*.log' -f cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-$BUILDMACHINE.tar.gz \
                build/{bin,etc,usr/bin,usr/local} \
-               build/tools/{bin,etc,*-linux-gnu,include,lib,libexec,sbin,share,var} \
+               build/tools/{bin,etc,*-linux-gnu*,include,lib,libexec,sbin,share,var} \
                log >> $LOGFILE
        md5sum cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-$BUILDMACHINE.tar.gz \
                > cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-$BUILDMACHINE.md5