summaryrefslogtreecommitdiffstats
path: root/target/linux/adm8668/image/Makefile
blob: e9d183b7890212183113e01218e71e476c6e3ba8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#
# Copyright (C) 2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk

define Build/Clean
	$(MAKE) -C lzma-loader clean
endef

define Image/Prepare
	cat $(KDIR)/vmlinux | $(STAGING_DIR_HOST)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux.lzma
	$(MAKE) -C lzma-loader \
		KDIR="$(KDIR)" \
		clean compile
endef

define Image/Build
	./my-mkimage $(KDIR)/loader.bin $(KDIR)/root.squashfs	\
		$(BIN_DIR)/$(IMG_PREFIX)-$(1).bin
endef

$(eval $(call BuildImage))