2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 include $(TOPDIR
)/rules.mk
8 include $(INCLUDE_DIR
)/image.mk
10 LOADER_MAKE
= $(MAKE
) -C lzma-loader KDIR
=$(KDIR
)
13 $(LOADER_MAKE
) LOADER
=$(1) LOADER_DATA
="" \
14 LZMA_TEXT_START
=$(2) LZMA_STARTUP_ORG
=$(3) \
18 define CompileLZMAKernel
19 $(LOADER_MAKE
) LOADER
=vmlinux-lzma-
$(1) LOADER_DATA
=$(KDIR
)/vmlinux.lzma \
20 LZMA_TEXT_START
=$(2) LZMA_STARTUP_ORG
=$(3) \
29 cat
$(KDIR
)/vmlinux |
$(STAGING_DIR
)/bin
/lzma e
-si
-so
-eos
-lc1
-lp2
-pb2
> $(KDIR
)/vmlinux.lzma
30 ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS
),y
)
31 $(call CompileLoader
,zyxel
,0x80500000,0)
33 $(call CompileLZMAKernel
,zyxel
,0x80500000,0)
37 define trxalign
/jffs2-128k
40 define trxalign
/jffs2-64k
43 define trxalign
/squashfs
47 define Image
/Build
/ZyXEL
48 $(CP
) $(BIN_DIR
)/openwrt-
$(BOARD
)-$(KERNEL
)-$(1)-noloader.trx
$(BIN_DIR
)/openwrt-
$(BOARD
)-$(KERNEL
)-$(3)-$(2).trx
52 $(STAGING_DIR
)/bin
/trx
-o
$(BIN_DIR
)/openwrt-
$(BOARD
)-$(KERNEL
)-$(1)-noloader.trx
-f
$(KDIR
)/vmlinux.lzma
$(call trxalign
/$(1)) -f
$(KDIR
)/root.
$(1)
53 ifneq ($(1),jffs2-128K
)
54 #FIXME: firware images yet
58 define Image
/Build
/LZMAKernel
59 $(CP
) $(KDIR
)/loader-vmlinux-lzma-
$(2).
$(3) \
60 $(BIN_DIR
)/openwrt-
$(BOARD
)-$(KERNEL
)-vmlinux-lzma-
$(1).
$(3)
63 define Image
/Build
/Initramfs
64 $(call Image
/Build
/LZMAKernel
,p-334wt
,zyxel
,bin
)
65 $(call Image
/Build
/LZMAKernel
,p-335wt
,zyxel
,bin
)
68 $(eval
$(call BuildImage
))