diff options
author | Imre Kaloz <kaloz@openwrt.org> | 2005-04-02 16:43:51 +0000 |
---|---|---|
committer | Imre Kaloz <kaloz@openwrt.org> | 2005-04-02 16:43:51 +0000 |
commit | 633967445521c8ad00d1a7b4774a42afa9ca410a (patch) | |
tree | def971cf3642e7b68a0d8b666ce7986860134e6b /package | |
parent | a444cc26a3eadab6f8143c0a1ff193511c07903d (diff) | |
download | upstream-633967445521c8ad00d1a7b4774a42afa9ca410a.tar.gz upstream-633967445521c8ad00d1a7b4774a42afa9ca410a.tar.bz2 upstream-633967445521c8ad00d1a7b4774a42afa9ca410a.zip |
add missing stuff for lzma bootloader
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@522 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rw-r--r-- | package/loader/Config.in | 6 | ||||
-rw-r--r-- | package/loader/Makefile | 39 | ||||
-rw-r--r-- | package/loader/patches/toolchain.patch | 12 |
3 files changed, 57 insertions, 0 deletions
diff --git a/package/loader/Config.in b/package/loader/Config.in new file mode 100644 index 0000000000..8a559300d9 --- /dev/null +++ b/package/loader/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_LOADER + bool "LZMA compressed kernel loader" + default y + help + LZMA compressed kernel loader (saves much space in the flash) + diff --git a/package/loader/Makefile b/package/loader/Makefile new file mode 100644 index 0000000000..bfeca21c9b --- /dev/null +++ b/package/loader/Makefile @@ -0,0 +1,39 @@ +# $Id$ + +include $(TOPDIR)/rules.mk + +PKG_NAME := loader +PKG_VERSION := 0.03 +PKG_MD5SUM := 2681e6db8e0fe6095f6a90ad9b3f2d33 + +PKG_SOURCE_SITE := http://wl500g.dyndns.org/loader/ +PKG_SOURCE_FILE := $(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_CAT := zcat +PKG_SOURCE_DIR := $(PKG_NAME)-$(PKG_VERSION) +PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_SOURCE_DIR) + +$(DL_DIR)/$(PKG_SOURCE_FILE): + mkdir -p $(DL_DIR) + $(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE_FILE) $(PKG_MD5SUM) $(PKG_SOURCE_SITE) + +$(PKG_BUILD_DIR)/.patched: $(DL_DIR)/$(PKG_SOURCE_FILE) + mkdir -p $(TOOL_BUILD_DIR) + $(PKG_SOURCE_CAT) $(DL_DIR)/$(PKG_SOURCE_FILE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - + $(PATCH) $(PKG_BUILD_DIR) ./patches + touch $(PKG_BUILD_DIR)/.patched + +$(PKG_BUILD_DIR)/loader.gz: $(PKG_BUILD_DIR)/.patched + $(MAKE) -C $(PKG_BUILD_DIR) CC=$(TARGET_CC) \ + LD=$(TARGET_CROSS)ld CROSS_COMPILE=$(TARGET_CROSS) + +$(BUILD_DIR)/lzmaldr: $(PKG_BUILD_DIR)/loader.gz + cp $< $@ + +source: $(DL_DIR)/$(PKG_SOURCE_FILE) +prepare: $(PKG_BUILD_DIR)/.patched +compile: $(BUILD_DIR)/lzmaldr +install: + +clean: + rm -rf $(PKG_BUILD_DIR) + rm -f $(BUILD_DIR)/lzmaldr diff --git a/package/loader/patches/toolchain.patch b/package/loader/patches/toolchain.patch new file mode 100644 index 0000000000..69617056b3 --- /dev/null +++ b/package/loader/patches/toolchain.patch @@ -0,0 +1,12 @@ +--- loader-0.03/Makefile 2005-03-28 22:15:24.569677129 +0400 ++++ loader/Makefile 2005-03-28 22:16:42.339989214 +0400 +@@ -24,7 +24,8 @@ + + CFLAGS = -D__KERNEL__ -Wall -Wstrict-prototypes -Wno-trigraphs -O2 \ + -fno-strict-aliasing -fno-common -fomit-frame-pointer -G 0 -mno-abicalls -fno-pic \ +- -ffunction-sections -pipe -mcpu=r4600 -mips2 -Wa,--trap -m4710a0kern ++ -ffunction-sections -pipe -mlong-calls -fno-common \ ++ -mabi=32 -march=mips32 -Wa,-32 -Wa,-march=mips32 -Wa,-mips32 -Wa,--trap + CFLAGS += -DLOADADDR=$(TEXT_START) -D_LZMA_IN_CB + + ASFLAGS = $(CFLAGS) -D__ASSEMBLY__ -DBZ_TEXT_START=$(BZ_TEXT_START) |