aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--package/kernel/modules/network.mk9
-rw-r--r--target/linux/atheros/image/Makefile33
-rw-r--r--target/linux/generic-2.6/image/lzma-loader/src/Makefile4
-rw-r--r--target/linux/generic-2.6/image/lzma-loader/src/decompress.c3
-rw-r--r--tools/firmware-utils/src/mkzynfw.c2
5 files changed, 47 insertions, 4 deletions
diff --git a/package/kernel/modules/network.mk b/package/kernel/modules/network.mk
index f15517b814..174b746a05 100644
--- a/package/kernel/modules/network.mk
+++ b/package/kernel/modules/network.mk
@@ -240,6 +240,15 @@ $(eval $(call KernelPackage,ipv6))
define KernelPackage/sit
SUBMENU:=$(NETWORK_SUPPORT_MENU)
TITLE:=IPv6-in-IPv4 tunnelling
+endef
+
+# sit is compiled in the 2.4 ipv6 stack
+define KernelPackage/sit/2.4
+ DEPENDS:= @LINUX_2_4 +kmod-ipv6
+ KCONFIG:=CONFIG_IPV6
+endef
+
+define KernelPackage/sit/2.6
DEPENDS:= @LINUX_2_6 +kmod-ipv6 +kmod-iptunnel4
KCONFIG+=CONFIG_IPV6_SIT
FILES:=$(LINUX_DIR)/net/ipv6/sit.$(LINUX_KMOD_SUFFIX)
diff --git a/target/linux/atheros/image/Makefile b/target/linux/atheros/image/Makefile
index eb335e0667..b8ca313e0d 100644
--- a/target/linux/atheros/image/Makefile
+++ b/target/linux/atheros/image/Makefile
@@ -7,12 +7,34 @@
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
-define Image/BuildKernel
+LOADADDR = 0x81000000 # RAM start + 16M
+KERNEL_ENTRY = 0x80041000
+RAMSIZE = 0x00100000 # 1MB
+IMAGE_COPY = 1
+
+LOADER_MAKEOPTS= \
+ KDIR=$(KDIR) \
+ LOADADDR=$(LOADADDR) \
+ KERNEL_ENTRY=$(KERNEL_ENTRY) \
+ RAMSIZE=$(RAMSIZE) \
+ IMAGE_COPY=$(IMAGE_COPY)
+
+define Build/Clean
+ $(MAKE) -C $(GENERIC_PLATFORM_DIR)/image/lzma-loader $(LOADER_MAKEOPTS) clean
+endef
+
+define Image/Prepare
cp $(KDIR)/vmlinux.elf $(BIN_DIR)/openwrt-$(BOARD)-vmlinux.elf
gzip -9 -c $(KDIR)/vmlinux > $(KDIR)/vmlinux.bin.gz
$(STAGING_DIR_HOST)/bin/lzma e $(KDIR)/vmlinux $(KDIR)/vmlinux.bin.l7
dd if=$(KDIR)/vmlinux.bin.l7 of=$(BIN_DIR)/openwrt-$(BOARD)-vmlinux.lzma bs=65536 conv=sync
dd if=$(KDIR)/vmlinux.bin.gz of=$(BIN_DIR)/openwrt-$(BOARD)-vmlinux.gz bs=65536 conv=sync
+ cat $(KDIR)/vmlinux | $(STAGING_DIR_HOST)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux.lzma
+ $(MAKE) -C $(GENERIC_PLATFORM_DIR)/image/lzma-loader $(LOADER_MAKEOPTS) clean compile
+endef
+
+define Image/BuildKernel
+ $(CP) $(KDIR)/loader.bin $(BIN_DIR)/openwrt-$(BOARD)-vmlinux
endef
define Image/Build/squashfs
@@ -24,5 +46,14 @@ define Image/Build
dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-root.$(1) bs=128k conv=sync
endef
+ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
+ define Image/Prepare
+ cat $(KDIR)/vmlinux | $(STAGING_DIR_HOST)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux.lzma
+ $(MAKE) -C $(GENERIC_PLATFORM_DIR)/image/lzma-loader $(LOADER_MAKEOPTS) clean compile
+ endef
+ define Image/BuildKernel
+ $(CP) $(KDIR)/loader.bin $(BIN_DIR)/openwrt-$(BOARD)-vmlinux
+ endef
+endif
$(eval $(call BuildImage))
diff --git a/target/linux/generic-2.6/image/lzma-loader/src/Makefile b/target/linux/generic-2.6/image/lzma-loader/src/Makefile
index 910172c4f8..d5f712a1db 100644
--- a/target/linux/generic-2.6/image/lzma-loader/src/Makefile
+++ b/target/linux/generic-2.6/image/lzma-loader/src/Makefile
@@ -49,7 +49,7 @@ lzma.bin: lzma.elf
ifeq ($(IMAGE_COPY),1)
LOADER_ENTRY ?= $(KERNEL_ENTRY)
-lzma.o: decompress.o LzmaDecode.o kernel.o
+lzma.o: decompress.o LzmaDecode.o kernel.o print.o printf.o uart16550.o
sed -e 's,@LOADADDR@,$(LOADADDR),g' -e 's,@ENTRY@,entry,g' lzma.lds.in >lzma-stage2.lds
$(LD) -static --no-warn-mismatch -e entry -Tlzma-stage2.lds -o temp-$@ $^
$(OBJCOPY) temp-$@ lzma.tmp
@@ -60,7 +60,7 @@ lzma.elf: start.o lzma.o
sed -e 's,@LOADADDR@,$(LOADER_ENTRY),g' lzma-copy.lds.in >lzma-copy.lds
$(LD) -s -Tlzma-copy.lds -o $@ $^
else
-lzma.elf: start.o decompress.o LzmaDecode.o kernel.o
+lzma.elf: start.o decompress.o LzmaDecode.o kernel.o print.o printf.o uart16550.o
$(LD) -s -Tlzma.lds -o $@ $^
endif
diff --git a/target/linux/generic-2.6/image/lzma-loader/src/decompress.c b/target/linux/generic-2.6/image/lzma-loader/src/decompress.c
index 45ac509cdc..e31f4183db 100644
--- a/target/linux/generic-2.6/image/lzma-loader/src/decompress.c
+++ b/target/linux/generic-2.6/image/lzma-loader/src/decompress.c
@@ -145,6 +145,7 @@ void entry(unsigned long icache_size, unsigned long icache_lsize,
get_byte();
/* decompress kernel */
+ printf("Decompressing kernel\n");
if ((i = LzmaDecode(&vs, &callback,
(unsigned char*)KERNEL_ENTRY, osize, &osize)) == LZMA_RESULT_OK)
{
@@ -152,6 +153,8 @@ void entry(unsigned long icache_size, unsigned long icache_lsize,
blast_icache(icache_size, icache_lsize);
/* Jump to load address */
+ printf("Jumping !\n");
((void (*)(int a0, int a1, int a2, int a3)) KERNEL_ENTRY)(arg0, arg1, arg2, arg3);
}
+ printf("Failed to decompress !\n");
}
diff --git a/tools/firmware-utils/src/mkzynfw.c b/tools/firmware-utils/src/mkzynfw.c
index 55a90dfb60..e67ffa50c2 100644
--- a/tools/firmware-utils/src/mkzynfw.c
+++ b/tools/firmware-utils/src/mkzynfw.c
@@ -119,7 +119,7 @@ int num_blocks = 0;
#define AR7_CODE_START 0x94008000
#define ATHEROS_FLASH_BASE 0xBFC00000
-#define ATHEROS_CODE_START 0x80000800
+#define ATHEROS_CODE_START 0x80e00000
#define BOARD(n, d, v, m, fb, fs, cs, fo) { \
.name = (n), .desc=(d), \