Create a dummy sit package for 2.4 kernelsq

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10668 3c298f89-4303-0410-b956-a3cf2f4a3e73
master
Florian Fainelli 2008-03-27 15:44:14 +00:00
parent e196ce5df5
commit b43169c8a5
5 changed files with 47 additions and 4 deletions

View File

@ -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)

View File

@ -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))

View File

@ -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

View File

@ -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");
}

View File

@ -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), \