Makefile 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #
  2. # Copyright (C) 2017-2019 Tomasz Maciej Nowak <[email protected]>
  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 Build/tegra-sdcard
  10. rm -fR [email protected]
  11. mkdir -p [email protected]
  12. $(CP) $(KDIR)/$(KERNEL_NAME) [email protected]
  13. $(if $(DEVICE_DTS),\
  14. $(foreach dtb,$(DEVICE_DTS),$(CP) $(DTS_DIR)/$(dtb).dtb [email protected]), \
  15. $(CP) $(DTS_DIR)/*.dtb [email protected])
  16. mkimage -A arm -O linux -T script -C none -a 0 -e 0 \
  17. -n '$(DEVICE_TITLE) OpenWrt bootscript' \
  18. -d $(BOOT_SCRIPT) \
  19. [email protected]/boot.scr
  20. SIGNATURE="$(IMG_PART_SIGNATURE)" \
  21. $(SCRIPT_DIR)/gen_image_generic.sh \
  22. $@ \
  23. $(CONFIG_TARGET_KERNEL_PARTSIZE) [email protected] \
  24. $(CONFIG_TARGET_ROOTFS_PARTSIZE) $(IMAGE_ROOTFS) \
  25. 2048
  26. $(if $(UBOOT),dd if=$(STAGING_DIR_IMAGE)/$(UBOOT).img of=$@ bs=512 skip=1 seek=1 conv=notrunc)
  27. endef
  28. DEVICE_VARS += BOOT_SCRIPT UBOOT
  29. define Device/Default
  30. BOOT_SCRIPT := generic-bootscript
  31. IMAGES := sdcard.img.gz
  32. IMAGE/sdcard.img.gz := tegra-sdcard | gzip | append-metadata
  33. KERNEL_NAME := zImage
  34. KERNEL := kernel-bin
  35. PROFILES := Default
  36. SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
  37. endef
  38. define Device/compulab_trimslice
  39. DEVICE_VENDOR := CompuLab
  40. DEVICE_MODEL := TrimSlice
  41. DEVICE_DTS := tegra20-trimslice
  42. DEVICE_PACKAGES := kmod-r8169 kmod-rt2800-usb kmod-rtc-em3027 \
  43. kmod-usb-storage wpad-basic-wolfssl
  44. UBOOT := trimslice-mmc
  45. endef
  46. TARGET_DEVICES += compulab_trimslice
  47. $(eval $(call BuildImage))