Makefile 803 B

123456789101112131415161718192021222324252627282930
  1. #
  2. # Copyright (C) 2006-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. define Image/BuildKernel
  10. $(STAGING_DIR_HOST)/bin/lzma e $(KDIR)/vmlinux $(KDIR)/vmlinux.lzma
  11. mkimage -A mips -O linux -T kernel -C lzma -a 0x80002000 -e \
  12. 0x80002000 \
  13. -n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
  14. -d $(KDIR)/vmlinux.lzma $(KDIR)/uImage
  15. cp $(KDIR)/uImage $(BIN_DIR)/$(IMG_PREFIX)-uImage
  16. endef
  17. define Image/Build/squashfs
  18. $(call prepare_generic_squashfs,$(BIN_DIR)/$(IMG_PREFIX)-$(1).image)
  19. endef
  20. define Image/Build
  21. cat $(KDIR)/uImage $(KDIR)/root.$(1) > $(BIN_DIR)/$(IMG_PREFIX)-$(1).image
  22. $(call Image/Build/$(1),$(1))
  23. endef
  24. $(eval $(call BuildImage))