[brcm-2.4] update kernel to version 2.4.37.9 and refresh patches
[openwrt.git] / target / linux / adm5120 / image / lzma-loader / 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
8 include $(TOPDIR)/rules.mk
9
10 LOADER := loader.bin
11 LOADER_NAME := $(basename $(notdir $(LOADER)))
12 LOADER_DATA :=
13 TARGET_DIR :=
14
15 ifeq ($(TARGET_DIR),)
16 TARGET_DIR := $(KDIR)
17 endif
18
19 LOADER_BIN := $(TARGET_DIR)/$(LOADER_NAME).bin
20 LOADER_GZ := $(TARGET_DIR)/$(LOADER_NAME).gz
21 LOADER_ELF := $(TARGET_DIR)/$(LOADER_NAME).elf
22
23 LZMA_STARTUP_ORG:= 0
24 LZMA_TEXT_START := 0x80300000
25
26 PKG_NAME := lzma-loader
27 PKG_BUILD_DIR := $(KDIR)/$(PKG_NAME)
28
29 .PHONY : loader-compile loader.bin loader.elf loader.gz
30
31 $(PKG_BUILD_DIR)/.prepared:
32 mkdir $(PKG_BUILD_DIR)
33 $(CP) ./src/* $(PKG_BUILD_DIR)/
34 touch $@
35
36 loader-compile: $(PKG_BUILD_DIR)/.prepared
37 $(MAKE) -C $(PKG_BUILD_DIR) CROSS_COMPILE="$(TARGET_CROSS)" \
38 LZMA_STARTUP_ORG=$(LZMA_STARTUP_ORG) \
39 LZMA_TEXT_START=$(LZMA_TEXT_START) \
40 LOADER_DATA=$(LOADER_DATA) \
41 CONFIG_BOARD=$(CONFIG_BOARD) \
42 CONFIG_PASS_KARGS=$(CONFIG_PASS_KARGS) \
43 clean all
44
45 loader.gz: $(PKG_BUILD_DIR)/loader.bin
46 gzip -nc9 $< > $(LOADER_GZ)
47
48 loader.elf: $(PKG_BUILD_DIR)/loader.elf
49 $(CP) $< $(LOADER_ELF)
50
51 loader.bin: $(PKG_BUILD_DIR)/loader.bin
52 $(CP) $< $(LOADER_BIN)
53
54 download:
55 prepare: $(PKG_BUILD_DIR)/.prepared
56 compile: loader-compile
57
58 install:
59
60 clean:
61 rm -rf $(PKG_BUILD_DIR)
62
This page took 0.043477 seconds and 5 git commands to generate.