Makefile 1.6 KB

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