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