Makefile 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. # SPDX-License-Identifier: GPL-2.0-only
  2. #
  3. # Copyright (C) 2017-2019 Tomasz Maciej Nowak <[email protected]>
  4. include $(TOPDIR)/rules.mk
  5. include $(INCLUDE_DIR)/image.mk
  6. define Build/tegra-sdcard
  7. rm -fR [email protected]
  8. mkdir -p [email protected]
  9. $(CP) $(KDIR)/$(KERNEL_NAME) [email protected]
  10. $(if $(DEVICE_DTS),\
  11. $(foreach dtb,$(DEVICE_DTS),$(CP) $(DTS_DIR)/$(dtb).dtb [email protected]), \
  12. $(CP) $(DTS_DIR)/*.dtb [email protected])
  13. mkimage -A arm -O linux -T script -C none -a 0 -e 0 \
  14. -n '$(DEVICE_TITLE) OpenWrt bootscript' \
  15. -d $(BOOT_SCRIPT) \
  16. [email protected]/boot.scr
  17. $(CP) $@ [email protected]
  18. SIGNATURE="$(IMG_PART_SIGNATURE)" \
  19. $(SCRIPT_DIR)/gen_image_generic.sh \
  20. $@ \
  21. $(CONFIG_TARGET_KERNEL_PARTSIZE) [email protected] \
  22. $(CONFIG_TARGET_ROOTFS_PARTSIZE) [email protected] \
  23. 2048
  24. $(if $(UBOOT),dd if=$(STAGING_DIR_IMAGE)/$(UBOOT).img of=$@ bs=512 skip=1 seek=1 conv=notrunc)
  25. endef
  26. DEVICE_VARS += BOOT_SCRIPT UBOOT
  27. define Device/Default
  28. BOOT_SCRIPT := generic-bootscript
  29. IMAGES := sdcard.img.gz
  30. IMAGE/sdcard.img.gz := append-rootfs | pad-extra 128k | tegra-sdcard | gzip | append-metadata
  31. KERNEL_NAME := zImage
  32. KERNEL := kernel-bin
  33. PROFILES := Default
  34. endef
  35. define Device/compulab_trimslice
  36. DEVICE_VENDOR := CompuLab
  37. DEVICE_MODEL := TrimSlice
  38. DEVICE_DTS := tegra20-trimslice
  39. DEVICE_PACKAGES := kmod-leds-gpio kmod-r8169 kmod-rt2800-usb \
  40. kmod-rtc-em3027 kmod-usb-hid kmod-usb-storage wpad-basic-mbedtls
  41. UBOOT := trimslice-mmc
  42. endef
  43. TARGET_DEVICES += compulab_trimslice
  44. $(eval $(call BuildImage))