X-Git-Url: http://git.ipfire.org/?p=people%2Fteissler%2Fipfire-2.x.git;a=blobdiff_plain;f=make.sh;h=40717c99d8cc5a512431bd244be3b032ea637c12;hp=bb47b52cbc09e9153b24db0aed68cd4906ffca74;hb=949544f5b36ee1ba45c71f96c8d1aefb3e49ce84;hpb=ec8c14746c56ec725896d94663ba844260d9c0f2 diff --git a/make.sh b/make.sh index bb47b52cb..40717c99d 100755 --- a/make.sh +++ b/make.sh @@ -17,33 +17,30 @@ # 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-2013 IPFire Team . # +# Copyright (C) 2007-2014 IPFire Team . # # # ############################################################################ # NAME="IPFire" # Software name SNAME="ipfire" # Short name -VERSION="2.13" # Version number -CORE="74" # Core Level (Filename) -PAKFIRE_CORE="74" # Core Level (PAKFIRE) -GIT_BRANCH=`git status | head -n1 | cut -d" " -f4` # Git Branch +VERSION="2.15" # Version number +CORE="78" # Core Level (Filename) +PAKFIRE_CORE="78" # Core Level (PAKFIRE) +GIT_BRANCH=`git rev-parse --abbrev-ref HEAD` # Git Branch SLOGAN="www.ipfire.org" # Software slogan CONFIG_ROOT=/var/ipfire # Configuration rootdir NICE=10 # Nice level MAX_RETRIES=1 # prefetch/check loop BUILD_IMAGES=1 # Flash and Xen Downloader KVER=`grep --max-count=1 VER lfs/linux | awk '{ print $3 }'` -MACHINE=`uname -m` GIT_TAG=$(git tag | tail -1) # Git Tag GIT_LASTCOMMIT=$(git log | head -n1 | cut -d" " -f2 |head -c8) # Last commit TOOLCHAINVER=7 -BUILDMACHINE=$MACHINE - if [ "$MACHINE" = "x86_64" ]; then - BUILDMACHINE="i686"; - fi - +# New architecture variables +BUILD_ARCH="$(uname -m)" +BUILDMACHINE="${BUILD_ARCH}" # Debian specific settings if [ ! -e /etc/debian_version ]; then @@ -72,6 +69,12 @@ if [ -f .config ]; then . .config fi +if [ -n "${TARGET_ARCH}" ]; then + configure_target "${TARGET_ARCH}" +else + configure_target "default" +fi + if [ -z $EDITOR ]; then for i in nano emacs vi; do EDITOR=$(which $i 2>/dev/null) @@ -241,7 +244,7 @@ prepareenv() { buildtoolchain() { local error=false - case "${MACHINE}:$(uname -m)" in + case "${TARGET_ARCH}:${BUILD_ARCH}" in # x86 i586:i586|i586:i686|i586:x86_64) # These are working. @@ -399,59 +402,62 @@ buildipfire() { ipfiremake bc ipfiremake u-boot - if [ "${MACHINE_TYPE}" != "arm" ]; then - - # x86-pae (Native and new XEN) kernel build - ipfiremake linux KCFG="-pae" -# ipfiremake kvm-kmod KCFG="-pae" -# ipfiremake v4l-dvb KCFG="-pae" -# ipfiremake mISDN KCFG="-pae" - ipfiremake cryptodev KCFG="-pae" -# ipfiremake compat-drivers KCFG="-pae" -# ipfiremake r8169 KCFG="-pae" -# ipfiremake r8168 KCFG="-pae" -# ipfiremake r8101 KCFG="-pae" -# ipfiremake e1000e KCFG="-pae" -# ipfiremake igb KCFG="-pae" - - # x86 kernel build - ipfiremake linux KCFG="" -# ipfiremake kvm-kmod KCFG="" -# ipfiremake v4l-dvb KCFG="" -# ipfiremake mISDN KCFG="" - ipfiremake cryptodev KCFG="" -# ipfiremake compat-drivers KCFG="" -# ipfiremake r8169 KCFG="" -# ipfiremake r8168 KCFG="" -# ipfiremake r8101 KCFG="" -# ipfiremake e1000e KCFG="" -# ipfiremake igb KCFG="" - - else - # arm-rpi (Raspberry Pi) kernel build - ipfiremake linux KCFG="-rpi" -# ipfiremake v4l-dvb KCFG="-rpi" -# ipfiremake mISDN KCFG="-rpi" NOPCI=1 - ipfiremake cryptodev KCFG="-rpi" -# ipfiremake compat-drivers KCFG="-rpi" - - # arm multi platform (Panda, Wandboard ...) kernel build - ipfiremake linux KCFG="-multi" - ipfiremake cryptodev KCFG="-multi" - - # arm-kirkwood (Dreamplug, ICY-Box ...) kernel build - ipfiremake linux KCFG="-kirkwood" -# ipfiremake v4l-dvb KCFG="-kirkwood" -# ipfiremake mISDN KCFG="-kirkwood" - ipfiremake cryptodev KCFG="-kirkwood" -# ipfiremake compat-drivers KCFG="-kirkwood" -# ipfiremake r8169 KCFG="-kirkwood" -# ipfiremake r8168 KCFG="-kirkwood" -# ipfiremake r8101 KCFG="-kirkwood" -# ipfiremake e1000e KCFG="-kirkwood" -# ipfiremake igb KCFG="-kirkwood" + case "${TARGET_ARCH}" in + i586) + # x86-pae (Native and new XEN) kernel build + ipfiremake linux KCFG="-pae" +# ipfiremake kvm-kmod KCFG="-pae" +# ipfiremake v4l-dvb KCFG="-pae" +# ipfiremake mISDN KCFG="-pae" + ipfiremake cryptodev KCFG="-pae" +# ipfiremake compat-drivers KCFG="-pae" +# ipfiremake r8169 KCFG="-pae" +# ipfiremake r8168 KCFG="-pae" +# ipfiremake r8101 KCFG="-pae" + ipfiremake e1000e KCFG="-pae" + ipfiremake igb KCFG="-pae" + + # x86 kernel build + ipfiremake linux KCFG="" +# ipfiremake kvm-kmod KCFG="" +# ipfiremake v4l-dvb KCFG="" +# ipfiremake mISDN KCFG="" + ipfiremake cryptodev KCFG="" +# ipfiremake compat-drivers KCFG="" +# ipfiremake r8169 KCFG="" +# ipfiremake r8168 KCFG="" +# ipfiremake r8101 KCFG="" + ipfiremake e1000e KCFG="" + ipfiremake igb KCFG="" + ;; - fi + armv5tel) + # arm-rpi (Raspberry Pi) kernel build + ipfiremake linux KCFG="-rpi" +# ipfiremake v4l-dvb KCFG="-rpi" +# ipfiremake mISDN KCFG="-rpi" NOPCI=1 + ipfiremake cryptodev KCFG="-rpi" +# ipfiremake compat-drivers KCFG="-rpi" + + # arm multi platform (Panda, Wandboard ...) kernel build + ipfiremake linux KCFG="-multi" + ipfiremake cryptodev KCFG="-multi" + ipfiremake e1000e KCFG="-multi" + ipfiremake igb KCFG="-multi" + + # arm-kirkwood (Dreamplug, ICY-Box ...) kernel build + ipfiremake linux KCFG="-kirkwood" +# ipfiremake v4l-dvb KCFG="-kirkwood" +# ipfiremake mISDN KCFG="-kirkwood" + ipfiremake cryptodev KCFG="-kirkwood" +# ipfiremake compat-drivers KCFG="-kirkwood" +# ipfiremake r8169 KCFG="-kirkwood" +# ipfiremake r8168 KCFG="-kirkwood" +# ipfiremake r8101 KCFG="-kirkwood" +# ipfiremake e1000e KCFG="-kirkwood" + ipfiremake igb KCFG="-kirkwood" + ;; + esac ipfiremake pkg-config ipfiremake linux-atm ipfiremake cpio @@ -512,6 +518,8 @@ buildipfire() { ipfiremake perl-GD ipfiremake GD-Graph ipfiremake GD-TextUtil + ipfiremake perl-Device-SerialPort + ipfiremake perl-Device-Modem ipfiremake gnupg ipfiremake hdparm ipfiremake sdparm @@ -634,9 +642,6 @@ buildipfire() { ipfiremake libmpeg2 ipfiremake cmake ipfiremake gnump3d - ipfiremake libsigc++ - ipfiremake libtorrent - ipfiremake rtorrent ipfiremake rsync ipfiremake tcpwrapper ipfiremake libevent @@ -651,6 +656,7 @@ buildipfire() { ipfiremake sysstat ipfiremake vsftpd ipfiremake strongswan + ipfiremake rng-tools ipfiremake lsof ipfiremake br2684ctl ipfiremake pcmciautils @@ -678,6 +684,8 @@ buildipfire() { ipfiremake vdr_streamdev ipfiremake vdr_vnsiserver3 ipfiremake vdr_epgsearch + ipfiremake vdr_dvbapi + ipfiremake vdr_eepg ipfiremake w_scan ipfiremake icecast ipfiremake icegenerator @@ -687,7 +695,6 @@ buildipfire() { ipfiremake git ipfiremake squidclamav ipfiremake vnstat - ipfiremake vnstati ipfiremake iw ipfiremake wpa_supplicant ipfiremake hostapd @@ -715,6 +722,8 @@ buildipfire() { ipfiremake netsnmpd ipfiremake perl-DBI ipfiremake perl-DBD-mysql + ipfiremake perl-DBD-SQLite + ipfiremake perl-File-ReadBackwards ipfiremake cacti ipfiremake icecc ipfiremake openvmtools @@ -731,7 +740,6 @@ buildipfire() { ipfiremake usb_modeswitch_data ipfiremake zerofree ipfiremake mdadm - ipfiremake eject ipfiremake pound ipfiremake minicom ipfiremake ddrescue @@ -768,7 +776,6 @@ buildipfire() { ipfiremake stress ipfiremake libstatgrab ipfiremake sarg - ipfiremake fstrim ipfiremake check_mk_agent ipfiremake libdaemon ipfiremake avahi @@ -793,6 +800,8 @@ buildipfire() { ipfiremake wavemon ipfiremake iptraf-ng ipfiremake iotop + ipfiremake stunnel + ipfiremake sslscan } buildinstaller() { @@ -836,7 +845,8 @@ buildpackages() { ipfiremake cdrom # Check if there is a loop device for building in virtual environments - if [ $BUILD_IMAGES == 1 ] && ([ -e /dev/loop/0 ] || [ -e /dev/loop0 ]); then + modprobe loop 2>/dev/null + if [ $BUILD_IMAGES == 1 ] && ([ -e /dev/loop/0 ] || [ -e /dev/loop0 ] || [ -e "/dev/loop-control" ]); then ipfiremake flash-images fi @@ -891,6 +901,22 @@ ipfirepackages() { rm -rf $BASEDIR/build/install/packages/* } +while [ $# -gt 0 ]; do + case "${1}" in + --target=*) + configure_target "${1#--target=}" + ;; + -*) + exiterror "Unknown configuration option: ${1}" + ;; + *) + # Found a command, so exit options parsing. + break + ;; + esac + shift +done + # See what we're supposed to do case "$1" in build) @@ -1085,11 +1111,11 @@ uploadsrc) fi URL_SOURCE=$(grep URL_SOURCE lfs/Config | awk '{ print $3 }') - REMOTE_FILES=$(echo "ls -1 --ignore=toolchains" | sftp -C ${IPFIRE_USER}@${URL_SOURCE}) + REMOTE_FILES=$(echo "ls -1" | sftp -C ${IPFIRE_USER}@${URL_SOURCE}) - cd $BASEDIR/cache/ - for file in $(ls -1 --ignore=toolchains); do - grep -q "$file" <<<$REMOTE_FILES && continue + for file in ${BASEDIR}/cache/*; do + [ -d "${file}" ] && continue + grep -q "$(basename ${file})" <<<$REMOTE_FILES && continue NEW_FILES="$NEW_FILES $file" done [ -n "$NEW_FILES" ] && scp -2 $NEW_FILES ${IPFIRE_USER}@${URL_SOURCE}