1
0
Fork 0
Commit Graph

1229 Commits (7d4450a9773673052fcd7fdf0a4a88c089126ac1)

Author SHA1 Message Date
Simon Kagstrom 2896b5851f Command improvements for ubifs
Check that an argument is passed to ubifsmount and that addresses and
sizes are actually numbers for ubifsload. Also improve the instructions
a bit.

Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
Signed-off-by: Stefan Roese <sr@denx.de>
2009-07-09 13:04:25 +02:00
Simon Kagstrom 25c8f40059 Handle VID header offset in ubi part command
The VID header offset is sometimes needed to initialize the UBI
partition. This patch adds it (optionally) to the command line
for the ubi part command.

(Lines have been properly wrapped since last version)

Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
Acked-by: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
2009-07-09 09:57:54 +02:00
HeungJun Kim 2e8a6f551c env_onenand: change env_address type from unsigned long to loff_t
If use the onenand boot, the env_relocate_spec() calls mtd->read(),
and the type of the argument #2 of mtd->read() was changed to loff_t.
But, the "env_addr" type is still unsigned long, thus this patch change
the type from unsigned long to loff_t.

Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: HeungJun, Kim <riverful.kim@samsung.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2009-07-07 17:58:11 -05:00
Guennadi Liakhovetski b74ab73736 nand_spl: read environment early, when booting from NAND using nand_spl
Currently, when booting from NAND using nand_spl, in the beginning the default
environment is used until later in boot process the dynamic environment is read
out. This way environment variables that must be interpreted early, like the
baudrate or "silent", cannot be modified dynamically and remain at their
default values. Fix this problem by reading out main and redundand (if used)
copies of the environment in the nand_spl code.

Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2009-07-07 17:58:07 -05:00
Wolfgang Denk 8360b66bac nand/onenand: Fix missing argument checking for "markbad" command
The "nand markbad" and "onenand markbad" commands did not check if an
argument was passed; if this was forgotten, no error was raised but
block 0 was marked as bad.

While fixing this bug, clean up the code a bit and allow to pass more
than one block address, thus allowing to mark several blocks as bad
in a single command invocation.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2009-07-07 17:58:05 -05:00
Guennadi Liakhovetski d27bc728cf env_nand: remove unused variable.
Remove an unused "total" variable in multiple functions.

Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2009-07-07 17:58:03 -05:00
Poonam Aggrwal 039594a430 8xxx: Second UART port added for MPC85xx, MPC83xx, MPC86xx processors
Defining the next two configs allows to switch the serial port from the
console using the setenv stdin and stdout
  1. #define CONFIG_SERIAL_MULTI 1 /* Enable both serial ports */
  2. #define CONFIG_SYS_CONSOLE_IS_IN_ENV /* determine from environment */

Signed-off-by: Poonam Aggrwal <poonam.aggrwal@freescale.com>
Signed-off-by: Ed Swarthout <Ed.Swarthout@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-07-02 08:34:13 -05:00
Mike Frysinger dd14af7640 Blackfin: new spibootldr command
Newer Blackfin parts can an on-chip ROM that can boot LDRs over SPI flashes,
so add a new 'spibootldr' command to take advantage of it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-14 20:01:04 -04:00
Peter Tyser 0f89860494 83xx: Replace CONFIG_MPC83XX with CONFIG_MPC83xx
Use the standard lowercase "xx" capitalization that other Freescale
architectures use for CPU defines to prevent confusion and errors

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2009-06-12 20:47:17 +02:00
Wolfgang Denk 3b74e7ec58 MPC512x: remove include/mpc512x.h
Move needed definitions (register descriptions etc.) from
include/mpc512x.h  into  include/asm-ppc/immap_512x.h.

Instead of using a #define'd register offset, use a function that
provides the PATA controller's base address.

All the rest of include/mpc512x.h are register offset definitions
which can be eliminated by proper use of C structures.

