#
#############################################################
-# What sortof target system shall we compile this for?
-#ARCH:=i386
-#ARCH:=arm
-#ARCH:=mips
+SNAPSHOT:=20050101
+
ARCH:=mipsel
-#ARCH:=powerpc
-#ARCH:=sh4
-# Busybox link failing due to needing libgcc functions that are statics.
-#ARCH:=cris
-
-# The following currently fail to build since no shared lib support.
-#ARCH:=sh64
-#ARCH:=m68k
-#ARCH:=v850
-#ARCH:=sparc
-#ARCH:=whatever
-
-# If you are building a native gcc toolchain, do you want to
-# build the old gcc-2.95 based toolchain, or would you prefer
-# a nice and shiny new gcc-3.3.2 toolchain?
-# WARNING -- 2.95 currently only builds for i386, arm, mips*, and powerpc.
-# WARNING -- 2.95 does not currently build natively for the target.
-GCC_2_95_TOOLCHAIN:=false
-
-# Enable this to use the uClibc daily snapshot instead of a released
-# version. Daily snapshots may contain new features and bugfixes. Or
-# they may not even compile at all, depending on what Erik is doing...
-#USE_UCLIBC_SNAPSHOT:=
-#USE_UCLIBC_SNAPSHOT:=snapshot
-USE_UCLIBC_SNAPSHOT:=20040509
-
-# Temporary option... Fall back to (slightly modified) ldso 0.9.24 code?
-# This is here temporarily since I'm having problems with the current
-# cvs ldso code on mipsel.
-USE_UCLIBC_LDSO_0_9_24:=true
-#USE_UCLIBC_LDSO_0_9_24:=false
-
-# Enable this to use the busybox daily snapshot instead of a released
-# version. Daily snapshots may contain new features and bugfixes. Or
-# they may not even compile at all....
-#USE_BUSYBOX_SNAPSHOT:=
-#USE_BUSYBOX_SNAPSHOT:=snapshot
-USE_BUSYBOX_SNAPSHOT:=20040509
-
-# Enable large file (files > 2 GB) support
+#USE_UCLIBC_SNAPSHOT:=$(SNAPSHOT)
+USE_UCLIBC_LDSO_0_9_24:=false
+#USE_BUSYBOX_SNAPSHOT:=$(SNAPSHOT)
+USE_NETFILTER_SNAPSHOT:=20041009
+USE_BRIDGE_VERSION:=1.0.4
BUILD_WITH_LARGEFILE:=true
+OPTIMIZE_FOR_CPU=$(ARCH)
+
# Command used to download source code
WGET:=wget --passive-ftp
-# Optimize toolchain for which type of CPU?
-OPTIMIZE_FOR_CPU=$(ARCH)
-#OPTIMIZE_FOR_CPU=i686
-# Note... gcc 2.95 does not seem to like anything higher than i586.
-#OPTIMIZE_FOR_CPU=i586
-#OPTIMIZE_FOR_CPU=whatever
-
# Soft floating point options.
# Notes:
# Currently builds with gcc 3.3 for arm, mips, mipsel, powerpc.
# Currently the unwind stuff seems to work for staticly linked apps but
# not dynamic. So use setjmp/longjmp exceptions by default.
-GCC_USE_SJLJ_EXCEPTIONS:=--enable-sjlj-exceptions
-#GCC_USE_SJLJ_EXCEPTIONS:=
+# GCC_USE_SJLJ_EXCEPTIONS:=--enable-sjlj-exceptions
+GCC_USE_SJLJ_EXCEPTIONS:=
# Any additional gcc options you may want to include....
EXTRA_GCC_CONFIG_OPTIONS:=
# The list of stuff to build for the target filesystem
#
#############################################################
-TARGETS:=host-sed
-
-ifeq ($(GCC_2_95_TOOLCHAIN),true)
-TARGETS+=uclibc-configured binutils gcc2_95
-else
-TARGETS+=uclibc-configured binutils gcc3_3
-endif
-
-# Do you want user mode Linux (x86 only), or are you building a
-# your own kernel that will run on its own? Perhaps you have a
-# kernel you have already configured and you want to use that?
-# The default is to just use a set of known working kernel
-# headers. Unless you want to build a kernel, I recommend just
-# using that...
-#TARGETS+=kernel-headers
-#TARGETS+=linux
-#TARGETS+=user-mode-linux
-#TARGETS+=system-linux
-TARGETS+= openwrt-base
-
-# The default minimal set
-#TARGETS+=busybox tinylogin
-
-# Openssh...
-#TARGETS+=zlib openssl openssh
-# Dropbear sshd is much smaller than openssl + openssh
-#TARGETS+=dropbear_sshd
-
-# Everything needed to build a full uClibc development system!
-#TARGETS+=coreutils findutils bash make diffutils patch sed
-#TARGETS+=ed flex bison file gawk tar grep bzip2
-
-#If you want a development system, you probably want gcc built
-# with uClibc so it can run within your dev system...
-#TARGETS+=gcc2_95_target ccache_target # NOT WORKING!!!
-#TARGETS+=gcc3_3_target ccache_target
-
-# Of course, if you are installing a development system, you
-# may want some header files so you can compile stuff....
-#TARGETS+=ncurses-headers zlib-headers openssl-headers
-
-# More development system stuff for those that want it
-#TARGETS+=m4 autoconf automake libtool
-
-# Perl
-#TARGETS+=perl
-
-# Some nice debugging tools
-#TARGETS+=gdb strace ltrace
+TARGETS:=host-sed openwrt-code.bin
-# The Valgrind debugger (x86 only)
-#TARGETS+=valgrind
-
-# Some stuff for access points and firewalls
-#TARGETS+=iptables hostap wtools dhcp_relay bridge
-#TARGETS+=iproute2 netsnmp
-
-# Run customize.mk at the very end to add your own special config.
-# This is useful for making your own distro within the buildroot
-# process.
-# TARGETS+=customize
-
-#############################################################
-#
-# Pick your root filesystem type.
-#
-#############################################################
-#TARGETS+=ext2root
-
-# Must mount cramfs with 'ramdisk_blocksize=4096'
-#TARGETS+=cramfsroot
-
-# You may need to edit make/jffs2root.mk to change target
-# endian-ness or similar, but this is sufficient for most
-# things as-is...
-#TARGETS+=jffs2root
-
-#TARGETS+= openwrt-linux.trx
-TARGETS+= openwrt-code.bin
+PACKAGES:=oidentd iproute2 kmod-sched wshaper zlib openssl openssh pppoecd dropbear chillispot dhcp-fwd ip6tables kmod-ipt6 kmod-ipv6 kmod-nfs kmod-ppp-async kmod-ppp-mppe-mppc ppp pppoecd pptp-server kmod-tun fprobe libpcap libpthread pptp-client vsftpd matrixssl ntpclient radvd strace
#############################################################
#
KERNEL_CROSS=$(STAGING_DIR)/bin/$(OPTIMIZE_FOR_CPU)-linux-uclibc-
TARGET_CROSS=$(STAGING_DIR)/bin/$(OPTIMIZE_FOR_CPU)-linux-uclibc-
TARGET_CC=$(TARGET_CROSS)gcc
-STRIP=$(TARGET_CROSS)strip --remove-section=.comment --remove-section=.note
-
+#STRIP=$(TARGET_CROSS)strip --remove-section=.comment --remove-section=.note --strip-unneeded
+STRIP=$(STAGING_DIR)/bin/sstrip
HOST_ARCH:=$(shell $(HOSTCC) -dumpmachine | sed -e s'/-.*//' \
-e 's/sparc.*/sparc/' \
DISABLE_NLS:=--disable-nls
endif
-
all: world
TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS))
TARGETS_SOURCE:=$(patsubst %,%-source,$(TARGETS))
TARGETS_DIRCLEAN:=$(patsubst %,%-dirclean,$(TARGETS))
-world: $(DL_DIR) $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) $(TARGETS)
+
+PACKAGES_IPK:=$(patsubst %,%-ipk,$(PACKAGES))
+OPENWRT_IPK_DIR=$(SOURCE_DIR)/openwrt/ipkg
+
+world: $(DL_DIR) $(TARGETS_SOURCE) $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) $(TARGETS)
+ @echo "ALL DONE."
+
+packages: ipkg-utils $(PACKAGES_IPK)
+ -@mkdir -p $(BASE_DIR)/packages
+ { \
+ cd $(BASE_DIR)/packages; \
+ mv $(BUILD_DIR)/*.ipk .; \
+ $(IPKG_MAKE_INDEX) . > Packages; \
+ }
@echo "ALL DONE."
.PHONY: all world clean dirclean distclean source $(TARGETS) \
ln -fs ../$(REAL_GNU_TARGET_NAME)/include $(STAGING_DIR)/usr/include
-$(TARGET_DIR): $(DL_DIR)/$(OPENWRT_ROOT_SKEL)
+$(TARGET_DIR):
rm -rf $(TARGET_DIR)
- #zcat $(SOURCE_DIR)/skel.tar.gz | tar -C $(BUILD_DIR) -xf -
- zcat $(DL_DIR)/$(OPENWRT_ROOT_SKEL) | tar -C $(BUILD_DIR) -xf -
- #cp -a $(SOURCE_DIR)/target_skeleton/* $(TARGET_DIR)/
+ cp -a $(SOURCE_DIR)/openwrt/root/ $(TARGET_DIR)
-find $(TARGET_DIR) -type d -name CVS -exec rm -rf {} \; > /dev/null 2>&1
source: $(TARGETS_SOURCE)
#############################################################
clean:
rm -rf $(TOOL_BUILD_DIR) $(BUILD_DIR) $(IMAGE) \
+ $(BASE_DIR)/packages \
openwrt-linux.trx openwrt-g-code.bin openwrt-gs-code.bin \
openwrt-kmodules.tar.bz2
dirclean: $(TARGETS_DIRCLEAN)
rm -rf $(TARGET_DIR) $(STAGING_DIR) $(IMAGE) \
+ $(BASE_DIR)/packages \
openwrt-linux.trx openwrt-g-code.bin openwrt-gs-code.bin \
openwrt-kmodules.tar.bz2