From: Szabolcs Sipos <labuwx@balfug.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Save flash from U-Boot
Date: Tue, 25 Jun 2013 21:09:53 +0200 [thread overview]
Message-ID: <000101ce71d7$941e3cc0$bc5ab640$@balfug.com> (raw)
In-Reply-To: <20130625183210.A16FB380468@gemini.denx.de>
Dear Wolfgang Denk,
My ISP doesn't have the source of U-Boot because they left the original one (from ZTE) on the router. They modified the main firmware only. I want to make a dump from the hall flash and then install a new main firmware. I tried md but it made the router restart (except with address 0x00000000).
Szabolcs Sipos
-----Original Message-----
From: Wolfgang Denk [mailto:wd at denx.de]
Sent: Tuesday, June 25, 2013 8:32 PM
To: Szabolcs Sipos
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] Save flash from U-Boot
Dear "Szabolcs Sipos",
In message <000101ce71cd$34a620a0$9df261e0$@balfug.com> you wrote:
>
> Unfortunately the bootloader isn't modified by the ISP, only the main
> firmware. If a knew that the main firmware was also covered by GPL, I
> would ask them but I am sure they would tell me nothing, they don't
> tell even my VOIP password.
I'm afraid I don't understand your situation. If you have the U-Boot code, you could add the missing commands, and just install teh new U-Boot, leaving the rest of the firmware untouched?
As for backup, if everything else goes wrong, you can just run a "md"
over the whole U-Boot code area, and capture the outpput to a file (say, by running your terminal program in a "script" session if it does not support recording directly). Recoding the "md" output into a binary blob is a trivial thing to do; a quick & dirty hack could look like that:
--------------------------- snip --------------------------- #!/usr/bin/perl -w
# Un-dump hexdump listing and write binary image to stdout.
# 002044F4 3C353E5B 20202020 302E3030 30303030 <5>[ 0.000000
# 00204504 5D204C69 6E757820 76657273 696F6E20 ] Linux version
# 00204514 322E362E 32322E36 20286D61 7263656C 2.6.22.6 (marcel
# 00204524 40736861 646F776C 61702920 28676363 @shadowlap) (gcc
# 00204534 20766572 73696F6E 20342E31 2E322028 version 4.1.2 (
# ...
#
while (<>) {
chomp;
my (@tmp) = split;
for ($i=1; $i<5; $i++) {
syswrite(STDOUT, pack ("N", hex ($tmp[$i])));
}
}
--------------------------- snip ---------------------------
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de Here is an Appalachian version of management's answer to those who are concerned with the fate of the project: "Don't worry about the
mule. Just load the wagon." - Mike Dennison's hillbilly uncle
prev parent reply other threads:[~2013-06-25 19:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-25 11:21 [U-Boot] Save flash from U-Boot Szabolcs Sipos
2013-06-25 16:49 ` Wolfgang Denk
2013-06-25 17:55 ` Szabolcs Sipos
2013-06-25 18:32 ` Wolfgang Denk
2013-06-25 19:09 ` Szabolcs Sipos [this message]
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='000101ce71d7$941e3cc0$bc5ab640$@balfug.com' \
--to=labuwx@balfug.com \
--cc=u-boot@lists.denx.de \
/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