remove lzma loader config option (make it default) and move it from package/ to target/
authorFelix Fietkau <nbd@openwrt.org>
Sat, 2 Apr 2005 19:06:50 +0000 (19:06 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sat, 2 Apr 2005 19:06:50 +0000 (19:06 +0000)
SVN-Revision: 530

openwrt/package/Config.in
openwrt/package/loader/Config.in [deleted file]
openwrt/package/loader/Makefile [deleted file]
openwrt/package/loader/patches/toolchain.patch [deleted file]
openwrt/rules.mk
openwrt/target/Makefile
openwrt/target/jffs2/Makefile
openwrt/target/lzma-loader/Makefile [new file with mode: 0644]
openwrt/target/lzma-loader/patches/toolchain.patch [new file with mode: 0644]
openwrt/target/squashfs-lzma/Makefile

index 8b46c15f1d9bc912d8d749a4ffce9819d88fddd8..3f5afce1b750640e97cbf96c1fdc49d2a412da8b 100644 (file)
@@ -3,7 +3,6 @@
 menu "OpenWrt Package Selection"
 
 comment "The default set"
-source "package/loader/Config.in"
 source "package/busybox/Config.in"
 source "package/dnsmasq/Config.in"
 source "package/iptables/Config.in"
diff --git a/openwrt/package/loader/Config.in b/openwrt/package/loader/Config.in
deleted file mode 100644 (file)
index 8a55930..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-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/openwrt/package/loader/Makefile b/openwrt/package/loader/Makefile
deleted file mode 100644 (file)
index bfeca21..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-# $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/openwrt/package/loader/patches/toolchain.patch b/openwrt/package/loader/patches/toolchain.patch
deleted file mode 100644 (file)
index 6961705..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
---- 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)
index 6e804857f1f7bf56f490f76507bc8bb4f3169fbc..d403260ddb5cd3de0b762df0366ce816c6f23489 100644 (file)
@@ -73,6 +73,7 @@ LINUX_VERSION=2.4.29
 LINUX_DIR:=$(BUILD_DIR)/linux
 LINUX_HEADERS_DIR:=$(TOOL_BUILD_DIR)/linux
 LINUX_KERNEL:=$(BUILD_DIR)/buildroot-kernel
+LINUX_IMAGE:=$(BUILD_DIR)/buildroot-kernel-image
 MODULES_SUBDIR := lib/modules/$(LINUX_VERSION)
 MODULES_DIR := $(BUILD_DIR)/modules/$(MODULES_SUBDIR)
 
index c8baab5f7ab658e859ecaa71ac290b8445dca154..6a1bd954a0dac1629c25c868ef356de1da42041a 100644 (file)
@@ -29,20 +29,9 @@ IMAGE_TARGETS += $(BIN_DIR)/openwrt-motorola-$(1).bin
 endif
 endef
 
-#  Enable loader and prepare kernel
-ifeq ($(strip $(BR2_PACKAGE_LOADER)),y)
-export LINUX_LOADER=$(BUILD_DIR)/lzmaldr
-export LINUX_IMAGE=$(BUILD_DIR)/piggy.lzma
-else
-export LINUX_IMAGE=$(BUILD_DIR)/piggy.gz
-endif
-
-$(BUILD_DIR)/piggy.lzma: $(LINUX_KERNEL)
+$(LINUX_IMAGE): $(LINUX_KERNEL)
        cat $^ | $(BUILD_DIR)/lzma/lzma e -si -so -eos > $@ || (rm -f $@ && false)
 
-$(BUILD_DIR)/piggy.gz: $(LINUX_KERNEL)
-       cat $^ | gzip -c9 $^ > $@ || (rm -f $@ && false)
-
 TARGET_DIRS:=
 TARGET_FS:=
 IMAGE_TARGETS:=
@@ -83,6 +72,7 @@ prepare: $(patsubst %,%-prepare,$(TARGET_DIRS))
 $(BIN_DIR):
        mkdir -p $(BIN_DIR)
 
+$(INSTALL_TARGET_DIRS): lzma-loader-compile
 compile: $(patsubst %,%-compile,$(TARGET_DIRS))
 install: utils-install lzma-install $(LINUX_IMAGE) $(patsubst %,%-install,$(TARGET_DIRS)) $(IMAGE_TARGETS)
 clean: $(patsubst %,%-clean,$(TARGET_DIRS)) image_clean
index ca61febf2ef091d629bfe686768241d74ff47545..01dede7d7a67296af6f8d7a1ec800b0b3ea7e778 100644 (file)
@@ -12,13 +12,13 @@ clean: jffs2root-dirclean
 $(BIN_DIR)/openwrt-generic-jffs2-4MB.trx:
        $(MKFS_JFFS2) --pad --little-endian --squash -e 0x10000 \
                -d $(TARGET_DIR) -o $(IMAGE)-4MB.jffs2
-       PATH=$(TARGET_PATH) trx -o $@ $(LINUX_LOADER) \
+       PATH=$(TARGET_PATH) trx -o $@ $(BUILD_DIR)/loader.gz \
         $(LINUX_IMAGE) -a 0x10000 $(IMAGE)-4MB.jffs2
 
 $(BIN_DIR)/openwrt-generic-jffs2-8MB.trx:
        $(MKFS_JFFS2) --pad --little-endian --squash -e 0x20000 \
                -d $(TARGET_DIR) -o $(IMAGE)-8MB.jffs2
-       PATH=$(TARGET_PATH) trx -o $@ $(LINUX_LOADER) \
+       PATH=$(TARGET_PATH) trx -o $@ $(BUILD_DIR)/loader.gz \
         $(LINUX_IMAGE) -a 0x20000 $(IMAGE)-8MB.jffs2
         
 $(BIN_DIR)/openwrt-wrt54g-jffs2.bin: $(BIN_DIR)/openwrt-generic-jffs2-4MB.trx
diff --git a/openwrt/target/lzma-loader/Makefile b/openwrt/target/lzma-loader/Makefile
new file mode 100644 (file)
index 0000000..826194e
--- /dev/null
@@ -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)/loader.gz: $(PKG_BUILD_DIR)/loader.gz
+       cp $< $@
+
+source: $(DL_DIR)/$(PKG_SOURCE_FILE)
+prepare: $(PKG_BUILD_DIR)/.patched
+compile: $(BUILD_DIR)/loader.gz
+install:
+
+clean:
+       rm -rf $(PKG_BUILD_DIR)
+       rm -f $(BUILD_DIR)/loader.gz
diff --git a/openwrt/target/lzma-loader/patches/toolchain.patch b/openwrt/target/lzma-loader/patches/toolchain.patch
new file mode 100644 (file)
index 0000000..6961705
--- /dev/null
@@ -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)
index 8e7e8e47921e5770a070abdf952e0accf267030c..8da08b39090afac84a6397e511dfb12b519ae76c 100644 (file)
@@ -11,6 +11,6 @@ clean: squashfslzmaroot-dirclean
 $(BIN_DIR)/openwrt-generic-squashfs.trx:
        @mkdir -p $(TARGET_DIR)/jffs
        $(SQUASHFSLZMA_DIR)/squashfs-tools/mksquashfs-lzma $(TARGET_DIR) $(IMAGE).squashfslzma -noappend -root-owned -le
-       PATH=$(TARGET_PATH) trx -o $@ $(LINUX_LOADER) \
+       PATH=$(TARGET_PATH) trx -o $@ $(BUILD_DIR)/loader.gz \
         $(LINUX_IMAGE) $(IMAGE).squashfslzma