There are only a few register offsets remaining that are needed in
cpu/mpc512x/start.S; for these we provide cpu/mpc512x/asm-offsets.h
which is intended as a temporary workaround only. In a later patch
this file will be removed, too, and then auto-generated from the
respective C structs.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: John Rigby <jcrigby@gmail.com>
2009-06-12 20:47:16 +02:00
Wolfgang Denk a89c33db96 General help message cleanup
Many of the help messages were not really helpful; for example, many
commands that take no arguments would not print a correct synopsis
line, but "No additional help available." which is not exactly wrong,
but not helpful either.

Commit ``Make "usage" messages more helpful.'' changed this
partially. But it also became clear that lots of "Usage" and "Help"
messages (fields "usage" and "help" in struct cmd_tbl_s respective)
were actually redundant.

This patch cleans this up - for example:

Before:
	=> help dtt
	dtt - Digital Thermometer and Thermostat

	Usage:
	dtt         - Read temperature from digital thermometer and thermostat.

After:
	=> help dtt
	dtt - Read temperature from Digital Thermometer and Thermostat

	Usage:
	dtt

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-06-12 20:47:16 +02:00
Wolfgang Denk 94796d8544 Make "usage" messages more helpful.
In case of incorrect command invocations U-Boot used to print pretty
useless "usage" messages, for example:

	=> nand markbad
	Usage:
	nand - NAND sub-system

In the result, the user would have to run the "help" command to get
the (available) information about correct command usage. Change this,
so that this information gets always printed.

Note that this changes the user interface of all commands, but
hopefully to the better.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-06-12 20:45:48 +02:00
Mike Frysinger 4c94f6c54b nvedit: speed up printing of environment
The printing code would check the same environment byte multiple times and
write to the console one byte at a time.  For some devices (such as the
Blackfin JTAG console which operates in 8 bytes at a time), this is pretty
damned slow.  So create a small 16 byte buffer to fill up and send to puts
as needed.  In the process, unify the different print functions, shrink
the resulting code (source and compiled), and avoid excess env reads as
those too can be somewhat expensive depending on the board.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-12 20:45:48 +02:00
Mike Frysinger ecb1dc8922 Add support for Linux-like kallsysms
The kernel stores address<->symbol names in it so things can be decoded at
runtime.  Do it in U-Boot, and we get nice symbol decoding when crashing.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-12 20:45:48 +02:00
Wolfgang Denk 36c9169aa6 cmd_mtdparts.c: allow to omit definitions for default settings
There is actually no good reason to enforce that all board
configuations must define default settings for "mtdids" and
"mtdparts".  Actually this may be difficult to handle, especially on
boards where different sizes of flash chips can be fit, so there is no
real "default" partition map for all boards.

Lift this arbitrary limitation.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-06-12 20:45:48 +02:00
Stefan Roese 864aa034f3 cmd_mtdparts: Move to common handling of FLASH devices via MTD layer
This patch removes all references to the direct CFI FLASH interface
(via flash_info[]). Now that all FLASH types currently handled in
mtdparts are available (if selected, see below) via the MTD infrastructure.
This is NOR, NAND and OneNAND right now. This can be achieved by defining
the following options:

CONFIG_MTD_DEVICE (for all FLASH types)

plus

CONFIG_FLASH_CFI_MTD (for NOR FLASH)

So we need to add those defines to the board config headers currently
using the mtdparts commands. This is done via another patch, so
we shouldn't break mtdparts compatibility.

One big advantage from this solution is that the cmd_mtdparts.c is
*much* cleaner now. Lot's of #ifdef's are removed and the code itself
is smaller. Additionally the newly added MDT concatenation feature
can new be used via the mtdparts infrastructure and therefor via
UBI etc.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Ladislav Michl <ladis@linux-mips.org>
Cc: Scott Wood <scottwood@freescale.com>
2009-06-12 20:45:48 +02:00
Stefan Roese 8d2effea23 mtd: Update MTD infrastructure to support 64bit device size
This patch brings the U-Boot MTD infrastructure in sync with the current
Linux MTD version (2.6.30-rc3). Biggest change is the 64bit device size
support and a resync of the mtdpart.c file which has seen multiple fixes
meanwhile.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Kyungmin Park <kmpark@infradead.org>
2009-06-12 20:45:47 +02:00
Jean-Christophe PLAGNIOL-VILLARD 55e0ed6078 make MODEM SUPPORT generic instead of duplicate it
and fix comment

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

