Makefile 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. #
  2. # Copyright (C) 2012-2014 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. FAT32_BLOCK_SIZE=1024
  10. FAT32_BLOCKS=$(shell echo $$(($(CONFIG_OMAP_SD_BOOT_PARTSIZE)*1024*1024/$(FAT32_BLOCK_SIZE))))
  11. UBIFS_OPTS = -F -m 2048 -e 124KiB -c 4096 -U
  12. UBI_OPTS = -m 2048 -p 128KiB -s 512 -O 2048
  13. define Build/omap-sdcard
  14. rm -f [email protected]
  15. mkfs.fat [email protected] -C $(FAT32_BLOCKS)
  16. mcopy -i [email protected] $(STAGING_DIR_IMAGE)/$(DEVICE_NAME)/MLO ::MLO
  17. mcopy -i [email protected] $(STAGING_DIR_IMAGE)/$(DEVICE_NAME)/u-boot.img ::u-boot.img
  18. mcopy -i [email protected] $(STAGING_DIR_IMAGE)/$(DEVICE_NAME)/uEnv.txt ::uEnv.txt
  19. mmd -i [email protected] ::/dtbs
  20. mcopy -i [email protected] $(DTS_DIR)/$(DEVICE_DTS).dtb ::/dtbs/$(DEVICE_DTS).dtb
  21. mcopy -i [email protected] $(IMAGE_KERNEL) ::/zImage
  22. ./gen_omap_sdcard_img.sh $@ \
  23. [email protected] \
  24. $(IMAGE_ROOTFS) \
  25. $(CONFIG_OMAP_SD_BOOT_PARTSIZE) \
  26. $(CONFIG_TARGET_ROOTFS_PARTSIZE)
  27. rm -f [email protected]
  28. endef
  29. define Device/Default
  30. PROFILES := Default
  31. DEVICE_VARS :=
  32. KERNEL_NAME := zImage
  33. KERNEL := kernel-bin
  34. IMAGES := sdcard.img.gz
  35. IMAGE/sdcard.img.gz := omap-sdcard | append-metadata | gzip
  36. SUPPORTED_DEVICES = $(subst _,$(comma),$(1))
  37. endef
  38. #uboot-omap-am335x_evm uboot-omap-omap3_beagle uboot-omap-omap3_overo uboot-omap-omap4_panda
  39. define Device/ti_am335x-evm
  40. DEVICE_TITLE := TI AM335x EVM
  41. DEVICE_DTS := am335x-evm
  42. endef
  43. TARGET_DEVICES += ti_am335x-evm
  44. define Device/ti_am335x-bone-black
  45. DEVICE_TITLE := TI AM335x BeagleBone Black
  46. DEVICE_DTS := am335x-boneblack
  47. endef
  48. TARGET_DEVICES += ti_am335x-bone-black
  49. define Device/ti_omap4-panda
  50. DEVICE_TITLE := OMAP4 TI pandaboard
  51. DEVICE_DTS := omap4-panda
  52. DEVICE_PACKAGES := kmod-usb-net-smsc95xx
  53. endef
  54. TARGET_DEVICES += ti_omap4-panda
  55. define Device/ti_omap3-beagle
  56. DEVICE_TITLE := OMAP3 TI beagleboard
  57. DEVICE_DTS := omap3-beagle
  58. # beagleboard doesn't have a network interface, support most common usb net
  59. DEVICE_PACKAGES := kmod-usb-net \
  60. kmod-usb-net-asix kmod-usb-net-asix-ax88179 kmod-usb-net-hso \
  61. kmod-usb-net-kaweth kmod-usb-net-pegasus kmod-usb-net-mcs7830 \
  62. kmod-usb-net-smsc95xx kmod-usb-net-dm9601-ether
  63. endef
  64. TARGET_DEVICES += ti_omap3-beagle
  65. $(eval $(call BuildImage))