| 1 | # |
| 2 | # Copyright (C) 2010 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 | define Build/Clean |
| 11 | $(MAKE) -C lzma-loader clean |
| 12 | endef |
| 13 | |
| 14 | define Image/Prepare |
| 15 | cat $(KDIR)/vmlinux | $(STAGING_DIR_HOST)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux.lzma |
| 16 | $(MAKE) -C lzma-loader \ |
| 17 | KDIR="$(KDIR)" \ |
| 18 | clean compile |
| 19 | rm -f $(KDIR)/fs_mark |
| 20 | touch $(KDIR)/fs_mark |
| 21 | $(call prepare_generic_squashfs,$(KDIR)/fs_mark) |
| 22 | endef |
| 23 | |
| 24 | define Image/Build |
| 25 | ./my-mkimage $(KDIR)/loader.bin $(KDIR)/root.squashfs \ |
| 26 | $(KDIR)/fs_mark $(BIN_DIR)/$(IMG_PREFIX)-$(1).bin |
| 27 | endef |
| 28 | |
| 29 | $(eval $(call BuildImage)) |
| 30 | |