Adjusted Copyright message.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-06-12 20:45:47 +02:00
Tom Rix 660888b7fb ZOOM2 Add serial support.
Zoom2 serial is in general supplied by one of the 4 UARTS on the debug board.
The default serial is from the USB connector on left side of the debug board.
The USB connector will produce 2 of the 4 UARTS.  On your host pick the first
enumeration.

The details of the setting of the serial gpmc setup are not available.
The values were provided by another party.

The serial port set up is the same with Zoom1.
Baud rate 115200, 8 bit data, no parity, 1 stop bit, no flow.

The kernel bootargs are
console=ttyS3,115200n8

Signed-off-by: Tom Rix <Tom.Rix@windriver.com>
2009-06-12 20:39:53 +02:00
Peter Tyser 9166b77635 cmd_i2c: Fix i2c help command output when CONFIG_I2C_MUX
When CONFIG_I2C_MUX was defined the output of 'help i2c' was not
correct, eg:

=> help i2c
i2c bus [muxtype:muxaddr:muxchannel] - add a new bus reached over muxes.
speed [speed] - show or set I2C bus speed
i2c dev [dev] - show or set current I2C bus
...

It has been changed to:
i2c speed [speed] - show or set I2C bus speed
i2c bus [muxtype:muxaddr:muxchannel] - add a new bus reached over muxes
i2c dev [dev] - show or set current I2C bus
...

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-06-12 20:39:46 +02:00
Peter Tyser 0a45a6357b cmd_i2c: Clean up trivial helper functions
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-06-12 20:39:46 +02:00
Peter Tyser e96ad5d3ab cmd_i2c: Clean up i2c command argument parsing
argc and argv should only be modified once instead of once for
every i2c sub-command

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-06-12 20:39:46 +02:00
Peter Tyser 0f89c54be9 i2c: Update references to individual i2c commands
The individual i2c commands imd, imm, inm, imw, icrc32, iprobe, iloop,
and isdram are no longer available so all references to them have been
updated to the new form of "i2c <cmd>".

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-06-12 20:39:46 +02:00
Peter Tyser d48eb5131d i2c: Remove deprecated individual i2c commands
The following individual I2C commands have been removed: imd, imm, inm,
imw, icrc32, iprobe, iloop, isdram.

The functionality of the individual commands is still available via
the 'i2c' command.

This change only has an impact on those boards which did not have
CONFIG_I2C_CMD_TREE defined.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-06-12 20:39:46 +02:00
Peter Tyser 655b34a78a i2c: Create common default i2c_[set|get]_bus_speed() functions
New default, weak i2c_get_bus_speed() and i2c_set_bus_speed() functions
replace a number of architecture-specific implementations.

Also, providing default functions will allow all boards to enable
CONFIG_I2C_CMD_TREE.  This was previously not possible since the
tree-form of the i2c command provides the ability to display and modify
the i2c bus speed which requires i2c_[set|get]_bus_speed() to be
present.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-06-12 20:39:45 +02:00
Peter Tyser 9c90a2c8e8 i2c.h: Provide a default CONFIG_SYS_I2C_SLAVE value
Many boards/controllers/drivers don't support an I2C slave interface,
however CONFIG_SYS_I2C_SLAVE is used in common code so provide a
default

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-06-12 20:39:45 +02:00
Rabin Vincent e85649c7e6 mmc: check find_mmc_device return value
find_mmc_device returns NULL if an invalid device number is specified.
Check for this to avoid dereferencing NULL pointers.

Signed-off-by: Rabin Vincent <rabin@rab.in>
2009-06-02 17:18:56 -05:00
Rabin Vincent ac0865ff33 mmc: clean up help texts
Remove some repeated words and superfluous newlines in the mmc command
help entries.

