rt3883.mk 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #
  2. # RT3662/RT3883 Profiles
  3. #
  4. # $(1) = squashfs/initramfs
  5. # $(2) = lowercase board name
  6. # $(3) = dts file
  7. # $(4) = kernel size
  8. # $(5) = rootfs size
  9. # $(6) = signature
  10. # $(7) = model
  11. # $(8) = flash address
  12. # $(9) = start address
  13. define BuildFirmware/EdimaxCombined/squashfs
  14. $(call PatchKernelLzmaDtb,$(2),$(3))
  15. $(call MkImage,lzma,$(KDIR)/vmlinux-$(2).bin.lzma,$(KDIR)/vmlinux-$(2).bin.uImage)
  16. if [ `stat -c%s "$(KDIR)/vmlinux-$(2).bin.uImage"` -gt `expr $(4) - 20` ]; then \
  17. echo "Warning: $(KDIR)/vmlinux-$(2).bin.uImage is too big" >&2; \
  18. exit 1; \
  19. else if [ `stat -c%s "$(KDIR)/root.$(1)"` -gt $(5) ]; then \
  20. echo "Warning: $(KDIR)/root.$(1) is too big" >&2; \
  21. exit 1; \
  22. else \
  23. ( dd if=$(KDIR)/vmlinux-$(2).bin.uImage bs=`expr $(4) - 20` conv=sync ; dd if=$(KDIR)/root.$(1) ) > $(KDIR)/vmlinux-$(2).bin.uImage.combined ; \
  24. fi ; fi
  25. mkedimaximg -i "$(KDIR)/vmlinux-$(2).bin.uImage.combined" \
  26. -o $(call imgname,$(1),$(2)).bin \
  27. -s $(6) -m $(7) -f $(8) -S $(9)
  28. endef
  29. define BuildFirmware/RTN56U/squashfs
  30. $(call BuildFirmware/Default8M/$(1),$(1),rt-n56u,RT-N56U)
  31. -mkrtn56uimg -s $(call sysupname,$(1),rt-n56u)
  32. -cp $(call sysupname,$(1),rt-n56u) $(call imgname,$(1),rt-n56u)-factory.bin
  33. -mkrtn56uimg -f $(call imgname,$(1),rt-n56u)-factory.bin
  34. endef
  35. Image/Build/Profile/CYSWR1100=$(call BuildFirmware/Seama/$(1),$(1),cy-swr1100,CY-SWR1100,wrgnd10_samsung_ss815,$(ralink_default_fw_size_8M))
  36. Image/Build/Profile/DIR645=$(call BuildFirmware/Seama/$(1),$(1),dir-645,DIR-645,wrgn39_dlob.hans_dir645,$(ralink_default_fw_size_8M))
  37. hpm_mtd_size=16449536
  38. Image/Build/Profile/HPM=$(call BuildFirmware/CustomFlash/$(1),$(1),hpm,HPM,$(hpm_mtd_size))
  39. Image/Build/Profile/RTN56U=$(call BuildFirmware/RTN56U/$(1),$(1),rt-n56u,RT-N56U)
  40. Image/Build/Profile/TEW691GR=$(call BuildFirmware/UMedia/$(1),$(1),tew-691gr,TEW-691GR,0x026910)
  41. Image/Build/Profile/TEW692GR=$(call BuildFirmware/UMedia/$(1),$(1),tew-692gr,TEW-692GR,0x026920)
  42. kernel_size_BR6475ND:=2097152
  43. rootfs_size_BR6475ND:=5832704
  44. Image/Build/Profile/BR6475ND=$(call BuildFirmware/EdimaxCombined/$(1),$(1),br-6475nd,BR-6475ND,$(kernel_size_BR6475ND),$(rootfs_size_BR6475ND),CSYS,RN54,0x70000,0x01100000)
  45. define Image/Build/Profile/Default
  46. $(call Image/Build/Profile/CYSWR1100,$(1))
  47. $(call Image/Build/Profile/DIR645,$(1))
  48. $(call Image/Build/Profile/HPM,$(1))
  49. $(call Image/Build/Profile/RTN56U,$(1))
  50. $(call Image/Build/Profile/BR6475ND,$(1))
  51. $(call Image/Build/Profile/TEW691GR,$(1))
  52. $(call Image/Build/Profile/TEW692GR,$(1))
  53. endef