define KernelPackage/sit
SUBMENU:=$(NETWORK_SUPPORT_MENU)
TITLE:=IPv6-in-IPv4 tunnelling
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)
DEPENDS:= @LINUX_2_6 +kmod-ipv6 +kmod-iptunnel4
KCONFIG+=CONFIG_IPV6_SIT
FILES:=$(LINUX_DIR)/net/ipv6/sit.$(LINUX_KMOD_SUFFIX)
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
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
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
endef
define Image/Build/squashfs
dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-root.$(1) bs=128k conv=sync
endef
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))
$(eval $(call BuildImage))
ifeq ($(IMAGE_COPY),1)
LOADER_ENTRY ?= $(KERNEL_ENTRY)
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
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
sed -e 's,@LOADADDR@,$(LOADER_ENTRY),g' lzma-copy.lds.in >lzma-copy.lds
$(LD) -s -Tlzma-copy.lds -o $@ $^
else
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
$(LD) -s -Tlzma.lds -o $@ $^
endif
get_byte();
/* decompress kernel */
get_byte();
/* decompress kernel */
+ printf("Decompressing kernel\n");
if ((i = LzmaDecode(&vs, &callback,
(unsigned char*)KERNEL_ENTRY, osize, &osize)) == LZMA_RESULT_OK)
{
if ((i = LzmaDecode(&vs, &callback,
(unsigned char*)KERNEL_ENTRY, osize, &osize)) == LZMA_RESULT_OK)
{
blast_icache(icache_size, icache_lsize);
/* Jump to load address */
blast_icache(icache_size, icache_lsize);
/* Jump to load address */
((void (*)(int a0, int a1, int a2, int a3)) KERNEL_ENTRY)(arg0, arg1, arg2, arg3);
}
((void (*)(int a0, int a1, int a2, int a3)) KERNEL_ENTRY)(arg0, arg1, arg2, arg3);
}
+ printf("Failed to decompress !\n");
#define AR7_CODE_START 0x94008000
#define ATHEROS_FLASH_BASE 0xBFC00000
#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), \
#define BOARD(n, d, v, m, fb, fs, cs, fo) { \
.name = (n), .desc=(d), \