Makefile 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. define Device/Default
  10. PROFILES = Default $$(DEVICE_NAME)
  11. KERNEL_NAME := vmlinux.elf
  12. KERNEL_INITRAMFS_NAME := vmlinux-initramfs.elf
  13. KERNEL := kernel-bin | strip-kernel | patch-cmdline
  14. IMAGES := sysupgrade.tar
  15. IMAGE/sysupgrade.tar/squashfs := append-rootfs | pad-extra 128k | sysupgrade-tar rootfs=$$$$@
  16. IMAGE/sysupgrade.tar := sysupgrade-tar
  17. endef
  18. define Build/strip-kernel
  19. # Workaround pre-SDK-1.9.0 u-boot versions not handling the .notes section
  20. $(TARGET_CROSS)strip -R .notes $@ -o $@.stripped && mv $@.stripped $@
  21. endef
  22. define Device/generic
  23. FILESYSTEMS := ext4
  24. DEVICE_TITLE := Generic
  25. endef
  26. TARGET_DEVICES += generic
  27. ER_CMDLINE:=-mtdparts=phys_mapped_flash:640k(boot0)ro,640k(boot1)ro,64k(eeprom)ro root=/dev/mmcblk0p2 rootfstype=squashfs,ext4 rootwait
  28. define Device/er
  29. CMDLINE := $(ER_CMDLINE)
  30. DEVICE_TITLE := Ubiquiti EdgeRouter
  31. endef
  32. TARGET_DEVICES += er
  33. ERLITE_CMDLINE:=-mtdparts=phys_mapped_flash:512k(boot0)ro,512k(boot1)ro,64k(eeprom)ro root=/dev/sda2 rootfstype=squashfs,ext4 rootwait
  34. define Device/erlite
  35. CMDLINE := $(ERLITE_CMDLINE)
  36. DEVICE_TITLE := Ubiquiti EdgeRouter Lite
  37. endef
  38. TARGET_DEVICES += erlite
  39. $(eval $(call BuildImage))