0002-Makefile-HACK-Support-building-u-boot.toc1-for-nezda.patch 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. From 4a923e0e4ef6d2b41cb89d658e269adada847573 Mon Sep 17 00:00:00 2001
  2. From: Peter Korsgaard <peter@korsgaard.com>
  3. Date: Thu, 4 Nov 2021 22:32:04 +0100
  4. Subject: [PATCH] Makefile: HACK: Support building u-boot.toc1 for nezda board
  5. For easier integration into Buildroot. The boot0 / toc1 logic is WIP until
  6. U-Boot gains SPL support for the D1, so add a hack to make it easier to
  7. integrate in Buildroot as-is.
  8. Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
  9. ---
  10. Makefile | 9 +++++++++
  11. nezha.cfg | 9 +++++++++
  12. 2 files changed, 18 insertions(+)
  13. create mode 100644 nezha.cfg
  14. diff --git a/Makefile b/Makefile
  15. index f911f70344..259d93bf80 100644
  16. --- a/Makefile
  17. +++ b/Makefile
  18. @@ -1084,6 +1084,15 @@ endif
  19. .binman_stamp: FORCE
  20. @touch $@
  21. +fw_dynamic.bin: $(OPENSBI)
  22. + $(call if_changed,copy)
  23. +
  24. +MKIMAGEFLAGS_u-boot.toc1 = -T sunxi_toc1
  25. +u-boot.toc1: nezha.cfg fw_dynamic.bin inputs
  26. + $(call if_changed,mkimage)
  27. +
  28. +all: u-boot.toc1
  29. +
  30. ifeq ($(CONFIG_DEPRECATED),y)
  31. $(warning "You have deprecated configuration options enabled in your .config! Please check your configuration.")
  32. endif
  33. diff --git a/nezha.cfg b/nezha.cfg
  34. new file mode 100644
  35. index 0000000000..2d23b9b388
  36. --- /dev/null
  37. +++ b/nezha.cfg
  38. @@ -0,0 +1,9 @@
  39. +[opensbi]
  40. +file = fw_dynamic.bin
  41. +addr = 0x40000000
  42. +[dtb]
  43. +file = arch/riscv/dts/sun20i-d1-nezha.dtb
  44. +addr = 0x44000000
  45. +[u-boot]
  46. +file = u-boot-nodtb.bin
  47. +addr = 0x4a000000
  48. --
  49. 2.20.1