mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Juergen Beisert <jbe@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCHv2 02/14] Consider real and protected mode in the dump file
Date: Tue, 12 Jan 2010 11:15:36 +0100	[thread overview]
Message-ID: <20100112102053.993635547@pengutronix.de> (raw)
In-Reply-To: <20100112101534.868276907@pengutronix.de>

[-- Attachment #1: consider_code_type.diff --]
[-- Type: text/plain, Size: 2019 bytes --]

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@pengutronix.de>

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

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

-- 

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2010-01-12 10:21 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-12 10:15 [PATCHv2 00/14] Bring in basic x86 support into 'barebox' Juergen Beisert
2010-01-12 10:15 ` [PATCHv2 01/14] Add a tool to activate barebox as a boot loader on x86 architectures Juergen Beisert
2010-01-12 10:15 ` Juergen Beisert [this message]
2010-01-12 10:15 ` [PATCHv2 03/14] Adding x86 usage documentation to the tree Juergen Beisert
2010-01-12 10:15 ` [PATCHv2 04/14] Adding required architecture header files Juergen Beisert
2010-01-12 10:15 ` [PATCHv2 05/14] Bring in the first x86 specific code Juergen Beisert
2010-01-12 10:15 ` [PATCHv2 06/14] Add some generic functions to make x86 work Juergen Beisert
2010-01-12 10:15 ` [PATCHv2 07/14] Add functions to be able to boot with BIOSs help Juergen Beisert
2010-01-12 10:15 ` [PATCHv2 08/14] Add a generic PC platform Juergen Beisert
2010-01-12 10:15 ` [PATCHv2 09/14] Bring in the time reference for the x86 platforms Juergen Beisert
2010-01-12 10:15 ` [PATCHv2 10/14] Start to add ATA support to barebox Juergen Beisert
2010-01-12 10:15 ` [PATCHv2 11/14] Add the main disk driver Juergen Beisert
2010-01-12 10:15 ` [PATCHv2 12/14] Add a low level disk drive access driver Juergen Beisert
2010-01-12 10:15 ` [PATCHv2 13/14] Add a special command to load and start a bzImage on x86 Juergen Beisert
2010-01-12 10:15 ` [PATCHv2 14/14] Add the whole x86 architecture to the build system Juergen Beisert
2010-01-14  9:29 ` [PATCHv2 00/14] Bring in basic x86 support into 'barebox' Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100112102053.993635547@pengutronix.de \
    --to=jbe@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox