OpenWrt – Diff between revs 2 and 3
?pathlinks?
Rev 2 | Rev 3 | |||
---|---|---|---|---|
1 | # |
1 | # |
|
2 | # Copyright (C) 2012 OpenWrt.org |
2 | # Copyright (C) 2012 OpenWrt.org |
|
3 | # |
3 | # |
|
4 | # This is free software, licensed under the GNU General Public License v2. |
4 | # This is free software, licensed under the GNU General Public License v2. |
|
5 | # See /LICENSE for more information. |
5 | # See /LICENSE for more information. |
|
6 | # |
6 | # |
|
7 | |
7 | |
|
8 | include $(TOPDIR)/rules.mk |
8 | include $(TOPDIR)/rules.mk |
|
9 | include $(INCLUDE_DIR)/kernel.mk |
9 | include $(INCLUDE_DIR)/kernel.mk |
|
10 | |
10 | |
|
11 | PKG_NAME:=trelay |
11 | PKG_NAME:=trelay |
|
12 | PKG_VERSION:=0.1 |
12 | PKG_VERSION:=0.1 |
|
13 | PKG_RELEASE:=2 |
13 | PKG_RELEASE:=1 |
|
14 | |
14 | |
|
15 | include $(INCLUDE_DIR)/package.mk |
15 | include $(INCLUDE_DIR)/package.mk |
|
16 | |
16 | |
|
17 | define KernelPackage/trelay |
17 | define KernelPackage/trelay |
|
18 | SUBMENU:=Network Support |
18 | SUBMENU:=Network Support |
|
19 | TITLE:=Trivial Ethernet Relay |
19 | TITLE:=Trivial Ethernet Relay |
|
20 | FILES:=$(PKG_BUILD_DIR)/trelay.ko |
20 | FILES:=$(PKG_BUILD_DIR)/trelay.ko |
|
21 | AUTOLOAD:=$(call AutoLoad,50,trelay) |
21 | AUTOLOAD:=$(call AutoLoad,50,trelay) |
|
22 | endef |
22 | endef |
|
23 | |
23 | |
|
24 | define KernelPackage/trelay/description |
24 | define KernelPackage/trelay/description |
|
25 | trelay relays ethernet packets between two devices (similar to a bridge), but |
25 | trelay relays ethernet packets between two devices (similar to a bridge), but |
|
26 | without any MAC address checks. This makes it possible to bridge client mode |
26 | without any MAC address checks. This makes it possible to bridge client mode |
|
27 | or ad-hoc mode wifi devices to ethernet VLANs, assuming the remote end uses |
27 | or ad-hoc mode wifi devices to ethernet VLANs, assuming the remote end uses |
|
28 | the same source MAC address as the device that packets are supposed to exit |
28 | the same source MAC address as the device that packets are supposed to exit |
|
29 | from. |
29 | from. |
|
30 | endef |
30 | endef |
|
31 | |
31 | |
|
32 | include $(INCLUDE_DIR)/kernel-defaults.mk |
32 | include $(INCLUDE_DIR)/kernel-defaults.mk |
|
33 | |
33 | |
|
34 | define Build/Compile |
34 | define Build/Compile |
|
35 | $(KERNEL_MAKE) SUBDIRS="$(PKG_BUILD_DIR)" modules |
35 | $(KERNEL_MAKE) SUBDIRS="$(PKG_BUILD_DIR)" modules |
|
36 | endef |
36 | endef |
|
37 | |
37 | |
|
38 | define KernelPackage/trelay/conffiles |
38 | define KernelPackage/trelay/conffiles |
|
39 | /etc/config/trelay |
39 | /etc/config/trelay |
|
40 | endef |
40 | endef |
|
41 | |
41 | |
|
42 | define KernelPackage/trelay/install |
42 | define KernelPackage/trelay/install |
|
43 | $(INSTALL_DIR) $(1)/etc/hotplug.d/net $(1)/etc/init.d $(1)/etc/config |
43 | $(INSTALL_DIR) $(1)/etc/hotplug.d/net $(1)/etc/init.d $(1)/etc/config |
|
44 | $(INSTALL_CONF) ./files/trelay.hotplug $(1)/etc/hotplug.d/net/50-trelay |
44 | $(INSTALL_DATA) ./files/trelay.hotplug $(1)/etc/hotplug.d/net/50-trelay |
|
45 | $(INSTALL_BIN) ./files/trelay.init $(1)/etc/init.d/trelay |
45 | $(INSTALL_BIN) ./files/trelay.init $(1)/etc/init.d/trelay |
|
46 | $(INSTALL_CONF) ./files/trelay.config $(1)/etc/config/trelay |
46 | $(INSTALL_DATA) ./files/trelay.config $(1)/etc/config/trelay |
|
47 | endef |
47 | endef |
|
48 | |
48 | |
|
49 | $(eval $(call KernelPackage,trelay)) |
49 | $(eval $(call KernelPackage,trelay)) |
|
50 | |
50 | |