Makefile 819 B

12345678910111213141516171819202122232425262728293031323334
  1. #
  2. # Copyright (C) 2009-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. JFFS2_BLOCKSIZE=128k
  10. define Image/Prepare
  11. endef
  12. define Image/BuildKernel
  13. $(TARGET_CROSS)objcopy -O binary -R .bss -R .note -R .comment \
  14. -R .note.gnu.build-id -S $(LINUX_DIR)/vmlinux $(KDIR)/vmlinux.bin
  15. mkimage -A m68k -O linux -T kernel -a 0x00020000 -e 0x00020000 \
  16. -C none -n 'M68K OpenWrt Linux-$(LINUX_VERSION)' \
  17. -d $(KDIR)/vmlinux.bin $(BIN_DIR)/$(IMG_PREFIX)-uImage
  18. endef
  19. define Image/Build
  20. $(call Image/Build/$(1),$(1))
  21. endef
  22. define Image/Build/jffs2-128k
  23. endef
  24. define Image/Build/squashfs
  25. $(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
  26. endef
  27. $(eval $(call BuildImage))