lan969x.mk 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. define Build/lan969x-fip
  2. cat $(STAGING_DIR_IMAGE)/$1-fip.bin >> $@
  3. endef
  4. define Build/lan969x-gpt-emmc
  5. cp $@ [email protected] 2>/dev/null || true
  6. ptgen -g -o [email protected] -a 1 -l 1024 \
  7. -t 0x83 -N fip -r -p 8M@1M \
  8. -t 0x83 -N fip.bak -r -p 8M@9M \
  9. -t 0x83 -N Env -r -p 2M@17M \
  10. $(if $(findstring flash,$1), \
  11. -t 0x2e -N kernel -p $(CONFIG_TARGET_KERNEL_PARTSIZE)M@19M \
  12. -t 0x2e -N rootfs -p $(CONFIG_TARGET_ROOTFS_PARTSIZE)M
  13. )
  14. cat [email protected] >> $@
  15. rm [email protected]
  16. endef
  17. define Build/append-kernel-part
  18. dd if=$(IMAGE_KERNEL) bs=$(CONFIG_TARGET_KERNEL_PARTSIZE)M conv=sync >> $@
  19. endef
  20. define Device/microchip_ev23x71a
  21. $(call Device/FitImage)
  22. DEVICE_VENDOR := Microchip
  23. DEVICE_MODEL := EV23X71A
  24. SOC := lan9696
  25. DEVICE_PACKAGES := kmod-i2c-mux-gpio
  26. IMAGES += emmc-atf-gpt.gz emmc-gpt.img.gz
  27. IMAGE/emmc-atf-gpt.gz := lan969x-gpt-emmc |\
  28. pad-to 1M | lan969x-fip ev23x71a |\
  29. pad-to 9M | lan969x-fip ev23x71a |\
  30. gzip
  31. IMAGE/emmc-gpt.img.gz := lan969x-gpt-emmc flash |\
  32. pad-to 1M | lan969x-fip ev23x71a |\
  33. pad-to 9M | lan969x-fip ev23x71a |\
  34. pad-to 19M | append-kernel-part |\
  35. append-rootfs |\
  36. gzip
  37. endef
  38. TARGET_DEVICES += microchip_ev23x71a