X-Git-Url: http://git.ipfire.org/?p=people%2Fteissler%2Fipfire-2.x.git;a=blobdiff_plain;f=make.sh;h=37339edc63b9d5963277f78ab811b83fbb63e88a;hp=398c91c930c78c150cd8439f7303e1292741f7e0;hb=892c6da83941dddae4f762e12abaab9256268a70;hpb=05a48c2b2a09e8a5c67276dd2c372d4fbc023017 diff --git a/make.sh b/make.sh index 398c91c93..37339edc6 100755 --- a/make.sh +++ b/make.sh @@ -34,16 +34,13 @@ 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 @@ -68,6 +65,8 @@ mkdir $BASEDIR/log/ 2>/dev/null # Include funtions . tools/make-functions +configure_target "default" + if [ -f .config ]; then . .config fi @@ -241,7 +240,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,61 +398,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" - 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" + 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 @@ -897,6 +897,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)