[[RFC] 02/14] From: Juergen Beisert <jbe@xxxxxxxxxxxxxx>

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On x86 'objdump' does not know which parts of the image are 16 bit code and
32 bit. As the default is 32 bit, it will output garbage from the 16 bit parts
(due to 16/32 bit ops are sharing the same opcodes).

Signed-off-by: Juergen Beisert <jbe@xxxxxxxxxxxxxx>

---
 Makefile |   23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

Index: u-boot-2.0.0-rc10/Makefile
===================================================================
--- u-boot-2.0.0-rc10.orig/Makefile
+++ u-boot-2.0.0-rc10/Makefile
@@ -643,7 +643,30 @@ endef
 
 uboot.bin: uboot
 	$(Q)$(OBJCOPY) -O binary uboot uboot.bin
+ifdef CONFIG_X86
+ifdef CONFIG_X86_HDBOOT
+	@echo "-------------------------------------------------" > u-boot.S
+	@echo " * MBR content" >> uboot.S
+	$(Q)$(OBJDUMP) -j .bootsector -mi8086 -d uboot >> uboot.S
+	@echo "-------------------------------------------------" >> uboot.S
+	@echo " * Boot loader content" >> uboot.S
+	$(Q)$(OBJDUMP) -j .bootstrapping -mi8086 -d uboot >> uboot.S
+endif
+	@echo "-------------------------------------------------" >> uboot.S
+	@echo " * Regular Text content" >> uboot.S
+	$(Q)$(OBJDUMP) -j .text -d uboot >> uboot.S
+	@echo "-------------------------------------------------" >> uboot.S
+	@echo " * Regular Data content" >> uboot.S
+	$(Q)$(OBJDUMP) -j .data -d uboot >> uboot.S
+	@echo "-------------------------------------------------" >> uboot.S
+	@echo " * Commands content" >> uboot.S
+	$(Q)$(OBJDUMP) -j .u_boot_cmd -d uboot >> uboot.S
+	@echo "-------------------------------------------------" >> uboot.S
+	@echo " * Init Calls content" >> uboot.S
+	$(Q)$(OBJDUMP) -j .u_boot_initcalls -d uboot >> uboot.S
+else
 	$(Q)$(OBJDUMP) -d uboot > uboot.S
+endif
 
 # uboot image
 uboot: $(uboot-lds) $(uboot-head) $(uboot-common) $(kallsyms.o) FORCE

-- 

_______________________________________________
u-boot-v2 mailing list
u-boot-v2@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/u-boot-v2

[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux