summaryrefslogtreecommitdiffstats
path: root/openwrt/package/sdk/files
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-04-20 17:01:30 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-04-20 17:01:30 +0000
commitd4acdafcf724057bc9b718170c54b420f46c40b4 (patch)
treed54625559910142e0895d8a2318d003de21a286c /openwrt/package/sdk/files
parentb91216ac5fe33ba6166ab40915fdb8040f470b4e (diff)
add openwrt image builder to sdk
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@688 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'openwrt/package/sdk/files')
-rw-r--r--openwrt/package/sdk/files/Makefile.ib61
-rw-r--r--openwrt/package/sdk/files/README.ImageBuilder8
-rw-r--r--openwrt/package/sdk/files/sysconf4
3 files changed, 73 insertions, 0 deletions
diff --git a/openwrt/package/sdk/files/Makefile.ib b/openwrt/package/sdk/files/Makefile.ib
new file mode 100644
index 000000000..9fbfeee51
--- /dev/null
+++ b/openwrt/package/sdk/files/Makefile.ib
@@ -0,0 +1,61 @@
+# OpenWrt SDK Makefile
+TOPDIR:=${shell pwd}
+BIN_DIR:=$(TOPDIR)/bin
+BUILD_DIR:=$(TOPDIR)/build
+TARGET_PATH := $(TOPDIR)/utils
+MKFS_JFFS2:=$(TOPDIR)/utils/mkfs.jffs2
+IMAGE:=$(BUILD_DIR)/root_fs
+TARGET_DIR:=$(TOPDIR)/root
+SED:=PATH="$(TARGET_PATH)" sed -i -e
+PACKAGE_DIR=$(TOPDIR)/packages
+IPKG:=IPKG_INSTROOT=$(TARGET_DIR) IPKG_CONF_DIR=$(BUILD_DIR)/etc $(TARGET_DIR)/bin/ipkg -force-defaults -force-depends
+
+all: build
+
+include ./include/jffs2.mk
+include ./include/squashfs-lzma.mk
+
+IMAGE_TARGETS := $(JFFS2_TARGETS) $(SQUASHFS_TARGETS)
+TARGET_FS:=squashfs jffs2
+
+define IMAGE_template
+$(BIN_DIR)/openwrt-wrt54g-$(1).bin: $(BIN_DIR)/openwrt-generic-$(patsubst jffs2,jffs2-4MB,$(1)).trx
+ PATH=$(TARGET_PATH) addpattern -2 -i $$< -o $$@ -g
+ $(SED) "1s,^W54S,W54G," $$@
+
+$(BIN_DIR)/openwrt-wrt54gs-$(1).bin: $(BIN_DIR)/openwrt-generic-$(patsubst jffs2,jffs2-8MB,$(1)).trx
+ PATH=$(TARGET_PATH) addpattern -2 -i $$< -o $$@ -g
+
+IMAGE_TARGETS += $(BIN_DIR)/openwrt-wrt54g-$(1).bin
+IMAGE_TARGETS += $(BIN_DIR)/openwrt-wrt54gs-$(1).bin
+
+
+$(BIN_DIR)/openwrt-motorola-$(1).bin: $(BIN_DIR)/openwrt-generic-$(patsubst jffs2,jffs2-8MB,$(1)).trx
+ PATH=$(TARGET_PATH) motorola-bin $$< $$@
+
+IMAGE_TARGETS += $(BIN_DIR)/openwrt-motorola-$(1).bin
+endef
+
+$(foreach fs,$(TARGET_FS),$(eval $(call IMAGE_template,$(fs))))
+
+$(IMAGE_TARGETS): $(TARGET_DIR) $(BIN_DIR) packages_install
+
+$(BIN_DIR):
+ mkdir -p $@
+
+$(TARGET_DIR):
+ mkdir -p $@
+ cp -a $(TOPDIR)/target_skeleton/* $(TARGET_DIR)/
+
+$(BUILD_DIR)/etc/ipkg.conf:
+ mkdir -p $(BUILD_DIR)/etc
+ echo -e 'dest root /\noption offline_root $(TARGET_DIR)' > $@
+
+packages_install: $(TARGET_DIR) $(BUILD_DIR)/etc/ipkg.conf
+ for package in $(PACKAGE_DIR)/*.ipk; do \
+ $(IPKG) install $$package; \
+ done
+
+build: clean $(IMAGE_TARGETS)
+clean:
+ rm -rf $(TARGET_DIR) $(BIN_DIR) $(IMAGE)-* $(BUILD_DIR)/etc
diff --git a/openwrt/package/sdk/files/README.ImageBuilder b/openwrt/package/sdk/files/README.ImageBuilder
new file mode 100644
index 000000000..7bf89392a
--- /dev/null
+++ b/openwrt/package/sdk/files/README.ImageBuilder
@@ -0,0 +1,8 @@
+This is the OpenWrt Image Builder. You can use it to make customized
+OpenWrt Images without having to compile anything.
+
+Just put all the extra packages you need in packages/ and make changes
+to target_skeleton if you like.
+
+After that run 'make' and it will build the OpenWrt images in the bin/
+directory.
diff --git a/openwrt/package/sdk/files/sysconf b/openwrt/package/sdk/files/sysconf
new file mode 100644
index 000000000..326a5823d
--- /dev/null
+++ b/openwrt/package/sdk/files/sysconf
@@ -0,0 +1,4 @@
+BR2_SYSCONF_TELNET_FAILSAFE_ONLY=y
+BR2_SYSCONF_FAILSAFE_IP="192.168.1.1"
+BR2_SYSCONF_FAILSAFE_NETMASK="255.255.255.0"
+BR2_SYSCONF_FAILSAFE_MAC="00:00:BA:DC:0D:ED"