[U-Boot] [PATCH V3 3/8] arm: Add savebp implementation for arm

Andreas Bießmann andreas.devel at googlemail.com
Thu Aug 25 13:08:42 CEST 2011


Dear Simon,

Am 25.08.2011 10:33, schrieb Simon Schwarz:
> This adds the savebp implementation to the arm platform.

please reorder your series and let this come before 'Add savebp command'
cause that patch uses functionality from this one.

> Related CONFIGs:
> CONFIG_CMD_SAVEBP_WRITE_SIZE defines the size of the image to write
> 
> Signed-off-by: Simon Schwarz <simonschwarzcor at gmail.com>
> ---
> 
> V2 changes:
> DEL _cosmetic_ old comment
> 
> V3 changes:
> nothing
> ---
>  arch/arm/include/asm/savebp.h |   27 ++++++++++++
>  arch/arm/lib/Makefile         |    1 +
>  arch/arm/lib/savebp.c         |   91 +++++++++++++++++++++++++++++++++++++++++
>  include/command.h             |    5 ++
>  include/configs/devkit8000.h  |    1 +

documentation of  CONFIG_CMD_SAVEBP_WRITE_SIZE  is missing

> diff --git a/arch/arm/include/asm/savebp.h b/arch/arm/include/asm/savebp.h
> new file mode 100644
> index 0000000..3774e45
> --- /dev/null
> +++ b/arch/arm/include/asm/savebp.h
> @@ -0,0 +1,27 @@
> +/* Copyright (C) 2011
> + * Corscience GmbH & Co. KG - Simon Schwarz <schwarz at corscience.de>
> + *
> + * See file CREDITS for list of people who contributed to this
> + * project.
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License as
> + * published by the Free Software Foundation; either version 2 of
> + * the License, or (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
> + * MA 02111-1307 USA
> + */
> +#ifndef _SAVEBP_H_
> +#define _SAVEBP_H_
> +
> +extern bootm_headers_t images;

You made that available globally in your first patch of this series,
please remove that from first patch and move to this one.

<snip>

BTW while reading this patch I got another idea to solve problem 'how
get we saved the boot information to <storage>'.
The required information regardless of whether it is ATAGS or FDT is
only a blob at some place in ram after the 'bootm x' commands used in
'Add savebp command'. Saving a blob from location X with size Y to
location Z is easy and already implemented.

So the only required thing is to get the 'blob' prepared in RAM. In my
opinion this could be a subcommand of bootm instead of a new command.

How about:

---8<---
# bootm savebp
...done boot information is @0x80000100 with size 0x100
# nandecc hw
# nand erase ...
# nand write 80000100 ...
--->8---

regards

Andreas Bießmann


More information about the U-Boot mailing list