finally move buildroot-ng to trunk
commit
60c1f0f64d
@ -0,0 +1,2 @@
|
||||
world ${.TARGETS}:
|
||||
@gmake $@
|
@ -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"
|
||||
|
@ -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
|
||||
%: ;
|
@ -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
|
||||
|
||||
|
@ -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>
|
||||
|
@ -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.
|
||||
|
@ -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.
|
@ -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
|
@ -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" >> $@; \
|
||||
)
|
||||
|
@ -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
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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))
|
||||
|
||||
|
||||
|
@ -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))
|
||||