Makefile 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #
  2. # Copyright (C) 2007-2015 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. JFFS2_BLOCKSIZE=256k
  10. define Image/Prepare
  11. $(LINUX_DIR)/scripts/dtc/dtc -O dtb -R 4 -S 0x20000 $(DTS_DIR)/canyonlands.dts > $(KDIR)/openwrt-canyonlands.dtb
  12. endef
  13. define Image/BuildKernel
  14. cp $(KDIR)/uImage $(BIN_DIR)/$(IMG_PREFIX)-uImage
  15. endef
  16. define Image/Build
  17. $(call Image/Build/$(1),$(1))
  18. endef
  19. define Image/Build/jffs2-256k
  20. ( \
  21. dd if=$(KDIR)/uImage bs=2048k conv=sync; \
  22. dd if=$(KDIR)/root.$(1) bs=256k conv=sync; \
  23. ) > $(BIN_DIR)/$(IMG_PREFIX)-jffs2.img
  24. endef
  25. define Image/Build/squashfs
  26. $(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
  27. ( \
  28. dd if=$(KDIR)/cuImage.taishan bs=256k conv=sync; \
  29. dd if=$(KDIR)/root.$(1) bs=256k conv=sync; \
  30. ) > $(BIN_DIR)/$(IMG_PREFIX)-taishan-$(1).img
  31. ( \
  32. dd if=$(KDIR)/uImage bs=1920k conv=sync; \
  33. dd if=$(KDIR)/openwrt-canyonlands.dtb bs=128k conv=sync; \
  34. dd if=$(KDIR)/root.$(1) bs=256k conv=sync; \
  35. ) > $(BIN_DIR)/$(IMG_PREFIX)-canyonlands-$(1).img
  36. endef
  37. $(eval $(call BuildImage))