Commit Graph

49 Commits

Author SHA1 Message Date
Wolfgang Denk dfcd7f2160 Redundant Environment: protect full sector size
Several boards used different ways to specify the size of the
protected area when enabling flash write protection for the sectors
holding the environment variables: some used CONFIG_ENV_SIZE and
CONFIG_ENV_SIZE_REDUND, some used CONFIG_ENV_SECT_SIZE, and some even
a mix of both for the "normal" and the "redundant" areas.

Normally, this makes no difference at all. However, things are
different when you have to deal with boards that can come with
different types of flash chips, which may have different sector
sizes.

Here we may have to chose CONFIG_ENV_SECT_SIZE such that it fits the
biggest sector size, which may include several sectors on boards using
the smaller sector flash types. In such a case, using CONFIG_ENV_SIZE
or CONFIG_ENV_SIZE_REDUND to enable the protection may lead to the
case that only the first of these sectors get protected, while the
following ones aren't.

This is no real problem, but it can be confusing for the user -
especially on boards that use CONFIG_ENV_SECT_SIZE to protect the
"normal" areas, while using CONFIG_ENV_SIZE_REDUND for the
"redundant" area.

To avoid such inconsistencies, I changed all sucn boards that I found
to consistently use CONFIG_ENV_SECT_SIZE for protection. This should
not cause any functional changes to the code.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Paul Ruhland
Cc: Pantelis Antoniou <panto@intracom.gr>
Cc: Stefan Roese <sr@denx.de>
Cc: Gary Jennejohn <garyj@denx.de>
Cc: Dave Ellis <DGE@sixnetio.com>
Acked-by: Stefan Roese <sr@denx.de>
2009-06-04 00:16:16 +02:00
Jean-Christophe PLAGNIOL-VILLARD 6d0f6bcf33 rename CFG_ macros to CONFIG_SYS
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-10-18 21:54:03 +02:00
Jean-Christophe PLAGNIOL-VILLARD 0e8d158664 rename CFG_ENV macros to CONFIG_ENV
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10 22:48:06 +02:00
Jean-Christophe PLAGNIOL-VILLARD 4d2ae70e8c disk-on-chip: remove duplicate doc_probe declaration
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-09 02:17:21 +02:00
Wolfgang Denk 9b55a25369 Fix some more print() format errors.
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-07-11 01:16:00 +02:00
Wolfgang Denk c8a3b109f0 Cleanup out-or-tree building for some boards (.depend)
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-07-02 23:49:18 +02:00
Becky Bruce 9973e3c614 Change initdram() return type to phys_size_t
This patch changes the return type of initdram() from long int to phys_size_t.
This is required for a couple of reasons: long int limits the amount of dram
to 2GB, and u-boot in general is moving over to phys_size_t to represent the
size of physical memory.  phys_size_t is defined as an unsigned long on almost
all current platforms.

