# --- T2-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # T2 SDE: target/embedded/config.in # Copyright (C) 2004 - 2011 The T2 SDE Project # # More information can be found in the files COPYING and README. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 2 of the License. A copy of the # GNU General Public License can be found in the file COPYING. # --- T2-COPYRIGHT-NOTE-END --- #Description: Generic Embedded comment_id '- Target Style' COMMENT_TARGET_EMBEDDED_STYLE # might not be available: e.g. avr32, blackfin, superh, ... if pkgcheck dietlibc .; then choice SDECFG_TARGET_EMBEDDED_STYLE uclibc \ uclibc 'uClibc (ugly but many packages to choose from)' \ dietlibc 'diet libc (less is more)' else choice SDECFG_TARGET_EMBEDDED_STYLE uclibc \ uclibc 'uClibc (ugly but many packages to choose from)' fi bool 'Use busybox applets' SDECFG_TARGET_EMBEDDED_BB 1 embedded_pkgfilter() { local tmp=`mktemp` cat > $tmp <<-EOT # mangle all packages to only build them in the cross stage (1) s,^. \(.\)[^ ]*,X \11--------,; # select some packages (and repositories) explicitely / 00-dirtree / { p; d; }; / sysfiles / { p; d; }; / rocknet / { p; d; }; / disktype / { p; d; }; / minised / { p; d; }; / pdksh / { p; d; }; / udev / { p; d; }; / stone / { p; d; }; # depends on embutils/dietlibc, which we might not have # / mkinitrd / { p; d; }; / linux-header / { p; d; }; # we need those for some broken packages that need updating / autoconf / { s,^. [^ ]*,X 0---------,; p; d; } / automake / { s,^. [^ ]*,X 0---------,; p; d; } / libtool / { s,^. [^ ]*,X 0---------,; p; d; } / squashfs-tools / { s,^. [^ ]*,X 0---------,; p; d; } / pkgconfig / { s,^. [^ ]*,X 0---------,; p; d; } / ccache / { s,^. [^ ]*,X 0---------,; p; d; } / linux / { p; d; }; / libowfat / { p; d; }; / minit / { p; d; }; / fgetty / { p; d; }; / bash / { p; d; }; / gawk / { p; d; }; / ugrep / { p; d; }; / mmv / { p; d; }; # / bc / { p; d; }; # / screen / { p; d; }; / curl / { p; d; }; / elvis-tiny / { p; d; }; / zile / { p; d; }; / zlib / { p; d; }; / bzip2 / { p; d; }; / ncurses / { p; d; }; / popt / { p; d; }; / libpcap / { p; d; }; / ppp / { p; d; }; / iptables / { p; d; }; / dropbear / { p; d; }; / rsync / { p; d; }; / vlan / { p; d; }; / make / { p; d; }; / mininet / { p; d; }; / libowfat / { p; d; }; #/ gatling / { p; d; }; / clockspeed / { p; d; }; / djbdns / { p; d; }; / file / { p; d; }; EOT case "$SDECFG_TARGET_EMBEDDED_STYLE" in dietlibc) cat >> $tmp <<-EOT / binutils / { s,^. [^ ]*,X 0---------,; p; d; } / gcc / { s,^. [^ ]*,X 0---------,; p; d; } / gmp / { s,^. [^ ]*,X 0---------,; p; d; } / mpfr / { s,^. [^ ]*,X 0---------,; p; d; } / mpc / { s,^. [^ ]*,X 0---------,; p; d; } / dietlibc / { p; d; }; / embutils / { p; d; }; EOT ;; *) cat >> $tmp <<-EOT / binutils / { p; d; }; / gcc / { p; d; }; / gmp / { p; d; }; / mpfr / { p; d; }; / mpc / { p; d; }; / uclibc / { p; d; }; / perl perl / { p; d; }; / libpng / { p; d; }; / openssl / { p; d; }; / irda-utils / { p; d; }; / dosfstools / { p; d; }; / e2fsprogs / { p; d; }; / mktemp / { p; d; }; # only needed by the toolchain, the target itself uses busybox applets / module-init-tools / { s,^. [^ ]*,X 0---------,; p; d; }; / gzip / { s,^. [^ ]*,X 0---------,; p; d; }; / cpio / { s,^. [^ ]*,X 0---------,; p; d; }; EOT ;; esac if [ "$SDECFG_TARGET_EMBEDDED_BB" != 0 ]; then cat >> $tmp <<-EOT / busybox / { p; d; }; EOT else cat >> $tmp <<-EOT / module-init-tools / { p; d; }; / cpio / { p; d; }; / gzip / { p; d; }; / tar / { p; d; }; / time / { p; d; }; / coreutils / { p; d; }; / util-linux / { p; d; }; / findutils / { p; d; }; / diffutils / { p; d; }; / sed / { p; d; }; / grep / { p; d; }; / less / { p; d; }; / udhcp / { p; d; }; / net-tools / { p; d; }; / iproute2 / { p; d; }; / hdparm / { p; d; }; / procps / { p; d; }; / psmisc / { p; d; }; / tftp-hpa / { p; d; }; EOT fi case "$SDECFG_ARCH" in avr32) cat >> $tmp <<-EOT / u-boot / { p; d; }; EOT ;; esac cat >> $tmp <<-EOT # disable the rest /.*/ { s/^X /O / ; p; d; }; EOT sed -f $tmp rm $tmp } pkgfilter embedded_pkgfilter SDECFGSET_IMAGE='none' SDECFGSET_PKGFILE_TYPE='tar.bz2' SDECFGSET_PKGFILE_VER=1 # we must set it here, since the logic pkgenables the selected libc SDECFGSET_LIBC="$SDECFG_TARGET_EMBEDDED_STYLE" SDECFGSET_DIETLIBC_DYN=0 if [ $SDECFG_TARGET_EMBEDDED_STYLE == dietlibc ]; then SDECFGSET_STATIC=1 else SDECFGSET_STATIC=0 fi SDECFGSET_INIT='minit' SDECFGSET_OPT='size' SDECFGSET_DO_REBUILD_STAGE=0 SDECFGSET_DISABLE_NLS=1