Advertisement
MrRockchip

gold_flags.diff

Oct 30th, 2019
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.18 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/products_config/wr841nv9_en/basic.config b/build/products_config/wr841nv9_en/basic.config
  64. index 0a6e40a..f5b8067 100755
  65. --- a/build/products_config/wr841nv9_en/basic.config
  66. +++ b/build/products_config/wr841nv9_en/basic.config
  67. @@ -2,9 +2,15 @@
  68. export BOARD_TYPE=ap143
  69. export CFG_BOARD_TYPE=$(BOARD_TYPE)
  70. export TOOLCHAIN=gcc-4.3.3
  71. -export TOOLPREFIX=mips-linux-uclibc-
  72. +export TOOLPREFIX=mips-openwrt-linux-uclibc-
  73. export TOOLARCH=build_mips/staging_dir/usr
  74. -export UBOOT_GCC_4_3_3_EXTRA_CFLAGS=-fPIC
  75. +### export UBOOT_GCC_4_3_3_EXTRA_CFLAGS=-fPIC
  76. +
  77. +### SHITWARE SHITWARE_UBOOT_EXTRA_MIPSFLAGS ###
  78. +export SHITWARE_UBOOT_EXTRA_MIPSFLAGS=-G 0 -fPIC -msoft-float -fno-schedule-insns -fno-schedule-insns2 -mips32r2 -mtune=34kc
  79. +
  80. +### SHITWARE SHITWARE_UBOOT_EXTRA_CPPFLAGS ###
  81. +export SHITWARE_UBOOT_EXTRA_CPPFLAGS=-fno-reorder-functions -fno-delete-null-pointer-checks
  82.  
  83. export KERNEL=mips-linux-2.6.31
  84. export KERNELVER=2.6.31
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement