Advertisement
MrRockchip

gold_flags_2.diff

Oct 30th, 2019
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.86 KB | None | 0 0
  1. diff --git a/ap143/boot/u-boot/config.mk b/ap143/boot/u-boot/config.mk
  2. index dfd830e..eb3ebf2 100644
  3. --- a/ap143/boot/u-boot/config.mk
  4. +++ b/ap143/boot/u-boot/config.mk
  5. @@ -116,7 +116,7 @@ RANLIB = $(CROSS_COMPILE)RANLIB
  6.  
  7. RELFLAGS= $(PLATFORM_RELFLAGS)
  8. DBGFLAGS= -g #-DDEBUG
  9. -OPTFLAGS= -Os #-fomit-frame-pointer
  10. +OPTFLAGS= -O ### SHITWARE -Os => -O ### #-fomit-frame-pointer
  11. ifndef LDSCRIPT
  12. #LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot.lds.debug
  13. LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot.lds
  14. @@ -127,11 +127,13 @@ LDSCRIPT_BOOTSTRAP := $(TOPDIR)/board/$(BOARDDIR)/u-boot-bootstrap.lds
  15.  
  16. gccincdir := $(shell $(CC) -print-file-name=include)
  17.  
  18. +### SHITWARE $(SHITWARE_UBOOT_EXTRA_CPPFLAGS) ###
  19. CPPFLAGS := $(DBGFLAGS) $(OPTFLAGS) $(RELFLAGS) \
  20. -D__KERNEL__ -DTEXT_BASE=$(TEXT_BASE) \
  21. -I$(TOPDIR)/include \
  22. -fno-builtin -ffreestanding -nostdinc -isystem \
  23. - $(gccincdir) -pipe $(PLATFORM_CPPFLAGS)
  24. + $(gccincdir) -pipe $(PLATFORM_CPPFLAGS) \
  25. + $(SHITWARE_UBOOT_EXTRA_CPPFLAGS)
  26.  
  27. ifdef BUILD_TAG
  28. CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes \
  29. @@ -143,7 +145,9 @@ CFLAGS += -DCOMPRESSED_UBOOT=1
  30. endif
  31.  
  32. ifeq ($(BUILD_OPTIMIZED),y)
  33. -CFLAGS += -Os -funit-at-a-time -mips32r2 -mtune=mips32r2
  34. +### SHITWARE -mips32r2 -mtune=mips32r2 => -mtune=34kc ===> SHITWARE_UBOOT_EXTRA_MIPSFLAGS ###
  35. +### SHITWARE -Os => -O ===> OPTFLAGS ###
  36. +CFLAGS += -funit-at-a-time
  37. endif
  38. endif
  39.  
  40. @@ -213,7 +217,8 @@ ifeq ($(PCI_CLOCK),PCI_66M)
  41. CFLAGS := $(CFLAGS) -DPCI_66M
  42. endif
  43.  
  44. -CFLAGS += $(UBOOT_GCC_4_3_3_EXTRA_CFLAGS) -g
  45. +### SHITWARE $(UBOOT_GCC_4_3_3_EXTRA_CFLAGS) => $(SHITWARE_UBOOT_EXTRA_MIPSFLAGS) ###
  46. +CFLAGS += -g
  47.  
  48. #########################################################################
  49.  
  50. diff --git a/ap143/boot/u-boot/cpu/mips/config.mk b/ap143/boot/u-boot/cpu/mips/config.mk
  51. index fb2ccf7..402565f 100644
  52. --- a/ap143/boot/u-boot/cpu/mips/config.mk
  53. +++ b/ap143/boot/u-boot/cpu/mips/config.mk
  54. @@ -35,6 +35,7 @@ ENDIANNESS = -EL
  55. #ENDIANNESS = -EB
  56. endif
  57.  
  58. -MIPSFLAGS += $(ENDIANNESS) -mabicalls -march=mips32r2
  59. +### SHITWARE $(SHITWARE_UBOOT_EXTRA_MIPSFLAGS) ###
  60. +MIPSFLAGS += $(ENDIANNESS) -mabicalls -march=mips32r2 $(SHITWARE_UBOOT_EXTRA_MIPSFLAGS)
  61.  
  62. PLATFORM_CPPFLAGS += $(MIPSFLAGS)
  63. diff --git a/build/Makefile b/build/Makefile
  64. index cdac10d..39e76dd 100644
  65. --- a/build/Makefile
  66. +++ b/build/Makefile
  67. @@ -5,6 +5,7 @@ export DEV_NAME=wr841nv9_en
  68.  
  69. export TOPDIR=$(PWD)/..
  70. export PRODUCT_CONFIG_DIR=$(TOPDIR)/build/products_config/$(DEV_NAME)/
  71. +export STAGING_DIR=$(TOPDIR)/build/gcc-4.3.3/build_mips/staging_dir/
  72.  
  73. include $(PRODUCT_CONFIG_DIR)/basic.config
  74.  
  75. @@ -61,7 +62,8 @@ export ORIGINAL_PATH:=$(PATH)
  76. # as well as other tools we expect to find.
  77. export PATH:=$(TOOLPATH)/bin:${PATH}
  78.  
  79. -all: toolchain_prep uboot_clean uboot
  80. +### all: toolchain_prep uboot_clean uboot
  81. +all: uboot_clean uboot
  82.  
  83. ######## prepare toolchain ########
  84. toolchain_prep:
  85. diff --git a/build/products_config/wr841nv9_en/basic.config b/build/products_config/wr841nv9_en/basic.config
  86. index 0a6e40a..f5b8067 100755
  87. --- a/build/products_config/wr841nv9_en/basic.config
  88. +++ b/build/products_config/wr841nv9_en/basic.config
  89. @@ -2,9 +2,15 @@
  90. export BOARD_TYPE=ap143
  91. export CFG_BOARD_TYPE=$(BOARD_TYPE)
  92. export TOOLCHAIN=gcc-4.3.3
  93. -export TOOLPREFIX=mips-linux-uclibc-
  94. +export TOOLPREFIX=mips-openwrt-linux-uclibc-
  95. export TOOLARCH=build_mips/staging_dir/usr
  96. -export UBOOT_GCC_4_3_3_EXTRA_CFLAGS=-fPIC
  97. +### export UBOOT_GCC_4_3_3_EXTRA_CFLAGS=-fPIC
  98. +
  99. +### SHITWARE SHITWARE_UBOOT_EXTRA_MIPSFLAGS ###
  100. +export SHITWARE_UBOOT_EXTRA_MIPSFLAGS=-G 0 -fPIC -msoft-float -fno-schedule-insns -fno-schedule-insns2 -mips32r2 -mtune=34kc
  101. +
  102. +### SHITWARE SHITWARE_UBOOT_EXTRA_CPPFLAGS ###
  103. +export SHITWARE_UBOOT_EXTRA_CPPFLAGS=-fno-reorder-functions -fno-delete-null-pointer-checks
  104.  
  105. export KERNEL=mips-linux-2.6.31
  106. export KERNELVER=2.6.31
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement