summaryrefslogtreecommitdiffstats
path: root/configs/platform-chumby/patches/imx-bootlets-src-10.07.11/improve_buildsystem.diff
diff options
context:
space:
mode:
Diffstat (limited to 'configs/platform-chumby/patches/imx-bootlets-src-10.07.11/improve_buildsystem.diff')
-rw-r--r--configs/platform-chumby/patches/imx-bootlets-src-10.07.11/improve_buildsystem.diff129
1 files changed, 129 insertions, 0 deletions
diff --git a/configs/platform-chumby/patches/imx-bootlets-src-10.07.11/improve_buildsystem.diff b/configs/platform-chumby/patches/imx-bootlets-src-10.07.11/improve_buildsystem.diff
new file mode 100644
index 0000000..53e2958
--- /dev/null
+++ b/configs/platform-chumby/patches/imx-bootlets-src-10.07.11/improve_buildsystem.diff
@@ -0,0 +1,129 @@
+From: Juergen Beisert <jbe@pengutronix.de>
+Subject: Provide as much info as possible about the generated binaries
+
+Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
+
+---
+ boot_prep/Makefile | 8 ++++++--
+ boot_prep/link.lds | 6 +++---
+ power_prep/Makefile | 17 ++++++++++++-----
+ power_prep/eabi.S | 3 +++
+ power_prep/link.lds | 6 +++---
+ 5 files changed, 27 insertions(+), 13 deletions(-)
+
+Index: imx-bootlets-src-10.07.11/boot_prep/Makefile
+===================================================================
+--- imx-bootlets-src-10.07.11.orig/boot_prep/Makefile
++++ imx-bootlets-src-10.07.11/boot_prep/Makefile
+@@ -20,8 +20,8 @@ OBJDUMP = $(CROSS_COMPILE)objdump
+
+ MEM_TYPE ?= MEM_DDR1
+
+-CFLAGS = -g -Wall -I$(INCLUDEDIR) -I$(INCLUDEDIR)/mach -I./ -O -D$(MEM_TYPE)
+-LDFLAGS = -static -nostdlib -T $(BOOT_LAYOUT)
++CFLAGS = -g -Wall -I$(INCLUDEDIR) -I$(INCLUDEDIR)/mach -I./ -O -D$(MEM_TYPE) -fdata-sections -ffunction-sections
++LDFLAGS = -static -gc-sections -nostdlib -T $(BOOT_LAYOUT) -Map=$@.map --cref
+
+ # Generic code
+ CORE_OBJS = init-$(ARCH).o debug.o
+@@ -42,10 +42,14 @@ all: boot_prep
+
+ boot_prep: $(BOOT_LAYOUT) $(CORE_OBJS)
+ $(LD) -o $@ $(CORE_OBJS) $(LDFLAGS)
++ @echo "-------------------------------------------------" > $@.list
++ @echo " * Regular Text content" >> $@.list
++ @$(OBJDUMP) -j .text -S -d $@ >> $@.list
+
+ clean:
+ @echo Cleaning...
+ @echo Files:
+ @echo Build output:
++ rm -f boot_prep.map
+ rm -rf *.o
+ rm -f boot_prep
+Index: imx-bootlets-src-10.07.11/power_prep/Makefile
+===================================================================
+--- imx-bootlets-src-10.07.11.orig/power_prep/Makefile
++++ imx-bootlets-src-10.07.11/power_prep/Makefile
+@@ -29,8 +29,8 @@ ifeq ($(POWERFLAG),MXS_VBUS_CURRENT_DRAW
+ CFLAGS += -DMXS_VBUS_CURRENT_DRAW
+ endif
+
+-CFLAGS += -Wall $(INCLUDEDIRS) -I./ -O -DSTMP378x -D$(ARCH)
+-LDFLAGS = -static -gc-sections -nostdlib -T $(BOOT_LAYOUT)
++CFLAGS += -g -Wall $(INCLUDEDIRS) -I./ -O -DSTMP378x -D$(ARCH) -fdata-sections -ffunction-sections
++LDFLAGS = -static -gc-sections -nostdlib -T $(BOOT_LAYOUT) -Map=$@.map --cref
+
+
+ #TOP_LEVEL_OBJS = power_prep.o
+@@ -70,9 +70,16 @@ all: power_prep
+ #
+ .PHONY: build build_prep clean
+ power_prep: libs $(BOOT_LAYOUT) $(POWER_PREP_OBJS) $(CORE_OBJS)
+- $(LD) -o $@ $(POWER_PREP_OBJS) $(ddi_libs) $(hw_libs) \
+- $(LDFLAGS) $(CORE_OBJS)
+- @nm -n $@ > power_prep.map
++ $(LD) -o $@ $(POWER_PREP_OBJS) $(ddi_libs) $(hw_libs) $(LDFLAGS) $(CORE_OBJS)
++ @echo "-------------------------------------------------" > $@.list
++ @echo " * Regular Text content" >> $@.list
++ @$(OBJDUMP) -j .text -S -d $@ >> $@.list
++ @echo "-------------------------------------------------" >> $@.list
++ @echo " * Regular Data content" >> $@.list
++ @$(OBJDUMP) -j .data -d $@ >> $@.list
++ @echo "-------------------------------------------------" >> $@.list
++ @echo " * Regular BSS content" >> $@.list
++ @$(OBJDUMP) -j .bss -d $@ >> $@.list
+
+ libs:
+ $(MAKE) -C $(COMMONSRCDIR)/hw
+Index: imx-bootlets-src-10.07.11/boot_prep/link.lds
+===================================================================
+--- imx-bootlets-src-10.07.11.orig/boot_prep/link.lds
++++ imx-bootlets-src-10.07.11/boot_prep/link.lds
+@@ -4,9 +4,9 @@ SECTIONS
+ {
+ . = 0x00000000;
+ . = ALIGN(4);
+- .text : { *(.text) }
+- .data : { *(.data) }
+- .bss : { *(.bss) }
++ .text : { *(.text) *(.text*) *(.rodata*) }
++ .data : { *(.data) *(.data*) }
++ .bss : { *(.bss) *(.bss*) }
+ }
+
+
+Index: imx-bootlets-src-10.07.11/power_prep/link.lds
+===================================================================
+--- imx-bootlets-src-10.07.11.orig/power_prep/link.lds
++++ imx-bootlets-src-10.07.11/power_prep/link.lds
+@@ -4,9 +4,9 @@ SECTIONS
+ {
+ . = 0x00000000;
+ . = ALIGN(4);
+- .text : { *(.text) }
+- .data : { *(.data) }
+- .bss : { *(.bss) }
++ .text : { *(.text) *(.text*) *(.rodata*) }
++ .data : { *(.data) *(.data*) }
++ .bss : { *(.bss) *(.bss*) }
+ }
+
+
+Index: imx-bootlets-src-10.07.11/power_prep/eabi.S
+===================================================================
+--- imx-bootlets-src-10.07.11.orig/power_prep/eabi.S
++++ imx-bootlets-src-10.07.11/power_prep/eabi.S
+@@ -15,9 +15,12 @@
+ * ARM EABI toolchain needs divide by zero handler to be implemented
+ * externally.
+ */
++ .section ".text.__div0","ax"
+ .globl __div0
+ __div0:
+ mov pc, lr
++
++ .section ".text.__aeabi_unwind_cpp_pr0","ax"
+ .globl __aeabi_unwind_cpp_pr0
+ __aeabi_unwind_cpp_pr0:
+ mov pc, lr