Makefile 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #
  2. # Copyright (C) 2013-2016 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. Default_UBIFS_OPTS = -m 2048 -e 126KiB -c 4096
  10. STG212_UBIFS_OPTS = -m 2048 -e 126KiB -c 4096
  11. KD20_UBIFS_OPTS = -m 2048 -e 126KiB -c 4096
  12. POGOPLUG_PRO_UBIFS_OPTS = -m 2048 -e 126KiB -c 4096
  13. POGOPLUG_V3_UBIFS_OPTS = -m 2048 -e 126KiB -c 4096
  14. DEVICE_VARS += DTS KERNEL_SIZE PAGESIZE BLOCKSIZE SUBPAGESIZE
  15. DEVICE_VARS += KERNEL_IN_UBI UBOOTENV_IN_UBI UBIFS_OPTS
  16. KERNEL_LOADADDR := 0x60008000
  17. define Build/ubootable
  18. (dd if="$(KDIR)/u-boot.bin" bs=128k conv=sync; \
  19. dd if="$@" bs=128k conv=sync ) >> $@.new
  20. @mv "$@.new" "$@"
  21. endef
  22. define Device/Default
  23. KERNEL_DEPENDS = $$(wildcard $$(DTS_DIR)/ox820-$$(DTS).dts)
  24. KERNEL = kernel-bin | lzma | fit lzma $$(DTS_DIR)/ox820-$$(DTS).dtb
  25. KERNEL_NAME := zImage
  26. KERNEL_SUFFIX := -uImage
  27. KERNEL_INSTALL := 1
  28. KERNEL_INITRAMFS = kernel-bin | lzma | fit lzma $$(DTS_DIR)/ox820-$$(DTS).dtb | ubootable
  29. KERNEL_INITRAMFS_PREFIX = $$(IMAGE_PREFIX)-u-boot-initramfs
  30. KERNEL_INITRAMFS_SUFFIX := .bin
  31. BLOCKSIZE := 128KiB
  32. PAGESIZE := 2048
  33. SUBPAGESIZE := 512
  34. FILESYSTEMS := squashfs ubifs
  35. PROFILES = Default $$(DTS)
  36. IMAGES := ubinized.bin sysupgrade.tar
  37. IMAGE/ubinized.bin := append-ubi
  38. IMAGE/sysupgrade.tar := sysupgrade-nand
  39. KERNEL_IN_UBI := 1
  40. UBOOTENV_IN_UBI := 1
  41. endef
  42. define Device/akitio
  43. DTS := akitio
  44. DEVICE_TITLE := Akitio MyCloud mini / Silverstone DC01
  45. DEVICE_PACKAGES := kmod-i2c-gpio kmod-rtc-ds1307
  46. endef
  47. TARGET_DEVICES += akitio
  48. define Device/kd20
  49. DTS := kd20
  50. DEVICE_TITLE := Shuttle KD20
  51. DEVICE_PACKAGES := kmod-usb3 kmod-i2c-gpio kmod-rtc-pcf8563 kmod-gpio-beeper \
  52. kmod-hwmon-core kmod-hwmon-gpiofan
  53. endef
  54. TARGET_DEVICES += kd20
  55. define Device/pogoplug-pro
  56. DTS := pogoplug-pro
  57. DEVICE_TITLE := Cloud Engines Pogoplug Pro (with mPCIe)
  58. endef
  59. TARGET_DEVICES += pogoplug-pro
  60. define Device/pogoplug-v3
  61. DTS := pogoplug-v3
  62. DEVICE_TITLE := Cloud Engines Pogoplug V3 (no mPCIe)
  63. endef
  64. TARGET_DEVICES += pogoplug-v3
  65. define Device/stg212
  66. DTS := stg212
  67. DEVICE_TITLE := MitraStar STG-212
  68. endef
  69. TARGET_DEVICES += stg212
  70. VMLINUX:=$(BIN_DIR)/$(IMG_PREFIX)-vmlinux
  71. UIMAGE:=$(BIN_DIR)/$(IMG_PREFIX)-uImage
  72. $(eval $(call BuildImage))