000-mtk-12-board-mt7629-enable-compression-of-u-boot-to-reduce-.patch 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. From a80ef99cb308904b82662deb66c5ed7a6ff59928 Mon Sep 17 00:00:00 2001
  2. From: Weijie Gao <[email protected]>
  3. Date: Wed, 3 Mar 2021 11:13:36 +0800
  4. Subject: [PATCH 12/21] board: mt7629: enable compression of u-boot to reduce
  5. the size of final image
  6. This patch makes use of the decompression mechanism implemented for mt7628
  7. previously to reduce the total image size. Binman will be also removed.
  8. Signed-off-by: Weijie Gao <[email protected]>
  9. ---
  10. Makefile | 3 +++
  11. arch/arm/dts/mt7629-rfb-u-boot.dtsi | 18 ------------------
  12. arch/arm/mach-mediatek/Kconfig | 1 -
  13. configs/mt7629_rfb_defconfig | 6 ++++++
  14. 4 files changed, 9 insertions(+), 19 deletions(-)
  15. --- a/Makefile
  16. +++ b/Makefile
  17. @@ -1666,6 +1666,9 @@ u-boot-elf.lds: arch/u-boot-elf.lds prep
  18. ifeq ($(CONFIG_SPL),y)
  19. spl/u-boot-spl-mtk.bin: spl/u-boot-spl
  20. +
  21. +u-boot-mtk.bin: u-boot-with-spl.bin
  22. + $(call if_changed,copy)
  23. else
  24. MKIMAGEFLAGS_u-boot-mtk.bin = -T mtk_image \
  25. -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_TEXT_BASE) \
  26. --- a/arch/arm/dts/mt7629-rfb-u-boot.dtsi
  27. +++ b/arch/arm/dts/mt7629-rfb-u-boot.dtsi
  28. @@ -5,24 +5,6 @@
  29. * Author: Weijie Gao <[email protected]>
  30. */
  31. -#include <config.h>
  32. -/ {
  33. - binman {
  34. - filename = "u-boot-mtk.bin";
  35. - pad-byte = <0xff>;
  36. -
  37. -#ifdef CONFIG_SPL
  38. - blob {
  39. - filename = "spl/u-boot-spl-mtk.bin";
  40. - size = <CONFIG_SPL_PAD_TO>;
  41. - };
  42. -
  43. - u-boot-img {
  44. - };
  45. -#endif
  46. - };
  47. -};
  48. -
  49. &infracfg {
  50. u-boot,dm-pre-reloc;
  51. };
  52. --- a/arch/arm/mach-mediatek/Kconfig
  53. +++ b/arch/arm/mach-mediatek/Kconfig
  54. @@ -36,7 +36,6 @@ config TARGET_MT7629
  55. bool "MediaTek MT7629 SoC"
  56. select CPU_V7A
  57. select SPL
  58. - select BINMAN
  59. help
  60. The MediaTek MT7629 is a ARM-based SoC with a dual-core Cortex-A7
  61. including DDR3, crypto engine, 3x3 11n/ac Wi-Fi, Gigabit Ethernet,
  62. --- a/configs/mt7629_rfb_defconfig
  63. +++ b/configs/mt7629_rfb_defconfig
  64. @@ -10,7 +10,11 @@ CONFIG_SPL_TEXT_BASE=0x201000
  65. CONFIG_TARGET_MT7629=y
  66. CONFIG_SPL_SERIAL_SUPPORT=y
  67. CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
  68. +CONFIG_SPL_STACK_R_ADDR=0x40800000
  69. +CONFIG_SPL_PAYLOAD="u-boot-lzma.img"
  70. +CONFIG_BUILD_TARGET="u-boot-mtk.bin"
  71. CONFIG_DEFAULT_DEVICE_TREE="mt7629-rfb"
  72. +CONFIG_SPL_IMAGE="spl/u-boot-spl-mtk.bin"
  73. CONFIG_FIT=y
  74. CONFIG_FIT_VERBOSE=y
  75. CONFIG_BOOTDELAY=3
  76. @@ -18,6 +22,7 @@ CONFIG_DEFAULT_FDT_FILE="mt7629-rfb"
  77. CONFIG_SYS_CONSOLE_IS_IN_ENV=y
  78. # CONFIG_DISPLAY_BOARDINFO is not set
  79. CONFIG_SPL_SYS_MALLOC_SIMPLE=y
  80. +CONFIG_SPL_STACK_R=y
  81. CONFIG_SPL_NOR_SUPPORT=y
  82. CONFIG_SPL_WATCHDOG_SUPPORT=y
  83. CONFIG_HUSH_PARSER=y
  84. @@ -87,4 +92,5 @@ CONFIG_USB_STORAGE=y
  85. CONFIG_USB_KEYBOARD=y
  86. CONFIG_WDT_MTK=y
  87. CONFIG_LZMA=y
  88. +CONFIG_SPL_LZMA=y
  89. # CONFIG_EFI_LOADER is not set