mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Thomas Mayer <thomas.mayer@telemotive.de>
Cc: barebox@lists.infradead.org
Subject: Re: Update barebox on mmc without touching partition table
Date: Fri, 8 Apr 2011 15:21:27 +0200	[thread overview]
Message-ID: <20110408132127.GW7285@pengutronix.de> (raw)
In-Reply-To: <4D9ED2EC.8070406@telemotive.de>

Hi Thomas,

On Fri, Apr 08, 2011 at 11:18:36AM +0200, Thomas Mayer wrote:
> Hi,
> 
> to copy barebox to a mmc I use the command "dd if=barebox.bin
> of=/dev/sdb bs=512 seek=2 skip=2 && sync". So I don't touch the
> first 0x400 bytes with contains the partition table and everything
> is fine.
> 
> But I want to write a little script to update barebox itself via
> tftp. So I create a partition "/dev/self0" (0x00000 to 0x40000) and
> update barebox with "tftp barebox.bin /dev/self0". The problem is
> that barebox write the first 0x400 bytes too and overwrite the
> partition table .
> 
> Is there any way to "seek" and "skip" with barebox?

Not directly. What you can do is this:

tftp barebox.bin
memcpy -s barebox.bin -d /dev/self0 512 0

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

  reply	other threads:[~2011-04-08 13:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-08  9:18 Thomas Mayer
2011-04-08 13:21 ` Sascha Hauer [this message]
2011-04-13  9:28   ` Thomas Mayer
2011-04-13  9:51     ` Marc Kleine-Budde
2011-04-13 10:55       ` Thomas Mayer
2011-04-13 11:41         ` Marc Kleine-Budde

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=20110408132127.GW7285@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=thomas.mayer@telemotive.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