2010-11-06 18:54:20 +00:00
|
|
|
#
|
|
|
|
# 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
|
2011-01-27 21:50:00 +00:00
|
|
|
rm -f $(KDIR)/fs_mark
|
|
|
|
touch $(KDIR)/fs_mark
|
|
|
|
$(call prepare_generic_squashfs,$(KDIR)/fs_mark)
|
2010-11-06 18:54:20 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Image/Build
|
|
|
|
./my-mkimage $(KDIR)/loader.bin $(KDIR)/root.squashfs \
|
2011-01-27 21:50:00 +00:00
|
|
|
$(KDIR)/fs_mark $(BIN_DIR)/$(IMG_PREFIX)-$(1).bin
|
2010-11-06 18:54:20 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildImage))
|