Create a dummy sit package for 2.4 kernelsq
[openwrt.git] / target / linux / atheros / image / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 include $(TOPDIR)/rules.mk
8 include $(INCLUDE_DIR)/image.mk
9
10 LOADADDR = 0x81000000 # RAM start + 16M
11 KERNEL_ENTRY = 0x80041000
12 RAMSIZE = 0x00100000 # 1MB
13 IMAGE_COPY = 1
14
15 LOADER_MAKEOPTS= \
16 KDIR=$(KDIR) \
17 LOADADDR=$(LOADADDR) \
18 KERNEL_ENTRY=$(KERNEL_ENTRY) \
19 RAMSIZE=$(RAMSIZE) \
20 IMAGE_COPY=$(IMAGE_COPY)
21
22 define Build/Clean
23 $(MAKE) -C $(GENERIC_PLATFORM_DIR)/image/lzma-loader $(LOADER_MAKEOPTS) clean
24 endef
25
26 define Image/Prepare
27 cp $(KDIR)/vmlinux.elf $(BIN_DIR)/openwrt-$(BOARD)-vmlinux.elf
28 gzip -9 -c $(KDIR)/vmlinux > $(KDIR)/vmlinux.bin.gz
29 $(STAGING_DIR_HOST)/bin/lzma e $(KDIR)/vmlinux $(KDIR)/vmlinux.bin.l7
30 dd if=$(KDIR)/vmlinux.bin.l7 of=$(BIN_DIR)/openwrt-$(BOARD)-vmlinux.lzma bs=65536 conv=sync
31 dd if=$(KDIR)/vmlinux.bin.gz of=$(BIN_DIR)/openwrt-$(BOARD)-vmlinux.gz bs=65536 conv=sync
32 cat $(KDIR)/vmlinux | $(STAGING_DIR_HOST)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux.lzma
33 $(MAKE) -C $(GENERIC_PLATFORM_DIR)/image/lzma-loader $(LOADER_MAKEOPTS) clean compile
34 endef
35
36 define Image/BuildKernel
37 $(CP) $(KDIR)/loader.bin $(BIN_DIR)/openwrt-$(BOARD)-vmlinux
38 endef
39
40 define Image/Build/squashfs
41 $(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
42 endef
43
44 define Image/Build
45 $(call Image/Build/$(1))
46 dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-root.$(1) bs=128k conv=sync
47 endef
48
49 ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
50 define Image/Prepare
51 cat $(KDIR)/vmlinux | $(STAGING_DIR_HOST)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux.lzma
52 $(MAKE) -C $(GENERIC_PLATFORM_DIR)/image/lzma-loader $(LOADER_MAKEOPTS) clean compile
53 endef
54 define Image/BuildKernel
55 $(CP) $(KDIR)/loader.bin $(BIN_DIR)/openwrt-$(BOARD)-vmlinux
56 endef
57 endif
58
59 $(eval $(call BuildImage))
This page took 0.066621 seconds and 5 git commands to generate.