finally move buildroot-ng to trunk
authorFelix Fietkau <nbd@openwrt.org>
Fri, 13 Oct 2006 20:51:49 +0000 (20:51 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Fri, 13 Oct 2006 20:51:49 +0000 (20:51 +0000)
SVN-Revision: 5059

907 files changed:
BSDmakefile [new file with mode: 0644]
Config.in [new file with mode: 0644]
LICENSE [new file with mode: 0644]
Makefile [new file with mode: 0644]
README [new file with mode: 0644]
docs/config.txt [new file with mode: 0644]
docs/network-scripts.txt [new file with mode: 0644]
docs/network.txt [new file with mode: 0644]
include/host-build.mk [new file with mode: 0644]
include/host.mk [new file with mode: 0644]
include/image.mk [new file with mode: 0644]
include/kernel-build.mk [new file with mode: 0644]
include/kernel.mk [new file with mode: 0644]
include/modules-2.4.mk [new file with mode: 0644]
include/modules-2.6.mk [new file with mode: 0644]
include/netfilter.mk [new file with mode: 0644]
include/package.mk [new file with mode: 0644]
include/prereq-build.mk [new file with mode: 0644]
include/prereq.mk [new file with mode: 0644]
include/shell.sh [new file with mode: 0644]
include/target.mk [new file with mode: 0644]
include/verbose.mk [new file with mode: 0644]
package/Makefile [new file with mode: 0644]
package/alsa/Makefile [new file with mode: 0644]
package/alsa/files/alsa.modules [new file with mode: 0644]
package/alsa/patches/100-compile_fix.patch [new file with mode: 0644]
package/arptables/Makefile [new file with mode: 0644]
package/base-files/Makefile [new file with mode: 0644]
package/base-files/ar7-2.4/bin/firstboot [new file with mode: 0755]
package/base-files/ar7-2.4/etc/config/network [new file with mode: 0644]
package/base-files/ar7-2.4/etc/init.d/S00adam2 [new file with mode: 0755]
package/base-files/ar7-2.4/etc/preinit [new file with mode: 0755]
package/base-files/ar7-2.4/sbin/mount_root [new file with mode: 0755]
package/base-files/aruba-2.6/etc/config/network [new file with mode: 0644]
package/base-files/au1000-2.6/etc/config/network [new file with mode: 0644]
package/base-files/au1000-2.6/sbin/mount_root [new file with mode: 0755]
package/base-files/brcm-2.4/bin/firstboot [new file with mode: 0755]
package/base-files/brcm-2.4/etc/config/wireless [new file with mode: 0644]
package/base-files/brcm-2.4/etc/init.d/S05netconfig [new file with mode: 0755]
package/base-files/brcm-2.4/etc/preinit [new file with mode: 0755]
package/base-files/brcm-2.4/sbin/mount_root [new file with mode: 0755]
package/base-files/brcm-2.6/bin/firstboot [new file with mode: 0755]
package/base-files/brcm-2.6/etc/init.d/S05netconfig [new file with mode: 0755]
package/base-files/brcm-2.6/etc/preinit [new file with mode: 0755]
package/base-files/brcm-2.6/sbin/mount_root [new file with mode: 0755]
package/base-files/default/bin/ipcalc [new file with mode: 0755]
package/base-files/default/bin/login [new file with mode: 0755]
package/base-files/default/bin/uci [new file with mode: 0755]
package/base-files/default/etc/banner [new file with mode: 0644]
package/base-files/default/etc/config/network [new file with mode: 0644]
package/base-files/default/etc/functions.sh [new file with mode: 0755]
package/base-files/default/etc/group [new file with mode: 0644]
package/base-files/default/etc/hosts [new file with mode: 0644]
package/base-files/default/etc/hotplug.d/block/01-mount [new file with mode: 0755]
package/base-files/default/etc/hotplug.d/net/10-net [new file with mode: 0644]
package/base-files/default/etc/hotplug.d/usb/01-ln [new file with mode: 0755]
package/base-files/default/etc/init.d/S10boot [new file with mode: 0755]
package/base-files/default/etc/init.d/S40network [new file with mode: 0755]
package/base-files/default/etc/init.d/S50httpd [new file with mode: 0755]
package/base-files/default/etc/init.d/S50telnet [new file with mode: 0755]
package/base-files/default/etc/init.d/S60cron [new file with mode: 0755]
package/base-files/default/etc/init.d/rcS [new file with mode: 0755]
package/base-files/default/etc/inittab [new file with mode: 0644]
package/base-files/default/etc/ipkg.conf [new file with mode: 0644]
package/base-files/default/etc/nvram.sh [new file with mode: 0644]
package/base-files/default/etc/passwd [new file with mode: 0644]
package/base-files/default/etc/profile [new file with mode: 0644]
package/base-files/default/etc/protocols [new file with mode: 0644]
package/base-files/default/etc/rc.common [new file with mode: 0755]
package/base-files/default/etc/resolv.conf [new file with mode: 0644]
package/base-files/default/etc/shells [new file with mode: 0644]
package/base-files/default/etc/sysctl.conf [new file with mode: 0644]
package/base-files/default/lib/config/uci-update.awk [new file with mode: 0644]
package/base-files/default/lib/config/uci.sh [new file with mode: 0755]
package/base-files/default/lib/network/config.sh [new file with mode: 0755]
package/base-files/default/rom/note [new file with mode: 0644]
package/base-files/default/sbin/hotplug [new file with mode: 0755]
package/base-files/default/sbin/ifdown [new file with mode: 0755]
package/base-files/default/sbin/ifup [new file with mode: 0755]
package/base-files/default/sbin/mount_root [new file with mode: 0755]
package/base-files/default/sbin/wifi [new file with mode: 0755]
package/base-files/default/usr/lib/common.awk [new file with mode: 0644]
package/base-files/default/usr/lib/parse-config.awk [new file with mode: 0644]
package/base-files/default/usr/share/udhcpc/default.script [new file with mode: 0755]
package/base-files/rb532-2.6/etc/config/network [new file with mode: 0644]
package/base-files/sibyte-2.6/etc/config/network [new file with mode: 0644]
package/base-files/sibyte-2.6/etc/inittab [new file with mode: 0644]
package/base-files/src/adam2patcher.c [new file with mode: 0644]
package/base-files/src/jffs2root.c [new file with mode: 0644]
package/base-files/x86-2.4/etc/config/network [new file with mode: 0644]
package/base-files/x86-2.6/etc/config/network [new file with mode: 0644]
package/base-files/xscale-2.6/etc/config/network [new file with mode: 0644]
package/bridge/Makefile [new file with mode: 0644]
package/bridge/patches/patch-libbridge_Makefile_in [new file with mode: 0644]
package/broadcom-wl/Makefile [new file with mode: 0644]
package/broadcom-wl/files/lib/wifi/broadcom.sh [new file with mode: 0644]
package/broadcom-wl/src/kmod/Makefile [new file with mode: 0644]
package/broadcom-wl/src/kmod/bcmip.h [new file with mode: 0644]
package/broadcom-wl/src/kmod/bcmutils.c [new file with mode: 0644]
package/broadcom-wl/src/kmod/hnddma.c [new file with mode: 0644]
package/broadcom-wl/src/kmod/hnddma.h [new file with mode: 0644]
package/broadcom-wl/src/kmod/linux_osl.c [new file with mode: 0644]
package/broadcom-wl/src/kmod/linux_osl.h [new file with mode: 0644]
package/broadcom-wl/src/kmod/patchtable.pl [new file with mode: 0644]
package/broadcom-wl/src/kmod/pktq.h [new file with mode: 0644]
package/broadcom-wl/src/kmod/sbhnddma.h [new file with mode: 0644]
package/broadcom-wl/src/wlc/Makefile [new file with mode: 0644]
package/broadcom-wl/src/wlc/include/bcmdefs.h [new file with mode: 0644]
package/broadcom-wl/src/wlc/include/bcmutils.h [new file with mode: 0644]
package/broadcom-wl/src/wlc/include/proto/802.11.h [new file with mode: 0644]
package/broadcom-wl/src/wlc/include/proto/bcmeth.h [new file with mode: 0644]
package/broadcom-wl/src/wlc/include/proto/bcmevent.h [new file with mode: 0644]
package/broadcom-wl/src/wlc/include/proto/ethernet.h [new file with mode: 0644]
package/broadcom-wl/src/wlc/include/proto/wpa.h [new file with mode: 0644]
package/broadcom-wl/src/wlc/include/typedefs.h [new file with mode: 0644]
package/broadcom-wl/src/wlc/include/wlioctl.h [new file with mode: 0644]
package/broadcom-wl/src/wlc/include/wlutils.h [new file with mode: 0644]
package/broadcom-wl/src/wlc/ioctl.c [new file with mode: 0644]
package/broadcom-wl/src/wlc/wlc.c [new file with mode: 0644]
package/busybox/Makefile [new file with mode: 0644]
package/busybox/config/Config.in [new file with mode: 0644]
package/busybox/config/archival/Config.in [new file with mode: 0644]
package/busybox/config/console-tools/Config.in [new file with mode: 0644]
package/busybox/config/coreutils/Config.in [new file with mode: 0644]
package/busybox/config/debianutils/Config.in [new file with mode: 0644]
package/busybox/config/e2fsprogs/Config.in [new file with mode: 0644]
package/busybox/config/editors/Config.in [new file with mode: 0644]
package/busybox/config/findutils/Config.in [new file with mode: 0644]
package/busybox/config/init/Config.in [new file with mode: 0644]
package/busybox/config/libbb/Config.in [new file with mode: 0644]
package/busybox/config/loginutils/Config.in [new file with mode: 0644]
package/busybox/config/miscutils/Config.in [new file with mode: 0644]
package/busybox/config/modutils/Config.in [new file with mode: 0644]
package/busybox/config/networking/Config.in [new file with mode: 0644]
package/busybox/config/networking/udhcp/Config.in [new file with mode: 0644]
package/busybox/config/procps/Config.in [new file with mode: 0644]
package/busybox/config/shell/Config.in [new file with mode: 0644]
package/busybox/config/sysklogd/Config.in [new file with mode: 0644]
package/busybox/config/util-linux/Config.in [new file with mode: 0644]
package/busybox/patches/001-wget_long_options.patch [new file with mode: 0644]
package/busybox/patches/100-killall5.patch [new file with mode: 0644]
package/busybox/patches/110-telnetd.patch [new file with mode: 0644]
package/busybox/patches/140-unlink-passwd.patch [new file with mode: 0644]
package/busybox/patches/150-udhcp-release.patch [new file with mode: 0644]
package/busybox/patches/170-udhcp-options.patch [new file with mode: 0644]
package/busybox/patches/180-telnetd_ipv6.patch [new file with mode: 0644]
package/busybox/patches/190-ash_performance.patch [new file with mode: 0644]
package/busybox/patches/200-etc_crontabs.patch [new file with mode: 0644]
package/busybox/patches/210-passwd_limit.patch [new file with mode: 0644]
package/busybox/patches/220-awk_bitops.patch [new file with mode: 0644]
package/busybox/patches/230-grep_C.patch [new file with mode: 0644]
package/busybox/patches/300-netmsg.patch [new file with mode: 0644]
package/busybox/patches/310-passwd_access.patch [new file with mode: 0644]
package/busybox/patches/320-httpd_address_binding.patch [new file with mode: 0644]
package/busybox/patches/330-httpd_user_agent.patch [new file with mode: 0644]
package/busybox/patches/340-lock_util.patch [new file with mode: 0644]
package/busybox/patches/911-ipkg.patch [new file with mode: 0644]
package/busybox/patches/912-ipkg-no_warnings.patch [new file with mode: 0644]
package/busybox/patches/913-libbb_hash.patch [new file with mode: 0644]
package/busybox/patches/914-ipkg-fixes.patch [new file with mode: 0644]
package/diag/Makefile [new file with mode: 0644]
package/diag/src/Makefile [new file with mode: 0644]
package/diag/src/diag.c [new file with mode: 0644]
package/dnsmasq/Makefile [new file with mode: 0644]
package/dnsmasq/files/dnsmasq.conf [new file with mode: 0644]
package/dnsmasq/files/dnsmasq.init [new file with mode: 0644]
package/dnsmasq/patches/101-ipv6.patch [new file with mode: 0644]
package/dropbear/Makefile [new file with mode: 0644]
package/dropbear/files/dropbear.init [new file with mode: 0755]
package/dropbear/patches/100-pubkey_path.patch [new file with mode: 0644]
package/dropbear/patches/110-change_user.patch [new file with mode: 0644]
package/dropbear/patches/120-hostkey_prompt.patch [new file with mode: 0644]
package/dropbear/patches/130-ssh_ignore_o_and_x_args.patch [new file with mode: 0644]
package/dropbear/patches/140-use_dev_urandom.patch [new file with mode: 0644]
package/dropbear/patches/150-dbconvert_standalone.patch [new file with mode: 0644]
package/ebtables/Makefile [new file with mode: 0644]
package/fuse/Makefile [new file with mode: 0644]
package/fuse/patches/101-kmod_build.patch [new file with mode: 0644]
package/fuse/patches/102-no_depmod.patch [new file with mode: 0644]
package/fuse/patches/111-uclibc_changes.patch [new file with mode: 0644]
package/fuse/patches/112-no_break_on_mknod.patch [new file with mode: 0644]
package/gdbserver/Makefile [new file with mode: 0644]
package/gmp/Makefile [new file with mode: 0644]
package/haserl/Makefile [new file with mode: 0644]
package/hostap-utils/Makefile [new file with mode: 0644]
package/hostap/Makefile [new file with mode: 0644]
package/hostapd/Makefile [new file with mode: 0644]
package/hostapd/files/default.config [new file with mode: 0644]
package/hostapd/files/mini.config [new file with mode: 0644]
package/hostapd/patches/001-cross_compile_fix.patch [new file with mode: 0644]
package/hostapd/patches/100-madwifi_fixes.patch [new file with mode: 0644]
package/iproute2/Makefile [new file with mode: 0644]
package/iproute2/patches/000-debian_patches_3.patch [new file with mode: 0644]
package/iproute2/patches/001-iproute2-2.6.11_Config.patch [new file with mode: 0644]
package/iproute2/patches/002-iproute2-ipxfrm_no_sctp.patch [new file with mode: 0644]
package/iproute2/patches/003-iproute2-htb_overhead.patch [new file with mode: 0644]
package/ipsec-tools/Makefile [new file with mode: 0644]
package/ipsec-tools/patches/01-no_libfl.patch [new file with mode: 0644]
package/ipsec-tools/patches/02-configure_cppflags_typo.patch [new file with mode: 0644]
package/ipset/Makefile [new file with mode: 0644]
package/ipset/patches/kernel26.patch [new file with mode: 0644]
package/iptables/Makefile [new file with mode: 0644]
package/iptables/files/firewall.awk [new file with mode: 0644]
package/iptables/files/firewall.config [new file with mode: 0644]
package/iptables/files/firewall.init [new file with mode: 0755]
package/iptables/files/firewall.user [new file with mode: 0644]
package/iptables/files/l7/aim.pat [new file with mode: 0644]
package/iptables/files/l7/bittorrent.pat [new file with mode: 0644]
package/iptables/files/l7/edonkey-dl.pat [new file with mode: 0644]
package/iptables/files/l7/edonkey.pat [new file with mode: 0644]
package/iptables/files/l7/fasttrack.pat [new file with mode: 0644]
package/iptables/files/l7/ftp.pat [new file with mode: 0644]
package/iptables/files/l7/gnutella.pat [new file with mode: 0644]
package/iptables/files/l7/http.pat [new file with mode: 0644]
package/iptables/files/l7/ident.pat [new file with mode: 0644]
package/iptables/files/l7/irc.pat [new file with mode: 0644]
package/iptables/files/l7/jabber.pat [new file with mode: 0644]
package/iptables/files/l7/msnmessenger.pat [new file with mode: 0644]
package/iptables/files/l7/ntp.pat [new file with mode: 0644]
package/iptables/files/l7/pop3.pat [new file with mode: 0644]
package/iptables/files/l7/smtp.pat [new file with mode: 0644]
package/iptables/files/l7/ssl.pat [new file with mode: 0644]
package/iptables/files/l7/vnc.pat [new file with mode: 0644]
package/iptables/patches/01-ipp2p-0.8.1rc1.patch [new file with mode: 0644]
package/iptables/patches/02-layer7-1.5nbd.patch [new file with mode: 0644]
package/iptables/patches/04-multiport_v1.patch [new file with mode: 0644]
package/iptables/patches/05-imq1.patch [new file with mode: 0644]
package/isakmpd/Makefile [new file with mode: 0644]
package/isakmpd/patches/010-debian_3.patch [new file with mode: 0644]
package/isakmpd/patches/020-standardize.patch [new file with mode: 0644]
package/isakmpd/patches/030-openssl_hashes.patch [new file with mode: 0644]
package/isakmpd/patches/040-security_fix.patch [new file with mode: 0644]
package/kernel/Makefile [new file with mode: 0644]
package/kernel/modules.mk [new file with mode: 0644]
package/keynote/Makefile [new file with mode: 0644]
package/keynote/patches/01-build.patch [new file with mode: 0644]
package/keynote/patches/02-cross_compile.patch [new file with mode: 0644]
package/libpcap/Makefile [new file with mode: 0644]
package/libpcap/patches/100-shared-lib.patch [new file with mode: 0644]
package/libpcap/patches/101-cross-compile-fix.patch [new file with mode: 0644]
package/libpcap/patches/102-alt-ether.patch [new file with mode: 0644]
package/libpcap/patches/103-flex_workaround.patch [new file with mode: 0644]
package/linux-atm/Makefile [new file with mode: 0644]
package/linux-atm/files/br2684.hotplug [new file with mode: 0644]
package/linux-atm/patches/000-debian_16.patch [new file with mode: 0644]
package/linux-atm/patches/100-br2684.patch [new file with mode: 0644]
package/linux-atm/patches/200-no_libfl.patch [new file with mode: 0644]
package/linux-atm/patches/300-no_autotools.patch [new file with mode: 0644]
package/linux-atm/patches/400-stdint_local_instead_of_host.patch [new file with mode: 0644]
package/madwifi/Makefile [new file with mode: 0644]
package/madwifi/files/madwifi.init [new file with mode: 0644]
package/madwifi/files/madwifi.modules [new file with mode: 0644]
package/madwifi/patches/100-kernel_cflags.patch [new file with mode: 0644]
package/madwifi/patches/101-no_werror.patch [new file with mode: 0644]
package/madwifi/patches/102-multicall_binary.patch [new file with mode: 0644]
package/madwifi/patches/103-disable_rfkill.patch [new file with mode: 0644]
package/madwifi/patches/104-apmode_by_default.patch [new file with mode: 0644]
package/mini_fo/Makefile [new file with mode: 0644]
package/mini_fo/patches/101-kmod_build.patch [new file with mode: 0644]
package/mini_fo/patches/102-mutex_change.patch [new file with mode: 0644]
package/mini_fo/patches/103-remove_dead_code.patch [new file with mode: 0644]
package/mtd/Makefile [new file with mode: 0644]
package/mtd/src/Makefile [new file with mode: 0644]
package/mtd/src/mtd.c [new file with mode: 0644]
package/nvram/Makefile [new file with mode: 0644]
package/nvram/src/Makefile [new file with mode: 0644]
package/nvram/src/bcmtimer.h [new file with mode: 0644]
package/nvram/src/defaults.c [new file with mode: 0644]
package/nvram/src/include/bcmnvram.h [new file with mode: 0644]
package/nvram/src/include/bcmutils.h [new file with mode: 0644]
package/nvram/src/include/cy_conf.h [new file with mode: 0644]
package/nvram/src/include/epivers.h [new file with mode: 0644]
package/nvram/src/include/proto/802.11.h [new file with mode: 0644]
package/nvram/src/include/proto/ethernet.h [new file with mode: 0644]
package/nvram/src/include/shutils.h [new file with mode: 0644]
package/nvram/src/include/typedefs.h [new file with mode: 0644]
package/nvram/src/include/utils.h [new file with mode: 0644]
package/nvram/src/include/wlcompat.h [new file with mode: 0644]
package/nvram/src/include/wlioctl.h [new file with mode: 0644]
package/nvram/src/include/wlutils.h [new file with mode: 0644]
package/nvram/src/linux_timer.c [new file with mode: 0644]
package/nvram/src/main.c [new file with mode: 0644]
package/nvram/src/nvram_convert.c [new file with mode: 0644]
package/nvram/src/nvram_convert.h [new file with mode: 0644]
package/nvram/src/nvram_linux.c [new file with mode: 0644]
package/nvram/src/shutils.c [new file with mode: 0644]
package/nvram/src/wl.c [new file with mode: 0644]
package/nvram/src/wl_linux.c [new file with mode: 0644]
package/openssl/Makefile [new file with mode: 0644]
package/openssl/patches/110-optimize-for-size.patch [new file with mode: 0644]
package/openssl/patches/120-makedepend.patch [new file with mode: 0644]
package/openssl/patches/130-perl-path.patch [new file with mode: 0644]
package/openssl/patches/140-makefile-dirs.patch [new file with mode: 0644]
package/openssl/patches/150-no_engines.patch [new file with mode: 0644]
package/openssl/patches/160-disable_doc_tests.patch [new file with mode: 0644]
package/openswan/Makefile [new file with mode: 0644]
package/openswan/patches/100-pluto_includes.patch [new file with mode: 0644]
package/openswan/patches/110-scripts.patch [new file with mode: 0644]
package/openswan/patches/120-use_dev_urandom.patch [new file with mode: 0644]
package/pcmcia-cs/Makefile [new file with mode: 0644]
package/pcmcia-cs/patches/001-config-novatel_merlin_u630.patch [new file with mode: 0644]
package/ppp/Makefile [new file with mode: 0644]
package/ppp/files/etc/ppp/chap-secrets [new file with mode: 0644]
package/ppp/files/etc/ppp/filter [new file with mode: 0644]
package/ppp/files/etc/ppp/ip-down [new file with mode: 0755]
package/ppp/files/etc/ppp/ip-up [new file with mode: 0755]
package/ppp/files/etc/ppp/options [new file with mode: 0644]
package/ppp/files/etc/ppp/radius.conf [new file with mode: 0644]
package/ppp/files/etc/ppp/radius/dictionary [new file with mode: 0644]
package/ppp/files/etc/ppp/radius/dictionary.asnet [new file with mode: 0644]
package/ppp/files/etc/ppp/radius/dictionary.microsoft [new file with mode: 0644]
package/ppp/files/etc/ppp/radius/servers [new file with mode: 0644]
package/ppp/files/ppp.sh [new file with mode: 0644]
package/ppp/files/pppoa.sh [new file with mode: 0644]
package/ppp/files/pppoe.sh [new file with mode: 0644]
package/ppp/patches/010-use_target_for_configure.patch [new file with mode: 0644]
package/ppp/patches/100-debian_close_dev_ppp.patch [new file with mode: 0644]
package/ppp/patches/101-debian_ip-up_option.patch [new file with mode: 0644]
package/ppp/patches/102-debian_pppoe_multicast_pado.patch [new file with mode: 0644]
package/ppp/patches/103-debian_pppoe_cleanup.patch [new file with mode: 0644]
package/ppp/patches/104-debian_fix_linkpidfile.patch [new file with mode: 0644]
package/ppp/patches/105-debian_pppoatm_cleanup.patch [new file with mode: 0644]
package/ppp/patches/106-debian_pppoatm_fix_mtu.patch [new file with mode: 0644]
package/ppp/patches/107-debian_stripMSdomain.patch [new file with mode: 0644]
package/ppp/patches/108-debian_defaultroute.patch [new file with mode: 0644]
package/ppp/patches/109-debian_demand.patch [new file with mode: 0644]
package/ppp/patches/200-makefile.patch [new file with mode: 0644]
package/ppp/patches/201-mppe_mppc_1.1.patch [new file with mode: 0644]
package/ppp/patches/202-atm_fix.patch [new file with mode: 0644]
package/ppp/patches/203-no_strip.patch [new file with mode: 0644]
package/ppp/patches/204-opt_flags.patch [new file with mode: 0644]
package/ppp/patches/205-pppoe_iface_name.patch [new file with mode: 0644]
package/ppp/patches/206-radius_config.patch [new file with mode: 0644]
package/ppp/patches/207-ppp_reconnect.patch [new file with mode: 0644]
package/ppp/patches/208-no_exponential_timeout.patch [new file with mode: 0644]
package/ppp/patches/209-compensate_time_change.patch [new file with mode: 0644]
package/ppp/patches/210-lcp_mtu_max.patch [new file with mode: 0644]
package/ppp/patches/300-filter-pcap-includes-lib.patch [new file with mode: 0644]
package/ppp/patches/310-precompiled_filter.patch [new file with mode: 0644]
package/ppp/utils/pfc.c [new file with mode: 0644]
package/pptp/Makefile [new file with mode: 0644]
package/pptp/files/options.pptp [new file with mode: 0644]
package/pptp/files/pptp.sh [new file with mode: 0644]
package/qos-scripts/Makefile [new file with mode: 0644]
package/qos-scripts/files/etc/config/qos [new file with mode: 0644]
package/qos-scripts/files/etc/hotplug.d/iface/10-qos [new file with mode: 0755]
package/qos-scripts/files/etc/init.d/S50qos [new file with mode: 0755]
package/qos-scripts/files/usr/bin/qos-start [new file with mode: 0755]
package/qos-scripts/files/usr/bin/qos-stat [new file with mode: 0755]
package/qos-scripts/files/usr/bin/qos-stop [new file with mode: 0755]
package/qos-scripts/files/usr/lib/qos.sh [new file with mode: 0755]
package/robocfg/Makefile [new file with mode: 0644]
package/robocfg/src/Makefile [new file with mode: 0644]
package/robocfg/src/etc53xx.h [new file with mode: 0644]
package/robocfg/src/robocfg.c [new file with mode: 0644]
package/shfs/Makefile [new file with mode: 0644]
package/shfs/patches/101-kmod_build.patch [new file with mode: 0644]
package/shfs/patches/102-gcc4_fix.patch [new file with mode: 0644]
package/shfs/patches/103-dentry.patch [new file with mode: 0644]
package/spca5xx/Makefile [new file with mode: 0644]
package/spca5xx/patches/01-kmod-build.patch [new file with mode: 0644]
package/spca5xx/patches/02-seq_bug.patch [new file with mode: 0644]
package/switch/Makefile [new file with mode: 0644]
package/switch/files/switch.sh [new file with mode: 0644]
package/switch/src/Makefile [new file with mode: 0644]
package/switch/src/etc53xx.h [new file with mode: 0644]
package/switch/src/gpio.h [new file with mode: 0644]
package/switch/src/switch-adm.c [new file with mode: 0644]
package/switch/src/switch-core.c [new file with mode: 0644]
package/switch/src/switch-core.h [new file with mode: 0644]
package/switch/src/switch-robo.c [new file with mode: 0644]
package/udev/Makefile [new file with mode: 0644]
package/udev/patches/01-no_debug.patch [new file with mode: 0644]
package/ueagle-atm/Makefile [new file with mode: 0644]
package/ueagle-atm/files/ueagle-atm.modules [new file with mode: 0644]
package/ueagle-atm/patches/100-compile_fix.patch [new file with mode: 0644]
package/util-linux/Makefile [new file with mode: 0644]
package/util-linux/patches/501-mconfig.patch [new file with mode: 0644]
package/util-linux/patches/601-util-linux-2.12r-umount-no-special.patch [new file with mode: 0644]
package/wireless-tools/Makefile [new file with mode: 0644]
package/wireless-tools/patches/debian-2.patch [new file with mode: 0644]
package/wlcompat/Makefile [new file with mode: 0644]
package/wlcompat/src/Makefile [new file with mode: 0644]
package/wlcompat/src/include/bcmnvram.h [new file with mode: 0644]
package/wlcompat/src/include/bcmutils.h [new file with mode: 0644]
package/wlcompat/src/include/cy_conf.h [new file with mode: 0644]
package/wlcompat/src/include/epivers.h [new file with mode: 0644]
package/wlcompat/src/include/proto/802.11.h [new file with mode: 0644]
package/wlcompat/src/include/proto/ethernet.h [new file with mode: 0644]
package/wlcompat/src/include/shutils.h [new file with mode: 0644]
package/wlcompat/src/include/typedefs.h [new file with mode: 0644]
package/wlcompat/src/include/utils.h [new file with mode: 0644]
package/wlcompat/src/include/wlcompat.h [new file with mode: 0644]
package/wlcompat/src/include/wlioctl.h [new file with mode: 0644]
package/wlcompat/src/include/wlutils.h [new file with mode: 0644]
package/wlcompat/src/wlcompat.c [new file with mode: 0644]
package/yamonenv/Makefile [new file with mode: 0644]
package/zd1211/Makefile [new file with mode: 0644]
package/zlib/Makefile [new file with mode: 0644]
package/zlib/patches/zlib.patch [new file with mode: 0644]
rules.mk [new file with mode: 0644]
scripts/adam2flash.pl [new file with mode: 0755]
scripts/config.guess [new file with mode: 0755]
scripts/config/Makefile [new file with mode: 0644]
scripts/config/README [new file with mode: 0644]
scripts/config/conf.c [new file with mode: 0644]
scripts/config/confdata.c [new file with mode: 0644]
scripts/config/expr.c [new file with mode: 0644]
scripts/config/expr.h [new file with mode: 0644]
scripts/config/kconfig_load.c [new file with mode: 0644]
scripts/config/lex.backup [new file with mode: 0644]
scripts/config/lex.zconf.c_shipped [new file with mode: 0644]
scripts/config/lkc.h [new file with mode: 0644]
scripts/config/lkc_proto.h [new file with mode: 0644]
scripts/config/lxdialog/BIG.FAT.WARNING [new file with mode: 0644]
scripts/config/lxdialog/Makefile [new file with mode: 0644]
scripts/config/lxdialog/check-lxdialog.sh [new file with mode: 0644]
scripts/config/lxdialog/checklist.c [new file with mode: 0644]
scripts/config/lxdialog/colors.h [new file with mode: 0644]
scripts/config/lxdialog/dialog.h [new file with mode: 0644]
scripts/config/lxdialog/inputbox.c [new file with mode: 0644]
scripts/config/lxdialog/lxdialog.c [new file with mode: 0644]
scripts/config/lxdialog/menubox.c [new file with mode: 0644]
scripts/config/lxdialog/msgbox.c [new file with mode: 0644]
scripts/config/lxdialog/textbox.c [new file with mode: 0644]
scripts/config/lxdialog/util.c [new file with mode: 0644]
scripts/config/lxdialog/yesno.c [new file with mode: 0644]
scripts/config/mconf.c [new file with mode: 0644]
scripts/config/menu.c [new file with mode: 0644]
scripts/config/symbol.c [new file with mode: 0644]
scripts/config/util.c [new file with mode: 0644]
scripts/config/zconf.gperf [new file with mode: 0644]
scripts/config/zconf.hash.c_shipped [new file with mode: 0644]
scripts/config/zconf.l [new file with mode: 0644]
scripts/config/zconf.tab.c_shipped [new file with mode: 0644]
scripts/config/zconf.y [new file with mode: 0644]
scripts/configtest.pl [new file with mode: 0755]
scripts/download.pl [new file with mode: 0755]
scripts/flash.sh [new file with mode: 0644]
scripts/gen_busybox_config.pl [new file with mode: 0755]
scripts/gen_busybox_menuconfig.pl [new file with mode: 0644]
scripts/gen_deps.pl [new file with mode: 0755]
scripts/gen_menuconfig.pl [new file with mode: 0755]
scripts/ipkg [new file with mode: 0755]
scripts/ipkg-make-index.sh [new file with mode: 0755]
scripts/make-ipkg-dir.sh [new file with mode: 0755]
scripts/patch-kernel.sh [new file with mode: 0755]
scripts/rstrip.sh [new file with mode: 0755]
scripts/timestamp.pl [new file with mode: 0755]
target/Config.in [new file with mode: 0644]
target/Makefile [new file with mode: 0644]
target/image/ar7/Makefile [new file with mode: 0644]
target/image/ar7/sercomm/adam2.bin [new file with mode: 0644]
target/image/ar7/sercomm/dg834 [new file with mode: 0644]
target/image/ar7/sercomm/jdr454wb [new file with mode: 0644]
target/image/ar7/src/LzmaDecode.c [new file with mode: 0644]
target/image/ar7/src/LzmaDecode.h [new file with mode: 0644]
target/image/ar7/src/gzip.h [new file with mode: 0644]
target/image/ar7/src/ld.script.in [new file with mode: 0644]
target/image/ar7/src/loader.c [new file with mode: 0644]
target/image/ar7/src/srec2bin.c [new file with mode: 0644]
target/image/ar7/src/zimage.script.in [new file with mode: 0644]
target/image/aruba/Makefile [new file with mode: 0644]
target/image/aruba/addVersion [new file with mode: 0755]
target/image/aruba/version [new file with mode: 0644]
target/image/au1000/Makefile [new file with mode: 0644]
target/image/brcm/Makefile [new file with mode: 0644]
target/image/brcm/lzma-loader/Makefile [new file with mode: 0644]
target/image/brcm/lzma-loader/src/LzmaDecode.c [new file with mode: 0644]
target/image/brcm/lzma-loader/src/LzmaDecode.h [new file with mode: 0644]
target/image/brcm/lzma-loader/src/Makefile [new file with mode: 0644]
target/image/brcm/lzma-loader/src/README [new file with mode: 0644]
target/image/brcm/lzma-loader/src/decompress.c [new file with mode: 0644]
target/image/brcm/lzma-loader/src/decompress.lds.in [new file with mode: 0644]
target/image/brcm/lzma-loader/src/head.S [new file with mode: 0644]
target/image/brcm/lzma-loader/src/loader.lds.in [new file with mode: 0644]
target/image/brcm63xx/Makefile [new file with mode: 0644]
target/image/generic/Makefile [new file with mode: 0644]
target/image/generic/lzma-loader/Makefile [new file with mode: 0644]
target/image/generic/lzma-loader/src/LzmaDecode.c [new file with mode: 0644]
target/image/generic/lzma-loader/src/LzmaDecode.h [new file with mode: 0644]
target/image/generic/lzma-loader/src/Makefile [new file with mode: 0644]
target/image/generic/lzma-loader/src/decompress.c [new file with mode: 0644]
target/image/generic/lzma-loader/src/lzma-copy.lds.in [new file with mode: 0644]
target/image/generic/lzma-loader/src/lzma.lds.in [new file with mode: 0644]
target/image/generic/lzma-loader/src/print.c [new file with mode: 0644]
target/image/generic/lzma-loader/src/print.h [new file with mode: 0644]
target/image/generic/lzma-loader/src/printf.c [new file with mode: 0644]
target/image/generic/lzma-loader/src/printf.h [new file with mode: 0644]
target/image/generic/lzma-loader/src/start.S [new file with mode: 0644]
target/image/generic/lzma-loader/src/uart16550.c [new file with mode: 0644]
target/image/generic/lzma-loader/src/uart16550.h [new file with mode: 0644]
target/image/magicbox/Makefile [new file with mode: 0644]
target/image/rb532/Makefile [new file with mode: 0644]
target/image/uml/Makefile [new file with mode: 0755]
target/image/x86/Config.in [new file with mode: 0644]
target/image/x86/Makefile [new file with mode: 0644]
target/image/x86/gen_image.sh [new file with mode: 0755]
target/image/x86/grub/Makefile [new file with mode: 0644]
target/image/x86/grub/menu.lst [new file with mode: 0644]
target/image/xscale/Makefile [new file with mode: 0644]
target/linux/Config.in [new file with mode: 0644]
target/linux/Makefile [new file with mode: 0644]
target/linux/ar531x-2.4/Makefile [new file with mode: 0644]
target/linux/ar531x-2.4/config [new file with mode: 0644]
target/linux/ar531x-2.4/patches/000-atheros-support.patch [new file with mode: 0644]
target/linux/ar7-2.4/Config.in [new file with mode: 0644]
target/linux/ar7-2.4/Makefile [new file with mode: 0644]
target/linux/ar7-2.4/config [new file with mode: 0644]
target/linux/ar7-2.4/patches/000-ar7_support.patch [new file with mode: 0644]
target/linux/ar7-2.4/patches/001-flash_map.patch [new file with mode: 0644]
target/linux/ar7-2.4/patches/002-led_driver.patch [new file with mode: 0644]
target/linux/ar7-2.4/patches/003-net_driver_cpmac.patch [new file with mode: 0644]
target/linux/ar7-2.4/patches/004-atm_driver.patch [new file with mode: 0644]
target/linux/ar7-2.4/patches/005-wdt_driver.patch [new file with mode: 0644]
target/linux/ar7-2.4/patches/006-sched_use_tsc.patch [new file with mode: 0644]
target/linux/aruba-2.6/Makefile [new file with mode: 0644]
target/linux/aruba-2.6/config [new file with mode: 0644]
target/linux/aruba-2.6/patches/000-aruba.patch [new file with mode: 0644]
target/linux/aruba-2.6/patches/001-flash.patch [new file with mode: 0644]
target/linux/aruba-2.6/patches/002-irq.patch [new file with mode: 0644]
target/linux/aruba-2.6/patches/003-pci.patch [new file with mode: 0644]
target/linux/aruba-2.6/patches/004-wdt.patch [new file with mode: 0644]
target/linux/aruba-2.6/patches/010-ar2313_enet.patch [new file with mode: 0644]
target/linux/aruba-2.6/patches/011-ap6x_serial_fix.patch [new file with mode: 0644]
target/linux/aruba-2.6/patches/012-ehci_softirq.patch [new file with mode: 0644]
target/linux/au1000-2.6/Makefile [new file with mode: 0644]
target/linux/au1000-2.6/config [new file with mode: 0644]
target/linux/au1000-2.6/patches/001-redefinitions_fixes.patch [new file with mode: 0644]
target/linux/au1000-2.6/patches/002-mtx1_flash_map.patch [new file with mode: 0644]
target/linux/au1000-2.6/patches/003-zImage.patch [new file with mode: 0644]
target/linux/au1000-2.6/patches/004-mtx1_watchdog.patch [new file with mode: 0644]
target/linux/au1000-2.6/patches/005-au1000_eth_link_beat.patch [new file with mode: 0644]
target/linux/au1000-2.6/patches/006-mtx1_system_button.patch [new file with mode: 0644]
target/linux/au1000-2.6/patches/007-mtx1_sio2.patch [new file with mode: 0644]
target/linux/au1000-2.6/patches/008-isdel_cardbus.patch [new file with mode: 0644]
target/linux/brcm-2.4/Makefile [new file with mode: 0644]
target/linux/brcm-2.4/config [new file with mode: 0644]
target/linux/brcm-2.4/patches/001-bcm47xx.patch [new file with mode: 0644]
target/linux/brcm-2.4/patches/002-wl_fix.patch [new file with mode: 0644]
target/linux/brcm-2.4/patches/003-bcm47xx_cache_fixes.patch [new file with mode: 0644]
target/linux/brcm-2.4/patches/004-flash.patch [new file with mode: 0644]
target/linux/brcm-2.4/patches/005-bluetooth_sco_buffer_align.patch [new file with mode: 0644]
target/linux/brcm-2.4/patches/006-ide_workaround.patch [new file with mode: 0644]
target/linux/brcm-2.4/patches/007-sched_use_tsc.patch [new file with mode: 0644]
target/linux/brcm-2.4/patches/008-b44_bcm47xx_support.patch [new file with mode: 0644]
target/linux/brcm-2.4/patches/009-wrt54g3g_pcmcia.patch [new file with mode: 0644]
target/linux/brcm-2.4/patches/010-bcm47xx-cam_absent.patch [new file with mode: 0644]
target/linux/brcm-2.6/Makefile [new file with mode: 0644]
target/linux/brcm-2.6/config [new file with mode: 0644]
target/linux/brcm-2.6/patches/001-bcm947xx.patch [new file with mode: 0644]
target/linux/brcm-2.6/patches/002-flash-map.patch [new file with mode: 0644]
target/linux/brcm-2.6/patches/003-bcm4710_cache_fixes.patch [new file with mode: 0644]
target/linux/brcm-2.6/patches/004-b44_bcm47xx_support.patch [new file with mode: 0644]
target/linux/brcm-2.6/patches/010-bcm47xx-cam_absent.patch [new file with mode: 0644]
target/linux/brcm63xx-2.6/Makefile [new file with mode: 0644]
target/linux/brcm63xx-2.6/config [new file with mode: 0644]
target/linux/brcm63xx-2.6/patches/001-bcm963xx.patch [new file with mode: 0644]
target/linux/brcm63xx-2.6/patches/040-bcm963xx_flashmap.patch [new file with mode: 0644]
target/linux/brcm63xx-2.6/patches/100-binary_hacks.patch [new file with mode: 0644]
target/linux/control/kernel.control [new file with mode: 0644]
target/linux/control/kmod-atm.control [new file with mode: 0644]
target/linux/control/kmod-ax25.control [new file with mode: 0644]
target/linux/control/kmod-bluetooth.control [new file with mode: 0644]
target/linux/control/kmod-brcm-et.control [new file with mode: 0644]
target/linux/control/kmod-brcm-wl.control [new file with mode: 0644]
target/linux/control/kmod-brcm-wl2.control [new file with mode: 0644]
target/linux/control/kmod-cpmac.control [new file with mode: 0644]
target/linux/control/kmod-fs-cifs.control [new file with mode: 0644]
target/linux/control/kmod-fs-ext2.control [new file with mode: 0644]
target/linux/control/kmod-fs-ext3.control [new file with mode: 0644]
target/linux/control/kmod-fs-hfsplus.control [new file with mode: 0644]
target/linux/control/kmod-fs-minix.control [new file with mode: 0644]
target/linux/control/kmod-fs-nfs.control [new file with mode: 0644]
target/linux/control/kmod-fs-vfat.control [new file with mode: 0644]
target/linux/control/kmod-fs-xfs.control [new file with mode: 0644]
target/linux/control/kmod-imq.control [new file with mode: 0644]
target/linux/control/kmod-iptables-extra.control [new file with mode: 0644]
target/linux/control/kmod-iptables.control [new file with mode: 0644]
target/linux/control/kmod-loop.control [new file with mode: 0644]
target/linux/control/kmod-lp.control [new file with mode: 0644]
target/linux/control/kmod-nbd.control [new file with mode: 0644]
target/linux/control/kmod-net-airo.control [new file with mode: 0644]
target/linux/control/kmod-net-hermes-pci.control [new file with mode: 0644]
target/linux/control/kmod-net-hermes-plx.control [new file with mode: 0644]
target/linux/control/kmod-net-hermes.control [new file with mode: 0644]
target/linux/control/kmod-net-prism54.control [new file with mode: 0644]
target/linux/control/kmod-nls-base.control [new file with mode: 0644]
target/linux/control/kmod-nls-cp437.control [new file with mode: 0644]
target/linux/control/kmod-nls-cp850.control [new file with mode: 0644]
target/linux/control/kmod-nls-iso8859-1.control [new file with mode: 0644]
target/linux/control/kmod-nls-iso8859-15.control [new file with mode: 0644]
target/linux/control/kmod-nls-utf8.control [new file with mode: 0644]
target/linux/control/kmod-pcmcia-core.control [new file with mode: 0644]
target/linux/control/kmod-pcmcia-serial.control [new file with mode: 0644]
target/linux/control/kmod-pwc.control [new file with mode: 0644]
target/linux/control/kmod-sangam-atm-annex-a.control [new file with mode: 0644]
target/linux/control/kmod-sangam-atm-annex-b.control [new file with mode: 0644]
target/linux/control/kmod-softdog.control [new file with mode: 0644]
target/linux/control/kmod-soundcore.control [new file with mode: 0644]
target/linux/control/kmod-usb-acm.control [new file with mode: 0644]
target/linux/control/kmod-usb-atm-speedtouch.control [new file with mode: 0644]
target/linux/control/kmod-usb-atm.control [new file with mode: 0644]
target/linux/control/kmod-usb-audio.control [new file with mode: 0644]
target/linux/control/kmod-usb-core.control [new file with mode: 0644]
target/linux/control/kmod-usb-ohci.control [new file with mode: 0644]
target/linux/control/kmod-usb-printer.control [new file with mode: 0644]
target/linux/control/kmod-usb-serial-belkin.control [new file with mode: 0644]
target/linux/control/kmod-usb-serial-ftdi.control [new file with mode: 0644]
target/linux/control/kmod-usb-serial-mct-u232.control [new file with mode: 0644]
target/linux/control/kmod-usb-serial-pl2303.control [new file with mode: 0644]
target/linux/control/kmod-usb-serial-visor.control [new file with mode: 0644]
target/linux/control/kmod-usb-serial.control [new file with mode: 0644]
target/linux/control/kmod-usb-storage.control [new file with mode: 0644]
target/linux/control/kmod-usb-uhci.control [new file with mode: 0644]
target/linux/control/kmod-usb2.control [new file with mode: 0644]
target/linux/control/kmod-videodev.control [new file with mode: 0644]
target/linux/control/kmod-wd1100.control [new file with mode: 0644]
target/linux/generic-2.4/README [new file with mode: 0644]
target/linux/generic-2.4/patches/000-linux_mips.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/001-squashfs.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/002-squashfs_lzma.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/003-jffs2_compression.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/004-exec_pagesize.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/005-mtd_flashtypes.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/006-gcc4_fixes.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/007-more_gcc4_fixes.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/008-intel_flashchip_fix.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/009-calibrate_section.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/010-disable_old_squashfs_compatibility.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/050-build_flags.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/051-remove_pcmcia_modinst_compat.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/100-wireless-extension.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/106-mppe_mppc.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/107-cifs.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/108-optional_aout_support.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/109-ipsec_nat_traversal.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/110-netdev_random_core.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/112-bridging_performance.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/113-even_more_gcc4_stuff.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/200-i4l.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/201-hfc_usb_backport.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/202-pl2303_backport.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/203-hfsplus_fix.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/206-gcc_3.4_fixes.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/208-usb2_fix.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/209-build_fixes.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/210-fix-irq-serial.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/212-htb_time_fix.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/213-htb_disable_hysteresis.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/222-sound.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/224-atm_hotplug.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/225-string_lib_useful_exports.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/226-atm_br2684.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/227-jffs2_eofdetect.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/228-more_usb_fixes.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/229-pppoe_mtu_fix.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/601-netfilter_ipp2p_0.8.1rc1.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/602-netfilter_layer7_2.1nbd.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/603-netfilter_nat_pptp.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/604-netfilter_maxconn.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/605-netfilter_TTL.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/606-netfilter_NETMAP.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/607-netfilter_connmark.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/608-netfilter_ipset.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/609-netfilter_string.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/610-netfilter_connbytes.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/611-netfilter_condition.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/612-netfilter_quota.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/613-netfilter_nat_h323.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/614-netfilter_nat_rtsp.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/615-netfilter_nat_mms.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/616-netfilter_imq.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/617-netfilter_time.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/618-netfilter_multiport_backport.patch [new file with mode: 0644]
target/linux/generic-2.4/patches/700-multiple_default_gateways.patch [new file with mode: 0644]
target/linux/generic-2.6/files/init [new file with mode: 0755]
target/linux/generic-2.6/patches/000-reenable_devfs.patch [new file with mode: 0644]
target/linux/generic-2.6/patches/001-squashfs.patch [new file with mode: 0644]
target/linux/generic-2.6/patches/002-squashfs_lzma.patch [new file with mode: 0644]
target/linux/generic-2.6/patches/004-extra_optimization.patch [new file with mode: 0644]
target/linux/generic-2.6/patches/005-gcc4_fix.patch [new file with mode: 0644]
target/linux/generic-2.6/patches/006-gcc4_inline_fix.patch [new file with mode: 0644]
target/linux/generic-2.6/patches/010-disable_old_squashfs_compatibility.patch [new file with mode: 0644]
target/linux/generic-2.6/patches/011-mips_boot.patch [new file with mode: 0644]
target/linux/generic-2.6/patches/100-netfilter_layer7_2.1nbd.patch [new file with mode: 0644]
target/linux/generic-2.6/patches/101-ipp2p_0.8.1rc1.patch [new file with mode: 0644]
target/linux/generic-2.6/patches/102-openswan-2.4.0.kernel-2.6-natt.patch [new file with mode: 0644]
target/linux/generic-2.6/patches/103-netfilter-ipset.patch [new file with mode: 0644]
target/linux/generic-2.6/patches/105-netfilter_time.patch [new file with mode: 0644]
target/linux/generic-2.6/patches/106-netfilter_imq.patch [new file with mode: 0644]
target/linux/generic-2.6/patches/107-netfilter_nat_sip.patch [new file with mode: 0644]
target/linux/generic-2.6/patches/108-netfilter_route.patch [new file with mode: 0644]
target/linux/generic-2.6/patches/200-sched_esfq.patch [new file with mode: 0644]
target/linux/generic-2.6/patches/201-multiple_default_gateways.patch [new file with mode: 0644]
target/linux/generic-2.6/patches/202-mips-freestanding.patch [new file with mode: 0644]
target/linux/generic-2.6/patches/203-fix_initrd_duplication.patch [new file with mode: 0644]
target/linux/generic-2.6/patches/204-jffs2_eofdetect.patch [new file with mode: 0644]
target/linux/generic-2.6/patches/205-block2mtd_fix.patch [new file with mode: 0644]
target/linux/generic-2.6/patches/206-pppoe_mtu_fix.patch [new file with mode: 0644]
target/linux/magicbox-2.6/Makefile [new file with mode: 0644]
target/linux/magicbox-2.6/config [new file with mode: 0644]
target/linux/magicbox-2.6/patches/001-magicbox_support.patch [new file with mode: 0644]
target/linux/magicbox-2.6/patches/002-flash_map.patch [new file with mode: 0644]
target/linux/package/Config.in [new file with mode: 0644]
target/linux/package/Makefile [new file with mode: 0644]
target/linux/rb532-2.6/Makefile [new file with mode: 0644]
target/linux/rb532-2.6/config [new file with mode: 0644]
target/linux/rb532-2.6/patches/100-rb5xx_support.patch [new file with mode: 0644]
target/linux/rb532-2.6/patches/110-korina_ethernet.patch [new file with mode: 0644]
target/linux/rb532-2.6/patches/120-cf.patch [new file with mode: 0644]
target/linux/rb532-2.6/patches/130-custom_partitions.patch [new file with mode: 0644]
target/linux/rb532-2.6/patches/200-bridge_resource_hack.patch [new file with mode: 0644]
target/linux/rb532-2.6/patches/210-pci_fixes.patch [new file with mode: 0644]
target/linux/rb532-2.6/patches/220-serial_fix.patch [new file with mode: 0644]
target/linux/rb532-2.6/patches/230-dma_limit.patch [new file with mode: 0644]
target/linux/rb532-2.6/patches/240-via_rhine_performance.patch [new file with mode: 0644]
target/linux/sibyte-2.6/Makefile [new file with mode: 0644]
target/linux/sibyte-2.6/config [new file with mode: 0644]
target/linux/sibyte-2.6/patches/000-DUART.patch [new file with mode: 0644]
target/linux/sibyte-2.6/patches/001-bcm112x_ax.patch [new file with mode: 0644]
target/linux/uml-2.6/Makefile [new file with mode: 0644]
target/linux/uml-2.6/README [new file with mode: 0644]
target/linux/uml-2.6/config [new file with mode: 0644]
target/linux/x86-2.6/Makefile [new file with mode: 0644]
target/linux/x86-2.6/config [new file with mode: 0644]
target/linux/x86-2.6/patches/100-scx200_hr_timer.patch [new file with mode: 0644]
target/linux/xscale-2.6/Makefile [new file with mode: 0644]
target/linux/xscale-2.6/config [new file with mode: 0644]
target/linux/xscale-2.6/patches/001-gateway_7001.patch [new file with mode: 0644]
target/sdk/Config.in [new file with mode: 0644]
target/sdk/Makefile [new file with mode: 0644]
target/sdk/files/Makefile [new file with mode: 0644]
target/sdk/files/README.SDK [new file with mode: 0644]
target/sdk/files/package/depend.mk [new file with mode: 0644]
target/sdk/files/package/rules.mk [new file with mode: 0644]
target/utils/Makefile [new file with mode: 0644]
target/utils/src/addpattern.c [new file with mode: 0644]
target/utils/src/dgfirmware.c [new file with mode: 0644]
target/utils/src/motorola-bin.c [new file with mode: 0644]
target/utils/src/trx.c [new file with mode: 0644]
toolchain/Config.in [new file with mode: 0644]
toolchain/Makefile [new file with mode: 0644]
toolchain/binutils/Config.in [new file with mode: 0644]
toolchain/binutils/Makefile [new file with mode: 0644]
toolchain/binutils/patches/2.16.1/100-uclibc-conf.patch [new file with mode: 0644]
toolchain/binutils/patches/2.16.1/110-uclibc-libtool-conf.patch [new file with mode: 0644]
toolchain/binutils/patches/2.16.1/300-001_ld_makefile_patch.patch [new file with mode: 0644]
toolchain/binutils/patches/2.16.1/300-006_better_file_error.patch [new file with mode: 0644]
toolchain/binutils/patches/2.16.1/300-012_check_ldrunpath_length.patch [new file with mode: 0644]
toolchain/binutils/patches/2.16.1/702-binutils-skip-comments.patch [new file with mode: 0644]
toolchain/binutils/patches/2.17/100-uclibc-conf.patch [new file with mode: 0644]
toolchain/binutils/patches/2.17/110-arm-eabi-conf.patch [new file with mode: 0644]
toolchain/binutils/patches/2.17/300-001_ld_makefile_patch.patch [new file with mode: 0644]
toolchain/binutils/patches/2.17/300-006_better_file_error.patch [new file with mode: 0644]
toolchain/binutils/patches/2.17/300-012_check_ldrunpath_length.patch [new file with mode: 0644]
toolchain/binutils/patches/2.17/702-binutils-skip-comments.patch [new file with mode: 0644]
toolchain/binutils/patches/400-mips-ELF_MAXPAGESIZE-4k.patch [new file with mode: 0644]
toolchain/gcc/Config.in [new file with mode: 0644]
toolchain/gcc/Config.version [new file with mode: 0644]
toolchain/gcc/Makefile [new file with mode: 0644]
toolchain/gcc/patches/3.4.4/100-uclibc-conf.patch [new file with mode: 0644]
toolchain/gcc/patches/3.4.4/200-uclibc-locale.patch [new file with mode: 0644]
toolchain/gcc/patches/3.4.4/300-libstdc++-pic.patch [new file with mode: 0644]
toolchain/gcc/patches/3.4.4/601-gcc34-arm-ldm.patch [new file with mode: 0644]
toolchain/gcc/patches/3.4.4/602-sdk-libstdc++-includes.patch [new file with mode: 0644]
toolchain/gcc/patches/3.4.4/700-pr15068-fix.patch [new file with mode: 0644]
toolchain/gcc/patches/3.4.4/800-arm-bigendian.patch [new file with mode: 0644]
toolchain/gcc/patches/3.4.4/810-arm-bigendian-uclibc.patch [new file with mode: 0644]
toolchain/gcc/patches/3.4.4/830-gcc-bug-num-22167.patch [new file with mode: 0644]
toolchain/gcc/patches/3.4.4/arm-softfloat.patch.conditional [new file with mode: 0644]
toolchain/gcc/patches/3.4.5/100-uclibc-conf.patch [new file with mode: 0644]
toolchain/gcc/patches/3.4.5/200-uclibc-locale.patch [new file with mode: 0644]
toolchain/gcc/patches/3.4.5/300-libstdc++-pic.patch [new file with mode: 0644]
toolchain/gcc/patches/3.4.5/600-gcc34-arm-ldm-peephole.patch [new file with mode: 0644]
toolchain/gcc/patches/3.4.5/601-gcc34-arm-ldm-peephole2.patch [new file with mode: 0644]
toolchain/gcc/patches/3.4.5/601-gcc34-arm-ldm.patch [new file with mode: 0644]
toolchain/gcc/patches/3.4.5/602-sdk-libstdc++-includes.patch [new file with mode: 0644]
toolchain/gcc/patches/3.4.5/700-pr15068-fix.patch [new file with mode: 0644]
toolchain/gcc/patches/3.4.5/71_all_sh-pr16665-fix.patch [new file with mode: 0644]
toolchain/gcc/patches/3.4.5/72_all_sh-no-reorder-blocks.patch [new file with mode: 0644]
toolchain/gcc/patches/3.4.5/73_all_sh-pr20617.patch [new file with mode: 0644]
toolchain/gcc/patches/3.4.5/800-arm-bigendian.patch [new file with mode: 0644]
toolchain/gcc/patches/3.4.5/800-powerpc-libc_stack_end-uclibc.patch [new file with mode: 0644]
toolchain/gcc/patches/3.4.6-nonmips/001-non_mips.patch [new file with mode: 0644]
toolchain/gcc/patches/3.4.6-nonmips/100-uclibc-conf.patch [new file with mode: 0644]
toolchain/gcc/patches/3.4.6-nonmips/200-uclibc-locale.patch [new file with mode: 0644]
toolchain/gcc/patches/3.4.6-nonmips/300-libstdc++-pic.patch [new file with mode: 0644]
toolchain/gcc/patches/3.4.6-nonmips/601-gcc34-arm-ldm.patch [new file with mode: 0644]
toolchain/gcc/patches/3.4.6-nonmips/602-sdk-libstdc++-includes.patch [new file with mode: 0644]
toolchain/gcc/patches/3.4.6-nonmips/700-pr15068-fix.patch [new file with mode: 0644]
toolchain/gcc/patches/3.4.6-nonmips/800-arm-bigendian.patch [new file with mode: 0644]
toolchain/gcc/patches/3.4.6-nonmips/810-arm-bigendian-uclibc.patch [new file with mode: 0644]
toolchain/gcc/patches/3.4.6-nonmips/arm-softfloat.patch.conditional [new file with mode: 0644]
toolchain/gcc/patches/3.4.6/100-uclibc-conf.patch [new file with mode: 0644]
toolchain/gcc/patches/3.4.6/200-uclibc-locale.patch [new file with mode: 0644]
toolchain/gcc/patches/3.4.6/300-libstdc++-pic.patch [new file with mode: 0644]
toolchain/gcc/patches/3.4.6/601-gcc34-arm-ldm.patch [new file with mode: 0644]
toolchain/gcc/patches/3.4.6/602-sdk-libstdc++-includes.patch [new file with mode: 0644]
toolchain/gcc/patches/3.4.6/700-pr15068-fix.patch [new file with mode: 0644]
toolchain/gcc/patches/3.4.6/800-arm-bigendian.patch [new file with mode: 0644]
toolchain/gcc/patches/3.4.6/810-arm-bigendian-uclibc.patch [new file with mode: 0644]
toolchain/gcc/patches/3.4.6/arm-softfloat.patch.conditional [new file with mode: 0644]
toolchain/gcc/patches/4.0.2/100-uclibc-conf.patch [new file with mode: 0644]
toolchain/gcc/patches/4.0.2/200-uclibc-locale.patch [new file with mode: 0644]
toolchain/gcc/patches/4.0.3/100-uclibc-conf.patch [new file with mode: 0644]
toolchain/gcc/patches/4.0.3/200-uclibc-locale.patch [new file with mode: 0644]
toolchain/gcc/patches/4.0.3/300-libstdc++-pic.patch [new file with mode: 0644]
toolchain/gcc/patches/4.0.3/301-missing-execinfo_h.patch [new file with mode: 0644]
toolchain/gcc/patches/4.0.3/302-c99-snprintf.patch [new file with mode: 0644]
toolchain/gcc/patches/4.0.3/303-c99-complex-ugly-hack.patch [new file with mode: 0644]
toolchain/gcc/patches/4.0.3/602-sdk-libstdc++-includes.patch [new file with mode: 0644]
toolchain/gcc/patches/4.0.3/800-arm-bigendian.patch [new file with mode: 0644]
toolchain/gcc/patches/4.1.0/100-uclibc-conf.patch [new file with mode: 0644]
toolchain/gcc/patches/4.1.0/110-arm-eabi.patch [new file with mode: 0644]
toolchain/gcc/patches/4.1.0/200-uclibc-locale.patch [new file with mode: 0644]
toolchain/gcc/patches/4.1.0/300-libstdc++-pic.patch [new file with mode: 0644]
toolchain/gcc/patches/4.1.0/301-missing-execinfo_h.patch [new file with mode: 0644]
toolchain/gcc/patches/4.1.0/302-c99-snprintf.patch [new file with mode: 0644]
toolchain/gcc/patches/4.1.0/303-c99-complex-ugly-hack.patch [new file with mode: 0644]
toolchain/gcc/patches/4.1.0/602-sdk-libstdc++-includes.patch [new file with mode: 0644]
toolchain/gcc/patches/4.1.0/740-sh-pr24836.patch [new file with mode: 0644]
toolchain/gcc/patches/4.1.0/800-arm-bigendian.patch [new file with mode: 0644]
toolchain/gcc/patches/4.1.1/100-uclibc-conf.patch [new file with mode: 0644]
toolchain/gcc/patches/4.1.1/110-arm-eabi.patch [new file with mode: 0644]
toolchain/gcc/patches/4.1.1/200-uclibc-locale.patch [new file with mode: 0644]
toolchain/gcc/patches/4.1.1/300-libstdc++-pic.patch [new file with mode: 0644]
toolchain/gcc/patches/4.1.1/301-missing-execinfo_h.patch [new file with mode: 0644]
toolchain/gcc/patches/4.1.1/302-c99-snprintf.patch [new file with mode: 0644]
toolchain/gcc/patches/4.1.1/303-c99-complex-ugly-hack.patch [new file with mode: 0644]
toolchain/gcc/patches/4.1.1/304-index_macro.patch [new file with mode: 0644]
toolchain/gcc/patches/4.1.1/740-sh-pr24836.patch [new file with mode: 0644]
toolchain/gcc/patches/4.1.1/800-arm-bigendian.patch [new file with mode: 0644]
toolchain/gcc/patches/4.1.1/900-c++_fixes.patch [new file with mode: 0644]
toolchain/gdb/Config.in [new file with mode: 0644]
toolchain/gdb/Makefile [new file with mode: 0644]
toolchain/gdb/patches/100-uclibc-conf.patch [new file with mode: 0644]
toolchain/gdb/patches/200-uclibc-readline-conf.patch [new file with mode: 0644]
toolchain/gdb/patches/400-mips-coredump.patch [new file with mode: 0644]
toolchain/gdb/patches/500-thread-timeout.patch [new file with mode: 0644]
toolchain/gdb/patches/600-debian_10.selected-frame.patch [new file with mode: 0644]
toolchain/gdb/patches/620-debian_static-thread-db.patch [new file with mode: 0644]
toolchain/gdb/patches/630-debian_24.tracepoint-segv.patch [new file with mode: 0644]
toolchain/gdb/patches/640-debian_dwarf2-frame-signal-unwinder.patch [new file with mode: 0644]
toolchain/gdb/patches/650-debian_vsyscall-gdb-support.patch [new file with mode: 0644]
toolchain/gdb/patches/660-debian_dwarf-cfa-restore.patch [new file with mode: 0644]
toolchain/gdb/patches/680-debian_sim-destdir.patch [new file with mode: 0644]
toolchain/gdb/patches/690-debian_member-field-symtab.patch [new file with mode: 0644]
toolchain/gdb/patches/700-debian_cp-pass-by-reference.patch [new file with mode: 0644]
toolchain/gdb/patches/710-debian_thread-db-multiple-libraries.patch [new file with mode: 0644]
toolchain/gdb/patches/720-debian_static-threads-test.patch [new file with mode: 0644]
toolchain/gdb/patches/730-debian_gdb-fix-tracefork-check.patch [new file with mode: 0644]
toolchain/gdb/patches/740-debian_make-cv-type-crash.patch [new file with mode: 0644]
toolchain/gdb/patches/750-debian_sparc-singlestep.patch [new file with mode: 0644]
toolchain/gdb/patches/760-debian_vsyscall-bfd-close-result.patch [new file with mode: 0644]
toolchain/gdb/patches/770-debian_vfork-done-spelling.patch [new file with mode: 0644]
toolchain/gdb/patches/780-debian_gdbserver-rdynamic.patch [new file with mode: 0644]
toolchain/gdb/patches/790-debian_dwarf2-cfi-warning.patch [new file with mode: 0644]
toolchain/gdb/patches/800-debian_linux-use-underscore-exit.patch [new file with mode: 0644]
toolchain/gdb/patches/810-debian_bfd-no-kylix-crash.patch [new file with mode: 0644]
toolchain/gdb/patches/820-debian_disable-linux-fork-messages.patch [new file with mode: 0644]
toolchain/kernel-headers/Makefile [new file with mode: 0644]
toolchain/kernel-headers/files/config.arm [new file with mode: 0644]
toolchain/kernel-headers/files/config.i386 [new file with mode: 0644]
toolchain/kernel-headers/files/config.mips [new file with mode: 0644]
toolchain/kernel-headers/files/config.ppc [new file with mode: 0644]
toolchain/kernel-headers/patches/include.patch [new file with mode: 0644]
toolchain/libnotimpl/Makefile [new file with mode: 0644]
toolchain/libnotimpl/src/math.c [new file with mode: 0644]
toolchain/uClibc/Makefile [new file with mode: 0644]
toolchain/uClibc/config/armeb [new file with mode: 0644]
toolchain/uClibc/config/i386 [new file with mode: 0644]
toolchain/uClibc/config/mips [new file with mode: 0644]
toolchain/uClibc/config/mipsel [new file with mode: 0644]
toolchain/uClibc/config/powerpc [new file with mode: 0644]
toolchain/uClibc/patches/100-signal_handler_crash_workaround.patch [new file with mode: 0644]
toolchain/uClibc/patches/110-mips_pipe.patch [new file with mode: 0644]
toolchain/uClibc/patches/120-more_standard_math.patch [new file with mode: 0644]
toolchain/uClibc/patches/130-ppc_gcc4_fix.patch [new file with mode: 0644]
toolchain/uClibc/patches/140-ipv6_missing_sockopts.patch [new file with mode: 0644]
toolchain/uClibc/patches/150-portability.patch [new file with mode: 0644]
tools/Makefile [new file with mode: 0644]
tools/ext2fs/Makefile [new file with mode: 0644]
tools/include/byteswap.h [new file with mode: 0644]
tools/include/endian.h [new file with mode: 0644]
tools/include/getline.h [new file with mode: 0644]
tools/ipkg-utils/Makefile [new file with mode: 0644]
tools/ipkg-utils/patches/100-build_clean.patch [new file with mode: 0644]
tools/ipkg-utils/patches/110-buildpackage.patch [new file with mode: 0644]
tools/ipkg-utils/patches/120-build_tar.patch [new file with mode: 0644]
tools/ipkg-utils/patches/130-tar_wildcards.patch [new file with mode: 0644]
tools/ipkg-utils/patches/140-portability.patch [new file with mode: 0644]
tools/lzma/Makefile [new file with mode: 0644]
tools/lzma/patches/100-lzma_zlib.patch [new file with mode: 0644]
tools/mkimage/Makefile [new file with mode: 0644]
tools/mkimage/src/crc32.c [new file with mode: 0644]
tools/mkimage/src/image.h [new file with mode: 0644]
tools/mkimage/src/mkimage.c [new file with mode: 0644]
tools/mtd-utils/Makefile [new file with mode: 0644]
tools/mtd-utils/patches/100-gcc4_fix.patch [new file with mode: 0644]
tools/mtd-utils/patches/110-portability_fix.patch [new file with mode: 0644]
tools/sed/Makefile [new file with mode: 0644]
tools/squashfs/Makefile [new file with mode: 0644]
tools/squashfs/patches/100-lzma.patch [new file with mode: 0644]
tools/sstrip/Makefile [new file with mode: 0644]
tools/sstrip/include/elf.h [new file with mode: 0644]
tools/sstrip/src/sstrip.c [new file with mode: 0644]

diff --git a/BSDmakefile b/BSDmakefile
new file mode 100644 (file)
index 0000000..f6f0cad
--- /dev/null
@@ -0,0 +1,2 @@
+world ${.TARGETS}:
+       @gmake $@
diff --git a/Config.in b/Config.in
new file mode 100644 (file)
index 0000000..74b3696
--- /dev/null
+++ b/Config.in
@@ -0,0 +1,101 @@
+#
+
+mainmenu "OpenWrt Configuration"
+
+config HAVE_DOT_CONFIG
+       bool
+       default y
+
+source "target/Config.in"
+
+config ALL
+       bool "Select all packages by default"
+       default n
+
+menuconfig DEVEL
+       bool "Advanced configuration options (for developers)"
+       default n
+       select BUILDOPTS
+       select TOOLCHAINOPTS if !NATIVE_TOOLCHAIN
+
+config BROKEN
+       bool "Show broken platforms / packages" if DEVEL
+       default n
+
+menuconfig BUILDOPTS
+       bool "Build Options" if DEVEL
+
+config AUTOREBUILD
+       bool
+       prompt "Automatic rebuild of packages" if BUILDOPTS
+       default y
+       help
+               Automatically rebuild packages when their files change
+
+config TAR_VERBOSITY
+       bool 
+       prompt "Tar verbose" if BUILDOPTS
+       default n
+
+config JLEVEL
+       int
+       prompt "Number of jobs to run simultaneously" if BUILDOPTS
+       default "1"
+       help
+           Number of jobs to run simultanesouly
+
+config CCACHE
+       bool
+       prompt "Use ccache" if BUILDOPTS
+       default n
+       help
+               Compiler cache; see http://ccache.samba.org/
+
+source "toolchain/Config.in"
+source "target/sdk/Config.in"
+
+menu "Target Images"
+       config TARGET_ROOTFS_INITRAMFS
+               bool "ramdisk"
+               default n
+               depends LINUX_2_6
+               help
+                 Embed the rootfs into the kernel (initramfs)
+
+       config TARGET_ROOTFS_JFFS2
+               bool "jffs2"
+               default y if USES_JFFS2
+               depends !TARGET_ROOTFS_INITRAMFS
+               help
+                 Build a jffs2 root filesystem
+
+       config TARGET_ROOTFS_SQUASHFS
+               bool "squashfs"
+               default y if USES_SQUASHFS
+               depends !TARGET_ROOTFS_INITRAMFS
+               help
+                 Build a squashfs-lzma root filesystem
+
+       config TARGET_ROOTFS_TGZ
+               bool "tgz"
+               default y if !USES_SQUASHFS && !USES_JFFS2
+               depends !TARGET_ROOTFS_INITRAMFS
+               help
+                 Build a compressed tar archive of the the root filesystem
+                 
+       config TARGET_ROOTFS_EXT2FS
+               bool "ext2"
+               default y if !USES_SQUASHFS && !USES_JFFS2
+               depends !TARGET_ROOTFS_INITRAMFS
+               help
+                 Ext2 file system with some free space for uml images
+
+comment "Image Options"
+
+source "target/image/*/Config.in"
+
+endmenu
+
+source "target/linux/Config.in"
+source ".config.in"
+
diff --git a/LICENSE b/LICENSE
new file mode 100644 (file)
index 0000000..d60c31a
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,340 @@
+                   GNU GENERAL PUBLIC LICENSE
+                      Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                           Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+\f
+                   GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+\f
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+\f
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+\f
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+                           NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+                    END OF TERMS AND CONDITIONS
+\f
+           How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    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; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year  name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..39ffb17
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,141 @@
+# Makefile for OpenWrt
+#
+# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006 by Felix Fietkau <openwrt@nbd.name>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+RELEASE:=Kamikaze
+#VERSION:=2.0 # uncomment for final release
+
+#--------------------------------------------------------------
+# Just run 'make menuconfig', configure stuff, then run 'make'.
+# You shouldn't need to mess with anything beyond this point...
+#--------------------------------------------------------------
+
+all: world
+
+SHELL:=/usr/bin/env bash
+export TOPDIR=${shell pwd}
+include $(TOPDIR)/include/verbose.mk
+
+OPENWRTVERSION:=$(RELEASE)
+ifneq ($(VERSION),)
+  OPENWRTVERSION:=$(VERSION) ($(OPENWRTVERSION))
+else
+  REV:=$(shell LANG=C svn info | awk '/^Revision:/ { print$$2 }' )
+  ifneq ($(REV),)
+    OPENWRTVERSION:=$(OPENWRTVERSION)/r$(REV)
+  endif
+endif
+export OPENWRTVERSION
+
+ifneq ($(shell ./scripts/timestamp.pl -p .pkginfo package Makefile),.pkginfo)
+  .pkginfo .config: FORCE
+endif
+
+ifeq ($(FORCE),)
+  .config scripts/config/conf scripts/config/mconf: .prereq-build
+  world: .prereq-packages
+endif
+
+.pkginfo:
+       @echo Collecting package info...
+       @-for dir in package/*/; do \
+               echo Source-Makefile: $${dir}Makefile; \
+               $(NO_TRACE_MAKE) --no-print-dir DUMP=1 -C $$dir || echo "ERROR: please fix $${dir}Makefile" >&2; \
+       done > $@
+
+pkginfo-clean: FORCE
+       -rm -f .pkginfo .config.in
+
+.config.in: .pkginfo
+       @./scripts/gen_menuconfig.pl < $< > $@ || rm -f $@
+
+.config: ./scripts/config/conf .config.in
+       @[ -f .config ] || $(NO_TRACE_MAKE) menuconfig
+       @$< -D .config Config.in &> /dev/null
+
+scripts/config/mconf:
+       @$(MAKE) -C scripts/config all
+
+scripts/config/conf:
+       @$(MAKE) -C scripts/config conf
+
+config: scripts/config/conf .config.in FORCE
+       $< Config.in
+
+config-clean: FORCE
+       $(NO_TRACE_MAKE) -C scripts/config clean
+
+defconfig: scripts/config/conf .config.in FORCE
+       touch .config
+       $< -D .config Config.in
+
+oldconfig: scripts/config/conf .config.in FORCE
+       $< -o Config.in
+
+menuconfig: scripts/config/mconf .config.in FORCE
+       $< Config.in
+
+package/%: .pkginfo FORCE
+       $(MAKE) -C package $(patsubst package/%,%,$@)
+
+target/%: .pkginfo FORCE
+       $(MAKE) -C target $(patsubst target/%,%,$@)
+
+tools/%: FORCE
+       $(MAKE) -C tools $(patsubst tools/%,%,$@)
+
+toolchain/%: FORCE
+       $(MAKE) -C toolchain $(patsubst toolchain/%,%,$@)
+
+.prereq-build: include/prereq-build.mk
+       @$(NO_TRACE_MAKE) -s -f $(TOPDIR)/include/prereq-build.mk prereq 2>/dev/null || { \
+               echo "Prerequisite check failed. Use FORCE=1 to override."; \
+               rm -rf $(TOPDIR)/tmp; \
+               false; \
+       }
+       @rm -rf $(TOPDIR)/tmp
+       @touch $@
+
+.prereq-packages: include/prereq.mk .pkginfo .config
+       @$(NO_TRACE_MAKE) -s -C package prereq 2>/dev/null || { \
+               echo "Prerequisite check failed. Use FORCE=1 to override."; \
+               false; \
+       }
+       @rm -rf "$(TOPDIR)/tmp"
+       @touch $@
+       
+prereq: .prereq-build .prereq-packages FORCE
+
+download: .config FORCE
+       $(MAKE) tools/download
+       $(MAKE) toolchain/download
+       $(MAKE) package/download
+       $(MAKE) target/download
+
+world: .config FORCE
+       $(MAKE) tools/install
+       $(MAKE) toolchain/install
+       $(MAKE) target/compile
+       $(MAKE) package/compile
+       $(MAKE) package/install
+       $(MAKE) target/install
+       $(MAKE) package/index
+
+clean: FORCE
+       rm -rf build_* bin
+
+dirclean: clean
+       rm -rf staging_dir_* toolchain_build_* tool_build
+
+distclean: dirclean config-clean
+       rm -rf dl .*config* .pkg* .prereq 
+
+.SILENT: clean dirclean distclean config-clean download world
+FORCE: ;
+.PHONY: FORCE
+%: ;
diff --git a/README b/README
new file mode 100644 (file)
index 0000000..2bba6fa
--- /dev/null
+++ b/README
@@ -0,0 +1,24 @@
+This is the buildsystem for the OpenWrt Linux distribution
+
+Please use "make menuconfig" to configure your appreciated
+configuration for the toolchain and firmware.
+
+You need to have installed gcc, binutils, patch, bzip2, flex, bison,
+make, gettext, pkg-config, unzip, libz-dev and libc headers.
+
+Simply running 'make' will build your firmware.
+It will download all sources, build the cross-compile toolchain, 
+the kernel and all choosen applications.
+
+You can use scripts/flash.sh for remotely updating your embedded system
+via tftp.
+
+The buildroot system is documented in docs/buildroot-documentation.html.
+
+Building your own firmware you need to have access to a Linux system.
+
+Sunshine!
+       Your OpenWrt Project
+       http://openwrt.org
+
+
diff --git a/docs/config.txt b/docs/config.txt
new file mode 100644 (file)
index 0000000..5988158
--- /dev/null
@@ -0,0 +1,72 @@
+       == Structure of the configuration files ==
+
+The config files are divided into sections and options/values.
+
+Every section has a type, but does not necessarily have a name.
+Every option has a name and a value and is assigned to the section
+it was written under.
+
+Syntax:
+
+config <type> [<name>]                 # Section
+       option <name>   <value>         # Option
+
+
+Every parameter needs to be a single string and is formatted exactly
+like a parameter for a shell function. The same rules for Quoting and 
+special characters also apply, as it is parsed by the shell.
+
+
+
+       == Parsing configuration files in custom scripts ==
+
+To be able to load configuration files, you need to include the common 
+functions with:
+
+. /etc/functions.sh
+
+Then you can use config_load <name> to load config files. The function 
+first checks for <name> as absolute filename and falls back to loading 
+it from /etc/config (which is the most common way of using it).
+
+If you want to use special callbacks for sections and/or options, you
+need to define the following shell functions before running config_load
+(after including /etc/functions.sh):
+
+config_cb() {
+       local type="$1"
+       local name="$2"
+       # commands to be run for every section
+}
+
+option_cb() {
+       # commands to be run for every option
+}
+
+You can also alter option_cb from config_cb based on the section type.
+This allows you to process every single config section based on its type
+individually.
+
+config_cb is run every time a new section starts (before options are being
+processed). You can access the last section through the CONFIG_SECTION
+variable. Also an extra call to config_cb (without a new section) is generated
+after config_load is done.
+That allows you to process sections both before and after all options were
+processed.
+
+You can access already processed options with the config_get command
+Syntax:
+
+config_get <section> <option>            # prints the value of the option
+config_get <variable> <section> <option> # stores the value inside the variable
+
+In busybox ash the three-option config_get is faster, because it does not
+result in an extra fork, so it is the preferred way.
+
+Additionally you can also modify or add options to sections by using the 
+config_set command.
+
+Syntax:
+
+config_set <section> <option> <value>
+
diff --git a/docs/network-scripts.txt b/docs/network-scripts.txt
new file mode 100644 (file)
index 0000000..024161b
--- /dev/null
@@ -0,0 +1,52 @@
+       Structure of the network scripts in buildroot-ng
+
+
+1) Usage
+
+To be able to access the network functions, you need to include
+the necessary shell scripts by running:
+
+. /etc/functions.sh      # common functions
+include /lib/network     # include /lib/network/*.sh
+scan_interfaces          # read and parse the network config
+
+Some protocols, such as PPP might change the configured interface names
+at run time (e.g. eth0 => ppp0 for PPPoE). That's why you have to run
+scan_interfaces instead of reading the values from the config directly.
+After running scan_interfaces, the 'ifname' option will always contain
+the effective interface name (which is used for IP traffic) and if the
+physical device name differs from it, it will be stored in the 'device'
+option.
+That means that running 'config_get lan ifname' after scan_interfaces
+might not return the same result as running it before.
+
+After running scan_interfaces, the following functions are available:
+
+- find_config <interface> looks for a network configuration that includes
+  the specified network interface.
+
+- setup_interface <interface> [<config>] [<protocol>] will set up the
+  specified interface, optionally overriding the network configuration
+  name or the protocol that it uses.
+
+
+
+2) Writing protocol handlers
+
+You can add custom protocol handlers by adding shell scripts to
+/lib/network. They provide the following two shell functions:
+
+scan_<protocolname>() {
+       local config="$1"
+       # change the interface names if necessary
+}
+
+setup_interface_<protocolname>() {
+       local interface="$1"
+       local config="$2"
+       # set up the interface
+}
+
+scan_<protocolname> is optional and only necessary if your protocol
+uses a custom device, e.g. a tunnel or a PPP device.
+
diff --git a/docs/network.txt b/docs/network.txt
new file mode 100644 (file)
index 0000000..69dbaa6
--- /dev/null
@@ -0,0 +1,79 @@
+       Network configuration in buildroot-ng
+
+
+The network configuration in buildroot-ng is stored in /etc/config/network
+and is divided into interface configurations.
+Each interface configuration either refers directly to an ethernet/wifi
+interface (eth0, wl0, ..) or to a bridge containing multiple interfaces.
+It looks like this:
+
+       config interface        "lan"
+               option ifname   "eth0"
+               option proto    "static"
+               option ipaddr   "192.168.1.1"
+               option netmask  "255.255.255.0"
+               option gateway  "192.168.1.254"
+               option dns              "192.168.1.254"
+
+"ifname" specifies the Linux interface name.
+If you want to use bridging on one or more interfaces, set "ifname" to a list
+of interfaces and add:
+               option type     "bridge"
+
+It is possible to use VLAN tagging on an interface simply by adding the VLAN IDs
+to it, e.g. "eth0.1". These can be nested as well.
+
+This sets up a simple static configuration for eth0. "proto" specifies the
+'protocol' used for the interface. The default image usually provides 'none'
+'static', 'dhcp' and 'pppoe'. Others can be added by installing additional
+packages.
+
+When using the 'static' method like in the example, the  options "ipaddr" and 
+"netmask" are mandatory, while "gateway" and "dns" are optional.
+DHCP currently only accepts "ipaddr" (IP address to request from the server)
+and "hostname" (client hostname identify as) - both are optional.
+
+PPP based protocols (pppoe, pptp, ...) accept these options:
+       username:
+               The PPP username (usually with PAP authentication)
+       password:
+               The PPP password
+       keepalive:
+               Ping the PPP server (using LCP). The value of this option
+               specifies the maximum number of failed pings before reconnecting.
+               The ping interval defaults to 5, but can be changed by appending 
+               ",<interval>" to the keepalive value
+       demand:
+               Use Dial on Demand (value specifies the maximum idle time)
+               
+       (pptp)
+       server: The remote pptp server IP
+
+For all protocol types, you can also specify the MTU by using the "mtu" option.
+
+
+
+
+       Setting up the switch (currently broadcom only)
+
+
+The switch configuration is set by adding a 'switch' config section.
+Example: 
+
+       config switch eth0
+               option vlan0 "1 2 3 4 5*"
+               option vlan1 "0 5"
+
+On Broadcom hardware the section name needs to be eth0, as the switch driver
+does not detect the switch on any other physical device.
+Every vlan option needs to have the name vlan<n> where <n> is the VLAN number
+as used in the switch driver.
+As value it takes a list of ports with these optional suffixes:
+
+       '*': Set the default VLAN (PVID) of the Port to the current VLAN
+       'u': Force the port to be untagged
+       't': Force the port to be tagged
+
+The CPU port defaults to tagged, all other ports to untagged.
+On Broadcom hardware the CPU port is always 5. The other ports may vary with 
+different hardware.
diff --git a/include/host-build.mk b/include/host-build.mk
new file mode 100644 (file)
index 0000000..a1287da
--- /dev/null
@@ -0,0 +1,123 @@
+# 
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(INCLUDE_DIR)/host.mk
+
+ifneq ($(strip $(PKG_CAT)),)
+  ifeq ($(PKG_CAT),unzip)
+    UNPACK=unzip -d $(PKG_BUILD_DIR) $(DL_DIR)/$(PKG_SOURCE)
+  else
+    UNPACK=$(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(PKG_BUILD_DIR)/.. $(TAR_OPTIONS) -
+  endif
+  define Build/Prepare/Default
+       $(UNPACK)
+       @if [ -d ./patches ]; then \
+               $(PATCH) $(PKG_BUILD_DIR) ./patches; \
+       fi
+  endef
+endif
+
+define Build/Prepare
+  $(call Build/Prepare/Default)
+endef
+
+define Build/Configure/Default
+       @(cd $(PKG_BUILD_DIR)/$(3); \
+       [ -x configure ] && \
+               $(2) \
+               CPPFLAGS="-I$(STAGING_DIR)/host/include" \
+               LDFLAGS="-L$(STAGING_DIR)/host/lib" \
+               ./configure \
+               --target=$(GNU_TARGET_NAME) \
+               --host=$(GNU_TARGET_NAME) \
+               --build=$(GNU_HOST_NAME) \
+               --program-prefix="" \
+               --program-suffix="" \
+               --prefix=/usr \
+               --exec-prefix=/usr \
+               --bindir=/usr/bin \
+               --sbindir=/usr/sbin \
+               --libexecdir=/usr/lib \
+               --sysconfdir=/etc \
+               --datadir=/usr/share \
+               --localstatedir=/var \
+               --mandir=/usr/man \
+               --infodir=/usr/info \
+               $(DISABLE_NLS) \
+               $(1); \
+               true; \
+       )
+endef
+
+define Build/Configure
+  $(call Build/Configure/Default)
+endef
+
+define Build/Compile/Default
+       $(MAKE) -C $(PKG_BUILD_DIR) $(1)
+endef
+
+define Build/Compile
+  $(call Build/Compile/Default)
+endef
+
+               
+ifneq ($(strip $(PKG_SOURCE)),)
+  download: $(DL_DIR)/$(PKG_SOURCE)
+
+  $(DL_DIR)/$(PKG_SOURCE):
+       mkdir -p $(DL_DIR)
+       $(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(PKG_SOURCE)" "$(PKG_MD5SUM)" $(PKG_SOURCE_URL)
+
+  $(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE)
+endif
+
+define HostBuild
+  $(PKG_BUILD_DIR)/.prepared:
+       @-rm -rf $(PKG_BUILD_DIR)
+       @mkdir -p $(PKG_BUILD_DIR)
+       $(call Build/Prepare)
+       touch $$@
+
+  $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
+       $(call Build/Configure)
+       touch $$@
+
+  $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured
+       $(call Build/Compile)
+       touch $$@
+
+  $(STAGING_DIR)/stampfiles/.host_$(PKG_NAME)-installed: $(PKG_BUILD_DIR)/.built
+       $(call Build/Install)
+       touch $$@
+       
+  ifdef Build/Install
+    install-targets: $(STAGING_DIR)/stampfiles/.host_$(PKG_NAME)-installed
+  endif
+
+  package-clean: FORCE
+       $(call Build/Clean)
+       $(call Build/Uninstall)
+       rm -f $(STAGING_DIR)/stampfiles/.host_$(PKG_NAME)-installed
+
+  download:
+  prepare: $(PKG_BUILD_DIR)/.prepared
+  configure: $(PKG_BUILD_DIR)/.configured
+
+  compile-targets: $(PKG_BUILD_DIR)/.built
+  compile: compile-targets
+
+  install-targets:
+  install: install-targets
+
+  clean-targets:
+  clean: FORCE
+       @$(MAKE) clean-targets
+       $(call Build/Clean)
+       rm -rf $(PKG_BUILD_DIR)
+
+endef
diff --git a/include/host.mk b/include/host.mk
new file mode 100644 (file)
index 0000000..3a5fd96
--- /dev/null
@@ -0,0 +1,31 @@
+# 
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/.host.mk
+
+export TAR
+
+$(TOPDIR)/.host.mk: $(INCLUDE_DIR)/host.mk
+       @( \
+               HOST_OS=`uname`; \
+               case "$$HOST_OS" in \
+                       Linux) HOST_ARCH=`uname -m`;; \
+                       *) HOST_ARCH=`uname -p`;; \
+               esac; \
+               GNU_HOST_NAME=`gcc -dumpmachine`; \
+               [ -n "$$GNU_HOST_NAME" ] || \
+                       GNU_HOST_NAME=`$(SCRIPT_DIR)/config.guess`; \
+               echo "HOST_OS:=$$HOST_OS" > $@; \
+               echo "HOST_ARCH:=$$HOST_ARCH" >> $@; \
+               echo "GNU_HOST_NAME:=$$GNU_HOST_NAME" >> $@; \
+               if tar --version 2>&1 | grep 'GNU' >/dev/null; then \
+                       echo "TAR_WILDCARDS:=--wildcards" >> $@; \
+               fi; \
+               TAR=`which gtar tar | head -n 1`; \
+               echo "TAR:=$$TAR" >> $@; \
+       )
+
diff --git a/include/image.mk b/include/image.mk
new file mode 100644 (file)
index 0000000..0651679
--- /dev/null
@@ -0,0 +1,96 @@
+# 
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)
+
+ifneq ($(CONFIG_BIG_ENDIAN),y)
+JFFS2OPTS     :=  --pad --little-endian --squash
+SQUASHFS_OPTS :=  -le
+else
+JFFS2OPTS     :=  --pad --big-endian --squash
+SQUASHFS_OPTS :=  -be
+endif
+
+ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
+  ifeq ($(CONFIG_TARGET_ROOTFS_JFFS2),y)
+    define Image/mkfs/jffs2
+               rm -rf $(BUILD_DIR)/root/jffs
+               
+               $(STAGING_DIR)/bin/mkfs.jffs2 $(JFFS2OPTS) -e 0x10000 -o $(KDIR)/root.jffs2-64k -d $(BUILD_DIR)/root
+               $(STAGING_DIR)/bin/mkfs.jffs2 $(JFFS2OPTS) -e 0x20000 -o $(KDIR)/root.jffs2-128k -d $(BUILD_DIR)/root
+
+               # add End-of-Filesystem markers
+               echo -ne '\xde\xad\xc0\xde' >> $(KDIR)/root.jffs2-64k
+               echo -ne '\xde\xad\xc0\xde' >> $(KDIR)/root.jffs2-128k
+       
+               $(call Image/Build,jffs2-64k)
+               $(call Image/Build,jffs2-128k)
+    endef
+  endif
+    
+  ifeq ($(CONFIG_TARGET_ROOTFS_SQUASHFS),y)
+    define Image/mkfs/squashfs
+               @mkdir -p $(BUILD_DIR)/root/jffs
+               $(STAGING_DIR)/bin/mksquashfs-lzma $(BUILD_DIR)/root $(KDIR)/root.squashfs -nopad -noappend -root-owned $(SQUASHFS_OPTS)
+               $(call Image/Build,squashfs)
+    endef
+  endif
+    
+  ifeq ($(CONFIG_TARGET_ROOTFS_TGZ),y)
+    define Image/mkfs/tgz
+               tar -zcf $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-rootfs.tgz --owner=root --group=root -C $(BUILD_DIR)/root/ .
+    endef
+  endif
+  
+  
+endif
+
+ifeq ($(CONFIG_TARGET_ROOTFS_EXT2FS),y)
+  define Image/mkfs/ext2
+               $(STAGING_DIR)/bin/genext2fs -q -b 8192 -I 1500 -d $(BUILD_DIR)/root/ $(KDIR)/root.ext2
+               $(call Image/Build,ext2)
+  endef
+endif
+
+
+define Image/mkfs/prepare/default
+       find $(BUILD_DIR)/root -type f -not -perm +0100 | xargs chmod 0644
+       find $(BUILD_DIR)/root -type f -perm +0100 | xargs chmod 0755
+       find $(BUILD_DIR)/root -type d | xargs chmod 0755
+       mkdir -p $(BUILD_DIR)/root/tmp
+       chmod 0777 $(BUILD_DIR)/root/tmp
+endef
+
+define Image/mkfs/prepare
+       $(call Image/mkfs/prepare/default)
+endef
+
+define BuildImage
+compile:
+       $(call Build/Compile)
+
+install:
+       $(call Image/Prepare)
+       $(call Image/mkfs/prepare)
+       $(call Image/BuildKernel)
+       $(call Image/mkfs/jffs2)
+       $(call Image/mkfs/squashfs)
+       $(call Image/mkfs/tgz)
+       $(call Image/mkfs/ext2)
+       
+clean:
+       $(call Build/Clean)
+endef
+
+compile-targets:
+install-targets:
+clean-targets:
+
+download:
+prepare:
+compile: compile-targets
+install: compile install-targets
+clean: clean-targets
diff --git a/include/kernel-build.mk b/include/kernel-build.mk
new file mode 100644 (file)
index 0000000..5544a82
--- /dev/null
@@ -0,0 +1,145 @@
+# 
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(INCLUDE_DIR)/host.mk
+-include $(INCLUDE_DIR)/modules-$(KERNEL).mk
+
+LINUX_SOURCE:=linux-$(LINUX_VERSION).tar.bz2
+LINUX_SITE=http://www.us.kernel.org/pub/linux/kernel/v$(KERNEL) \
+           http://www.us.kernel.org/pub/linux/kernel/v$(KERNEL) \
+           http://www.kernel.org/pub/linux/kernel/v$(KERNEL) \
+           http://www.de.kernel.org/pub/linux/kernel/v$(KERNEL)
+
+KERNEL_IDIR:=$(KERNEL_BUILD_DIR)/kernel-ipkg
+KERNEL_IPKG:=$(KERNEL_BUILD_DIR)/kernel_$(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)_$(ARCH).ipk
+TARGETS += $(KERNEL_IPKG)
+INSTALL_TARGETS += $(KERNEL_IPKG)
+
+LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \
+       -e 's/mipsel/mips/' \
+       -e 's/mipseb/mips/' \
+       -e 's/powerpc/ppc/' \
+       -e 's/sh[234]/sh/' \
+       -e 's/armeb/arm/' \
+)
+
+
+$(TARGETS): $(PACKAGE_DIR)
+
+$(PACKAGE_DIR):
+       mkdir -p $@
+
+$(DL_DIR)/$(LINUX_SOURCE):
+       -mkdir -p $(DL_DIR)
+       $(SCRIPT_DIR)/download.pl $(DL_DIR) $(LINUX_SOURCE) $(LINUX_KERNEL_MD5SUM) $(LINUX_SITE)
+
+$(LINUX_DIR)/.unpacked: $(DL_DIR)/$(LINUX_SOURCE)
+       -mkdir -p $(KERNEL_BUILD_DIR)
+       bzcat $(DL_DIR)/$(LINUX_SOURCE) | tar -C $(KERNEL_BUILD_DIR) $(TAR_OPTIONS) -
+       touch $@
+
+ifeq ($(KERNEL),2.4)
+$(LINUX_DIR)/.configured: $(LINUX_DIR)/.patched
+       $(SED) "s,\-mcpu=,\-mtune=,g;" $(LINUX_DIR)/arch/mips/Makefile
+       $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(KERNEL_CC)" ARCH=$(LINUX_KARCH) oldconfig include/linux/compile.h include/linux/version.h
+       touch $@
+
+$(LINUX_DIR)/.depend_done: $(LINUX_DIR)/.configured
+       $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) dep
+       touch $@
+
+$(LINUX_DIR)/vmlinux: $(LINUX_DIR)/.depend_done
+else
+$(LINUX_DIR)/.configured: $(LINUX_DIR)/.patched
+       $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(KERNEL_CC)" ARCH=$(LINUX_KARCH) oldconfig prepare scripts
+       touch $@
+endif
+
+ramdisk-config: $(LINUX_DIR)/.configured FORCE
+       mv $(LINUX_DIR)/.config $(LINUX_DIR)/.config.old
+       grep -v INITRAMFS $(LINUX_DIR)/.config.old > $(LINUX_DIR)/.config
+ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
+       echo 'CONFIG_INITRAMFS_SOURCE="../../root"' >> $(LINUX_DIR)/.config
+       echo 'CONFIG_INITRAMFS_ROOT_UID=0' >> $(LINUX_DIR)/.config
+       echo 'CONFIG_INITRAMFS_ROOT_GID=0' >> $(LINUX_DIR)/.config
+       mkdir -p $(BUILD_DIR)/root/etc/init.d
+       $(CP) ../generic-2.6/files/init $(BUILD_DIR)/root/
+else
+       rm -f $(BUILD_DIR)/root/init $(BUILD_DIR)/root/etc/init.d/S00initramfs
+       echo 'CONFIG_INITRAMFS_SOURCE=""' >> $(LINUX_DIR)/.config
+endif
+
+$(LINUX_DIR)/vmlinux: $(LINUX_DIR)/.linux-compile pkg-install ramdisk-config
+       $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(KERNEL_CC)" ARCH=$(LINUX_KARCH) $(KERNELNAME)
+
+$(LINUX_KERNEL): $(LINUX_DIR)/vmlinux
+       $(KERNEL_CROSS)objcopy -O binary -R .reginfo -R .note -R .comment -R .mdebug -S $< $@
+       touch -c $(LINUX_KERNEL)
+
+$(LINUX_DIR)/.modules_done:
+       rm -rf $(KERNEL_BUILD_DIR)/modules
+       $(MAKE) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(KERNEL_CC)" ARCH=$(LINUX_KARCH) modules
+       $(MAKE) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(KERNEL_CC)" ARCH=$(LINUX_KARCH) DEPMOD=true INSTALL_MOD_PATH=$(KERNEL_BUILD_DIR)/modules modules_install
+       touch $(LINUX_DIR)/.modules_done
+
+modules: $(LINUX_DIR)/.modules_done
+packages: $(TARGETS)
+
+$(LINUX_DIR)/.linux-compile:
+       @rm -f $(BUILD_DIR)/linux
+       ln -sf $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION) $(BUILD_DIR)/linux
+       @$(MAKE) modules
+       touch $@
+
+$(KERNEL_IPKG):
+       rm -rf $(KERNEL_IDIR)
+       mkdir -p $(KERNEL_IDIR)/etc
+       $(SCRIPT_DIR)/make-ipkg-dir.sh $(KERNEL_IDIR) ../control/kernel.control $(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE) $(ARCH)
+       if [ -f ./config/$(BOARD).modules ]; then \
+               cp ./config/$(BOARD).modules $(KERNEL_IDIR)/etc/modules; \
+       fi
+       $(IPKG_BUILD) $(KERNEL_IDIR) $(KERNEL_BUILD_DIR)
+
+$(TOPDIR)/.kernel.mk: $(TOPDIR)/target/linux/$(BOARD)-$(KERNEL)/Makefile
+       echo "CONFIG_BOARD:=$(BOARD)" > $@
+       echo "CONFIG_KERNEL:=$(KERNEL)" >> $@
+       echo "CONFIG_LINUX_VERSION:=$(LINUX_VERSION)" >> $@
+       echo "CONFIG_LINUX_RELEASE:=$(LINUX_RELEASE)" >> $@
+       echo "CONFIG_LINUX_KARCH:=$(LINUX_KARCH)" >> $@
+
+pkg-install: FORCE
+       @for pkg in $(INSTALL_TARGETS); do \
+               $(IPKG) install $$pkg || echo; \
+       done
+
+download: $(DL_DIR)/$(LINUX_SOURCE)
+prepare: $(LINUX_DIR)/.configured
+       @mkdir -p $(LINUX_DIR) $(PACKAGE_DIR)
+
+compile: prepare $(LINUX_DIR)/.linux-compile
+       @$(MAKE) packages
+
+install: compile $(LINUX_KERNEL)
+
+mostlyclean: FORCE
+       rm -f $(LINUX_DIR)/.linux-compile
+       rm -f $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)/.modules_done
+       rm -f $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)/.drivers-unpacked
+       $(MAKE) -C $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION) clean
+       rm -f $(LINUX_KERNEL)
+
+rebuild: FORCE
+       -$(MAKE) mostlyclean
+       if [ -f $(LINUX_KERNEL) ]; then \
+               $(MAKE) clean; \
+       fi
+       $(MAKE) compile $(MAKE_TRACE)
+
+clean: FORCE
+       rm -f $(STAMP_DIR)/.linux-compile
+       rm -rf $(KERNEL_BUILD_DIR)
+       rm -f $(TARGETS)
+
diff --git a/include/kernel.mk b/include/kernel.mk
new file mode 100644 (file)
index 0000000..580e395
--- /dev/null
@@ -0,0 +1,106 @@
+# 
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+ifeq ($(DUMP),1)
+  KERNEL:=<KERNEL>
+  BOARD:=<BOARD>
+  LINUX_VERSION:=<LINUX_VERSION>
+else
+
+  include $(TOPDIR)/.kernel.mk
+  include $(INCLUDE_DIR)/target.mk
+
+  # check to see if .kernel.mk matches target.mk
+  ifeq ($(CONFIG_BOARD)-$(CONFIG_KERNEL),$(BOARD)-$(KERNEL))
+     LINUX_VERSION:=$(CONFIG_LINUX_VERSION)
+     LINUX_RELEASE:=$(CONFIG_LINUX_RELEASE)
+     LINUX_KARCH:=$(CONFIG_LINUX_KARCH)
+  else
+  # oops, old .kernel.config; rebuild it (hiding the misleading errors this produces)
+    $(warning rebuilding .kernel.mk)
+    $(TOPDIR)/.kernel.mk: FORCE
+       @$(MAKE) -C $(TOPDIR)/target/linux/$(BOARD)-$(KERNEL) $@ &>/dev/null
+  endif
+
+  ifeq ($(KERNEL),2.6)
+    LINUX_KMOD_SUFFIX=ko
+  else
+    LINUX_KMOD_SUFFIX=o
+  endif
+
+  KERNELNAME=
+  ifneq (,$(findstring x86,$(BOARD)))
+    KERNELNAME="bzImage"
+  endif
+  ifneq (,$(findstring ppc,$(BOARD)))
+    KERNELNAME="uImage"
+  endif
+
+  ifneq (,$(findstring uml,$(BOARD)))
+    LINUX_KARCH:=um
+    KERNEL_CC:=$(HOSTCC)
+    KERNEL_CROSS:=
+  else
+    KERNEL_CC:=$(TARGET_CC)
+    KERNEL_CROSS:=$(TARGET_CROSS)
+  endif
+
+  KERNEL_BUILD_DIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)
+  LINUX_DIR := $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)
+
+  MODULES_SUBDIR:=lib/modules/$(LINUX_VERSION)
+  MODULES_DIR := $(KERNEL_BUILD_DIR)/modules/$(MODULES_SUBDIR)
+  TARGET_MODULES_DIR := $(LINUX_TARGET_DIR)/$(MODULES_SUBDIR)
+  KMOD_BUILD_DIR := $(KERNEL_BUILD_DIR)/linux-modules
+
+  LINUX_KERNEL:=$(KERNEL_BUILD_DIR)/vmlinux
+endif
+
+# FIXME: remove this crap
+define KMOD_template
+ifeq ($$(strip $(4)),)
+KDEPEND_$(1):=m
+else
+KDEPEND_$(1):=$($(4))
+endif
+
+IDEPEND_$(1):=kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)) $(foreach pkg,$(5),", $(pkg)")
+
+PKG_$(1) := $(PACKAGE_DIR)/kmod-$(2)_$(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)_$(ARCH).ipk
+I_$(1) := $(KMOD_BUILD_DIR)/ipkg/$(2)
+
+ifeq ($$(KDEPEND_$(1)),m)
+ifneq ($$(CONFIG_PACKAGE_KMOD_$(1)),)
+TARGETS += $$(PKG_$(1))
+endif
+ifeq ($$(CONFIG_PACKAGE_KMOD_$(1)),y)
+INSTALL_TARGETS += $$(PKG_$(1))
+endif
+endif
+
+$$(PKG_$(1)): $(LINUX_DIR)/.modules_done
+       rm -rf $$(I_$(1))
+       $(SCRIPT_DIR)/make-ipkg-dir.sh $$(I_$(1)) ../control/kmod-$(2).control $(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE) $(ARCH)
+       echo "Depends: $$(IDEPEND_$(1))" >> $$(I_$(1))/CONTROL/control
+ifneq ($(strip $(3)),)
+       mkdir -p $$(I_$(1))/lib/modules/$(LINUX_VERSION)
+       $(CP) $(3) $$(I_$(1))/lib/modules/$(LINUX_VERSION)
+endif
+ifneq ($(6),)
+       mkdir -p $$(I_$(1))/etc/modules.d
+       for module in $(7); do \
+               echo $$$$module >> $$(I_$(1))/etc/modules.d/$(6)-$(2); \
+       done
+       echo "#!/bin/sh" >> $$(I_$(1))/CONTROL/postinst
+       echo "[ -z \"\$$$$IPKG_INSTROOT\" ] || exit" >> $$(I_$(1))/CONTROL/postinst
+       echo ". /etc/functions.sh" >> $$(I_$(1))/CONTROL/postinst
+       echo "load_modules /etc/modules.d/$(6)-$(2)" >> $$(I_$(1))/CONTROL/postinst
+       chmod 0755 $$(I_$(1))/CONTROL/postinst
+endif
+       $(8)
+       $(IPKG_BUILD) $$(I_$(1)) $(PACKAGE_DIR)
+endef
+
diff --git a/include/modules-2.4.mk b/include/modules-2.4.mk
new file mode 100644 (file)
index 0000000..e8c67ac
--- /dev/null
@@ -0,0 +1,196 @@
+# 
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(INCLUDE_DIR)/netfilter.mk
+
+# Networking
+
+$(eval $(call KMOD_template,ATM,atm,\
+       $(MODULES_DIR)/kernel/net/atm/atm.o \
+       $(MODULES_DIR)/kernel/net/atm/br2684.o \
+,CONFIG_ATM,,50,atm))
+
+# Block devices
+
+$(eval $(call KMOD_template,LOOP,loop,\
+    $(MODULES_DIR)/kernel/drivers/block/loop.o \
+,CONFIG_BLK_DEV_LOOP,,20,loop))
+
+$(eval $(call KMOD_template,NBD,nbd,\
+    $(MODULES_DIR)/kernel/drivers/block/nbd.o \
+,CONFIG_BLK_DEV_NBD,,20,nbd))
+
+
+# Filesystems
+
+$(eval $(call KMOD_template,FS_CIFS,fs-cifs,\
+       $(MODULES_DIR)/kernel/fs/cifs/cifs.o \
+,CONFIG_CIFS,,30,cifs))
+
+$(eval $(call KMOD_template,FS_MINIX,fs-minix,\
+       $(MODULES_DIR)/kernel/fs/minix/*.o \
+,CONFIG_MINIX_FS,,30,minix))
+
+$(eval $(call KMOD_template,FS_EXT2,fs-ext2,\
+       $(MODULES_DIR)/kernel/fs/ext2/*.o \
+,CONFIG_EXT2_FS,,30,ext2))
+
+$(eval $(call KMOD_template,FS_EXT3,fs-ext3,\
+       $(MODULES_DIR)/kernel/fs/ext3/*.o \
+       $(MODULES_DIR)/kernel/fs/jbd/*.o \
+,CONFIG_EXT3_FS,,30,jbd ext3))
+
+$(eval $(call KMOD_template,FS_HFSPLUS,fs-hfsplus,\
+       $(MODULES_DIR)/kernel/fs/hfsplus/*.o \
+,CONFIG_HFSPLUS_FS,,30,hfsplus))
+
+$(eval $(call KMOD_template,FS_NFS,fs-nfs,\
+       $(MODULES_DIR)/kernel/fs/lockd/*.o \
+       $(MODULES_DIR)/kernel/fs/nfs/*.o \
+       $(MODULES_DIR)/kernel/net/sunrpc/*.o \
+,CONFIG_NFS_FS,,30,sunrpc lockd nfs))
+
+$(eval $(call KMOD_template,FS_VFAT,fs-vfat,\
+       $(MODULES_DIR)/kernel/fs/vfat/vfat.o \
+       $(MODULES_DIR)/kernel/fs/fat/fat.o \
+,CONFIG_VFAT_FS,,30,fat vfat))
+
+$(eval $(call KMOD_template,FS_XFS,fs-xfs,\
+       $(MODULES_DIR)/kernel/fs/xfs/*.o \
+,CONFIG_XFS_FS,,30,xfs))
+
+
+# Multimedia
+
+$(eval $(call KMOD_template,PWC,pwc,\
+       $(MODULES_DIR)/kernel/drivers/usb/pwc.o \
+,CONFIG_USB_PWC,kmod-videodev,63,pwc))
+
+$(eval $(call KMOD_template,SOUNDCORE,soundcore,\
+       $(MODULES_DIR)/kernel/drivers/sound/soundcore.o \
+,CONFIG_SOUND,,30,soundcore))
+
+$(eval $(call KMOD_template,VIDEODEV,videodev,\
+       $(MODULES_DIR)/kernel/drivers/media/video/videodev.o \
+,CONFIG_VIDEO_DEV,,62,videodev))
+
+
+# Network devices
+
+$(eval $(call KMOD_template,NET_AIRO,net-airo,\
+       $(MODULES_DIR)/kernel/drivers/net/wireless/airo.o \
+,CONFIG_AIRO,,10,airo))
+
+$(eval $(call KMOD_template,NET_HERMES,net-hermes,\
+       $(MODULES_DIR)/kernel/drivers/net/wireless/hermes.o \
+       $(MODULES_DIR)/kernel/drivers/net/wireless/orinoco.o \
+,CONFIG_HERMES,,10,hermes orinoco))
+
+$(eval $(call KMOD_template,NET_HERMES_PCI,net-hermes-pci,\
+       $(MODULES_DIR)/kernel/drivers/net/wireless/orinoco_pci.o \
+,CONFIG_PCI_HERMES,kmod-net-hermes,11,orinoco_pci))
+
+$(eval $(call KMOD_template,NET_HERMES_PCI,net-hermes-plx,\
+       $(MODULES_DIR)/kernel/drivers/net/wireless/orinoco_plx.o \
+,CONFIG_PLX_HERMES,kmod-net-hermes,11,orinoco_plx))
+
+$(eval $(call KMOD_template,NET_PRISM54,net-prism54,\
+       $(MODULES_DIR)/kernel/drivers/net/wireless/prism54/prism54.o \
+,CONFIG_PRISM54,,10,prism54))
+
+
+# PCMCIA/CardBus
+
+$(eval $(call KMOD_template,PCMCIA_CORE,pcmcia-core,\
+       $(MODULES_DIR)/kernel/drivers/pcmcia/pcmcia_core.o \
+       $(MODULES_DIR)/kernel/drivers/pcmcia/yenta_socket.o \
+       $(MODULES_DIR)/kernel/drivers/pcmcia/ds.o \
+,CONFIG_PCMCIA,,50,pcmcia_core yenta_socket ds))
+
+$(eval $(call KMOD_template,PCMCIA_SERIAL,pcmcia-serial,\
+       $(MODULES_DIR)/kernel/drivers/char/pcmcia/serial_cs.o \
+,CONFIG_PCMCIA_SERIAL_CS,kmod-pcmcia-core,51,serial_cs))
+
+
+# USB
+
+$(eval $(call KMOD_template,USB,usb-core,\
+       $(MODULES_DIR)/kernel/drivers/usb/usbcore.o \
+,CONFIG_USB,,50,usbcore))
+
+$(eval $(call KMOD_template,USB_OHCI,usb-ohci,\
+       $(MODULES_DIR)/kernel/drivers/usb/host/usb-ohci.o \
+,CONFIG_USB_OHCI,kmod-usb-core,60,usb-ohci))
+
+$(eval $(call KMOD_template,USB_UHCI,usb-uhci,\
+       $(MODULES_DIR)/kernel/drivers/usb/host/uhci.o \
+,CONFIG_USB_UHCI_ALT,kmod-usb-core,60,uhci))
+
+$(eval $(call KMOD_template,USB2,usb2,\
+       $(MODULES_DIR)/kernel/drivers/usb/host/ehci-hcd.o \
+,CONFIG_USB_EHCI_HCD,kmod-usb-core,60,ehci-hcd))
+
+$(eval $(call KMOD_template,USB_ACM,usb-acm,\
+       $(MODULES_DIR)/kernel/drivers/usb/acm.o \
+,CONFIG_USB_ACM))
+
+$(eval $(call KMOD_template,USB_AUDIO,usb-audio,\
+       $(MODULES_DIR)/kernel/drivers/usb/audio.o \
+,CONFIG_USB_AUDIO,kmod-soundcore kmod-usb-core,61,audio))
+
+$(eval $(call KMOD_template,USB_PRINTER,usb-printer,\
+       $(MODULES_DIR)/kernel/drivers/usb/printer.o \
+,CONFIG_USB_PRINTER,kmod-usb-core,60,printer))
+
+$(eval $(call KMOD_template,USB_SERIAL,usb-serial,\
+       $(MODULES_DIR)/kernel/drivers/usb/serial/usbserial.o \
+,CONFIG_USB_SERIAL,kmod-usb-core,60,usbserial))
+
+$(eval $(call KMOD_template,USB_SERIAL_BELKIN,usb-serial-belkin,\
+       $(MODULES_DIR)/kernel/drivers/usb/serial/belkin_sa.o \
+,CONFIG_USB_SERIAL_BELKIN,kmod-usb-serial,61,belkin_sa))
+
+$(eval $(call KMOD_template,USB_SERIAL_FTDI,usb-serial-ftdi,\
+       $(MODULES_DIR)/kernel/drivers/usb/serial/ftdi_sio.o \
+,CONFIG_USB_SERIAL_FTDI_SIO,kmod-usb-serial,61,ftdi_sio))
+
+$(eval $(call KMOD_template,USB_SERIAL_MCT_U232,usb-serial-mct-u232,\
+       $(MODULES_DIR)/kernel/drivers/usb/serial/mct_u232.o \
+,CONFIG_USB_SERIAL_MCT_U232,kmod-usb-serial,61,mct_u232))
+
+$(eval $(call KMOD_template,USB_SERIAL_PL2303,usb-serial-pl2303,\
+       $(MODULES_DIR)/kernel/drivers/usb/serial/pl2303.o \
+,CONFIG_USB_SERIAL_PL2303,kmod-usb-serial,61,pl2303))
+
+$(eval $(call KMOD_template,USB_SERIAL_VISOR,usb-serial-visor,\
+       $(MODULES_DIR)/kernel/drivers/usb/serial/visor.o \
+,CONFIG_USB_SERIAL_VISOR,kmod-usb-serial,61,visor))
+
+$(eval $(call KMOD_template,USB_STORAGE,usb-storage,\
+       $(MODULES_DIR)/kernel/drivers/scsi/*.o \
+       $(MODULES_DIR)/kernel/drivers/usb/storage/*.o \
+,CONFIG_USB_STORAGE,kmod-usb-core,60,scsi_mod sd_mod usb-storage))
+
+
+# Misc. devices
+
+$(eval $(call KMOD_template,AX25,ax25,\
+       $(MODULES_DIR)/kernel/net/ax25/ax25.o \
+       $(MODULES_DIR)/kernel/drivers/net/hamradio/mkiss.o \
+,CONFIG_AX25,,90,ax25 mkiss))
+
+$(eval $(call KMOD_template,BLUETOOTH,bluetooth,\
+       $(MODULES_DIR)/kernel/net/bluetooth/*.o \
+       $(MODULES_DIR)/kernel/net/bluetooth/rfcomm/*.o \
+       $(MODULES_DIR)/kernel/drivers/bluetooth/*.o \
+,CONFIG_BLUEZ))
+
+$(eval $(call KMOD_template,SOFTDOG,softdog,\
+       $(MODULES_DIR)/kernel/drivers/char/softdog.o \
+,CONFIG_SOFT_WATCHDOG,,95,softdog))
+
+
+
diff --git a/include/modules-2.6.mk b/include/modules-2.6.mk
new file mode 100644 (file)
index 0000000..9bb0826
--- /dev/null
@@ -0,0 +1,233 @@
+# 
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+NF_2_6:=1
+include $(INCLUDE_DIR)/netfilter.mk
+
+# Networking
+
+$(eval $(call KMOD_template,ATM,atm,\
+       $(MODULES_DIR)/kernel/net/atm/atm.ko \
+       $(MODULES_DIR)/kernel/net/atm/br2684.ko \
+       $(MODULES_DIR)/kernel/drivers/atm/atmtcp.ko \
+,CONFIG_ATM,,50,atm))
+
+# Block devices
+
+$(eval $(call KMOD_template,LOOP,loop,\
+    $(MODULES_DIR)/kernel/drivers/block/loop.ko \
+,CONFIG_BLK_DEV_LOOP,,20,loop))
+
+$(eval $(call KMOD_template,NBD,nbd,\
+    $(MODULES_DIR)/kernel/drivers/block/nbd.ko \
+,CONFIG_BLK_DEV_NBD,,20,nbd))
+
+# Filesystems
+
+$(eval $(call KMOD_template,FS_CIFS,fs-cifs,\
+       $(MODULES_DIR)/kernel/fs/cifs/cifs.ko \
+,CONFIG_CIFS,kmod-nls-base,30,cifs))
+
+$(eval $(call KMOD_template,FS_MINIX,fs-minix,\
+       $(MODULES_DIR)/kernel/fs/minix/minix.ko \
+,CONFIG_MINIX_FS,,30,minix))
+
+$(eval $(call KMOD_template,FS_EXT2,fs-ext2,\
+       $(MODULES_DIR)/kernel/fs/ext2/ext2.ko \
+,CONFIG_EXT2_FS,,30,ext2))
+
+$(eval $(call KMOD_template,FS_EXT3,fs-ext3,\
+       $(MODULES_DIR)/kernel/fs/ext3/ext3.ko \
+       $(MODULES_DIR)/kernel/fs/jbd/jbd.ko \
+,CONFIG_EXT3_FS,,30,jbd ext3))
+
+$(eval $(call KMOD_template,FS_HFSPLUS,fs-hfsplus,\
+       $(MODULES_DIR)/kernel/fs/hfsplus/hfsplus.ko \
+,CONFIG_HFSPLUS_FS,kmod-nls-base,30,hfsplus))
+
+$(eval $(call KMOD_template,FS_NFS,fs-nfs,\
+       $(MODULES_DIR)/kernel/fs/lockd/lockd.ko \
+       $(MODULES_DIR)/kernel/fs/nfs/nfs.ko \
+       $(MODULES_DIR)/kernel/net/sunrpc/sunrpc.ko \
+,CONFIG_NFS_FS,,30,sunrpc lockd nfs))
+
+$(eval $(call KMOD_template,FS_VFAT,fs-vfat,\
+       $(MODULES_DIR)/kernel/fs/fat/fat.ko \
+       $(MODULES_DIR)/kernel/fs/vfat/vfat.ko \
+,CONFIG_VFAT_FS,kmod-nls-base,30,fat vfat))
+
+$(eval $(call KMOD_template,FS_XFS,fs-xfs,\
+       $(MODULES_DIR)/kernel/fs/xfs/xfs.ko \
+,CONFIG_XFS_FS,,30,xfs))
+
+
+# Multimedia
+
+$(eval $(call KMOD_template,PWC,pwc,\
+       $(MODULES_DIR)/kernel/drivers/usb/media/pwc/pwc.ko \
+,CONFIG_USB_PWC,kmod-videodev,63,pwc))
+
+$(eval $(call KMOD_template,SOUNDCORE,soundcore,\
+       $(MODULES_DIR)/kernel/sound/soundcore.ko \
+,CONFIG_SOUND,,30,soundcore))
+
+$(eval $(call KMOD_template,VIDEODEV,videodev,\
+       $(MODULES_DIR)/kernel/drivers/media/video/v4l1-compat.ko \
+       $(MODULES_DIR)/kernel/drivers/media/video/v4l2-common.ko \
+       $(MODULES_DIR)/kernel/drivers/media/video/videodev.ko \
+,CONFIG_VIDEO_DEV,,62,videodev))
+
+
+# NLS
+
+$(eval $(call KMOD_template,NLS_BASE,nls-base,\
+       $(MODULES_DIR)/kernel/fs/nls/nls_base.ko \
+,CONFIG_NLS,,20,nls_base))
+
+$(eval $(call KMOD_template,NLS_CP437,nls-cp437,\
+       $(MODULES_DIR)/kernel/fs/nls/nls_cp437.ko \
+,CONFIG_NLS_CODEPAGE_437,,20,nls_cp437))
+
+$(eval $(call KMOD_template,NLS_CP850,nls-cp850,\
+       $(MODULES_DIR)/kernel/fs/nls/nls_cp850.ko \
+,CONFIG_NLS_CODEPAGE_850,,20,nls_cp850))
+
+$(eval $(call KMOD_template,NLS_ISO8859_1,nls-iso8859-1,\
+       $(MODULES_DIR)/kernel/fs/nls/nls_iso8859-1.ko \
+,CONFIG_NLS_ISO8859_1,,20,nls_iso8859-1))
+
+$(eval $(call KMOD_template,NLS_ISO8859_15,nls-iso8859-15,\
+       $(MODULES_DIR)/kernel/fs/nls/nls_iso8859-15.ko \
+,CONFIG_NLS_ISO8859_15,,20,nls_iso8859-15))
+
+$(eval $(call KMOD_template,NLS_UTF8,nls-utf8,\
+       $(MODULES_DIR)/kernel/fs/nls/nls_utf8.ko \
+,CONFIG_NLS_UTF8,,20,nls_utf8))
+
+
+# Network devices
+
+$(eval $(call KMOD_template,NET_AIRO,net-airo,\
+       $(MODULES_DIR)/kernel/drivers/net/wireless/airo.ko \
+,CONFIG_AIRO,,10,airo))
+
+$(eval $(call KMOD_template,NET_HERMES,net-hermes,\
+       $(MODULES_DIR)/kernel/drivers/net/wireless/hermes.ko \
+       $(MODULES_DIR)/kernel/drivers/net/wireless/orinoco.ko \
+,CONFIG_HERMES,,10,hermes orinoco))
+
+$(eval $(call KMOD_template,NET_HERMES_PCI,net-hermes-pci,\
+       $(MODULES_DIR)/kernel/drivers/net/wireless/orinoco_pci.ko \
+,CONFIG_PCI_HERMES,kmod-net-hermes,11,orinoco_pci))
+
+$(eval $(call KMOD_template,NET_HERMES_PCI,net-hermes-plx,\
+       $(MODULES_DIR)/kernel/drivers/net/wireless/orinoco_plx.ko \
+,CONFIG_PLX_HERMES,kmod-net-hermes,11,orinoco_plx))
+
+$(eval $(call KMOD_template,NET_PRISM54,net-prism54,\
+       $(MODULES_DIR)/kernel/drivers/net/wireless/prism54/prism54.ko \
+,CONFIG_PRISM54,,10,prism54))
+
+
+# PCMCIA/CardBus
+
+$(eval $(call KMOD_template,PCMCIA_CORE,pcmcia-core,\
+       $(MODULES_DIR)/kernel/drivers/pcmcia/pcmcia.ko \
+       $(MODULES_DIR)/kernel/drivers/pcmcia/pcmcia_core.ko \
+       $(MODULES_DIR)/kernel/drivers/pcmcia/yenta_socket.ko \
+       $(MODULES_DIR)/kernel/drivers/pcmcia/rsrc_nonstatic.ko \
+,CONFIG_PCMCIA,,50,pcmcia_core pcmcia yenta_socket rsrc_nonstatic))
+
+$(eval $(call KMOD_template,PCMCIA_SERIAL,pcmcia-serial,\
+       $(MODULES_DIR)/kernel/drivers/serial/serial_cs.ko \
+,CONFIG_SERIAL_8250_CS))
+
+
+# USB
+
+$(eval $(call KMOD_template,USB,usb-core,\
+       $(MODULES_DIR)/kernel/drivers/usb/core/usbcore.ko \
+,CONFIG_USB,,50,usbcore))
+
+$(eval $(call KMOD_template,USB_OHCI,usb-ohci,\
+       $(MODULES_DIR)/kernel/drivers/usb/host/ohci-hcd.ko \
+,CONFIG_USB_OHCI_HCD,kmod-usb-core,60,ohci-hcd))
+
+$(eval $(call KMOD_template,USB_UHCI,usb-uhci,\
+       $(MODULES_DIR)/kernel/drivers/usb/host/uhci-hcd.ko \
+,CONFIG_USB_UHCI_HCD,kmod-usb-core,60,uhci-hcd))
+
+$(eval $(call KMOD_template,USB2,usb2,\
+       $(MODULES_DIR)/kernel/drivers/usb/host/ehci-hcd.ko \
+,CONFIG_USB_EHCI_HCD,kmod-usb-core,60,ehci-hcd))
+
+$(eval $(call KMOD_template,USB_ACM,usb-acm,\
+       $(MODULES_DIR)/kernel/drivers/usb/class/cdc-acm.ko \
+,CONFIG_USB_ACM))
+
+$(eval $(call KMOD_template,USB_AUDIO,usb-audio,\
+       $(MODULES_DIR)/kernel/drivers/usb/class/audio.ko \
+,CONFIG_USB_AUDIO,kmod-soundcore kmod-usb-core,61,audio))
+
+$(eval $(call KMOD_template,USB_PRINTER,usb-printer,\
+       $(MODULES_DIR)/kernel/drivers/usb/class/usblp.ko \
+,CONFIG_USB_PRINTER,kmod-usb-core,60,usblp))
+
+$(eval $(call KMOD_template,USB_SERIAL,usb-serial,\
+       $(MODULES_DIR)/kernel/drivers/usb/serial/usbserial.ko \
+,CONFIG_USB_SERIAL,kmod-usb-core,60,usbserial))
+
+$(eval $(call KMOD_template,USB_SERIAL_BELKIN,usb-serial-belkin,\
+       $(MODULES_DIR)/kernel/drivers/usb/serial/belkin_sa.ko \
+,CONFIG_USB_SERIAL_BELKIN,kmod-usb-serial,61,belkin_sa))
+
+$(eval $(call KMOD_template,USB_SERIAL_FTDI,usb-serial-ftdi,\
+       $(MODULES_DIR)/kernel/drivers/usb/serial/ftdi_sio.ko \
+,CONFIG_USB_SERIAL_FTDI_SIO,kmod-usb-serial,61,ftdi_sio))
+
+$(eval $(call KMOD_template,USB_SERIAL_MCT_U232,usb-serial-mct-u232,\
+       $(MODULES_DIR)/kernel/drivers/usb/serial/mct_u232.ko \
+,CONFIG_USB_SERIAL_MCT_U232,kmod-usb-serial,61,mct_u232))
+
+$(eval $(call KMOD_template,USB_SERIAL_PL2303,usb-serial-pl2303,\
+       $(MODULES_DIR)/kernel/drivers/usb/serial/pl2303.ko \
+,CONFIG_USB_SERIAL_PL2303,kmod-usb-serial,61,pl2303))
+
+$(eval $(call KMOD_template,USB_SERIAL_VISOR,usb-serial-visor,\
+       $(MODULES_DIR)/kernel/drivers/usb/serial/visor.ko \
+,CONFIG_USB_SERIAL_VISOR,kmod-usb-serial,61,visor))
+
+$(eval $(call KMOD_template,USB_STORAGE,usb-storage,\
+       $(MODULES_DIR)/kernel/drivers/scsi/scsi_mod.ko \
+       $(MODULES_DIR)/kernel/drivers/scsi/sd_mod.ko \
+       $(MODULES_DIR)/kernel/drivers/usb/storage/usb-storage.ko \
+,CONFIG_USB_STORAGE,kmod-usb-core,60,scsi_mod sd_mod usb-storage))
+
+$(eval $(call KMOD_template,USB_ATM,usb-atm,\
+        $(MODULES_DIR)/kernel/drivers/usb/atm/usbatm.ko \
+       ,CONFIG_USB_ATM,kmod-usb-atm,50,usbatm))
+
+$(eval $(call KMOD_template,USB_ATM_SPEEDTOUCH,usb-atm-speedtouch,\
+        $(MODULES_DIR)/kernel/drivers/usb/atm/speedtch.ko \
+       ,CONFIG_USB_SPEEDTOUCH,kmod-usb-atm-speedtouch,50,speedtch))
+
+# Misc. devices
+
+$(eval $(call KMOD_template,AX25,ax25,\
+       $(MODULES_DIR)/kernel/net/ax25/ax25.ko \
+       $(MODULES_DIR)/kernel/drivers/net/hamradio/mkiss.ko \
+,CONFIG_AX25,,90,ax25 mkiss))
+
+$(eval $(call KMOD_template,BLUETOOTH,bluetooth,\
+       $(MODULES_DIR)/kernel/net/bluetooth/bluetooth.ko \
+       $(MODULES_DIR)/kernel/net/bluetooth/l2cap.ko \
+       $(MODULES_DIR)/kernel/net/bluetooth/sco.ko \
+       $(MODULES_DIR)/kernel/net/bluetooth/rfcomm/rfcomm.ko \
+       $(MODULES_DIR)/kernel/drivers/bluetooth/hci_uart.ko \
+       $(MODULES_DIR)/kernel/drivers/bluetooth/hci_usb.ko \
+,CONFIG_BT))
+
+
diff --git a/include/netfilter.mk b/include/netfilter.mk
new file mode 100644 (file)
index 0000000..ba1512e
--- /dev/null
@@ -0,0 +1,122 @@
+# 
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# $Id: netfilter.mk 2411 2005-11-11 03:41:43Z nico $
+
+ifeq ($(NF_KMOD),1)
+P_V4:=ipv4/netfilter/
+P_XT:=netfilter/
+endif
+
+IPT_CONNTRACK-m :=
+IPT_CONNTRACK-$(CONFIG_IP_NF_MATCH_CONNMARK) += $(P_V4)ipt_connmark
+IPT_CONNTRACK-$(CONFIG_IP_NF_TARGET_CONNMARK) += $(P_V4)ipt_CONNMARK
+IPT_CONNTRACK-$(CONFIG_IP_NF_MATCH_CONNTRACK) += $(P_V4)ipt_conntrack
+IPT_CONNTRACK-$(CONFIG_IP_NF_MATCH_HELPER) += $(P_V4)ipt_helper
+IPT_CONNTRACK-$(CONFIG_IP_NF_MATCH_STATE) += $(P_V4)ipt_state
+IPT_CONNTRACK-$(CONFIG_NETFILTER_XT_MATCH_CONNTRACK) += $(P_XT)xt_conntrack
+IPT_CONNTRACK-$(CONFIG_NETFILTER_XT_MATCH_HELPER) += $(P_XT)xt_helper
+IPT_CONNTRACK-$(CONFIG_NETFILTER_XT_MATCH_STATE) += $(P_XT)xt_state
+
+
+IPT_EXTRA-m :=
+IPT_EXTRA-$(CONFIG_IP_NF_MATCH_CONDITION) += $(P_V4)ipt_condition
+IPT_EXTRA-$(CONFIG_IP_NF_MATCH_CONNBYTES) += $(P_V4)ipt_connbytes
+IPT_EXTRA-$(CONFIG_NETFILTER_XT_MATCH_CONNBYTES) += $(P_XT)xt_connbytes
+IPT_EXTRA-$(CONFIG_IP_NF_MATCH_LIMIT) += $(P_V4)ipt_limit
+IPT_EXTRA-$(CONFIG_NETFILTER_XT_MATCH_LIMIT) += $(P_XT)xt_limit
+IPT_EXTRA-$(CONFIG_IP_NF_TARGET_LOG) += $(P_V4)ipt_LOG
+IPT_EXTRA-$(CONFIG_IP_NF_MATCH_MULTIPORT) += $(P_XT)xt_multiport
+IPT_EXTRA-$(CONFIG_NETFILTER_XT_MATCH_MULTIPORT) += $(P_XT)xt_multiport
+IPT_EXTRA-$(CONFIG_IP_NF_MATCH_OWNER) += $(P_V4)ipt_owner
+IPT_EXTRA-$(CONFIG_IP_NF_MATCH_PHYSDEV) += $(P_V4)ipt_physdev
+IPT_EXTRA-$(CONFIG_IP_NF_MATCH_PKTTYPE) += $(P_V4)ipt_pkttype
+IPT_EXTRA-$(CONFIG_NETFILTER_XT_MATCH_PKTTYPE) += $(P_XT)xt_pkttype
+IPT_EXTRA-$(CONFIG_IP_NF_MATCH_QUOTA) += $(P_V4)ipt_quota
+IPT_EXTRA-$(CONFIG_IP_NF_MATCH_RECENT) += $(P_V4)ipt_recent
+IPT_EXTRA-$(CONFIG_IP_NF_TARGET_REJECT) += $(P_V4)ipt_REJECT
+IPT_EXTRA-$(CONFIG_IP_NF_MATCH_STRING) += $(P_V4)ipt_string
+IPT_EXTRA-$(CONFIG_NETFILTER_XT_MATCH_STRING) += $(P_XT)xt_string
+
+IPT_FILTER-m :=
+IPT_FILTER-$(CONFIG_IP_NF_MATCH_IPP2P) += $(P_V4)ipt_ipp2p
+IPT_FILTER-$(CONFIG_IP_NF_MATCH_LAYER7) += $(P_V4)ipt_layer7
+
+IPT_IMQ-m :=
+IPT_IMQ-$(CONFIG_IP_NF_TARGET_IMQ) += $(P_V4)ipt_IMQ
+
+IPT_IPOPT-m :=
+IPT_IPOPT-$(CONFIG_IP_NF_MATCH_DSCP) += $(P_V4)ipt_dscp
+IPT_IPOPT-$(CONFIG_IP_NF_TARGET_DSCP) += $(P_V4)ipt_DSCP
+IPT_IPOPT-$(CONFIG_IP_NF_MATCH_ECN) += $(P_V4)ipt_ecn
+IPT_IPOPT-$(CONFIG_IP_NF_TARGET_ECN) += $(P_V4)ipt_ECN
+IPT_IPOPT-$(CONFIG_IP_NF_MATCH_LENGTH) += $(P_V4)ipt_length
+IPT_IPOPT-$(CONFIG_NETFILTER_XT_MATCH_LENGTH) += $(P_XT)xt_length
+IPT_IPOPT-$(CONFIG_IP_NF_MATCH_MAC) += $(P_V4)ipt_mac
+IPT_IPOPT-$(CONFIG_NETFILTER_XT_MATCH_MAC) += $(P_XT)xt_mac
+IPT_IPOPT-$(CONFIG_IP_NF_MATCH_MARK) += $(P_V4)ipt_mark
+IPT_IPOPT-$(CONFIG_NETFILTER_XT_MATCH_MARK) += $(P_XT)xt_mark
+IPT_IPOPT-$(CONFIG_IP_NF_TARGET_MARK) += $(P_V4)ipt_MARK
+IPT_IPOPT-$(CONFIG_NETFILTER_XT_TARGET_MARK) += $(P_XT)xt_MARK
+IPT_IPOPT-$(CONFIG_IP_NF_MATCH_TCPMSS) += $(P_V4)ipt_tcpmss
+IPT_IPOPT-$(CONFIG_NETFILTER_XT_MATCH_TCPMSS) += $(P_XT)xt_tcpmss
+IPT_IPOPT-$(CONFIG_IP_NF_TARGET_TCPMSS) += $(P_V4)ipt_TCPMSS
+IPT_IPOPT-$(CONFIG_IP_NF_MATCH_TOS) += $(P_V4)ipt_tos
+IPT_IPOPT-$(CONFIG_IP_NF_MATCH_TIME) += $(P_V4)ipt_time
+IPT_IPOPT-$(CONFIG_IP_NF_TARGET_TOS) += $(P_V4)ipt_TOS
+IPT_IPOPT-$(CONFIG_IP_NF_MATCH_TTL) += $(P_V4)ipt_ttl
+IPT_IPOPT-$(CONFIG_IP_NF_TARGET_TTL) += $(P_V4)ipt_TTL
+IPT_IPOPT-$(CONFIG_IP_NF_MATCH_UNCLEAN) += $(P_V4)ipt_unclean
+
+IPT_IPSEC-m :=
+IPT_IPSEC-$(CONFIG_IP_NF_MATCH_AH_ESP) += $(P_V4)ipt_ah $(P_V4)ipt_esp
+IPT_IPSEC-$(CONFIG_IP_NF_MATCH_AH) += $(P_V4)ipt_ah
+IPT_IPSEC-$(CONFIG_NETFILTER_XT_MATCH_ESP) += $(P_XT)xt_esp
+
+IPT_NAT-m :=
+ifneq ($(NF_KMOD),1)
+  IPT_NAT-$(CONFIG_IP_NF_NAT) += $(P_V4)ipt_SNAT $(P_V4)ipt_DNAT
+endif
+IPT_NAT-$(CONFIG_IP_NF_TARGET_MASQUERADE) += $(P_V4)ipt_MASQUERADE
+IPT_NAT-$(CONFIG_IP_NF_TARGET_MIRROR) += $(P_V4)ipt_MIRROR
+IPT_NAT-$(CONFIG_IP_NF_TARGET_REDIRECT) += $(P_V4)ipt_REDIRECT
+IPT_NAT-$(CONFIG_IP_NF_TARGET_NETMAP) += $(P_V4)ipt_NETMAP
+
+IPT_NAT_EXTRA-m := 
+IPT_NAT_EXTRA-$(CONFIG_IP_NF_AMANDA) += $(P_V4)ip_conntrack_amanda
+IPT_NAT_EXTRA-$(CONFIG_IP_NF_CT_PROTO_GRE) += $(P_V4)ip_conntrack_proto_gre
+IPT_NAT_EXTRA-$(CONFIG_IP_NF_NAT_PROTO_GRE) += $(P_V4)ip_nat_proto_gre
+IPT_NAT_EXTRA-$(CONFIG_IP_NF_H323) += $(P_V4)ip_conntrack_h323
+IPT_NAT_EXTRA-$(CONFIG_IP_NF_NAT_H323) += $(P_V4)ip_nat_h323
+IPT_NAT_EXTRA-$(CONFIG_IP_NF_MMS) += $(P_V4)ip_conntrack_mms
+IPT_NAT_EXTRA-$(CONFIG_IP_NF_NAT_MMS) += $(P_V4)ip_nat_mms
+IPT_NAT_EXTRA-$(CONFIG_IP_NF_RTSP) += $(P_V4)ip_conntrack_rtsp
+IPT_NAT_EXTRA-$(CONFIG_IP_NF_NAT_RTSP) += $(P_V4)ip_nat_rtsp
+IPT_NAT_EXTRA-$(CONFIG_IP_NF_PPTP) += $(P_V4)ip_conntrack_pptp
+IPT_NAT_EXTRA-$(CONFIG_IP_NF_SIP) += $(P_V4)ip_conntrack_sip
+IPT_NAT_EXTRA-$(CONFIG_IP_NF_NAT_PPTP) += $(P_V4)ip_nat_pptp
+IPT_NAT_EXTRA-$(CONFIG_IP_NF_NAT_SIP) += $(P_V4)ip_nat_sip
+IPT_NAT_EXTRA-$(CONFIG_IP_NF_NAT_SNMP_BASIC) += $(P_V4)ip_nat_snmp_basic
+IPT_NAT_EXTRA-$(CONFIG_IP_NF_SIP) += $(P_V4)ip_conntrack_sip
+IPT_NAT_EXTRA-$(CONFIG_IP_NF_NAT_SIP) += $(P_V4)ip_nat_sip
+IPT_NAT_EXTRA-$(CONFIG_IP_NF_TFTP) += $(P_V4)ip_conntrack_tftp
+
+IPT_QUEUE-m :=
+IPT_QUEUE-$(CONFIG_IP_NF_QUEUE) += $(P_V4)ip_queue
+
+IPT_ULOG-m :=
+IPT_ULOG-$(CONFIG_IP_NF_TARGET_ULOG) += $(P_V4)ipt_ULOG
+
+IPT_BUILTIN := $(P_V4)ipt_standard
+IPT_BUILTIN += $(P_V4)ipt_icmp $(P_V4)ipt_tcp $(P_V4)ipt_udp
+IPT_BUILTIN += $(IPT_CONNTRACK-y)
+IPT_BUILTIN += $(IPT_EXTRA-y)
+IPT_BUILTIN += $(IPT_FILTER-y)
+IPT_BUILTIN += $(IPT_IMQ-y)
+IPT_BUILTIN += $(IPT_IPOPT-y)
+IPT_BUILTIN += $(IPT_IPSEC-y)
+IPT_BUILTIN += $(IPT_NAT-y)
+IPT_BUILTIN += $(IPT_ULOG-y)
diff --git a/include/package.mk b/include/package.mk
new file mode 100644 (file)
index 0000000..5a9ba86
--- /dev/null
@@ -0,0 +1,372 @@
+# 
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+ifneq ($(DUMP),)
+  all: dumpinfo
+else
+  all: compile
+endif
+
+include $(INCLUDE_DIR)/prereq.mk
+include $(INCLUDE_DIR)/host.mk
+
+define shvar
+V_$(subst .,_,$(subst -,_,$(subst /,_,$(1))))
+endef
+
+define shexport
+$(call shvar,$(1))=$$(call $(1))
+export $(call shvar,$(1))
+endef
+
+define Build/DefaultTargets
+  ifeq ($(DUMP),)
+    ifeq ($(CONFIG_AUTOREBUILD),y)
+      _INFO:=
+      ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p $(PKG_BUILD_DIR) .),$(PKG_BUILD_DIR))
+        _INFO+=$(subst $(TOPDIR)/,,$(PKG_BUILD_DIR))
+        $(PKG_BUILD_DIR)/.prepared: package-clean
+      endif
+    endif
+  endif
+
+  $(PKG_BUILD_DIR)/.prepared:
+       @-rm -rf $(PKG_BUILD_DIR)
+       @mkdir -p $(PKG_BUILD_DIR)
+       $(call Build/Prepare)
+       touch $$@
+
+  $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
+       $(call Build/Configure)
+       touch $$@
+
+  $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured
+       $(call Build/Compile)
+       touch $$@
+
+  ifdef Build/InstallDev
+    ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p -x ipkg -x ipkg-install $(STAGING_DIR)/stampfiles/.$(PKG_NAME)-installed $(PKG_BUILD_DIR)),$(STAGING_DIR)/stampfiles/.$(PKG_NAME)-installed)
+      $(PKG_BUILD_DIR)/.built: package-rebuild
+    endif
+
+    $(STAGING_DIR)/stampfiles/.$(PKG_NAME)-installed: $(PKG_BUILD_DIR)/.built
+       mkdir -p $(STAGING_DIR)/stampfiles
+       $(call Build/InstallDev)
+       touch $$@
+       
+    compile-targets: $(STAGING_DIR)/stampfiles/.$(PKG_NAME)-installed
+  endif
+
+  package-clean: FORCE
+       $(call Build/Clean)
+       $(call Build/UninstallDev)
+       -rm -f $(STAGING_DIR)/stampfiles/.$(PKG_NAME)-installed
+
+  package-rebuild: FORCE
+       @-rm -f $(PKG_BUILD_DIR)/.built
+
+  define Build/DefaultTargets
+  endef
+endef
+
+define Package/Default
+  CONFIGFILE:=
+  SECTION:=opt
+  CATEGORY:=Extra packages
+  DEPENDS:=
+  EXTRA_DEPENDS:=
+  MAINTAINER:=OpenWrt Developers Team <openwrt-devel@openwrt.org>
+  SOURCE:=$(patsubst $(TOPDIR)/%,%,${shell pwd})
+  ifneq ($(PKG_VERSION),)
+    ifneq ($(PKG_RELEASE),)
+      VERSION:=$(PKG_VERSION)-$(PKG_RELEASE)
+    else
+      VERSION:=$(PKG_VERSION)
+    endif
+  else
+    VERSION:=$(PKG_RELEASE)
+  endif
+  PKGARCH:=$(ARCH)
+  PRIORITY:=optional
+  DEFAULT:=
+  MENU:=
+  SUBMENU:=
+  SUBMENUDEP:=
+  TITLE:=
+  DESCRIPTION:=
+endef
+
+define BuildDescription
+  ifneq ($(DESCRIPTION),)
+    DESCRIPTION:=$(TITLE)\\ $(DESCRIPTION)
+  else
+    DESCRIPTION:=$(TITLE)
+  endif
+endef
+
+define BuildIPKGVariable
+  $(call shexport,Package/$(1)/$(2))
+  $(1)_COMMANDS += var2file "$(call shvar,Package/$(1)/$(2))" $(2);
+endef
+
+define BuildPackage
+  $(eval $(call Package/Default))
+  $(eval $(call Package/$(1)))
+  $(eval $(call BuildDescription))
+
+  $(foreach FIELD, TITLE CATEGORY PRIORITY SECTION VERSION,
+    ifeq ($($(FIELD)),)
+      $$(error Package/$(1) is missing the $(FIELD) field)
+    endif
+  )
+
+  IPKG_$(1):=$(PACKAGE_DIR)/$(1)_$(VERSION)_$(PKGARCH).ipk
+  IDIR_$(1):=$(PKG_BUILD_DIR)/ipkg/$(1)
+  INFO_$(1):=$(IPKG_STATE_DIR)/info/$(1).list
+
+  ifdef Package/$(1)/install
+    ifeq ($(CONFIG_PACKAGE_$(1)),y)
+      install-targets: $$(INFO_$(1))
+    endif
+
+    ifneq ($(CONFIG_PACKAGE_$(1)),)
+      compile-targets: $$(IPKG_$(1))
+    else
+      compile-targets: $(1)-disabled
+      $(1)-disabled:
+       @echo "WARNING: skipping $(1) -- package not selected"
+    endif
+  endif
+
+  ifeq ($(FORCEREBUILD),y)
+    $$(IPKG_$(1)): FORCE
+  endif
+
+  IDEPEND_$(1):=$$(strip $$(DEPENDS))
+
+  ifneq ($(DUMP),)
+    DUMPINFO += \
+       echo "Package: $(1)"; 
+
+    ifneq ($(MENU),)
+      DUMPINFO += \
+       echo "Menu: $(MENU)";
+    endif
+
+    ifneq ($(SUBMENU),)
+      DUMPINFO += \
+       echo "Submenu: $(SUBMENU)";
+      ifneq ($(SUBMENUDEP),)
+        DUMPINFO += \
+         echo "Submenu-Depends: $(SUBMENUDEP)";
+      endif
+    endif
+
+    ifneq ($(DEFAULT),)
+      DUMPINFO += \
+       echo "Default: $(DEFAULT)";
+    endif
+
+       $(call shexport,Package/$(1)/description)
+
+    DUMPINFO += \
+       if [ "$$$$PREREQ_CHECK" = 1 ]; then echo "Prereq-Check: 1"; fi; \
+       echo "Version: $(VERSION)"; \
+       echo "Depends: $$(IDEPEND_$(1))"; \
+       echo "Build-Depends: $(PKG_BUILDDEP)"; \
+       echo "Category: $(CATEGORY)"; \
+       echo "Title: $(TITLE)"; \
+       if isset $(call shvar,Package/$(1)/description); then \
+               echo -n "Description: "; \
+               getvar $(call shvar,Package/$(1)/description); \
+       else \
+               echo "Description: $(DESCRIPTION)" | sed -e 's,\\,\n,g'; \
+       fi;
+       
+    ifneq ($(URL),)
+      DUMPINFO += \
+               echo; \
+               echo "$(URL)";
+    endif
+       
+       DUMPINFO += \
+               echo "@@";
+
+       $(call shexport,Package/$(1)/config)
+       DUMPINFO += \
+               if isset $(call shvar,Package/$(1)/config); then echo "Config: "; getvar $(call shvar,Package/$(1)/config); fi; \
+               echo "@@";
+  
+  endif
+
+  $(eval $(call BuildIPKGVariable,$(1),conffiles))
+  $(eval $(call BuildIPKGVariable,$(1),preinst))
+  $(eval $(call BuildIPKGVariable,$(1),postinst))
+  $(eval $(call BuildIPKGVariable,$(1),prerm))
+  $(eval $(call BuildIPKGVariable,$(1),postrm))
+  $$(IDIR_$(1))/CONTROL/control: $(PKG_BUILD_DIR)/.version-$(1)_$(VERSION)_$(PKGARCH)
+       mkdir -p $$(IDIR_$(1))/CONTROL
+       echo "Package: $(1)" > $$(IDIR_$(1))/CONTROL/control
+       echo "Version: $(VERSION)" >> $$(IDIR_$(1))/CONTROL/control
+       ( \
+               DEPENDS=; \
+               for depend in $$(filter-out @%,$$(IDEPEND_$(1))); do \
+                       DEPENDS=$$$${DEPENDS:+$$$$DEPENDS, }$$$${depend##+}; \
+               done; \
+               echo "Depends: $(EXTRA_DEPENDS) $$$$DEPENDS" >> $$(IDIR_$(1))/CONTROL/control; \
+       )
+       echo "Source: $(SOURCE)" >> $$(IDIR_$(1))/CONTROL/control
+       echo "Section: $(SECTION)" >> $$(IDIR_$(1))/CONTROL/control
+       echo "Priority: $(PRIORITY)" >> $$(IDIR_$(1))/CONTROL/control
+       echo "Maintainer: $(MAINTAINER)" >> $$(IDIR_$(1))/CONTROL/control
+       echo "Architecture: $(PKGARCH)" >> $$(IDIR_$(1))/CONTROL/control
+       echo "Description: $(DESCRIPTION)" | sed -e 's,\\,\n,g' | sed -e 's,^[[:space:]]*$$$$, .,g' >> $$(IDIR_$(1))/CONTROL/control
+       chmod 644 $$(IDIR_$(1))/CONTROL/control
+       (cd $$(IDIR_$(1))/CONTROL; \
+               $($(1)_COMMANDS) \
+       )
+
+  $$(IPKG_$(1)): $(PKG_BUILD_DIR)/.built $$(IDIR_$(1))/CONTROL/control
+       $(call Package/$(1)/install,$$(IDIR_$(1)))
+       mkdir -p $(PACKAGE_DIR)
+       -find $$(IDIR_$(1)) -name CVS | xargs rm -rf
+       -find $$(IDIR_$(1)) -name .svn | xargs rm -rf
+       -find $$(IDIR_$(1)) -name '.#*' | xargs rm -f
+       $(RSTRIP) $$(IDIR_$(1))
+       $(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR)
+       @[ -f $$(IPKG_$(1)) ] || false 
+
+  $$(INFO_$(1)): $$(IPKG_$(1))
+       $(IPKG) install $$(IPKG_$(1))
+
+  $(1)-clean:
+       rm -f $(PACKAGE_DIR)/$(1)_*
+
+  clean: $(1)-clean
+
+  $(PKG_BUILD_DIR)/.version-$(1)_$(VERSION)_$(PKGARCH): $(PKG_BUILD_DIR)/.prepared
+       -@rm $(PKG_BUILD_DIR)/.version-$(1)_* 2>/dev/null
+       @touch $$@
+
+  $$(eval $$(call Build/DefaultTargets,$(1)))
+
+  ifneq ($$(CONFIG_PACKAGE_$(1)),)
+    ifneq ($(MAKECMDGOALS),prereq)
+      ifneq ($(DUMP),1)
+        ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p -x ipkg -x ipkg-install '$$(IPKG_$(1))' '$(PKG_BUILD_DIR)'),$$(IPKG_$(1)))
+          _INFO+=$(subst $(TOPDIR)/,,$$(IPKG_$(1)))
+          $(PKG_BUILD_DIR)/.built: package-rebuild
+        endif
+
+        ifneq ($$(_INFO),)
+          $$(info Rebuilding $$(_INFO))
+        endif
+      endif
+    endif
+  endif
+endef
+
+ifneq ($(strip $(PKG_CAT)),)
+  ifeq ($(PKG_CAT),unzip)
+    UNPACK=unzip -d $(PKG_BUILD_DIR) $(DL_DIR)/$(PKG_SOURCE)
+  else
+    UNPACK=$(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(PKG_BUILD_DIR)/.. $(TAR_OPTIONS) -
+  endif
+  define Build/Prepare/Default
+       $(UNPACK)
+       @if [ -d ./patches ]; then \
+               $(PATCH) $(PKG_BUILD_DIR) ./patches; \
+       fi
+  endef
+endif
+
+define Build/Prepare
+  $(call Build/Prepare/Default,)
+endef
+
+define Build/Configure/Default
+       (cd $(PKG_BUILD_DIR)/$(3); \
+       if [ -x configure ]; then \
+               $(TARGET_CONFIGURE_OPTS) \
+               CFLAGS="$(TARGET_CFLAGS)" \
+               CXXFLAGS="$(TARGET_CFLAGS)" \
+               CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
+               LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
+               PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \
+               $(2) \
+               ./configure \
+               --target=$(GNU_TARGET_NAME) \
+               --host=$(GNU_TARGET_NAME) \
+               --build=$(GNU_HOST_NAME) \
+               --program-prefix="" \
+               --program-suffix="" \
+               --prefix=/usr \
+               --exec-prefix=/usr \
+               --bindir=/usr/bin \
+               --sbindir=/usr/sbin \
+               --libexecdir=/usr/lib \
+               --sysconfdir=/etc \
+               --datadir=/usr/share \
+               --localstatedir=/var \
+               --mandir=/usr/man \
+               --infodir=/usr/info \
+               $(DISABLE_NLS) \
+               $(1); \
+       fi; \
+       )
+endef
+
+define Build/Configure
+  $(call Build/Configure/Default,)
+endef
+
+define Build/Compile/Default
+       $(MAKE) -C $(PKG_BUILD_DIR) \
+               $(TARGET_CONFIGURE_OPTS) \
+               CROSS="$(TARGET_CROSS)" \
+               EXTRA_CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include " \
+               EXTRA_LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib " \
+               ARCH="$(ARCH)" \
+               $(1);
+endef
+
+define Build/Compile
+  $(call Build/Compile/Default,)
+endef
+
+ifneq ($(DUMP),)
+  dumpinfo: FORCE
+       @$(DUMPINFO)
+else
+  $(PACKAGE_DIR):
+       mkdir -p $@
+               
+  ifneq ($(strip $(PKG_SOURCE)),)
+    download: $(DL_DIR)/$(PKG_SOURCE)
+
+    $(DL_DIR)/$(PKG_SOURCE):
+               mkdir -p $(DL_DIR)
+               $(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(PKG_SOURCE)" "$(PKG_MD5SUM)" $(PKG_SOURCE_URL)
+
+    $(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE)
+  endif
+
+  download:
+  prepare: $(PKG_BUILD_DIR)/.prepared
+  configure: $(PKG_BUILD_DIR)/.configured
+
+  compile-targets:
+  compile: compile-targets
+
+  install-targets:
+  install: install-targets
+
+  clean-targets:
+  clean: FORCE
+       @$(MAKE) clean-targets
+       $(call Build/Clean)
+       rm -rf $(PKG_BUILD_DIR)
+endif
diff --git a/include/prereq-build.mk b/include/prereq-build.mk
new file mode 100644 (file)
index 0000000..d6396af
--- /dev/null
@@ -0,0 +1,105 @@
+# 
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+TMP_DIR:=$(TOPDIR)/tmp
+include $(INCLUDE_DIR)/prereq.mk
+include $(INCLUDE_DIR)/host.mk
+
+define Require/non-root
+       [ "$$(shell whoami)" != "root" ]
+endef
+$(eval $(call Require,non-root, \
+       Please do not compile as root. \
+))
+
+# Required for the toolchain
+define Require/working-make
+       echo 'all: test' > $(TMP_DIR)/check.mk
+       echo 'e0 = $$$$(foreach s,foobar,$$$$(eval $$$$s:))' >> $(TMP_DIR)/check.mk
+       echo 'e1 = $$$$(foreach s,foobar, $$$$(eval $$$$s:))' >> $(TMP_DIR)/check.mk
+       echo 'test: $$$$(strip $$$$(e0)) $$$$(strip $$$$(e1))' >> $(TMP_DIR)/check.mk
+       $(NO_TRACE_MAKE) -f $(TMP_DIR)/check.mk
+endef
+
+$(eval $(call Require,working-make, \
+       Please install GNU make v3.81 or later. (This version has bugs) \
+))
+
+define Require/working-gcc
+       echo 'int main(int argc, char **argv) { return 0; }' | \
+               gcc -x c -o $(TMP_DIR)/a.out -
+endef
+
+$(eval $(call Require,working-gcc, \
+       Please install the GNU C Compiler (gcc). \
+))
+
+define Require/working-g++
+       echo 'int main(int argc, char **argv) { return 0; }' | \
+               g++ -x c++ -o $(TMP_DIR)/a.out -lstdc++ -
+endef
+
+$(eval $(call Require,working-g++, \
+       Please install the GNU C++ Compiler (g++). \
+))
+
+define Require/ncurses
+       echo 'int main(int argc, char **argv) { initscr(); return 0; }' | \
+               gcc -include ncurses.h -x c -o $(TMP_DIR)/a.out -lncurses -
+endef
+
+$(eval $(call Require,ncurses, \
+       Please install ncurses. (Missing libncurses.so or ncurses.h) \
+))
+
+
+define Require/zlib
+       echo 'int main(int argc, char **argv) { gzdopen(0, "rb"); return 0; }' | \
+               gcc -include zlib.h -x c -o $(TMP_DIR)/a.out -lz -
+endef
+
+$(eval $(call Require,zlib, \
+       Please install zlib. (Missing libz.so or zlib.h) \
+))
+
+
+$(eval $(call RequireCommand,bison, \
+       Please install GNU bison. \
+))
+
+$(eval $(call RequireCommand,flex, \
+       Please install flex. \
+))
+
+$(eval $(call RequireCommand,python, \
+       Please install python. \
+))
+
+$(eval $(call RequireCommand,unzip, \
+       Please install unzip. \
+))
+
+$(eval $(call RequireCommand,bzip2, \
+       Please install bzip2. \
+))
+
+$(eval $(call RequireCommand,patch, \
+       Please install patch. \
+))
+
+$(eval $(call RequireCommand,perl, \
+       Please install perl. \
+))
+
+define Require/gnutar
+       $(TAR) --version 2>&1 | grep GNU > /dev/null
+endef
+
+$(eval $(call Require,gnutar, \
+       Please install GNU tar. \
+))
diff --git a/include/prereq.mk b/include/prereq.mk
new file mode 100644 (file)
index 0000000..eda7ca3
--- /dev/null
@@ -0,0 +1,54 @@
+# 
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+$(TMP_DIR):
+       mkdir -p $@
+
+prereq:
+       if [ -f $(TMP_DIR)/.prereq-error ]; then \
+               echo; \
+               cat $(TMP_DIR)/.prereq-error; \
+               echo; \
+               rm -rf $(TMP_DIR); \
+               false; \
+       fi
+       rm -rf $(TMP_DIR)
+       mkdir -p $(TMP_DIR)
+
+.SILENT: $(TMP_DIR) prereq
+
+define Require
+  export PREREQ_CHECK=1
+  ifeq ($$(CHECK_$(1)),)
+    prereq: prereq-$(1)
+
+    prereq-$(1): $(TMP_DIR) FORCE
+               echo -n "Checking '$(1)'... "
+               if $(NO_TRACE_MAKE) -f $(firstword $(MAKEFILE_LIST)) check-$(1) >/dev/null 2>/dev/null; then \
+                       echo 'ok.'; \
+               else \
+                       echo 'failed.'; \
+                       echo -e "$(strip $(2))" >> $(TMP_DIR)/.prereq-error; \
+               fi
+
+    check-$(1): FORCE
+         $(call Require/$(1))
+    CHECK_$(1):=1
+
+    .SILENT: prereq-$(1) check-$(1)
+  endif
+endef
+
+
+define RequireCommand
+  define Require/$(1)
+    which $(1)
+  endef
+
+  $$(eval $$(call Require,$(1),$(2)))
+endef
+
diff --git a/include/shell.sh b/include/shell.sh
new file mode 100644 (file)
index 0000000..6ee0cf6
--- /dev/null
@@ -0,0 +1,15 @@
+getvar() {
+       eval "echo \"\${$1}\""
+}
+
+var2file() {
+       local var
+       eval "var=\"\${$1}\""
+       if [ -n "$var" ]; then echo "$var" > "$2"; fi
+}
+
+isset() {
+       local var
+       eval "var=\"\${$1}\""
+       [ -n "$var" ]
+}
diff --git a/include/target.mk b/include/target.mk
new file mode 100644 (file)
index 0000000..6c21f51
--- /dev/null
@@ -0,0 +1,31 @@
+# 
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+define kernel_template
+ifeq ($(CONFIG_LINUX_$(3)),y)
+KERNEL:=$(1)
+BOARD:=$(2)
+endif
+endef
+
+$(eval $(call kernel_template,2.4,brcm,2_4_BRCM))
+$(eval $(call kernel_template,2.4,ar7,2_4_AR7))
+$(eval $(call kernel_template,2.6,brcm,2_6_BRCM))
+$(eval $(call kernel_template,2.6,brcm63xx,2_6_BRCM63XX))
+$(eval $(call kernel_template,2.6,rb532,2_6_RB532))
+$(eval $(call kernel_template,2.6,x86,2_6_X86))
+$(eval $(call kernel_template,2.6,uml,2_6_UML))
+$(eval $(call kernel_template,2.4,ar531x,2_4_AR531X))
+$(eval $(call kernel_template,2.6,aruba,2_6_ARUBA))
+$(eval $(call kernel_template,2.6,au1000,2_6_AU1000))
+$(eval $(call kernel_template,2.6,xscale,2_6_XSCALE))
+$(eval $(call kernel_template,2.6,magicbox,2_6_MAGICBOX))
+$(eval $(call kernel_template,2.6,sibyte,2_6_SIBYTE))
+
+export BOARD
+export KERNEL
+
+
diff --git a/include/verbose.mk b/include/verbose.mk
new file mode 100644 (file)
index 0000000..34568a3
--- /dev/null
@@ -0,0 +1,43 @@
+# 
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# $Id:$
+
+ifeq ($(NO_TRACE_MAKE),)
+NO_TRACE_MAKE := $(MAKE) V=99
+export NO_TRACE_MAKE
+endif
+
+ifndef KBUILD_VERBOSE
+  KBUILD_VERBOSE:=0
+endif
+ifeq ("$(origin V)", "command line")
+  KBUILD_VERBOSE:=$(V)
+endif
+
+ifneq ($(shell tty -s <&3 || echo x),x)
+  _Y:="\\33[33m"# yellow
+  _N:="\\33[m"#        normal
+endif
+
+ifneq ($(KBUILD_VERBOSE),99)
+  ifeq ($(QUIET),1)
+    $(MAKECMDGOALS): trace
+    trace: FORCE
+       @[ -f "$(MAKECMDGOALS)" ] || { \
+               [ -z "$${PWD##$$TOPDIR}" ] || DIR=" -C $${PWD##$$TOPDIR/}"; \
+               echo -e "$(_Y)make[$$(($(MAKELEVEL)+1))]$$DIR $(MAKECMDGOALS)$(_N)" >&3; \
+       }
+  else
+    export QUIET:=1
+    ifeq ($(KBUILD_VERBOSE),0)
+      MAKE:=&>/dev/null $(MAKE)
+    endif
+    MAKE:=cmd() { $(MAKE) $$* || {  echo "Build failed. Please re-run make with V=99 to see what's going on"; false; } } 3>&1 4>&2; cmd
+  endif
+
+  .SILENT: $(MAKECMDGOALS)
+endif
diff --git a/package/Makefile b/package/Makefile
new file mode 100644 (file)
index 0000000..e94c181
--- /dev/null
@@ -0,0 +1,69 @@
+# 
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# $Id$
+
+include $(TOPDIR)/rules.mk
+include $(TOPDIR)/.config
+include $(TOPDIR)/.pkgdeps
+include $(TOPDIR)/host.mk
+
+PREREQ_PACKAGES:=$(patsubst %,%-prereq,$(prereq-y) $(prereq-m))
+DOWNLOAD_PACKAGES:=$(patsubst %,%-download,$(package-y) $(package-m))
+COMPILE_PACKAGES:=$(patsubst %,%-compile,$(package-y) $(package-m))
+INSTALL_PACKAGES:=$(patsubst %,%-install,$(package-y))
+
+$(STAMP_DIR) $(TARGET_DIR):
+       mkdir -p $@
+
+%-prereq: $(STAMP_DIR) $(TARGET_DIR)
+       $(MAKE) -C $(patsubst %-prereq,%,$@) prereq
+
+%-download: $(STAMP_DIR) $(TARGET_DIR)
+       $(MAKE) -C $(patsubst %-download,%,$@) download
+
+%-prepare: $(STAMP_DIR) $(TARGET_DIR)
+       $(MAKE) -C $(patsubst %-prepare,%,$@) prepare
+
+%-compile: $(STAMP_DIR) $(TARGET_DIR)
+       $(MAKE) -C $(patsubst %-compile,%,$@) compile
+
+%-install: $(STAMP_DIR) $(TARGET_DIR)
+       $(MAKE) -C $(patsubst %-install,%,$@) install
+
+%-clean: $(STAMP_DIR) $(TARGET_DIR)
+       $(MAKE) -C $(patsubst %-clean,%,$@) clean
+
+ifeq ($(SDK),1)
+GENDEP_OPTS := -s
+endif
+
+$(TOPDIR)/.pkgdeps: $(TOPDIR)/.pkginfo
+       @$(TOPDIR)/scripts/gen_deps.pl $(GENDEP_OPTS) < $< > $@ || rm -f $@
+
+all: compile
+clean: $(patsubst %,%-clean,$(package-) $(package-y) $(package-m))
+prereq: $(PREREQ_PACKAGES)
+download: $(DOWNLOAD_PACKAGES)
+compile-targets: $(COMPILE_PACKAGES)
+compile:
+       $(MAKE) compile-targets
+install-targets: base-files-install $(INSTALL_PACKAGES)
+install:
+       rm -rf $(BUILD_DIR)/root
+       $(MAKE) install-targets
+
+index: $(PACKAGE_DIR)/Packages
+
+$(PACKAGE_DIR)/Packages: $(PACKAGE_DIR)/*.ipk
+       (cd $(PACKAGE_DIR); $(SCRIPT_DIR)/ipkg-make-index.sh . > Packages)
+
+
+ifeq ($(MAKECMDGOALS),compile-targets)
+MAKEFLAGS:=$(MAKEFLAGS) -j$(CONFIG_JLEVEL)
+else
+.NOTPARALLEL:
+endif
diff --git a/package/alsa/Makefile b/package/alsa/Makefile
new file mode 100644 (file)
index 0000000..47ad445
--- /dev/null
@@ -0,0 +1,81 @@
+# 
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# $Id$
+
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/kernel.mk
+
+PKG_NAME:=alsa-driver
+PKG_VERSION:=1.0.11
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=ftp://ftp.alsa-project.org/pub/driver/
+PKG_MD5SUM:=57534e4297cd683371402220e3753885
+PKG_CAT:=bzcat
+
+PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/kmod-alsa
+  SECTION:=kernel
+  CATEGORY:=Kernel drivers
+  DEPENDS:=@USB_SUPPORT
+  TITLE:=Advanced Linux Sound Architecture
+  URL:=http://alsa-project.org/
+  VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
+endef
+
+ifeq ($(KERNEL),2.4)
+  ifeq ($(LINUX_KARCH),i386)
+    KERNEL_C_OPTS:= -Os -mpreferred-stack-boundary=2 -march=i486 -fno-unit-at-a-time
+  endif
+  ifeq ($(LINUX_KARCH),mips)
+    KERNEL_C_OPTS:= -Os -G 0 -mno-abicalls -fno-pic -finline-limit=100000 -mabi=32 -march=mips32 -Wa,-32 -Wa,-march=mips32 -Wa,-mips32 -Wa,--trap
+  endif
+endif
+ifeq ($(LINUX_KARCH),i386)
+  KERNEL_C_INCS:= -I$(LINUX_DIR)/include/asm-i386/mach-generic -I$(LINUX_DIR)/include/asm-i386/mach-default
+endif
+ifeq ($(LINUX_KARCH),mips)
+  KERNEL_C_INCS:= -I$(LINUX_DIR)/include/asm-mips/mach-generic
+endif
+
+define Build/Configure
+       (cd $(PKG_BUILD_DIR); \
+               CFLAGS="$(KERNEL_C_INCS)" \
+               ./configure \
+                       --with-build="$(LINUX_DIR)" \
+                       --with-kernel="$(LINUX_DIR)" \
+                       --with-cross="$(KERNEL_CROSS)" \
+                       --with-redhat=no \
+                       --with-suse=no \
+                       --with-oss=yes \
+                       --with-isapnp=no \
+                       --with-sequencer=no \
+                       --with-cards=usb-audio \
+       );
+endef
+
+define Build/Compile
+       $(MAKE) -C $(PKG_BUILD_DIR) \
+               ARCH="$(LINUX_KARCH)" \
+               CROSS_COMPILE="$(TARGET_CROSS)" \
+               c_opts="$(KERNEL_C_OPTS)" \
+               all
+endef
+
+define Package/kmod-alsa/install
+       install -d -m0755 $(1)/lib/modules/$(LINUX_VERSION)
+       install -m0644 $(PKG_BUILD_DIR)/modules/*.$(LINUX_KMOD_SUFFIX) \
+               $(1)/lib/modules/$(LINUX_VERSION)/
+       install -d -m0755 $(1)/etc/modules.d
+       install -m0644 ./files/alsa.modules $(1)/etc/modules.d/70-alsa
+endef
+
+$(eval $(call BuildPackage,kmod-alsa))
diff --git a/package/alsa/files/alsa.modules b/package/alsa/files/alsa.modules
new file mode 100644 (file)
index 0000000..6b16c8c
--- /dev/null
@@ -0,0 +1,10 @@
+snd-page-alloc
+snd
+snd-timer
+snd-pcm
+snd-rawmidi
+snd-usb-lib
+snd-hwdep
+snd-usb-audio
+snd-mixer-oss
+snd-pcm-oss
diff --git a/package/alsa/patches/100-compile_fix.patch b/package/alsa/patches/100-compile_fix.patch
new file mode 100644 (file)
index 0000000..2e2a3df
--- /dev/null
@@ -0,0 +1,18 @@
+diff -urN alsa.old/include/adriver.h alsa.dev/include/adriver.h
+--- alsa.old/include/adriver.h 2006-04-19 08:24:30.000000000 +0200
++++ alsa.dev/include/adriver.h 2006-05-31 17:24:49.000000000 +0200
+@@ -451,7 +451,7 @@
+ #endif /* < 2.6.0 */
+ /* workarounds for USB API */
+-#if defined(SND_NEED_USB_WRAPPER) && (defined(CONFIG_USB) || defined(CONFIG_USB_MODULE))
++#if 1
+ #include <linux/usb.h>
+@@ -1174,4 +1174,5 @@
+  */
+ #define OPL3_HW_OPL3_PC98     0x0305  /* PC9800 */
++#undef info /* used in several structs */
+ #endif /* __SOUND_LOCAL_DRIVER_H */
diff --git a/package/arptables/Makefile b/package/arptables/Makefile
new file mode 100644 (file)
index 0000000..0518e8e
--- /dev/null
@@ -0,0 +1,42 @@
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# $Id$
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=arptables
+PKG_VERSION:=0.0.3
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@SF/ebtables
+PKG_MD5SUM:=1672244603c8979577aa4738be35a759
+PKG_CAT:=zcat
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/arptables
+  SECTION:=net
+  CATEGORY:=Network
+  TITLE:=ARP firewalling software
+  URL:=http://ebtables.sourceforge.net
+endef
+
+define Build/Compile
+       $(MAKE) -C $(PKG_BUILD_DIR) \
+               $(TARGET_CONFIGURE_OPTS) \
+               COPT_FLAGS="$(TARGET_CFLAGS)" \
+               KERNEL_DIR="./include/linux"
+endef
+
+define Package/arptables/install
+       install -m0755 -d $(1)/usr/sbin
+       $(CP) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/sbin/
+endef
+
+$(eval $(call BuildPackage,arptables))
diff --git a/package/base-files/Makefile b/package/base-files/Makefile
new file mode 100644 (file)
index 0000000..9f6da3b
--- /dev/null
@@ -0,0 +1,191 @@
+# 
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# $Id$
+
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/kernel.mk
+
+PKG_NAME:=base-files
+PKG_RELEASE:=8
+
+PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)
+
+REV:=$(shell LANG=C svn info | awk '/^Revision:/ { print$$2 }' )
+ifeq ($(REV),)
+  REV:=0
+endif
+
+include $(INCLUDE_DIR)/package.mk
+
+ifneq ($(DUMP),1)
+  TARGET:=-$(BOARD)-$(KERNEL)
+  UCLIBC_VERSION:=${shell cat $(STAGING_DIR)/uclibc_version 2>/dev/null}
+  LIBGCC_VERSION:=${shell cat $(STAGING_DIR)/gcc_version 2>/dev/null}
+else
+  UCLIBC_VERSION:=<UCLIBC_VERSION>
+  LIBGCC_VERSION:=<LIBGCC_VERSION>
+endif
+
+CONFIG_PACKAGE_base-files$(TARGET):=$(CONFIG_PACKAGE_base-files)
+
+define Package/base-files$(TARGET)
+  SECTION:=base
+  CATEGORY:=Base system
+  DEFAULT:=y
+  TITLE:=Base filesystem for OpenWrt
+  DESCRIPTION:=\
+       This package contains a base filesystem and system scripts for OpenWrt.
+  URL:=http://openwrt.org/
+  VERSION:=$(PKG_RELEASE)-$(REV)
+endef
+
+define -ar7-2.4/conffiles
+/etc/config/network
+endef
+
+define -aruba-2.6/conffiles
+/etc/config/network
+endef
+
+define -au1000-2.6/conffiles
+/etc/config/network
+endef
+
+define -rb532-2.6/conffiles
+/etc/config/network
+endef
+
+define -sibyte-2.6/conffiles
+/etc/config/network
+endef
+
+define -x86-2.6/conffiles
+/etc/config/network
+endef
+
+define -xscale-2.6/conffiles
+/etc/config/network
+endef
+
+define Package/base-files$(TARGET)/conffiles
+/etc/banner
+/etc/hosts
+/etc/inittab
+/etc/group
+/etc/passwd
+/etc/profile
+/etc/shells
+/etc/ipkg.conf
+/etc/sysctl.conf
+$(call $(TARGET)/conffiles)
+endef
+
+define Package/libgcc
+  SECTION:=libs
+  CATEGORY:=Base system
+  DEFAULT:=y
+  DEPENDS:=@!NATIVE_TOOLCHAIN
+  TITLE:=GCC support library
+  URL:=http://gcc.gnu.org/
+  VERSION:=$(LIBGCC_VERSION)-$(PKG_RELEASE)
+endef
+
+define Package/libpthread
+  SECTION:=libs
+  CATEGORY:=Libraries
+  DEPENDS:=@!NATIVE_TOOLCHAIN
+  TITLE:=POSIX thread library
+  URL:=http://uclibc.org/
+  VERSION:=$(UCLIBC_VERSION)-$(PKG_RELEASE)
+endef
+
+define Package/uclibc
+  SECTION:=libs
+  CATEGORY:=Base system
+  DEFAULT:=y
+  DEPENDS:=@!NATIVE_TOOLCHAIN
+  TITLE:=C library embedded systems
+  URL:=http://uclibc.org/
+  VERSION:=$(UCLIBC_VERSION)-$(PKG_RELEASE)
+endef
+
+define Build/Prepare
+       mkdir -p $(PKG_BUILD_DIR)
+endef
+
+define Build/Compile/ar7
+       $(TARGET_CC) -o $(PKG_BUILD_DIR)/adam2patcher src/adam2patcher.c
+endef
+
+define Build/Compile/brcm
+       $(TARGET_CC) -o $(PKG_BUILD_DIR)/jffs2root src/jffs2root.c
+endef
+
+define Build/Compile
+  $(call Build/Compile/$(BOARD))
+endef
+
+
+define Package/base-files$(TARGET)/install-ar7
+       mkdir -p $(1)/sbin
+       $(CP) $(PKG_BUILD_DIR)/adam2patcher $(1)/sbin
+endef
+
+define Package/base-files$(TARGET)/install-brcm
+       rm -f $(1)/etc/config/network
+       mkdir -p $(1)/sbin
+       $(CP) $(PKG_BUILD_DIR)/jffs2root $(1)/sbin
+endef
+
+define Package/base-files$(TARGET)/install
+       $(CP) ./default/* $(1)/
+       if [ -d $(BOARD)-$(KERNEL) ]; then \
+               $(CP) $(BOARD)-$(KERNEL)/* $(1)/; \
+       fi
+       $(SED) 's,$$$$R,r$(REV),g' $(1)/etc/banner
+       $(SED) 's,$$$$S,$(BOARD)-$(KERNEL),g' $(1)/etc/ipkg.conf
+       mkdir -p $(1)/dev
+       mkdir -p $(1)/etc/crontabs
+       mkdir -p $(1)/jffs
+       mkdir -p $(1)/lib
+       mkdir -p $(1)/mnt
+       mkdir -p $(1)/proc
+       mkdir -p $(1)/tmp
+       mkdir -p $(1)/usr/lib
+       mkdir -p $(1)/usr/bin
+       mkdir -p $(1)/sys
+       mkdir -p $(1)/www
+       ln -sf /proc/mounts $(1)/etc/mtab
+       rm -f $(1)/var
+       ln -sf /tmp $(1)/var
+       mkdir -p $(1)/etc
+$(call Package/base-files$(TARGET)/install-$(BOARD),$(1))
+endef
+
+define Package/libgcc/install
+       install -m0755 -d $(1)/lib
+       $(CP) $(STAGING_DIR)/lib/libgcc_s.so.* $(1)/lib/
+endef
+
+define Package/libpthread/install
+       install -m0755 -d $(1)/lib
+       $(CP) $(STAGING_DIR)/lib/libpthread.so.* $(1)/lib/
+       $(CP) $(STAGING_DIR)/lib/libpthread-$(UCLIBC_VERSION).so $(1)/lib/
+endef
+
+define Package/uclibc/install
+       install -m0755 -d $(1)/lib
+       for file in ld-uClibc libc libcrypt libdl libm libnsl libresolv librt libuClibc libutil; do \
+               $(CP) $(STAGING_DIR)/lib/$$$$file.so.* $(1)/lib/; \
+               $(CP) $(STAGING_DIR)/lib/$$$$file-$(UCLIBC_VERSION).so $(1)/lib/; \
+       done
+endef
+
+$(eval $(call BuildPackage,base-files$(TARGET)))
+$(eval $(call BuildPackage,libgcc))
+$(eval $(call BuildPackage,libpthread))
+$(eval $(call BuildPackage,uclibc))
diff --git a/package/base-files/ar7-2.4/bin/firstboot b/package/base-files/ar7-2.4/bin/firstboot
new file mode 100755 (executable)
index 0000000..774bbc7
--- /dev/null
@@ -0,0 +1,89 @@
+#!/bin/sh
+# Copyright (C) 2006 OpenWrt.org
+
+rom=$(awk '/squashfs/ {print $2}' /proc/mounts)
+jffs=$(awk '/jffs2/ {print $2}' /proc/mounts)
+
+dupe() { # <new_root> <old_root>
+       cd $1
+       echo -n "creating directories... "
+       {
+               cd $2 
+               find . -xdev -type d
+               echo "./dev ./jffs ./mnt ./proc ./tmp ./sys"
+               # xdev skips mounted directories
+               cd $1 
+       } | xargs mkdir -p
+       echo "done"
+
+       echo -n "setting up symlinks... "
+       for file in $(cd $2; find . -xdev -type f;); do
+               case "$file" in
+               ./rom/note) ;; #nothing
+               ./etc/config*|\
+               ./etc/resolv.conf|\
+               ./usr/lib/ipkg/info) cp -af $2/$file $file;;
+               *) ln -sf /rom/${file#./*} $file;;
+               esac
+       done
+       for file in $(cd $2; find . -xdev -type l;); do
+               cp -af $2/${file#./*} $file
+       done
+       echo "done"
+}
+
+pivot() { # <new_root> <old_root>
+       mount -o move /proc $1/proc && \
+       pivot_root $1 $1$2 && {
+               mount -o move $2/dev /dev
+               mount -o move $2/tmp /tmp
+               mount -o move $2/sys /sys
+               return 0
+       }
+}
+
+mountdp() { # <device> <mount_point> <ignored> <fs>
+        dev=$1; mnt=$2; shift 2; opt=$*
+       mount $dev $mnt $opt
+       dupe $mnt $rom
+       pivot $mnt /rom
+}
+
+ramoverlay() {
+       mkdir -p /tmp/root
+       mountdp /tmp/root /mnt -o bind
+}
+
+[ "${0##*/}" = "firstboot" ] && {
+       [ -z "$rom" ] && {
+               echo "You do not have a squashfs partition; aborting"
+               echo "(firstboot cannot be run on jffs2 based firmwares)"
+               exit 1
+       }
+
+       [ "$1" = "switch2jffs" ] && {
+               mtd erase OpenWrt
+               mount -o remount,ro none / # try to avoid fs changing while copying
+               mount -o bind / /mnt
+               mount /dev/mtdblock/4 /rom/jffs -t jffs2
+               echo -n "copying files ... "
+               cp -a /mnt/* /rom/jffs
+               umount /mnt
+               echo "done"
+               pivot /rom /mnt
+               mount -o move /mnt /tmp/root
+               pivot /jffs /rom
+               exit 0
+       }
+
+       # script run manually
+       [ \! -z "$jffs" ] && {
+               echo "firstboot has already been run"
+               echo "jffs2 partition is mounted, only resetting files"
+               dupe $jffs $rom
+               exit 0
+       }
+
+       mtd erase OpenWrt
+       mountdp /dev/mtdblock/4 /jffs -t jffs2
+}
diff --git a/package/base-files/ar7-2.4/etc/config/network b/package/base-files/ar7-2.4/etc/config/network
new file mode 100644 (file)
index 0000000..911134b
--- /dev/null
@@ -0,0 +1,14 @@
+# Network configuration file
+
+config interface loopback
+       option ifname   lo
+       option proto    static
+       option ipaddr   127.0.0.1
+       option netmask  255.0.0.0
+
+config interface lan
+       option ifname   eth0
+       option proto    static
+       option ipaddr   192.168.1.1
+       option netmask  255.255.255.0
+
diff --git a/package/base-files/ar7-2.4/etc/init.d/S00adam2 b/package/base-files/ar7-2.4/etc/init.d/S00adam2
new file mode 100755 (executable)
index 0000000..5f5b350
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh /etc/rc.common
+# ADAM2 patcher for Netgear DG834 and compatible
+# Copyright (C) 2006 OpenWrt.org
+
+start() {
+       MD5="$(md5sum /dev/mtdblock/0  | awk '{print $1}')"
+       [ "$MD5" = "0530bfdf00ec155f4182afd70da028c1" ] && {
+               mtd unlock adam2
+               /sbin/adam2patcher /dev/mtdblock/0
+       }
+       rm -f /etc/init.d/S00adam2 /sbin/adam2patcher >&- 2>&-
+}
diff --git a/package/base-files/ar7-2.4/etc/preinit b/package/base-files/ar7-2.4/etc/preinit
new file mode 100755 (executable)
index 0000000..5b676ca
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/sh
+export PATH=/bin:/sbin:/usr/bin:/usr/sbin
+mount none /proc -t proc
+
+[ -f /etc/preinit.arch ] && . /etc/preinit.arch
+[ -z "$FAILSAFE" ] || {
+       echo /bin/true > /proc/sys/kernel/hotplug
+       telnetd -l /bin/login <> /dev/null 2>&1
+}
+mount_root ${FAILSAFE:+failsafe}
+exec /sbin/init
diff --git a/package/base-files/ar7-2.4/sbin/mount_root b/package/base-files/ar7-2.4/sbin/mount_root
new file mode 100755 (executable)
index 0000000..6b90bdc
--- /dev/null
@@ -0,0 +1,28 @@
+#!/bin/sh
+size=$(awk '/Mem:/ {l=5242880;print((s=$2/2)<l)?$2-l:s}' /proc/meminfo)
+mount none /tmp -t tmpfs -o size=$size
+
+if [ "$1" != "failsafe" ]; then 
+       mtd unlock linux
+       mount | grep jffs2 >&-
+       if [ $? = 0 ] ; then
+               if [ $(cat /proc/mtd | wc -l) = 6 ]; then
+                       mtd erase OpenWrt
+               else
+                       mount -o remount,rw /dev/root /
+               fi
+       else
+               . /bin/firstboot
+               echo "switching to jffs2"
+               mount /dev/mtdblock/4 /jffs -t jffs2
+               pivot /jffs /rom || {
+                       echo "jffs2 unusable; using ramdisk"
+                       ramoverlay
+               }
+       fi
+fi
+
+mount none /tmp -t tmpfs -o remount,nosuid,nodev,mode=1777
+mkdir -p /dev/pts
+mount none /dev/pts -t devpts
+mount -t sysfs none /sys 2>&-
diff --git a/package/base-files/aruba-2.6/etc/config/network b/package/base-files/aruba-2.6/etc/config/network
new file mode 100644 (file)
index 0000000..1d9b55b
--- /dev/null
@@ -0,0 +1,11 @@
+# Network configuration file
+
+config interface loopback
+       option ifname   lo
+       option proto    static
+       option ipaddr   127.0.0.1
+       option netmask  255.0.0.0
+
+config interface lan
+       option ifname   eth0
+       option proto    dhcp
diff --git a/package/base-files/au1000-2.6/etc/config/network b/package/base-files/au1000-2.6/etc/config/network
new file mode 100644 (file)
index 0000000..9b65652
--- /dev/null
@@ -0,0 +1,14 @@
+# Copyright (C) 2006 OpenWrt.org
+
+config interface loopback
+       option ifname   lo
+       option proto    static
+       option ipaddr   127.0.0.1
+       option netmask  255.0.0.0
+
+config interface lan
+       option type     bridge
+       option ifname   "eth0 ath0"
+       option proto    static
+       option ipaddr   192.168.1.1
+       option netmask  255.255.255.0
diff --git a/package/base-files/au1000-2.6/sbin/mount_root b/package/base-files/au1000-2.6/sbin/mount_root
new file mode 100755 (executable)
index 0000000..718394c
--- /dev/null
@@ -0,0 +1,26 @@
+#!/bin/sh
+# Copyright (C) 2006 OpenWrt.org
+
+mount none /proc -t proc
+size=$(awk '/Mem:/ {l=5242880;print((s=$2/2)<l)?$2-l:s}' /proc/meminfo)
+mount none /tmp -t tmpfs -o size=$size
+
+if [ "$1" != "failsafe" ]; then 
+       mtd unlock filesystem
+       mount | grep jffs2 >&-
+       if [ $? = 0 ] ; then
+               if [ $(cat /proc/mtd | wc -l) = 6 ]; then
+                       mtd erase filesystem
+                       jffs2root --move
+               else
+                       mount -o remount,rw /dev/root /
+               fi
+       else
+               . /bin/firstboot
+       fi
+fi
+
+mount none /tmp -t tmpfs -o remount,nosuid,nodev,mode=1777
+mkdir -p /dev/pts
+mount none /dev/pts -t devpts
+mount -t sysfs none /sys 2>&-
diff --git a/package/base-files/brcm-2.4/bin/firstboot b/package/base-files/brcm-2.4/bin/firstboot
new file mode 100755 (executable)
index 0000000..b65d3ee
--- /dev/null
@@ -0,0 +1,90 @@
+#!/bin/sh
+# Copyright (C) 2006 OpenWrt.org
+
+rom=$(awk '/squashfs/ {print $2}' /proc/mounts)
+jffs=$(awk '/jffs2/ {print $2}' /proc/mounts)
+
+dupe() { # <new_root> <old_root>
+       cd $1
+       echo -n "creating directories... "
+       {
+               cd $2 
+               find . -xdev -type d
+               echo "./dev ./jffs ./mnt ./proc ./tmp ./sys"
+               # xdev skips mounted directories
+               cd $1 
+       } | xargs mkdir -p
+       echo "done"
+
+       echo -n "setting up symlinks... "
+       for file in $(cd $2; find . -xdev -type f;); do
+               case "$file" in
+               ./rom/note) ;; #nothing
+               ./etc/config*|\
+               ./etc/resolv.conf|\
+               ./usr/lib/ipkg/info/*) cp -af $2/$file $file;;
+               *) ln -sf /rom/${file#./*} $file;;
+               esac
+       done
+       for file in $(cd $2; find . -xdev -type l;); do
+               cp -af $2/${file#./*} $file
+       done
+       echo "done"
+}
+
+pivot() { # <new_root> <old_root>
+       mount -o move /proc $1/proc && \
+       pivot_root $1 $1$2 && {
+               mount -o move $2/dev /dev
+               mount -o move $2/tmp /tmp
+               mount -o move $2/sys /sys
+               return 0
+       }
+}
+
+mountdp() { # <device> <mount_point> <ignored> <fs>
+        dev=$1; mnt=$2; shift 2; opt=$*
+       mount $dev $mnt $opt
+       dupe $mnt $rom
+       pivot $mnt /rom
+}
+
+ramoverlay() {
+       mkdir -p /tmp/root
+       mountdp /tmp/root /mnt -o bind
+}
+
+[ "${0##*/}" = "firstboot" ] && {
+       [ -z "$rom" ] && {
+               echo "You do not have a squashfs partition; aborting"
+               echo "(firstboot cannot be run on jffs2 based firmwares)"
+               exit 1
+       }
+
+       [ "$1" = "switch2jffs" ] && {
+               mtd erase OpenWrt
+               mount -o remount,ro none / # try to avoid fs changing while copying
+               mount -o bind / /mnt
+               mount /dev/mtdblock/4 /rom/jffs -t jffs2
+               echo -n "copying files ... "
+               cp -a /mnt/* /rom/jffs
+               umount /mnt
+               echo "done"
+               pivot /rom /mnt
+               mount -o move /mnt /tmp/root
+               pivot /jffs /rom
+               jffs2root --clean
+               exit 0
+       }
+
+       # script run manually
+       [ \! -z "$jffs" ] && {
+               echo "firstboot has already been run"
+               echo "jffs2 partition is mounted, only resetting files"
+               dupe $jffs $rom
+               exit 0
+       }
+
+       mtd erase OpenWrt
+       mountdp /dev/mtdblock/4 /jffs -t jffs2
+}
diff --git a/package/base-files/brcm-2.4/etc/config/wireless b/package/base-files/brcm-2.4/etc/config/wireless
new file mode 100644 (file)
index 0000000..9dc4945
--- /dev/null
@@ -0,0 +1,14 @@
+# Copyright (C) 2006 OpenWrt.org
+
+config wifi-device     wl0
+       option type     broadcom
+       option channel  5
+
+config wifi-iface
+       option device   wl0
+       option mode             ap
+       option ssid     OpenWrt
+       option hidden   0
+       option encryption none
+
+
diff --git a/package/base-files/brcm-2.4/etc/init.d/S05netconfig b/package/base-files/brcm-2.4/etc/init.d/S05netconfig
new file mode 100755 (executable)
index 0000000..71092da
--- /dev/null
@@ -0,0 +1,87 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
+
+start() {
+       [ -e /etc/config/network ] && exit 0
+
+       mkdir -p /etc/config
+
+       (
+               if grep -E 'mtd0: 000(6|a)0000' /proc/mtd 2>&- >&-; then
+                       # WGT634u
+                       echo boardtype=wgt634u
+               else
+                       strings /dev/mtdblock/3
+               fi
+       ) | awk '
+       function p(cfgname, name) {
+               if (c[name] != "") print "      option " cfgname "      \"" c[name] "\""
+       }
+       
+       BEGIN {
+               FS="="
+               c["lan_ifname"]="eth0.0 wl0"
+               c["wan_ifname"]="eth0.1"
+               c["vlan0ports"]="1 2 3 4 5*"
+               c["vlan1ports"]="0 5"
+       }
+       
+       ($1 == "boardnum") || ($1 == "boardtype") || ($1 == "boardflags") {
+               nvram[$1] = $2
+       }
+       
+       END {
+               # v1 hardware
+               if (nvram["boardtype"] == "bcm94710dev") {
+                       # Asus WL-500g
+                       if (nvram["boardnum"] == "asusX") {
+                               c["lan_ifname"]="eth0 eth1 wl0" # FIXME
+                               c["wan_ifname"]=""
+                       }
+               }
+               if (nvram["boardtype"] == "wgt634u") {
+                       c["vlan0ports"] = "0 1 2 3 5*"
+                       c["vlan1ports"] = "4 5"
+                       c["lan_ifname"] = "eth0.0 ath0"
+               }
+               if ((nvram["boardtype"] == "0x0467") || (nvram["boardtype"] == "0x042f")) {
+                       c["vlan0ports"] = "0 1 2 3 5*"
+                       c["vlan1ports"] = "4 5"
+               }
+       
+               # WAP54G
+               if ((nvram["boardnum"] == "2") || \
+                       (nvram["boardnum"] == "1024")) {
+                       c["lan_ifname"]="eth0 wl0"
+                       c["wan_ifname"]=""
+               }
+       
+               print "#### VLAN configuration "
+               print "config switch eth0"
+               p("vlan0", "vlan0ports")
+               p("vlan1", "vlan1ports")
+               print ""
+               print ""
+               print "#### Loopback configuration"
+               print "config interface loopback"
+               print " option ifname   \"lo\""
+               print " option proto    static"
+               print " option ipaddr   127.0.0.1"
+               print " option netmask  255.0.0.0"
+               print ""
+               print ""
+               print "#### LAN configuration"
+               print "config interface lan"
+               print " option type     bridge"
+               p("ifname", "lan_ifname")
+               print " option proto    static"
+               print " option ipaddr   192.168.1.1"
+               print " option netmask  255.255.255.0"
+               print ""
+               print ""
+               print "#### WAN configuration"
+               print "config interface wan"
+               p("ifname", "wan_ifname")
+               print " option proto    dhcp"
+       }' > /etc/config/network
+}
diff --git a/package/base-files/brcm-2.4/etc/preinit b/package/base-files/brcm-2.4/etc/preinit
new file mode 100755 (executable)
index 0000000..fb13e10
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+# Copyright (C) 2006 OpenWrt.org
+
+export PATH=/bin:/sbin:/usr/bin:/usr/sbin
+mount none /proc -t proc
+
+[ -f /etc/preinit.arch ] && . /etc/preinit.arch
+[ -z "$FAILSAFE" ] || {
+       echo /bin/true > /proc/sys/kernel/hotplug
+       telnetd -l /bin/login <> /dev/null 2>&1
+}
+mount_root ${FAILSAFE:+failsafe}
+exec /sbin/init
diff --git a/package/base-files/brcm-2.4/sbin/mount_root b/package/base-files/brcm-2.4/sbin/mount_root
new file mode 100755 (executable)
index 0000000..ec82cd4
--- /dev/null
@@ -0,0 +1,34 @@
+#!/bin/sh
+# Copyright (C) 2006 OpenWrt.org
+
+is_dirty() {
+       grep Broadcom /proc/cpuinfo >&- || return 1
+       OFFSET="$(($(hexdump -v /dev/mtdblock/1 -s 20 -n 2 -e '"%d"')-1))"
+       return $(hexdump -v /dev/mtdblock/1 -s $OFFSET -n 1 -e '"%d"')
+}
+
+size=$(awk '/Mem:/ {l=5242880;print((s=$2/2)<l)?$2-l:s}' /proc/meminfo)
+mount none /tmp -t tmpfs -o size=$size
+
+if [ "$1" != "failsafe" ]; then 
+       mtd unlock linux
+       mount | grep jffs2 >&-
+       if [ $? = 0 ] ; then
+               mount -o remount,rw /dev/root /
+       else
+               . /bin/firstboot
+               is_dirty 
+               [ $? != 0 ] && {
+                       echo "switching to jffs2"
+                       mount /dev/mtdblock/4 /jffs -t jffs2
+                       pivot /jffs /rom
+               } || {
+                       echo "jffs2 unusable; using ramdisk"
+                       ramoverlay
+               }
+       fi
+fi
+
+mount none /tmp -t tmpfs -o remount,nosuid,nodev,mode=1777
+mkdir -p /dev/pts
+mount none /dev/pts -t devpts
diff --git a/package/base-files/brcm-2.6/bin/firstboot b/package/base-files/brcm-2.6/bin/firstboot
new file mode 100755 (executable)
index 0000000..d37ce4f
--- /dev/null
@@ -0,0 +1,90 @@
+#!/bin/sh
+# Copyright (C) 2006 OpenWrt.org
+
+rom=$(awk '/squashfs/ {print $2}' /proc/mounts)
+jffs=$(awk '/jffs2/ {print $2}' /proc/mounts)
+
+dupe() { # <new_root> <old_root>
+       cd $1
+       echo -n "creating directories... "
+       {
+               cd $2 
+               find . -xdev -type d
+               echo "./dev ./jffs ./mnt ./proc ./tmp ./sys"
+               # xdev skips mounted directories
+               cd $1 
+       } | xargs mkdir -p
+       echo "done"
+
+       echo -n "setting up symlinks... "
+       for file in $(cd $2; find . -xdev -type f;); do
+               case "$file" in
+               ./rom/note) ;; #nothing
+               ./etc/config*|\
+               ./etc/resolv.conf|\
+               ./usr/lib/ipkg/info) cp -af $2/$file $file;;
+               *) ln -sf /rom/${file#./*} $file;;
+               esac
+       done
+       for file in $(cd $2; find . -xdev -type l;); do
+               cp -af $2/${file#./*} $file
+       done
+       echo "done"
+}
+
+pivot() { # <new_root> <old_root>
+       mount -o move /proc $1/proc && \
+       pivot_root $1 $1$2 && {
+               mount -o move $2/dev /dev
+               mount -o move $2/tmp /tmp
+               mount -o move $2/sys /sys
+               return 0
+       }
+}
+
+mountdp() { # <device> <mount_point> <ignored> <fs>
+        dev=$1; mnt=$2; shift 2; opt=$*
+       mount $dev $mnt $opt
+       dupe $mnt $rom
+       pivot $mnt /rom
+}
+
+ramoverlay() {
+       mkdir -p /tmp/root
+       mountdp /tmp/root /mnt -o bind
+}
+
+[ "${0##*/}" = "firstboot" ] && {
+       [ -z "$rom" ] && {
+               echo "You do not have a squashfs partition; aborting"
+               echo "(firstboot cannot be run on jffs2 based firmwares)"
+               exit 1
+       }
+
+       [ "$1" = "switch2jffs" ] && {
+               mtd erase OpenWrt
+               mount -o remount,ro none / # try to avoid fs changing while copying
+               mount -o bind / /mnt
+               mount /dev/mtdblock/4 /rom/jffs -t jffs2
+               echo -n "copying files ... "
+               cp -a /mnt/* /rom/jffs
+               umount /mnt
+               echo "done"
+               pivot /rom /mnt
+               mount -o move /mnt /tmp/root
+               pivot /jffs /rom
+               jffs2root --clean
+               exit 0
+       }
+
+       # script run manually
+       [ \! -z "$jffs" ] && {
+               echo "firstboot has already been run"
+               echo "jffs2 partition is mounted, only resetting files"
+               dupe $jffs $rom
+               exit 0
+       }
+
+       mtd erase OpenWrt
+       mountdp /dev/mtdblock/4 /jffs -t jffs2
+}
diff --git a/package/base-files/brcm-2.6/etc/init.d/S05netconfig b/package/base-files/brcm-2.6/etc/init.d/S05netconfig
new file mode 100755 (executable)
index 0000000..e37633e
--- /dev/null
@@ -0,0 +1,87 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
+
+start() {
+       [ -e /etc/config/network ] && exit 0
+       
+       mkdir -p /etc/config
+       
+       (
+               if grep -E 'mtd0: 000(6|a)0000' /proc/mtd 2>&- >&-; then
+                       # WGT634u
+                       echo boardtype=wgt634u
+               else
+                       strings /dev/mtdblock/3
+               fi
+       ) | awk '
+       function p(cfgname, name) {
+               if (c[name] != "") print "      option " cfgname "      \"" c[name] "\""
+       }
+       
+       BEGIN {
+               FS="="
+               c["lan_ifname"]="eth0.0 wl0"
+               c["wan_ifname"]="eth0.1"
+               c["vlan0ports"]="1 2 3 4 5*"
+               c["vlan1ports"]="0 5"
+       }
+       
+       ($1 == "boardnum") || ($1 == "boardtype") || ($1 == "boardflags") {
+               nvram[$1] = $2
+       }
+       
+       END {
+               # v1 hardware
+               if (nvram["boardtype"] == "bcm94710dev") {
+                       # Asus WL-500g
+                       if (nvram["boardnum"] == "asusX") {
+                               c["lan_ifname"]="eth0 eth1 wl0" # FIXME
+                               c["wan_ifname"]=""
+                       }
+               }
+               if (nvram["boardtype"] == "wgt634u") {
+                       c["vlan0ports"] = "0 1 2 3 5*"
+                       c["vlan1ports"] = "4 5"
+                       c["lan_ifname"] = "eth0.0 ath0"
+               }
+               if ((nvram["boardtype"] == "0x0467") || (nvram["boardtype"] == "0x042f")) {
+                       c["vlan0ports"] = "0 1 2 3 5*"
+                       c["vlan1ports"] = "4 5"
+               }
+       
+               # WAP54G
+               if ((nvram["boardnum"] == "2") || \
+                       (nvram["boardnum"] == "1024")) {
+                       c["lan_ifname"]="eth0 wl0"
+                       c["wan_ifname"]=""
+               }
+       
+               print "#### VLAN configuration "
+               print "config switch eth0"
+               p("vlan0", "vlan0ports")
+               p("vlan1", "vlan1ports")
+               print ""
+               print ""
+               print "#### Loopback configuration"
+               print "config interface loopback"
+               print " option ifname   \"lo\""
+               print " option proto    static"
+               print " option ipaddr   127.0.0.1"
+               print " option netmask  255.0.0.0"
+               print ""
+               print ""
+               print "#### LAN configuration"
+               print "config interface lan"
+               print " option type     bridge"
+               p("ifname", "lan_ifname")
+               print " option proto    static"
+               print " option ipaddr   192.168.1.1"
+               print " option netmask  255.255.255.0"
+               print ""
+               print ""
+               print "#### WAN configuration"
+               print "config interface wan"
+               p("ifname", "wan_ifname")
+               print " option proto    dhcp"
+       }' > /etc/config/network
+}
diff --git a/package/base-files/brcm-2.6/etc/preinit b/package/base-files/brcm-2.6/etc/preinit
new file mode 100755 (executable)
index 0000000..fb13e10
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+# Copyright (C) 2006 OpenWrt.org
+
+export PATH=/bin:/sbin:/usr/bin:/usr/sbin
+mount none /proc -t proc
+
+[ -f /etc/preinit.arch ] && . /etc/preinit.arch
+[ -z "$FAILSAFE" ] || {
+       echo /bin/true > /proc/sys/kernel/hotplug
+       telnetd -l /bin/login <> /dev/null 2>&1
+}
+mount_root ${FAILSAFE:+failsafe}
+exec /sbin/init
diff --git a/package/base-files/brcm-2.6/sbin/mount_root b/package/base-files/brcm-2.6/sbin/mount_root
new file mode 100755 (executable)
index 0000000..e3bdd36
--- /dev/null
@@ -0,0 +1,35 @@
+#!/bin/sh
+# Copyright (C) 2006 OpenWrt.org
+
+is_dirty() {
+       grep Broadcom /proc/cpuinfo >&- || return 1
+       OFFSET="$(($(hexdump -v /dev/mtdblock/1 -s 20 -n 2 -e '"%d"')-1))"
+       return $(hexdump -v /dev/mtdblock/1 -s $OFFSET -n 1 -e '"%d"')
+}
+
+size=$(awk '/Mem:/ {l=5242880;print((s=$2/2)<l)?$2-l:s}' /proc/meminfo)
+mount none /tmp -t tmpfs -o size=$size
+
+if [ "$1" != "failsafe" ]; then 
+       mtd unlock linux
+       mount | grep jffs2 >&-
+       if [ $? = 0 ] ; then
+               mount -o remount,rw /dev/root /
+       else
+               . /bin/firstboot
+               is_dirty 
+               [ $? != 0 ] && {
+                       echo "switching to jffs2"
+                       mount /dev/mtdblock/4 /jffs -t jffs2
+                       pivot /jffs /rom
+               } || {
+                       echo "jffs2 unusable; using ramdisk"
+                       ramoverlay
+               }
+       fi
+fi
+
+mount none /tmp -t tmpfs -o remount,nosuid,nodev,mode=1777
+mkdir -p /dev/pts
+mount none /dev/pts -t devpts
+mount -t sysfs none /sys 2>&-
diff --git a/package/base-files/default/bin/ipcalc b/package/base-files/default/bin/ipcalc
new file mode 100755 (executable)
index 0000000..e8efa6b
--- /dev/null
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+awk -f /usr/lib/common.awk -f - $* <<EOF
+BEGIN {
+       ipaddr=ip2int(ARGV[1])
+       netmask=ip2int(ARGV[2])
+       network=and(ipaddr,netmask)
+       broadcast=or(network,compl(netmask))
+       
+       start=or(network,and(ip2int(ARGV[3]),compl(netmask)))
+       limit=network+1
+       if (start<limit) start=limit
+       
+       end=start+ARGV[4]
+       limit=or(network,compl(netmask))-1
+       if (end>limit) end=limit
+
+       print "IP="int2ip(ipaddr)
+       print "NETMASK="int2ip(netmask)
+       print "BROADCAST="int2ip(broadcast)
+       print "NETWORK="int2ip(network)
+       print "PREFIX="32-bitcount(compl(netmask))
+       
+       # range calculations:
+       # ipcalc <ip> <netmask> <start> <num>
+       
+       if (ARGC > 3) {
+               print "START="int2ip(start)
+               print "END="int2ip(end-1)
+       }
+}
+EOF
diff --git a/package/base-files/default/bin/login b/package/base-files/default/bin/login
new file mode 100755 (executable)
index 0000000..ff5d366
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/sh
+# Copyright (C) 2006 OpenWrt.org
+
+grep '^root:[^!]' /etc/passwd >&- 2>&-
+[ "$?" = "0" -a -z "$FAILSAFE" ]  &&  
+{
+    echo "Login failed."
+    exit 0
+} || {
+cat << EOF
+ === IMPORTANT ============================
+  Use 'passwd' to set your login password
+  this will disable telnet and enable SSH
+ ------------------------------------------
+EOF
+}
+
+exec /bin/ash --login
diff --git a/package/base-files/default/bin/uci b/package/base-files/default/bin/uci
new file mode 100755 (executable)
index 0000000..7f43549
--- /dev/null
@@ -0,0 +1,159 @@
+#!/bin/sh
+# Shell script for interacting with config files
+#
+# Copyright (C) 2006 by Fokus Fraunhofer <carsten.tittel@fokus.fraumhofer.de>
+# Copyright (C) 2006 by Felix Fietkau <nbd@openwrt.org>
+#
+# 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; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+. /etc/functions.sh
+include /lib/config
+
+do_get() {
+       [ $# -ne 3 ] && {
+               uci_usage get
+               exit 1
+       }
+       local PACKAGE="$1"
+       local CONFIG="$2"
+       local OPTION="$3"
+
+       uci_load "$PACAKGE"
+       config_get "$CONFIG" "$OPTION"
+}
+
+do_set() {
+       [ $# -ne 4 ] && {
+               uci_usage set
+               exit 1
+       }
+       uci_set "$@"
+}
+
+do_add() {
+       [ $# -ne 3 ] && {
+               uci_usage add
+               exit 1
+       }
+       uci_add "$@"
+}
+
+do_rename() {
+       [ $# -ne 3 ] && {
+               uci_usage rename
+               exit 1
+       }
+       uci_rename "$@"
+}
+
+do_remove() {
+       [ $# -ne 3 -a $# -ne 2 ] && {
+               uci_usage rename
+               exit 1
+       }
+       uci_remove "$@"
+}
+
+do_commit() {
+       [ $# -ne 1 ] && {
+               uci_usage commit
+               exit 1
+       }
+       uci_commit "$1"
+}
+
+do_show() {
+       [ $# -gt 2 -o $# -lt 1 ] && {
+               uci_usage show
+               exit 1
+       }
+       
+       PACKAGE="$1"
+       CONFIG="$2"
+       SECTION=""
+       
+       config_cb() {
+               if [ -z "$CONFIG" -o "$CONFIG" = "$2" ]; then
+                       append SECTION "$2"
+                       option_cb() {
+                               append "${CONFIG_SECTION}_VARS" "$1"
+                       }
+               else
+                       option_cb() {
+                               return 0
+                       }
+               fi
+       }
+                       
+       uci_load "$PACKAGE"
+       
+       for section in $SECTION; do
+               config_get type "$section" TYPE
+               [ -z "$type" ] && continue
+               echo "@$section=$type"
+               eval "VARS=\"\${${section}_VARS}\""
+               for var in $VARS; do
+                       config_get val "$section" "$var"
+                       [ -n "$val" ] && {
+                               echo "${section}.${var}=${val}"
+                               config_set "$section" "$var" ""
+                       }
+               done
+               config_set "$section" TYPE ""
+       done
+}
+
+uci_usage() {
+       case "$1" in
+               show) echo "$0 show <package> [<config>]";;
+               get) echo "$0 get <package> <config> <option>";;
+               set) echo "$0 set <package> <config> <option> <value>";;
+               add) echo "$0 add <package> <type> <config>";;
+               del) echo "$0 del <package> <config> [<option>]";;
+               rename) echo "$0 rename <package> <config> <name>";;
+               commit) echo "$0 commit <package>";;
+               *) 
+                       echo "Syntax: $0 <command> <arguments...>"
+                       echo
+                       uci_usage show
+                       uci_usage get
+                       uci_usage set
+          &nb