Signed-off-by: Rabin Vincent <rabin@rab.in>
2009-06-02 17:18:56 -05:00
Stefan Roese 76b5883da2 jffs2/mtdparts: Fix problem with usage from JFFS2 and MTDPARTS together
Currently using JFFS2 with MTDPARTS enabled doesn't work. This is because
mtdparts_init() is available in both files, cmd_mtdparts.c and
cmd_jffs2.c. Please note that in the original cmd_jffs2.c file (before
the jffs2/mtdparts command/file split those 2 different versions
already existed. So this is nothing new. The main problem is that the
variables "current_dev" and "current_partnum" are declared in both
files now. This doesn't work.

This patch now changes the names of those variable to more specific
names: "current_mtd_dev" and "current_mtd_partnum". This is because
this patch also changes the declaration from static to global, so
that they can be used from both files.

Please note that my first tests were not successful. The MTD devices
selected via mtdparts are now accessed but I'm failing to see the
directory listed via the "ls" command. Nothing is displayed. Perhaps
I didn't generate the JFFS2 image correctly (I never used JFFS2 in
U-Boot before). Not sure. Perhaps somebody else could take a look at
this as well. I'll continue looking into this on Monday.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
Cc: Ilya Yanok <yanok@emcraft.com>
Cc: Renaud barbier <renaud.barbier@ge.com>
2009-05-28 21:26:00 +02:00
Wolfgang Denk 5af210c2ed Merge branch 'master' of git://git.denx.de/u-boot-ubi 2009-05-20 22:42:04 +02:00
Kim Phillips 2df72b82bc common: fix inline--weak error spotted by gcc 4.4
cmd_ide.c:547: error: inline function 'ide_inb' cannot be declared weak

removing the inline attribute fixes it.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2009-05-20 22:36:28 +02:00
Andreas Huber 0850301747 UBI: fix return code in ubi_volume_read
Return -ENODEV instead of 0 when trying to read from a non existing volume.

Signed-off-by: Andreas Huber <andreas.huber@keymile.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2009-05-20 13:01:58 +02:00
Detlev Zundel 792a09eb9d Fix e-mail address of Gary Jennejohn.
Signed-off-by: Detlev Zundel <dzu@denx.de>
2009-05-15 22:11:59 +02:00
Emil Medve 5e2c08c3ac Remove inline qualifier from show_boot_progress()
The 'inline' is conflicting with the semantic of 'weak' attribute and with the
way the show_boot_progress() function is used.

Also gcc 4.4 is complaining about it:

main.c:51: error: inline function 'show_boot_progress' cannot be declared weak

Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com>
2009-05-15 22:04:04 +02:00
Heiko Schocher da95427ce4 netloop: updates for NetLoop
Fix some issues introduced from commit:
2f70c49e5b
suggested by Mike Frysinger.

- added some comment for the env_id variable in common_cmd_nvedit.c
- moved some variables in fn scope instead of file scope
- NetInitLoop now static void

Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Ben Warren <biggerbadderben@gmail.com>
2009-05-15 21:19:02 +02:00
Wolfgang Denk 4d9eab89b3 cmd_ext2.c: fix compile warnings
Get rid of these warnings:

cmd_ext2.c:247: warning: format '%ld' expects type 'long int', but argument 2 has type 'int'
cmd_ext2.c:248: warning: format '%lX' expects type 'long unsigned int', but argument 3 has type 'int'

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-04-28 08:50:31 +02:00
Stefan Roese 2d579e5060 ubi: Remove flash selection parameter (nor|nand|onenand) from "ubi part"
This patch removes the now unnecessary flash type parameter from the
"ubi part" command. Currently the user has to define the type of flash
he will be using UBI on. Example:

=> ubi part nor partition1

With this patch this type parameter is not needed anymore. The user can
now select the partition directly without the flash type paramter.
Example:

=> ubi part partition1

This breaks backward compatibility right now because of the change in the
command syntax. But UBI support is still quite fresh and the advantage of
this new command is syntax big enough for this change. Additionally the
code is much cleaner now.

Signed-off-by: Stefan Roese <sr@denx.de>
CC: Kyungmin Park <kyungmin.park@samsung.com>
2009-04-28 01:15:35 +02:00
Ladislav Michl 0c8a84916c Separate mtdparts command from jffs2
On Thu, Mar 19, 2009 at 01:30:36PM +0100, Stefan Roese wrote:
> Currently the mtdparts commands are included in the jffs2 command support.
> This doesn't make sense anymore since other commands (e.g. UBI) use this
> infrastructure as well now. This patch separates the mtdparts commands from
> the jffs2 commands making it possible to only select mtdparts when no JFFS2
> support is needed.