This patch *only* changes the return type of the initdram function (in
include/common.h, as well as in each board's implementation of initdram).  It
does not actually modify the code inside the function on any of the platforms;
platforms which wish to support more than 2GB of DRAM will need to modify
their initdram() function code.

Build tested with MAKEALL for ppc, arm, mips, mips-el. Booted on powerpc
MPC8641HPCN.

Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
2008-06-12 08:50:18 +02:00
Marian Balakowicz 9a4daad0a3 [new uImage] Update naming convention for bootm/uImage related code
This patch introduces the following prefix convention for the
image format handling and bootm related code:

genimg_		- dual format shared code
image_		- legacy uImage format specific code
fit_		- new uImage format specific code
boot_		- booting process related code

Related routines are renamed and a few pieces of code are moved around and
re-grouped.

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-02-29 14:58:34 +01:00
Marian Balakowicz d5934ad775 [new uImage] Add dual format uImage support framework
This patch adds framework for dual format images. Format detection is added
and the bootm controll flow is updated to include cases for new FIT format
uImages.

When the legacy (image_header based) format is detected appropriate
legacy specific handling is invoked. For the new (FIT based) format uImages
dual boot framework has a minial support, that will only print out a
corresponding debug messages. Implementation of the FIT specific handling will
be added in following patches.

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-02-25 15:53:49 +01:00
Marian Balakowicz b97a2a0a21 [new uImage] Define a API for image handling operations
- Add inline helper macros for basic header processing
- Move common non inline code common/image.c
- Replace direct header access with the API routines
- Rename IH_CPU_* to IH_ARCH_*

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-02-07 01:12:53 +01:00
Wolfgang Denk a4d2636f2a Adapt board configuration and fix kernel crash on MCC200 board.
The update procedure was modified to turn off the USB subsystem
before exit for MCC200 and TRAB. This is necessary as otherwise the
USB controller continues to write periodically to system memory!

MCC200-specific notes:
- the patch disables the magic key check for MCC200
- the patch contains the configuration changes made
  for the new revision of the board.

Signed-off-by: Sergei Poselenov <sposelenov@emcraft.com>
Signed-off-by: Wolfgang Denk <wd@denx.de>
2007-08-12 15:11:38 +02:00
Jon Loeliger d39b574158 board/[j-z]*: Remove lingering references to CFG_CMD_* symbols.
Fixed some broken instances of "#ifdef CMD_CFG_IDE" too.
Those always evaluated TRUE, and thus were always compiled
even when IDE really wasn't defined/wanted.

Signed-off-by: Jon Loeliger <jdl@freescale.com>
2007-07-10 10:48:22 -05:00
Jon Loeliger 3fe00109a5 board/[m-p]*: Remove obsolete references to CONFIG_COMMANDS
Signed-off-by: Jon Loeliger <jdl@freescale.com>
2007-07-09 18:48:09 -05:00
Grant Likely b4f67513a6 Remove obsolete mpc5xxx linker scripts (1 of 3)
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2007-07-04 01:05:31 +02:00
Jon Loeliger 9107ebe0d3 board/[k-z]*: Augment CONFIG_COMMANDS tests with defined(CONFIG_CMD_*).
This is a compatibility step that allows both the older form
and the new form to co-exist for a while until the older can
be removed entirely.

All transformations are of the form:
Before:
    #if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT)
After:
    #if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) || defined(CONFIG_CMD_AUTOSCRIPT)

Signed-off-by: Jon Loeliger <jdl@freescale.com>
2007-07-04 00:35:03 +02:00
Wolfgang Denk ad4eb55567 MCC200 board: remove warning which is obsolete after PSoC firmware changes
Signed-off-by: Wolfgang Denk <wd@denx.de>
2007-04-18 14:30:39 +02:00
Sergei Poselenov e344568b1b MCC200: Fixes for update procedure
- fix logic error in image type handling
- make sure file system images (cramfs etc.) get stored in flash
  with image header stripped so they can be mounted through MTD
2007-02-28 00:54:18 +01:00
Wolfgang Denk 743571145b Minor code cleanup. 2007-02-27 14:26:04 +01:00
Sergei Poselenov 638dd1458b MCC200 update - add LCD Progress Indicator 2007-02-27 14:17:09 +01:00
Stefan Roese 958de0e22e Merge with git+ssh://sr@pollux.denx.org/home/sr/git/u-boot/denx-merge-sr 2007-02-21 12:53:28 +01:00
Grant Likely 735dd97b1b [PATCH 1_4] Merge common get_dev() routines for block devices
Each of the filesystem drivers duplicate the get_dev routine.  This change
merges them into a single function in part.c

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2007-02-20 09:04:34 +01:00
Wolfgang Denk f5fcc3c20b MCC200: Software Updater: allow both "ramdisk" and "filesystem" types
as root file system images.
2007-02-19 23:09:51 +01:00
Sergei Poselenov 489c696ae7 MCC200: Extensions to Software Update Mechanism
Update / extend Software Update Mechanism for MCC200 board:

- Add support for rootfs image added. The environment variables
  "rootfs_st" and "rootfs_nd" can be used to override the default
  values of the image start and end.
- Remove excessive key check code.
- Code cleanup.
2007-02-19 15:14:53 +01:00
Wolfgang Denk f11033e739 Merge with /home/hs/SC3/u-boot
Some code cleanup.
2007-01-15 13:41:04 +01:00
Wolfgang Denk 787fa15860 Fix auto_update for MCC200 board.
The invocation of do_auto_update() is moved to the end of the
misc_init_r() function, after the flash mappings have been
initialized. Please find attached a patch that implements that
change.

Also correct the decoding of the keypad status. With this update, the
key that will trigger the update is Column 2, Row 2.
2007-01-10 01:28:39 +01:00
Wolfgang Denk 82e5236a8b Minor code cleanup; update CHANGELOG. 2006-12-22 10:30:26 +01:00
Andrei Safronov cdb97a6678 automatic update mechanism 2006-12-08 16:23:08 +01:00
Wolfgang Denk a9398e0185 Minor code cleanup. Update CHANGELOG. 2006-11-27 15:32:42 +01:00
Wolfgang Denk 91650b3e4d Sequential accesses to non-existent memory must be synchronized,
at least on G2 cores.

This fixes get_ram_size() problems on MPC5200 Rev. B boards.
2006-11-06 17:06:36 +01:00
Wolfgang Denk 2b208f5308 Move "ar" flags to config.mk to allow for silent "make -s"
Based on patch by Mike Frysinger, 20 Jun 2006
2006-10-09 01:02:05 +02:00
Wolfgang Denk 6741ae92f3 Merge with /home/m8/git/u-boot 2006-09-04 01:03:57 +02:00
Marian Balakowicz f93286397e Add support for a saving build objects in a separate directory.
Modifications are based on the linux kernel approach and
support two use cases:

  1) Add O= to the make command line
  'make O=/tmp/build all'

  2) Set environement variable BUILD_DIR to point to the desired location
  'export BUILD_DIR=/tmp/build'
  'make'

