Now build rootfs+kernel images
authorFlorian Fainelli <florian@openwrt.org>
Sun, 30 Apr 2006 23:09:45 +0000 (23:09 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Sun, 30 Apr 2006 23:09:45 +0000 (23:09 +0000)
SVN-Revision: 3717

openwrt/target/linux/au1000-2.6/config
openwrt/target/linux/image/au1000/Makefile

index aaf89b52c55939e66146aee9627bbfa1a5807504..41a2d0352bc8dde38a5ac3a1eb4cb5253621a254 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.16.7
-# Sun Apr 23 13:43:59 2006
+# Sat Apr 29 20:33:29 2006
 #
 CONFIG_MIPS=y
 
@@ -306,8 +306,32 @@ CONFIG_BRIDGE_NETFILTER=y
 #
 # Core Netfilter Configuration
 #
-# CONFIG_NETFILTER_NETLINK is not set
-# CONFIG_NETFILTER_XTABLES is not set
+CONFIG_NETFILTER_NETLINK=m
+CONFIG_NETFILTER_NETLINK_QUEUE=m
+CONFIG_NETFILTER_NETLINK_LOG=m
+CONFIG_NETFILTER_XTABLES=m
+CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
+# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set
+CONFIG_NETFILTER_XT_TARGET_MARK=m
+CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
+# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set
+CONFIG_NETFILTER_XT_MATCH_COMMENT=m
+CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
+CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
+CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
+CONFIG_NETFILTER_XT_MATCH_DCCP=m
+CONFIG_NETFILTER_XT_MATCH_HELPER=m
+CONFIG_NETFILTER_XT_MATCH_LENGTH=m
+CONFIG_NETFILTER_XT_MATCH_LIMIT=m
+CONFIG_NETFILTER_XT_MATCH_MAC=m
+CONFIG_NETFILTER_XT_MATCH_MARK=m
+CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
+CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
+CONFIG_NETFILTER_XT_MATCH_REALM=m
+CONFIG_NETFILTER_XT_MATCH_SCTP=m
+CONFIG_NETFILTER_XT_MATCH_STATE=m
+CONFIG_NETFILTER_XT_MATCH_STRING=m
+CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
 
 #
 # IP: Netfilter Configuration
@@ -315,22 +339,80 @@ CONFIG_BRIDGE_NETFILTER=y
 CONFIG_IP_NF_CONNTRACK=m
 CONFIG_IP_NF_CT_ACCT=y
 CONFIG_IP_NF_CONNTRACK_MARK=y
-# CONFIG_IP_NF_CONNTRACK_EVENTS is not set
+CONFIG_IP_NF_CONNTRACK_EVENTS=y
+CONFIG_IP_NF_CONNTRACK_NETLINK=m
 CONFIG_IP_NF_CT_PROTO_SCTP=m
 CONFIG_IP_NF_FTP=m
 CONFIG_IP_NF_IRC=m
-# CONFIG_IP_NF_NETBIOS_NS is not set
+CONFIG_IP_NF_NETBIOS_NS=m
 CONFIG_IP_NF_TFTP=m
 CONFIG_IP_NF_AMANDA=m
-# CONFIG_IP_NF_PPTP is not set
-# CONFIG_IP_NF_SIP is not set
+CONFIG_IP_NF_PPTP=m
+CONFIG_IP_NF_SIP=m
 CONFIG_IP_NF_QUEUE=m
-# CONFIG_IP_NF_SET is not set
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_LAYER7=m
+CONFIG_IP_NF_MATCH_LAYER7_DEBUG=y
+CONFIG_IP_NF_MATCH_MULTIPORT=m
+CONFIG_IP_NF_MATCH_IPP2P=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_TIME=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_DSCP=m
+CONFIG_IP_NF_MATCH_AH_ESP=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_MATCH_HASHLIMIT=m
+CONFIG_IP_NF_MATCH_POLICY=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_IMQ=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_TARGET_TCPMSS=m
+CONFIG_IP_NF_NAT=m
+CONFIG_IP_NF_NAT_NEEDED=y
+CONFIG_IP_NF_TARGET_MASQUERADE=m
+CONFIG_IP_NF_TARGET_REDIRECT=m
+CONFIG_IP_NF_TARGET_NETMAP=m
+CONFIG_IP_NF_TARGET_SAME=m
+CONFIG_IP_NF_NAT_SNMP_BASIC=m
+CONFIG_IP_NF_NAT_IRC=m
+CONFIG_IP_NF_NAT_FTP=m
+CONFIG_IP_NF_NAT_TFTP=m
+CONFIG_IP_NF_NAT_AMANDA=m
+CONFIG_IP_NF_NAT_PPTP=m
+CONFIG_IP_NF_NAT_SIP=m
+CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_TOS=m
+CONFIG_IP_NF_TARGET_ECN=m
+CONFIG_IP_NF_TARGET_DSCP=m
+CONFIG_IP_NF_TARGET_TTL=m
+CONFIG_IP_NF_TARGET_CLUSTERIP=m
+CONFIG_IP_NF_RAW=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
+CONFIG_IP_NF_ARP_MANGLE=m
+CONFIG_IP_NF_SET=m
+CONFIG_IP_NF_SET_MAX=256
+CONFIG_IP_NF_SET_HASHSIZE=1024
+CONFIG_IP_NF_SET_IPMAP=m
+CONFIG_IP_NF_SET_MACIPMAP=m
+CONFIG_IP_NF_SET_PORTMAP=m
+CONFIG_IP_NF_SET_IPHASH=m
+CONFIG_IP_NF_SET_NETHASH=m
+CONFIG_IP_NF_SET_IPTREE=m
+CONFIG_IP_NF_MATCH_SET=m
+CONFIG_IP_NF_TARGET_SET=m
 
 #
 # IPv6: Netfilter Configuration (EXPERIMENTAL)
 #
 CONFIG_IP6_NF_QUEUE=m
+# CONFIG_IP6_NF_IPTABLES is not set
 
 #
 # Bridge: Netfilter Configuration
@@ -435,6 +517,7 @@ CONFIG_NET_ACT_POLICE=m
 CONFIG_NET_ACT_GACT=m
 CONFIG_GACT_PROB=y
 CONFIG_NET_ACT_MIRRED=m
+# CONFIG_NET_ACT_IPT is not set
 CONFIG_NET_ACT_PEDIT=m
 CONFIG_NET_ACT_SIMP=m
 # CONFIG_NET_CLS_IND is not set
index 04a89f9b19e5123363a30748883eb67ec15da459..fd805eef7247429f9182b02d86c7d3c93c170ad8 100644 (file)
@@ -1,17 +1,58 @@
 include $(TOPDIR)/rules.mk
 
+LOADADDR = 0x8008c8f4          # RAM start + 16M 
+KERNEL_ENTRY = 0x80100000
+RAMSIZE = 0x04000000           # 1MB
+
+LOADER_MAKEOPTS= \
+               KDIR=$(KDIR) \
+               LOADADDR=$(LOADADDR) \
+               KERNEL_ENTRY=$(KERNEL_ENTRY) \
+               RAMSIZE=$(RAMSIZE)
+
 KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)
 