One more leftover... Let nboot command know about partitions even if JFFS2
support is not enabled.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Acked-by: Stefan Roese <sr@denx.de>
2009-04-28 01:06:24 +02:00
Peter Tyser 67c2e57c08 cmd_ide: Remove unused AmigaOneG3SE code
The output_data_short() and input_data_short() functions for the
AmigaOneG3SE are unused and result in compiler warnings.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-04-28 01:03:13 +02:00
David Brownell 08f077da92 mtdpart command: align output columns
Make the headers in the "mtdparts" command output line up
with their columns ... strike the extra TAB character.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-04-28 00:57:12 +02:00
Gao Guanhua 351f40caf2 fs: Fix the wrong type of var
The filelen should be signed type, not unsigned type.
otherwise, The condition as below never take.
	if (filelen < 0)

Signed-off-by: Gao Guanhua <B22826@freescale.com>
Signed-off-by: Dave Liu <daveliu@freescale.com>
2009-04-28 00:35:27 +02:00
Mike Frysinger dfc99e143f cmd_nand: drop duplicate NULL ptr check
The first if statement checks for NULL ptrs, so there is no need to check
it again in later else cases (such as .oob).

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Scott Wood <scottwood@freescale.com>
2009-04-16 23:03:44 +02:00
Wolfgang Denk f63728c804 One more fix for building env_embedded.o
In addition to the changes for CONFIG_ENV_IS_IN_FLASH as done in
commit afcbce07, we also need to do the same for
CONFIG_ENV_IS_IN_EEPROM and CONFIG_ENV_IS_IN_NVRAM.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-04-05 00:18:44 +02:00
Scott Wood e3d1ac7bb1 common/image.c: Relocate strings in tables.
Without this, u-boot can crash or print garbage if the original link
address no longer points to a valid string.

Signed-off-by: Scott Wood <scottwood@freescale.com>
2009-04-04 23:33:12 +02:00
Andreas Huber c203ef5db0 UBI/cfi-mtd: Fix mtd name for multiple chips
On platforms with multiple NOR chips, currently only the first one
can be selected using the "ubi part" command. This patch fixes this
problem by using different names for the NOR "mtd devices".

It also changes the name of the NOR MTD device from "cfi-mtd" to
"norX" (X indexing the device numer) to better match the mtdparts
defaults.

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Andreas Huber <andreas.huber@keymile.com>
2009-04-04 23:25:40 +02:00
Minkyu Kang 869f6bf4de cmd_mmc: add support for device command for selecting mmc device
This patch improves device command for selecting mmc device

Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2009-04-04 23:07:19 +02:00
Mike Frysinger 852dbfdd56 more command usage cleanup
Fix up a few dangling commands like in "Command usage cleanup" commit.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-04-04 22:42:54 +02:00
Ladislav Michl b93b24bf76 Separate mtdparts command from jffs2
On Thu, Mar 19, 2009 at 01:30:36PM +0100, Stefan Roese wrote:
> Currently the mtdparts commands are included in the jffs2 command support.
> This doesn't make sense anymore since other commands (e.g. UBI) use this
> infrastructure as well now. This patch separates the mtdparts commands from
> the jffs2 commands making it possible to only select mtdparts when no JFFS2
> support is needed.

... and to make it useful for NAND chips as well, we should also remove now
unrelated CONFIG_JFFS2_NAND. Note that struct part_info etc is in
jffs2/load_kernel.h which is a bit misleading filename for that purpose,
but that can be fixed later (tm).

Signed-off-by:  Ladislav Michl <ladis@linux-mips.org>
2009-04-04 22:42:05 +02:00
Jean-Christophe PLAGNIOL-VILLARD b9c0e4c29e add dataflash mmc mux missing support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-04-04 20:42:20 +02:00
Wolfgang Denk 83863df04b Fix quoting bug introduced by commit 74de7aef
Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-04-04 17:58:26 +02:00