The second approach can also be used with a MAKEALL script
'export BUILD_DIR=/tmp/build'
'./MAKEALL'

Command line 'O=' setting overrides BUILD_DIR environent variable.

When none of the above methods is used the local build is performed and
the object files are placed in the source directory.
2006-09-01 19:49:50 +02:00
Wolfgang Denk e8143e72e1 Add splashscreen support for MCC200 board. 2006-08-30 23:09:00 +02:00
Wolfgang Denk 16850919ff Code cleanup 2006-08-27 18:10:01 +02:00
Wolfgang Denk ed1cf8456f Updates for MCC200 / PRS200 boards:
- support for configurations with SDRAM or DDR memory,
- support for highboot and lowboot
- adjusting environment definitions
2006-08-24 00:26:42 +02:00
Wolfgang Denk 6183bb9e5b MCC200: restrict addressable flash space to 32 MB 2006-08-17 00:50:26 +02:00
Wolfgang Denk 4819fad905 MCC200: set default configuration to low_boot DDR,
and support for configurable options high_boot and/or SDRAM.
2006-07-23 22:40:51 +02:00
Wolfgang Denk 985b950a9b Fix error in flash protection calculation on MCC200 board. 2006-07-10 23:22:43 +02:00
Wolfgang Denk 9e18a4bc6c Fix memory init problems on MCC200 board 2006-06-14 16:48:18 +02:00
Wolfgang Denk 5d7022b041 Fix U-Boot enviroenment sector protection on MCC200 board 2006-06-09 21:19:21 +02:00
Wolfgang Denk 3a5e21881a MCC200 Board: fix flash unprotection code for flash > 32 MB. 2006-04-06 15:03:42 +02:00
Wolfgang Denk d87080b721 GCC-4.x fixes: clean up global data pointer initialization for all boards. 2006-03-31 18:32:53 +02:00
Wolfgang Denk 951a954b77 Merge with /home/wd/git/u-boot/master
Code cleanup.
2006-03-06 23:18:48 +01:00
Wolfgang Denk bfc81252c0 Minor code cleanup 2006-03-06 13:03:37 +01:00
Stefan Roese f1ee982506 Add lowboot target to mcc200 board
Patch by Stefan Roese, 4 Mar 2006
2006-03-04 14:57:03 +01:00
Stefan Roese f18e874ad5 Fix problem with flash_get_size() from CFI driver update
Patch by Stefan Roese, 1 Mar 2006
2006-03-01 17:00:49 +01:00
Stefan Roese 58ad497833 Convert mcc200 to use common CFI flash driver
Patch by Stefan Roese, 28 Feb 2006
2006-02-28 15:33:28 +01:00
Wolfgang Denk c81eb1f5f5 Cleanup MCC200 board. 2006-02-24 01:42:40 +01:00
Wolfgang Denk 86ea5f93d7 Initial port to MCC200 board (work in progress)
Minimally modified patch by Bluetechnix, Vienna
2006-02-22 00:43:16 +01:00