mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH] barebox in-system update infrastructure
Date: Mon, 15 Oct 2012 15:15:03 +0200	[thread overview]
Message-ID: <1350306908-25206-1-git-send-email-s.hauer@pengutronix.de> (raw)

This is an update to the barebox in-system update infrastructure
I posted some time ago.

Basically this infrastructure adds a command which calls previously
registered handlers to update barebox in flash/mmc/...

Here is an example session:

barebox@Ka-Ro tx53:/ barebox_update
Usage: barebox_update [OPTIONS] <image>
Update barebox to persistent media
-t <target>
-d <device>     write image to <device> instead of handler default
                Can be used for debugging purposes (-d /tmpfile)
-y              yes. Do not ask for confirmation
-f <level>      Set force level
-l              list registered targets

barebox@Ka-Ro tx53:/ barebox_update -l
registered update handlers:
* nand-xx30   -> /dev/nand0
  mmc-1011    -> /dev/disk0

barebox@Ka-Ro tx53:/ barebox_update -t mmc-1011 /mnt/tftp/barebox-tx53.bin
100Mbps full duplex link detected
DHCP client bound to address 192.168.24.6
update barebox from /mnt/tftp/barebox-tx53.bin using handler mmc-1011 to /dev/disk0 (y/n)?
updating to /dev/disk0
update succeeded

The only user of this infrastructure currently is the i.MX internal
boot mode. For MMC/SD users this has the advantage that the update
command preserves the partition table on the MMC/SD card. For NAND
users it has the advantage that a BBT table for the i.MX BOOT ROM is
created, so that bad blocks in the area where the barebox binary
resides are automatically skipped. Also before flashing an image
it's tested whether the image to flash really is a barebox image.

Sascha

----------------------------------------------------------------
Sascha Hauer (5):
      Add in-system barebox update infrastructure
      ARM i.MX: Add barebox update handler for internal boot
      ARM i.MX51 babbage: register MMC update handler
      ARM i.MX53 loco: register MMC update handler
      ARM i.MX53 tx53: register MMC and NAND update handler

 arch/arm/boards/freescale-mx51-pdk/board.c         |    9 +
 arch/arm/boards/freescale-mx51-pdk/dcd-data.h      |   60 +++
 arch/arm/boards/freescale-mx51-pdk/flash_header.c  |   61 +--
 arch/arm/boards/freescale-mx53-loco/board.c        |    9 +
 arch/arm/boards/freescale-mx53-loco/dcd-data.h     |   54 ++
 arch/arm/boards/freescale-mx53-loco/flash_header.c |   56 +-
 arch/arm/boards/karo-tx53/board.c                  |   18 +
 arch/arm/boards/karo-tx53/dcd-data-1011.h          |   94 ++++
 arch/arm/boards/karo-tx53/dcd-data-xx30.h          |  145 ++++++
 arch/arm/boards/karo-tx53/flash_header.c           |  248 +--------
 arch/arm/mach-imx/Makefile                         |    1 +
 arch/arm/mach-imx/imx-bbu-internal.c               |  543 ++++++++++++++++++++
 arch/arm/mach-imx/include/mach/bbu.h               |   51 ++
 arch/arm/mach-imx/include/mach/imx-flash-header.h  |    2 +
 commands/Kconfig                                   |    5 +
 commands/Makefile                                  |    1 +
 commands/barebox-update.c                          |   86 ++++
 common/Kconfig                                     |    3 +
 common/Makefile                                    |    1 +
 common/bbu.c                                       |  150 ++++++
 include/bbu.h                                      |   49 ++
 21 files changed, 1299 insertions(+), 347 deletions(-)
 create mode 100644 arch/arm/boards/freescale-mx51-pdk/dcd-data.h
 create mode 100644 arch/arm/boards/freescale-mx53-loco/dcd-data.h
 create mode 100644 arch/arm/boards/karo-tx53/dcd-data-1011.h
 create mode 100644 arch/arm/boards/karo-tx53/dcd-data-xx30.h
 create mode 100644 arch/arm/mach-imx/imx-bbu-internal.c
 create mode 100644 arch/arm/mach-imx/include/mach/bbu.h
 create mode 100644 commands/barebox-update.c
 create mode 100644 common/bbu.c
 create mode 100644 include/bbu.h

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

             reply	other threads:[~2012-10-15 13:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-15 13:15 Sascha Hauer [this message]
2012-10-15 13:15 ` [PATCH 1/5] Add in-system barebox " Sascha Hauer
2012-10-15 13:15 ` [PATCH 2/5] ARM i.MX: Add barebox update handler for internal boot Sascha Hauer
2012-10-15 13:15 ` [PATCH 3/5] ARM i.MX51 babbage: register MMC update handler Sascha Hauer
2012-10-15 13:15 ` [PATCH 4/5] ARM i.MX53 loco: " Sascha Hauer
2012-10-15 13:15 ` [PATCH 5/5] ARM i.MX53 tx53: register MMC and NAND " 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=1350306908-25206-1-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@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