]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - make.sh
Add MACHINE_TYPE variable to be able to support multiple versions of one platform.
[ipfire-2.x.git] / make.sh
diff --git a/make.sh b/make.sh
index 9ab16e57aab447f26bcc752089d0c661d366bb87..e08f731d704e5b7f0849a007e8e47fc4b025634a 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -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
@@ -251,7 +255,7 @@ buildtoolchain() {
     lfsmake1 make      PASS=1
     lfsmake1 binutils  PASS=1
     lfsmake1 gcc               PASS=1
-    if [ "${MACHINE}" = "arm" ]; then
+    if [ "${MACHINE_TYPE}" = "arm" ]; then
         lfsmake1 linux TOOLS=1 HEADERS=1
     else
         lfsmake1 linux-libc-header
@@ -290,7 +294,7 @@ buildbase() {
     LOGFILE="$BASEDIR/log/_build.base.log"
     export LOGFILE
     lfsmake2 stage2
-    if [ "${MACHINE}" = "arm" ]; then
+    if [ "${MACHINE_TYPE}" = "arm" ]; then
         lfsmake2 linux HEADERS=1
     else
         lfsmake2 linux-libc-header
@@ -350,7 +354,7 @@ buildbase() {
     lfsmake2 vim
 
     # ARM cannot use grub.
-    if [ "${MACHINE}" != "arm" ]; then
+    if [ "${MACHINE_TYPE}" != "arm" ]; then
       lfsmake2 grub
     fi
 }
@@ -373,7 +377,7 @@ buildipfire() {
   ipfiremake zd1211-firmware
 
   # The xen and PAE kernels are only available for x86
-  if [ "${MACHINE}" != "arm" ]; then
+  if [ "${MACHINE_TYPE}" != "arm" ]; then
     ipfiremake linux                   XEN=1
     ipfiremake kqemu                   XEN=1
     ipfiremake v4l-dvb                 XEN=1
@@ -407,26 +411,29 @@ buildipfire() {
   fi
 
   # Default kernel build
-  #ipfiremake linux
+  ipfiremake linux
   ipfiremake v4l-dvb
 
-  # Virtualization helpers are only available for x86.
-  if [ "${MACHINE}" != "arm" ]; then
+  if [ "${MACHINE_TYPE}" != "arm" ]; then
+    # Virtualization helpers are only available for x86.
     ipfiremake kqemu
     ipfiremake kvm-kmod
+    #unsupported arch (armv5)
+    ipfiremake madwifi
+    #todo enable alsa driver in kernel config
+    ipfiremake alsa                    KMOD=1
+    #undefined declaration in echo canceler try to fix later
+    ipfiremake mISDN
   fi
-  #ipfiremake madwifi
-  #ipfiremake alsa                     KMOD=1
-  #ipfiremake mISDN
   ipfiremake dahdi                     KMOD=1
   ipfiremake cryptodev
-  #ipfiremake compat-wireless
+  ipfiremake compat-wireless
 #  ipfiremake r8169
 #  ipfiremake r8168
 #  ipfiremake r8101
-  #ipfiremake e1000
-  #ipfiremake e1000e
-  #ipfiremake igb
+  ipfiremake e1000
+  ipfiremake e1000e
+  ipfiremake igb
   ipfiremake pkg-config
   ipfiremake linux-atm
   ipfiremake cpio
@@ -630,8 +637,8 @@ buildipfire() {
   ipfiremake igmpproxy
   ipfiremake fbset
   ipfiremake sdl
-  ipfiremake qemu
-  ipfiremake qemu-kqemu
+  #ipfiremake qemu
+  #ipfiremake qemu-kqemu
   ipfiremake sane
   ipfiremake netpbm
   ipfiremake phpSANE
@@ -646,7 +653,7 @@ buildipfire() {
   ipfiremake faad2
   ipfiremake ffmpeg
   ipfiremake videolan
-  ipfiremake vdr
+  #ipfiremake vdr
   ipfiremake w_scan
   ipfiremake icecast
   ipfiremake icegenerator
@@ -662,9 +669,11 @@ buildipfire() {
   ipfiremake wpa_supplicant
   ipfiremake hostapd
   ipfiremake urlgrabber
-  ipfiremake syslinux
+  if [ "${MACHINE_TYPE}" != "arm" ]; then
+    ipfiremake syslinux
+  fi
   ipfiremake tftpd
-  ipfiremake cpufrequtils
+  #ipfiremake cpufrequtils
   ipfiremake dbus
   ipfiremake bluetooth
   ipfiremake gutenprint
@@ -687,7 +696,9 @@ buildipfire() {
   ipfiremake perl-DBD-mysql
   ipfiremake cacti
   ipfiremake icecc
-  ipfiremake openvmtools
+  if [ "${MACHINE_TYPE}" != "arm" ]; then
+    ipfiremake openvmtools
+  fi
   ipfiremake nagiosql
   ipfiremake iftop
   ipfiremake motion
@@ -696,8 +707,8 @@ buildipfire() {
   ipfiremake watchdog
   ipfiremake libpri
   ipfiremake dahdi
-  ipfiremake asterisk
-  ipfiremake lcr
+  #ipfiremake asterisk
+  #ipfiremake lcr
   ipfiremake usb_modeswitch
   ipfiremake usb_modeswitch_data
   ipfiremake zerofree
@@ -743,9 +754,11 @@ buildinstaller() {
   # Run installer scripts one by one
   LOGFILE="$BASEDIR/log/_build.installer.log"
   export LOGFILE
-  ipfiremake as86
-  ipfiremake mbr
-  ipfiremake memtest
+  if [ "${MACHINE_TYPE}" != "arm" ]; then
+    ipfiremake as86
+    ipfiremake mbr
+    ipfiremake memtest
+  fi
   ipfiremake installer
   cp -f $BASEDIR/doc/COPYING $BASEDIR/build/install/initrd/
   installmake strip