X-Git-Url: http://git.ipfire.org/?p=people%2Fteissler%2Fipfire-2.x.git;a=blobdiff_plain;f=make.sh;h=cb047636f9e74f498ce3d0be1b074ff384e837a2;hp=53fbb3559db3902c4c9770640f5aba02a78d13ba;hb=055ed1ffc99100f7c209aa96f1787325be9063c8;hpb=ff441c487d7fc99a20d06dc6d6e99ea4f7c10c69 diff --git a/make.sh b/make.sh index 53fbb3559..cb047636f 100755 --- a/make.sh +++ b/make.sh @@ -24,15 +24,15 @@ NAME="IPFire" # Software name SNAME="ipfire" # Short name -VERSION="2.13" # Version number -CORE="73" # Core Level (Filename) -PAKFIRE_CORE="72" # Core Level (PAKFIRE) -GIT_BRANCH=`git status | head -n1 | cut -d" " -f4` # Git Branch +VERSION="2.15" # Version number +CORE="76-beta1" # Core Level (Filename) +PAKFIRE_CORE="76" # 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 # Build USB, Flash and Xen Images +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 @@ -83,6 +83,22 @@ if [ -z $EDITOR ]; then [ -z $EDITOR ] && exiterror "You should have installed an editor." fi +# Prepare string for /etc/system-release. +SYSTEM_RELEASE="${NAME} ${VERSION} (${MACHINE})" +if [ "$(git status -s | wc -l)" == "0" ]; then + GIT_STATUS="" +else + GIT_STATUS="-dirty" +fi +case "$GIT_BRANCH" in + core*|beta?|rc?) + SYSTEM_RELEASE="${SYSTEM_RELEASE} - $GIT_BRANCH$GIT_STATUS" + ;; + *) + SYSTEM_RELEASE="${SYSTEM_RELEASE} - Development Build: $GIT_BRANCH/$GIT_LASTCOMMIT$GIT_STATUS" + ;; +esac + prepareenv() { ############################################################################ # # @@ -179,11 +195,12 @@ prepareenv() { set +h LC_ALL=POSIX if [ -z $MAKETUNING ]; then - if [ "${MACHINE:0:3}" = "arm" ]; then - MAKETUNING="-j2" - else - MAKETUNING="-j6" - fi + CPU_COUNT="$(getconf _NPROCESSORS_ONLN 2>/dev/null)" + if [ -z "${CPU_COUNT}" ]; then + CPU_COUNT=1 + fi + + MAKETUNING="-j$(( ${CPU_COUNT} * 2 + 1 ))" fi export LFS LC_ALL CFLAGS CXXFLAGS MAKETUNING unset CC CXX CPP LD_LIBRARY_PATH LD_PRELOAD @@ -343,7 +360,7 @@ buildbase() { lfsmake2 make lfsmake2 man lfsmake2 mktemp - lfsmake2 module-init-tools + lfsmake2 kmod lfsmake2 net-tools lfsmake2 patch lfsmake2 psmisc @@ -352,8 +369,8 @@ buildbase() { lfsmake2 sysvinit lfsmake2 tar lfsmake2 texinfo - lfsmake2 udev lfsmake2 util-linux + lfsmake2 udev lfsmake2 vim lfsmake2 xz lfsmake2 paxctl @@ -369,6 +386,7 @@ buildipfire() { ipfiremake dhcp ipfiremake dhcpcd ipfiremake libusb + ipfiremake libusbx ipfiremake libpcap ipfiremake ppp ipfiremake pptp @@ -380,23 +398,9 @@ buildipfire() { ipfiremake rpi-firmware ipfiremake bc ipfiremake u-boot - ipfiremake u-boot-panda if [ "${MACHINE_TYPE}" != "arm" ]; then - # x86-xen (Legacy XEN) kernel build - ipfiremake linux2 KCFG="-xen" - ipfiremake v4l-dvb KCFG="-xen" - ipfiremake mISDN KCFG="-xen" - ipfiremake cryptodev KCFG="-xen" - ipfiremake compat-drivers KCFG="-xen" - ipfiremake r8169 KCFG="-xen" - ipfiremake r8168 KCFG="-xen" - ipfiremake r8101 KCFG="-xen" - ipfiremake e1000 KCFG="-xen" - ipfiremake e1000e KCFG="-xen" - ipfiremake igb KCFG="-xen" - # x86-pae (Native and new XEN) kernel build ipfiremake linux KCFG="-pae" # ipfiremake kvm-kmod KCFG="-pae" @@ -431,12 +435,9 @@ buildipfire() { ipfiremake cryptodev KCFG="-rpi" # ipfiremake compat-drivers KCFG="-rpi" - # arm-omap (Panda Board) kernel build -# ipfiremake linux KCFG="-omap" -# ipfiremake v4l-dvb KCFG="-omap" -# ipfiremake mISDN KCFG="-omap" NOPCI=1 -# ipfiremake cryptodev KCFG="-omap" -# ipfiremake compat-drivers KCFG="-omap" + # 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" @@ -459,6 +460,7 @@ buildipfire() { ipfiremake gdbm ipfiremake pam ipfiremake openssl + ipfiremake openssl-compat ipfiremake curl ipfiremake tcl ipfiremake sqlite @@ -493,6 +495,7 @@ buildipfire() { ipfiremake apache2 ipfiremake php ipfiremake apache2 PASS=C + ipfiremake jquery ipfiremake arping ipfiremake beep ipfiremake dvdrtools @@ -593,6 +596,8 @@ buildipfire() { ipfiremake lzo ipfiremake openvpn ipfiremake pammysql + ipfiremake mpage + ipfiremake dbus ipfiremake cups ipfiremake ghostscript ipfiremake foomatic @@ -691,7 +696,6 @@ buildipfire() { ipfiremake syslinux ipfiremake tftpd ipfiremake cpufrequtils - ipfiremake dbus ipfiremake bluetooth ipfiremake gutenprint ipfiremake apcupsd @@ -727,7 +731,6 @@ buildipfire() { ipfiremake usb_modeswitch_data ipfiremake zerofree ipfiremake mdadm - ipfiremake eject ipfiremake pound ipfiremake minicom ipfiremake ddrescue @@ -764,7 +767,6 @@ buildipfire() { ipfiremake stress ipfiremake libstatgrab ipfiremake sarg - ipfiremake fstrim ipfiremake check_mk_agent ipfiremake libdaemon ipfiremake avahi @@ -788,36 +790,13 @@ buildipfire() { ipfiremake arm ipfiremake wavemon ipfiremake iptraf-ng - echo Build on $HOSTNAME > $BASEDIR/build/var/ipfire/firebuild - cat /proc/version >> $BASEDIR/build/var/ipfire/firebuild - echo >> $BASEDIR/build/var/ipfire/firebuild - git log -1 >> $BASEDIR/build/var/ipfire/firebuild - echo >> $BASEDIR/build/var/ipfire/firebuild - git status >> $BASEDIR/build/var/ipfire/firebuild - echo >> $BASEDIR/build/var/ipfire/firebuild - cat /proc/cpuinfo >> $BASEDIR/build/var/ipfire/firebuild - echo $PAKFIRE_CORE > $BASEDIR/build/opt/pakfire/db/core/mine - if [ "$(git status -s | wc -l)" == "0" ]; then - GIT_STATUS="" - else - GIT_STATUS="-dirty" - fi - case "$GIT_BRANCH" in - core*|beta?|rc?) - echo "$NAME $VERSION ($MACHINE) - $GIT_BRANCH$GIT_STATUS" > $BASEDIR/build/etc/system-release - ;; - *) - echo "$NAME $VERSION ($MACHINE) - Development Build: $GIT_BRANCH/$GIT_LASTCOMMIT$GIT_STATUS" > $BASEDIR/build/etc/system-release - ;; - esac + ipfiremake iotop } buildinstaller() { # Run installer scripts one by one LOGFILE="$BASEDIR/log/_build.installer.log" export LOGFILE - ipfiremake as86 - ipfiremake mbr ipfiremake memtest ipfiremake installer installmake strip @@ -856,9 +835,6 @@ buildpackages() { # Check if there is a loop device for building in virtual environments if [ $BUILD_IMAGES == 1 ] && ([ -e /dev/loop/0 ] || [ -e /dev/loop0 ]); then - if [ "${MACHINE_TYPE}" != "arm" ]; then - ipfiremake usb-stick - fi ipfiremake flash-images fi @@ -866,16 +842,7 @@ buildpackages() { ipfirepackages - # Check if there is a loop device for building in virtual environments - if [ $BUILD_IMAGES == 1 ] && ([ -e /dev/loop/0 ] || [ -e /dev/loop0 ]) && [ "${MACHINE_TYPE}" != "arm" ]; then - cp -f $BASEDIR/packages/linux-xen-*.ipfire $LFS/install/packages/ - cp -f $BASEDIR/packages/meta-linux-xen $LFS/install/packages/ - cp -f $BASEDIR/packages/linux-pae-*.ipfire $LFS/install/packages/ - cp -f $BASEDIR/packages/meta-linux-pae $LFS/install/packages/ - ipfiremake xen-image - rm -rf $LFS/install/packages/linux-xen-*.ipfire - rm -rf $LFS/install/packages/meta-linux-xen - fi + ipfiremake xen-image mv $LFS/install/images/*.bz2 $BASEDIR >> $LOGFILE 2>&1 cd $BASEDIR @@ -1116,11 +1083,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}