Makefile 903 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #
  2. # Copyright (C) 2006 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/Prepare
  10. cp $(LINUX_DIR)/arch/ppc/boot/images/uImage $(KDIR)/uImage
  11. endef
  12. define Image/BuildKernel
  13. cp $(KDIR)/uImage $(BIN_DIR)/openwrt-$(BOARD)-uImage
  14. endef
  15. define Image/Build
  16. $(call Image/Build/$(1),$(1))
  17. endef
  18. define Image/Build/jffs2-64k
  19. ( \
  20. dd if=$(KDIR)/uImage bs=1024k conv=sync; \
  21. dd if=$(KDIR)/root.$(1) bs=65536 conv=sync; \
  22. ) > $(BIN_DIR)/openwrt-$(BOARD)-$(1).img
  23. endef
  24. define Image/Build/squashfs
  25. $(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
  26. ( \
  27. dd if=$(LINUX_DIR)/arch/ppc/boot/images/uImage bs=1024k conv=sync; \
  28. dd if=$(KDIR)/root.$(1) bs=65536 conv=sync; \
  29. ) > $(BIN_DIR)/openwrt-$(BOARD)-$(1).img
  30. endef
  31. $(eval $(call BuildImage))