+lzma-loader-clean:
+       $(MAKE) -C ../generic/lzma-loader $(LOADER_MAKEOPTS) clean
 
-ifeq ($(FS),jffs2-8MB)
+lzma-loader-prepare:
+       $(MAKE) -C ../generic/lzma-loader $(LOADER_MAKEOPTS) prepare
 
-$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).img: $(KDIR)/root.$(FS)
-       $(CP) $^ $@
+lzma-loader-compile: $(KDIR)/vmlinux.lzma lzma-loader-prepare
+       $(MAKE) -C ../generic/lzma-loader $(LOADER_MAKEOPTS) compile
+
+ifeq ($(IB),)
+$(KDIR)/vmlinux.lzma: $(KDIR)/vmlinux
+       cat $^ | $(STAGING_DIR)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $@ || (rm -f $@ && false)
+       
+install: $(KDIR)/vmlinux.lzma
+endif
+
+ifeq ($(KERNEL),2.6)
+FSNAME:=$(patsubst jffs2-%,jffs2,$(FS))
+
+$(KDIR)/vmlinux.srec: $(KDIR)/vmlinux
+       $(TARGET_CROSS)objcopy -O srec $(LINUX_DIR)/vmlinux $(KDIR)/vmlinux.srec
 
-install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).img
+ifeq ($(FS),jffs2-4MB)
 
+$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FSNAME).bin: $(KDIR)/root.$(FS) $(KDIR)/vmlinux.srec
+       $(TARGET_CROSS)objcopy -O srec -I binary --adjust-vma 0xbe000000 $(KDIR)/root.$(FS) $(KDIR)/root.srec
+       grep -v S7 $(KDIR)/root.srec > $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).img
+       grep -v S0 $(KDIR)/vmlinux.srec >> $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).img
+
+install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FSNAME).bin
 endif
 
+ifeq ($(FS),jffs2-8MB)
+
+$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FSNAME).bin: $(KDIR)/root.$(FS) $(KDIR)/vmlinux.srec
+       $(TARGET_CROSS)objcopy -O srec -I binary --adjust-vma 0xbe000000 $(KDIR)/root.$(FS) $(KDIR)/root.srec
+       grep -v S7 $(KDIR)/root.srec > $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).img
+       grep -v S0 $(KDIR)/vmlinux.srec >> $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).img
+
+install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FSNAME).bin
+endif
 
 ifeq ($(FS),tgz)
 
@@ -22,15 +63,32 @@ install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-rootfs.tar.gz
 
 endif
 
+ifeq ($(FS),squashfs)
+$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FSNAME).bin: $(KDIR)/root.$(FS) $(KDIR)/vmlinux.srec
+       $(TARGET_CROSS)objcopy -O srec -I binary --adjust-vma 0xbe000000 $(KDIR)/root.$(FS) $(KDIR)/root.srec
+       grep -v S7 $(KDIR)/root.srec > $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).img
+
+endif
+
+install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FSNAME).bin
+endif
 
 $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinuz: $(KDIR)/vmlinux
        $(CP) $^ $@
 
-
+ifeq ($(IB),)
+clean: lzma-loader-clean
+prepare: lzma-loader-prepare
+compile: lzma-loader-compile
+else
 clean:
 prepare:
 compile:
-install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinuz
+endif
 install-ib:
+       mkdir -p $(IB_DIR)/staging_dir_$(ARCH)/bin
        mkdir -p $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)
-       $(CP) $(KDIR)/bzImage $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)/
+       $(CP) $(KDIR)/loader.elf $(IB_DIR)/build_$(ARCH)/
+       $(CP) $(KDIR)/vmlinux.lzma $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)/
+       $(TARGET_CROSS)objcopy -O srec $(KDIR)/loader.elf $(KDIR)/loader.srec
+       grep -v S0 $(KDIR)/loader.srec > $(KDIR)/kernel.srec